public abstract class InstancesClient
Reference documentation and code samples for the Compute Engine v1 API class InstancesClient.
Instances client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Compute.V1Assembly
Google.Cloud.Compute.V1.dll
Remarks
The Instances API.
Properties
AddAccessConfigOperationsClient
public virtual OperationsClient AddAccessConfigOperationsClient { get; }
The long-running operations client for AddAccessConfig
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
AddResourcePoliciesOperationsClient
public virtual OperationsClient AddResourcePoliciesOperationsClient { get; }
The long-running operations client for AddResourcePolicies
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
AttachDiskOperationsClient
public virtual OperationsClient AttachDiskOperationsClient { get; }
The long-running operations client for AttachDisk
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
BulkInsertOperationsClient
public virtual OperationsClient BulkInsertOperationsClient { get; }
The long-running operations client for BulkInsert
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the Instances service, which is a host of "compute.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default Instances scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default Instances scopes are:
DeleteAccessConfigOperationsClient
public virtual OperationsClient DeleteAccessConfigOperationsClient { get; }
The long-running operations client for DeleteAccessConfig
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteOperationsClient
public virtual OperationsClient DeleteOperationsClient { get; }
The long-running operations client for Delete
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DetachDiskOperationsClient
public virtual OperationsClient DetachDiskOperationsClient { get; }
The long-running operations client for DetachDisk
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual Instances.InstancesClient GrpcClient { get; }
The underlying gRPC Instances client
Property Value | |
---|---|
Type | Description |
InstancesInstancesClient |
InsertOperationsClient
public virtual OperationsClient InsertOperationsClient { get; }
The long-running operations client for Insert
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
RemoveResourcePoliciesOperationsClient
public virtual OperationsClient RemoveResourcePoliciesOperationsClient { get; }
The long-running operations client for RemoveResourcePolicies
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ResetOperationsClient
public virtual OperationsClient ResetOperationsClient { get; }
The long-running operations client for Reset
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ResumeOperationsClient
public virtual OperationsClient ResumeOperationsClient { get; }
The long-running operations client for Resume
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
SetDeletionProtectionOperationsClient
public virtual OperationsClient SetDeletionProtectionOperationsClient { get; }
The long-running operations client for SetDeletionProtection
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetDiskAutoDeleteOperationsClient
public virtual OperationsClient SetDiskAutoDeleteOperationsClient { get; }
The long-running operations client for SetDiskAutoDelete
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetLabelsOperationsClient
public virtual OperationsClient SetLabelsOperationsClient { get; }
The long-running operations client for SetLabels
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetMachineResourcesOperationsClient
public virtual OperationsClient SetMachineResourcesOperationsClient { get; }
The long-running operations client for SetMachineResources
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetMachineTypeOperationsClient
public virtual OperationsClient SetMachineTypeOperationsClient { get; }
The long-running operations client for SetMachineType
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetMetadataOperationsClient
public virtual OperationsClient SetMetadataOperationsClient { get; }
The long-running operations client for SetMetadata
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetMinCpuPlatformOperationsClient
public virtual OperationsClient SetMinCpuPlatformOperationsClient { get; }
The long-running operations client for SetMinCpuPlatform
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetNameOperationsClient
public virtual OperationsClient SetNameOperationsClient { get; }
The long-running operations client for SetName
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetSchedulingOperationsClient
public virtual OperationsClient SetSchedulingOperationsClient { get; }
The long-running operations client for SetScheduling
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetServiceAccountOperationsClient
public virtual OperationsClient SetServiceAccountOperationsClient { get; }
The long-running operations client for SetServiceAccount
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetShieldedInstanceIntegrityPolicyOperationsClient
public virtual OperationsClient SetShieldedInstanceIntegrityPolicyOperationsClient { get; }
The long-running operations client for SetShieldedInstanceIntegrityPolicy
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetTagsOperationsClient
public virtual OperationsClient SetTagsOperationsClient { get; }
The long-running operations client for SetTags
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SimulateMaintenanceEventOperationsClient
public virtual OperationsClient SimulateMaintenanceEventOperationsClient { get; }
The long-running operations client for SimulateMaintenanceEvent
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
StartOperationsClient
public virtual OperationsClient StartOperationsClient { get; }
The long-running operations client for Start
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
StartWithEncryptionKeyOperationsClient
public virtual OperationsClient StartWithEncryptionKeyOperationsClient { get; }
The long-running operations client for StartWithEncryptionKey
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
StopOperationsClient
public virtual OperationsClient StopOperationsClient { get; }
The long-running operations client for Stop
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SuspendOperationsClient
public virtual OperationsClient SuspendOperationsClient { get; }
The long-running operations client for Suspend
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateAccessConfigOperationsClient
public virtual OperationsClient UpdateAccessConfigOperationsClient { get; }
The long-running operations client for UpdateAccessConfig
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateDisplayDeviceOperationsClient
public virtual OperationsClient UpdateDisplayDeviceOperationsClient { get; }
The long-running operations client for UpdateDisplayDevice
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateNetworkInterfaceOperationsClient
public virtual OperationsClient UpdateNetworkInterfaceOperationsClient { get; }
The long-running operations client for UpdateNetworkInterface
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateOperationsClient
public virtual OperationsClient UpdateOperationsClient { get; }
The long-running operations client for Update
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateShieldedInstanceConfigOperationsClient
public virtual OperationsClient UpdateShieldedInstanceConfigOperationsClient { get; }
The long-running operations client for UpdateShieldedInstanceConfig
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
AddAccessConfig(AddAccessConfigInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> AddAccessConfig(AddAccessConfigInstanceRequest request, CallSettings callSettings = null)
Adds an access config to an instance's network interface.
Parameters | |
---|---|
Name | Description |
request | AddAccessConfigInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
AddAccessConfigInstanceRequest request = new AddAccessConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
NetworkInterface = "",
AccessConfigResource = new AccessConfig(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.AddAccessConfig(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceAddAccessConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AddAccessConfig(string, string, string, string, AccessConfig, CallSettings)
public virtual Operation<Operation, Operation> AddAccessConfig(string project, string zone, string instance, string networkInterface, AccessConfig accessConfigResource, CallSettings callSettings = null)
Adds an access config to an instance's network interface.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
networkInterface | string The name of the network interface to add to this instance. |
accessConfigResource | AccessConfig The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
AccessConfig accessConfigResource = new AccessConfig();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.AddAccessConfig(project, zone, instance, networkInterface, accessConfigResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceAddAccessConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AddAccessConfigAsync(AddAccessConfigInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> AddAccessConfigAsync(AddAccessConfigInstanceRequest request, CallSettings callSettings = null)
Adds an access config to an instance's network interface.
Parameters | |
---|---|
Name | Description |
request | AddAccessConfigInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
AddAccessConfigInstanceRequest request = new AddAccessConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
NetworkInterface = "",
AccessConfigResource = new AccessConfig(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AddAccessConfigAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAddAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AddAccessConfigAsync(AddAccessConfigInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> AddAccessConfigAsync(AddAccessConfigInstanceRequest request, CancellationToken cancellationToken)
Adds an access config to an instance's network interface.
Parameters | |
---|---|
Name | Description |
request | AddAccessConfigInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
AddAccessConfigInstanceRequest request = new AddAccessConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
NetworkInterface = "",
AccessConfigResource = new AccessConfig(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AddAccessConfigAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAddAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AddAccessConfigAsync(string, string, string, string, AccessConfig, CallSettings)
public virtual Task<Operation<Operation, Operation>> AddAccessConfigAsync(string project, string zone, string instance, string networkInterface, AccessConfig accessConfigResource, CallSettings callSettings = null)
Adds an access config to an instance's network interface.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
networkInterface | string The name of the network interface to add to this instance. |
accessConfigResource | AccessConfig The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
AccessConfig accessConfigResource = new AccessConfig();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AddAccessConfigAsync(project, zone, instance, networkInterface, accessConfigResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAddAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AddAccessConfigAsync(string, string, string, string, AccessConfig, CancellationToken)
public virtual Task<Operation<Operation, Operation>> AddAccessConfigAsync(string project, string zone, string instance, string networkInterface, AccessConfig accessConfigResource, CancellationToken cancellationToken)
Adds an access config to an instance's network interface.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
networkInterface | string The name of the network interface to add to this instance. |
accessConfigResource | AccessConfig The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
AccessConfig accessConfigResource = new AccessConfig();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AddAccessConfigAsync(project, zone, instance, networkInterface, accessConfigResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAddAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AddResourcePolicies(AddResourcePoliciesInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> AddResourcePolicies(AddResourcePoliciesInstanceRequest request, CallSettings callSettings = null)
Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
Parameters | |
---|---|
Name | Description |
request | AddResourcePoliciesInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
AddResourcePoliciesInstanceRequest request = new AddResourcePoliciesInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesAddResourcePoliciesRequestResource = new InstancesAddResourcePoliciesRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.AddResourcePolicies(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceAddResourcePolicies(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AddResourcePolicies(string, string, string, InstancesAddResourcePoliciesRequest, CallSettings)
public virtual Operation<Operation, Operation> AddResourcePolicies(string project, string zone, string instance, InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource, CallSettings callSettings = null)
Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
instancesAddResourcePoliciesRequestResource | InstancesAddResourcePoliciesRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource = new InstancesAddResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.AddResourcePolicies(project, zone, instance, instancesAddResourcePoliciesRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceAddResourcePolicies(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AddResourcePoliciesAsync(AddResourcePoliciesInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> AddResourcePoliciesAsync(AddResourcePoliciesInstanceRequest request, CallSettings callSettings = null)
Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
Parameters | |
---|---|
Name | Description |
request | AddResourcePoliciesInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
AddResourcePoliciesInstanceRequest request = new AddResourcePoliciesInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesAddResourcePoliciesRequestResource = new InstancesAddResourcePoliciesRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AddResourcePoliciesAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAddResourcePoliciesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AddResourcePoliciesAsync(AddResourcePoliciesInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> AddResourcePoliciesAsync(AddResourcePoliciesInstanceRequest request, CancellationToken cancellationToken)
Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
Parameters | |
---|---|
Name | Description |
request | AddResourcePoliciesInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
AddResourcePoliciesInstanceRequest request = new AddResourcePoliciesInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesAddResourcePoliciesRequestResource = new InstancesAddResourcePoliciesRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AddResourcePoliciesAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAddResourcePoliciesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AddResourcePoliciesAsync(string, string, string, InstancesAddResourcePoliciesRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> AddResourcePoliciesAsync(string project, string zone, string instance, InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource, CallSettings callSettings = null)
Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
instancesAddResourcePoliciesRequestResource | InstancesAddResourcePoliciesRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource = new InstancesAddResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AddResourcePoliciesAsync(project, zone, instance, instancesAddResourcePoliciesRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAddResourcePoliciesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AddResourcePoliciesAsync(string, string, string, InstancesAddResourcePoliciesRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> AddResourcePoliciesAsync(string project, string zone, string instance, InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource, CancellationToken cancellationToken)
Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
instancesAddResourcePoliciesRequestResource | InstancesAddResourcePoliciesRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource = new InstancesAddResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AddResourcePoliciesAsync(project, zone, instance, instancesAddResourcePoliciesRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAddResourcePoliciesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AggregatedList(AggregatedListInstancesRequest, CallSettings)
public virtual PagedEnumerable<InstanceAggregatedList, KeyValuePair<string, InstancesScopedList>> AggregatedList(AggregatedListInstancesRequest request, CallSettings callSettings = null)
Retrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is specified on a project that has a very large number of instances.
Parameters | |
---|---|
Name | Description |
request | AggregatedListInstancesRequest 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 |
PagedEnumerableInstanceAggregatedListKeyValuePairstringInstancesScopedList | A pageable sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
AggregatedListInstancesRequest request = new AggregatedListInstancesRequest
{
OrderBy = "",
Project = "",
Filter = "",
IncludeAllScopes = false,
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<InstanceAggregatedList, KeyValuePair<string, InstancesScopedList>> response = instancesClient.AggregatedList(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (KeyValuePair<string, InstancesScopedList> item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (InstanceAggregatedList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, InstancesScopedList> item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, InstancesScopedList>> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, InstancesScopedList> item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
AggregatedList(string, string, int?, CallSettings)
public virtual PagedEnumerable<InstanceAggregatedList, KeyValuePair<string, InstancesScopedList>> AggregatedList(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is specified on a project that has a very large number of instances.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableInstanceAggregatedListKeyValuePairstringInstancesScopedList | A pageable sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<InstanceAggregatedList, KeyValuePair<string, InstancesScopedList>> response = instancesClient.AggregatedList(project);
// Iterate over all response items, lazily performing RPCs as required
foreach (KeyValuePair<string, InstancesScopedList> item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (InstanceAggregatedList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, InstancesScopedList> item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, InstancesScopedList>> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, InstancesScopedList> item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
AggregatedListAsync(AggregatedListInstancesRequest, CallSettings)
public virtual PagedAsyncEnumerable<InstanceAggregatedList, KeyValuePair<string, InstancesScopedList>> AggregatedListAsync(AggregatedListInstancesRequest request, CallSettings callSettings = null)
Retrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is specified on a project that has a very large number of instances.
Parameters | |
---|---|
Name | Description |
request | AggregatedListInstancesRequest 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 |
PagedAsyncEnumerableInstanceAggregatedListKeyValuePairstringInstancesScopedList | A pageable asynchronous sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
AggregatedListInstancesRequest request = new AggregatedListInstancesRequest
{
OrderBy = "",
Project = "",
Filter = "",
IncludeAllScopes = false,
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<InstanceAggregatedList, KeyValuePair<string, InstancesScopedList>> response = instancesClient.AggregatedListAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((KeyValuePair<string, InstancesScopedList> item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((InstanceAggregatedList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, InstancesScopedList> item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, InstancesScopedList>> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, InstancesScopedList> item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
AggregatedListAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<InstanceAggregatedList, KeyValuePair<string, InstancesScopedList>> AggregatedListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is specified on a project that has a very large number of instances.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableInstanceAggregatedListKeyValuePairstringInstancesScopedList | A pageable asynchronous sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<InstanceAggregatedList, KeyValuePair<string, InstancesScopedList>> response = instancesClient.AggregatedListAsync(project);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((KeyValuePair<string, InstancesScopedList> item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((InstanceAggregatedList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, InstancesScopedList> item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, InstancesScopedList>> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, InstancesScopedList> item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
AttachDisk(AttachDiskInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> AttachDisk(AttachDiskInstanceRequest request, CallSettings callSettings = null)
Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
Parameters | |
---|---|
Name | Description |
request | AttachDiskInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
AttachDiskInstanceRequest request = new AttachDiskInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
AttachedDiskResource = new AttachedDisk(),
ForceAttach = false,
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.AttachDisk(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceAttachDisk(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AttachDisk(string, string, string, AttachedDisk, CallSettings)
public virtual Operation<Operation, Operation> AttachDisk(string project, string zone, string instance, AttachedDisk attachedDiskResource, CallSettings callSettings = null)
Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
attachedDiskResource | AttachedDisk The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
AttachedDisk attachedDiskResource = new AttachedDisk();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.AttachDisk(project, zone, instance, attachedDiskResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceAttachDisk(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AttachDiskAsync(AttachDiskInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> AttachDiskAsync(AttachDiskInstanceRequest request, CallSettings callSettings = null)
Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
Parameters | |
---|---|
Name | Description |
request | AttachDiskInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
AttachDiskInstanceRequest request = new AttachDiskInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
AttachedDiskResource = new AttachedDisk(),
ForceAttach = false,
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AttachDiskAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAttachDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AttachDiskAsync(AttachDiskInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> AttachDiskAsync(AttachDiskInstanceRequest request, CancellationToken cancellationToken)
Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
Parameters | |
---|---|
Name | Description |
request | AttachDiskInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
AttachDiskInstanceRequest request = new AttachDiskInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
AttachedDiskResource = new AttachedDisk(),
ForceAttach = false,
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AttachDiskAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAttachDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AttachDiskAsync(string, string, string, AttachedDisk, CallSettings)
public virtual Task<Operation<Operation, Operation>> AttachDiskAsync(string project, string zone, string instance, AttachedDisk attachedDiskResource, CallSettings callSettings = null)
Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
attachedDiskResource | AttachedDisk The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
AttachedDisk attachedDiskResource = new AttachedDisk();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AttachDiskAsync(project, zone, instance, attachedDiskResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAttachDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
AttachDiskAsync(string, string, string, AttachedDisk, CancellationToken)
public virtual Task<Operation<Operation, Operation>> AttachDiskAsync(string project, string zone, string instance, AttachedDisk attachedDiskResource, CancellationToken cancellationToken)
Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
attachedDiskResource | AttachedDisk The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
AttachedDisk attachedDiskResource = new AttachedDisk();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.AttachDiskAsync(project, zone, instance, attachedDiskResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceAttachDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
BulkInsert(BulkInsertInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> BulkInsert(BulkInsertInstanceRequest request, CallSettings callSettings = null)
Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.
Parameters | |
---|---|
Name | Description |
request | BulkInsertInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
BulkInsertInstanceRequest request = new BulkInsertInstanceRequest
{
Zone = "",
RequestId = "",
BulkInsertInstanceResourceResource = new BulkInsertInstanceResource(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.BulkInsert(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceBulkInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
BulkInsert(string, string, BulkInsertInstanceResource, CallSettings)
public virtual Operation<Operation, Operation> BulkInsert(string project, string zone, BulkInsertInstanceResource bulkInsertInstanceResourceResource, CallSettings callSettings = null)
Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
bulkInsertInstanceResourceResource | BulkInsertInstanceResource The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
BulkInsertInstanceResource bulkInsertInstanceResourceResource = new BulkInsertInstanceResource();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.BulkInsert(project, zone, bulkInsertInstanceResourceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceBulkInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
BulkInsertAsync(BulkInsertInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> BulkInsertAsync(BulkInsertInstanceRequest request, CallSettings callSettings = null)
Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.
Parameters | |
---|---|
Name | Description |
request | BulkInsertInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
BulkInsertInstanceRequest request = new BulkInsertInstanceRequest
{
Zone = "",
RequestId = "",
BulkInsertInstanceResourceResource = new BulkInsertInstanceResource(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.BulkInsertAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceBulkInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
BulkInsertAsync(BulkInsertInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> BulkInsertAsync(BulkInsertInstanceRequest request, CancellationToken cancellationToken)
Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.
Parameters | |
---|---|
Name | Description |
request | BulkInsertInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
BulkInsertInstanceRequest request = new BulkInsertInstanceRequest
{
Zone = "",
RequestId = "",
BulkInsertInstanceResourceResource = new BulkInsertInstanceResource(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.BulkInsertAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceBulkInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
BulkInsertAsync(string, string, BulkInsertInstanceResource, CallSettings)
public virtual Task<Operation<Operation, Operation>> BulkInsertAsync(string project, string zone, BulkInsertInstanceResource bulkInsertInstanceResourceResource, CallSettings callSettings = null)
Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
bulkInsertInstanceResourceResource | BulkInsertInstanceResource The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
BulkInsertInstanceResource bulkInsertInstanceResourceResource = new BulkInsertInstanceResource();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.BulkInsertAsync(project, zone, bulkInsertInstanceResourceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceBulkInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
BulkInsertAsync(string, string, BulkInsertInstanceResource, CancellationToken)
public virtual Task<Operation<Operation, Operation>> BulkInsertAsync(string project, string zone, BulkInsertInstanceResource bulkInsertInstanceResourceResource, CancellationToken cancellationToken)
Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
bulkInsertInstanceResourceResource | BulkInsertInstanceResource The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
BulkInsertInstanceResource bulkInsertInstanceResourceResource = new BulkInsertInstanceResource();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.BulkInsertAsync(project, zone, bulkInsertInstanceResourceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceBulkInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Create()
public static InstancesClient Create()
Synchronously creates a InstancesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use InstancesClientBuilder.
Returns | |
---|---|
Type | Description |
InstancesClient | The created InstancesClient. |
CreateAsync(CancellationToken)
public static Task<InstancesClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a InstancesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use InstancesClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskInstancesClient | The task representing the created InstancesClient. |
Delete(DeleteInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> Delete(DeleteInstanceRequest request, CallSettings callSettings = null)
Deletes the specified Instance resource. For more information, see Deleting an instance.
Parameters | |
---|---|
Name | Description |
request | DeleteInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Delete(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Delete(string, string, string, CallSettings)
public virtual Operation<Operation, Operation> Delete(string project, string zone, string instance, CallSettings callSettings = null)
Deletes the specified Instance resource. For more information, see Deleting an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to delete. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Delete(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAccessConfig(DeleteAccessConfigInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> DeleteAccessConfig(DeleteAccessConfigInstanceRequest request, CallSettings callSettings = null)
Deletes an access config from an instance's network interface.
Parameters | |
---|---|
Name | Description |
request | DeleteAccessConfigInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
DeleteAccessConfigInstanceRequest request = new DeleteAccessConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
AccessConfig = "",
Project = "",
NetworkInterface = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.DeleteAccessConfig(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceDeleteAccessConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAccessConfig(string, string, string, string, string, CallSettings)
public virtual Operation<Operation, Operation> DeleteAccessConfig(string project, string zone, string instance, string accessConfig, string networkInterface, CallSettings callSettings = null)
Deletes an access config from an instance's network interface.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
accessConfig | string The name of the access config to delete. |
networkInterface | string The name of the network interface. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string accessConfig = "";
string networkInterface = "";
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.DeleteAccessConfig(project, zone, instance, accessConfig, networkInterface);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceDeleteAccessConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAccessConfigAsync(DeleteAccessConfigInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> DeleteAccessConfigAsync(DeleteAccessConfigInstanceRequest request, CallSettings callSettings = null)
Deletes an access config from an instance's network interface.
Parameters | |
---|---|
Name | Description |
request | DeleteAccessConfigInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
DeleteAccessConfigInstanceRequest request = new DeleteAccessConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
AccessConfig = "",
Project = "",
NetworkInterface = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DeleteAccessConfigAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDeleteAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAccessConfigAsync(DeleteAccessConfigInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DeleteAccessConfigAsync(DeleteAccessConfigInstanceRequest request, CancellationToken cancellationToken)
Deletes an access config from an instance's network interface.
Parameters | |
---|---|
Name | Description |
request | DeleteAccessConfigInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
DeleteAccessConfigInstanceRequest request = new DeleteAccessConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
AccessConfig = "",
Project = "",
NetworkInterface = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DeleteAccessConfigAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDeleteAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAccessConfigAsync(string, string, string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> DeleteAccessConfigAsync(string project, string zone, string instance, string accessConfig, string networkInterface, CallSettings callSettings = null)
Deletes an access config from an instance's network interface.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
accessConfig | string The name of the access config to delete. |
networkInterface | string The name of the network interface. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string accessConfig = "";
string networkInterface = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DeleteAccessConfigAsync(project, zone, instance, accessConfig, networkInterface);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDeleteAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAccessConfigAsync(string, string, string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DeleteAccessConfigAsync(string project, string zone, string instance, string accessConfig, string networkInterface, CancellationToken cancellationToken)
Deletes an access config from an instance's network interface.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
accessConfig | string The name of the access config to delete. |
networkInterface | string The name of the network interface. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string accessConfig = "";
string networkInterface = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DeleteAccessConfigAsync(project, zone, instance, accessConfig, networkInterface);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDeleteAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAsync(DeleteInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteInstanceRequest request, CallSettings callSettings = null)
Deletes the specified Instance resource. For more information, see Deleting an instance.
Parameters | |
---|---|
Name | Description |
request | DeleteInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DeleteAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAsync(DeleteInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteInstanceRequest request, CancellationToken cancellationToken)
Deletes the specified Instance resource. For more information, see Deleting an instance.
Parameters | |
---|---|
Name | Description |
request | DeleteInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DeleteAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAsync(string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string zone, string instance, CallSettings callSettings = null)
Deletes the specified Instance resource. For more information, see Deleting an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to delete. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DeleteAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAsync(string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Deletes the specified Instance resource. For more information, see Deleting an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to delete. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DeleteAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DetachDisk(DetachDiskInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> DetachDisk(DetachDiskInstanceRequest request, CallSettings callSettings = null)
Detaches a disk from an instance.
Parameters | |
---|---|
Name | Description |
request | DetachDiskInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
DetachDiskInstanceRequest request = new DetachDiskInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
DeviceName = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.DetachDisk(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceDetachDisk(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DetachDisk(string, string, string, string, CallSettings)
public virtual Operation<Operation, Operation> DetachDisk(string project, string zone, string instance, string deviceName, CallSettings callSettings = null)
Detaches a disk from an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Instance name for this request. |
deviceName | string The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string deviceName = "";
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.DetachDisk(project, zone, instance, deviceName);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceDetachDisk(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DetachDiskAsync(DetachDiskInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> DetachDiskAsync(DetachDiskInstanceRequest request, CallSettings callSettings = null)
Detaches a disk from an instance.
Parameters | |
---|---|
Name | Description |
request | DetachDiskInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
DetachDiskInstanceRequest request = new DetachDiskInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
DeviceName = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DetachDiskAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDetachDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DetachDiskAsync(DetachDiskInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DetachDiskAsync(DetachDiskInstanceRequest request, CancellationToken cancellationToken)
Detaches a disk from an instance.
Parameters | |
---|---|
Name | Description |
request | DetachDiskInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
DetachDiskInstanceRequest request = new DetachDiskInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
DeviceName = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DetachDiskAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDetachDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DetachDiskAsync(string, string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> DetachDiskAsync(string project, string zone, string instance, string deviceName, CallSettings callSettings = null)
Detaches a disk from an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Instance name for this request. |
deviceName | string The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string deviceName = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DetachDiskAsync(project, zone, instance, deviceName);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDetachDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DetachDiskAsync(string, string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DetachDiskAsync(string project, string zone, string instance, string deviceName, CancellationToken cancellationToken)
Detaches a disk from an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Instance name for this request. |
deviceName | string The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string deviceName = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.DetachDiskAsync(project, zone, instance, deviceName);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceDetachDiskAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Get(GetInstanceRequest, CallSettings)
public virtual Instance Get(GetInstanceRequest request, CallSettings callSettings = null)
Returns the specified Instance resource.
Parameters | |
---|---|
Name | Description |
request | GetInstanceRequest 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 |
Instance | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
Instance response = instancesClient.Get(request);
Get(string, string, string, CallSettings)
public virtual Instance Get(string project, string zone, string instance, CallSettings callSettings = null)
Returns the specified Instance resource.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to return. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Instance | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
Instance response = instancesClient.Get(project, zone, instance);
GetAsync(GetInstanceRequest, CallSettings)
public virtual Task<Instance> GetAsync(GetInstanceRequest request, CallSettings callSettings = null)
Returns the specified Instance resource.
Parameters | |
---|---|
Name | Description |
request | GetInstanceRequest 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 |
TaskInstance | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
Instance response = await instancesClient.GetAsync(request);
GetAsync(GetInstanceRequest, CancellationToken)
public virtual Task<Instance> GetAsync(GetInstanceRequest request, CancellationToken cancellationToken)
Returns the specified Instance resource.
Parameters | |
---|---|
Name | Description |
request | GetInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskInstance | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
Instance response = await instancesClient.GetAsync(request);
GetAsync(string, string, string, CallSettings)
public virtual Task<Instance> GetAsync(string project, string zone, string instance, CallSettings callSettings = null)
Returns the specified Instance resource.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to return. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskInstance | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
Instance response = await instancesClient.GetAsync(project, zone, instance);
GetAsync(string, string, string, CancellationToken)
public virtual Task<Instance> GetAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Returns the specified Instance resource.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to return. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskInstance | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
Instance response = await instancesClient.GetAsync(project, zone, instance);
GetEffectiveFirewalls(GetEffectiveFirewallsInstanceRequest, CallSettings)
public virtual InstancesGetEffectiveFirewallsResponse GetEffectiveFirewalls(GetEffectiveFirewallsInstanceRequest request, CallSettings callSettings = null)
Returns effective firewalls applied to an interface of the instance.
Parameters | |
---|---|
Name | Description |
request | GetEffectiveFirewallsInstanceRequest 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 |
InstancesGetEffectiveFirewallsResponse | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
GetEffectiveFirewallsInstanceRequest request = new GetEffectiveFirewallsInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
NetworkInterface = "",
};
// Make the request
InstancesGetEffectiveFirewallsResponse response = instancesClient.GetEffectiveFirewalls(request);
GetEffectiveFirewalls(string, string, string, string, CallSettings)
public virtual InstancesGetEffectiveFirewallsResponse GetEffectiveFirewalls(string project, string zone, string instance, string networkInterface, CallSettings callSettings = null)
Returns effective firewalls applied to an interface of the instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
networkInterface | string The name of the network interface to get the effective firewalls. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
InstancesGetEffectiveFirewallsResponse | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
// Make the request
InstancesGetEffectiveFirewallsResponse response = instancesClient.GetEffectiveFirewalls(project, zone, instance, networkInterface);
GetEffectiveFirewallsAsync(GetEffectiveFirewallsInstanceRequest, CallSettings)
public virtual Task<InstancesGetEffectiveFirewallsResponse> GetEffectiveFirewallsAsync(GetEffectiveFirewallsInstanceRequest request, CallSettings callSettings = null)
Returns effective firewalls applied to an interface of the instance.
Parameters | |
---|---|
Name | Description |
request | GetEffectiveFirewallsInstanceRequest 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 |
TaskInstancesGetEffectiveFirewallsResponse | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetEffectiveFirewallsInstanceRequest request = new GetEffectiveFirewallsInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
NetworkInterface = "",
};
// Make the request
InstancesGetEffectiveFirewallsResponse response = await instancesClient.GetEffectiveFirewallsAsync(request);
GetEffectiveFirewallsAsync(GetEffectiveFirewallsInstanceRequest, CancellationToken)
public virtual Task<InstancesGetEffectiveFirewallsResponse> GetEffectiveFirewallsAsync(GetEffectiveFirewallsInstanceRequest request, CancellationToken cancellationToken)
Returns effective firewalls applied to an interface of the instance.
Parameters | |
---|---|
Name | Description |
request | GetEffectiveFirewallsInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskInstancesGetEffectiveFirewallsResponse | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetEffectiveFirewallsInstanceRequest request = new GetEffectiveFirewallsInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
NetworkInterface = "",
};
// Make the request
InstancesGetEffectiveFirewallsResponse response = await instancesClient.GetEffectiveFirewallsAsync(request);
GetEffectiveFirewallsAsync(string, string, string, string, CallSettings)
public virtual Task<InstancesGetEffectiveFirewallsResponse> GetEffectiveFirewallsAsync(string project, string zone, string instance, string networkInterface, CallSettings callSettings = null)
Returns effective firewalls applied to an interface of the instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
networkInterface | string The name of the network interface to get the effective firewalls. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskInstancesGetEffectiveFirewallsResponse | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
// Make the request
InstancesGetEffectiveFirewallsResponse response = await instancesClient.GetEffectiveFirewallsAsync(project, zone, instance, networkInterface);
GetEffectiveFirewallsAsync(string, string, string, string, CancellationToken)
public virtual Task<InstancesGetEffectiveFirewallsResponse> GetEffectiveFirewallsAsync(string project, string zone, string instance, string networkInterface, CancellationToken cancellationToken)
Returns effective firewalls applied to an interface of the instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
networkInterface | string The name of the network interface to get the effective firewalls. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskInstancesGetEffectiveFirewallsResponse | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
// Make the request
InstancesGetEffectiveFirewallsResponse response = await instancesClient.GetEffectiveFirewallsAsync(project, zone, instance, networkInterface);
GetGuestAttributes(GetGuestAttributesInstanceRequest, CallSettings)
public virtual GuestAttributes GetGuestAttributes(GetGuestAttributesInstanceRequest request, CallSettings callSettings = null)
Returns the specified guest attributes entry.
Parameters | |
---|---|
Name | Description |
request | GetGuestAttributesInstanceRequest 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 |
GuestAttributes | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
GetGuestAttributesInstanceRequest request = new GetGuestAttributesInstanceRequest
{
Zone = "",
Instance = "",
VariableKey = "",
Project = "",
QueryPath = "",
};
// Make the request
GuestAttributes response = instancesClient.GetGuestAttributes(request);
GetGuestAttributes(string, string, string, CallSettings)
public virtual GuestAttributes GetGuestAttributes(string project, string zone, string instance, CallSettings callSettings = null)
Returns the specified guest attributes entry.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
GuestAttributes | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
GuestAttributes response = instancesClient.GetGuestAttributes(project, zone, instance);
GetGuestAttributesAsync(GetGuestAttributesInstanceRequest, CallSettings)
public virtual Task<GuestAttributes> GetGuestAttributesAsync(GetGuestAttributesInstanceRequest request, CallSettings callSettings = null)
Returns the specified guest attributes entry.
Parameters | |
---|---|
Name | Description |
request | GetGuestAttributesInstanceRequest 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 |
TaskGuestAttributes | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetGuestAttributesInstanceRequest request = new GetGuestAttributesInstanceRequest
{
Zone = "",
Instance = "",
VariableKey = "",
Project = "",
QueryPath = "",
};
// Make the request
GuestAttributes response = await instancesClient.GetGuestAttributesAsync(request);
GetGuestAttributesAsync(GetGuestAttributesInstanceRequest, CancellationToken)
public virtual Task<GuestAttributes> GetGuestAttributesAsync(GetGuestAttributesInstanceRequest request, CancellationToken cancellationToken)
Returns the specified guest attributes entry.
Parameters | |
---|---|
Name | Description |
request | GetGuestAttributesInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskGuestAttributes | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetGuestAttributesInstanceRequest request = new GetGuestAttributesInstanceRequest
{
Zone = "",
Instance = "",
VariableKey = "",
Project = "",
QueryPath = "",
};
// Make the request
GuestAttributes response = await instancesClient.GetGuestAttributesAsync(request);
GetGuestAttributesAsync(string, string, string, CallSettings)
public virtual Task<GuestAttributes> GetGuestAttributesAsync(string project, string zone, string instance, CallSettings callSettings = null)
Returns the specified guest attributes entry.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskGuestAttributes | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
GuestAttributes response = await instancesClient.GetGuestAttributesAsync(project, zone, instance);
GetGuestAttributesAsync(string, string, string, CancellationToken)
public virtual Task<GuestAttributes> GetGuestAttributesAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Returns the specified guest attributes entry.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskGuestAttributes | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
GuestAttributes response = await instancesClient.GetGuestAttributesAsync(project, zone, instance);
GetIamPolicy(GetIamPolicyInstanceRequest, CallSettings)
public virtual Policy GetIamPolicy(GetIamPolicyInstanceRequest 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 | GetIamPolicyInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
GetIamPolicyInstanceRequest request = new GetIamPolicyInstanceRequest
{
Zone = "",
Resource = "",
Project = "",
OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = instancesClient.GetIamPolicy(request);
GetIamPolicy(string, string, string, CallSettings)
public virtual Policy GetIamPolicy(string project, string zone, string resource, CallSettings callSettings = null)
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
// Make the request
Policy response = instancesClient.GetIamPolicy(project, zone, resource);
GetIamPolicyAsync(GetIamPolicyInstanceRequest, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyInstanceRequest 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 | GetIamPolicyInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyInstanceRequest request = new GetIamPolicyInstanceRequest
{
Zone = "",
Resource = "",
Project = "",
OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await instancesClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(GetIamPolicyInstanceRequest, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyInstanceRequest request, CancellationToken cancellationToken)
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyInstanceRequest request = new GetIamPolicyInstanceRequest
{
Zone = "",
Resource = "",
Project = "",
OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await instancesClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(string, string, string, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(string project, string zone, string resource, CallSettings callSettings = null)
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
// Make the request
Policy response = await instancesClient.GetIamPolicyAsync(project, zone, resource);
GetIamPolicyAsync(string, string, string, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(string project, string zone, string resource, CancellationToken cancellationToken)
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
// Make the request
Policy response = await instancesClient.GetIamPolicyAsync(project, zone, resource);
GetScreenshot(GetScreenshotInstanceRequest, CallSettings)
public virtual Screenshot GetScreenshot(GetScreenshotInstanceRequest request, CallSettings callSettings = null)
Returns the screenshot from the specified instance.
Parameters | |
---|---|
Name | Description |
request | GetScreenshotInstanceRequest 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 |
Screenshot | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
GetScreenshotInstanceRequest request = new GetScreenshotInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
Screenshot response = instancesClient.GetScreenshot(request);
GetScreenshot(string, string, string, CallSettings)
public virtual Screenshot GetScreenshot(string project, string zone, string instance, CallSettings callSettings = null)
Returns the screenshot from the specified instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Screenshot | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
Screenshot response = instancesClient.GetScreenshot(project, zone, instance);
GetScreenshotAsync(GetScreenshotInstanceRequest, CallSettings)
public virtual Task<Screenshot> GetScreenshotAsync(GetScreenshotInstanceRequest request, CallSettings callSettings = null)
Returns the screenshot from the specified instance.
Parameters | |
---|---|
Name | Description |
request | GetScreenshotInstanceRequest 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 |
TaskScreenshot | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetScreenshotInstanceRequest request = new GetScreenshotInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
Screenshot response = await instancesClient.GetScreenshotAsync(request);
GetScreenshotAsync(GetScreenshotInstanceRequest, CancellationToken)
public virtual Task<Screenshot> GetScreenshotAsync(GetScreenshotInstanceRequest request, CancellationToken cancellationToken)
Returns the screenshot from the specified instance.
Parameters | |
---|---|
Name | Description |
request | GetScreenshotInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskScreenshot | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetScreenshotInstanceRequest request = new GetScreenshotInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
Screenshot response = await instancesClient.GetScreenshotAsync(request);
GetScreenshotAsync(string, string, string, CallSettings)
public virtual Task<Screenshot> GetScreenshotAsync(string project, string zone, string instance, CallSettings callSettings = null)
Returns the screenshot from the specified instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskScreenshot | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
Screenshot response = await instancesClient.GetScreenshotAsync(project, zone, instance);
GetScreenshotAsync(string, string, string, CancellationToken)
public virtual Task<Screenshot> GetScreenshotAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Returns the screenshot from the specified instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskScreenshot | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
Screenshot response = await instancesClient.GetScreenshotAsync(project, zone, instance);
GetSerialPortOutput(GetSerialPortOutputInstanceRequest, CallSettings)
public virtual SerialPortOutput GetSerialPortOutput(GetSerialPortOutputInstanceRequest request, CallSettings callSettings = null)
Returns the last 1 MB of serial port output from the specified instance.
Parameters | |
---|---|
Name | Description |
request | GetSerialPortOutputInstanceRequest 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 |
SerialPortOutput | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
GetSerialPortOutputInstanceRequest request = new GetSerialPortOutputInstanceRequest
{
Port = 0,
Zone = "",
Instance = "",
Start = 0L,
Project = "",
};
// Make the request
SerialPortOutput response = instancesClient.GetSerialPortOutput(request);
GetSerialPortOutput(string, string, string, CallSettings)
public virtual SerialPortOutput GetSerialPortOutput(string project, string zone, string instance, CallSettings callSettings = null)
Returns the last 1 MB of serial port output from the specified instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance for this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SerialPortOutput | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
SerialPortOutput response = instancesClient.GetSerialPortOutput(project, zone, instance);
GetSerialPortOutputAsync(GetSerialPortOutputInstanceRequest, CallSettings)
public virtual Task<SerialPortOutput> GetSerialPortOutputAsync(GetSerialPortOutputInstanceRequest request, CallSettings callSettings = null)
Returns the last 1 MB of serial port output from the specified instance.
Parameters | |
---|---|
Name | Description |
request | GetSerialPortOutputInstanceRequest 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 |
TaskSerialPortOutput | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetSerialPortOutputInstanceRequest request = new GetSerialPortOutputInstanceRequest
{
Port = 0,
Zone = "",
Instance = "",
Start = 0L,
Project = "",
};
// Make the request
SerialPortOutput response = await instancesClient.GetSerialPortOutputAsync(request);
GetSerialPortOutputAsync(GetSerialPortOutputInstanceRequest, CancellationToken)
public virtual Task<SerialPortOutput> GetSerialPortOutputAsync(GetSerialPortOutputInstanceRequest request, CancellationToken cancellationToken)
Returns the last 1 MB of serial port output from the specified instance.
Parameters | |
---|---|
Name | Description |
request | GetSerialPortOutputInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSerialPortOutput | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetSerialPortOutputInstanceRequest request = new GetSerialPortOutputInstanceRequest
{
Port = 0,
Zone = "",
Instance = "",
Start = 0L,
Project = "",
};
// Make the request
SerialPortOutput response = await instancesClient.GetSerialPortOutputAsync(request);
GetSerialPortOutputAsync(string, string, string, CallSettings)
public virtual Task<SerialPortOutput> GetSerialPortOutputAsync(string project, string zone, string instance, CallSettings callSettings = null)
Returns the last 1 MB of serial port output from the specified instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance for this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSerialPortOutput | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
SerialPortOutput response = await instancesClient.GetSerialPortOutputAsync(project, zone, instance);
GetSerialPortOutputAsync(string, string, string, CancellationToken)
public virtual Task<SerialPortOutput> GetSerialPortOutputAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Returns the last 1 MB of serial port output from the specified instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance for this request. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSerialPortOutput | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
SerialPortOutput response = await instancesClient.GetSerialPortOutputAsync(project, zone, instance);
GetShieldedInstanceIdentity(GetShieldedInstanceIdentityInstanceRequest, CallSettings)
public virtual ShieldedInstanceIdentity GetShieldedInstanceIdentity(GetShieldedInstanceIdentityInstanceRequest request, CallSettings callSettings = null)
Returns the Shielded Instance Identity of an instance
Parameters | |
---|---|
Name | Description |
request | GetShieldedInstanceIdentityInstanceRequest 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 |
ShieldedInstanceIdentity | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
GetShieldedInstanceIdentityInstanceRequest request = new GetShieldedInstanceIdentityInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
ShieldedInstanceIdentity response = instancesClient.GetShieldedInstanceIdentity(request);
GetShieldedInstanceIdentity(string, string, string, CallSettings)
public virtual ShieldedInstanceIdentity GetShieldedInstanceIdentity(string project, string zone, string instance, CallSettings callSettings = null)
Returns the Shielded Instance Identity of an instance
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name or id of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ShieldedInstanceIdentity | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
ShieldedInstanceIdentity response = instancesClient.GetShieldedInstanceIdentity(project, zone, instance);
GetShieldedInstanceIdentityAsync(GetShieldedInstanceIdentityInstanceRequest, CallSettings)
public virtual Task<ShieldedInstanceIdentity> GetShieldedInstanceIdentityAsync(GetShieldedInstanceIdentityInstanceRequest request, CallSettings callSettings = null)
Returns the Shielded Instance Identity of an instance
Parameters | |
---|---|
Name | Description |
request | GetShieldedInstanceIdentityInstanceRequest 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 |
TaskShieldedInstanceIdentity | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetShieldedInstanceIdentityInstanceRequest request = new GetShieldedInstanceIdentityInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
ShieldedInstanceIdentity response = await instancesClient.GetShieldedInstanceIdentityAsync(request);
GetShieldedInstanceIdentityAsync(GetShieldedInstanceIdentityInstanceRequest, CancellationToken)
public virtual Task<ShieldedInstanceIdentity> GetShieldedInstanceIdentityAsync(GetShieldedInstanceIdentityInstanceRequest request, CancellationToken cancellationToken)
Returns the Shielded Instance Identity of an instance
Parameters | |
---|---|
Name | Description |
request | GetShieldedInstanceIdentityInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskShieldedInstanceIdentity | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
GetShieldedInstanceIdentityInstanceRequest request = new GetShieldedInstanceIdentityInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
ShieldedInstanceIdentity response = await instancesClient.GetShieldedInstanceIdentityAsync(request);
GetShieldedInstanceIdentityAsync(string, string, string, CallSettings)
public virtual Task<ShieldedInstanceIdentity> GetShieldedInstanceIdentityAsync(string project, string zone, string instance, CallSettings callSettings = null)
Returns the Shielded Instance Identity of an instance
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name or id of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskShieldedInstanceIdentity | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
ShieldedInstanceIdentity response = await instancesClient.GetShieldedInstanceIdentityAsync(project, zone, instance);
GetShieldedInstanceIdentityAsync(string, string, string, CancellationToken)
public virtual Task<ShieldedInstanceIdentity> GetShieldedInstanceIdentityAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Returns the Shielded Instance Identity of an instance
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name or id of the instance scoping this request. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskShieldedInstanceIdentity | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
ShieldedInstanceIdentity response = await instancesClient.GetShieldedInstanceIdentityAsync(project, zone, instance);
Insert(InsertInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> Insert(InsertInstanceRequest request, CallSettings callSettings = null)
Creates an instance resource in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
request | InsertInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
InsertInstanceRequest request = new InsertInstanceRequest
{
Zone = "",
SourceMachineImage = "",
RequestId = "",
InstanceResource = new Instance(),
Project = "",
SourceInstanceTemplate = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Insert(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Insert(string, string, Instance, CallSettings)
public virtual Operation<Operation, Operation> Insert(string project, string zone, Instance instanceResource, CallSettings callSettings = null)
Creates an instance resource in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instanceResource | Instance The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
Instance instanceResource = new Instance();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Insert(project, zone, instanceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
InsertAsync(InsertInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertInstanceRequest request, CallSettings callSettings = null)
Creates an instance resource in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
request | InsertInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
InsertInstanceRequest request = new InsertInstanceRequest
{
Zone = "",
SourceMachineImage = "",
RequestId = "",
InstanceResource = new Instance(),
Project = "",
SourceInstanceTemplate = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.InsertAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
InsertAsync(InsertInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertInstanceRequest request, CancellationToken cancellationToken)
Creates an instance resource in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
request | InsertInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
InsertInstanceRequest request = new InsertInstanceRequest
{
Zone = "",
SourceMachineImage = "",
RequestId = "",
InstanceResource = new Instance(),
Project = "",
SourceInstanceTemplate = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.InsertAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
InsertAsync(string, string, Instance, CallSettings)
public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string zone, Instance instanceResource, CallSettings callSettings = null)
Creates an instance resource in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instanceResource | Instance The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
Instance instanceResource = new Instance();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.InsertAsync(project, zone, instanceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
InsertAsync(string, string, Instance, CancellationToken)
public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string zone, Instance instanceResource, CancellationToken cancellationToken)
Creates an instance resource in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instanceResource | Instance The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
Instance instanceResource = new Instance();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.InsertAsync(project, zone, instanceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
List(ListInstancesRequest, CallSettings)
public virtual PagedEnumerable<InstanceList, Instance> List(ListInstancesRequest request, CallSettings callSettings = null)
Retrieves the list of instances contained within the specified zone.
Parameters | |
---|---|
Name | Description |
request | ListInstancesRequest 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 |
PagedEnumerableInstanceListInstance | A pageable sequence of Instance resources. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest
{
Zone = "",
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<InstanceList, Instance> response = instancesClient.List(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Instance item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (InstanceList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Instance item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Instance> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Instance item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
List(string, string, string, int?, CallSettings)
public virtual PagedEnumerable<InstanceList, Instance> List(string project, string zone, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves the list of instances contained within the specified zone.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableInstanceListInstance | A pageable sequence of Instance resources. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedEnumerable<InstanceList, Instance> response = instancesClient.List(project, zone);
// Iterate over all response items, lazily performing RPCs as required
foreach (Instance item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (InstanceList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Instance item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Instance> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Instance item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAsync(ListInstancesRequest, CallSettings)
public virtual PagedAsyncEnumerable<InstanceList, Instance> ListAsync(ListInstancesRequest request, CallSettings callSettings = null)
Retrieves the list of instances contained within the specified zone.
Parameters | |
---|---|
Name | Description |
request | ListInstancesRequest 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 |
PagedAsyncEnumerableInstanceListInstance | A pageable asynchronous sequence of Instance resources. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest
{
Zone = "",
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<InstanceList, Instance> response = instancesClient.ListAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Instance item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((InstanceList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Instance item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Instance> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Instance item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAsync(string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<InstanceList, Instance> ListAsync(string project, string zone, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves the list of instances contained within the specified zone.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableInstanceListInstance | A pageable asynchronous sequence of Instance resources. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedAsyncEnumerable<InstanceList, Instance> response = instancesClient.ListAsync(project, zone);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Instance item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((InstanceList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Instance item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Instance> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Instance item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListReferrers(ListReferrersInstancesRequest, CallSettings)
public virtual PagedEnumerable<InstanceListReferrers, Reference> ListReferrers(ListReferrersInstancesRequest request, CallSettings callSettings = null)
Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.
Parameters | |
---|---|
Name | Description |
request | ListReferrersInstancesRequest 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 |
PagedEnumerableInstanceListReferrersReference | A pageable sequence of Reference resources. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
ListReferrersInstancesRequest request = new ListReferrersInstancesRequest
{
Zone = "",
Instance = "",
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<InstanceListReferrers, Reference> response = instancesClient.ListReferrers(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Reference item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (InstanceListReferrers page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Reference item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Reference> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Reference item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListReferrers(string, string, string, string, int?, CallSettings)
public virtual PagedEnumerable<InstanceListReferrers, Reference> ListReferrers(string project, string zone, string instance, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableInstanceListReferrersReference | A pageable sequence of Reference resources. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
PagedEnumerable<InstanceListReferrers, Reference> response = instancesClient.ListReferrers(project, zone, instance);
// Iterate over all response items, lazily performing RPCs as required
foreach (Reference item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (InstanceListReferrers page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Reference item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Reference> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Reference item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListReferrersAsync(ListReferrersInstancesRequest, CallSettings)
public virtual PagedAsyncEnumerable<InstanceListReferrers, Reference> ListReferrersAsync(ListReferrersInstancesRequest request, CallSettings callSettings = null)
Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.
Parameters | |
---|---|
Name | Description |
request | ListReferrersInstancesRequest 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 |
PagedAsyncEnumerableInstanceListReferrersReference | A pageable asynchronous sequence of Reference resources. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
ListReferrersInstancesRequest request = new ListReferrersInstancesRequest
{
Zone = "",
Instance = "",
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<InstanceListReferrers, Reference> response = instancesClient.ListReferrersAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Reference item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((InstanceListReferrers page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Reference item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Reference> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Reference item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListReferrersAsync(string, string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<InstanceListReferrers, Reference> ListReferrersAsync(string project, string zone, string instance, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableInstanceListReferrersReference | A pageable asynchronous sequence of Reference resources. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
PagedAsyncEnumerable<InstanceListReferrers, Reference> response = instancesClient.ListReferrersAsync(project, zone, instance);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Reference item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((InstanceListReferrers page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Reference item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Reference> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Reference item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
PollOnceAddAccessConfig(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceAddAccessConfig(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of AddAccessConfig
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceAddAccessConfigAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceAddAccessConfigAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
AddAccessConfig
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceAddResourcePolicies(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceAddResourcePolicies(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of AddResourcePolicies
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceAddResourcePoliciesAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceAddResourcePoliciesAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
AddResourcePolicies
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceAttachDisk(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceAttachDisk(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of AttachDisk
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceAttachDiskAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceAttachDiskAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
AttachDisk
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceBulkInsert(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceBulkInsert(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of BulkInsert
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceBulkInsertAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceBulkInsertAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
BulkInsert
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceDelete(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceDelete(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Delete
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceDeleteAccessConfig(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceDeleteAccessConfig(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteAccessConfig
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceDeleteAccessConfigAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceDeleteAccessConfigAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteAccessConfig
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceDeleteAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceDeleteAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Delete
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceDetachDisk(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceDetachDisk(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DetachDisk
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceDetachDiskAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceDetachDiskAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DetachDisk
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceInsert(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceInsert(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Insert
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceInsertAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceInsertAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Insert
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceRemoveResourcePolicies(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceRemoveResourcePolicies(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
RemoveResourcePolicies
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceRemoveResourcePoliciesAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceRemoveResourcePoliciesAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
RemoveResourcePolicies
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceReset(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceReset(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Reset
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceResetAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceResetAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Reset
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceResume(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceResume(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Resume
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceResumeAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceResumeAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Resume
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetDeletionProtection(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetDeletionProtection(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SetDeletionProtection
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetDeletionProtectionAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetDeletionProtectionAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetDeletionProtection
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetDiskAutoDelete(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetDiskAutoDelete(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SetDiskAutoDelete
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetDiskAutoDeleteAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetDiskAutoDeleteAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetDiskAutoDelete
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetLabels(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetLabels(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SetLabels
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetLabelsAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetLabelsAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetLabels
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetMachineResources(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetMachineResources(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SetMachineResources
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetMachineResourcesAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetMachineResourcesAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetMachineResources
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetMachineType(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetMachineType(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SetMachineType
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetMachineTypeAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetMachineTypeAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetMachineType
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetMetadata(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetMetadata(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SetMetadata
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetMetadataAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetMetadataAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetMetadata
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetMinCpuPlatform(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetMinCpuPlatform(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SetMinCpuPlatform
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetMinCpuPlatformAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetMinCpuPlatformAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetMinCpuPlatform
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetName(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetName(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SetName
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetNameAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetNameAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetName
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetScheduling(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetScheduling(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SetScheduling
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetSchedulingAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetSchedulingAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetScheduling
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetServiceAccount(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetServiceAccount(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SetServiceAccount
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetServiceAccountAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetServiceAccountAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetServiceAccount
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetShieldedInstanceIntegrityPolicy(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetShieldedInstanceIntegrityPolicy(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
SetShieldedInstanceIntegrityPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetShieldedInstanceIntegrityPolicyAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetShieldedInstanceIntegrityPolicyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetShieldedInstanceIntegrityPolicy
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSetTags(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSetTags(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of SetTags
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSetTagsAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSetTagsAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SetTags
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSimulateMaintenanceEvent(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSimulateMaintenanceEvent(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
SimulateMaintenanceEvent
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSimulateMaintenanceEventAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSimulateMaintenanceEventAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
SimulateMaintenanceEvent
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceStart(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceStart(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Start
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceStartAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceStartAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Start
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceStartWithEncryptionKey(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceStartWithEncryptionKey(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
StartWithEncryptionKey
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceStartWithEncryptionKeyAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceStartWithEncryptionKeyAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
StartWithEncryptionKey
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceStop(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceStop(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Stop
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceStopAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceStopAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Stop
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceSuspend(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceSuspend(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Suspend
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceSuspendAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceSuspendAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
Suspend
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceUpdate(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceUpdate(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Update
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceUpdateAccessConfig(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceUpdateAccessConfig(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateAccessConfig
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceUpdateAccessConfigAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceUpdateAccessConfigAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateAccessConfig
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceUpdateAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceUpdateAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Update
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceUpdateDisplayDevice(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceUpdateDisplayDevice(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateDisplayDevice
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceUpdateDisplayDeviceAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceUpdateDisplayDeviceAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateDisplayDevice
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceUpdateNetworkInterface(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceUpdateNetworkInterface(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
UpdateNetworkInterface
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceUpdateNetworkInterfaceAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceUpdateNetworkInterfaceAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateNetworkInterface
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
PollOnceUpdateShieldedInstanceConfig(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceUpdateShieldedInstanceConfig(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
UpdateShieldedInstanceConfig
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The result of polling the operation. |
PollOnceUpdateShieldedInstanceConfigAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceUpdateShieldedInstanceConfigAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateShieldedInstanceConfig
.
Parameters | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A task representing the result of polling the operation. |
RemoveResourcePolicies(RemoveResourcePoliciesInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> RemoveResourcePolicies(RemoveResourcePoliciesInstanceRequest request, CallSettings callSettings = null)
Removes resource policies from an instance.
Parameters | |
---|---|
Name | Description |
request | RemoveResourcePoliciesInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
RemoveResourcePoliciesInstanceRequest request = new RemoveResourcePoliciesInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesRemoveResourcePoliciesRequestResource = new InstancesRemoveResourcePoliciesRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.RemoveResourcePolicies(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceRemoveResourcePolicies(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
RemoveResourcePolicies(string, string, string, InstancesRemoveResourcePoliciesRequest, CallSettings)
public virtual Operation<Operation, Operation> RemoveResourcePolicies(string project, string zone, string instance, InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource, CallSettings callSettings = null)
Removes resource policies from an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
instancesRemoveResourcePoliciesRequestResource | InstancesRemoveResourcePoliciesRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource = new InstancesRemoveResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.RemoveResourcePolicies(project, zone, instance, instancesRemoveResourcePoliciesRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceRemoveResourcePolicies(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
RemoveResourcePoliciesAsync(RemoveResourcePoliciesInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> RemoveResourcePoliciesAsync(RemoveResourcePoliciesInstanceRequest request, CallSettings callSettings = null)
Removes resource policies from an instance.
Parameters | |
---|---|
Name | Description |
request | RemoveResourcePoliciesInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
RemoveResourcePoliciesInstanceRequest request = new RemoveResourcePoliciesInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesRemoveResourcePoliciesRequestResource = new InstancesRemoveResourcePoliciesRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.RemoveResourcePoliciesAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceRemoveResourcePoliciesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
RemoveResourcePoliciesAsync(RemoveResourcePoliciesInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> RemoveResourcePoliciesAsync(RemoveResourcePoliciesInstanceRequest request, CancellationToken cancellationToken)
Removes resource policies from an instance.
Parameters | |
---|---|
Name | Description |
request | RemoveResourcePoliciesInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
RemoveResourcePoliciesInstanceRequest request = new RemoveResourcePoliciesInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesRemoveResourcePoliciesRequestResource = new InstancesRemoveResourcePoliciesRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.RemoveResourcePoliciesAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceRemoveResourcePoliciesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
RemoveResourcePoliciesAsync(string, string, string, InstancesRemoveResourcePoliciesRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> RemoveResourcePoliciesAsync(string project, string zone, string instance, InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource, CallSettings callSettings = null)
Removes resource policies from an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
instancesRemoveResourcePoliciesRequestResource | InstancesRemoveResourcePoliciesRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource = new InstancesRemoveResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.RemoveResourcePoliciesAsync(project, zone, instance, instancesRemoveResourcePoliciesRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceRemoveResourcePoliciesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
RemoveResourcePoliciesAsync(string, string, string, InstancesRemoveResourcePoliciesRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> RemoveResourcePoliciesAsync(string project, string zone, string instance, InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource, CancellationToken cancellationToken)
Removes resource policies from an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
instancesRemoveResourcePoliciesRequestResource | InstancesRemoveResourcePoliciesRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource = new InstancesRemoveResourcePoliciesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.RemoveResourcePoliciesAsync(project, zone, instance, instancesRemoveResourcePoliciesRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceRemoveResourcePoliciesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Reset(ResetInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> Reset(ResetInstanceRequest request, CallSettings callSettings = null)
Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.
Parameters | |
---|---|
Name | Description |
request | ResetInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
ResetInstanceRequest request = new ResetInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Reset(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceReset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Reset(string, string, string, CallSettings)
public virtual Operation<Operation, Operation> Reset(string project, string zone, string instance, CallSettings callSettings = null)
Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Reset(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceReset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResetAsync(ResetInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> ResetAsync(ResetInstanceRequest request, CallSettings callSettings = null)
Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.
Parameters | |
---|---|
Name | Description |
request | ResetInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
ResetInstanceRequest request = new ResetInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.ResetAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceResetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResetAsync(ResetInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> ResetAsync(ResetInstanceRequest request, CancellationToken cancellationToken)
Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.
Parameters | |
---|---|
Name | Description |
request | ResetInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
ResetInstanceRequest request = new ResetInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.ResetAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceResetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResetAsync(string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> ResetAsync(string project, string zone, string instance, CallSettings callSettings = null)
Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.ResetAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceResetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResetAsync(string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> ResetAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.ResetAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceResetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Resume(ResumeInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> Resume(ResumeInstanceRequest request, CallSettings callSettings = null)
Resumes an instance that was suspended using the instances().suspend method.
Parameters | |
---|---|
Name | Description |
request | ResumeInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
ResumeInstanceRequest request = new ResumeInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Resume(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceResume(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Resume(string, string, string, CallSettings)
public virtual Operation<Operation, Operation> Resume(string project, string zone, string instance, CallSettings callSettings = null)
Resumes an instance that was suspended using the instances().suspend method.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to resume. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Resume(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceResume(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResumeAsync(ResumeInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> ResumeAsync(ResumeInstanceRequest request, CallSettings callSettings = null)
Resumes an instance that was suspended using the instances().suspend method.
Parameters | |
---|---|
Name | Description |
request | ResumeInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
ResumeInstanceRequest request = new ResumeInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.ResumeAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceResumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResumeAsync(ResumeInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> ResumeAsync(ResumeInstanceRequest request, CancellationToken cancellationToken)
Resumes an instance that was suspended using the instances().suspend method.
Parameters | |
---|---|
Name | Description |
request | ResumeInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
ResumeInstanceRequest request = new ResumeInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.ResumeAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceResumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResumeAsync(string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> ResumeAsync(string project, string zone, string instance, CallSettings callSettings = null)
Resumes an instance that was suspended using the instances().suspend method.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to resume. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.ResumeAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceResumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResumeAsync(string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> ResumeAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Resumes an instance that was suspended using the instances().suspend method.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to resume. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.ResumeAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceResumeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SendDiagnosticInterrupt(SendDiagnosticInterruptInstanceRequest, CallSettings)
public virtual SendDiagnosticInterruptInstanceResponse SendDiagnosticInterrupt(SendDiagnosticInterruptInstanceRequest request, CallSettings callSettings = null)
Sends diagnostic interrupt to the instance.
Parameters | |
---|---|
Name | Description |
request | SendDiagnosticInterruptInstanceRequest 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 |
SendDiagnosticInterruptInstanceResponse | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SendDiagnosticInterruptInstanceRequest request = new SendDiagnosticInterruptInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
SendDiagnosticInterruptInstanceResponse response = instancesClient.SendDiagnosticInterrupt(request);
SendDiagnosticInterrupt(string, string, string, CallSettings)
public virtual SendDiagnosticInterruptInstanceResponse SendDiagnosticInterrupt(string project, string zone, string instance, CallSettings callSettings = null)
Sends diagnostic interrupt to the instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
SendDiagnosticInterruptInstanceResponse | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
SendDiagnosticInterruptInstanceResponse response = instancesClient.SendDiagnosticInterrupt(project, zone, instance);
SendDiagnosticInterruptAsync(SendDiagnosticInterruptInstanceRequest, CallSettings)
public virtual Task<SendDiagnosticInterruptInstanceResponse> SendDiagnosticInterruptAsync(SendDiagnosticInterruptInstanceRequest request, CallSettings callSettings = null)
Sends diagnostic interrupt to the instance.
Parameters | |
---|---|
Name | Description |
request | SendDiagnosticInterruptInstanceRequest 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 |
TaskSendDiagnosticInterruptInstanceResponse | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SendDiagnosticInterruptInstanceRequest request = new SendDiagnosticInterruptInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
SendDiagnosticInterruptInstanceResponse response = await instancesClient.SendDiagnosticInterruptAsync(request);
SendDiagnosticInterruptAsync(SendDiagnosticInterruptInstanceRequest, CancellationToken)
public virtual Task<SendDiagnosticInterruptInstanceResponse> SendDiagnosticInterruptAsync(SendDiagnosticInterruptInstanceRequest request, CancellationToken cancellationToken)
Sends diagnostic interrupt to the instance.
Parameters | |
---|---|
Name | Description |
request | SendDiagnosticInterruptInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSendDiagnosticInterruptInstanceResponse | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SendDiagnosticInterruptInstanceRequest request = new SendDiagnosticInterruptInstanceRequest
{
Zone = "",
Instance = "",
Project = "",
};
// Make the request
SendDiagnosticInterruptInstanceResponse response = await instancesClient.SendDiagnosticInterruptAsync(request);
SendDiagnosticInterruptAsync(string, string, string, CallSettings)
public virtual Task<SendDiagnosticInterruptInstanceResponse> SendDiagnosticInterruptAsync(string project, string zone, string instance, CallSettings callSettings = null)
Sends diagnostic interrupt to the instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSendDiagnosticInterruptInstanceResponse | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
SendDiagnosticInterruptInstanceResponse response = await instancesClient.SendDiagnosticInterruptAsync(project, zone, instance);
SendDiagnosticInterruptAsync(string, string, string, CancellationToken)
public virtual Task<SendDiagnosticInterruptInstanceResponse> SendDiagnosticInterruptAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Sends diagnostic interrupt to the instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskSendDiagnosticInterruptInstanceResponse | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
SendDiagnosticInterruptInstanceResponse response = await instancesClient.SendDiagnosticInterruptAsync(project, zone, instance);
SetDeletionProtection(SetDeletionProtectionInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetDeletionProtection(SetDeletionProtectionInstanceRequest request, CallSettings callSettings = null)
Sets deletion protection on the instance.
Parameters | |
---|---|
Name | Description |
request | SetDeletionProtectionInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetDeletionProtectionInstanceRequest request = new SetDeletionProtectionInstanceRequest
{
Zone = "",
RequestId = "",
Resource = "",
Project = "",
DeletionProtection = false,
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetDeletionProtection(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetDeletionProtection(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetDeletionProtection(string, string, string, CallSettings)
public virtual Operation<Operation, Operation> SetDeletionProtection(string project, string zone, string resource, CallSettings callSettings = null)
Sets deletion protection on the instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetDeletionProtection(project, zone, resource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetDeletionProtection(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetDeletionProtectionAsync(SetDeletionProtectionInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetDeletionProtectionAsync(SetDeletionProtectionInstanceRequest request, CallSettings callSettings = null)
Sets deletion protection on the instance.
Parameters | |
---|---|
Name | Description |
request | SetDeletionProtectionInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetDeletionProtectionInstanceRequest request = new SetDeletionProtectionInstanceRequest
{
Zone = "",
RequestId = "",
Resource = "",
Project = "",
DeletionProtection = false,
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetDeletionProtectionAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetDeletionProtectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetDeletionProtectionAsync(SetDeletionProtectionInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetDeletionProtectionAsync(SetDeletionProtectionInstanceRequest request, CancellationToken cancellationToken)
Sets deletion protection on the instance.
Parameters | |
---|---|
Name | Description |
request | SetDeletionProtectionInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetDeletionProtectionInstanceRequest request = new SetDeletionProtectionInstanceRequest
{
Zone = "",
RequestId = "",
Resource = "",
Project = "",
DeletionProtection = false,
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetDeletionProtectionAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetDeletionProtectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetDeletionProtectionAsync(string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetDeletionProtectionAsync(string project, string zone, string resource, CallSettings callSettings = null)
Sets deletion protection on the instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetDeletionProtectionAsync(project, zone, resource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetDeletionProtectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetDeletionProtectionAsync(string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetDeletionProtectionAsync(string project, string zone, string resource, CancellationToken cancellationToken)
Sets deletion protection on the instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetDeletionProtectionAsync(project, zone, resource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetDeletionProtectionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetDiskAutoDelete(SetDiskAutoDeleteInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetDiskAutoDelete(SetDiskAutoDeleteInstanceRequest request, CallSettings callSettings = null)
Sets the auto-delete flag for a disk attached to an instance.
Parameters | |
---|---|
Name | Description |
request | SetDiskAutoDeleteInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetDiskAutoDeleteInstanceRequest request = new SetDiskAutoDeleteInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
DeviceName = "",
Project = "",
AutoDelete = false,
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetDiskAutoDelete(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetDiskAutoDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetDiskAutoDelete(string, string, string, bool, string, CallSettings)
public virtual Operation<Operation, Operation> SetDiskAutoDelete(string project, string zone, string instance, bool autoDelete, string deviceName, CallSettings callSettings = null)
Sets the auto-delete flag for a disk attached to an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
autoDelete | bool Whether to auto-delete the disk when the instance is deleted. |
deviceName | string The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
bool autoDelete = false;
string deviceName = "";
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetDiskAutoDelete(project, zone, instance, autoDelete, deviceName);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetDiskAutoDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetDiskAutoDeleteAsync(SetDiskAutoDeleteInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetDiskAutoDeleteAsync(SetDiskAutoDeleteInstanceRequest request, CallSettings callSettings = null)
Sets the auto-delete flag for a disk attached to an instance.
Parameters | |
---|---|
Name | Description |
request | SetDiskAutoDeleteInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetDiskAutoDeleteInstanceRequest request = new SetDiskAutoDeleteInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
DeviceName = "",
Project = "",
AutoDelete = false,
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetDiskAutoDeleteAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetDiskAutoDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetDiskAutoDeleteAsync(SetDiskAutoDeleteInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetDiskAutoDeleteAsync(SetDiskAutoDeleteInstanceRequest request, CancellationToken cancellationToken)
Sets the auto-delete flag for a disk attached to an instance.
Parameters | |
---|---|
Name | Description |
request | SetDiskAutoDeleteInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetDiskAutoDeleteInstanceRequest request = new SetDiskAutoDeleteInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
DeviceName = "",
Project = "",
AutoDelete = false,
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetDiskAutoDeleteAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetDiskAutoDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetDiskAutoDeleteAsync(string, string, string, bool, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetDiskAutoDeleteAsync(string project, string zone, string instance, bool autoDelete, string deviceName, CallSettings callSettings = null)
Sets the auto-delete flag for a disk attached to an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
autoDelete | bool Whether to auto-delete the disk when the instance is deleted. |
deviceName | string The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
bool autoDelete = false;
string deviceName = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetDiskAutoDeleteAsync(project, zone, instance, autoDelete, deviceName);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetDiskAutoDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetDiskAutoDeleteAsync(string, string, string, bool, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetDiskAutoDeleteAsync(string project, string zone, string instance, bool autoDelete, string deviceName, CancellationToken cancellationToken)
Sets the auto-delete flag for a disk attached to an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
autoDelete | bool Whether to auto-delete the disk when the instance is deleted. |
deviceName | string The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
bool autoDelete = false;
string deviceName = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetDiskAutoDeleteAsync(project, zone, instance, autoDelete, deviceName);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetDiskAutoDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetIamPolicy(SetIamPolicyInstanceRequest, CallSettings)
public virtual Policy SetIamPolicy(SetIamPolicyInstanceRequest request, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetIamPolicyInstanceRequest request = new SetIamPolicyInstanceRequest
{
Zone = "",
Resource = "",
Project = "",
ZoneSetPolicyRequestResource = new ZoneSetPolicyRequest(),
};
// Make the request
Policy response = instancesClient.SetIamPolicy(request);
SetIamPolicy(string, string, string, ZoneSetPolicyRequest, CallSettings)
public virtual Policy SetIamPolicy(string project, string zone, string resource, ZoneSetPolicyRequest zoneSetPolicyRequestResource, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
zoneSetPolicyRequestResource | ZoneSetPolicyRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetPolicyRequest zoneSetPolicyRequestResource = new ZoneSetPolicyRequest();
// Make the request
Policy response = instancesClient.SetIamPolicy(project, zone, resource, zoneSetPolicyRequestResource);
SetIamPolicyAsync(SetIamPolicyInstanceRequest, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyInstanceRequest request, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyInstanceRequest request = new SetIamPolicyInstanceRequest
{
Zone = "",
Resource = "",
Project = "",
ZoneSetPolicyRequestResource = new ZoneSetPolicyRequest(),
};
// Make the request
Policy response = await instancesClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(SetIamPolicyInstanceRequest, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyInstanceRequest request, CancellationToken cancellationToken)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyInstanceRequest request = new SetIamPolicyInstanceRequest
{
Zone = "",
Resource = "",
Project = "",
ZoneSetPolicyRequestResource = new ZoneSetPolicyRequest(),
};
// Make the request
Policy response = await instancesClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(string, string, string, ZoneSetPolicyRequest, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(string project, string zone, string resource, ZoneSetPolicyRequest zoneSetPolicyRequestResource, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
zoneSetPolicyRequestResource | ZoneSetPolicyRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetPolicyRequest zoneSetPolicyRequestResource = new ZoneSetPolicyRequest();
// Make the request
Policy response = await instancesClient.SetIamPolicyAsync(project, zone, resource, zoneSetPolicyRequestResource);
SetIamPolicyAsync(string, string, string, ZoneSetPolicyRequest, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(string project, string zone, string resource, ZoneSetPolicyRequest zoneSetPolicyRequestResource, CancellationToken cancellationToken)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
zoneSetPolicyRequestResource | ZoneSetPolicyRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetPolicyRequest zoneSetPolicyRequestResource = new ZoneSetPolicyRequest();
// Make the request
Policy response = await instancesClient.SetIamPolicyAsync(project, zone, resource, zoneSetPolicyRequestResource);
SetLabels(SetLabelsInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetLabels(SetLabelsInstanceRequest request, CallSettings callSettings = null)
Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Parameters | |
---|---|
Name | Description |
request | SetLabelsInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetLabelsInstanceRequest request = new SetLabelsInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesSetLabelsRequestResource = new InstancesSetLabelsRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetLabels(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetLabels(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetLabels(string, string, string, InstancesSetLabelsRequest, CallSettings)
public virtual Operation<Operation, Operation> SetLabels(string project, string zone, string instance, InstancesSetLabelsRequest instancesSetLabelsRequestResource, CallSettings callSettings = null)
Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetLabelsRequestResource | InstancesSetLabelsRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetLabelsRequest instancesSetLabelsRequestResource = new InstancesSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetLabels(project, zone, instance, instancesSetLabelsRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetLabels(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetLabelsAsync(SetLabelsInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsInstanceRequest request, CallSettings callSettings = null)
Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Parameters | |
---|---|
Name | Description |
request | SetLabelsInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetLabelsInstanceRequest request = new SetLabelsInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesSetLabelsRequestResource = new InstancesSetLabelsRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetLabelsAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetLabelsAsync(SetLabelsInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsInstanceRequest request, CancellationToken cancellationToken)
Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Parameters | |
---|---|
Name | Description |
request | SetLabelsInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetLabelsInstanceRequest request = new SetLabelsInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesSetLabelsRequestResource = new InstancesSetLabelsRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetLabelsAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetLabelsAsync(string, string, string, InstancesSetLabelsRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string zone, string instance, InstancesSetLabelsRequest instancesSetLabelsRequestResource, CallSettings callSettings = null)
Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetLabelsRequestResource | InstancesSetLabelsRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetLabelsRequest instancesSetLabelsRequestResource = new InstancesSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetLabelsAsync(project, zone, instance, instancesSetLabelsRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetLabelsAsync(string, string, string, InstancesSetLabelsRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string zone, string instance, InstancesSetLabelsRequest instancesSetLabelsRequestResource, CancellationToken cancellationToken)
Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetLabelsRequestResource | InstancesSetLabelsRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetLabelsRequest instancesSetLabelsRequestResource = new InstancesSetLabelsRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetLabelsAsync(project, zone, instance, instancesSetLabelsRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetLabelsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineResources(SetMachineResourcesInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetMachineResources(SetMachineResourcesInstanceRequest request, CallSettings callSettings = null)
Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
Parameters | |
---|---|
Name | Description |
request | SetMachineResourcesInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetMachineResourcesInstanceRequest request = new SetMachineResourcesInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesSetMachineResourcesRequestResource = new InstancesSetMachineResourcesRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetMachineResources(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetMachineResources(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineResources(string, string, string, InstancesSetMachineResourcesRequest, CallSettings)
public virtual Operation<Operation, Operation> SetMachineResources(string project, string zone, string instance, InstancesSetMachineResourcesRequest instancesSetMachineResourcesRequestResource, CallSettings callSettings = null)
Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetMachineResourcesRequestResource | InstancesSetMachineResourcesRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetMachineResourcesRequest instancesSetMachineResourcesRequestResource = new InstancesSetMachineResourcesRequest();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetMachineResources(project, zone, instance, instancesSetMachineResourcesRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetMachineResources(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineResourcesAsync(SetMachineResourcesInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetMachineResourcesAsync(SetMachineResourcesInstanceRequest request, CallSettings callSettings = null)
Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
Parameters | |
---|---|
Name | Description |
request | SetMachineResourcesInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetMachineResourcesInstanceRequest request = new SetMachineResourcesInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesSetMachineResourcesRequestResource = new InstancesSetMachineResourcesRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMachineResourcesAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMachineResourcesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineResourcesAsync(SetMachineResourcesInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetMachineResourcesAsync(SetMachineResourcesInstanceRequest request, CancellationToken cancellationToken)
Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
Parameters | |
---|---|
Name | Description |
request | SetMachineResourcesInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetMachineResourcesInstanceRequest request = new SetMachineResourcesInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesSetMachineResourcesRequestResource = new InstancesSetMachineResourcesRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMachineResourcesAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMachineResourcesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineResourcesAsync(string, string, string, InstancesSetMachineResourcesRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetMachineResourcesAsync(string project, string zone, string instance, InstancesSetMachineResourcesRequest instancesSetMachineResourcesRequestResource, CallSettings callSettings = null)
Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetMachineResourcesRequestResource | InstancesSetMachineResourcesRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetMachineResourcesRequest instancesSetMachineResourcesRequestResource = new InstancesSetMachineResourcesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMachineResourcesAsync(project, zone, instance, instancesSetMachineResourcesRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMachineResourcesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineResourcesAsync(string, string, string, InstancesSetMachineResourcesRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetMachineResourcesAsync(string project, string zone, string instance, InstancesSetMachineResourcesRequest instancesSetMachineResourcesRequestResource, CancellationToken cancellationToken)
Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetMachineResourcesRequestResource | InstancesSetMachineResourcesRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetMachineResourcesRequest instancesSetMachineResourcesRequestResource = new InstancesSetMachineResourcesRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMachineResourcesAsync(project, zone, instance, instancesSetMachineResourcesRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMachineResourcesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineType(SetMachineTypeInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetMachineType(SetMachineTypeInstanceRequest request, CallSettings callSettings = null)
Changes the machine type for a stopped instance to the machine type specified in the request.
Parameters | |
---|---|
Name | Description |
request | SetMachineTypeInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetMachineTypeInstanceRequest request = new SetMachineTypeInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesSetMachineTypeRequestResource = new InstancesSetMachineTypeRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetMachineType(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetMachineType(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineType(string, string, string, InstancesSetMachineTypeRequest, CallSettings)
public virtual Operation<Operation, Operation> SetMachineType(string project, string zone, string instance, InstancesSetMachineTypeRequest instancesSetMachineTypeRequestResource, CallSettings callSettings = null)
Changes the machine type for a stopped instance to the machine type specified in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetMachineTypeRequestResource | InstancesSetMachineTypeRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetMachineTypeRequest instancesSetMachineTypeRequestResource = new InstancesSetMachineTypeRequest();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetMachineType(project, zone, instance, instancesSetMachineTypeRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetMachineType(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineTypeAsync(SetMachineTypeInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetMachineTypeAsync(SetMachineTypeInstanceRequest request, CallSettings callSettings = null)
Changes the machine type for a stopped instance to the machine type specified in the request.
Parameters | |
---|---|
Name | Description |
request | SetMachineTypeInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetMachineTypeInstanceRequest request = new SetMachineTypeInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesSetMachineTypeRequestResource = new InstancesSetMachineTypeRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMachineTypeAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMachineTypeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineTypeAsync(SetMachineTypeInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetMachineTypeAsync(SetMachineTypeInstanceRequest request, CancellationToken cancellationToken)
Changes the machine type for a stopped instance to the machine type specified in the request.
Parameters | |
---|---|
Name | Description |
request | SetMachineTypeInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetMachineTypeInstanceRequest request = new SetMachineTypeInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesSetMachineTypeRequestResource = new InstancesSetMachineTypeRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMachineTypeAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMachineTypeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineTypeAsync(string, string, string, InstancesSetMachineTypeRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetMachineTypeAsync(string project, string zone, string instance, InstancesSetMachineTypeRequest instancesSetMachineTypeRequestResource, CallSettings callSettings = null)
Changes the machine type for a stopped instance to the machine type specified in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetMachineTypeRequestResource | InstancesSetMachineTypeRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetMachineTypeRequest instancesSetMachineTypeRequestResource = new InstancesSetMachineTypeRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMachineTypeAsync(project, zone, instance, instancesSetMachineTypeRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMachineTypeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMachineTypeAsync(string, string, string, InstancesSetMachineTypeRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetMachineTypeAsync(string project, string zone, string instance, InstancesSetMachineTypeRequest instancesSetMachineTypeRequestResource, CancellationToken cancellationToken)
Changes the machine type for a stopped instance to the machine type specified in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetMachineTypeRequestResource | InstancesSetMachineTypeRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetMachineTypeRequest instancesSetMachineTypeRequestResource = new InstancesSetMachineTypeRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMachineTypeAsync(project, zone, instance, instancesSetMachineTypeRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMachineTypeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMetadata(SetMetadataInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetMetadata(SetMetadataInstanceRequest request, CallSettings callSettings = null)
Sets metadata for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
request | SetMetadataInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetMetadataInstanceRequest request = new SetMetadataInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
MetadataResource = new Metadata(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetMetadata(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetMetadata(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMetadata(string, string, string, Metadata, CallSettings)
public virtual Operation<Operation, Operation> SetMetadata(string project, string zone, string instance, Metadata metadataResource, CallSettings callSettings = null)
Sets metadata for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
metadataResource | Metadata The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Metadata metadataResource = new Metadata();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetMetadata(project, zone, instance, metadataResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetMetadata(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMetadataAsync(SetMetadataInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetMetadataAsync(SetMetadataInstanceRequest request, CallSettings callSettings = null)
Sets metadata for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
request | SetMetadataInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetMetadataInstanceRequest request = new SetMetadataInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
MetadataResource = new Metadata(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMetadataAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMetadataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMetadataAsync(SetMetadataInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetMetadataAsync(SetMetadataInstanceRequest request, CancellationToken cancellationToken)
Sets metadata for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
request | SetMetadataInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetMetadataInstanceRequest request = new SetMetadataInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
MetadataResource = new Metadata(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMetadataAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMetadataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMetadataAsync(string, string, string, Metadata, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetMetadataAsync(string project, string zone, string instance, Metadata metadataResource, CallSettings callSettings = null)
Sets metadata for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
metadataResource | Metadata The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Metadata metadataResource = new Metadata();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMetadataAsync(project, zone, instance, metadataResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMetadataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMetadataAsync(string, string, string, Metadata, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetMetadataAsync(string project, string zone, string instance, Metadata metadataResource, CancellationToken cancellationToken)
Sets metadata for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
metadataResource | Metadata The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Metadata metadataResource = new Metadata();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMetadataAsync(project, zone, instance, metadataResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMetadataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMinCpuPlatform(SetMinCpuPlatformInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetMinCpuPlatform(SetMinCpuPlatformInstanceRequest request, CallSettings callSettings = null)
Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Parameters | |
---|---|
Name | Description |
request | SetMinCpuPlatformInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetMinCpuPlatformInstanceRequest request = new SetMinCpuPlatformInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesSetMinCpuPlatformRequestResource = new InstancesSetMinCpuPlatformRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetMinCpuPlatform(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetMinCpuPlatform(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMinCpuPlatform(string, string, string, InstancesSetMinCpuPlatformRequest, CallSettings)
public virtual Operation<Operation, Operation> SetMinCpuPlatform(string project, string zone, string instance, InstancesSetMinCpuPlatformRequest instancesSetMinCpuPlatformRequestResource, CallSettings callSettings = null)
Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetMinCpuPlatformRequestResource | InstancesSetMinCpuPlatformRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetMinCpuPlatformRequest instancesSetMinCpuPlatformRequestResource = new InstancesSetMinCpuPlatformRequest();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetMinCpuPlatform(project, zone, instance, instancesSetMinCpuPlatformRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetMinCpuPlatform(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMinCpuPlatformAsync(SetMinCpuPlatformInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetMinCpuPlatformAsync(SetMinCpuPlatformInstanceRequest request, CallSettings callSettings = null)
Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Parameters | |
---|---|
Name | Description |
request | SetMinCpuPlatformInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetMinCpuPlatformInstanceRequest request = new SetMinCpuPlatformInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesSetMinCpuPlatformRequestResource = new InstancesSetMinCpuPlatformRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMinCpuPlatformAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMinCpuPlatformAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMinCpuPlatformAsync(SetMinCpuPlatformInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetMinCpuPlatformAsync(SetMinCpuPlatformInstanceRequest request, CancellationToken cancellationToken)
Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Parameters | |
---|---|
Name | Description |
request | SetMinCpuPlatformInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetMinCpuPlatformInstanceRequest request = new SetMinCpuPlatformInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
InstancesSetMinCpuPlatformRequestResource = new InstancesSetMinCpuPlatformRequest(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMinCpuPlatformAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMinCpuPlatformAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMinCpuPlatformAsync(string, string, string, InstancesSetMinCpuPlatformRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetMinCpuPlatformAsync(string project, string zone, string instance, InstancesSetMinCpuPlatformRequest instancesSetMinCpuPlatformRequestResource, CallSettings callSettings = null)
Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetMinCpuPlatformRequestResource | InstancesSetMinCpuPlatformRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetMinCpuPlatformRequest instancesSetMinCpuPlatformRequestResource = new InstancesSetMinCpuPlatformRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMinCpuPlatformAsync(project, zone, instance, instancesSetMinCpuPlatformRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMinCpuPlatformAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetMinCpuPlatformAsync(string, string, string, InstancesSetMinCpuPlatformRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetMinCpuPlatformAsync(string project, string zone, string instance, InstancesSetMinCpuPlatformRequest instancesSetMinCpuPlatformRequestResource, CancellationToken cancellationToken)
Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
instancesSetMinCpuPlatformRequestResource | InstancesSetMinCpuPlatformRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetMinCpuPlatformRequest instancesSetMinCpuPlatformRequestResource = new InstancesSetMinCpuPlatformRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetMinCpuPlatformAsync(project, zone, instance, instancesSetMinCpuPlatformRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetMinCpuPlatformAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetName(SetNameInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetName(SetNameInstanceRequest request, CallSettings callSettings = null)
Sets name of an instance.
Parameters | |
---|---|
Name | Description |
request | SetNameInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetNameInstanceRequest request = new SetNameInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesSetNameRequestResource = new InstancesSetNameRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetName(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetName(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetName(string, string, string, InstancesSetNameRequest, CallSettings)
public virtual Operation<Operation, Operation> SetName(string project, string zone, string instance, InstancesSetNameRequest instancesSetNameRequestResource, CallSettings callSettings = null)
Sets name of an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
instancesSetNameRequestResource | InstancesSetNameRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetNameRequest instancesSetNameRequestResource = new InstancesSetNameRequest();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetName(project, zone, instance, instancesSetNameRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetName(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetNameAsync(SetNameInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetNameAsync(SetNameInstanceRequest request, CallSettings callSettings = null)
Sets name of an instance.
Parameters | |
---|---|
Name | Description |
request | SetNameInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetNameInstanceRequest request = new SetNameInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesSetNameRequestResource = new InstancesSetNameRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetNameAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetNameAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetNameAsync(SetNameInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetNameAsync(SetNameInstanceRequest request, CancellationToken cancellationToken)
Sets name of an instance.
Parameters | |
---|---|
Name | Description |
request | SetNameInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetNameInstanceRequest request = new SetNameInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesSetNameRequestResource = new InstancesSetNameRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetNameAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetNameAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetNameAsync(string, string, string, InstancesSetNameRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetNameAsync(string project, string zone, string instance, InstancesSetNameRequest instancesSetNameRequestResource, CallSettings callSettings = null)
Sets name of an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
instancesSetNameRequestResource | InstancesSetNameRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetNameRequest instancesSetNameRequestResource = new InstancesSetNameRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetNameAsync(project, zone, instance, instancesSetNameRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetNameAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetNameAsync(string, string, string, InstancesSetNameRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetNameAsync(string project, string zone, string instance, InstancesSetNameRequest instancesSetNameRequestResource, CancellationToken cancellationToken)
Sets name of an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
instancesSetNameRequestResource | InstancesSetNameRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetNameRequest instancesSetNameRequestResource = new InstancesSetNameRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetNameAsync(project, zone, instance, instancesSetNameRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetNameAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetScheduling(SetSchedulingInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetScheduling(SetSchedulingInstanceRequest request, CallSettings callSettings = null)
Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED
state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.
Parameters | |
---|---|
Name | Description |
request | SetSchedulingInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetSchedulingInstanceRequest request = new SetSchedulingInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
SchedulingResource = new Scheduling(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetScheduling(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetScheduling(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetScheduling(string, string, string, Scheduling, CallSettings)
public virtual Operation<Operation, Operation> SetScheduling(string project, string zone, string instance, Scheduling schedulingResource, CallSettings callSettings = null)
Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED
state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Instance name for this request. |
schedulingResource | Scheduling The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Scheduling schedulingResource = new Scheduling();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetScheduling(project, zone, instance, schedulingResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetScheduling(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetSchedulingAsync(SetSchedulingInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetSchedulingAsync(SetSchedulingInstanceRequest request, CallSettings callSettings = null)
Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED
state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.
Parameters | |
---|---|
Name | Description |
request | SetSchedulingInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetSchedulingInstanceRequest request = new SetSchedulingInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
SchedulingResource = new Scheduling(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetSchedulingAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetSchedulingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetSchedulingAsync(SetSchedulingInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetSchedulingAsync(SetSchedulingInstanceRequest request, CancellationToken cancellationToken)
Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED
state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.
Parameters | |
---|---|
Name | Description |
request | SetSchedulingInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetSchedulingInstanceRequest request = new SetSchedulingInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
SchedulingResource = new Scheduling(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetSchedulingAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetSchedulingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetSchedulingAsync(string, string, string, Scheduling, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetSchedulingAsync(string project, string zone, string instance, Scheduling schedulingResource, CallSettings callSettings = null)
Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED
state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Instance name for this request. |
schedulingResource | Scheduling The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Scheduling schedulingResource = new Scheduling();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetSchedulingAsync(project, zone, instance, schedulingResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetSchedulingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetSchedulingAsync(string, string, string, Scheduling, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetSchedulingAsync(string project, string zone, string instance, Scheduling schedulingResource, CancellationToken cancellationToken)
Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED
state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Instance name for this request. |
schedulingResource | Scheduling The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Scheduling schedulingResource = new Scheduling();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetSchedulingAsync(project, zone, instance, schedulingResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetSchedulingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetServiceAccount(SetServiceAccountInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetServiceAccount(SetServiceAccountInstanceRequest request, CallSettings callSettings = null)
Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Parameters | |
---|---|
Name | Description |
request | SetServiceAccountInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetServiceAccountInstanceRequest request = new SetServiceAccountInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesSetServiceAccountRequestResource = new InstancesSetServiceAccountRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetServiceAccount(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetServiceAccount(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetServiceAccount(string, string, string, InstancesSetServiceAccountRequest, CallSettings)
public virtual Operation<Operation, Operation> SetServiceAccount(string project, string zone, string instance, InstancesSetServiceAccountRequest instancesSetServiceAccountRequestResource, CallSettings callSettings = null)
Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to start. |
instancesSetServiceAccountRequestResource | InstancesSetServiceAccountRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetServiceAccountRequest instancesSetServiceAccountRequestResource = new InstancesSetServiceAccountRequest();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetServiceAccount(project, zone, instance, instancesSetServiceAccountRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetServiceAccount(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetServiceAccountAsync(SetServiceAccountInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetServiceAccountAsync(SetServiceAccountInstanceRequest request, CallSettings callSettings = null)
Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Parameters | |
---|---|
Name | Description |
request | SetServiceAccountInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetServiceAccountInstanceRequest request = new SetServiceAccountInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesSetServiceAccountRequestResource = new InstancesSetServiceAccountRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetServiceAccountAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetServiceAccountAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetServiceAccountAsync(SetServiceAccountInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetServiceAccountAsync(SetServiceAccountInstanceRequest request, CancellationToken cancellationToken)
Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Parameters | |
---|---|
Name | Description |
request | SetServiceAccountInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetServiceAccountInstanceRequest request = new SetServiceAccountInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesSetServiceAccountRequestResource = new InstancesSetServiceAccountRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetServiceAccountAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetServiceAccountAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetServiceAccountAsync(string, string, string, InstancesSetServiceAccountRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetServiceAccountAsync(string project, string zone, string instance, InstancesSetServiceAccountRequest instancesSetServiceAccountRequestResource, CallSettings callSettings = null)
Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to start. |
instancesSetServiceAccountRequestResource | InstancesSetServiceAccountRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetServiceAccountRequest instancesSetServiceAccountRequestResource = new InstancesSetServiceAccountRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetServiceAccountAsync(project, zone, instance, instancesSetServiceAccountRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetServiceAccountAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetServiceAccountAsync(string, string, string, InstancesSetServiceAccountRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetServiceAccountAsync(string project, string zone, string instance, InstancesSetServiceAccountRequest instancesSetServiceAccountRequestResource, CancellationToken cancellationToken)
Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to start. |
instancesSetServiceAccountRequestResource | InstancesSetServiceAccountRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesSetServiceAccountRequest instancesSetServiceAccountRequestResource = new InstancesSetServiceAccountRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetServiceAccountAsync(project, zone, instance, instancesSetServiceAccountRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetServiceAccountAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetShieldedInstanceIntegrityPolicy(SetShieldedInstanceIntegrityPolicyInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetShieldedInstanceIntegrityPolicy(SetShieldedInstanceIntegrityPolicyInstanceRequest request, CallSettings callSettings = null)
Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | SetShieldedInstanceIntegrityPolicyInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetShieldedInstanceIntegrityPolicyInstanceRequest request = new SetShieldedInstanceIntegrityPolicyInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
ShieldedInstanceIntegrityPolicyResource = new ShieldedInstanceIntegrityPolicy(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetShieldedInstanceIntegrityPolicy(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetShieldedInstanceIntegrityPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetShieldedInstanceIntegrityPolicy(string, string, string, ShieldedInstanceIntegrityPolicy, CallSettings)
public virtual Operation<Operation, Operation> SetShieldedInstanceIntegrityPolicy(string project, string zone, string instance, ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource, CallSettings callSettings = null)
Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name or id of the instance scoping this request. |
shieldedInstanceIntegrityPolicyResource | ShieldedInstanceIntegrityPolicy The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource = new ShieldedInstanceIntegrityPolicy();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetShieldedInstanceIntegrityPolicy(project, zone, instance, shieldedInstanceIntegrityPolicyResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetShieldedInstanceIntegrityPolicy(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetShieldedInstanceIntegrityPolicyAsync(SetShieldedInstanceIntegrityPolicyInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetShieldedInstanceIntegrityPolicyAsync(SetShieldedInstanceIntegrityPolicyInstanceRequest request, CallSettings callSettings = null)
Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | SetShieldedInstanceIntegrityPolicyInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetShieldedInstanceIntegrityPolicyInstanceRequest request = new SetShieldedInstanceIntegrityPolicyInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
ShieldedInstanceIntegrityPolicyResource = new ShieldedInstanceIntegrityPolicy(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetShieldedInstanceIntegrityPolicyAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetShieldedInstanceIntegrityPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetShieldedInstanceIntegrityPolicyAsync(SetShieldedInstanceIntegrityPolicyInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetShieldedInstanceIntegrityPolicyAsync(SetShieldedInstanceIntegrityPolicyInstanceRequest request, CancellationToken cancellationToken)
Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | SetShieldedInstanceIntegrityPolicyInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetShieldedInstanceIntegrityPolicyInstanceRequest request = new SetShieldedInstanceIntegrityPolicyInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
ShieldedInstanceIntegrityPolicyResource = new ShieldedInstanceIntegrityPolicy(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetShieldedInstanceIntegrityPolicyAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetShieldedInstanceIntegrityPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetShieldedInstanceIntegrityPolicyAsync(string, string, string, ShieldedInstanceIntegrityPolicy, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetShieldedInstanceIntegrityPolicyAsync(string project, string zone, string instance, ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource, CallSettings callSettings = null)
Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name or id of the instance scoping this request. |
shieldedInstanceIntegrityPolicyResource | ShieldedInstanceIntegrityPolicy The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource = new ShieldedInstanceIntegrityPolicy();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetShieldedInstanceIntegrityPolicyAsync(project, zone, instance, shieldedInstanceIntegrityPolicyResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetShieldedInstanceIntegrityPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetShieldedInstanceIntegrityPolicyAsync(string, string, string, ShieldedInstanceIntegrityPolicy, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetShieldedInstanceIntegrityPolicyAsync(string project, string zone, string instance, ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource, CancellationToken cancellationToken)
Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name or id of the instance scoping this request. |
shieldedInstanceIntegrityPolicyResource | ShieldedInstanceIntegrityPolicy The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource = new ShieldedInstanceIntegrityPolicy();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetShieldedInstanceIntegrityPolicyAsync(project, zone, instance, shieldedInstanceIntegrityPolicyResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetShieldedInstanceIntegrityPolicyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetTags(SetTagsInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SetTags(SetTagsInstanceRequest request, CallSettings callSettings = null)
Sets network tags for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
request | SetTagsInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SetTagsInstanceRequest request = new SetTagsInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
TagsResource = new Tags(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetTags(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetTags(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetTags(string, string, string, Tags, CallSettings)
public virtual Operation<Operation, Operation> SetTags(string project, string zone, string instance, Tags tagsResource, CallSettings callSettings = null)
Sets network tags for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
tagsResource | Tags The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Tags tagsResource = new Tags();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SetTags(project, zone, instance, tagsResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSetTags(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetTagsAsync(SetTagsInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetTagsAsync(SetTagsInstanceRequest request, CallSettings callSettings = null)
Sets network tags for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
request | SetTagsInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetTagsInstanceRequest request = new SetTagsInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
TagsResource = new Tags(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetTagsAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetTagsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetTagsAsync(SetTagsInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetTagsAsync(SetTagsInstanceRequest request, CancellationToken cancellationToken)
Sets network tags for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
request | SetTagsInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SetTagsInstanceRequest request = new SetTagsInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
TagsResource = new Tags(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetTagsAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetTagsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetTagsAsync(string, string, string, Tags, CallSettings)
public virtual Task<Operation<Operation, Operation>> SetTagsAsync(string project, string zone, string instance, Tags tagsResource, CallSettings callSettings = null)
Sets network tags for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
tagsResource | Tags The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Tags tagsResource = new Tags();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetTagsAsync(project, zone, instance, tagsResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetTagsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetTagsAsync(string, string, string, Tags, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SetTagsAsync(string project, string zone, string instance, Tags tagsResource, CancellationToken cancellationToken)
Sets network tags for the specified instance to the data included in the request.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
tagsResource | Tags The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Tags tagsResource = new Tags();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SetTagsAsync(project, zone, instance, tagsResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSetTagsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
SimulateMaintenanceEvent(SimulateMaintenanceEventInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> SimulateMaintenanceEvent(SimulateMaintenanceEventInstanceRequest request, CallSettings callSettings = null)
Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.
Parameters | |
---|---|
Name | Description |
request | SimulateMaintenanceEventInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SimulateMaintenanceEventInstanceRequest request = new SimulateMaintenanceEventInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SimulateMaintenanceEvent(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSimulateMaintenanceEvent(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SimulateMaintenanceEvent(string, string, string, CallSettings)
public virtual Operation<Operation, Operation> SimulateMaintenanceEvent(string project, string zone, string instance, CallSettings callSettings = null)
Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.SimulateMaintenanceEvent(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSimulateMaintenanceEvent(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SimulateMaintenanceEventAsync(SimulateMaintenanceEventInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SimulateMaintenanceEventAsync(SimulateMaintenanceEventInstanceRequest request, CallSettings callSettings = null)
Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.
Parameters | |
---|---|
Name | Description |
request | SimulateMaintenanceEventInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SimulateMaintenanceEventInstanceRequest request = new SimulateMaintenanceEventInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SimulateMaintenanceEventAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSimulateMaintenanceEventAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SimulateMaintenanceEventAsync(SimulateMaintenanceEventInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SimulateMaintenanceEventAsync(SimulateMaintenanceEventInstanceRequest request, CancellationToken cancellationToken)
Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.
Parameters | |
---|---|
Name | Description |
request | SimulateMaintenanceEventInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SimulateMaintenanceEventInstanceRequest request = new SimulateMaintenanceEventInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SimulateMaintenanceEventAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSimulateMaintenanceEventAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SimulateMaintenanceEventAsync(string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> SimulateMaintenanceEventAsync(string project, string zone, string instance, CallSettings callSettings = null)
Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SimulateMaintenanceEventAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSimulateMaintenanceEventAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SimulateMaintenanceEventAsync(string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SimulateMaintenanceEventAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SimulateMaintenanceEventAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSimulateMaintenanceEventAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Start(StartInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> Start(StartInstanceRequest request, CallSettings callSettings = null)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
request | StartInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
StartInstanceRequest request = new StartInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Start(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceStart(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Start(string, string, string, CallSettings)
public virtual Operation<Operation, Operation> Start(string project, string zone, string instance, CallSettings callSettings = null)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to start. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Start(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceStart(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StartAsync(StartInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> StartAsync(StartInstanceRequest request, CallSettings callSettings = null)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
request | StartInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
StartInstanceRequest request = new StartInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StartAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStartAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StartAsync(StartInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> StartAsync(StartInstanceRequest request, CancellationToken cancellationToken)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
request | StartInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
StartInstanceRequest request = new StartInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StartAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStartAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StartAsync(string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> StartAsync(string project, string zone, string instance, CallSettings callSettings = null)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to start. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StartAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStartAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StartAsync(string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> StartAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to start. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StartAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStartAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StartWithEncryptionKey(StartWithEncryptionKeyInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> StartWithEncryptionKey(StartWithEncryptionKeyInstanceRequest request, CallSettings callSettings = null)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
request | StartWithEncryptionKeyInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
StartWithEncryptionKeyInstanceRequest request = new StartWithEncryptionKeyInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesStartWithEncryptionKeyRequestResource = new InstancesStartWithEncryptionKeyRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.StartWithEncryptionKey(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceStartWithEncryptionKey(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StartWithEncryptionKey(string, string, string, InstancesStartWithEncryptionKeyRequest, CallSettings)
public virtual Operation<Operation, Operation> StartWithEncryptionKey(string project, string zone, string instance, InstancesStartWithEncryptionKeyRequest instancesStartWithEncryptionKeyRequestResource, CallSettings callSettings = null)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to start. |
instancesStartWithEncryptionKeyRequestResource | InstancesStartWithEncryptionKeyRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesStartWithEncryptionKeyRequest instancesStartWithEncryptionKeyRequestResource = new InstancesStartWithEncryptionKeyRequest();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.StartWithEncryptionKey(project, zone, instance, instancesStartWithEncryptionKeyRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceStartWithEncryptionKey(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StartWithEncryptionKeyAsync(StartWithEncryptionKeyInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> StartWithEncryptionKeyAsync(StartWithEncryptionKeyInstanceRequest request, CallSettings callSettings = null)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
request | StartWithEncryptionKeyInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
StartWithEncryptionKeyInstanceRequest request = new StartWithEncryptionKeyInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesStartWithEncryptionKeyRequestResource = new InstancesStartWithEncryptionKeyRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StartWithEncryptionKeyAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStartWithEncryptionKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StartWithEncryptionKeyAsync(StartWithEncryptionKeyInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> StartWithEncryptionKeyAsync(StartWithEncryptionKeyInstanceRequest request, CancellationToken cancellationToken)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
request | StartWithEncryptionKeyInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
StartWithEncryptionKeyInstanceRequest request = new StartWithEncryptionKeyInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
InstancesStartWithEncryptionKeyRequestResource = new InstancesStartWithEncryptionKeyRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StartWithEncryptionKeyAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStartWithEncryptionKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StartWithEncryptionKeyAsync(string, string, string, InstancesStartWithEncryptionKeyRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> StartWithEncryptionKeyAsync(string project, string zone, string instance, InstancesStartWithEncryptionKeyRequest instancesStartWithEncryptionKeyRequestResource, CallSettings callSettings = null)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to start. |
instancesStartWithEncryptionKeyRequestResource | InstancesStartWithEncryptionKeyRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesStartWithEncryptionKeyRequest instancesStartWithEncryptionKeyRequestResource = new InstancesStartWithEncryptionKeyRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StartWithEncryptionKeyAsync(project, zone, instance, instancesStartWithEncryptionKeyRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStartWithEncryptionKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StartWithEncryptionKeyAsync(string, string, string, InstancesStartWithEncryptionKeyRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> StartWithEncryptionKeyAsync(string project, string zone, string instance, InstancesStartWithEncryptionKeyRequest instancesStartWithEncryptionKeyRequestResource, CancellationToken cancellationToken)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to start. |
instancesStartWithEncryptionKeyRequestResource | InstancesStartWithEncryptionKeyRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
InstancesStartWithEncryptionKeyRequest instancesStartWithEncryptionKeyRequestResource = new InstancesStartWithEncryptionKeyRequest();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StartWithEncryptionKeyAsync(project, zone, instance, instancesStartWithEncryptionKeyRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStartWithEncryptionKeyAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Stop(StopInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> Stop(StopInstanceRequest request, CallSettings callSettings = null)
Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Parameters | |
---|---|
Name | Description |
request | StopInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
DiscardLocalSsd = false,
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Stop(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceStop(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Stop(string, string, string, CallSettings)
public virtual Operation<Operation, Operation> Stop(string project, string zone, string instance, CallSettings callSettings = null)
Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to stop. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Stop(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceStop(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StopAsync(StopInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> StopAsync(StopInstanceRequest request, CallSettings callSettings = null)
Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Parameters | |
---|---|
Name | Description |
request | StopInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
DiscardLocalSsd = false,
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StopAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStopAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StopAsync(StopInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> StopAsync(StopInstanceRequest request, CancellationToken cancellationToken)
Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Parameters | |
---|---|
Name | Description |
request | StopInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
DiscardLocalSsd = false,
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StopAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStopAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StopAsync(string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> StopAsync(string project, string zone, string instance, CallSettings callSettings = null)
Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to stop. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StopAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStopAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
StopAsync(string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> StopAsync(string project, string zone, string instance, CancellationToken cancellationToken)
Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to stop. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.StopAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceStopAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Suspend(SuspendInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> Suspend(SuspendInstanceRequest request, CallSettings callSettings = null)
This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance.
Parameters | |
---|---|
Name | Description |
request | SuspendInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SuspendInstanceRequest request = new SuspendInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
DiscardLocalSsd = false,
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Suspend(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSuspend(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Suspend(string, string, string, CallSettings)
public virtual Operation<Operation, Operation> Suspend(string project, string zone, string instance, CallSettings callSettings = null)
This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to suspend. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Suspend(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceSuspend(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SuspendAsync(SuspendInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> SuspendAsync(SuspendInstanceRequest request, CallSettings callSettings = null)
This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance.
Parameters | |
---|---|
Name | Description |
request | SuspendInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SuspendInstanceRequest request = new SuspendInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
DiscardLocalSsd = false,
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SuspendAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSuspendAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SuspendAsync(SuspendInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SuspendAsync(SuspendInstanceRequest request, CancellationToken cancellationToken)
This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance.
Parameters | |
---|---|
Name | Description |
request | SuspendInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SuspendInstanceRequest request = new SuspendInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
DiscardLocalSsd = false,
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SuspendAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSuspendAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SuspendAsync(string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> SuspendAsync(string project, string zone, string instance, CallSettings callSettings = null)
This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to suspend. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SuspendAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSuspendAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SuspendAsync(string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> SuspendAsync(string project, string zone, string instance, CancellationToken cancellationToken)
This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to suspend. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.SuspendAsync(project, zone, instance);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceSuspendAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
TestIamPermissions(TestIamPermissionsInstanceRequest, CallSettings)
public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsInstanceRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
TestIamPermissionsInstanceRequest request = new TestIamPermissionsInstanceRequest
{
Zone = "",
Resource = "",
Project = "",
TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = instancesClient.TestIamPermissions(request);
TestIamPermissions(string, string, string, TestPermissionsRequest, CallSettings)
public virtual TestPermissionsResponse TestIamPermissions(string project, string zone, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
testPermissionsRequestResource | TestPermissionsRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestPermissionsResponse | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = instancesClient.TestIamPermissions(project, zone, resource, testPermissionsRequestResource);
TestIamPermissionsAsync(TestIamPermissionsInstanceRequest, CallSettings)
public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsInstanceRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsInstanceRequest request = new TestIamPermissionsInstanceRequest
{
Zone = "",
Resource = "",
Project = "",
TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await instancesClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(TestIamPermissionsInstanceRequest, CancellationToken)
public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsInstanceRequest request, CancellationToken cancellationToken)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestPermissionsResponse | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsInstanceRequest request = new TestIamPermissionsInstanceRequest
{
Zone = "",
Resource = "",
Project = "",
TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await instancesClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CallSettings)
public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string zone, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
testPermissionsRequestResource | TestPermissionsRequest The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestPermissionsResponse | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await instancesClient.TestIamPermissionsAsync(project, zone, resource, testPermissionsRequestResource);
TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CancellationToken)
public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string zone, string resource, TestPermissionsRequest testPermissionsRequestResource, CancellationToken cancellationToken)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
resource | string Name or id of the resource for this request. |
testPermissionsRequestResource | TestPermissionsRequest The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestPermissionsResponse | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await instancesClient.TestIamPermissionsAsync(project, zone, resource, testPermissionsRequestResource);
Update(UpdateInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> Update(UpdateInstanceRequest request, CallSettings callSettings = null)
Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
Parameters | |
---|---|
Name | Description |
request | UpdateInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
MostDisruptiveAllowedAction = "",
InstanceResource = new Instance(),
Project = "",
MinimalAction = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Update(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceUpdate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Update(string, string, string, Instance, CallSettings)
public virtual Operation<Operation, Operation> Update(string project, string zone, string instance, Instance instanceResource, CallSettings callSettings = null)
Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to update. |
instanceResource | Instance The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Instance instanceResource = new Instance();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.Update(project, zone, instance, instanceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceUpdate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAccessConfig(UpdateAccessConfigInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> UpdateAccessConfig(UpdateAccessConfigInstanceRequest request, CallSettings callSettings = null)
Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | UpdateAccessConfigInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
UpdateAccessConfigInstanceRequest request = new UpdateAccessConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
NetworkInterface = "",
AccessConfigResource = new AccessConfig(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.UpdateAccessConfig(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceUpdateAccessConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAccessConfig(string, string, string, string, AccessConfig, CallSettings)
public virtual Operation<Operation, Operation> UpdateAccessConfig(string project, string zone, string instance, string networkInterface, AccessConfig accessConfigResource, CallSettings callSettings = null)
Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
networkInterface | string The name of the network interface where the access config is attached. |
accessConfigResource | AccessConfig The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
AccessConfig accessConfigResource = new AccessConfig();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.UpdateAccessConfig(project, zone, instance, networkInterface, accessConfigResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceUpdateAccessConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAccessConfigAsync(UpdateAccessConfigInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateAccessConfigAsync(UpdateAccessConfigInstanceRequest request, CallSettings callSettings = null)
Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | UpdateAccessConfigInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
UpdateAccessConfigInstanceRequest request = new UpdateAccessConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
NetworkInterface = "",
AccessConfigResource = new AccessConfig(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateAccessConfigAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAccessConfigAsync(UpdateAccessConfigInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateAccessConfigAsync(UpdateAccessConfigInstanceRequest request, CancellationToken cancellationToken)
Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | UpdateAccessConfigInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
UpdateAccessConfigInstanceRequest request = new UpdateAccessConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
NetworkInterface = "",
AccessConfigResource = new AccessConfig(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateAccessConfigAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAccessConfigAsync(string, string, string, string, AccessConfig, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateAccessConfigAsync(string project, string zone, string instance, string networkInterface, AccessConfig accessConfigResource, CallSettings callSettings = null)
Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
networkInterface | string The name of the network interface where the access config is attached. |
accessConfigResource | AccessConfig The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
AccessConfig accessConfigResource = new AccessConfig();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateAccessConfigAsync(project, zone, instance, networkInterface, accessConfigResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAccessConfigAsync(string, string, string, string, AccessConfig, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateAccessConfigAsync(string project, string zone, string instance, string networkInterface, AccessConfig accessConfigResource, CancellationToken cancellationToken)
Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
networkInterface | string The name of the network interface where the access config is attached. |
accessConfigResource | AccessConfig The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
AccessConfig accessConfigResource = new AccessConfig();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateAccessConfigAsync(project, zone, instance, networkInterface, accessConfigResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateAccessConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(UpdateInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateInstanceRequest request, CallSettings callSettings = null)
Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
Parameters | |
---|---|
Name | Description |
request | UpdateInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
MostDisruptiveAllowedAction = "",
InstanceResource = new Instance(),
Project = "",
MinimalAction = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(UpdateInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateInstanceRequest request, CancellationToken cancellationToken)
Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
Parameters | |
---|---|
Name | Description |
request | UpdateInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
MostDisruptiveAllowedAction = "",
InstanceResource = new Instance(),
Project = "",
MinimalAction = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(string, string, string, Instance, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string zone, string instance, Instance instanceResource, CallSettings callSettings = null)
Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to update. |
instanceResource | Instance The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Instance instanceResource = new Instance();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateAsync(project, zone, instance, instanceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(string, string, string, Instance, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string zone, string instance, Instance instanceResource, CancellationToken cancellationToken)
Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance resource to update. |
instanceResource | Instance The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
Instance instanceResource = new Instance();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateAsync(project, zone, instance, instanceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateDisplayDevice(UpdateDisplayDeviceInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> UpdateDisplayDevice(UpdateDisplayDeviceInstanceRequest request, CallSettings callSettings = null)
Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | UpdateDisplayDeviceInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
UpdateDisplayDeviceInstanceRequest request = new UpdateDisplayDeviceInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
DisplayDeviceResource = new DisplayDevice(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.UpdateDisplayDevice(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceUpdateDisplayDevice(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateDisplayDevice(string, string, string, DisplayDevice, CallSettings)
public virtual Operation<Operation, Operation> UpdateDisplayDevice(string project, string zone, string instance, DisplayDevice displayDeviceResource, CallSettings callSettings = null)
Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
displayDeviceResource | DisplayDevice The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
DisplayDevice displayDeviceResource = new DisplayDevice();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.UpdateDisplayDevice(project, zone, instance, displayDeviceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceUpdateDisplayDevice(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateDisplayDeviceAsync(UpdateDisplayDeviceInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateDisplayDeviceAsync(UpdateDisplayDeviceInstanceRequest request, CallSettings callSettings = null)
Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | UpdateDisplayDeviceInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
UpdateDisplayDeviceInstanceRequest request = new UpdateDisplayDeviceInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
DisplayDeviceResource = new DisplayDevice(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateDisplayDeviceAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateDisplayDeviceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateDisplayDeviceAsync(UpdateDisplayDeviceInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateDisplayDeviceAsync(UpdateDisplayDeviceInstanceRequest request, CancellationToken cancellationToken)
Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | UpdateDisplayDeviceInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
UpdateDisplayDeviceInstanceRequest request = new UpdateDisplayDeviceInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
DisplayDeviceResource = new DisplayDevice(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateDisplayDeviceAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateDisplayDeviceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateDisplayDeviceAsync(string, string, string, DisplayDevice, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateDisplayDeviceAsync(string project, string zone, string instance, DisplayDevice displayDeviceResource, CallSettings callSettings = null)
Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
displayDeviceResource | DisplayDevice The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
DisplayDevice displayDeviceResource = new DisplayDevice();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateDisplayDeviceAsync(project, zone, instance, displayDeviceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateDisplayDeviceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateDisplayDeviceAsync(string, string, string, DisplayDevice, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateDisplayDeviceAsync(string project, string zone, string instance, DisplayDevice displayDeviceResource, CancellationToken cancellationToken)
Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name of the instance scoping this request. |
displayDeviceResource | DisplayDevice The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
DisplayDevice displayDeviceResource = new DisplayDevice();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateDisplayDeviceAsync(project, zone, instance, displayDeviceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateDisplayDeviceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateNetworkInterface(UpdateNetworkInterfaceInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> UpdateNetworkInterface(UpdateNetworkInterfaceInstanceRequest request, CallSettings callSettings = null)
Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.
Parameters | |
---|---|
Name | Description |
request | UpdateNetworkInterfaceInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
UpdateNetworkInterfaceInstanceRequest request = new UpdateNetworkInterfaceInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
NetworkInterfaceResource = new NetworkInterface(),
NetworkInterface = "",
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.UpdateNetworkInterface(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceUpdateNetworkInterface(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateNetworkInterface(string, string, string, string, NetworkInterface, CallSettings)
public virtual Operation<Operation, Operation> UpdateNetworkInterface(string project, string zone, string instance, string networkInterface, NetworkInterface networkInterfaceResource, CallSettings callSettings = null)
Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
networkInterface | string The name of the network interface to update. |
networkInterfaceResource | NetworkInterface The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
NetworkInterface networkInterfaceResource = new NetworkInterface();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.UpdateNetworkInterface(project, zone, instance, networkInterface, networkInterfaceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceUpdateNetworkInterface(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateNetworkInterfaceAsync(UpdateNetworkInterfaceInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateNetworkInterfaceAsync(UpdateNetworkInterfaceInstanceRequest request, CallSettings callSettings = null)
Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.
Parameters | |
---|---|
Name | Description |
request | UpdateNetworkInterfaceInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
UpdateNetworkInterfaceInstanceRequest request = new UpdateNetworkInterfaceInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
NetworkInterfaceResource = new NetworkInterface(),
NetworkInterface = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateNetworkInterfaceAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateNetworkInterfaceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateNetworkInterfaceAsync(UpdateNetworkInterfaceInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateNetworkInterfaceAsync(UpdateNetworkInterfaceInstanceRequest request, CancellationToken cancellationToken)
Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.
Parameters | |
---|---|
Name | Description |
request | UpdateNetworkInterfaceInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
UpdateNetworkInterfaceInstanceRequest request = new UpdateNetworkInterfaceInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
NetworkInterfaceResource = new NetworkInterface(),
NetworkInterface = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateNetworkInterfaceAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateNetworkInterfaceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateNetworkInterfaceAsync(string, string, string, string, NetworkInterface, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateNetworkInterfaceAsync(string project, string zone, string instance, string networkInterface, NetworkInterface networkInterfaceResource, CallSettings callSettings = null)
Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
networkInterface | string The name of the network interface to update. |
networkInterfaceResource | NetworkInterface The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
NetworkInterface networkInterfaceResource = new NetworkInterface();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateNetworkInterfaceAsync(project, zone, instance, networkInterface, networkInterfaceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateNetworkInterfaceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateNetworkInterfaceAsync(string, string, string, string, NetworkInterface, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateNetworkInterfaceAsync(string project, string zone, string instance, string networkInterface, NetworkInterface networkInterfaceResource, CancellationToken cancellationToken)
Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string The instance name for this request. |
networkInterface | string The name of the network interface to update. |
networkInterfaceResource | NetworkInterface The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
string networkInterface = "";
NetworkInterface networkInterfaceResource = new NetworkInterface();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateNetworkInterfaceAsync(project, zone, instance, networkInterface, networkInterfaceResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateNetworkInterfaceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateShieldedInstanceConfig(UpdateShieldedInstanceConfigInstanceRequest, CallSettings)
public virtual Operation<Operation, Operation> UpdateShieldedInstanceConfig(UpdateShieldedInstanceConfigInstanceRequest request, CallSettings callSettings = null)
Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | UpdateShieldedInstanceConfigInstanceRequest 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. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
UpdateShieldedInstanceConfigInstanceRequest request = new UpdateShieldedInstanceConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
ShieldedInstanceConfigResource = new ShieldedInstanceConfig(),
};
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.UpdateShieldedInstanceConfig(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceUpdateShieldedInstanceConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateShieldedInstanceConfig(string, string, string, ShieldedInstanceConfig, CallSettings)
public virtual Operation<Operation, Operation> UpdateShieldedInstanceConfig(string project, string zone, string instance, ShieldedInstanceConfig shieldedInstanceConfigResource, CallSettings callSettings = null)
Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name or id of the instance scoping this request. |
shieldedInstanceConfigResource | ShieldedInstanceConfig The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
ShieldedInstanceConfig shieldedInstanceConfigResource = new ShieldedInstanceConfig();
// Make the request
lro::Operation<Operation, Operation> response = instancesClient.UpdateShieldedInstanceConfig(project, zone, instance, shieldedInstanceConfigResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = instancesClient.PollOnceUpdateShieldedInstanceConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateShieldedInstanceConfigAsync(UpdateShieldedInstanceConfigInstanceRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateShieldedInstanceConfigAsync(UpdateShieldedInstanceConfigInstanceRequest request, CallSettings callSettings = null)
Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | UpdateShieldedInstanceConfigInstanceRequest 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. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
UpdateShieldedInstanceConfigInstanceRequest request = new UpdateShieldedInstanceConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
ShieldedInstanceConfigResource = new ShieldedInstanceConfig(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateShieldedInstanceConfigAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateShieldedInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateShieldedInstanceConfigAsync(UpdateShieldedInstanceConfigInstanceRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateShieldedInstanceConfigAsync(UpdateShieldedInstanceConfigInstanceRequest request, CancellationToken cancellationToken)
Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | UpdateShieldedInstanceConfigInstanceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
UpdateShieldedInstanceConfigInstanceRequest request = new UpdateShieldedInstanceConfigInstanceRequest
{
Zone = "",
Instance = "",
RequestId = "",
Project = "",
ShieldedInstanceConfigResource = new ShieldedInstanceConfig(),
};
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateShieldedInstanceConfigAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateShieldedInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateShieldedInstanceConfigAsync(string, string, string, ShieldedInstanceConfig, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateShieldedInstanceConfigAsync(string project, string zone, string instance, ShieldedInstanceConfig shieldedInstanceConfigResource, CallSettings callSettings = null)
Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name or id of the instance scoping this request. |
shieldedInstanceConfigResource | ShieldedInstanceConfig The body resource for this request |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
ShieldedInstanceConfig shieldedInstanceConfigResource = new ShieldedInstanceConfig();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateShieldedInstanceConfigAsync(project, zone, instance, shieldedInstanceConfigResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateShieldedInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateShieldedInstanceConfigAsync(string, string, string, ShieldedInstanceConfig, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateShieldedInstanceConfigAsync(string project, string zone, string instance, ShieldedInstanceConfig shieldedInstanceConfigResource, CancellationToken cancellationToken)
Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | string Project ID for this request. |
zone | string The name of the zone for this request. |
instance | string Name or id of the instance scoping this request. |
shieldedInstanceConfigResource | ShieldedInstanceConfig The body resource for this request |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string instance = "";
ShieldedInstanceConfig shieldedInstanceConfigResource = new ShieldedInstanceConfig();
// Make the request
lro::Operation<Operation, Operation> response = await instancesClient.UpdateShieldedInstanceConfigAsync(project, zone, instance, shieldedInstanceConfigResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await instancesClient.PollOnceUpdateShieldedInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}