Class InstancesClient (2.0.0)

public abstract class InstancesClient

Instances client wrapper, for convenient use.

Inheritance

Object > InstancesClient

Derived Types

Namespace

Google.Cloud.Compute.V1

Assembly

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
TypeDescription
OperationsClient

AddResourcePoliciesOperationsClient

public virtual OperationsClient AddResourcePoliciesOperationsClient { get; }

The long-running operations client for AddResourcePolicies.

Property Value
TypeDescription
OperationsClient

AttachDiskOperationsClient

public virtual OperationsClient AttachDiskOperationsClient { get; }

The long-running operations client for AttachDisk.

Property Value
TypeDescription
OperationsClient

BulkInsertOperationsClient

public virtual OperationsClient BulkInsertOperationsClient { get; }

The long-running operations client for BulkInsert.

Property Value
TypeDescription
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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Instances scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

DeleteAccessConfigOperationsClient

public virtual OperationsClient DeleteAccessConfigOperationsClient { get; }

The long-running operations client for DeleteAccessConfig.

Property Value
TypeDescription
OperationsClient

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient

DetachDiskOperationsClient

public virtual OperationsClient DetachDiskOperationsClient { get; }

The long-running operations client for DetachDisk.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Instances.InstancesClient GrpcClient { get; }

The underlying gRPC Instances client

Property Value
TypeDescription
Instances.InstancesClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient

RemoveResourcePoliciesOperationsClient

public virtual OperationsClient RemoveResourcePoliciesOperationsClient { get; }

The long-running operations client for RemoveResourcePolicies.

Property Value
TypeDescription
OperationsClient

ResetOperationsClient

public virtual OperationsClient ResetOperationsClient { get; }

The long-running operations client for Reset.

Property Value
TypeDescription
OperationsClient

ResumeOperationsClient

public virtual OperationsClient ResumeOperationsClient { get; }

The long-running operations client for Resume.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

SetDeletionProtectionOperationsClient

public virtual OperationsClient SetDeletionProtectionOperationsClient { get; }

The long-running operations client for SetDeletionProtection.

Property Value
TypeDescription
OperationsClient

SetDiskAutoDeleteOperationsClient

public virtual OperationsClient SetDiskAutoDeleteOperationsClient { get; }

The long-running operations client for SetDiskAutoDelete.

Property Value
TypeDescription
OperationsClient

SetLabelsOperationsClient

public virtual OperationsClient SetLabelsOperationsClient { get; }

The long-running operations client for SetLabels.

Property Value
TypeDescription
OperationsClient

SetMachineResourcesOperationsClient

public virtual OperationsClient SetMachineResourcesOperationsClient { get; }

The long-running operations client for SetMachineResources.

Property Value
TypeDescription
OperationsClient

SetMachineTypeOperationsClient

public virtual OperationsClient SetMachineTypeOperationsClient { get; }

The long-running operations client for SetMachineType.

Property Value
TypeDescription
OperationsClient

SetMetadataOperationsClient

public virtual OperationsClient SetMetadataOperationsClient { get; }

The long-running operations client for SetMetadata.

Property Value
TypeDescription
OperationsClient

SetMinCpuPlatformOperationsClient

public virtual OperationsClient SetMinCpuPlatformOperationsClient { get; }

The long-running operations client for SetMinCpuPlatform.

Property Value
TypeDescription
OperationsClient

SetSchedulingOperationsClient

public virtual OperationsClient SetSchedulingOperationsClient { get; }

The long-running operations client for SetScheduling.

Property Value
TypeDescription
OperationsClient

SetServiceAccountOperationsClient

public virtual OperationsClient SetServiceAccountOperationsClient { get; }

The long-running operations client for SetServiceAccount.

Property Value
TypeDescription
OperationsClient

SetShieldedInstanceIntegrityPolicyOperationsClient

public virtual OperationsClient SetShieldedInstanceIntegrityPolicyOperationsClient { get; }

The long-running operations client for SetShieldedInstanceIntegrityPolicy.

Property Value
TypeDescription
OperationsClient

SetTagsOperationsClient

public virtual OperationsClient SetTagsOperationsClient { get; }

The long-running operations client for SetTags.

Property Value
TypeDescription
OperationsClient

SimulateMaintenanceEventOperationsClient

public virtual OperationsClient SimulateMaintenanceEventOperationsClient { get; }

The long-running operations client for SimulateMaintenanceEvent.

Property Value
TypeDescription
OperationsClient

StartOperationsClient

public virtual OperationsClient StartOperationsClient { get; }

The long-running operations client for Start.

Property Value
TypeDescription
OperationsClient

StartWithEncryptionKeyOperationsClient

public virtual OperationsClient StartWithEncryptionKeyOperationsClient { get; }

The long-running operations client for StartWithEncryptionKey.

Property Value
TypeDescription
OperationsClient

StopOperationsClient

public virtual OperationsClient StopOperationsClient { get; }

The long-running operations client for Stop.

Property Value
TypeDescription
OperationsClient

SuspendOperationsClient

public virtual OperationsClient SuspendOperationsClient { get; }

The long-running operations client for Suspend.

Property Value
TypeDescription
OperationsClient

UpdateAccessConfigOperationsClient

public virtual OperationsClient UpdateAccessConfigOperationsClient { get; }

The long-running operations client for UpdateAccessConfig.

Property Value
TypeDescription
OperationsClient

UpdateDisplayDeviceOperationsClient

public virtual OperationsClient UpdateDisplayDeviceOperationsClient { get; }

The long-running operations client for UpdateDisplayDevice.

Property Value
TypeDescription
OperationsClient

UpdateNetworkInterfaceOperationsClient

public virtual OperationsClient UpdateNetworkInterfaceOperationsClient { get; }

The long-running operations client for UpdateNetworkInterface.

Property Value
TypeDescription
OperationsClient

UpdateOperationsClient

public virtual OperationsClient UpdateOperationsClient { get; }

The long-running operations client for Update.

Property Value
TypeDescription
OperationsClient

UpdateShieldedInstanceConfigOperationsClient

public virtual OperationsClient UpdateShieldedInstanceConfigOperationsClient { get; }

The long-running operations client for UpdateShieldedInstanceConfig.

Property Value
TypeDescription
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
NameDescription
requestAddAccessConfigInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

networkInterfaceString

The name of the network interface to add to this instance.

accessConfigResourceAccessConfig

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestAddAccessConfigInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestAddAccessConfigInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

networkInterfaceString

The name of the network interface to add to this instance.

accessConfigResourceAccessConfig

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

networkInterfaceString

The name of the network interface to add to this instance.

accessConfigResourceAccessConfig

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestAddResourcePoliciesInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

instancesAddResourcePoliciesRequestResourceInstancesAddResourcePoliciesRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestAddResourcePoliciesInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestAddResourcePoliciesInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

instancesAddResourcePoliciesRequestResourceInstancesAddResourcePoliciesRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

instancesAddResourcePoliciesRequestResourceInstancesAddResourcePoliciesRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestAggregatedListInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<InstanceAggregatedList, KeyValuePair<String, InstancesScopedList>>

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

Example
// 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, Nullable<Int32>, 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
NameDescription
projectString

Project ID for this request.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<InstanceAggregatedList, KeyValuePair<String, InstancesScopedList>>

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

Example
// 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
NameDescription
requestAggregatedListInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<InstanceAggregatedList, KeyValuePair<String, InstancesScopedList>>

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

Example
// 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, Nullable<Int32>, 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
NameDescription
projectString

Project ID for this request.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<InstanceAggregatedList, KeyValuePair<String, InstancesScopedList>>

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

Example
// 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
NameDescription
requestAttachDiskInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

attachedDiskResourceAttachedDisk

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestAttachDiskInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestAttachDiskInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

attachedDiskResourceAttachedDisk

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

attachedDiskResourceAttachedDisk

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
requestBulkInsertInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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.

Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

bulkInsertInstanceResourceResourceBulkInsertInstanceResource

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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.

Parameters
NameDescription
requestBulkInsertInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
requestBulkInsertInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

bulkInsertInstanceResourceResourceBulkInsertInstanceResource

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

bulkInsertInstanceResourceResourceBulkInsertInstanceResource

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
TypeDescription
InstancesClient

The created InstancesClient.

CreateAsync(CancellationToken)

public static Task<InstancesClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a InstancesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use InstancesClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<InstancesClient>

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
NameDescription
requestDeleteInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestDeleteAccessConfigInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

accessConfigString

The name of the access config to delete.

networkInterfaceString

The name of the network interface.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestDeleteAccessConfigInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteAccessConfigInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

accessConfigString

The name of the access config to delete.

networkInterfaceString

The name of the network interface.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

accessConfigString

The name of the access config to delete.

networkInterfaceString

The name of the network interface.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDetachDiskInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Instance name for this request.

deviceNameString

The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestDetachDiskInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDetachDiskInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Instance name for this request.

deviceNameString

The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Instance name for this request.

deviceNameString

The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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. Gets a list of available instances by making a list() request.

Parameters
NameDescription
requestGetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Instance

The RPC response.

Example
// 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. Gets a list of available instances by making a list() request.

Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Instance

The RPC response.

Example
// 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. Gets a list of available instances by making a list() request.

Parameters
NameDescription
requestGetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// 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. Gets a list of available instances by making a list() request.

Parameters
NameDescription
requestGetInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// 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. Gets a list of available instances by making a list() request.

Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// 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. Gets a list of available instances by making a list() request.

Parameters
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to return.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetEffectiveFirewallsInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InstancesGetEffectiveFirewallsResponse

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

networkInterfaceString

The name of the network interface to get the effective firewalls.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InstancesGetEffectiveFirewallsResponse

The RPC response.

Example
// 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
NameDescription
requestGetEffectiveFirewallsInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<InstancesGetEffectiveFirewallsResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetEffectiveFirewallsInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<InstancesGetEffectiveFirewallsResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

networkInterfaceString

The name of the network interface to get the effective firewalls.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<InstancesGetEffectiveFirewallsResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

networkInterfaceString

The name of the network interface to get the effective firewalls.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<InstancesGetEffectiveFirewallsResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetGuestAttributesInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
GuestAttributes

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
GuestAttributes

The RPC response.

Example
// 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
NameDescription
requestGetGuestAttributesInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<GuestAttributes>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetGuestAttributesInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<GuestAttributes>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<GuestAttributes>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<GuestAttributes>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetIamPolicyInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// 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
NameDescription
requestGetIamPolicyInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetIamPolicyInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetScreenshotInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Screenshot

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Screenshot

The RPC response.

Example
// 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
NameDescription
requestGetScreenshotInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Screenshot>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetScreenshotInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Screenshot>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Screenshot>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Screenshot>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetSerialPortOutputInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SerialPortOutput

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SerialPortOutput

The RPC response.

Example
// 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
NameDescription
requestGetSerialPortOutputInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SerialPortOutput>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetSerialPortOutputInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SerialPortOutput>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SerialPortOutput>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance for this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SerialPortOutput>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetShieldedInstanceIdentityInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ShieldedInstanceIdentity

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name or id of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ShieldedInstanceIdentity

The RPC response.

Example
// 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
NameDescription
requestGetShieldedInstanceIdentityInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ShieldedInstanceIdentity>

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetShieldedInstanceIdentityInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ShieldedInstanceIdentity>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name or id of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ShieldedInstanceIdentity>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name or id of the instance scoping this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ShieldedInstanceIdentity>

A Task containing the RPC response.

Example
// 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
NameDescription
requestInsertInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceResourceInstance

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestInsertInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestInsertInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceResourceInstance

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceResourceInstance

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestListInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<InstanceList, Instance>

A pageable sequence of Instance resources.

Example
// 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, Nullable<Int32>, 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<InstanceList, Instance>

A pageable sequence of Instance resources.

Example
// 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
NameDescription
requestListInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<InstanceList, Instance>

A pageable asynchronous sequence of Instance resources.

Example
// 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, Nullable<Int32>, 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<InstanceList, Instance>

A pageable asynchronous sequence of Instance resources.

Example
// 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
NameDescription
requestListReferrersInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<InstanceListReferrers, Reference>

A pageable sequence of Reference resources.

Example
// 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, Nullable<Int32>, 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<InstanceListReferrers, Reference>

A pageable sequence of Reference resources.

Example
// 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
NameDescription
requestListReferrersInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<InstanceListReferrers, Reference>

A pageable asynchronous sequence of Reference resources.

Example
// 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, Nullable<Int32>, 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<InstanceListReferrers, Reference>

A pageable asynchronous sequence of Reference resources.

Example
// 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

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
NameDescription
requestRemoveResourcePoliciesInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

instancesRemoveResourcePoliciesRequestResourceInstancesRemoveResourcePoliciesRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestRemoveResourcePoliciesInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestRemoveResourcePoliciesInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

instancesRemoveResourcePoliciesRequestResourceInstancesRemoveResourcePoliciesRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

instancesRemoveResourcePoliciesRequestResourceInstancesRemoveResourcePoliciesRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestResetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestResetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestResetInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestResumeInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to resume.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestResumeInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestResumeInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to resume.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to resume.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSendDiagnosticInterruptInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SendDiagnosticInterruptInstanceResponse

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
SendDiagnosticInterruptInstanceResponse

The RPC response.

Example
// 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
NameDescription
requestSendDiagnosticInterruptInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SendDiagnosticInterruptInstanceResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSendDiagnosticInterruptInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SendDiagnosticInterruptInstanceResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<SendDiagnosticInterruptInstanceResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<SendDiagnosticInterruptInstanceResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetDeletionProtectionInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSetDeletionProtectionInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetDeletionProtectionInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetDiskAutoDeleteInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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, Boolean, 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

autoDeleteBoolean

Whether to auto-delete the disk when the instance is deleted.

deviceNameString

The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSetDiskAutoDeleteInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetDiskAutoDeleteInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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, Boolean, 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

autoDeleteBoolean

Whether to auto-delete the disk when the instance is deleted.

deviceNameString

The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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, Boolean, 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

autoDeleteBoolean

Whether to auto-delete the disk when the instance is deleted.

deviceNameString

The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetIamPolicyInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

zoneSetPolicyRequestResourceZoneSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// 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
NameDescription
requestSetIamPolicyInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetIamPolicyInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

zoneSetPolicyRequestResourceZoneSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

zoneSetPolicyRequestResourceZoneSetPolicyRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetLabelsInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetLabelsRequestResourceInstancesSetLabelsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSetLabelsInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetLabelsInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetLabelsRequestResourceInstancesSetLabelsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetLabelsRequestResourceInstancesSetLabelsRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetMachineResourcesInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetMachineResourcesRequestResourceInstancesSetMachineResourcesRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSetMachineResourcesInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetMachineResourcesInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetMachineResourcesRequestResourceInstancesSetMachineResourcesRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetMachineResourcesRequestResourceInstancesSetMachineResourcesRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetMachineTypeInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetMachineTypeRequestResourceInstancesSetMachineTypeRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSetMachineTypeInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetMachineTypeInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetMachineTypeRequestResourceInstancesSetMachineTypeRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetMachineTypeRequestResourceInstancesSetMachineTypeRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetMetadataInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

metadataResourceMetadata

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSetMetadataInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetMetadataInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

metadataResourceMetadata

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

metadataResourceMetadata

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetMinCpuPlatformInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetMinCpuPlatformRequestResourceInstancesSetMinCpuPlatformRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSetMinCpuPlatformInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetMinCpuPlatformInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetMinCpuPlatformRequestResourceInstancesSetMinCpuPlatformRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

instancesSetMinCpuPlatformRequestResourceInstancesSetMinCpuPlatformRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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;
}

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
NameDescription
requestSetSchedulingInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Instance name for this request.

schedulingResourceScheduling

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSetSchedulingInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetSchedulingInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Instance name for this request.

schedulingResourceScheduling

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Instance name for this request.

schedulingResourceScheduling

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetServiceAccountInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to start.

instancesSetServiceAccountRequestResourceInstancesSetServiceAccountRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSetServiceAccountInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetServiceAccountInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to start.

instancesSetServiceAccountRequestResourceInstancesSetServiceAccountRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to start.

instancesSetServiceAccountRequestResourceInstancesSetServiceAccountRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetShieldedInstanceIntegrityPolicyInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name or id of the instance scoping this request.

shieldedInstanceIntegrityPolicyResourceShieldedInstanceIntegrityPolicy

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSetShieldedInstanceIntegrityPolicyInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetShieldedInstanceIntegrityPolicyInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name or id of the instance scoping this request.

shieldedInstanceIntegrityPolicyResourceShieldedInstanceIntegrityPolicy

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name or id of the instance scoping this request.

shieldedInstanceIntegrityPolicyResourceShieldedInstanceIntegrityPolicy

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetTagsInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

tagsResourceTags

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSetTagsInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSetTagsInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

tagsResourceTags

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

tagsResourceTags

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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
NameDescription
requestSimulateMaintenanceEventInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SimulateMaintenanceEventInstanceRequest request = new SimulateMaintenanceEventInstanceRequest
{
    Zone = "",
    Instance = "",
    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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSimulateMaintenanceEventInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SimulateMaintenanceEventInstanceRequest request = new SimulateMaintenanceEventInstanceRequest
{
    Zone = "",
    Instance = "",
    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
NameDescription
requestSimulateMaintenanceEventInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SimulateMaintenanceEventInstanceRequest request = new SimulateMaintenanceEventInstanceRequest
{
    Zone = "",
    Instance = "",
    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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestStartInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to start.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestStartInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestStartInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to start.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to start.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestStartWithEncryptionKeyInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to start.

instancesStartWithEncryptionKeyRequestResourceInstancesStartWithEncryptionKeyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestStartWithEncryptionKeyInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestStartWithEncryptionKeyInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to start.

instancesStartWithEncryptionKeyRequestResourceInstancesStartWithEncryptionKeyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to start.

instancesStartWithEncryptionKeyRequestResourceInstancesStartWithEncryptionKeyRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestStopInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest
{
    Zone = "",
    Instance = "",
    RequestId = "",
    Project = "",
};
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to stop.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestStopInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest
{
    Zone = "",
    Instance = "",
    RequestId = "",
    Project = "",
};
// 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
NameDescription
requestStopInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
StopInstanceRequest request = new StopInstanceRequest
{
    Zone = "",
    Instance = "",
    RequestId = "",
    Project = "",
};
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to stop.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to stop.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestSuspendInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
InstancesClient instancesClient = InstancesClient.Create();
// Initialize request argument(s)
SuspendInstanceRequest request = new SuspendInstanceRequest
{
    Zone = "",
    Instance = "",
    RequestId = "",
    Project = "",
};
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to suspend.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestSuspendInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SuspendInstanceRequest request = new SuspendInstanceRequest
{
    Zone = "",
    Instance = "",
    RequestId = "",
    Project = "",
};
// 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
NameDescription
requestSuspendInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
InstancesClient instancesClient = await InstancesClient.CreateAsync();
// Initialize request argument(s)
SuspendInstanceRequest request = new SuspendInstanceRequest
{
    Zone = "",
    Instance = "",
    RequestId = "",
    Project = "",
};
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to suspend.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to suspend.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestTestIamPermissionsInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestPermissionsResponse

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestPermissionsResponse

The RPC response.

Example
// 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
NameDescription
requestTestIamPermissionsInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestPermissionsResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
requestTestIamPermissionsInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestPermissionsResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestPermissionsResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<TestPermissionsResponse>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to update.

instanceResourceInstance

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestUpdateAccessConfigInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

networkInterfaceString

The name of the network interface where the access config is attached.

accessConfigResourceAccessConfig

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestUpdateAccessConfigInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateAccessConfigInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

networkInterfaceString

The name of the network interface where the access config is attached.

accessConfigResourceAccessConfig

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

networkInterfaceString

The name of the network interface where the access config is attached.

accessConfigResourceAccessConfig

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to update.

instanceResourceInstance

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance resource to update.

instanceResourceInstance

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateDisplayDeviceInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

displayDeviceResourceDisplayDevice

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestUpdateDisplayDeviceInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateDisplayDeviceInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

displayDeviceResourceDisplayDevice

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name of the instance scoping this request.

displayDeviceResourceDisplayDevice

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateNetworkInterfaceInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

networkInterfaceString

The name of the network interface to update.

networkInterfaceResourceNetworkInterface

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestUpdateNetworkInterfaceInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateNetworkInterfaceInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

networkInterfaceString

The name of the network interface to update.

networkInterfaceResourceNetworkInterface

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

The instance name for this request.

networkInterfaceString

The name of the network interface to update.

networkInterfaceResourceNetworkInterface

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateShieldedInstanceConfigInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name or id of the instance scoping this request.

shieldedInstanceConfigResourceShieldedInstanceConfig

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// 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
NameDescription
requestUpdateShieldedInstanceConfigInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateShieldedInstanceConfigInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name or id of the instance scoping this request.

shieldedInstanceConfigResourceShieldedInstanceConfig

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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
NameDescription
projectString

Project ID for this request.

zoneString

The name of the zone for this request.

instanceString

Name or id of the instance scoping this request.

shieldedInstanceConfigResourceShieldedInstanceConfig

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// 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;
}