Compute Engine v1 API - Class InstanceTemplatesClientImpl (3.1.0)

public sealed class InstanceTemplatesClientImpl : InstanceTemplatesClient

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

InstanceTemplates client wrapper implementation, for convenient use.

Inheritance

object > InstanceTemplatesClient > InstanceTemplatesClientImpl

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The InstanceTemplates API.

Constructors

InstanceTemplatesClientImpl(InstanceTemplatesClient, InstanceTemplatesSettings, ILogger)

public InstanceTemplatesClientImpl(InstanceTemplates.InstanceTemplatesClient grpcClient, InstanceTemplatesSettings settings, ILogger logger)

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

Parameters
Name Description
grpcClient InstanceTemplatesInstanceTemplatesClient

The underlying gRPC client.

settings InstanceTemplatesSettings

The base InstanceTemplatesSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

DeleteOperationsClient

public override OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
Type Description
OperationsClient
Overrides

GrpcClient

public override InstanceTemplates.InstanceTemplatesClient GrpcClient { get; }

The underlying gRPC InstanceTemplates client

Property Value
Type Description
InstanceTemplatesInstanceTemplatesClient
Overrides

InsertOperationsClient

public override OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
Type Description
OperationsClient
Overrides

Methods

AggregatedList(AggregatedListInstanceTemplatesRequest, CallSettings)

public override PagedEnumerable<InstanceTemplateAggregatedList, KeyValuePair<string, InstanceTemplatesScopedList>> AggregatedList(AggregatedListInstanceTemplatesRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableInstanceTemplateAggregatedListKeyValuePairstringInstanceTemplatesScopedList

A pageable sequence of KeyValuePair<TKey, TValue> resources.

Overrides

AggregatedListAsync(AggregatedListInstanceTemplatesRequest, CallSettings)

public override PagedAsyncEnumerable<InstanceTemplateAggregatedList, KeyValuePair<string, InstanceTemplatesScopedList>> AggregatedListAsync(AggregatedListInstanceTemplatesRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableInstanceTemplateAggregatedListKeyValuePairstringInstanceTemplatesScopedList

A pageable asynchronous sequence of KeyValuePair<TKey, TValue> resources.

Overrides

Delete(DeleteInstanceTemplateRequest, CallSettings)

public override Operation<Operation, Operation> Delete(DeleteInstanceTemplateRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Overrides

DeleteAsync(DeleteInstanceTemplateRequest, CallSettings)

public override Task<Operation<Operation, Operation>> DeleteAsync(DeleteInstanceTemplateRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

Get(GetInstanceTemplateRequest, CallSettings)

public override InstanceTemplate Get(GetInstanceTemplateRequest request, CallSettings callSettings = null)

Returns the specified instance template.

Parameters
Name Description
request GetInstanceTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
InstanceTemplate

The RPC response.

Overrides

GetAsync(GetInstanceTemplateRequest, CallSettings)

public override Task<InstanceTemplate> GetAsync(GetInstanceTemplateRequest request, CallSettings callSettings = null)

Returns the specified instance template.

Parameters
Name Description
request GetInstanceTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstanceTemplate

A Task containing the RPC response.

Overrides

GetIamPolicy(GetIamPolicyInstanceTemplateRequest, CallSettings)

public override Policy GetIamPolicy(GetIamPolicyInstanceTemplateRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Overrides

GetIamPolicyAsync(GetIamPolicyInstanceTemplateRequest, CallSettings)

public override Task<Policy> GetIamPolicyAsync(GetIamPolicyInstanceTemplateRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Overrides

Insert(InsertInstanceTemplateRequest, CallSettings)

public override Operation<Operation, Operation> Insert(InsertInstanceTemplateRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOperationOperation

The RPC response.

Overrides

InsertAsync(InsertInstanceTemplateRequest, CallSettings)

public override Task<Operation<Operation, Operation>> InsertAsync(InsertInstanceTemplateRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

List(ListInstanceTemplatesRequest, CallSettings)

public override PagedEnumerable<InstanceTemplateList, InstanceTemplate> List(ListInstanceTemplatesRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request ListInstanceTemplatesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableInstanceTemplateListInstanceTemplate

A pageable sequence of InstanceTemplate resources.

Overrides

ListAsync(ListInstanceTemplatesRequest, CallSettings)

public override PagedAsyncEnumerable<InstanceTemplateList, InstanceTemplate> ListAsync(ListInstanceTemplatesRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request ListInstanceTemplatesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableInstanceTemplateListInstanceTemplate

A pageable asynchronous sequence of InstanceTemplate resources.

Overrides

SetIamPolicy(SetIamPolicyInstanceTemplateRequest, CallSettings)

public override Policy SetIamPolicy(SetIamPolicyInstanceTemplateRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request SetIamPolicyInstanceTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Overrides

SetIamPolicyAsync(SetIamPolicyInstanceTemplateRequest, CallSettings)

public override Task<Policy> SetIamPolicyAsync(SetIamPolicyInstanceTemplateRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request SetIamPolicyInstanceTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Overrides

TestIamPermissions(TestIamPermissionsInstanceTemplateRequest, CallSettings)

public override TestPermissionsResponse TestIamPermissions(TestIamPermissionsInstanceTemplateRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsInstanceTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestPermissionsResponse

The RPC response.

Overrides

TestIamPermissionsAsync(TestIamPermissionsInstanceTemplateRequest, CallSettings)

public override Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsInstanceTemplateRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsInstanceTemplateRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestPermissionsResponse

A Task containing the RPC response.

Overrides