Compute Engine v1 API - Class MachineImages.MachineImagesClient (2.9.0)

public class MachineImages.MachineImagesClient : ClientBase<MachineImages.MachineImagesClient>

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

Client for MachineImages

Inheritance

object > ClientBase > ClientBaseMachineImagesMachineImagesClient > MachineImages.MachineImagesClient

Namespace

GoogleCloudGoogle.Cloud.ComputeV1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

MachineImagesClient()

protected MachineImagesClient()

Protected parameterless constructor to allow creation of test doubles.

MachineImagesClient(CallInvoker)

public MachineImagesClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

MachineImagesClient(ChannelBase)

public MachineImagesClient(ChannelBase channel)

Creates a new client for MachineImages

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

MachineImagesClient(ClientBaseConfiguration)

protected MachineImagesClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

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
OperationsOperationsClient

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

Delete(DeleteMachineImageRequest, CallOptions)

public virtual Operation Delete(DeleteMachineImageRequest request, CallOptions options)

Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone.

Parameters
NameDescription
requestDeleteMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

Delete(DeleteMachineImageRequest, Metadata, DateTime?, CancellationToken)

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

Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone.

Parameters
NameDescription
requestDeleteMachineImageRequest

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(DeleteMachineImageRequest, CallOptions)

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

Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone.

Parameters
NameDescription
requestDeleteMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

DeleteAsync(DeleteMachineImageRequest, Metadata, DateTime?, CancellationToken)

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

Deletes the specified machine image. Deleting a machine image is permanent and cannot be undone.

Parameters
NameDescription
requestDeleteMachineImageRequest

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(GetMachineImageRequest, CallOptions)

public virtual MachineImage Get(GetMachineImageRequest request, CallOptions options)

Returns the specified machine image.

Parameters
NameDescription
requestGetMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
MachineImage

The response received from the server.

Get(GetMachineImageRequest, Metadata, DateTime?, CancellationToken)

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

Returns the specified machine image.

Parameters
NameDescription
requestGetMachineImageRequest

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
MachineImage

The response received from the server.

GetAsync(GetMachineImageRequest, CallOptions)

public virtual AsyncUnaryCall<MachineImage> GetAsync(GetMachineImageRequest request, CallOptions options)

Returns the specified machine image.

Parameters
NameDescription
requestGetMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallMachineImage

The call object.

GetAsync(GetMachineImageRequest, Metadata, DateTime?, CancellationToken)

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

Returns the specified machine image.

Parameters
NameDescription
requestGetMachineImageRequest

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
AsyncUnaryCallMachineImage

The call object.

GetIamPolicy(GetIamPolicyMachineImageRequest, CallOptions)

public virtual Policy GetIamPolicy(GetIamPolicyMachineImageRequest request, CallOptions options)

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

Parameters
NameDescription
requestGetIamPolicyMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

GetIamPolicy(GetIamPolicyMachineImageRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy GetIamPolicy(GetIamPolicyMachineImageRequest 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
requestGetIamPolicyMachineImageRequest

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(GetIamPolicyMachineImageRequest, CallOptions)

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

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

Parameters
NameDescription
requestGetIamPolicyMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

GetIamPolicyAsync(GetIamPolicyMachineImageRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyMachineImageRequest 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
requestGetIamPolicyMachineImageRequest

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(InsertMachineImageRequest, CallOptions)

public virtual Operation Insert(InsertMachineImageRequest request, CallOptions options)

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

Parameters
NameDescription
requestInsertMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

Insert(InsertMachineImageRequest, Metadata, DateTime?, CancellationToken)

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

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

Parameters
NameDescription
requestInsertMachineImageRequest

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(InsertMachineImageRequest, CallOptions)

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

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

Parameters
NameDescription
requestInsertMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

InsertAsync(InsertMachineImageRequest, Metadata, DateTime?, CancellationToken)

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

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

Parameters
NameDescription
requestInsertMachineImageRequest

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(ListMachineImagesRequest, CallOptions)

public virtual MachineImageList List(ListMachineImagesRequest request, CallOptions options)

Retrieves a list of machine images that are contained within the specified project.

Parameters
NameDescription
requestListMachineImagesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
MachineImageList

The response received from the server.

List(ListMachineImagesRequest, Metadata, DateTime?, CancellationToken)

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

Retrieves a list of machine images that are contained within the specified project.

Parameters
NameDescription
requestListMachineImagesRequest

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
MachineImageList

The response received from the server.

ListAsync(ListMachineImagesRequest, CallOptions)

public virtual AsyncUnaryCall<MachineImageList> ListAsync(ListMachineImagesRequest request, CallOptions options)

Retrieves a list of machine images that are contained within the specified project.

Parameters
NameDescription
requestListMachineImagesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallMachineImageList

The call object.

ListAsync(ListMachineImagesRequest, Metadata, DateTime?, CancellationToken)

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

Retrieves a list of machine images that are contained within the specified project.

Parameters
NameDescription
requestListMachineImagesRequest

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
AsyncUnaryCallMachineImageList

The call object.

NewInstance(ClientBaseConfiguration)

protected override MachineImages.MachineImagesClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
MachineImagesMachineImagesClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Compute.V1.MachineImages.MachineImagesClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

SetIamPolicy(SetIamPolicyMachineImageRequest, CallOptions)

public virtual Policy SetIamPolicy(SetIamPolicyMachineImageRequest request, CallOptions options)

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

Parameters
NameDescription
requestSetIamPolicyMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

SetIamPolicy(SetIamPolicyMachineImageRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy SetIamPolicy(SetIamPolicyMachineImageRequest 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
requestSetIamPolicyMachineImageRequest

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(SetIamPolicyMachineImageRequest, CallOptions)

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

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

Parameters
NameDescription
requestSetIamPolicyMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

SetIamPolicyAsync(SetIamPolicyMachineImageRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyMachineImageRequest 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
requestSetIamPolicyMachineImageRequest

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(TestIamPermissionsMachineImageRequest, CallOptions)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsMachineImageRequest request, CallOptions options)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
TestPermissionsResponse

The response received from the server.

TestIamPermissions(TestIamPermissionsMachineImageRequest, Metadata, DateTime?, CancellationToken)

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsMachineImageRequest

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(TestIamPermissionsMachineImageRequest, CallOptions)

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallTestPermissionsResponse

The call object.

TestIamPermissionsAsync(TestIamPermissionsMachineImageRequest, Metadata, DateTime?, CancellationToken)

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsMachineImageRequest

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.