Compute Engine v1 API - Class InstanceTemplates.InstanceTemplatesClient (2.15.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

Google.Cloud.Compute.V1

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
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

InstanceTemplatesClient(ChannelBase)

public InstanceTemplatesClient(ChannelBase channel)

Creates a new client for InstanceTemplates

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

InstanceTemplatesClient(ClientBaseConfiguration)

protected InstanceTemplatesClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

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. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListInstanceTemplatesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListInstanceTemplatesRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListInstanceTemplatesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListInstanceTemplatesRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Type Description
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
Name Description
request DeleteInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request DeleteInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request DeleteInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request DeleteInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

Get(GetInstanceTemplateRequest, CallOptions)

public virtual InstanceTemplate Get(GetInstanceTemplateRequest request, CallOptions options)

Returns the specified instance template.

Parameters
Name Description
request GetInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request GetInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request GetInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request GetInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request GetIamPolicyInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request GetIamPolicyInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request GetIamPolicyInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request GetIamPolicyInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request InsertInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request InsertInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request InsertInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request InsertInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request ListInstanceTemplatesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request ListInstanceTemplatesRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request ListInstanceTemplatesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request ListInstanceTemplatesRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallInstanceTemplateList

The call object.

NewInstance(ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
InstanceTemplatesInstanceTemplatesClient
Overrides

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
Name Description
request SetIamPolicyInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request SetIamPolicyInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request SetIamPolicyInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request SetIamPolicyInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request TestIamPermissionsInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request TestIamPermissionsInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
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
Name Description
request TestIamPermissionsInstanceTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
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
Name Description
request TestIamPermissionsInstanceTemplateRequest

The request to send to the server.

headers Metadata

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

deadline DateTime

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

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallTestPermissionsResponse

The call object.