Compute Engine v1 API - Class ProjectsClientImpl (3.1.0)

public sealed class ProjectsClientImpl : ProjectsClient

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

Projects client wrapper implementation, for convenient use.

Inheritance

object > ProjectsClient > ProjectsClientImpl

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The Projects API.

Constructors

ProjectsClientImpl(ProjectsClient, ProjectsSettings, ILogger)

public ProjectsClientImpl(Projects.ProjectsClient grpcClient, ProjectsSettings settings, ILogger logger)

Constructs a client wrapper for the Projects service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient ProjectsProjectsClient

The underlying gRPC client.

settings ProjectsSettings

The base ProjectsSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

DisableXpnHostOperationsClient

public override OperationsClient DisableXpnHostOperationsClient { get; }

The long-running operations client for DisableXpnHost.

Property Value
Type Description
OperationsClient
Overrides

DisableXpnResourceOperationsClient

public override OperationsClient DisableXpnResourceOperationsClient { get; }

The long-running operations client for DisableXpnResource.

Property Value
Type Description
OperationsClient
Overrides

EnableXpnHostOperationsClient

public override OperationsClient EnableXpnHostOperationsClient { get; }

The long-running operations client for EnableXpnHost.

Property Value
Type Description
OperationsClient
Overrides

EnableXpnResourceOperationsClient

public override OperationsClient EnableXpnResourceOperationsClient { get; }

The long-running operations client for EnableXpnResource.

Property Value
Type Description
OperationsClient
Overrides

GrpcClient

public override Projects.ProjectsClient GrpcClient { get; }

The underlying gRPC Projects client

Property Value
Type Description
ProjectsProjectsClient
Overrides

MoveDiskOperationsClient

public override OperationsClient MoveDiskOperationsClient { get; }

The long-running operations client for MoveDisk.

Property Value
Type Description
OperationsClient
Overrides

MoveInstanceOperationsClient

public override OperationsClient MoveInstanceOperationsClient { get; }

The long-running operations client for MoveInstance.

Property Value
Type Description
OperationsClient
Overrides

SetCloudArmorTierOperationsClient

public override OperationsClient SetCloudArmorTierOperationsClient { get; }

The long-running operations client for SetCloudArmorTier.

Property Value
Type Description
OperationsClient
Overrides

SetCommonInstanceMetadataOperationsClient

public override OperationsClient SetCommonInstanceMetadataOperationsClient { get; }

The long-running operations client for SetCommonInstanceMetadata.

Property Value
Type Description
OperationsClient
Overrides

SetDefaultNetworkTierOperationsClient

public override OperationsClient SetDefaultNetworkTierOperationsClient { get; }

The long-running operations client for SetDefaultNetworkTier.

Property Value
Type Description
OperationsClient
Overrides

SetUsageExportBucketOperationsClient

public override OperationsClient SetUsageExportBucketOperationsClient { get; }

The long-running operations client for SetUsageExportBucket.

Property Value
Type Description
OperationsClient
Overrides

Methods

DisableXpnHost(DisableXpnHostProjectRequest, CallSettings)

public override 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.

Overrides

DisableXpnHostAsync(DisableXpnHostProjectRequest, CallSettings)

public override 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.

Overrides

DisableXpnResource(DisableXpnResourceProjectRequest, CallSettings)

public override 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.

Overrides

DisableXpnResourceAsync(DisableXpnResourceProjectRequest, CallSettings)

public override 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.

Overrides

EnableXpnHost(EnableXpnHostProjectRequest, CallSettings)

public override 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.

Overrides

EnableXpnHostAsync(EnableXpnHostProjectRequest, CallSettings)

public override 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.

Overrides

EnableXpnResource(EnableXpnResourceProjectRequest, CallSettings)

public override 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.

Overrides

EnableXpnResourceAsync(EnableXpnResourceProjectRequest, CallSettings)

public override 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.

Overrides

Get(GetProjectRequest, CallSettings)

public override 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.

Overrides

GetAsync(GetProjectRequest, CallSettings)

public override 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.

Overrides

GetXpnHost(GetXpnHostProjectRequest, CallSettings)

public override 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.

Overrides

GetXpnHostAsync(GetXpnHostProjectRequest, CallSettings)

public override 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.

Overrides

GetXpnResources(GetXpnResourcesProjectsRequest, CallSettings)

public override 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.

Overrides

GetXpnResourcesAsync(GetXpnResourcesProjectsRequest, CallSettings)

public override 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.

Overrides

ListXpnHosts(ListXpnHostsProjectsRequest, CallSettings)

public override 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.

Overrides

ListXpnHostsAsync(ListXpnHostsProjectsRequest, CallSettings)

public override 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.

Overrides

MoveDisk(MoveDiskProjectRequest, CallSettings)

public override 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.

Overrides

MoveDiskAsync(MoveDiskProjectRequest, CallSettings)

public override 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.

Overrides

MoveInstance(MoveInstanceProjectRequest, CallSettings)

public override 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.

Overrides

MoveInstanceAsync(MoveInstanceProjectRequest, CallSettings)

public override 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.

Overrides

SetCloudArmorTier(SetCloudArmorTierProjectRequest, CallSettings)

public override 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.

Overrides

SetCloudArmorTierAsync(SetCloudArmorTierProjectRequest, CallSettings)

public override 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.

Overrides

SetCommonInstanceMetadata(SetCommonInstanceMetadataProjectRequest, CallSettings)

public override 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.

Overrides

SetCommonInstanceMetadataAsync(SetCommonInstanceMetadataProjectRequest, CallSettings)

public override 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.

Overrides

SetDefaultNetworkTier(SetDefaultNetworkTierProjectRequest, CallSettings)

public override 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.

Overrides

SetDefaultNetworkTierAsync(SetDefaultNetworkTierProjectRequest, CallSettings)

public override 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.

Overrides

SetUsageExportBucket(SetUsageExportBucketProjectRequest, CallSettings)

public override 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.

Overrides

SetUsageExportBucketAsync(SetUsageExportBucketProjectRequest, CallSettings)

public override 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.

Overrides