Compute Engine v1 API - Class ProjectsClient (2.15.0)

public abstract class ProjectsClient

Reference documentation and code samples for the Compute Engine v1 API class ProjectsClient.

Projects client wrapper, for convenient use.

Inheritance

object > ProjectsClient

Derived Types

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The Projects API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Projects service, which is a host of "compute.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Projects scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

DisableXpnHostOperationsClient

public virtual OperationsClient DisableXpnHostOperationsClient { get; }

The long-running operations client for DisableXpnHost.

Property Value
Type Description
OperationsClient

DisableXpnResourceOperationsClient

public virtual OperationsClient DisableXpnResourceOperationsClient { get; }

The long-running operations client for DisableXpnResource.

Property Value
Type Description
OperationsClient

EnableXpnHostOperationsClient

public virtual OperationsClient EnableXpnHostOperationsClient { get; }

The long-running operations client for EnableXpnHost.

Property Value
Type Description
OperationsClient

EnableXpnResourceOperationsClient

public virtual OperationsClient EnableXpnResourceOperationsClient { get; }

The long-running operations client for EnableXpnResource.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual Projects.ProjectsClient GrpcClient { get; }

The underlying gRPC Projects client

Property Value
Type Description
ProjectsProjectsClient

MoveDiskOperationsClient

public virtual OperationsClient MoveDiskOperationsClient { get; }

The long-running operations client for MoveDisk.

Property Value
Type Description
OperationsClient

MoveInstanceOperationsClient

public virtual OperationsClient MoveInstanceOperationsClient { get; }

The long-running operations client for MoveInstance.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

SetCloudArmorTierOperationsClient

public virtual OperationsClient SetCloudArmorTierOperationsClient { get; }

The long-running operations client for SetCloudArmorTier.

Property Value
Type Description
OperationsClient

SetCommonInstanceMetadataOperationsClient

public virtual OperationsClient SetCommonInstanceMetadataOperationsClient { get; }

The long-running operations client for SetCommonInstanceMetadata.

Property Value
Type Description
OperationsClient

SetDefaultNetworkTierOperationsClient

public virtual OperationsClient SetDefaultNetworkTierOperationsClient { get; }

The long-running operations client for SetDefaultNetworkTier.

Property Value
Type Description
OperationsClient

SetUsageExportBucketOperationsClient

public virtual OperationsClient SetUsageExportBucketOperationsClient { get; }

The long-running operations client for SetUsageExportBucket.

Property Value
Type Description
OperationsClient

Methods

Create()

public static ProjectsClient Create()

Synchronously creates a ProjectsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ProjectsClientBuilder.

Returns
Type Description
ProjectsClient

The created ProjectsClient.

CreateAsync(CancellationToken)

public static Task<ProjectsClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a ProjectsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ProjectsClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskProjectsClient

The task representing the created ProjectsClient.

DisableXpnHost(DisableXpnHostProjectRequest, CallSettings)

public virtual Operation<Operation, Operation> DisableXpnHost(DisableXpnHostProjectRequest request, CallSettings callSettings = null)

Disable this project as a shared VPC host project.

Parameters
Name Description
request DisableXpnHostProjectRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
DisableXpnHostProjectRequest request = new DisableXpnHostProjectRequest
{
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.DisableXpnHost(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceDisableXpnHost(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DisableXpnHost(string, CallSettings)

public virtual Operation<Operation, Operation> DisableXpnHost(string project, CallSettings callSettings = null)

Disable this project as a shared VPC host project.

Parameters
Name Description
project string

Project ID for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.DisableXpnHost(project);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceDisableXpnHost(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DisableXpnHostAsync(DisableXpnHostProjectRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> DisableXpnHostAsync(DisableXpnHostProjectRequest request, CallSettings callSettings = null)

Disable this project as a shared VPC host project.

Parameters
Name Description
request DisableXpnHostProjectRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
DisableXpnHostProjectRequest request = new DisableXpnHostProjectRequest
{
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnHostAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnHostAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DisableXpnHostAsync(DisableXpnHostProjectRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DisableXpnHostAsync(DisableXpnHostProjectRequest request, CancellationToken cancellationToken)

Disable this project as a shared VPC host project.

Parameters
Name Description
request DisableXpnHostProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
DisableXpnHostProjectRequest request = new DisableXpnHostProjectRequest
{
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnHostAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnHostAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DisableXpnHostAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> DisableXpnHostAsync(string project, CallSettings callSettings = null)

Disable this project as a shared VPC host project.

Parameters
Name Description
project string

Project ID for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnHostAsync(project);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnHostAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DisableXpnHostAsync(string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DisableXpnHostAsync(string project, CancellationToken cancellationToken)

Disable this project as a shared VPC host project.

Parameters
Name Description
project string

Project ID for this request.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnHostAsync(project);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnHostAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DisableXpnResource(DisableXpnResourceProjectRequest, CallSettings)

public virtual Operation<Operation, Operation> DisableXpnResource(DisableXpnResourceProjectRequest request, CallSettings callSettings = null)

Disable a service resource (also known as service project) associated with this host project.

Parameters
Name Description
request DisableXpnResourceProjectRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
DisableXpnResourceProjectRequest request = new DisableXpnResourceProjectRequest
{
    RequestId = "",
    ProjectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.DisableXpnResource(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceDisableXpnResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DisableXpnResource(string, ProjectsDisableXpnResourceRequest, CallSettings)

public virtual Operation<Operation, Operation> DisableXpnResource(string project, ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource, CallSettings callSettings = null)

Disable a service resource (also known as service project) associated with this host project.

Parameters
Name Description
project string

Project ID for this request.

projectsDisableXpnResourceRequestResource ProjectsDisableXpnResourceRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest();
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.DisableXpnResource(project, projectsDisableXpnResourceRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceDisableXpnResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DisableXpnResourceAsync(DisableXpnResourceProjectRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> DisableXpnResourceAsync(DisableXpnResourceProjectRequest request, CallSettings callSettings = null)

Disable a service resource (also known as service project) associated with this host project.

Parameters
Name Description
request DisableXpnResourceProjectRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
DisableXpnResourceProjectRequest request = new DisableXpnResourceProjectRequest
{
    RequestId = "",
    ProjectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnResourceAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DisableXpnResourceAsync(DisableXpnResourceProjectRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DisableXpnResourceAsync(DisableXpnResourceProjectRequest request, CancellationToken cancellationToken)

Disable a service resource (also known as service project) associated with this host project.

Parameters
Name Description
request DisableXpnResourceProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
DisableXpnResourceProjectRequest request = new DisableXpnResourceProjectRequest
{
    RequestId = "",
    ProjectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnResourceAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DisableXpnResourceAsync(string, ProjectsDisableXpnResourceRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> DisableXpnResourceAsync(string project, ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource, CallSettings callSettings = null)

Disable a service resource (also known as service project) associated with this host project.

Parameters
Name Description
project string

Project ID for this request.

projectsDisableXpnResourceRequestResource ProjectsDisableXpnResourceRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnResourceAsync(project, projectsDisableXpnResourceRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DisableXpnResourceAsync(string, ProjectsDisableXpnResourceRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DisableXpnResourceAsync(string project, ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource, CancellationToken cancellationToken)

Disable a service resource (also known as service project) associated with this host project.

Parameters
Name Description
project string

Project ID for this request.

projectsDisableXpnResourceRequestResource ProjectsDisableXpnResourceRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnResourceAsync(project, projectsDisableXpnResourceRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnHost(EnableXpnHostProjectRequest, CallSettings)

public virtual Operation<Operation, Operation> EnableXpnHost(EnableXpnHostProjectRequest request, CallSettings callSettings = null)

Enable this project as a shared VPC host project.

Parameters
Name Description
request EnableXpnHostProjectRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
EnableXpnHostProjectRequest request = new EnableXpnHostProjectRequest
{
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.EnableXpnHost(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceEnableXpnHost(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnHost(string, CallSettings)

public virtual Operation<Operation, Operation> EnableXpnHost(string project, CallSettings callSettings = null)

Enable this project as a shared VPC host project.

Parameters
Name Description
project string

Project ID for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.EnableXpnHost(project);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceEnableXpnHost(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnHostAsync(EnableXpnHostProjectRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> EnableXpnHostAsync(EnableXpnHostProjectRequest request, CallSettings callSettings = null)

Enable this project as a shared VPC host project.

Parameters
Name Description
request EnableXpnHostProjectRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
EnableXpnHostProjectRequest request = new EnableXpnHostProjectRequest
{
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnHostAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnHostAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnHostAsync(EnableXpnHostProjectRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> EnableXpnHostAsync(EnableXpnHostProjectRequest request, CancellationToken cancellationToken)

Enable this project as a shared VPC host project.

Parameters
Name Description
request EnableXpnHostProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
EnableXpnHostProjectRequest request = new EnableXpnHostProjectRequest
{
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnHostAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnHostAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnHostAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> EnableXpnHostAsync(string project, CallSettings callSettings = null)

Enable this project as a shared VPC host project.

Parameters
Name Description
project string

Project ID for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnHostAsync(project);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnHostAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnHostAsync(string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> EnableXpnHostAsync(string project, CancellationToken cancellationToken)

Enable this project as a shared VPC host project.

Parameters
Name Description
project string

Project ID for this request.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnHostAsync(project);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnHostAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnResource(EnableXpnResourceProjectRequest, CallSettings)

public virtual Operation<Operation, Operation> EnableXpnResource(EnableXpnResourceProjectRequest request, CallSettings callSettings = null)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Parameters
Name Description
request EnableXpnResourceProjectRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
EnableXpnResourceProjectRequest request = new EnableXpnResourceProjectRequest
{
    RequestId = "",
    Project = "",
    ProjectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.EnableXpnResource(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceEnableXpnResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnResource(string, ProjectsEnableXpnResourceRequest, CallSettings)

public virtual Operation<Operation, Operation> EnableXpnResource(string project, ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource, CallSettings callSettings = null)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Parameters
Name Description
project string

Project ID for this request.

projectsEnableXpnResourceRequestResource ProjectsEnableXpnResourceRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest();
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.EnableXpnResource(project, projectsEnableXpnResourceRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceEnableXpnResource(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnResourceAsync(EnableXpnResourceProjectRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> EnableXpnResourceAsync(EnableXpnResourceProjectRequest request, CallSettings callSettings = null)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Parameters
Name Description
request EnableXpnResourceProjectRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
EnableXpnResourceProjectRequest request = new EnableXpnResourceProjectRequest
{
    RequestId = "",
    Project = "",
    ProjectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnResourceAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnResourceAsync(EnableXpnResourceProjectRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> EnableXpnResourceAsync(EnableXpnResourceProjectRequest request, CancellationToken cancellationToken)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Parameters
Name Description
request EnableXpnResourceProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
EnableXpnResourceProjectRequest request = new EnableXpnResourceProjectRequest
{
    RequestId = "",
    Project = "",
    ProjectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnResourceAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnResourceAsync(string, ProjectsEnableXpnResourceRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> EnableXpnResourceAsync(string project, ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource, CallSettings callSettings = null)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Parameters
Name Description
project string

Project ID for this request.

projectsEnableXpnResourceRequestResource ProjectsEnableXpnResourceRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnResourceAsync(project, projectsEnableXpnResourceRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

EnableXpnResourceAsync(string, ProjectsEnableXpnResourceRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> EnableXpnResourceAsync(string project, ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource, CancellationToken cancellationToken)

Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Parameters
Name Description
project string

Project ID for this request.

projectsEnableXpnResourceRequestResource ProjectsEnableXpnResourceRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnResourceAsync(project, projectsEnableXpnResourceRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnResourceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Get(GetProjectRequest, CallSettings)

public virtual Project Get(GetProjectRequest request, CallSettings callSettings = null)

Returns the specified Project resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
request GetProjectRequest

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
Project

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
GetProjectRequest request = new GetProjectRequest { Project = "", };
// Make the request
Project response = projectsClient.Get(request);

Get(string, CallSettings)

public virtual Project Get(string project, CallSettings callSettings = null)

Returns the specified Project resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
project string

Project ID for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Project

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
Project response = projectsClient.Get(project);

GetAsync(GetProjectRequest, CallSettings)

public virtual Task<Project> GetAsync(GetProjectRequest request, CallSettings callSettings = null)

Returns the specified Project resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
request GetProjectRequest

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
TaskProject

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
GetProjectRequest request = new GetProjectRequest { Project = "", };
// Make the request
Project response = await projectsClient.GetAsync(request);

GetAsync(GetProjectRequest, CancellationToken)

public virtual Task<Project> GetAsync(GetProjectRequest request, CancellationToken cancellationToken)

Returns the specified Project resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
request GetProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskProject

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
GetProjectRequest request = new GetProjectRequest { Project = "", };
// Make the request
Project response = await projectsClient.GetAsync(request);

GetAsync(string, CallSettings)

public virtual Task<Project> GetAsync(string project, CallSettings callSettings = null)

Returns the specified Project resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
project string

Project ID for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskProject

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
Project response = await projectsClient.GetAsync(project);

GetAsync(string, CancellationToken)

public virtual Task<Project> GetAsync(string project, CancellationToken cancellationToken)

Returns the specified Project resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas field). To exclude one or more fields, set your request's fields query parameter to only include the fields you need. For example, to only include the id and selfLink fields, add the query parameter ?fields=id,selfLink to your request.

Parameters
Name Description
project string

Project ID for this request.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskProject

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
Project response = await projectsClient.GetAsync(project);

GetXpnHost(GetXpnHostProjectRequest, CallSettings)

public virtual Project GetXpnHost(GetXpnHostProjectRequest request, CallSettings callSettings = null)

Gets the shared VPC host project that this project links to. May be empty if no link exists.

Parameters
Name Description
request GetXpnHostProjectRequest

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
Project

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
GetXpnHostProjectRequest request = new GetXpnHostProjectRequest { Project = "", };
// Make the request
Project response = projectsClient.GetXpnHost(request);

GetXpnHost(string, CallSettings)

public virtual Project GetXpnHost(string project, CallSettings callSettings = null)

Gets the shared VPC host project that this project links to. May be empty if no link exists.

Parameters
Name Description
project string

Project ID for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Project

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
Project response = projectsClient.GetXpnHost(project);

GetXpnHostAsync(GetXpnHostProjectRequest, CallSettings)

public virtual Task<Project> GetXpnHostAsync(GetXpnHostProjectRequest request, CallSettings callSettings = null)

Gets the shared VPC host project that this project links to. May be empty if no link exists.

Parameters
Name Description
request GetXpnHostProjectRequest

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
TaskProject

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
GetXpnHostProjectRequest request = new GetXpnHostProjectRequest { Project = "", };
// Make the request
Project response = await projectsClient.GetXpnHostAsync(request);

GetXpnHostAsync(GetXpnHostProjectRequest, CancellationToken)

public virtual Task<Project> GetXpnHostAsync(GetXpnHostProjectRequest request, CancellationToken cancellationToken)

Gets the shared VPC host project that this project links to. May be empty if no link exists.

Parameters
Name Description
request GetXpnHostProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskProject

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
GetXpnHostProjectRequest request = new GetXpnHostProjectRequest { Project = "", };
// Make the request
Project response = await projectsClient.GetXpnHostAsync(request);

GetXpnHostAsync(string, CallSettings)

public virtual Task<Project> GetXpnHostAsync(string project, CallSettings callSettings = null)

Gets the shared VPC host project that this project links to. May be empty if no link exists.

Parameters
Name Description
project string

Project ID for this request.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskProject

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
Project response = await projectsClient.GetXpnHostAsync(project);

GetXpnHostAsync(string, CancellationToken)

public virtual Task<Project> GetXpnHostAsync(string project, CancellationToken cancellationToken)

Gets the shared VPC host project that this project links to. May be empty if no link exists.

Parameters
Name Description
project string

Project ID for this request.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskProject

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
Project response = await projectsClient.GetXpnHostAsync(project);

GetXpnResources(GetXpnResourcesProjectsRequest, CallSettings)

public virtual PagedEnumerable<ProjectsGetXpnResources, XpnResourceId> GetXpnResources(GetXpnResourcesProjectsRequest request, CallSettings callSettings = null)

Gets service resources (a.k.a service project) associated with this host project.

Parameters
Name Description
request GetXpnResourcesProjectsRequest

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
PagedEnumerableProjectsGetXpnResourcesXpnResourceId

A pageable sequence of XpnResourceId resources.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
GetXpnResourcesProjectsRequest request = new GetXpnResourcesProjectsRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<ProjectsGetXpnResources, XpnResourceId> response = projectsClient.GetXpnResources(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (XpnResourceId 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 (ProjectsGetXpnResources page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (XpnResourceId 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<XpnResourceId> 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 (XpnResourceId 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;

GetXpnResources(string, string, int?, CallSettings)

public virtual PagedEnumerable<ProjectsGetXpnResources, XpnResourceId> GetXpnResources(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets service resources (a.k.a service project) associated with this host project.

Parameters
Name Description
project string

Project ID for this request.

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
PagedEnumerableProjectsGetXpnResourcesXpnResourceId

A pageable sequence of XpnResourceId resources.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<ProjectsGetXpnResources, XpnResourceId> response = projectsClient.GetXpnResources(project);

// Iterate over all response items, lazily performing RPCs as required
foreach (XpnResourceId 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 (ProjectsGetXpnResources page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (XpnResourceId 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<XpnResourceId> 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 (XpnResourceId 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;

GetXpnResourcesAsync(GetXpnResourcesProjectsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ProjectsGetXpnResources, XpnResourceId> GetXpnResourcesAsync(GetXpnResourcesProjectsRequest request, CallSettings callSettings = null)

Gets service resources (a.k.a service project) associated with this host project.

Parameters
Name Description
request GetXpnResourcesProjectsRequest

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
PagedAsyncEnumerableProjectsGetXpnResourcesXpnResourceId

A pageable asynchronous sequence of XpnResourceId resources.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
GetXpnResourcesProjectsRequest request = new GetXpnResourcesProjectsRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<ProjectsGetXpnResources, XpnResourceId> response = projectsClient.GetXpnResourcesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((XpnResourceId 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((ProjectsGetXpnResources page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (XpnResourceId 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<XpnResourceId> 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 (XpnResourceId 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;

GetXpnResourcesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ProjectsGetXpnResources, XpnResourceId> GetXpnResourcesAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets service resources (a.k.a service project) associated with this host project.

Parameters
Name Description
project string

Project ID for this request.

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
PagedAsyncEnumerableProjectsGetXpnResourcesXpnResourceId

A pageable asynchronous sequence of XpnResourceId resources.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<ProjectsGetXpnResources, XpnResourceId> response = projectsClient.GetXpnResourcesAsync(project);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((XpnResourceId 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((ProjectsGetXpnResources page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (XpnResourceId 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<XpnResourceId> 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 (XpnResourceId 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;

ListXpnHosts(ListXpnHostsProjectsRequest, CallSettings)

public virtual PagedEnumerable<XpnHostList, Project> ListXpnHosts(ListXpnHostsProjectsRequest request, CallSettings callSettings = null)

Lists all shared VPC host projects visible to the user in an organization.

Parameters
Name Description
request ListXpnHostsProjectsRequest

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
PagedEnumerableXpnHostListProject

A pageable sequence of Project resources.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
ListXpnHostsProjectsRequest request = new ListXpnHostsProjectsRequest
{
    OrderBy = "",
    Project = "",
    ProjectsListXpnHostsRequestResource = new ProjectsListXpnHostsRequest(),
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<XpnHostList, Project> response = projectsClient.ListXpnHosts(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Project 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 (XpnHostList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Project 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<Project> 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 (Project 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;

ListXpnHosts(string, ProjectsListXpnHostsRequest, string, int?, CallSettings)

public virtual PagedEnumerable<XpnHostList, Project> ListXpnHosts(string project, ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all shared VPC host projects visible to the user in an organization.

Parameters
Name Description
project string

Project ID for this request.

projectsListXpnHostsRequestResource ProjectsListXpnHostsRequest

The body resource for this request

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
PagedEnumerableXpnHostListProject

A pageable sequence of Project resources.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource = new ProjectsListXpnHostsRequest();
// Make the request
PagedEnumerable<XpnHostList, Project> response = projectsClient.ListXpnHosts(project, projectsListXpnHostsRequestResource);

// Iterate over all response items, lazily performing RPCs as required
foreach (Project 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 (XpnHostList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Project 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<Project> 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 (Project 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;

ListXpnHostsAsync(ListXpnHostsProjectsRequest, CallSettings)

public virtual PagedAsyncEnumerable<XpnHostList, Project> ListXpnHostsAsync(ListXpnHostsProjectsRequest request, CallSettings callSettings = null)

Lists all shared VPC host projects visible to the user in an organization.

Parameters
Name Description
request ListXpnHostsProjectsRequest

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
PagedAsyncEnumerableXpnHostListProject

A pageable asynchronous sequence of Project resources.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
ListXpnHostsProjectsRequest request = new ListXpnHostsProjectsRequest
{
    OrderBy = "",
    Project = "",
    ProjectsListXpnHostsRequestResource = new ProjectsListXpnHostsRequest(),
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<XpnHostList, Project> response = projectsClient.ListXpnHostsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Project 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((XpnHostList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Project 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<Project> 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 (Project 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;

ListXpnHostsAsync(string, ProjectsListXpnHostsRequest, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<XpnHostList, Project> ListXpnHostsAsync(string project, ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all shared VPC host projects visible to the user in an organization.

Parameters
Name Description
project string

Project ID for this request.

projectsListXpnHostsRequestResource ProjectsListXpnHostsRequest

The body resource for this request

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
PagedAsyncEnumerableXpnHostListProject

A pageable asynchronous sequence of Project resources.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource = new ProjectsListXpnHostsRequest();
// Make the request
PagedAsyncEnumerable<XpnHostList, Project> response = projectsClient.ListXpnHostsAsync(project, projectsListXpnHostsRequestResource);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Project 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((XpnHostList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Project 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<Project> 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 (Project 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;

MoveDisk(MoveDiskProjectRequest, CallSettings)

public virtual Operation<Operation, Operation> MoveDisk(MoveDiskProjectRequest request, CallSettings callSettings = null)

Moves a persistent disk from one zone to another.

Parameters
Name Description
request MoveDiskProjectRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
MoveDiskProjectRequest request = new MoveDiskProjectRequest
{
    RequestId = "",
    Project = "",
    DiskMoveRequestResource = new DiskMoveRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.MoveDisk(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceMoveDisk(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveDisk(string, DiskMoveRequest, CallSettings)

public virtual Operation<Operation, Operation> MoveDisk(string project, DiskMoveRequest diskMoveRequestResource, CallSettings callSettings = null)

Moves a persistent disk from one zone to another.

Parameters
Name Description
project string

Project ID for this request.

diskMoveRequestResource DiskMoveRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
DiskMoveRequest diskMoveRequestResource = new DiskMoveRequest();
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.MoveDisk(project, diskMoveRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceMoveDisk(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveDiskAsync(MoveDiskProjectRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> MoveDiskAsync(MoveDiskProjectRequest request, CallSettings callSettings = null)

Moves a persistent disk from one zone to another.

Parameters
Name Description
request MoveDiskProjectRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
MoveDiskProjectRequest request = new MoveDiskProjectRequest
{
    RequestId = "",
    Project = "",
    DiskMoveRequestResource = new DiskMoveRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.MoveDiskAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveDiskAsync(MoveDiskProjectRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> MoveDiskAsync(MoveDiskProjectRequest request, CancellationToken cancellationToken)

Moves a persistent disk from one zone to another.

Parameters
Name Description
request MoveDiskProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
MoveDiskProjectRequest request = new MoveDiskProjectRequest
{
    RequestId = "",
    Project = "",
    DiskMoveRequestResource = new DiskMoveRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.MoveDiskAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveDiskAsync(string, DiskMoveRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> MoveDiskAsync(string project, DiskMoveRequest diskMoveRequestResource, CallSettings callSettings = null)

Moves a persistent disk from one zone to another.

Parameters
Name Description
project string

Project ID for this request.

diskMoveRequestResource DiskMoveRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
DiskMoveRequest diskMoveRequestResource = new DiskMoveRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.MoveDiskAsync(project, diskMoveRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveDiskAsync(string, DiskMoveRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> MoveDiskAsync(string project, DiskMoveRequest diskMoveRequestResource, CancellationToken cancellationToken)

Moves a persistent disk from one zone to another.

Parameters
Name Description
project string

Project ID for this request.

diskMoveRequestResource DiskMoveRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
DiskMoveRequest diskMoveRequestResource = new DiskMoveRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.MoveDiskAsync(project, diskMoveRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveInstance(MoveInstanceProjectRequest, CallSettings)

public virtual Operation<Operation, Operation> MoveInstance(MoveInstanceProjectRequest request, CallSettings callSettings = null)

Moves an instance and its attached persistent disks from one zone to another. Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. [Deprecated] This method is deprecated. See moving instance across zones instead.

Parameters
Name Description
request MoveInstanceProjectRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
MoveInstanceProjectRequest request = new MoveInstanceProjectRequest
{
    RequestId = "",
    Project = "",
    InstanceMoveRequestResource = new InstanceMoveRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.MoveInstance(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceMoveInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveInstance(string, InstanceMoveRequest, CallSettings)

public virtual Operation<Operation, Operation> MoveInstance(string project, InstanceMoveRequest instanceMoveRequestResource, CallSettings callSettings = null)

Moves an instance and its attached persistent disks from one zone to another. Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. [Deprecated] This method is deprecated. See moving instance across zones instead.

Parameters
Name Description
project string

Project ID for this request.

instanceMoveRequestResource InstanceMoveRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
InstanceMoveRequest instanceMoveRequestResource = new InstanceMoveRequest();
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.MoveInstance(project, instanceMoveRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceMoveInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveInstanceAsync(MoveInstanceProjectRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> MoveInstanceAsync(MoveInstanceProjectRequest request, CallSettings callSettings = null)

Moves an instance and its attached persistent disks from one zone to another. Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. [Deprecated] This method is deprecated. See moving instance across zones instead.

Parameters
Name Description
request MoveInstanceProjectRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
MoveInstanceProjectRequest request = new MoveInstanceProjectRequest
{
    RequestId = "",
    Project = "",
    InstanceMoveRequestResource = new InstanceMoveRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.MoveInstanceAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveInstanceAsync(MoveInstanceProjectRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> MoveInstanceAsync(MoveInstanceProjectRequest request, CancellationToken cancellationToken)

Moves an instance and its attached persistent disks from one zone to another. Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. [Deprecated] This method is deprecated. See moving instance across zones instead.

Parameters
Name Description
request MoveInstanceProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
MoveInstanceProjectRequest request = new MoveInstanceProjectRequest
{
    RequestId = "",
    Project = "",
    InstanceMoveRequestResource = new InstanceMoveRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.MoveInstanceAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveInstanceAsync(string, InstanceMoveRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> MoveInstanceAsync(string project, InstanceMoveRequest instanceMoveRequestResource, CallSettings callSettings = null)

Moves an instance and its attached persistent disks from one zone to another. Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. [Deprecated] This method is deprecated. See moving instance across zones instead.

Parameters
Name Description
project string

Project ID for this request.

instanceMoveRequestResource InstanceMoveRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
InstanceMoveRequest instanceMoveRequestResource = new InstanceMoveRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.MoveInstanceAsync(project, instanceMoveRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveInstanceAsync(string, InstanceMoveRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> MoveInstanceAsync(string project, InstanceMoveRequest instanceMoveRequestResource, CancellationToken cancellationToken)

Moves an instance and its attached persistent disks from one zone to another. Note: Moving VMs or disks by using this method might cause unexpected behavior. For more information, see the known issue. [Deprecated] This method is deprecated. See moving instance across zones instead.

Parameters
Name Description
project string

Project ID for this request.

instanceMoveRequestResource InstanceMoveRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
InstanceMoveRequest instanceMoveRequestResource = new InstanceMoveRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.MoveInstanceAsync(project, instanceMoveRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PollOnceDisableXpnHost(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceDisableXpnHost(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DisableXpnHost.

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
OperationOperationOperation

The result of polling the operation.

PollOnceDisableXpnHostAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceDisableXpnHostAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DisableXpnHost.

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceDisableXpnResource(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceDisableXpnResource(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DisableXpnResource .

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
OperationOperationOperation

The result of polling the operation.

PollOnceDisableXpnResourceAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceDisableXpnResourceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DisableXpnResource.

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceEnableXpnHost(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceEnableXpnHost(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of EnableXpnHost.

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
OperationOperationOperation

The result of polling the operation.

PollOnceEnableXpnHostAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceEnableXpnHostAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of EnableXpnHost.

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceEnableXpnResource(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceEnableXpnResource(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of EnableXpnResource .

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
OperationOperationOperation

The result of polling the operation.

PollOnceEnableXpnResourceAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceEnableXpnResourceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of EnableXpnResource.

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceMoveDisk(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceMoveDisk(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of MoveDisk.

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
OperationOperationOperation

The result of polling the operation.

PollOnceMoveDiskAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceMoveDiskAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of MoveDisk.

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceMoveInstance(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceMoveInstance(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of MoveInstance.

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
OperationOperationOperation

The result of polling the operation.

PollOnceMoveInstanceAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceMoveInstanceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of MoveInstance.

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceSetCloudArmorTier(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceSetCloudArmorTier(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of SetCloudArmorTier .

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
OperationOperationOperation

The result of polling the operation.

PollOnceSetCloudArmorTierAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceSetCloudArmorTierAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of SetCloudArmorTier.

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceSetCommonInstanceMetadata(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceSetCommonInstanceMetadata(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of SetCommonInstanceMetadata.

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
OperationOperationOperation

The result of polling the operation.

PollOnceSetCommonInstanceMetadataAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceSetCommonInstanceMetadataAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of SetCommonInstanceMetadata.

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceSetDefaultNetworkTier(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceSetDefaultNetworkTier(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of SetDefaultNetworkTier .

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
OperationOperationOperation

The result of polling the operation.

PollOnceSetDefaultNetworkTierAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceSetDefaultNetworkTierAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of SetDefaultNetworkTier.

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceSetUsageExportBucket(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceSetUsageExportBucket(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of SetUsageExportBucket .

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
OperationOperationOperation

The result of polling the operation.

PollOnceSetUsageExportBucketAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceSetUsageExportBucketAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of SetUsageExportBucket.

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
TaskOperationOperationOperation

A task representing the result of polling the operation.

SetCloudArmorTier(SetCloudArmorTierProjectRequest, CallSettings)

public virtual Operation<Operation, Operation> SetCloudArmorTier(SetCloudArmorTierProjectRequest request, CallSettings callSettings = null)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information.

Parameters
Name Description
request SetCloudArmorTierProjectRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
SetCloudArmorTierProjectRequest request = new SetCloudArmorTierProjectRequest
{
    RequestId = "",
    ProjectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.SetCloudArmorTier(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetCloudArmorTier(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetCloudArmorTier(string, ProjectsSetCloudArmorTierRequest, CallSettings)

public virtual Operation<Operation, Operation> SetCloudArmorTier(string project, ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource, CallSettings callSettings = null)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information.

Parameters
Name Description
project string

Project ID for this request.

projectsSetCloudArmorTierRequestResource ProjectsSetCloudArmorTierRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest();
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.SetCloudArmorTier(project, projectsSetCloudArmorTierRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetCloudArmorTier(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetCloudArmorTierAsync(SetCloudArmorTierProjectRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetCloudArmorTierAsync(SetCloudArmorTierProjectRequest request, CallSettings callSettings = null)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information.

Parameters
Name Description
request SetCloudArmorTierProjectRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
SetCloudArmorTierProjectRequest request = new SetCloudArmorTierProjectRequest
{
    RequestId = "",
    ProjectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetCloudArmorTierAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCloudArmorTierAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetCloudArmorTierAsync(SetCloudArmorTierProjectRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetCloudArmorTierAsync(SetCloudArmorTierProjectRequest request, CancellationToken cancellationToken)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information.

Parameters
Name Description
request SetCloudArmorTierProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
SetCloudArmorTierProjectRequest request = new SetCloudArmorTierProjectRequest
{
    RequestId = "",
    ProjectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetCloudArmorTierAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCloudArmorTierAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetCloudArmorTierAsync(string, ProjectsSetCloudArmorTierRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetCloudArmorTierAsync(string project, ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource, CallSettings callSettings = null)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information.

Parameters
Name Description
project string

Project ID for this request.

projectsSetCloudArmorTierRequestResource ProjectsSetCloudArmorTierRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetCloudArmorTierAsync(project, projectsSetCloudArmorTierRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCloudArmorTierAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetCloudArmorTierAsync(string, ProjectsSetCloudArmorTierRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetCloudArmorTierAsync(string project, ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource, CancellationToken cancellationToken)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the billing account of the project must be subscribed to Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more information.

Parameters
Name Description
project string

Project ID for this request.

projectsSetCloudArmorTierRequestResource ProjectsSetCloudArmorTierRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetCloudArmorTierAsync(project, projectsSetCloudArmorTierRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCloudArmorTierAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetCommonInstanceMetadata(SetCommonInstanceMetadataProjectRequest, CallSettings)

public virtual Operation<Operation, Operation> SetCommonInstanceMetadata(SetCommonInstanceMetadataProjectRequest request, CallSettings callSettings = null)

Sets metadata common to all instances within the specified project using the data included in the request.

Parameters
Name Description
request SetCommonInstanceMetadataProjectRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
SetCommonInstanceMetadataProjectRequest request = new SetCommonInstanceMetadataProjectRequest
{
    RequestId = "",
    Project = "",
    MetadataResource = new Metadata(),
};
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.SetCommonInstanceMetadata(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetCommonInstanceMetadata(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetCommonInstanceMetadata(string, Metadata, CallSettings)

public virtual Operation<Operation, Operation> SetCommonInstanceMetadata(string project, Metadata metadataResource, CallSettings callSettings = null)

Sets metadata common to all instances within the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

metadataResource Metadata

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
Metadata metadataResource = new Metadata();
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.SetCommonInstanceMetadata(project, metadataResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetCommonInstanceMetadata(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetCommonInstanceMetadataAsync(SetCommonInstanceMetadataProjectRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetCommonInstanceMetadataAsync(SetCommonInstanceMetadataProjectRequest request, CallSettings callSettings = null)

Sets metadata common to all instances within the specified project using the data included in the request.

Parameters
Name Description
request SetCommonInstanceMetadataProjectRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
SetCommonInstanceMetadataProjectRequest request = new SetCommonInstanceMetadataProjectRequest
{
    RequestId = "",
    Project = "",
    MetadataResource = new Metadata(),
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetCommonInstanceMetadataAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCommonInstanceMetadataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetCommonInstanceMetadataAsync(SetCommonInstanceMetadataProjectRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetCommonInstanceMetadataAsync(SetCommonInstanceMetadataProjectRequest request, CancellationToken cancellationToken)

Sets metadata common to all instances within the specified project using the data included in the request.

Parameters
Name Description
request SetCommonInstanceMetadataProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
SetCommonInstanceMetadataProjectRequest request = new SetCommonInstanceMetadataProjectRequest
{
    RequestId = "",
    Project = "",
    MetadataResource = new Metadata(),
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetCommonInstanceMetadataAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCommonInstanceMetadataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetCommonInstanceMetadataAsync(string, Metadata, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetCommonInstanceMetadataAsync(string project, Metadata metadataResource, CallSettings callSettings = null)

Sets metadata common to all instances within the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

metadataResource Metadata

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
Metadata metadataResource = new Metadata();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetCommonInstanceMetadataAsync(project, metadataResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCommonInstanceMetadataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetCommonInstanceMetadataAsync(string, Metadata, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetCommonInstanceMetadataAsync(string project, Metadata metadataResource, CancellationToken cancellationToken)

Sets metadata common to all instances within the specified project using the data included in the request.

Parameters
Name Description
project string

Project ID for this request.

metadataResource Metadata

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
Metadata metadataResource = new Metadata();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetCommonInstanceMetadataAsync(project, metadataResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCommonInstanceMetadataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetDefaultNetworkTier(SetDefaultNetworkTierProjectRequest, CallSettings)

public virtual Operation<Operation, Operation> SetDefaultNetworkTier(SetDefaultNetworkTierProjectRequest request, CallSettings callSettings = null)

Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.

Parameters
Name Description
request SetDefaultNetworkTierProjectRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
SetDefaultNetworkTierProjectRequest request = new SetDefaultNetworkTierProjectRequest
{
    RequestId = "",
    ProjectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.SetDefaultNetworkTier(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetDefaultNetworkTier(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetDefaultNetworkTier(string, ProjectsSetDefaultNetworkTierRequest, CallSettings)

public virtual Operation<Operation, Operation> SetDefaultNetworkTier(string project, ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource, CallSettings callSettings = null)

Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.

Parameters
Name Description
project string

Project ID for this request.

projectsSetDefaultNetworkTierRequestResource ProjectsSetDefaultNetworkTierRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest();
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.SetDefaultNetworkTier(project, projectsSetDefaultNetworkTierRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetDefaultNetworkTier(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetDefaultNetworkTierAsync(SetDefaultNetworkTierProjectRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetDefaultNetworkTierAsync(SetDefaultNetworkTierProjectRequest request, CallSettings callSettings = null)

Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.

Parameters
Name Description
request SetDefaultNetworkTierProjectRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
SetDefaultNetworkTierProjectRequest request = new SetDefaultNetworkTierProjectRequest
{
    RequestId = "",
    ProjectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetDefaultNetworkTierAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetDefaultNetworkTierAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetDefaultNetworkTierAsync(SetDefaultNetworkTierProjectRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetDefaultNetworkTierAsync(SetDefaultNetworkTierProjectRequest request, CancellationToken cancellationToken)

Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.

Parameters
Name Description
request SetDefaultNetworkTierProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
SetDefaultNetworkTierProjectRequest request = new SetDefaultNetworkTierProjectRequest
{
    RequestId = "",
    ProjectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetDefaultNetworkTierAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetDefaultNetworkTierAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetDefaultNetworkTierAsync(string, ProjectsSetDefaultNetworkTierRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetDefaultNetworkTierAsync(string project, ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource, CallSettings callSettings = null)

Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.

Parameters
Name Description
project string

Project ID for this request.

projectsSetDefaultNetworkTierRequestResource ProjectsSetDefaultNetworkTierRequest

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetDefaultNetworkTierAsync(project, projectsSetDefaultNetworkTierRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetDefaultNetworkTierAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetDefaultNetworkTierAsync(string, ProjectsSetDefaultNetworkTierRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetDefaultNetworkTierAsync(string project, ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource, CancellationToken cancellationToken)

Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.

Parameters
Name Description
project string

Project ID for this request.

projectsSetDefaultNetworkTierRequestResource ProjectsSetDefaultNetworkTierRequest

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetDefaultNetworkTierAsync(project, projectsSetDefaultNetworkTierRequestResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetDefaultNetworkTierAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetUsageExportBucket(SetUsageExportBucketProjectRequest, CallSettings)

public virtual Operation<Operation, Operation> SetUsageExportBucket(SetUsageExportBucketProjectRequest request, CallSettings callSettings = null)

Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.

Parameters
Name Description
request SetUsageExportBucketProjectRequest

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
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
SetUsageExportBucketProjectRequest request = new SetUsageExportBucketProjectRequest
{
    UsageExportLocationResource = new UsageExportLocation(),
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.SetUsageExportBucket(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetUsageExportBucket(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetUsageExportBucket(string, UsageExportLocation, CallSettings)

public virtual Operation<Operation, Operation> SetUsageExportBucket(string project, UsageExportLocation usageExportLocationResource, CallSettings callSettings = null)

Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.

Parameters
Name Description
project string

Project ID for this request.

usageExportLocationResource UsageExportLocation

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Example
// Create client
ProjectsClient projectsClient = ProjectsClient.Create();
// Initialize request argument(s)
string project = "";
UsageExportLocation usageExportLocationResource = new UsageExportLocation();
// Make the request
lro::Operation<Operation, Operation> response = projectsClient.SetUsageExportBucket(project, usageExportLocationResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetUsageExportBucket(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetUsageExportBucketAsync(SetUsageExportBucketProjectRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetUsageExportBucketAsync(SetUsageExportBucketProjectRequest request, CallSettings callSettings = null)

Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.

Parameters
Name Description
request SetUsageExportBucketProjectRequest

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
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
SetUsageExportBucketProjectRequest request = new SetUsageExportBucketProjectRequest
{
    UsageExportLocationResource = new UsageExportLocation(),
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetUsageExportBucketAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetUsageExportBucketAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetUsageExportBucketAsync(SetUsageExportBucketProjectRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetUsageExportBucketAsync(SetUsageExportBucketProjectRequest request, CancellationToken cancellationToken)

Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.

Parameters
Name Description
request SetUsageExportBucketProjectRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
SetUsageExportBucketProjectRequest request = new SetUsageExportBucketProjectRequest
{
    UsageExportLocationResource = new UsageExportLocation(),
    RequestId = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetUsageExportBucketAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetUsageExportBucketAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetUsageExportBucketAsync(string, UsageExportLocation, CallSettings)

public virtual Task<Operation<Operation, Operation>> SetUsageExportBucketAsync(string project, UsageExportLocation usageExportLocationResource, CallSettings callSettings = null)

Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.

Parameters
Name Description
project string

Project ID for this request.

usageExportLocationResource UsageExportLocation

The body resource for this request

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
UsageExportLocation usageExportLocationResource = new UsageExportLocation();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetUsageExportBucketAsync(project, usageExportLocationResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetUsageExportBucketAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetUsageExportBucketAsync(string, UsageExportLocation, CancellationToken)

public virtual Task<Operation<Operation, Operation>> SetUsageExportBucketAsync(string project, UsageExportLocation usageExportLocationResource, CancellationToken cancellationToken)

Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.

Parameters
Name Description
project string

Project ID for this request.

usageExportLocationResource UsageExportLocation

The body resource for this request

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
UsageExportLocation usageExportLocationResource = new UsageExportLocation();
// Make the request
lro::Operation<Operation, Operation> response = await projectsClient.SetUsageExportBucketAsync(project, usageExportLocationResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation 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
lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetUsageExportBucketAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

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.