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

public class MachineImagesClient : ClientBase<MachineImages.MachineImagesClient>

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

Client for MachineImages

Inheritance

Object > ClientBase > ClientBase<MachineImages.MachineImagesClient> > MachineImages.MachineImagesClient

Namespace

Google.Cloud.Compute.V1

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

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

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

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.

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

The call object.

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

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

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.

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

public virtual MachineImage Get(GetMachineImageRequest request, CallOptions options)

Returns the specified machine image. Gets a list of available machine images by making a list() request.

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

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

Returns the specified machine image. Gets a list of available machine images by making a list() request.

Parameters
NameDescription
requestGetMachineImageRequest

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
MachineImage

The response received from the server.

GetAsync(GetMachineImageRequest, CallOptions)

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

Returns the specified machine image. Gets a list of available machine images by making a list() request.

Parameters
NameDescription
requestGetMachineImageRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<MachineImage>

The call object.

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

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

Returns the specified machine image. Gets a list of available machine images by making a list() request.

Parameters
NameDescription
requestGetMachineImageRequest

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<MachineImage>

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

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

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

The call object.

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

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

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

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

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.

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

The call object.

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

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

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.

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

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

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.

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

The call object.

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

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

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.

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<MachineImageList>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

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

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

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

The call object.

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

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

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

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

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.

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

The call object.

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

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

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.

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.