Compute Engine v1 API - Class ProjectsClientImpl (2.9.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

GoogleCloudGoogle.Cloud.ComputeV1

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
NameDescription
grpcClientProjectsProjectsClient

The underlying gRPC client.

settingsProjectsSettings

The base ProjectsSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

DisableXpnHostOperationsClient

public override OperationsClient DisableXpnHostOperationsClient { get; }

The long-running operations client for DisableXpnHost.

Property Value
TypeDescription
OperationsClient
Overrides

DisableXpnResourceOperationsClient

public override OperationsClient DisableXpnResourceOperationsClient { get; }

The long-running operations client for DisableXpnResource.

Property Value
TypeDescription
OperationsClient
Overrides

EnableXpnHostOperationsClient

public override OperationsClient EnableXpnHostOperationsClient { get; }

The long-running operations client for EnableXpnHost.

Property Value
TypeDescription
OperationsClient
Overrides

EnableXpnResourceOperationsClient

public override OperationsClient EnableXpnResourceOperationsClient { get; }

The long-running operations client for EnableXpnResource.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override Projects.ProjectsClient GrpcClient { get; }

The underlying gRPC Projects client

Property Value
TypeDescription
ProjectsProjectsClient
Overrides

MoveDiskOperationsClient

public override OperationsClient MoveDiskOperationsClient { get; }

The long-running operations client for MoveDisk.

Property Value
TypeDescription
OperationsClient
Overrides

MoveInstanceOperationsClient

public override OperationsClient MoveInstanceOperationsClient { get; }

The long-running operations client for MoveInstance.

Property Value
TypeDescription
OperationsClient
Overrides

SetCommonInstanceMetadataOperationsClient

public override OperationsClient SetCommonInstanceMetadataOperationsClient { get; }

The long-running operations client for SetCommonInstanceMetadata.

Property Value
TypeDescription
OperationsClient
Overrides

SetDefaultNetworkTierOperationsClient

public override OperationsClient SetDefaultNetworkTierOperationsClient { get; }

The long-running operations client for SetDefaultNetworkTier.

Property Value
TypeDescription
OperationsClient
Overrides

SetUsageExportBucketOperationsClient

public override OperationsClient SetUsageExportBucketOperationsClient { get; }

The long-running operations client for SetUsageExportBucket.

Property Value
TypeDescription
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
NameDescription
requestDisableXpnHostProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestDisableXpnHostProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestDisableXpnResourceProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestDisableXpnResourceProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestEnableXpnHostProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestEnableXpnHostProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestEnableXpnResourceProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestEnableXpnResourceProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetXpnHostProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetXpnHostProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetXpnResourcesProjectsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetXpnResourcesProjectsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestListXpnHostsProjectsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestListXpnHostsProjectsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestMoveDiskProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestMoveDiskProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestMoveInstanceProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestMoveInstanceProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestSetCommonInstanceMetadataProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestSetCommonInstanceMetadataProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestSetDefaultNetworkTierProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestSetDefaultNetworkTierProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestSetUsageExportBucketProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestSetUsageExportBucketProjectRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides