public abstract class NetworkSecurityClient
NetworkSecurity client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.NetworkSecurity.V1Beta1Assembly
Google.Cloud.NetworkSecurity.V1Beta1.dll
Remarks
Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information. Network Security service.
Properties
CreateAuthorizationPolicyOperationsClient
public virtual OperationsClient CreateAuthorizationPolicyOperationsClient { get; }
The long-running operations client for CreateAuthorizationPolicy
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
CreateClientTlsPolicyOperationsClient
public virtual OperationsClient CreateClientTlsPolicyOperationsClient { get; }
The long-running operations client for CreateClientTlsPolicy
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
CreateServerTlsPolicyOperationsClient
public virtual OperationsClient CreateServerTlsPolicyOperationsClient { get; }
The long-running operations client for CreateServerTlsPolicy
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the NetworkSecurity service, which is a host of "networksecurity.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default NetworkSecurity scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default NetworkSecurity scopes are:
DeleteAuthorizationPolicyOperationsClient
public virtual OperationsClient DeleteAuthorizationPolicyOperationsClient { get; }
The long-running operations client for DeleteAuthorizationPolicy
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteClientTlsPolicyOperationsClient
public virtual OperationsClient DeleteClientTlsPolicyOperationsClient { get; }
The long-running operations client for DeleteClientTlsPolicy
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteServerTlsPolicyOperationsClient
public virtual OperationsClient DeleteServerTlsPolicyOperationsClient { get; }
The long-running operations client for DeleteServerTlsPolicy
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual NetworkSecurity.NetworkSecurityClient GrpcClient { get; }
The underlying gRPC NetworkSecurity client
Property Value | |
---|---|
Type | Description |
NetworkSecurity.NetworkSecurityClient |
UpdateAuthorizationPolicyOperationsClient
public virtual OperationsClient UpdateAuthorizationPolicyOperationsClient { get; }
The long-running operations client for UpdateAuthorizationPolicy
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateClientTlsPolicyOperationsClient
public virtual OperationsClient UpdateClientTlsPolicyOperationsClient { get; }
The long-running operations client for UpdateClientTlsPolicy
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateServerTlsPolicyOperationsClient
public virtual OperationsClient UpdateServerTlsPolicyOperationsClient { get; }
The long-running operations client for UpdateServerTlsPolicy
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static NetworkSecurityClient Create()
Synchronously creates a NetworkSecurityClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use NetworkSecurityClientBuilder.
Returns | |
---|---|
Type | Description |
NetworkSecurityClient | The created NetworkSecurityClient. |
CreateAsync(CancellationToken)
public static Task<NetworkSecurityClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a NetworkSecurityClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use NetworkSecurityClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<NetworkSecurityClient> | The task representing the created NetworkSecurityClient. |
CreateAuthorizationPolicy(AuthorizationPolicyName, AuthorizationPolicy, String, CallSettings)
public virtual Operation<AuthorizationPolicy, OperationMetadata> CreateAuthorizationPolicy(AuthorizationPolicyName parent, AuthorizationPolicy authorizationPolicy, string authorizationPolicyId, CallSettings callSettings = null)
Creates a new AuthorizationPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | AuthorizationPolicyName Required. The parent resource of the AuthorizationPolicy. Must be in the
format |
authorizationPolicy | AuthorizationPolicy Required. AuthorizationPolicy resource to be created. |
authorizationPolicyId | String Required. Short name of the AuthorizationPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<AuthorizationPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
AuthorizationPolicyName parent = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
string authorizationPolicyId = "";
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = networkSecurityClient.CreateAuthorizationPolicy(parent, authorizationPolicy, authorizationPolicyId);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceCreateAuthorizationPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
CreateAuthorizationPolicy(CreateAuthorizationPolicyRequest, CallSettings)
public virtual Operation<AuthorizationPolicy, OperationMetadata> CreateAuthorizationPolicy(CreateAuthorizationPolicyRequest request, CallSettings callSettings = null)
Creates a new AuthorizationPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
request | CreateAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<AuthorizationPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
CreateAuthorizationPolicyRequest request = new CreateAuthorizationPolicyRequest
{
ParentAsAuthorizationPolicyName = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]"),
AuthorizationPolicyId = "",
AuthorizationPolicy = new AuthorizationPolicy(),
};
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = networkSecurityClient.CreateAuthorizationPolicy(request);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceCreateAuthorizationPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
CreateAuthorizationPolicy(String, AuthorizationPolicy, String, CallSettings)
public virtual Operation<AuthorizationPolicy, OperationMetadata> CreateAuthorizationPolicy(string parent, AuthorizationPolicy authorizationPolicy, string authorizationPolicyId, CallSettings callSettings = null)
Creates a new AuthorizationPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent resource of the AuthorizationPolicy. Must be in the
format |
authorizationPolicy | AuthorizationPolicy Required. AuthorizationPolicy resource to be created. |
authorizationPolicyId | String Required. Short name of the AuthorizationPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<AuthorizationPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/authorizationPolicies/[AUTHORIZATION_POLICY]";
AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
string authorizationPolicyId = "";
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = networkSecurityClient.CreateAuthorizationPolicy(parent, authorizationPolicy, authorizationPolicyId);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceCreateAuthorizationPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
CreateAuthorizationPolicyAsync(AuthorizationPolicyName, AuthorizationPolicy, String, CallSettings)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> CreateAuthorizationPolicyAsync(AuthorizationPolicyName parent, AuthorizationPolicy authorizationPolicy, string authorizationPolicyId, CallSettings callSettings = null)
Creates a new AuthorizationPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | AuthorizationPolicyName Required. The parent resource of the AuthorizationPolicy. Must be in the
format |
authorizationPolicy | AuthorizationPolicy Required. AuthorizationPolicy resource to be created. |
authorizationPolicyId | String Required. Short name of the AuthorizationPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
AuthorizationPolicyName parent = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
string authorizationPolicyId = "";
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = await networkSecurityClient.CreateAuthorizationPolicyAsync(parent, authorizationPolicy, authorizationPolicyId);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
CreateAuthorizationPolicyAsync(AuthorizationPolicyName, AuthorizationPolicy, String, CancellationToken)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> CreateAuthorizationPolicyAsync(AuthorizationPolicyName parent, AuthorizationPolicy authorizationPolicy, string authorizationPolicyId, CancellationToken cancellationToken)
Creates a new AuthorizationPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | AuthorizationPolicyName Required. The parent resource of the AuthorizationPolicy. Must be in the
format |
authorizationPolicy | AuthorizationPolicy Required. AuthorizationPolicy resource to be created. |
authorizationPolicyId | String Required. Short name of the AuthorizationPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
AuthorizationPolicyName parent = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
string authorizationPolicyId = "";
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = await networkSecurityClient.CreateAuthorizationPolicyAsync(parent, authorizationPolicy, authorizationPolicyId);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
CreateAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest, CallSettings)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> CreateAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest request, CallSettings callSettings = null)
Creates a new AuthorizationPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
request | CreateAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateAuthorizationPolicyRequest request = new CreateAuthorizationPolicyRequest
{
ParentAsAuthorizationPolicyName = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]"),
AuthorizationPolicyId = "",
AuthorizationPolicy = new AuthorizationPolicy(),
};
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = await networkSecurityClient.CreateAuthorizationPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
CreateAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest, CancellationToken)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> CreateAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest request, CancellationToken cancellationToken)
Creates a new AuthorizationPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
request | CreateAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateAuthorizationPolicyRequest request = new CreateAuthorizationPolicyRequest
{
ParentAsAuthorizationPolicyName = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]"),
AuthorizationPolicyId = "",
AuthorizationPolicy = new AuthorizationPolicy(),
};
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = await networkSecurityClient.CreateAuthorizationPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
CreateAuthorizationPolicyAsync(String, AuthorizationPolicy, String, CallSettings)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> CreateAuthorizationPolicyAsync(string parent, AuthorizationPolicy authorizationPolicy, string authorizationPolicyId, CallSettings callSettings = null)
Creates a new AuthorizationPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent resource of the AuthorizationPolicy. Must be in the
format |
authorizationPolicy | AuthorizationPolicy Required. AuthorizationPolicy resource to be created. |
authorizationPolicyId | String Required. Short name of the AuthorizationPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/authorizationPolicies/[AUTHORIZATION_POLICY]";
AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
string authorizationPolicyId = "";
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = await networkSecurityClient.CreateAuthorizationPolicyAsync(parent, authorizationPolicy, authorizationPolicyId);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
CreateAuthorizationPolicyAsync(String, AuthorizationPolicy, String, CancellationToken)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> CreateAuthorizationPolicyAsync(string parent, AuthorizationPolicy authorizationPolicy, string authorizationPolicyId, CancellationToken cancellationToken)
Creates a new AuthorizationPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent resource of the AuthorizationPolicy. Must be in the
format |
authorizationPolicy | AuthorizationPolicy Required. AuthorizationPolicy resource to be created. |
authorizationPolicyId | String Required. Short name of the AuthorizationPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/authorizationPolicies/[AUTHORIZATION_POLICY]";
AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
string authorizationPolicyId = "";
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = await networkSecurityClient.CreateAuthorizationPolicyAsync(parent, authorizationPolicy, authorizationPolicyId);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
CreateClientTlsPolicy(ClientTlsPolicyName, ClientTlsPolicy, String, CallSettings)
public virtual Operation<ClientTlsPolicy, OperationMetadata> CreateClientTlsPolicy(ClientTlsPolicyName parent, ClientTlsPolicy clientTlsPolicy, string clientTlsPolicyId, CallSettings callSettings = null)
Creates a new ClientTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | ClientTlsPolicyName Required. The parent resource of the ClientTlsPolicy. Must be in
the format |
clientTlsPolicy | ClientTlsPolicy Required. ClientTlsPolicy resource to be created. |
clientTlsPolicyId | String Required. Short name of the ClientTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "client_mtls_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ClientTlsPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
ClientTlsPolicyName parent = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
ClientTlsPolicy clientTlsPolicy = new ClientTlsPolicy();
string clientTlsPolicyId = "";
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = networkSecurityClient.CreateClientTlsPolicy(parent, clientTlsPolicy, clientTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceCreateClientTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateClientTlsPolicy(CreateClientTlsPolicyRequest, CallSettings)
public virtual Operation<ClientTlsPolicy, OperationMetadata> CreateClientTlsPolicy(CreateClientTlsPolicyRequest request, CallSettings callSettings = null)
Creates a new ClientTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
request | CreateClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ClientTlsPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
CreateClientTlsPolicyRequest request = new CreateClientTlsPolicyRequest
{
ParentAsClientTlsPolicyName = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]"),
ClientTlsPolicyId = "",
ClientTlsPolicy = new ClientTlsPolicy(),
};
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = networkSecurityClient.CreateClientTlsPolicy(request);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceCreateClientTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateClientTlsPolicy(String, ClientTlsPolicy, String, CallSettings)
public virtual Operation<ClientTlsPolicy, OperationMetadata> CreateClientTlsPolicy(string parent, ClientTlsPolicy clientTlsPolicy, string clientTlsPolicyId, CallSettings callSettings = null)
Creates a new ClientTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent resource of the ClientTlsPolicy. Must be in
the format |
clientTlsPolicy | ClientTlsPolicy Required. ClientTlsPolicy resource to be created. |
clientTlsPolicyId | String Required. Short name of the ClientTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "client_mtls_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ClientTlsPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clientTlsPolicies/[CLIENT_TLS_POLICY]";
ClientTlsPolicy clientTlsPolicy = new ClientTlsPolicy();
string clientTlsPolicyId = "";
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = networkSecurityClient.CreateClientTlsPolicy(parent, clientTlsPolicy, clientTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceCreateClientTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateClientTlsPolicyAsync(ClientTlsPolicyName, ClientTlsPolicy, String, CallSettings)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> CreateClientTlsPolicyAsync(ClientTlsPolicyName parent, ClientTlsPolicy clientTlsPolicy, string clientTlsPolicyId, CallSettings callSettings = null)
Creates a new ClientTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | ClientTlsPolicyName Required. The parent resource of the ClientTlsPolicy. Must be in
the format |
clientTlsPolicy | ClientTlsPolicy Required. ClientTlsPolicy resource to be created. |
clientTlsPolicyId | String Required. Short name of the ClientTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "client_mtls_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ClientTlsPolicyName parent = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
ClientTlsPolicy clientTlsPolicy = new ClientTlsPolicy();
string clientTlsPolicyId = "";
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateClientTlsPolicyAsync(parent, clientTlsPolicy, clientTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateClientTlsPolicyAsync(ClientTlsPolicyName, ClientTlsPolicy, String, CancellationToken)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> CreateClientTlsPolicyAsync(ClientTlsPolicyName parent, ClientTlsPolicy clientTlsPolicy, string clientTlsPolicyId, CancellationToken cancellationToken)
Creates a new ClientTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | ClientTlsPolicyName Required. The parent resource of the ClientTlsPolicy. Must be in
the format |
clientTlsPolicy | ClientTlsPolicy Required. ClientTlsPolicy resource to be created. |
clientTlsPolicyId | String Required. Short name of the ClientTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "client_mtls_policy". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ClientTlsPolicyName parent = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
ClientTlsPolicy clientTlsPolicy = new ClientTlsPolicy();
string clientTlsPolicyId = "";
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateClientTlsPolicyAsync(parent, clientTlsPolicy, clientTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateClientTlsPolicyAsync(CreateClientTlsPolicyRequest, CallSettings)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> CreateClientTlsPolicyAsync(CreateClientTlsPolicyRequest request, CallSettings callSettings = null)
Creates a new ClientTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
request | CreateClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateClientTlsPolicyRequest request = new CreateClientTlsPolicyRequest
{
ParentAsClientTlsPolicyName = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]"),
ClientTlsPolicyId = "",
ClientTlsPolicy = new ClientTlsPolicy(),
};
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateClientTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateClientTlsPolicyAsync(CreateClientTlsPolicyRequest, CancellationToken)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> CreateClientTlsPolicyAsync(CreateClientTlsPolicyRequest request, CancellationToken cancellationToken)
Creates a new ClientTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
request | CreateClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateClientTlsPolicyRequest request = new CreateClientTlsPolicyRequest
{
ParentAsClientTlsPolicyName = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]"),
ClientTlsPolicyId = "",
ClientTlsPolicy = new ClientTlsPolicy(),
};
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateClientTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateClientTlsPolicyAsync(String, ClientTlsPolicy, String, CallSettings)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> CreateClientTlsPolicyAsync(string parent, ClientTlsPolicy clientTlsPolicy, string clientTlsPolicyId, CallSettings callSettings = null)
Creates a new ClientTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent resource of the ClientTlsPolicy. Must be in
the format |
clientTlsPolicy | ClientTlsPolicy Required. ClientTlsPolicy resource to be created. |
clientTlsPolicyId | String Required. Short name of the ClientTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "client_mtls_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clientTlsPolicies/[CLIENT_TLS_POLICY]";
ClientTlsPolicy clientTlsPolicy = new ClientTlsPolicy();
string clientTlsPolicyId = "";
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateClientTlsPolicyAsync(parent, clientTlsPolicy, clientTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateClientTlsPolicyAsync(String, ClientTlsPolicy, String, CancellationToken)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> CreateClientTlsPolicyAsync(string parent, ClientTlsPolicy clientTlsPolicy, string clientTlsPolicyId, CancellationToken cancellationToken)
Creates a new ClientTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent resource of the ClientTlsPolicy. Must be in
the format |
clientTlsPolicy | ClientTlsPolicy Required. ClientTlsPolicy resource to be created. |
clientTlsPolicyId | String Required. Short name of the ClientTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "client_mtls_policy". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/clientTlsPolicies/[CLIENT_TLS_POLICY]";
ClientTlsPolicy clientTlsPolicy = new ClientTlsPolicy();
string clientTlsPolicyId = "";
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateClientTlsPolicyAsync(parent, clientTlsPolicy, clientTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateServerTlsPolicy(CreateServerTlsPolicyRequest, CallSettings)
public virtual Operation<ServerTlsPolicy, OperationMetadata> CreateServerTlsPolicy(CreateServerTlsPolicyRequest request, CallSettings callSettings = null)
Creates a new ServerTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
request | CreateServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ServerTlsPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
CreateServerTlsPolicyRequest request = new CreateServerTlsPolicyRequest
{
ParentAsServerTlsPolicyName = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]"),
ServerTlsPolicyId = "",
ServerTlsPolicy = new ServerTlsPolicy(),
};
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = networkSecurityClient.CreateServerTlsPolicy(request);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceCreateServerTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateServerTlsPolicy(ServerTlsPolicyName, ServerTlsPolicy, String, CallSettings)
public virtual Operation<ServerTlsPolicy, OperationMetadata> CreateServerTlsPolicy(ServerTlsPolicyName parent, ServerTlsPolicy serverTlsPolicy, string serverTlsPolicyId, CallSettings callSettings = null)
Creates a new ServerTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | ServerTlsPolicyName Required. The parent resource of the ServerTlsPolicy. Must be in
the format |
serverTlsPolicy | ServerTlsPolicy Required. ServerTlsPolicy resource to be created. |
serverTlsPolicyId | String Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "server_mtls_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ServerTlsPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
ServerTlsPolicyName parent = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
ServerTlsPolicy serverTlsPolicy = new ServerTlsPolicy();
string serverTlsPolicyId = "";
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = networkSecurityClient.CreateServerTlsPolicy(parent, serverTlsPolicy, serverTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceCreateServerTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateServerTlsPolicy(String, ServerTlsPolicy, String, CallSettings)
public virtual Operation<ServerTlsPolicy, OperationMetadata> CreateServerTlsPolicy(string parent, ServerTlsPolicy serverTlsPolicy, string serverTlsPolicyId, CallSettings callSettings = null)
Creates a new ServerTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent resource of the ServerTlsPolicy. Must be in
the format |
serverTlsPolicy | ServerTlsPolicy Required. ServerTlsPolicy resource to be created. |
serverTlsPolicyId | String Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "server_mtls_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ServerTlsPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/serverTlsPolicies/[SERVER_TLS_POLICY]";
ServerTlsPolicy serverTlsPolicy = new ServerTlsPolicy();
string serverTlsPolicyId = "";
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = networkSecurityClient.CreateServerTlsPolicy(parent, serverTlsPolicy, serverTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceCreateServerTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateServerTlsPolicyAsync(CreateServerTlsPolicyRequest, CallSettings)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> CreateServerTlsPolicyAsync(CreateServerTlsPolicyRequest request, CallSettings callSettings = null)
Creates a new ServerTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
request | CreateServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateServerTlsPolicyRequest request = new CreateServerTlsPolicyRequest
{
ParentAsServerTlsPolicyName = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]"),
ServerTlsPolicyId = "",
ServerTlsPolicy = new ServerTlsPolicy(),
};
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateServerTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateServerTlsPolicyAsync(CreateServerTlsPolicyRequest, CancellationToken)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> CreateServerTlsPolicyAsync(CreateServerTlsPolicyRequest request, CancellationToken cancellationToken)
Creates a new ServerTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
request | CreateServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateServerTlsPolicyRequest request = new CreateServerTlsPolicyRequest
{
ParentAsServerTlsPolicyName = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]"),
ServerTlsPolicyId = "",
ServerTlsPolicy = new ServerTlsPolicy(),
};
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateServerTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateServerTlsPolicyAsync(ServerTlsPolicyName, ServerTlsPolicy, String, CallSettings)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> CreateServerTlsPolicyAsync(ServerTlsPolicyName parent, ServerTlsPolicy serverTlsPolicy, string serverTlsPolicyId, CallSettings callSettings = null)
Creates a new ServerTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | ServerTlsPolicyName Required. The parent resource of the ServerTlsPolicy. Must be in
the format |
serverTlsPolicy | ServerTlsPolicy Required. ServerTlsPolicy resource to be created. |
serverTlsPolicyId | String Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "server_mtls_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ServerTlsPolicyName parent = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
ServerTlsPolicy serverTlsPolicy = new ServerTlsPolicy();
string serverTlsPolicyId = "";
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateServerTlsPolicyAsync(parent, serverTlsPolicy, serverTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateServerTlsPolicyAsync(ServerTlsPolicyName, ServerTlsPolicy, String, CancellationToken)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> CreateServerTlsPolicyAsync(ServerTlsPolicyName parent, ServerTlsPolicy serverTlsPolicy, string serverTlsPolicyId, CancellationToken cancellationToken)
Creates a new ServerTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | ServerTlsPolicyName Required. The parent resource of the ServerTlsPolicy. Must be in
the format |
serverTlsPolicy | ServerTlsPolicy Required. ServerTlsPolicy resource to be created. |
serverTlsPolicyId | String Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "server_mtls_policy". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ServerTlsPolicyName parent = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
ServerTlsPolicy serverTlsPolicy = new ServerTlsPolicy();
string serverTlsPolicyId = "";
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateServerTlsPolicyAsync(parent, serverTlsPolicy, serverTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateServerTlsPolicyAsync(String, ServerTlsPolicy, String, CallSettings)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> CreateServerTlsPolicyAsync(string parent, ServerTlsPolicy serverTlsPolicy, string serverTlsPolicyId, CallSettings callSettings = null)
Creates a new ServerTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent resource of the ServerTlsPolicy. Must be in
the format |
serverTlsPolicy | ServerTlsPolicy Required. ServerTlsPolicy resource to be created. |
serverTlsPolicyId | String Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "server_mtls_policy". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/serverTlsPolicies/[SERVER_TLS_POLICY]";
ServerTlsPolicy serverTlsPolicy = new ServerTlsPolicy();
string serverTlsPolicyId = "";
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateServerTlsPolicyAsync(parent, serverTlsPolicy, serverTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
CreateServerTlsPolicyAsync(String, ServerTlsPolicy, String, CancellationToken)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> CreateServerTlsPolicyAsync(string parent, ServerTlsPolicy serverTlsPolicy, string serverTlsPolicyId, CancellationToken cancellationToken)
Creates a new ServerTlsPolicy in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent resource of the ServerTlsPolicy. Must be in
the format |
serverTlsPolicy | ServerTlsPolicy Required. ServerTlsPolicy resource to be created. |
serverTlsPolicyId | String Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "server_mtls_policy". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/serverTlsPolicies/[SERVER_TLS_POLICY]";
ServerTlsPolicy serverTlsPolicy = new ServerTlsPolicy();
string serverTlsPolicyId = "";
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = await networkSecurityClient.CreateServerTlsPolicyAsync(parent, serverTlsPolicy, serverTlsPolicyId);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceCreateServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
DeleteAuthorizationPolicy(AuthorizationPolicyName, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteAuthorizationPolicy(AuthorizationPolicyName name, CallSettings callSettings = null)
Deletes a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | AuthorizationPolicyName Required. A name of the AuthorizationPolicy to delete. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
AuthorizationPolicyName name = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
// Make the request
Operation<Empty, OperationMetadata> response = networkSecurityClient.DeleteAuthorizationPolicy(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceDeleteAuthorizationPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteAuthorizationPolicy(DeleteAuthorizationPolicyRequest, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteAuthorizationPolicy(DeleteAuthorizationPolicyRequest request, CallSettings callSettings = null)
Deletes a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
request | DeleteAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
DeleteAuthorizationPolicyRequest request = new DeleteAuthorizationPolicyRequest
{
AuthorizationPolicyName = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = networkSecurityClient.DeleteAuthorizationPolicy(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceDeleteAuthorizationPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteAuthorizationPolicy(String, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteAuthorizationPolicy(string name, CallSettings callSettings = null)
Deletes a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the AuthorizationPolicy to delete. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/authorizationPolicies/[AUTHORIZATION_POLICY]";
// Make the request
Operation<Empty, OperationMetadata> response = networkSecurityClient.DeleteAuthorizationPolicy(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceDeleteAuthorizationPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteAuthorizationPolicyAsync(AuthorizationPolicyName, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAuthorizationPolicyAsync(AuthorizationPolicyName name, CallSettings callSettings = null)
Deletes a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | AuthorizationPolicyName Required. A name of the AuthorizationPolicy to delete. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
AuthorizationPolicyName name = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteAuthorizationPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteAuthorizationPolicyAsync(AuthorizationPolicyName, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAuthorizationPolicyAsync(AuthorizationPolicyName name, CancellationToken cancellationToken)
Deletes a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | AuthorizationPolicyName Required. A name of the AuthorizationPolicy to delete. Must be in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
AuthorizationPolicyName name = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteAuthorizationPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest request, CallSettings callSettings = null)
Deletes a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
request | DeleteAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
DeleteAuthorizationPolicyRequest request = new DeleteAuthorizationPolicyRequest
{
AuthorizationPolicyName = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteAuthorizationPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest request, CancellationToken cancellationToken)
Deletes a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
request | DeleteAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
DeleteAuthorizationPolicyRequest request = new DeleteAuthorizationPolicyRequest
{
AuthorizationPolicyName = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteAuthorizationPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteAuthorizationPolicyAsync(String, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAuthorizationPolicyAsync(string name, CallSettings callSettings = null)
Deletes a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the AuthorizationPolicy to delete. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/authorizationPolicies/[AUTHORIZATION_POLICY]";
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteAuthorizationPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteAuthorizationPolicyAsync(String, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteAuthorizationPolicyAsync(string name, CancellationToken cancellationToken)
Deletes a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the AuthorizationPolicy to delete. Must be in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/authorizationPolicies/[AUTHORIZATION_POLICY]";
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteAuthorizationPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteClientTlsPolicy(ClientTlsPolicyName, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteClientTlsPolicy(ClientTlsPolicyName name, CallSettings callSettings = null)
Deletes a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ClientTlsPolicyName Required. A name of the ClientTlsPolicy to delete. Must be in
the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
ClientTlsPolicyName name = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
// Make the request
Operation<Empty, OperationMetadata> response = networkSecurityClient.DeleteClientTlsPolicy(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceDeleteClientTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteClientTlsPolicy(DeleteClientTlsPolicyRequest, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteClientTlsPolicy(DeleteClientTlsPolicyRequest request, CallSettings callSettings = null)
Deletes a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | DeleteClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
DeleteClientTlsPolicyRequest request = new DeleteClientTlsPolicyRequest
{
ClientTlsPolicyName = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = networkSecurityClient.DeleteClientTlsPolicy(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceDeleteClientTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteClientTlsPolicy(String, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteClientTlsPolicy(string name, CallSettings callSettings = null)
Deletes a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ClientTlsPolicy to delete. Must be in
the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientTlsPolicies/[CLIENT_TLS_POLICY]";
// Make the request
Operation<Empty, OperationMetadata> response = networkSecurityClient.DeleteClientTlsPolicy(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceDeleteClientTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteClientTlsPolicyAsync(ClientTlsPolicyName, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteClientTlsPolicyAsync(ClientTlsPolicyName name, CallSettings callSettings = null)
Deletes a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ClientTlsPolicyName Required. A name of the ClientTlsPolicy to delete. Must be in
the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ClientTlsPolicyName name = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteClientTlsPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteClientTlsPolicyAsync(ClientTlsPolicyName, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteClientTlsPolicyAsync(ClientTlsPolicyName name, CancellationToken cancellationToken)
Deletes a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ClientTlsPolicyName Required. A name of the ClientTlsPolicy to delete. Must be in
the format |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ClientTlsPolicyName name = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteClientTlsPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest request, CallSettings callSettings = null)
Deletes a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | DeleteClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
DeleteClientTlsPolicyRequest request = new DeleteClientTlsPolicyRequest
{
ClientTlsPolicyName = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteClientTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest request, CancellationToken cancellationToken)
Deletes a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | DeleteClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
DeleteClientTlsPolicyRequest request = new DeleteClientTlsPolicyRequest
{
ClientTlsPolicyName = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteClientTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteClientTlsPolicyAsync(String, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteClientTlsPolicyAsync(string name, CallSettings callSettings = null)
Deletes a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ClientTlsPolicy to delete. Must be in
the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientTlsPolicies/[CLIENT_TLS_POLICY]";
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteClientTlsPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteClientTlsPolicyAsync(String, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteClientTlsPolicyAsync(string name, CancellationToken cancellationToken)
Deletes a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ClientTlsPolicy to delete. Must be in
the format |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientTlsPolicies/[CLIENT_TLS_POLICY]";
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteClientTlsPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteServerTlsPolicy(DeleteServerTlsPolicyRequest, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteServerTlsPolicy(DeleteServerTlsPolicyRequest request, CallSettings callSettings = null)
Deletes a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | DeleteServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
DeleteServerTlsPolicyRequest request = new DeleteServerTlsPolicyRequest
{
ServerTlsPolicyName = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = networkSecurityClient.DeleteServerTlsPolicy(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceDeleteServerTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteServerTlsPolicy(ServerTlsPolicyName, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteServerTlsPolicy(ServerTlsPolicyName name, CallSettings callSettings = null)
Deletes a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ServerTlsPolicyName Required. A name of the ServerTlsPolicy to delete. Must be in
the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
ServerTlsPolicyName name = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
// Make the request
Operation<Empty, OperationMetadata> response = networkSecurityClient.DeleteServerTlsPolicy(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceDeleteServerTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteServerTlsPolicy(String, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteServerTlsPolicy(string name, CallSettings callSettings = null)
Deletes a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ServerTlsPolicy to delete. Must be in
the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/serverTlsPolicies/[SERVER_TLS_POLICY]";
// Make the request
Operation<Empty, OperationMetadata> response = networkSecurityClient.DeleteServerTlsPolicy(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceDeleteServerTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest request, CallSettings callSettings = null)
Deletes a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | DeleteServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
DeleteServerTlsPolicyRequest request = new DeleteServerTlsPolicyRequest
{
ServerTlsPolicyName = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteServerTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest request, CancellationToken cancellationToken)
Deletes a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | DeleteServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
DeleteServerTlsPolicyRequest request = new DeleteServerTlsPolicyRequest
{
ServerTlsPolicyName = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteServerTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteServerTlsPolicyAsync(ServerTlsPolicyName, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteServerTlsPolicyAsync(ServerTlsPolicyName name, CallSettings callSettings = null)
Deletes a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ServerTlsPolicyName Required. A name of the ServerTlsPolicy to delete. Must be in
the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ServerTlsPolicyName name = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteServerTlsPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteServerTlsPolicyAsync(ServerTlsPolicyName, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteServerTlsPolicyAsync(ServerTlsPolicyName name, CancellationToken cancellationToken)
Deletes a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ServerTlsPolicyName Required. A name of the ServerTlsPolicy to delete. Must be in
the format |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ServerTlsPolicyName name = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteServerTlsPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteServerTlsPolicyAsync(String, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteServerTlsPolicyAsync(string name, CallSettings callSettings = null)
Deletes a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ServerTlsPolicy to delete. Must be in
the format |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/serverTlsPolicies/[SERVER_TLS_POLICY]";
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteServerTlsPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteServerTlsPolicyAsync(String, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteServerTlsPolicyAsync(string name, CancellationToken cancellationToken)
Deletes a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ServerTlsPolicy to delete. Must be in
the format |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/serverTlsPolicies/[SERVER_TLS_POLICY]";
// Make the request
Operation<Empty, OperationMetadata> response = await networkSecurityClient.DeleteServerTlsPolicyAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceDeleteServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
GetAuthorizationPolicy(AuthorizationPolicyName, CallSettings)
public virtual AuthorizationPolicy GetAuthorizationPolicy(AuthorizationPolicyName name, CallSettings callSettings = null)
Gets details of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | AuthorizationPolicyName Required. A name of the AuthorizationPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AuthorizationPolicy | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
AuthorizationPolicyName name = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
// Make the request
AuthorizationPolicy response = networkSecurityClient.GetAuthorizationPolicy(name);
GetAuthorizationPolicy(GetAuthorizationPolicyRequest, CallSettings)
public virtual AuthorizationPolicy GetAuthorizationPolicy(GetAuthorizationPolicyRequest request, CallSettings callSettings = null)
Gets details of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
request | GetAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AuthorizationPolicy | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
GetAuthorizationPolicyRequest request = new GetAuthorizationPolicyRequest
{
AuthorizationPolicyName = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]"),
};
// Make the request
AuthorizationPolicy response = networkSecurityClient.GetAuthorizationPolicy(request);
GetAuthorizationPolicy(String, CallSettings)
public virtual AuthorizationPolicy GetAuthorizationPolicy(string name, CallSettings callSettings = null)
Gets details of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the AuthorizationPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AuthorizationPolicy | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/authorizationPolicies/[AUTHORIZATION_POLICY]";
// Make the request
AuthorizationPolicy response = networkSecurityClient.GetAuthorizationPolicy(name);
GetAuthorizationPolicyAsync(AuthorizationPolicyName, CallSettings)
public virtual Task<AuthorizationPolicy> GetAuthorizationPolicyAsync(AuthorizationPolicyName name, CallSettings callSettings = null)
Gets details of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | AuthorizationPolicyName Required. A name of the AuthorizationPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AuthorizationPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
AuthorizationPolicyName name = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
// Make the request
AuthorizationPolicy response = await networkSecurityClient.GetAuthorizationPolicyAsync(name);
GetAuthorizationPolicyAsync(AuthorizationPolicyName, CancellationToken)
public virtual Task<AuthorizationPolicy> GetAuthorizationPolicyAsync(AuthorizationPolicyName name, CancellationToken cancellationToken)
Gets details of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | AuthorizationPolicyName Required. A name of the AuthorizationPolicy to get. Must be in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AuthorizationPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
AuthorizationPolicyName name = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
// Make the request
AuthorizationPolicy response = await networkSecurityClient.GetAuthorizationPolicyAsync(name);
GetAuthorizationPolicyAsync(GetAuthorizationPolicyRequest, CallSettings)
public virtual Task<AuthorizationPolicy> GetAuthorizationPolicyAsync(GetAuthorizationPolicyRequest request, CallSettings callSettings = null)
Gets details of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
request | GetAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AuthorizationPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
GetAuthorizationPolicyRequest request = new GetAuthorizationPolicyRequest
{
AuthorizationPolicyName = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]"),
};
// Make the request
AuthorizationPolicy response = await networkSecurityClient.GetAuthorizationPolicyAsync(request);
GetAuthorizationPolicyAsync(GetAuthorizationPolicyRequest, CancellationToken)
public virtual Task<AuthorizationPolicy> GetAuthorizationPolicyAsync(GetAuthorizationPolicyRequest request, CancellationToken cancellationToken)
Gets details of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
request | GetAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AuthorizationPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
GetAuthorizationPolicyRequest request = new GetAuthorizationPolicyRequest
{
AuthorizationPolicyName = AuthorizationPolicyName.FromProjectLocationAuthorizationPolicy("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]"),
};
// Make the request
AuthorizationPolicy response = await networkSecurityClient.GetAuthorizationPolicyAsync(request);
GetAuthorizationPolicyAsync(String, CallSettings)
public virtual Task<AuthorizationPolicy> GetAuthorizationPolicyAsync(string name, CallSettings callSettings = null)
Gets details of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the AuthorizationPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AuthorizationPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/authorizationPolicies/[AUTHORIZATION_POLICY]";
// Make the request
AuthorizationPolicy response = await networkSecurityClient.GetAuthorizationPolicyAsync(name);
GetAuthorizationPolicyAsync(String, CancellationToken)
public virtual Task<AuthorizationPolicy> GetAuthorizationPolicyAsync(string name, CancellationToken cancellationToken)
Gets details of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the AuthorizationPolicy to get. Must be in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AuthorizationPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/authorizationPolicies/[AUTHORIZATION_POLICY]";
// Make the request
AuthorizationPolicy response = await networkSecurityClient.GetAuthorizationPolicyAsync(name);
GetClientTlsPolicy(ClientTlsPolicyName, CallSettings)
public virtual ClientTlsPolicy GetClientTlsPolicy(ClientTlsPolicyName name, CallSettings callSettings = null)
Gets details of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ClientTlsPolicyName Required. A name of the ClientTlsPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ClientTlsPolicy | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
ClientTlsPolicyName name = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
// Make the request
ClientTlsPolicy response = networkSecurityClient.GetClientTlsPolicy(name);
GetClientTlsPolicy(GetClientTlsPolicyRequest, CallSettings)
public virtual ClientTlsPolicy GetClientTlsPolicy(GetClientTlsPolicyRequest request, CallSettings callSettings = null)
Gets details of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | GetClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ClientTlsPolicy | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
GetClientTlsPolicyRequest request = new GetClientTlsPolicyRequest
{
ClientTlsPolicyName = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]"),
};
// Make the request
ClientTlsPolicy response = networkSecurityClient.GetClientTlsPolicy(request);
GetClientTlsPolicy(String, CallSettings)
public virtual ClientTlsPolicy GetClientTlsPolicy(string name, CallSettings callSettings = null)
Gets details of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ClientTlsPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ClientTlsPolicy | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientTlsPolicies/[CLIENT_TLS_POLICY]";
// Make the request
ClientTlsPolicy response = networkSecurityClient.GetClientTlsPolicy(name);
GetClientTlsPolicyAsync(ClientTlsPolicyName, CallSettings)
public virtual Task<ClientTlsPolicy> GetClientTlsPolicyAsync(ClientTlsPolicyName name, CallSettings callSettings = null)
Gets details of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ClientTlsPolicyName Required. A name of the ClientTlsPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ClientTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ClientTlsPolicyName name = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
// Make the request
ClientTlsPolicy response = await networkSecurityClient.GetClientTlsPolicyAsync(name);
GetClientTlsPolicyAsync(ClientTlsPolicyName, CancellationToken)
public virtual Task<ClientTlsPolicy> GetClientTlsPolicyAsync(ClientTlsPolicyName name, CancellationToken cancellationToken)
Gets details of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ClientTlsPolicyName Required. A name of the ClientTlsPolicy to get. Must be in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ClientTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ClientTlsPolicyName name = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
// Make the request
ClientTlsPolicy response = await networkSecurityClient.GetClientTlsPolicyAsync(name);
GetClientTlsPolicyAsync(GetClientTlsPolicyRequest, CallSettings)
public virtual Task<ClientTlsPolicy> GetClientTlsPolicyAsync(GetClientTlsPolicyRequest request, CallSettings callSettings = null)
Gets details of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | GetClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ClientTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
GetClientTlsPolicyRequest request = new GetClientTlsPolicyRequest
{
ClientTlsPolicyName = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]"),
};
// Make the request
ClientTlsPolicy response = await networkSecurityClient.GetClientTlsPolicyAsync(request);
GetClientTlsPolicyAsync(GetClientTlsPolicyRequest, CancellationToken)
public virtual Task<ClientTlsPolicy> GetClientTlsPolicyAsync(GetClientTlsPolicyRequest request, CancellationToken cancellationToken)
Gets details of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | GetClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ClientTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
GetClientTlsPolicyRequest request = new GetClientTlsPolicyRequest
{
ClientTlsPolicyName = ClientTlsPolicyName.FromProjectLocationClientTlsPolicy("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]"),
};
// Make the request
ClientTlsPolicy response = await networkSecurityClient.GetClientTlsPolicyAsync(request);
GetClientTlsPolicyAsync(String, CallSettings)
public virtual Task<ClientTlsPolicy> GetClientTlsPolicyAsync(string name, CallSettings callSettings = null)
Gets details of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ClientTlsPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ClientTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientTlsPolicies/[CLIENT_TLS_POLICY]";
// Make the request
ClientTlsPolicy response = await networkSecurityClient.GetClientTlsPolicyAsync(name);
GetClientTlsPolicyAsync(String, CancellationToken)
public virtual Task<ClientTlsPolicy> GetClientTlsPolicyAsync(string name, CancellationToken cancellationToken)
Gets details of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ClientTlsPolicy to get. Must be in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ClientTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientTlsPolicies/[CLIENT_TLS_POLICY]";
// Make the request
ClientTlsPolicy response = await networkSecurityClient.GetClientTlsPolicyAsync(name);
GetServerTlsPolicy(GetServerTlsPolicyRequest, CallSettings)
public virtual ServerTlsPolicy GetServerTlsPolicy(GetServerTlsPolicyRequest request, CallSettings callSettings = null)
Gets details of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | GetServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ServerTlsPolicy | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
GetServerTlsPolicyRequest request = new GetServerTlsPolicyRequest
{
ServerTlsPolicyName = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]"),
};
// Make the request
ServerTlsPolicy response = networkSecurityClient.GetServerTlsPolicy(request);
GetServerTlsPolicy(ServerTlsPolicyName, CallSettings)
public virtual ServerTlsPolicy GetServerTlsPolicy(ServerTlsPolicyName name, CallSettings callSettings = null)
Gets details of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ServerTlsPolicyName Required. A name of the ServerTlsPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ServerTlsPolicy | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
ServerTlsPolicyName name = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
// Make the request
ServerTlsPolicy response = networkSecurityClient.GetServerTlsPolicy(name);
GetServerTlsPolicy(String, CallSettings)
public virtual ServerTlsPolicy GetServerTlsPolicy(string name, CallSettings callSettings = null)
Gets details of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ServerTlsPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ServerTlsPolicy | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/serverTlsPolicies/[SERVER_TLS_POLICY]";
// Make the request
ServerTlsPolicy response = networkSecurityClient.GetServerTlsPolicy(name);
GetServerTlsPolicyAsync(GetServerTlsPolicyRequest, CallSettings)
public virtual Task<ServerTlsPolicy> GetServerTlsPolicyAsync(GetServerTlsPolicyRequest request, CallSettings callSettings = null)
Gets details of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | GetServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ServerTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
GetServerTlsPolicyRequest request = new GetServerTlsPolicyRequest
{
ServerTlsPolicyName = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]"),
};
// Make the request
ServerTlsPolicy response = await networkSecurityClient.GetServerTlsPolicyAsync(request);
GetServerTlsPolicyAsync(GetServerTlsPolicyRequest, CancellationToken)
public virtual Task<ServerTlsPolicy> GetServerTlsPolicyAsync(GetServerTlsPolicyRequest request, CancellationToken cancellationToken)
Gets details of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | GetServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ServerTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
GetServerTlsPolicyRequest request = new GetServerTlsPolicyRequest
{
ServerTlsPolicyName = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]"),
};
// Make the request
ServerTlsPolicy response = await networkSecurityClient.GetServerTlsPolicyAsync(request);
GetServerTlsPolicyAsync(ServerTlsPolicyName, CallSettings)
public virtual Task<ServerTlsPolicy> GetServerTlsPolicyAsync(ServerTlsPolicyName name, CallSettings callSettings = null)
Gets details of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ServerTlsPolicyName Required. A name of the ServerTlsPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ServerTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ServerTlsPolicyName name = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
// Make the request
ServerTlsPolicy response = await networkSecurityClient.GetServerTlsPolicyAsync(name);
GetServerTlsPolicyAsync(ServerTlsPolicyName, CancellationToken)
public virtual Task<ServerTlsPolicy> GetServerTlsPolicyAsync(ServerTlsPolicyName name, CancellationToken cancellationToken)
Gets details of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | ServerTlsPolicyName Required. A name of the ServerTlsPolicy to get. Must be in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ServerTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ServerTlsPolicyName name = ServerTlsPolicyName.FromProjectLocationServerTlsPolicy("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
// Make the request
ServerTlsPolicy response = await networkSecurityClient.GetServerTlsPolicyAsync(name);
GetServerTlsPolicyAsync(String, CallSettings)
public virtual Task<ServerTlsPolicy> GetServerTlsPolicyAsync(string name, CallSettings callSettings = null)
Gets details of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ServerTlsPolicy to get. Must be in the format
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<ServerTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/serverTlsPolicies/[SERVER_TLS_POLICY]";
// Make the request
ServerTlsPolicy response = await networkSecurityClient.GetServerTlsPolicyAsync(name);
GetServerTlsPolicyAsync(String, CancellationToken)
public virtual Task<ServerTlsPolicy> GetServerTlsPolicyAsync(string name, CancellationToken cancellationToken)
Gets details of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
name | String Required. A name of the ServerTlsPolicy to get. Must be in the format
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<ServerTlsPolicy> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/serverTlsPolicies/[SERVER_TLS_POLICY]";
// Make the request
ServerTlsPolicy response = await networkSecurityClient.GetServerTlsPolicyAsync(name);
ListAuthorizationPolicies(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> ListAuthorizationPolicies(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists AuthorizationPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and location from which the AuthorizationPolicies
should be listed, specified in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> | A pageable sequence of AuthorizationPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> response = networkSecurityClient.ListAuthorizationPolicies(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (AuthorizationPolicy item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAuthorizationPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AuthorizationPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuthorizationPolicy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuthorizationPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAuthorizationPolicies(ListAuthorizationPoliciesRequest, CallSettings)
public virtual PagedEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> ListAuthorizationPolicies(ListAuthorizationPoliciesRequest request, CallSettings callSettings = null)
Lists AuthorizationPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
request | ListAuthorizationPoliciesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> | A pageable sequence of AuthorizationPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
ListAuthorizationPoliciesRequest request = new ListAuthorizationPoliciesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> response = networkSecurityClient.ListAuthorizationPolicies(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (AuthorizationPolicy item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAuthorizationPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AuthorizationPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuthorizationPolicy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuthorizationPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAuthorizationPolicies(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> ListAuthorizationPolicies(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists AuthorizationPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The project and location from which the AuthorizationPolicies
should be listed, specified in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> | A pageable sequence of AuthorizationPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> response = networkSecurityClient.ListAuthorizationPolicies(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (AuthorizationPolicy item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAuthorizationPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AuthorizationPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuthorizationPolicy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuthorizationPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAuthorizationPoliciesAsync(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> ListAuthorizationPoliciesAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists AuthorizationPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and location from which the AuthorizationPolicies
should be listed, specified in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> | A pageable asynchronous sequence of AuthorizationPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> response = networkSecurityClient.ListAuthorizationPoliciesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AuthorizationPolicy item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAuthorizationPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AuthorizationPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuthorizationPolicy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuthorizationPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAuthorizationPoliciesAsync(ListAuthorizationPoliciesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> ListAuthorizationPoliciesAsync(ListAuthorizationPoliciesRequest request, CallSettings callSettings = null)
Lists AuthorizationPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
request | ListAuthorizationPoliciesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> | A pageable asynchronous sequence of AuthorizationPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ListAuthorizationPoliciesRequest request = new ListAuthorizationPoliciesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> response = networkSecurityClient.ListAuthorizationPoliciesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AuthorizationPolicy item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAuthorizationPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AuthorizationPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuthorizationPolicy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuthorizationPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAuthorizationPoliciesAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> ListAuthorizationPoliciesAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists AuthorizationPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The project and location from which the AuthorizationPolicies
should be listed, specified in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> | A pageable asynchronous sequence of AuthorizationPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> response = networkSecurityClient.ListAuthorizationPoliciesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AuthorizationPolicy item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAuthorizationPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AuthorizationPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AuthorizationPolicy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AuthorizationPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListClientTlsPolicies(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> ListClientTlsPolicies(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ClientTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and location from which the ClientTlsPolicies should
be listed, specified in the format |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> | A pageable sequence of ClientTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> response = networkSecurityClient.ListClientTlsPolicies(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (ClientTlsPolicy item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListClientTlsPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ClientTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ClientTlsPolicy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ClientTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListClientTlsPolicies(ListClientTlsPoliciesRequest, CallSettings)
public virtual PagedEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> ListClientTlsPolicies(ListClientTlsPoliciesRequest request, CallSettings callSettings = null)
Lists ClientTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
request | ListClientTlsPoliciesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> | A pageable sequence of ClientTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
ListClientTlsPoliciesRequest request = new ListClientTlsPoliciesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> response = networkSecurityClient.ListClientTlsPolicies(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (ClientTlsPolicy item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListClientTlsPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ClientTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ClientTlsPolicy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ClientTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListClientTlsPolicies(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> ListClientTlsPolicies(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ClientTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The project and location from which the ClientTlsPolicies should
be listed, specified in the format |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> | A pageable sequence of ClientTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> response = networkSecurityClient.ListClientTlsPolicies(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (ClientTlsPolicy item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListClientTlsPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ClientTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ClientTlsPolicy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ClientTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListClientTlsPoliciesAsync(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> ListClientTlsPoliciesAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ClientTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and location from which the ClientTlsPolicies should
be listed, specified in the format |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> | A pageable asynchronous sequence of ClientTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> response = networkSecurityClient.ListClientTlsPoliciesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ClientTlsPolicy item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListClientTlsPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ClientTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ClientTlsPolicy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ClientTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListClientTlsPoliciesAsync(ListClientTlsPoliciesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> ListClientTlsPoliciesAsync(ListClientTlsPoliciesRequest request, CallSettings callSettings = null)
Lists ClientTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
request | ListClientTlsPoliciesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> | A pageable asynchronous sequence of ClientTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ListClientTlsPoliciesRequest request = new ListClientTlsPoliciesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> response = networkSecurityClient.ListClientTlsPoliciesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ClientTlsPolicy item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListClientTlsPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ClientTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ClientTlsPolicy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ClientTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListClientTlsPoliciesAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> ListClientTlsPoliciesAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ClientTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The project and location from which the ClientTlsPolicies should
be listed, specified in the format |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> | A pageable asynchronous sequence of ClientTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> response = networkSecurityClient.ListClientTlsPoliciesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ClientTlsPolicy item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListClientTlsPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ClientTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ClientTlsPolicy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ClientTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListServerTlsPolicies(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> ListServerTlsPolicies(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ServerTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and location from which the ServerTlsPolicies should
be listed, specified in the format |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> | A pageable sequence of ServerTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> response = networkSecurityClient.ListServerTlsPolicies(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (ServerTlsPolicy item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListServerTlsPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ServerTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ServerTlsPolicy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ServerTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListServerTlsPolicies(ListServerTlsPoliciesRequest, CallSettings)
public virtual PagedEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> ListServerTlsPolicies(ListServerTlsPoliciesRequest request, CallSettings callSettings = null)
Lists ServerTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
request | ListServerTlsPoliciesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> | A pageable sequence of ServerTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
ListServerTlsPoliciesRequest request = new ListServerTlsPoliciesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> response = networkSecurityClient.ListServerTlsPolicies(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (ServerTlsPolicy item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListServerTlsPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ServerTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ServerTlsPolicy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ServerTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListServerTlsPolicies(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> ListServerTlsPolicies(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ServerTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The project and location from which the ServerTlsPolicies should
be listed, specified in the format |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> | A pageable sequence of ServerTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> response = networkSecurityClient.ListServerTlsPolicies(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (ServerTlsPolicy item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListServerTlsPoliciesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ServerTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ServerTlsPolicy> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ServerTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListServerTlsPoliciesAsync(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> ListServerTlsPoliciesAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ServerTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The project and location from which the ServerTlsPolicies should
be listed, specified in the format |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> | A pageable asynchronous sequence of ServerTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> response = networkSecurityClient.ListServerTlsPoliciesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ServerTlsPolicy item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListServerTlsPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ServerTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ServerTlsPolicy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ServerTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListServerTlsPoliciesAsync(ListServerTlsPoliciesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> ListServerTlsPoliciesAsync(ListServerTlsPoliciesRequest request, CallSettings callSettings = null)
Lists ServerTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
request | ListServerTlsPoliciesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> | A pageable asynchronous sequence of ServerTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ListServerTlsPoliciesRequest request = new ListServerTlsPoliciesRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> response = networkSecurityClient.ListServerTlsPoliciesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ServerTlsPolicy item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListServerTlsPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ServerTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ServerTlsPolicy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ServerTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListServerTlsPoliciesAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> ListServerTlsPoliciesAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ServerTlsPolicies in a given project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The project and location from which the ServerTlsPolicies should
be listed, specified in the format |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> | A pageable asynchronous sequence of ServerTlsPolicy resources. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> response = networkSecurityClient.ListServerTlsPoliciesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ServerTlsPolicy item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListServerTlsPoliciesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ServerTlsPolicy item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ServerTlsPolicy> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ServerTlsPolicy item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
PollOnceCreateAuthorizationPolicy(String, CallSettings)
public virtual Operation<AuthorizationPolicy, OperationMetadata> PollOnceCreateAuthorizationPolicy(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
CreateAuthorizationPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<AuthorizationPolicy, OperationMetadata> | The result of polling the operation. |
PollOnceCreateAuthorizationPolicyAsync(String, CallSettings)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> PollOnceCreateAuthorizationPolicyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateAuthorizationPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceCreateClientTlsPolicy(String, CallSettings)
public virtual Operation<ClientTlsPolicy, OperationMetadata> PollOnceCreateClientTlsPolicy(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateClientTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ClientTlsPolicy, OperationMetadata> | The result of polling the operation. |
PollOnceCreateClientTlsPolicyAsync(String, CallSettings)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> PollOnceCreateClientTlsPolicyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateClientTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceCreateServerTlsPolicy(String, CallSettings)
public virtual Operation<ServerTlsPolicy, OperationMetadata> PollOnceCreateServerTlsPolicy(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateServerTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ServerTlsPolicy, OperationMetadata> | The result of polling the operation. |
PollOnceCreateServerTlsPolicyAsync(String, CallSettings)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> PollOnceCreateServerTlsPolicyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateServerTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceDeleteAuthorizationPolicy(String, CallSettings)
public virtual Operation<Empty, OperationMetadata> PollOnceDeleteAuthorizationPolicy(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
DeleteAuthorizationPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The result of polling the operation. |
PollOnceDeleteAuthorizationPolicyAsync(String, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteAuthorizationPolicyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteAuthorizationPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceDeleteClientTlsPolicy(String, CallSettings)
public virtual Operation<Empty, OperationMetadata> PollOnceDeleteClientTlsPolicy(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteClientTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The result of polling the operation. |
PollOnceDeleteClientTlsPolicyAsync(String, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteClientTlsPolicyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteClientTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceDeleteServerTlsPolicy(String, CallSettings)
public virtual Operation<Empty, OperationMetadata> PollOnceDeleteServerTlsPolicy(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteServerTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Empty, OperationMetadata> | The result of polling the operation. |
PollOnceDeleteServerTlsPolicyAsync(String, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteServerTlsPolicyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteServerTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceUpdateAuthorizationPolicy(String, CallSettings)
public virtual Operation<AuthorizationPolicy, OperationMetadata> PollOnceUpdateAuthorizationPolicy(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
UpdateAuthorizationPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<AuthorizationPolicy, OperationMetadata> | The result of polling the operation. |
PollOnceUpdateAuthorizationPolicyAsync(String, CallSettings)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> PollOnceUpdateAuthorizationPolicyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateAuthorizationPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceUpdateClientTlsPolicy(String, CallSettings)
public virtual Operation<ClientTlsPolicy, OperationMetadata> PollOnceUpdateClientTlsPolicy(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateClientTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ClientTlsPolicy, OperationMetadata> | The result of polling the operation. |
PollOnceUpdateClientTlsPolicyAsync(String, CallSettings)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> PollOnceUpdateClientTlsPolicyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateClientTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceUpdateServerTlsPolicy(String, CallSettings)
public virtual Operation<ServerTlsPolicy, OperationMetadata> PollOnceUpdateServerTlsPolicy(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateServerTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ServerTlsPolicy, OperationMetadata> | The result of polling the operation. |
PollOnceUpdateServerTlsPolicyAsync(String, CallSettings)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> PollOnceUpdateServerTlsPolicyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateServerTlsPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateAuthorizationPolicy(AuthorizationPolicy, FieldMask, CallSettings)
public virtual Operation<AuthorizationPolicy, OperationMetadata> UpdateAuthorizationPolicy(AuthorizationPolicy authorizationPolicy, FieldMask updateMask, CallSettings callSettings = null)
Updates the parameters of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
authorizationPolicy | AuthorizationPolicy Required. Updated AuthorizationPolicy resource. |
updateMask | FieldMask Optional. Field mask is used to specify the fields to be overwritten in the AuthorizationPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<AuthorizationPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = networkSecurityClient.UpdateAuthorizationPolicy(authorizationPolicy, updateMask);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceUpdateAuthorizationPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
UpdateAuthorizationPolicy(UpdateAuthorizationPolicyRequest, CallSettings)
public virtual Operation<AuthorizationPolicy, OperationMetadata> UpdateAuthorizationPolicy(UpdateAuthorizationPolicyRequest request, CallSettings callSettings = null)
Updates the parameters of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
request | UpdateAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<AuthorizationPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
UpdateAuthorizationPolicyRequest request = new UpdateAuthorizationPolicyRequest
{
UpdateMask = new FieldMask(),
AuthorizationPolicy = new AuthorizationPolicy(),
};
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = networkSecurityClient.UpdateAuthorizationPolicy(request);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceUpdateAuthorizationPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
UpdateAuthorizationPolicyAsync(AuthorizationPolicy, FieldMask, CallSettings)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> UpdateAuthorizationPolicyAsync(AuthorizationPolicy authorizationPolicy, FieldMask updateMask, CallSettings callSettings = null)
Updates the parameters of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
authorizationPolicy | AuthorizationPolicy Required. Updated AuthorizationPolicy resource. |
updateMask | FieldMask Optional. Field mask is used to specify the fields to be overwritten in the AuthorizationPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = await networkSecurityClient.UpdateAuthorizationPolicyAsync(authorizationPolicy, updateMask);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
UpdateAuthorizationPolicyAsync(AuthorizationPolicy, FieldMask, CancellationToken)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> UpdateAuthorizationPolicyAsync(AuthorizationPolicy authorizationPolicy, FieldMask updateMask, CancellationToken cancellationToken)
Updates the parameters of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
authorizationPolicy | AuthorizationPolicy Required. Updated AuthorizationPolicy resource. |
updateMask | FieldMask Optional. Field mask is used to specify the fields to be overwritten in the AuthorizationPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = await networkSecurityClient.UpdateAuthorizationPolicyAsync(authorizationPolicy, updateMask);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
UpdateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest, CallSettings)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> UpdateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest request, CallSettings callSettings = null)
Updates the parameters of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
request | UpdateAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
UpdateAuthorizationPolicyRequest request = new UpdateAuthorizationPolicyRequest
{
UpdateMask = new FieldMask(),
AuthorizationPolicy = new AuthorizationPolicy(),
};
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = await networkSecurityClient.UpdateAuthorizationPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
UpdateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest, CancellationToken)
public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> UpdateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest request, CancellationToken cancellationToken)
Updates the parameters of a single AuthorizationPolicy.
Parameters | |
---|---|
Name | Description |
request | UpdateAuthorizationPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<AuthorizationPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
UpdateAuthorizationPolicyRequest request = new UpdateAuthorizationPolicyRequest
{
UpdateMask = new FieldMask(),
AuthorizationPolicy = new AuthorizationPolicy(),
};
// Make the request
Operation<AuthorizationPolicy, OperationMetadata> response = await networkSecurityClient.UpdateAuthorizationPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<AuthorizationPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
AuthorizationPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<AuthorizationPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateAuthorizationPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
AuthorizationPolicy retrievedResult = retrievedResponse.Result;
}
UpdateClientTlsPolicy(ClientTlsPolicy, FieldMask, CallSettings)
public virtual Operation<ClientTlsPolicy, OperationMetadata> UpdateClientTlsPolicy(ClientTlsPolicy clientTlsPolicy, FieldMask updateMask, CallSettings callSettings = null)
Updates the parameters of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
clientTlsPolicy | ClientTlsPolicy Required. Updated ClientTlsPolicy resource. |
updateMask | FieldMask Optional. Field mask is used to specify the fields to be overwritten in the ClientTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ClientTlsPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
ClientTlsPolicy clientTlsPolicy = new ClientTlsPolicy();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = networkSecurityClient.UpdateClientTlsPolicy(clientTlsPolicy, updateMask);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceUpdateClientTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
UpdateClientTlsPolicy(UpdateClientTlsPolicyRequest, CallSettings)
public virtual Operation<ClientTlsPolicy, OperationMetadata> UpdateClientTlsPolicy(UpdateClientTlsPolicyRequest request, CallSettings callSettings = null)
Updates the parameters of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | UpdateClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ClientTlsPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
UpdateClientTlsPolicyRequest request = new UpdateClientTlsPolicyRequest
{
UpdateMask = new FieldMask(),
ClientTlsPolicy = new ClientTlsPolicy(),
};
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = networkSecurityClient.UpdateClientTlsPolicy(request);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceUpdateClientTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
UpdateClientTlsPolicyAsync(ClientTlsPolicy, FieldMask, CallSettings)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> UpdateClientTlsPolicyAsync(ClientTlsPolicy clientTlsPolicy, FieldMask updateMask, CallSettings callSettings = null)
Updates the parameters of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
clientTlsPolicy | ClientTlsPolicy Required. Updated ClientTlsPolicy resource. |
updateMask | FieldMask Optional. Field mask is used to specify the fields to be overwritten in the ClientTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ClientTlsPolicy clientTlsPolicy = new ClientTlsPolicy();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = await networkSecurityClient.UpdateClientTlsPolicyAsync(clientTlsPolicy, updateMask);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
UpdateClientTlsPolicyAsync(ClientTlsPolicy, FieldMask, CancellationToken)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> UpdateClientTlsPolicyAsync(ClientTlsPolicy clientTlsPolicy, FieldMask updateMask, CancellationToken cancellationToken)
Updates the parameters of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
clientTlsPolicy | ClientTlsPolicy Required. Updated ClientTlsPolicy resource. |
updateMask | FieldMask Optional. Field mask is used to specify the fields to be overwritten in the ClientTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ClientTlsPolicy clientTlsPolicy = new ClientTlsPolicy();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = await networkSecurityClient.UpdateClientTlsPolicyAsync(clientTlsPolicy, updateMask);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
UpdateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest, CallSettings)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> UpdateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest request, CallSettings callSettings = null)
Updates the parameters of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | UpdateClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
UpdateClientTlsPolicyRequest request = new UpdateClientTlsPolicyRequest
{
UpdateMask = new FieldMask(),
ClientTlsPolicy = new ClientTlsPolicy(),
};
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = await networkSecurityClient.UpdateClientTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
UpdateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest, CancellationToken)
public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> UpdateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest request, CancellationToken cancellationToken)
Updates the parameters of a single ClientTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | UpdateClientTlsPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ClientTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
UpdateClientTlsPolicyRequest request = new UpdateClientTlsPolicyRequest
{
UpdateMask = new FieldMask(),
ClientTlsPolicy = new ClientTlsPolicy(),
};
// Make the request
Operation<ClientTlsPolicy, OperationMetadata> response = await networkSecurityClient.UpdateClientTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<ClientTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ClientTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateClientTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ClientTlsPolicy retrievedResult = retrievedResponse.Result;
}
UpdateServerTlsPolicy(ServerTlsPolicy, FieldMask, CallSettings)
public virtual Operation<ServerTlsPolicy, OperationMetadata> UpdateServerTlsPolicy(ServerTlsPolicy serverTlsPolicy, FieldMask updateMask, CallSettings callSettings = null)
Updates the parameters of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
serverTlsPolicy | ServerTlsPolicy Required. Updated ServerTlsPolicy resource. |
updateMask | FieldMask Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ServerTlsPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
ServerTlsPolicy serverTlsPolicy = new ServerTlsPolicy();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = networkSecurityClient.UpdateServerTlsPolicy(serverTlsPolicy, updateMask);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceUpdateServerTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
UpdateServerTlsPolicy(UpdateServerTlsPolicyRequest, CallSettings)
public virtual Operation<ServerTlsPolicy, OperationMetadata> UpdateServerTlsPolicy(UpdateServerTlsPolicyRequest request, CallSettings callSettings = null)
Updates the parameters of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | UpdateServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ServerTlsPolicy, OperationMetadata> | The RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
UpdateServerTlsPolicyRequest request = new UpdateServerTlsPolicyRequest
{
UpdateMask = new FieldMask(),
ServerTlsPolicy = new ServerTlsPolicy(),
};
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = networkSecurityClient.UpdateServerTlsPolicy(request);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = networkSecurityClient.PollOnceUpdateServerTlsPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
UpdateServerTlsPolicyAsync(ServerTlsPolicy, FieldMask, CallSettings)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> UpdateServerTlsPolicyAsync(ServerTlsPolicy serverTlsPolicy, FieldMask updateMask, CallSettings callSettings = null)
Updates the parameters of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
serverTlsPolicy | ServerTlsPolicy Required. Updated ServerTlsPolicy resource. |
updateMask | FieldMask Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ServerTlsPolicy serverTlsPolicy = new ServerTlsPolicy();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = await networkSecurityClient.UpdateServerTlsPolicyAsync(serverTlsPolicy, updateMask);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
UpdateServerTlsPolicyAsync(ServerTlsPolicy, FieldMask, CancellationToken)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> UpdateServerTlsPolicyAsync(ServerTlsPolicy serverTlsPolicy, FieldMask updateMask, CancellationToken cancellationToken)
Updates the parameters of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
serverTlsPolicy | ServerTlsPolicy Required. Updated ServerTlsPolicy resource. |
updateMask | FieldMask Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
ServerTlsPolicy serverTlsPolicy = new ServerTlsPolicy();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = await networkSecurityClient.UpdateServerTlsPolicyAsync(serverTlsPolicy, updateMask);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
UpdateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest, CallSettings)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> UpdateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest request, CallSettings callSettings = null)
Updates the parameters of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | UpdateServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
UpdateServerTlsPolicyRequest request = new UpdateServerTlsPolicyRequest
{
UpdateMask = new FieldMask(),
ServerTlsPolicy = new ServerTlsPolicy(),
};
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = await networkSecurityClient.UpdateServerTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}
UpdateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest, CancellationToken)
public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> UpdateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest request, CancellationToken cancellationToken)
Updates the parameters of a single ServerTlsPolicy.
Parameters | |
---|---|
Name | Description |
request | UpdateServerTlsPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ServerTlsPolicy, OperationMetadata>> | A Task containing the RPC response. |
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
UpdateServerTlsPolicyRequest request = new UpdateServerTlsPolicyRequest
{
UpdateMask = new FieldMask(),
ServerTlsPolicy = new ServerTlsPolicy(),
};
// Make the request
Operation<ServerTlsPolicy, OperationMetadata> response = await networkSecurityClient.UpdateServerTlsPolicyAsync(request);
// Poll until the returned long-running operation is complete
Operation<ServerTlsPolicy, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ServerTlsPolicy result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ServerTlsPolicy, OperationMetadata> retrievedResponse = await networkSecurityClient.PollOnceUpdateServerTlsPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ServerTlsPolicy retrievedResult = retrievedResponse.Result;
}