Compute Engine v1 API - Class InstanceTemplates.InstanceTemplatesClient (2.9.0)

public class InstanceTemplates.InstanceTemplatesClient : ClientBase<InstanceTemplates.InstanceTemplatesClient>

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

Client for InstanceTemplates

Inheritance

object > ClientBase > ClientBaseInstanceTemplatesInstanceTemplatesClient > InstanceTemplates.InstanceTemplatesClient

Namespace

GoogleCloudGoogle.Cloud.ComputeV1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

InstanceTemplatesClient()

protected InstanceTemplatesClient()

Protected parameterless constructor to allow creation of test doubles.

InstanceTemplatesClient(CallInvoker)

public InstanceTemplatesClient(CallInvoker callInvoker)

Creates a new client for InstanceTemplates that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

InstanceTemplatesClient(ChannelBase)

public InstanceTemplatesClient(ChannelBase channel)

Creates a new client for InstanceTemplates

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

InstanceTemplatesClient(ClientBaseConfiguration)

protected InstanceTemplatesClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

AggregatedList(AggregatedListInstanceTemplatesRequest, CallOptions)

public virtual InstanceTemplateAggregatedList AggregatedList(AggregatedListInstanceTemplatesRequest request, CallOptions options)

Retrieves the list of all InstanceTemplates resources, regional and global, available to the specified project.

Parameters
NameDescription
requestAggregatedListInstanceTemplatesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
InstanceTemplateAggregatedList

The response received from the server.

AggregatedList(AggregatedListInstanceTemplatesRequest, Metadata, DateTime?, CancellationToken)

public virtual InstanceTemplateAggregatedList AggregatedList(AggregatedListInstanceTemplatesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves the list of all InstanceTemplates resources, regional and global, available to the specified project.

Parameters
NameDescription
requestAggregatedListInstanceTemplatesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
InstanceTemplateAggregatedList

The response received from the server.

AggregatedListAsync(AggregatedListInstanceTemplatesRequest, CallOptions)

public virtual AsyncUnaryCall<InstanceTemplateAggregatedList> AggregatedListAsync(AggregatedListInstanceTemplatesRequest request, CallOptions options)

Retrieves the list of all InstanceTemplates resources, regional and global, available to the specified project.

Parameters
NameDescription
requestAggregatedListInstanceTemplatesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallInstanceTemplateAggregatedList

The call object.

AggregatedListAsync(AggregatedListInstanceTemplatesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<InstanceTemplateAggregatedList> AggregatedListAsync(AggregatedListInstanceTemplatesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves the list of all InstanceTemplates resources, regional and global, available to the specified project.

Parameters
NameDescription
requestAggregatedListInstanceTemplatesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallInstanceTemplateAggregatedList

The call object.

CreateOperationsClientForGlobalOperations()

public virtual Operations.OperationsClient CreateOperationsClientForGlobalOperations()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client, delegating to GlobalOperations.

Returns
TypeDescription
OperationsOperationsClient

A new Operations client for the same target as this client.

Delete(DeleteInstanceTemplateRequest, CallOptions)

public virtual Operation Delete(DeleteInstanceTemplateRequest request, CallOptions options)

Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.

Parameters
NameDescription
requestDeleteInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

Delete(DeleteInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation Delete(DeleteInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.

Parameters
NameDescription
requestDeleteInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

DeleteAsync(DeleteInstanceTemplateRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> DeleteAsync(DeleteInstanceTemplateRequest request, CallOptions options)

Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.

Parameters
NameDescription
requestDeleteInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

DeleteAsync(DeleteInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> DeleteAsync(DeleteInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.

Parameters
NameDescription
requestDeleteInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

Get(GetInstanceTemplateRequest, CallOptions)

public virtual InstanceTemplate Get(GetInstanceTemplateRequest request, CallOptions options)

Returns the specified instance template.

Parameters
NameDescription
requestGetInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
InstanceTemplate

The response received from the server.

Get(GetInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual InstanceTemplate Get(GetInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the specified instance template.

Parameters
NameDescription
requestGetInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
InstanceTemplate

The response received from the server.

GetAsync(GetInstanceTemplateRequest, CallOptions)

public virtual AsyncUnaryCall<InstanceTemplate> GetAsync(GetInstanceTemplateRequest request, CallOptions options)

Returns the specified instance template.

Parameters
NameDescription
requestGetInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallInstanceTemplate

The call object.

GetAsync(GetInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<InstanceTemplate> GetAsync(GetInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the specified instance template.

Parameters
NameDescription
requestGetInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallInstanceTemplate

The call object.

GetIamPolicy(GetIamPolicyInstanceTemplateRequest, CallOptions)

public virtual Policy GetIamPolicy(GetIamPolicyInstanceTemplateRequest request, CallOptions options)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

GetIamPolicy(GetIamPolicyInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy GetIamPolicy(GetIamPolicyInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Policy

The response received from the server.

GetIamPolicyAsync(GetIamPolicyInstanceTemplateRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyInstanceTemplateRequest request, CallOptions options)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

GetIamPolicyAsync(GetIamPolicyInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

Insert(InsertInstanceTemplateRequest, CallOptions)

public virtual Operation Insert(InsertInstanceTemplateRequest request, CallOptions options)

Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.

Parameters
NameDescription
requestInsertInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

Insert(InsertInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation Insert(InsertInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.

Parameters
NameDescription
requestInsertInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

InsertAsync(InsertInstanceTemplateRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> InsertAsync(InsertInstanceTemplateRequest request, CallOptions options)

Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.

Parameters
NameDescription
requestInsertInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

InsertAsync(InsertInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> InsertAsync(InsertInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.

Parameters
NameDescription
requestInsertInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

List(ListInstanceTemplatesRequest, CallOptions)

public virtual InstanceTemplateList List(ListInstanceTemplatesRequest request, CallOptions options)

Retrieves a list of instance templates that are contained within the specified project.

Parameters
NameDescription
requestListInstanceTemplatesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
InstanceTemplateList

The response received from the server.

List(ListInstanceTemplatesRequest, Metadata, DateTime?, CancellationToken)

public virtual InstanceTemplateList List(ListInstanceTemplatesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves a list of instance templates that are contained within the specified project.

Parameters
NameDescription
requestListInstanceTemplatesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
InstanceTemplateList

The response received from the server.

ListAsync(ListInstanceTemplatesRequest, CallOptions)

public virtual AsyncUnaryCall<InstanceTemplateList> ListAsync(ListInstanceTemplatesRequest request, CallOptions options)

Retrieves a list of instance templates that are contained within the specified project.

Parameters
NameDescription
requestListInstanceTemplatesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallInstanceTemplateList

The call object.

ListAsync(ListInstanceTemplatesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<InstanceTemplateList> ListAsync(ListInstanceTemplatesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves a list of instance templates that are contained within the specified project.

Parameters
NameDescription
requestListInstanceTemplatesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallInstanceTemplateList

The call object.

NewInstance(ClientBaseConfiguration)

protected override InstanceTemplates.InstanceTemplatesClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
InstanceTemplatesInstanceTemplatesClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Compute.V1.InstanceTemplates.InstanceTemplatesClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

SetIamPolicy(SetIamPolicyInstanceTemplateRequest, CallOptions)

public virtual Policy SetIamPolicy(SetIamPolicyInstanceTemplateRequest request, CallOptions options)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

SetIamPolicy(SetIamPolicyInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy SetIamPolicy(SetIamPolicyInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Policy

The response received from the server.

SetIamPolicyAsync(SetIamPolicyInstanceTemplateRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyInstanceTemplateRequest request, CallOptions options)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

SetIamPolicyAsync(SetIamPolicyInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

TestIamPermissions(TestIamPermissionsInstanceTemplateRequest, CallOptions)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsInstanceTemplateRequest request, CallOptions options)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
TestPermissionsResponse

The response received from the server.

TestIamPermissions(TestIamPermissionsInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
TestPermissionsResponse

The response received from the server.

TestIamPermissionsAsync(TestIamPermissionsInstanceTemplateRequest, CallOptions)

public virtual AsyncUnaryCall<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsInstanceTemplateRequest request, CallOptions options)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallTestPermissionsResponse

The call object.

TestIamPermissionsAsync(TestIamPermissionsInstanceTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsInstanceTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsInstanceTemplateRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallTestPermissionsResponse

The call object.