Network Security v1beta1 API - Class NetworkSecurityClient (2.0.0-beta05)

public abstract class NetworkSecurityClient

Reference documentation and code samples for the Network Security v1beta1 API class NetworkSecurityClient.

NetworkSecurity client wrapper, for convenient use.

Inheritance

object > NetworkSecurityClient

Namespace

Google.Cloud.NetworkSecurity.V1Beta1

Assembly

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.

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
IReadOnlyListstring
Remarks

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
NetworkSecurityNetworkSecurityClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

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)

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
TaskNetworkSecurityClient

The task representing the created NetworkSecurityClient.

CreateAuthorizationPolicy(LocationName, AuthorizationPolicy, string, CallSettings)

public virtual Operation<AuthorizationPolicy, OperationMetadata> CreateAuthorizationPolicy(LocationName parent, AuthorizationPolicy authorizationPolicy, string authorizationPolicyId, CallSettings callSettings = null)

Creates a new AuthorizationPolicy in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource of the AuthorizationPolicy. Must be in the format projects/{project}/locations/{location}.

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
OperationAuthorizationPolicyOperationMetadata

The RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
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
OperationAuthorizationPolicyOperationMetadata

The RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
CreateAuthorizationPolicyRequest request = new CreateAuthorizationPolicyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    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 projects/{project}/locations/{location}.

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
OperationAuthorizationPolicyOperationMetadata

The RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
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(LocationName, AuthorizationPolicy, string, CallSettings)

public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> CreateAuthorizationPolicyAsync(LocationName parent, AuthorizationPolicy authorizationPolicy, string authorizationPolicyId, CallSettings callSettings = null)

Creates a new AuthorizationPolicy in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource of the AuthorizationPolicy. Must be in the format projects/{project}/locations/{location}.

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
TaskOperationAuthorizationPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
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(LocationName, AuthorizationPolicy, string, CancellationToken)

public virtual Task<Operation<AuthorizationPolicy, OperationMetadata>> CreateAuthorizationPolicyAsync(LocationName parent, AuthorizationPolicy authorizationPolicy, string authorizationPolicyId, CancellationToken cancellationToken)

Creates a new AuthorizationPolicy in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource of the AuthorizationPolicy. Must be in the format projects/{project}/locations/{location}.

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
TaskOperationAuthorizationPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
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
TaskOperationAuthorizationPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateAuthorizationPolicyRequest request = new CreateAuthorizationPolicyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    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
TaskOperationAuthorizationPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateAuthorizationPolicyRequest request = new CreateAuthorizationPolicyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    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 projects/{project}/locations/{location}.

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
TaskOperationAuthorizationPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
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 projects/{project}/locations/{location}.

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
TaskOperationAuthorizationPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
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(LocationName, ClientTlsPolicy, string, CallSettings)

public virtual Operation<ClientTlsPolicy, OperationMetadata> CreateClientTlsPolicy(LocationName parent, ClientTlsPolicy clientTlsPolicy, string clientTlsPolicyId, CallSettings callSettings = null)

Creates a new ClientTlsPolicy in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource of the ClientTlsPolicy. Must be in the format projects/*/locations/{location}.

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
OperationClientTlsPolicyOperationMetadata

The RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
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
OperationClientTlsPolicyOperationMetadata

The RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
CreateClientTlsPolicyRequest request = new CreateClientTlsPolicyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    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 projects/*/locations/{location}.

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
OperationClientTlsPolicyOperationMetadata

The RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
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(LocationName, ClientTlsPolicy, string, CallSettings)

public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> CreateClientTlsPolicyAsync(LocationName parent, ClientTlsPolicy clientTlsPolicy, string clientTlsPolicyId, CallSettings callSettings = null)

Creates a new ClientTlsPolicy in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource of the ClientTlsPolicy. Must be in the format projects/*/locations/{location}.

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
TaskOperationClientTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
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(LocationName, ClientTlsPolicy, string, CancellationToken)

public virtual Task<Operation<ClientTlsPolicy, OperationMetadata>> CreateClientTlsPolicyAsync(LocationName parent, ClientTlsPolicy clientTlsPolicy, string clientTlsPolicyId, CancellationToken cancellationToken)

Creates a new ClientTlsPolicy in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource of the ClientTlsPolicy. Must be in the format projects/*/locations/{location}.

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
TaskOperationClientTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
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
TaskOperationClientTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateClientTlsPolicyRequest request = new CreateClientTlsPolicyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    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
TaskOperationClientTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateClientTlsPolicyRequest request = new CreateClientTlsPolicyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    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 projects/*/locations/{location}.

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
TaskOperationClientTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
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 projects/*/locations/{location}.

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
TaskOperationClientTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
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(LocationName, ServerTlsPolicy, string, CallSettings)

public virtual Operation<ServerTlsPolicy, OperationMetadata> CreateServerTlsPolicy(LocationName parent, ServerTlsPolicy serverTlsPolicy, string serverTlsPolicyId, CallSettings callSettings = null)

Creates a new ServerTlsPolicy in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource of the ServerTlsPolicy. Must be in the format projects/*/locations/{location}.

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
OperationServerTlsPolicyOperationMetadata

The RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
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(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
OperationServerTlsPolicyOperationMetadata

The RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
CreateServerTlsPolicyRequest request = new CreateServerTlsPolicyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    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(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 projects/*/locations/{location}.

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
OperationServerTlsPolicyOperationMetadata

The RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
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(LocationName, ServerTlsPolicy, string, CallSettings)

public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> CreateServerTlsPolicyAsync(LocationName parent, ServerTlsPolicy serverTlsPolicy, string serverTlsPolicyId, CallSettings callSettings = null)

Creates a new ServerTlsPolicy in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource of the ServerTlsPolicy. Must be in the format projects/*/locations/{location}.

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
TaskOperationServerTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
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(LocationName, ServerTlsPolicy, string, CancellationToken)

public virtual Task<Operation<ServerTlsPolicy, OperationMetadata>> CreateServerTlsPolicyAsync(LocationName parent, ServerTlsPolicy serverTlsPolicy, string serverTlsPolicyId, CancellationToken cancellationToken)

Creates a new ServerTlsPolicy in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource of the ServerTlsPolicy. Must be in the format projects/*/locations/{location}.

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
TaskOperationServerTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
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(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
TaskOperationServerTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateServerTlsPolicyRequest request = new CreateServerTlsPolicyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    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
TaskOperationServerTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
CreateServerTlsPolicyRequest request = new CreateServerTlsPolicyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    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(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 projects/*/locations/{location}.

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
TaskOperationServerTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
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 projects/*/locations/{location}.

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
TaskOperationServerTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// Create client
NetworkSecurityClient networkSecurityClient = await NetworkSecurityClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
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 projects/{project}/locations/{location}/authorizationPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// 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
OperationEmptyOperationMetadata

The RPC response.

Example
// 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 projects/{project}/locations/{location}/authorizationPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// 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 projects/{project}/locations/{location}/authorizationPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/{project}/locations/{location}/authorizationPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/{project}/locations/{location}/authorizationPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/{project}/locations/{location}/authorizationPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// 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
OperationEmptyOperationMetadata

The RPC response.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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
OperationEmptyOperationMetadata

The RPC response.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// 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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// 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 projects/{project}/locations/{location}/authorizationPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AuthorizationPolicy

The RPC response.

Example
// 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.

Example
// 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 projects/{project}/locations/{location}/authorizationPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AuthorizationPolicy

The RPC response.

Example
// 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 projects/{project}/locations/{location}/authorizationPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAuthorizationPolicy

A Task containing the RPC response.

Example
// 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 projects/{project}/locations/{location}/authorizationPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAuthorizationPolicy

A Task containing the RPC response.

Example
// 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
TaskAuthorizationPolicy

A Task containing the RPC response.

Example
// 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
TaskAuthorizationPolicy

A Task containing the RPC response.

Example
// 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 projects/{project}/locations/{location}/authorizationPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAuthorizationPolicy

A Task containing the RPC response.

Example
// 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 projects/{project}/locations/{location}/authorizationPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAuthorizationPolicy

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ClientTlsPolicy

The RPC response.

Example
// 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.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ClientTlsPolicy

The RPC response.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskClientTlsPolicy

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskClientTlsPolicy

A Task containing the RPC response.

Example
// 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
TaskClientTlsPolicy

A Task containing the RPC response.

Example
// 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
TaskClientTlsPolicy

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskClientTlsPolicy

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/clientTlsPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskClientTlsPolicy

A Task containing the RPC response.

Example
// 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.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ServerTlsPolicy

The RPC response.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ServerTlsPolicy

The RPC response.

Example
// 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
TaskServerTlsPolicy

A Task containing the RPC response.

Example
// 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
TaskServerTlsPolicy

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskServerTlsPolicy

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskServerTlsPolicy

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskServerTlsPolicy

A Task containing the RPC response.

Example
// 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 projects/*/locations/{location}/serverTlsPolicies/*.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskServerTlsPolicy

A Task containing the RPC response.

Example
// 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, int?, CallSettings)

public virtual PagedEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> ListAuthorizationPolicies(LocationName parent, string pageToken = null, int? pageSize = null, 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 projects/{project}/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAuthorizationPoliciesResponseAuthorizationPolicy

A pageable sequence of AuthorizationPolicy resources.

Example
// 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
PagedEnumerableListAuthorizationPoliciesResponseAuthorizationPolicy

A pageable sequence of AuthorizationPolicy resources.

Example
// 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, int?, CallSettings)

public virtual PagedEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> ListAuthorizationPolicies(string parent, string pageToken = null, int? pageSize = null, 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 projects/{project}/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListAuthorizationPoliciesResponseAuthorizationPolicy

A pageable sequence of AuthorizationPolicy resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> ListAuthorizationPoliciesAsync(LocationName parent, string pageToken = null, int? pageSize = null, 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 projects/{project}/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAuthorizationPoliciesResponseAuthorizationPolicy

A pageable asynchronous sequence of AuthorizationPolicy resources.

Example
// 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
PagedAsyncEnumerableListAuthorizationPoliciesResponseAuthorizationPolicy

A pageable asynchronous sequence of AuthorizationPolicy resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAuthorizationPoliciesResponse, AuthorizationPolicy> ListAuthorizationPoliciesAsync(string parent, string pageToken = null, int? pageSize = null, 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 projects/{project}/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListAuthorizationPoliciesResponseAuthorizationPolicy

A pageable asynchronous sequence of AuthorizationPolicy resources.

Example
// 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, int?, CallSettings)

public virtual PagedEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> ListClientTlsPolicies(LocationName parent, string pageToken = null, int? pageSize = null, 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 projects/*/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListClientTlsPoliciesResponseClientTlsPolicy

A pageable sequence of ClientTlsPolicy resources.

Example
// 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
PagedEnumerableListClientTlsPoliciesResponseClientTlsPolicy

A pageable sequence of ClientTlsPolicy resources.

Example
// 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, int?, CallSettings)

public virtual PagedEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> ListClientTlsPolicies(string parent, string pageToken = null, int? pageSize = null, 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 projects/*/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListClientTlsPoliciesResponseClientTlsPolicy

A pageable sequence of ClientTlsPolicy resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> ListClientTlsPoliciesAsync(LocationName parent, string pageToken = null, int? pageSize = null, 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 projects/*/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListClientTlsPoliciesResponseClientTlsPolicy

A pageable asynchronous sequence of ClientTlsPolicy resources.

Example
// 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
PagedAsyncEnumerableListClientTlsPoliciesResponseClientTlsPolicy

A pageable asynchronous sequence of ClientTlsPolicy resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListClientTlsPoliciesResponse, ClientTlsPolicy> ListClientTlsPoliciesAsync(string parent, string pageToken = null, int? pageSize = null, 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 projects/*/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListClientTlsPoliciesResponseClientTlsPolicy

A pageable asynchronous sequence of ClientTlsPolicy resources.

Example
// 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, int?, CallSettings)

public virtual PagedEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> ListServerTlsPolicies(LocationName parent, string pageToken = null, int? pageSize = null, 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 projects/*/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListServerTlsPoliciesResponseServerTlsPolicy

A pageable sequence of ServerTlsPolicy resources.

Example
// 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
PagedEnumerableListServerTlsPoliciesResponseServerTlsPolicy

A pageable sequence of ServerTlsPolicy resources.

Example
// 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, int?, CallSettings)

public virtual PagedEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> ListServerTlsPolicies(string parent, string pageToken = null, int? pageSize = null, 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 projects/*/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListServerTlsPoliciesResponseServerTlsPolicy

A pageable sequence of ServerTlsPolicy resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> ListServerTlsPoliciesAsync(LocationName parent, string pageToken = null, int? pageSize = null, 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 projects/*/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListServerTlsPoliciesResponseServerTlsPolicy

A pageable asynchronous sequence of ServerTlsPolicy resources.

Example
// 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
PagedAsyncEnumerableListServerTlsPoliciesResponseServerTlsPolicy

A pageable asynchronous sequence of ServerTlsPolicy resources.

Example
// 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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListServerTlsPoliciesResponse, ServerTlsPolicy> ListServerTlsPoliciesAsync(string parent, string pageToken = null, int? pageSize = null, 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 projects/*/locations/{location}.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListServerTlsPoliciesResponseServerTlsPolicy

A pageable asynchronous sequence of ServerTlsPolicy resources.

Example
// 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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAuthorizationPolicyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAuthorizationPolicyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClientTlsPolicyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClientTlsPolicyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationServerTlsPolicyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationServerTlsPolicyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAuthorizationPolicyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationAuthorizationPolicyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClientTlsPolicyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClientTlsPolicyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationServerTlsPolicyOperationMetadata

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 null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationServerTlsPolicyOperationMetadata

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.

Remarks

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
OperationAuthorizationPolicyOperationMetadata

The RPC response.

Example
// 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
OperationAuthorizationPolicyOperationMetadata

The RPC response.

Example
// 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
TaskOperationAuthorizationPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationAuthorizationPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationAuthorizationPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationAuthorizationPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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
OperationClientTlsPolicyOperationMetadata

The RPC response.

Example
// 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
OperationClientTlsPolicyOperationMetadata

The RPC response.

Example
// 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
TaskOperationClientTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationClientTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationClientTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationClientTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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
OperationServerTlsPolicyOperationMetadata

The RPC response.

Example
// 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
OperationServerTlsPolicyOperationMetadata

The RPC response.

Example
// 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
TaskOperationServerTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationServerTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationServerTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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
TaskOperationServerTlsPolicyOperationMetadata

A Task containing the RPC response.

Example
// 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;
}