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.MachineImagesClientNamespace
Google.Cloud.Compute.V1Assembly
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 | |
|---|---|
| Name | Description |
callInvoker |
CallInvokerThe callInvoker to use to make remote calls. |
MachineImagesClient(ChannelBase)
public MachineImagesClient(ChannelBase channel)Creates a new client for MachineImages
| Parameter | |
|---|---|
| Name | Description |
channel |
ChannelBaseThe channel to use to make remote calls. |
MachineImagesClient(ClientBaseConfiguration)
protected MachineImagesClient(ClientBase.ClientBaseConfiguration configuration)Protected constructor to allow creation of configured clients.
| Parameter | |
|---|---|
| Name | Description |
configuration |
ClientBaseClientBaseConfigurationThe 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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
DeleteMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
DeleteMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
DeleteMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
DeleteMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallOperation |
The call object. |
Get(GetMachineImageRequest, CallOptions)
public virtual MachineImage Get(GetMachineImageRequest request, CallOptions options)Returns the specified machine image.
| Parameters | |
|---|---|
| Name | Description |
request |
GetMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
GetMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
GetMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
GetMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
GetIamPolicyMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
GetIamPolicyMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
GetIamPolicyMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
GetIamPolicyMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
InsertMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
InsertMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
InsertMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
InsertMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
ListMachineImagesRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
ListMachineImagesRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
ListMachineImagesRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
ListMachineImagesRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallMachineImageList |
The call object. |
NewInstance(ClientBaseConfiguration)
protected override MachineImages.MachineImagesClient NewInstance(ClientBase.ClientBaseConfiguration configuration)Creates a new instance of client from given ClientBaseConfiguration.
| Parameter | |
|---|---|
| Name | Description |
configuration |
ClientBaseClientBaseConfiguration |
| Returns | |
|---|---|
| Type | Description |
MachineImagesMachineImagesClient |
|
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 | |
|---|---|
| Name | Description |
request |
SetIamPolicyMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
SetIamPolicyMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
SetIamPolicyMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
SetIamPolicyMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallPolicy |
The call object. |
SetLabels(SetLabelsMachineImageRequest, CallOptions)
public virtual Operation SetLabels(SetLabelsMachineImageRequest request, CallOptions options)Sets the labels on a machine image. To learn more about labels, read the Labeling Resources documentation.
| Parameters | |
|---|---|
| Name | Description |
request |
SetLabelsMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
Operation |
The response received from the server. |
SetLabels(SetLabelsMachineImageRequest, Metadata, DateTime?, CancellationToken)
public virtual Operation SetLabels(SetLabelsMachineImageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)Sets the labels on a machine image. To learn more about labels, read the Labeling Resources documentation.
| Parameters | |
|---|---|
| Name | Description |
request |
SetLabelsMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
Operation |
The response received from the server. |
SetLabelsAsync(SetLabelsMachineImageRequest, CallOptions)
public virtual AsyncUnaryCall<Operation> SetLabelsAsync(SetLabelsMachineImageRequest request, CallOptions options)Sets the labels on a machine image. To learn more about labels, read the Labeling Resources documentation.
| Parameters | |
|---|---|
| Name | Description |
request |
SetLabelsMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallOperation |
The call object. |
SetLabelsAsync(SetLabelsMachineImageRequest, Metadata, DateTime?, CancellationToken)
public virtual AsyncUnaryCall<Operation> SetLabelsAsync(SetLabelsMachineImageRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)Sets the labels on a machine image. To learn more about labels, read the Labeling Resources documentation.
| Parameters | |
|---|---|
| Name | Description |
request |
SetLabelsMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallOperation |
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 | |
|---|---|
| Name | Description |
request |
TestIamPermissionsMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
TestIamPermissionsMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
TestIamPermissionsMachineImageRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
request |
TestIamPermissionsMachineImageRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallTestPermissionsResponse |
The call object. |