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

public class InstanceTemplatesClient : ClientBase<InstanceTemplates.InstanceTemplatesClient>

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

Client for InstanceTemplates

Inheritance

Object > ClientBase > ClientBase<InstanceTemplates.InstanceTemplatesClient> > 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
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(ClientBase.ClientBaseConfiguration)

protected InstanceTemplatesClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

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
Operations.OperationsClient

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

The call object.

DeleteAsync(DeleteInstanceTemplateRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

The call object.

Get(GetInstanceTemplateRequest, CallOptions)

public virtual InstanceTemplate Get(GetInstanceTemplateRequest request, CallOptions options)

Returns the specified instance template. Gets a list of available instance templates by making a list() request.

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, Nullable<DateTime>, CancellationToken)

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

Returns the specified instance template. Gets a list of available instance templates by making a list() request.

Parameters
NameDescription
requestGetInstanceTemplateRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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. Gets a list of available instance templates by making a list() request.

Parameters
NameDescription
requestGetInstanceTemplateRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<InstanceTemplate>

The call object.

GetAsync(GetInstanceTemplateRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Returns the specified instance template. Gets a list of available instance templates by making a list() request.

Parameters
NameDescription
requestGetInstanceTemplateRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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
AsyncUnaryCall<InstanceTemplate>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

The call object.

GetIamPolicyAsync(GetIamPolicyInstanceTemplateRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

The call object.

InsertAsync(InsertInstanceTemplateRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Operation>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<InstanceTemplateList>

The call object.

ListAsync(ListInstanceTemplatesRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<InstanceTemplateList>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
InstanceTemplates.InstanceTemplatesClient
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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

The call object.

SetIamPolicyAsync(SetIamPolicyInstanceTemplateRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<TestPermissionsResponse>

The call object.

TestIamPermissionsAsync(TestIamPermissionsInstanceTemplateRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<TestPermissionsResponse>

The call object.