Google Cloud Spanner Instance Administration v1 API - Class InstanceAdminClient (5.0.0-beta04)

public abstract class InstanceAdminClient

Reference documentation and code samples for the Google Cloud Spanner Instance Administration v1 API class InstanceAdminClient.

InstanceAdmin client wrapper, for convenient use.

Inheritance

object > InstanceAdminClient

Derived Types

Namespace

Google.Cloud.Spanner.Admin.Instance.V1

Assembly

Google.Cloud.Spanner.Admin.Instance.V1.dll

Remarks

Cloud Spanner Instance Admin API

The Cloud Spanner Instance Admin API can be used to create, delete, modify and list instances. Instances are dedicated Cloud Spanner serving and storage resources to be used by Cloud Spanner databases.

Each instance has a "configuration", which dictates where the serving resources for the Cloud Spanner instance are located (e.g., US-central, Europe). Configurations are created by Google based on resource availability.

Cloud Spanner billing is based on the instances that exist and their sizes. After an instance exists, there are no additional per-database or per-operation charges for use of the instance (though there may be additional network bandwidth charges). Instances offer isolation: problems with databases in one instance will not affect other instances. However, within an instance databases can affect each other. For example, if one database in an instance receives a lot of requests and consumes most of the instance resources, fewer resources are available for other databases in that instance, and their performance may suffer.

Properties

CreateInstanceConfigOperationsClient

public virtual OperationsClient CreateInstanceConfigOperationsClient { get; }

The long-running operations client for CreateInstanceConfig.

Property Value
Type Description
OperationsClient

CreateInstanceOperationsClient

public virtual OperationsClient CreateInstanceOperationsClient { get; }

The long-running operations client for CreateInstance.

Property Value
Type Description
OperationsClient

CreateInstancePartitionOperationsClient

public virtual OperationsClient CreateInstancePartitionOperationsClient { get; }

The long-running operations client for CreateInstancePartition.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the InstanceAdmin service, which is a host of "spanner.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default InstanceAdmin scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual InstanceAdmin.InstanceAdminClient GrpcClient { get; }

The underlying gRPC InstanceAdmin client

Property Value
Type Description
InstanceAdminInstanceAdminClient

MoveInstanceOperationsClient

public virtual OperationsClient MoveInstanceOperationsClient { get; }

The long-running operations client for MoveInstance.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UpdateInstanceConfigOperationsClient

public virtual OperationsClient UpdateInstanceConfigOperationsClient { get; }

The long-running operations client for UpdateInstanceConfig.

Property Value
Type Description
OperationsClient

UpdateInstanceOperationsClient

public virtual OperationsClient UpdateInstanceOperationsClient { get; }

The long-running operations client for UpdateInstance.

Property Value
Type Description
OperationsClient

UpdateInstancePartitionOperationsClient

public virtual OperationsClient UpdateInstancePartitionOperationsClient { get; }

The long-running operations client for UpdateInstancePartition.

Property Value
Type Description
OperationsClient

Methods

Create()

public static InstanceAdminClient Create()

Synchronously creates a InstanceAdminClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use InstanceAdminClientBuilder.

Returns
Type Description
InstanceAdminClient

The created InstanceAdminClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskInstanceAdminClient

The task representing the created InstanceAdminClient.

CreateInstance(ProjectName, string, Instance, CallSettings)

public virtual Operation<Instance, CreateInstanceMetadata> CreateInstance(ProjectName parent, string instanceId, Instance instance, CallSettings callSettings = null)

Creates an instance and begins preparing it to begin serving. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, CreateInstance returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance immediately unreadable via the API.
  • The instance can be deleted.
  • All other attempts to modify the instance are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can be created in the instance.
  • The instance's allocated resource levels are readable via the API.
  • The instance's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Parameters
Name Description
parent ProjectName

Required. The name of the project in which to create the instance. Values are of the form projects/<project>.

instanceId string

Required. The ID of the instance to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

instance Instance

Required. The instance to create. The name may be omitted, but if specified must be <parent>/instances/<instance_id>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceCreateInstanceMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, CreateInstanceMetadata> response = instanceAdminClient.CreateInstance(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, CreateInstanceMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, CreateInstanceMetadata> retrievedResponse = instanceAdminClient.PollOnceCreateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstance(CreateInstanceRequest, CallSettings)

public virtual Operation<Instance, CreateInstanceMetadata> CreateInstance(CreateInstanceRequest request, CallSettings callSettings = null)

Creates an instance and begins preparing it to begin serving. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, CreateInstance returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance immediately unreadable via the API.
  • The instance can be deleted.
  • All other attempts to modify the instance are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can be created in the instance.
  • The instance's allocated resource levels are readable via the API.
  • The instance's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Parameters
Name Description
request CreateInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceCreateInstanceMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    InstanceId = "",
    Instance = new Instance(),
};
// Make the request
Operation<Instance, CreateInstanceMetadata> response = instanceAdminClient.CreateInstance(request);

// Poll until the returned long-running operation is complete
Operation<Instance, CreateInstanceMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, CreateInstanceMetadata> retrievedResponse = instanceAdminClient.PollOnceCreateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstance(string, string, Instance, CallSettings)

public virtual Operation<Instance, CreateInstanceMetadata> CreateInstance(string parent, string instanceId, Instance instance, CallSettings callSettings = null)

Creates an instance and begins preparing it to begin serving. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, CreateInstance returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance immediately unreadable via the API.
  • The instance can be deleted.
  • All other attempts to modify the instance are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can be created in the instance.
  • The instance's allocated resource levels are readable via the API.
  • The instance's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Parameters
Name Description
parent string

Required. The name of the project in which to create the instance. Values are of the form projects/<project>.

instanceId string

Required. The ID of the instance to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

instance Instance

Required. The instance to create. The name may be omitted, but if specified must be <parent>/instances/<instance_id>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceCreateInstanceMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, CreateInstanceMetadata> response = instanceAdminClient.CreateInstance(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, CreateInstanceMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, CreateInstanceMetadata> retrievedResponse = instanceAdminClient.PollOnceCreateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(ProjectName, string, Instance, CallSettings)

public virtual Task<Operation<Instance, CreateInstanceMetadata>> CreateInstanceAsync(ProjectName parent, string instanceId, Instance instance, CallSettings callSettings = null)

Creates an instance and begins preparing it to begin serving. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, CreateInstance returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance immediately unreadable via the API.
  • The instance can be deleted.
  • All other attempts to modify the instance are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can be created in the instance.
  • The instance's allocated resource levels are readable via the API.
  • The instance's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Parameters
Name Description
parent ProjectName

Required. The name of the project in which to create the instance. Values are of the form projects/<project>.

instanceId string

Required. The ID of the instance to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

instance Instance

Required. The instance to create. The name may be omitted, but if specified must be <parent>/instances/<instance_id>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceCreateInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, CreateInstanceMetadata> response = await instanceAdminClient.CreateInstanceAsync(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, CreateInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, CreateInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(ProjectName, string, Instance, CancellationToken)

public virtual Task<Operation<Instance, CreateInstanceMetadata>> CreateInstanceAsync(ProjectName parent, string instanceId, Instance instance, CancellationToken cancellationToken)

Creates an instance and begins preparing it to begin serving. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, CreateInstance returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance immediately unreadable via the API.
  • The instance can be deleted.
  • All other attempts to modify the instance are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can be created in the instance.
  • The instance's allocated resource levels are readable via the API.
  • The instance's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Parameters
Name Description
parent ProjectName

Required. The name of the project in which to create the instance. Values are of the form projects/<project>.

instanceId string

Required. The ID of the instance to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

instance Instance

Required. The instance to create. The name may be omitted, but if specified must be <parent>/instances/<instance_id>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceCreateInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, CreateInstanceMetadata> response = await instanceAdminClient.CreateInstanceAsync(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, CreateInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, CreateInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(CreateInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, CreateInstanceMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CallSettings callSettings = null)

Creates an instance and begins preparing it to begin serving. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, CreateInstance returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance immediately unreadable via the API.
  • The instance can be deleted.
  • All other attempts to modify the instance are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can be created in the instance.
  • The instance's allocated resource levels are readable via the API.
  • The instance's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Parameters
Name Description
request CreateInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceCreateInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    InstanceId = "",
    Instance = new Instance(),
};
// Make the request
Operation<Instance, CreateInstanceMetadata> response = await instanceAdminClient.CreateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, CreateInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, CreateInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(CreateInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, CreateInstanceMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CancellationToken cancellationToken)

Creates an instance and begins preparing it to begin serving. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, CreateInstance returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance immediately unreadable via the API.
  • The instance can be deleted.
  • All other attempts to modify the instance are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can be created in the instance.
  • The instance's allocated resource levels are readable via the API.
  • The instance's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Parameters
Name Description
request CreateInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceCreateInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    InstanceId = "",
    Instance = new Instance(),
};
// Make the request
Operation<Instance, CreateInstanceMetadata> response = await instanceAdminClient.CreateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, CreateInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, CreateInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(string, string, Instance, CallSettings)

public virtual Task<Operation<Instance, CreateInstanceMetadata>> CreateInstanceAsync(string parent, string instanceId, Instance instance, CallSettings callSettings = null)

Creates an instance and begins preparing it to begin serving. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, CreateInstance returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance immediately unreadable via the API.
  • The instance can be deleted.
  • All other attempts to modify the instance are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can be created in the instance.
  • The instance's allocated resource levels are readable via the API.
  • The instance's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Parameters
Name Description
parent string

Required. The name of the project in which to create the instance. Values are of the form projects/<project>.

instanceId string

Required. The ID of the instance to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

instance Instance

Required. The instance to create. The name may be omitted, but if specified must be <parent>/instances/<instance_id>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceCreateInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, CreateInstanceMetadata> response = await instanceAdminClient.CreateInstanceAsync(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, CreateInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, CreateInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(string, string, Instance, CancellationToken)

public virtual Task<Operation<Instance, CreateInstanceMetadata>> CreateInstanceAsync(string parent, string instanceId, Instance instance, CancellationToken cancellationToken)

Creates an instance and begins preparing it to begin serving. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, CreateInstance returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance immediately unreadable via the API.
  • The instance can be deleted.
  • All other attempts to modify the instance are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can be created in the instance.
  • The instance's allocated resource levels are readable via the API.
  • The instance's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Parameters
Name Description
parent string

Required. The name of the project in which to create the instance. Values are of the form projects/<project>.

instanceId string

Required. The ID of the instance to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

instance Instance

Required. The instance to create. The name may be omitted, but if specified must be <parent>/instances/<instance_id>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceCreateInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, CreateInstanceMetadata> response = await instanceAdminClient.CreateInstanceAsync(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, CreateInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, CreateInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceConfig(ProjectName, InstanceConfig, string, CallSettings)

public virtual Operation<InstanceConfig, CreateInstanceConfigMetadata> CreateInstanceConfig(ProjectName parent, InstanceConfig instanceConfig, string instanceConfigId, CallSettings callSettings = null)

Creates an instance configuration and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance configuration. The instance configuration name is assigned by the caller. If the named instance configuration already exists, CreateInstanceConfig returns ALREADY_EXISTS.

Immediately after the request returns:

  • The instance configuration is readable via the API, with all requested attributes. The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true. Its state is CREATING.

While the operation is pending:

  • Cancelling the operation renders the instance configuration immediately unreadable via the API.
  • Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected.

Upon completion of the returned operation:

  • Instances can be created using the instance configuration.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false. Its state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.create permission on the resource [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].

Parameters
Name Description
parent ProjectName

Required. The name of the project in which to create the instance configuration. Values are of the form projects/<project>.

instanceConfig InstanceConfig

Required. The InstanceConfig proto of the configuration to create. instance_config.name must be <parent>/instanceConfigs/<instance_config_id>. instance_config.base_config must be a Google managed configuration name, e.g. <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.

instanceConfigId string

Required. The ID of the instance configuration to create. Valid identifiers are of the form custom-[-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length. The custom- prefix is required to avoid name conflicts with Google-managed configurations.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceConfigCreateInstanceConfigMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
InstanceConfig instanceConfig = new InstanceConfig();
string instanceConfigId = "";
// Make the request
Operation<InstanceConfig, CreateInstanceConfigMetadata> response = instanceAdminClient.CreateInstanceConfig(parent, instanceConfig, instanceConfigId);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, CreateInstanceConfigMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, CreateInstanceConfigMetadata> retrievedResponse = instanceAdminClient.PollOnceCreateInstanceConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

CreateInstanceConfig(CreateInstanceConfigRequest, CallSettings)

public virtual Operation<InstanceConfig, CreateInstanceConfigMetadata> CreateInstanceConfig(CreateInstanceConfigRequest request, CallSettings callSettings = null)

Creates an instance configuration and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance configuration. The instance configuration name is assigned by the caller. If the named instance configuration already exists, CreateInstanceConfig returns ALREADY_EXISTS.

Immediately after the request returns:

  • The instance configuration is readable via the API, with all requested attributes. The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true. Its state is CREATING.

While the operation is pending:

  • Cancelling the operation renders the instance configuration immediately unreadable via the API.
  • Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected.

Upon completion of the returned operation:

  • Instances can be created using the instance configuration.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false. Its state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.create permission on the resource [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].

Parameters
Name Description
request CreateInstanceConfigRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceConfigCreateInstanceConfigMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
CreateInstanceConfigRequest request = new CreateInstanceConfigRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    InstanceConfigId = "",
    InstanceConfig = new InstanceConfig(),
    ValidateOnly = false,
};
// Make the request
Operation<InstanceConfig, CreateInstanceConfigMetadata> response = instanceAdminClient.CreateInstanceConfig(request);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, CreateInstanceConfigMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, CreateInstanceConfigMetadata> retrievedResponse = instanceAdminClient.PollOnceCreateInstanceConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

CreateInstanceConfig(string, InstanceConfig, string, CallSettings)

public virtual Operation<InstanceConfig, CreateInstanceConfigMetadata> CreateInstanceConfig(string parent, InstanceConfig instanceConfig, string instanceConfigId, CallSettings callSettings = null)

Creates an instance configuration and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance configuration. The instance configuration name is assigned by the caller. If the named instance configuration already exists, CreateInstanceConfig returns ALREADY_EXISTS.

Immediately after the request returns:

  • The instance configuration is readable via the API, with all requested attributes. The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true. Its state is CREATING.

While the operation is pending:

  • Cancelling the operation renders the instance configuration immediately unreadable via the API.
  • Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected.

Upon completion of the returned operation:

  • Instances can be created using the instance configuration.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false. Its state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.create permission on the resource [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].

Parameters
Name Description
parent string

Required. The name of the project in which to create the instance configuration. Values are of the form projects/<project>.

instanceConfig InstanceConfig

Required. The InstanceConfig proto of the configuration to create. instance_config.name must be <parent>/instanceConfigs/<instance_config_id>. instance_config.base_config must be a Google managed configuration name, e.g. <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.

instanceConfigId string

Required. The ID of the instance configuration to create. Valid identifiers are of the form custom-[-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length. The custom- prefix is required to avoid name conflicts with Google-managed configurations.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceConfigCreateInstanceConfigMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
InstanceConfig instanceConfig = new InstanceConfig();
string instanceConfigId = "";
// Make the request
Operation<InstanceConfig, CreateInstanceConfigMetadata> response = instanceAdminClient.CreateInstanceConfig(parent, instanceConfig, instanceConfigId);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, CreateInstanceConfigMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, CreateInstanceConfigMetadata> retrievedResponse = instanceAdminClient.PollOnceCreateInstanceConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

CreateInstanceConfigAsync(ProjectName, InstanceConfig, string, CallSettings)

public virtual Task<Operation<InstanceConfig, CreateInstanceConfigMetadata>> CreateInstanceConfigAsync(ProjectName parent, InstanceConfig instanceConfig, string instanceConfigId, CallSettings callSettings = null)

Creates an instance configuration and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance configuration. The instance configuration name is assigned by the caller. If the named instance configuration already exists, CreateInstanceConfig returns ALREADY_EXISTS.

Immediately after the request returns:

  • The instance configuration is readable via the API, with all requested attributes. The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true. Its state is CREATING.

While the operation is pending:

  • Cancelling the operation renders the instance configuration immediately unreadable via the API.
  • Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected.

Upon completion of the returned operation:

  • Instances can be created using the instance configuration.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false. Its state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.create permission on the resource [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].

Parameters
Name Description
parent ProjectName

Required. The name of the project in which to create the instance configuration. Values are of the form projects/<project>.

instanceConfig InstanceConfig

Required. The InstanceConfig proto of the configuration to create. instance_config.name must be <parent>/instanceConfigs/<instance_config_id>. instance_config.base_config must be a Google managed configuration name, e.g. <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.

instanceConfigId string

Required. The ID of the instance configuration to create. Valid identifiers are of the form custom-[-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length. The custom- prefix is required to avoid name conflicts with Google-managed configurations.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceConfigCreateInstanceConfigMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
InstanceConfig instanceConfig = new InstanceConfig();
string instanceConfigId = "";
// Make the request
Operation<InstanceConfig, CreateInstanceConfigMetadata> response = await instanceAdminClient.CreateInstanceConfigAsync(parent, instanceConfig, instanceConfigId);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, CreateInstanceConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, CreateInstanceConfigMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

CreateInstanceConfigAsync(ProjectName, InstanceConfig, string, CancellationToken)

public virtual Task<Operation<InstanceConfig, CreateInstanceConfigMetadata>> CreateInstanceConfigAsync(ProjectName parent, InstanceConfig instanceConfig, string instanceConfigId, CancellationToken cancellationToken)

Creates an instance configuration and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance configuration. The instance configuration name is assigned by the caller. If the named instance configuration already exists, CreateInstanceConfig returns ALREADY_EXISTS.

Immediately after the request returns:

  • The instance configuration is readable via the API, with all requested attributes. The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true. Its state is CREATING.

While the operation is pending:

  • Cancelling the operation renders the instance configuration immediately unreadable via the API.
  • Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected.

Upon completion of the returned operation:

  • Instances can be created using the instance configuration.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false. Its state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.create permission on the resource [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].

Parameters
Name Description
parent ProjectName

Required. The name of the project in which to create the instance configuration. Values are of the form projects/<project>.

instanceConfig InstanceConfig

Required. The InstanceConfig proto of the configuration to create. instance_config.name must be <parent>/instanceConfigs/<instance_config_id>. instance_config.base_config must be a Google managed configuration name, e.g. <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.

instanceConfigId string

Required. The ID of the instance configuration to create. Valid identifiers are of the form custom-[-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length. The custom- prefix is required to avoid name conflicts with Google-managed configurations.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceConfigCreateInstanceConfigMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
InstanceConfig instanceConfig = new InstanceConfig();
string instanceConfigId = "";
// Make the request
Operation<InstanceConfig, CreateInstanceConfigMetadata> response = await instanceAdminClient.CreateInstanceConfigAsync(parent, instanceConfig, instanceConfigId);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, CreateInstanceConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, CreateInstanceConfigMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

CreateInstanceConfigAsync(CreateInstanceConfigRequest, CallSettings)

public virtual Task<Operation<InstanceConfig, CreateInstanceConfigMetadata>> CreateInstanceConfigAsync(CreateInstanceConfigRequest request, CallSettings callSettings = null)

Creates an instance configuration and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance configuration. The instance configuration name is assigned by the caller. If the named instance configuration already exists, CreateInstanceConfig returns ALREADY_EXISTS.

Immediately after the request returns:

  • The instance configuration is readable via the API, with all requested attributes. The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true. Its state is CREATING.

While the operation is pending:

  • Cancelling the operation renders the instance configuration immediately unreadable via the API.
  • Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected.

Upon completion of the returned operation:

  • Instances can be created using the instance configuration.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false. Its state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.create permission on the resource [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].

Parameters
Name Description
request CreateInstanceConfigRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceConfigCreateInstanceConfigMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceConfigRequest request = new CreateInstanceConfigRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    InstanceConfigId = "",
    InstanceConfig = new InstanceConfig(),
    ValidateOnly = false,
};
// Make the request
Operation<InstanceConfig, CreateInstanceConfigMetadata> response = await instanceAdminClient.CreateInstanceConfigAsync(request);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, CreateInstanceConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, CreateInstanceConfigMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

CreateInstanceConfigAsync(CreateInstanceConfigRequest, CancellationToken)

public virtual Task<Operation<InstanceConfig, CreateInstanceConfigMetadata>> CreateInstanceConfigAsync(CreateInstanceConfigRequest request, CancellationToken cancellationToken)

Creates an instance configuration and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance configuration. The instance configuration name is assigned by the caller. If the named instance configuration already exists, CreateInstanceConfig returns ALREADY_EXISTS.

Immediately after the request returns:

  • The instance configuration is readable via the API, with all requested attributes. The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true. Its state is CREATING.

While the operation is pending:

  • Cancelling the operation renders the instance configuration immediately unreadable via the API.
  • Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected.

Upon completion of the returned operation:

  • Instances can be created using the instance configuration.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false. Its state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.create permission on the resource [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].

Parameters
Name Description
request CreateInstanceConfigRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceConfigCreateInstanceConfigMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceConfigRequest request = new CreateInstanceConfigRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    InstanceConfigId = "",
    InstanceConfig = new InstanceConfig(),
    ValidateOnly = false,
};
// Make the request
Operation<InstanceConfig, CreateInstanceConfigMetadata> response = await instanceAdminClient.CreateInstanceConfigAsync(request);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, CreateInstanceConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, CreateInstanceConfigMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

CreateInstanceConfigAsync(string, InstanceConfig, string, CallSettings)

public virtual Task<Operation<InstanceConfig, CreateInstanceConfigMetadata>> CreateInstanceConfigAsync(string parent, InstanceConfig instanceConfig, string instanceConfigId, CallSettings callSettings = null)

Creates an instance configuration and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance configuration. The instance configuration name is assigned by the caller. If the named instance configuration already exists, CreateInstanceConfig returns ALREADY_EXISTS.

Immediately after the request returns:

  • The instance configuration is readable via the API, with all requested attributes. The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true. Its state is CREATING.

While the operation is pending:

  • Cancelling the operation renders the instance configuration immediately unreadable via the API.
  • Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected.

Upon completion of the returned operation:

  • Instances can be created using the instance configuration.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false. Its state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.create permission on the resource [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].

Parameters
Name Description
parent string

Required. The name of the project in which to create the instance configuration. Values are of the form projects/<project>.

instanceConfig InstanceConfig

Required. The InstanceConfig proto of the configuration to create. instance_config.name must be <parent>/instanceConfigs/<instance_config_id>. instance_config.base_config must be a Google managed configuration name, e.g. <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.

instanceConfigId string

Required. The ID of the instance configuration to create. Valid identifiers are of the form custom-[-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length. The custom- prefix is required to avoid name conflicts with Google-managed configurations.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceConfigCreateInstanceConfigMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
InstanceConfig instanceConfig = new InstanceConfig();
string instanceConfigId = "";
// Make the request
Operation<InstanceConfig, CreateInstanceConfigMetadata> response = await instanceAdminClient.CreateInstanceConfigAsync(parent, instanceConfig, instanceConfigId);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, CreateInstanceConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, CreateInstanceConfigMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

CreateInstanceConfigAsync(string, InstanceConfig, string, CancellationToken)

public virtual Task<Operation<InstanceConfig, CreateInstanceConfigMetadata>> CreateInstanceConfigAsync(string parent, InstanceConfig instanceConfig, string instanceConfigId, CancellationToken cancellationToken)

Creates an instance configuration and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance configuration. The instance configuration name is assigned by the caller. If the named instance configuration already exists, CreateInstanceConfig returns ALREADY_EXISTS.

Immediately after the request returns:

  • The instance configuration is readable via the API, with all requested attributes. The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true. Its state is CREATING.

While the operation is pending:

  • Cancelling the operation renders the instance configuration immediately unreadable via the API.
  • Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected.

Upon completion of the returned operation:

  • Instances can be created using the instance configuration.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false. Its state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.create permission on the resource [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].

Parameters
Name Description
parent string

Required. The name of the project in which to create the instance configuration. Values are of the form projects/<project>.

instanceConfig InstanceConfig

Required. The InstanceConfig proto of the configuration to create. instance_config.name must be <parent>/instanceConfigs/<instance_config_id>. instance_config.base_config must be a Google managed configuration name, e.g. <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.

instanceConfigId string

Required. The ID of the instance configuration to create. Valid identifiers are of the form custom-[-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length. The custom- prefix is required to avoid name conflicts with Google-managed configurations.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceConfigCreateInstanceConfigMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
InstanceConfig instanceConfig = new InstanceConfig();
string instanceConfigId = "";
// Make the request
Operation<InstanceConfig, CreateInstanceConfigMetadata> response = await instanceAdminClient.CreateInstanceConfigAsync(parent, instanceConfig, instanceConfigId);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, CreateInstanceConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, CreateInstanceConfigMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

CreateInstancePartition(CreateInstancePartitionRequest, CallSettings)

public virtual Operation<InstancePartition, CreateInstancePartitionMetadata> CreateInstancePartition(CreateInstancePartitionRequest request, CallSettings callSettings = null)

Creates an instance partition and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, CreateInstancePartition returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance partition immediately unreadable via the API.
  • The instance partition can be deleted.
  • All other attempts to modify the instance partition are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can start using this instance partition.
  • The instance partition's allocated resource levels are readable via the API.
  • The instance partition's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Parameters
Name Description
request CreateInstancePartitionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstancePartitionCreateInstancePartitionMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
CreateInstancePartitionRequest request = new CreateInstancePartitionRequest
{
    ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    InstancePartitionId = "",
    InstancePartition = new InstancePartition(),
};
// Make the request
Operation<InstancePartition, CreateInstancePartitionMetadata> response = instanceAdminClient.CreateInstancePartition(request);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, CreateInstancePartitionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, CreateInstancePartitionMetadata> retrievedResponse = instanceAdminClient.PollOnceCreateInstancePartition(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

CreateInstancePartition(InstanceName, InstancePartition, string, CallSettings)

public virtual Operation<InstancePartition, CreateInstancePartitionMetadata> CreateInstancePartition(InstanceName parent, InstancePartition instancePartition, string instancePartitionId, CallSettings callSettings = null)

Creates an instance partition and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, CreateInstancePartition returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance partition immediately unreadable via the API.
  • The instance partition can be deleted.
  • All other attempts to modify the instance partition are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can start using this instance partition.
  • The instance partition's allocated resource levels are readable via the API.
  • The instance partition's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Parameters
Name Description
parent Google.Cloud.Spanner.Common.V1.InstanceName

Required. The name of the instance in which to create the instance partition. Values are of the form projects/<project>/instances/<instance>.

instancePartition InstancePartition

Required. The instance partition to create. The instance_partition.name may be omitted, but if specified must be <parent>/instancePartitions/<instance_partition_id>.

instancePartitionId string

Required. The ID of the instance partition to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstancePartitionCreateInstancePartitionMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
InstancePartition instancePartition = new InstancePartition();
string instancePartitionId = "";
// Make the request
Operation<InstancePartition, CreateInstancePartitionMetadata> response = instanceAdminClient.CreateInstancePartition(parent, instancePartition, instancePartitionId);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, CreateInstancePartitionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, CreateInstancePartitionMetadata> retrievedResponse = instanceAdminClient.PollOnceCreateInstancePartition(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

CreateInstancePartition(string, InstancePartition, string, CallSettings)

public virtual Operation<InstancePartition, CreateInstancePartitionMetadata> CreateInstancePartition(string parent, InstancePartition instancePartition, string instancePartitionId, CallSettings callSettings = null)

Creates an instance partition and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, CreateInstancePartition returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance partition immediately unreadable via the API.
  • The instance partition can be deleted.
  • All other attempts to modify the instance partition are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can start using this instance partition.
  • The instance partition's allocated resource levels are readable via the API.
  • The instance partition's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Parameters
Name Description
parent string

Required. The name of the instance in which to create the instance partition. Values are of the form projects/<project>/instances/<instance>.

instancePartition InstancePartition

Required. The instance partition to create. The instance_partition.name may be omitted, but if specified must be <parent>/instancePartitions/<instance_partition_id>.

instancePartitionId string

Required. The ID of the instance partition to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstancePartitionCreateInstancePartitionMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
InstancePartition instancePartition = new InstancePartition();
string instancePartitionId = "";
// Make the request
Operation<InstancePartition, CreateInstancePartitionMetadata> response = instanceAdminClient.CreateInstancePartition(parent, instancePartition, instancePartitionId);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, CreateInstancePartitionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, CreateInstancePartitionMetadata> retrievedResponse = instanceAdminClient.PollOnceCreateInstancePartition(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

CreateInstancePartitionAsync(CreateInstancePartitionRequest, CallSettings)

public virtual Task<Operation<InstancePartition, CreateInstancePartitionMetadata>> CreateInstancePartitionAsync(CreateInstancePartitionRequest request, CallSettings callSettings = null)

Creates an instance partition and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, CreateInstancePartition returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance partition immediately unreadable via the API.
  • The instance partition can be deleted.
  • All other attempts to modify the instance partition are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can start using this instance partition.
  • The instance partition's allocated resource levels are readable via the API.
  • The instance partition's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Parameters
Name Description
request CreateInstancePartitionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstancePartitionCreateInstancePartitionMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
CreateInstancePartitionRequest request = new CreateInstancePartitionRequest
{
    ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    InstancePartitionId = "",
    InstancePartition = new InstancePartition(),
};
// Make the request
Operation<InstancePartition, CreateInstancePartitionMetadata> response = await instanceAdminClient.CreateInstancePartitionAsync(request);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, CreateInstancePartitionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, CreateInstancePartitionMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstancePartitionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

CreateInstancePartitionAsync(CreateInstancePartitionRequest, CancellationToken)

public virtual Task<Operation<InstancePartition, CreateInstancePartitionMetadata>> CreateInstancePartitionAsync(CreateInstancePartitionRequest request, CancellationToken cancellationToken)

Creates an instance partition and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, CreateInstancePartition returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance partition immediately unreadable via the API.
  • The instance partition can be deleted.
  • All other attempts to modify the instance partition are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can start using this instance partition.
  • The instance partition's allocated resource levels are readable via the API.
  • The instance partition's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Parameters
Name Description
request CreateInstancePartitionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstancePartitionCreateInstancePartitionMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
CreateInstancePartitionRequest request = new CreateInstancePartitionRequest
{
    ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    InstancePartitionId = "",
    InstancePartition = new InstancePartition(),
};
// Make the request
Operation<InstancePartition, CreateInstancePartitionMetadata> response = await instanceAdminClient.CreateInstancePartitionAsync(request);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, CreateInstancePartitionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, CreateInstancePartitionMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstancePartitionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

CreateInstancePartitionAsync(InstanceName, InstancePartition, string, CallSettings)

public virtual Task<Operation<InstancePartition, CreateInstancePartitionMetadata>> CreateInstancePartitionAsync(InstanceName parent, InstancePartition instancePartition, string instancePartitionId, CallSettings callSettings = null)

Creates an instance partition and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, CreateInstancePartition returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance partition immediately unreadable via the API.
  • The instance partition can be deleted.
  • All other attempts to modify the instance partition are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can start using this instance partition.
  • The instance partition's allocated resource levels are readable via the API.
  • The instance partition's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Parameters
Name Description
parent Google.Cloud.Spanner.Common.V1.InstanceName

Required. The name of the instance in which to create the instance partition. Values are of the form projects/<project>/instances/<instance>.

instancePartition InstancePartition

Required. The instance partition to create. The instance_partition.name may be omitted, but if specified must be <parent>/instancePartitions/<instance_partition_id>.

instancePartitionId string

Required. The ID of the instance partition to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstancePartitionCreateInstancePartitionMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
InstancePartition instancePartition = new InstancePartition();
string instancePartitionId = "";
// Make the request
Operation<InstancePartition, CreateInstancePartitionMetadata> response = await instanceAdminClient.CreateInstancePartitionAsync(parent, instancePartition, instancePartitionId);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, CreateInstancePartitionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, CreateInstancePartitionMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstancePartitionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

CreateInstancePartitionAsync(InstanceName, InstancePartition, string, CancellationToken)

public virtual Task<Operation<InstancePartition, CreateInstancePartitionMetadata>> CreateInstancePartitionAsync(InstanceName parent, InstancePartition instancePartition, string instancePartitionId, CancellationToken cancellationToken)

Creates an instance partition and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, CreateInstancePartition returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance partition immediately unreadable via the API.
  • The instance partition can be deleted.
  • All other attempts to modify the instance partition are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can start using this instance partition.
  • The instance partition's allocated resource levels are readable via the API.
  • The instance partition's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Parameters
Name Description
parent Google.Cloud.Spanner.Common.V1.InstanceName

Required. The name of the instance in which to create the instance partition. Values are of the form projects/<project>/instances/<instance>.

instancePartition InstancePartition

Required. The instance partition to create. The instance_partition.name may be omitted, but if specified must be <parent>/instancePartitions/<instance_partition_id>.

instancePartitionId string

Required. The ID of the instance partition to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstancePartitionCreateInstancePartitionMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
InstancePartition instancePartition = new InstancePartition();
string instancePartitionId = "";
// Make the request
Operation<InstancePartition, CreateInstancePartitionMetadata> response = await instanceAdminClient.CreateInstancePartitionAsync(parent, instancePartition, instancePartitionId);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, CreateInstancePartitionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, CreateInstancePartitionMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstancePartitionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

CreateInstancePartitionAsync(string, InstancePartition, string, CallSettings)

public virtual Task<Operation<InstancePartition, CreateInstancePartitionMetadata>> CreateInstancePartitionAsync(string parent, InstancePartition instancePartition, string instancePartitionId, CallSettings callSettings = null)

Creates an instance partition and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, CreateInstancePartition returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance partition immediately unreadable via the API.
  • The instance partition can be deleted.
  • All other attempts to modify the instance partition are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can start using this instance partition.
  • The instance partition's allocated resource levels are readable via the API.
  • The instance partition's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Parameters
Name Description
parent string

Required. The name of the instance in which to create the instance partition. Values are of the form projects/<project>/instances/<instance>.

instancePartition InstancePartition

Required. The instance partition to create. The instance_partition.name may be omitted, but if specified must be <parent>/instancePartitions/<instance_partition_id>.

instancePartitionId string

Required. The ID of the instance partition to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstancePartitionCreateInstancePartitionMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
InstancePartition instancePartition = new InstancePartition();
string instancePartitionId = "";
// Make the request
Operation<InstancePartition, CreateInstancePartitionMetadata> response = await instanceAdminClient.CreateInstancePartitionAsync(parent, instancePartition, instancePartitionId);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, CreateInstancePartitionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, CreateInstancePartitionMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstancePartitionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

CreateInstancePartitionAsync(string, InstancePartition, string, CancellationToken)

public virtual Task<Operation<InstancePartition, CreateInstancePartitionMetadata>> CreateInstancePartitionAsync(string parent, InstancePartition instancePartition, string instancePartitionId, CancellationToken cancellationToken)

Creates an instance partition and begins preparing it to be used. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, CreateInstancePartition returns ALREADY_EXISTS.

Immediately upon completion of this request:

  • The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING.

Until completion of the returned operation:

  • Cancelling the operation renders the instance partition immediately unreadable via the API.
  • The instance partition can be deleted.
  • All other attempts to modify the instance partition are rejected.

Upon completion of the returned operation:

  • Billing for all successfully-allocated resources begins (some types may have lower than the requested levels).
  • Databases can start using this instance partition.
  • The instance partition's allocated resource levels are readable via the API.
  • The instance partition's state becomes READY.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata] field type is [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Parameters
Name Description
parent string

Required. The name of the instance in which to create the instance partition. Values are of the form projects/<project>/instances/<instance>.

instancePartition InstancePartition

Required. The instance partition to create. The instance_partition.name may be omitted, but if specified must be <parent>/instancePartitions/<instance_partition_id>.

instancePartitionId string

Required. The ID of the instance partition to create. Valid identifiers are of the form [a-z][-a-z0-9]*[a-z0-9] and must be between 2 and 64 characters in length.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstancePartitionCreateInstancePartitionMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
InstancePartition instancePartition = new InstancePartition();
string instancePartitionId = "";
// Make the request
Operation<InstancePartition, CreateInstancePartitionMetadata> response = await instanceAdminClient.CreateInstancePartitionAsync(parent, instancePartition, instancePartitionId);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, CreateInstancePartitionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, CreateInstancePartitionMetadata> retrievedResponse = await instanceAdminClient.PollOnceCreateInstancePartitionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

DeleteInstance(DeleteInstanceRequest, CallSettings)

public virtual void DeleteInstance(DeleteInstanceRequest request, CallSettings callSettings = null)

Deletes an instance.

Immediately upon completion of the request:

  • Billing ceases for all of the instance's reserved resources.

Soon afterward:

  • The instance and all of its databases immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
Parameters
Name Description
request DeleteInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
};
// Make the request
instanceAdminClient.DeleteInstance(request);

DeleteInstance(InstanceName, CallSettings)

public virtual void DeleteInstance(InstanceName name, CallSettings callSettings = null)

Deletes an instance.

Immediately upon completion of the request:

  • Billing ceases for all of the instance's reserved resources.

Soon afterward:

  • The instance and all of its databases immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
Parameters
Name Description
name Google.Cloud.Spanner.Common.V1.InstanceName

Required. The name of the instance to be deleted. Values are of the form projects/<project>/instances/<instance>

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
// Make the request
instanceAdminClient.DeleteInstance(name);

DeleteInstance(string, CallSettings)

public virtual void DeleteInstance(string name, CallSettings callSettings = null)

Deletes an instance.

Immediately upon completion of the request:

  • Billing ceases for all of the instance's reserved resources.

Soon afterward:

  • The instance and all of its databases immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
Parameters
Name Description
name string

Required. The name of the instance to be deleted. Values are of the form projects/<project>/instances/<instance>

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]";
// Make the request
instanceAdminClient.DeleteInstance(name);

DeleteInstanceAsync(DeleteInstanceRequest, CallSettings)

public virtual Task DeleteInstanceAsync(DeleteInstanceRequest request, CallSettings callSettings = null)

Deletes an instance.

Immediately upon completion of the request:

  • Billing ceases for all of the instance's reserved resources.

Soon afterward:

  • The instance and all of its databases immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
Parameters
Name Description
request DeleteInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
};
// Make the request
await instanceAdminClient.DeleteInstanceAsync(request);

DeleteInstanceAsync(DeleteInstanceRequest, CancellationToken)

public virtual Task DeleteInstanceAsync(DeleteInstanceRequest request, CancellationToken cancellationToken)

Deletes an instance.

Immediately upon completion of the request:

  • Billing ceases for all of the instance's reserved resources.

Soon afterward:

  • The instance and all of its databases immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
Parameters
Name Description
request DeleteInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
};
// Make the request
await instanceAdminClient.DeleteInstanceAsync(request);

DeleteInstanceAsync(InstanceName, CallSettings)

public virtual Task DeleteInstanceAsync(InstanceName name, CallSettings callSettings = null)

Deletes an instance.

Immediately upon completion of the request:

  • Billing ceases for all of the instance's reserved resources.

Soon afterward:

  • The instance and all of its databases immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
Parameters
Name Description
name Google.Cloud.Spanner.Common.V1.InstanceName

Required. The name of the instance to be deleted. Values are of the form projects/<project>/instances/<instance>

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
// Make the request
await instanceAdminClient.DeleteInstanceAsync(name);

DeleteInstanceAsync(InstanceName, CancellationToken)

public virtual Task DeleteInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Deletes an instance.

Immediately upon completion of the request:

  • Billing ceases for all of the instance's reserved resources.

Soon afterward:

  • The instance and all of its databases immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
Parameters
Name Description
name Google.Cloud.Spanner.Common.V1.InstanceName

Required. The name of the instance to be deleted. Values are of the form projects/<project>/instances/<instance>

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
// Make the request
await instanceAdminClient.DeleteInstanceAsync(name);

DeleteInstanceAsync(string, CallSettings)

public virtual Task DeleteInstanceAsync(string name, CallSettings callSettings = null)

Deletes an instance.

Immediately upon completion of the request:

  • Billing ceases for all of the instance's reserved resources.

Soon afterward:

  • The instance and all of its databases immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
Parameters
Name Description
name string

Required. The name of the instance to be deleted. Values are of the form projects/<project>/instances/<instance>

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]";
// Make the request
await instanceAdminClient.DeleteInstanceAsync(name);

DeleteInstanceAsync(string, CancellationToken)

public virtual Task DeleteInstanceAsync(string name, CancellationToken cancellationToken)

Deletes an instance.

Immediately upon completion of the request:

  • Billing ceases for all of the instance's reserved resources.

Soon afterward:

  • The instance and all of its databases immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
Parameters
Name Description
name string

Required. The name of the instance to be deleted. Values are of the form projects/<project>/instances/<instance>

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]";
// Make the request
await instanceAdminClient.DeleteInstanceAsync(name);

DeleteInstanceConfig(DeleteInstanceConfigRequest, CallSettings)

public virtual void DeleteInstanceConfig(DeleteInstanceConfigRequest request, CallSettings callSettings = null)

Deletes the instance configuration. Deletion is only allowed when no instances are using the configuration. If any instances are using the configuration, returns FAILED_PRECONDITION.

Only user-managed configurations can be deleted.

Authorization requires spanner.instanceConfigs.delete permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
request DeleteInstanceConfigRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
DeleteInstanceConfigRequest request = new DeleteInstanceConfigRequest
{
    InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
    Etag = "",
    ValidateOnly = false,
};
// Make the request
instanceAdminClient.DeleteInstanceConfig(request);

DeleteInstanceConfig(InstanceConfigName, CallSettings)

public virtual void DeleteInstanceConfig(InstanceConfigName name, CallSettings callSettings = null)

Deletes the instance configuration. Deletion is only allowed when no instances are using the configuration. If any instances are using the configuration, returns FAILED_PRECONDITION.

Only user-managed configurations can be deleted.

Authorization requires spanner.instanceConfigs.delete permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
name InstanceConfigName

Required. The name of the instance configuration to be deleted. Values are of the form projects/<project>/instanceConfigs/<instance_config>

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
InstanceConfigName name = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]");
// Make the request
instanceAdminClient.DeleteInstanceConfig(name);

DeleteInstanceConfig(string, CallSettings)

public virtual void DeleteInstanceConfig(string name, CallSettings callSettings = null)

Deletes the instance configuration. Deletion is only allowed when no instances are using the configuration. If any instances are using the configuration, returns FAILED_PRECONDITION.

Only user-managed configurations can be deleted.

Authorization requires spanner.instanceConfigs.delete permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
name string

Required. The name of the instance configuration to be deleted. Values are of the form projects/<project>/instanceConfigs/<instance_config>

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instanceConfigs/[INSTANCE_CONFIG]";
// Make the request
instanceAdminClient.DeleteInstanceConfig(name);

DeleteInstanceConfigAsync(DeleteInstanceConfigRequest, CallSettings)

public virtual Task DeleteInstanceConfigAsync(DeleteInstanceConfigRequest request, CallSettings callSettings = null)

Deletes the instance configuration. Deletion is only allowed when no instances are using the configuration. If any instances are using the configuration, returns FAILED_PRECONDITION.

Only user-managed configurations can be deleted.

Authorization requires spanner.instanceConfigs.delete permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
request DeleteInstanceConfigRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceConfigRequest request = new DeleteInstanceConfigRequest
{
    InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
    Etag = "",
    ValidateOnly = false,
};
// Make the request
await instanceAdminClient.DeleteInstanceConfigAsync(request);

DeleteInstanceConfigAsync(DeleteInstanceConfigRequest, CancellationToken)

public virtual Task DeleteInstanceConfigAsync(DeleteInstanceConfigRequest request, CancellationToken cancellationToken)

Deletes the instance configuration. Deletion is only allowed when no instances are using the configuration. If any instances are using the configuration, returns FAILED_PRECONDITION.

Only user-managed configurations can be deleted.

Authorization requires spanner.instanceConfigs.delete permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
request DeleteInstanceConfigRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceConfigRequest request = new DeleteInstanceConfigRequest
{
    InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
    Etag = "",
    ValidateOnly = false,
};
// Make the request
await instanceAdminClient.DeleteInstanceConfigAsync(request);

DeleteInstanceConfigAsync(InstanceConfigName, CallSettings)

public virtual Task DeleteInstanceConfigAsync(InstanceConfigName name, CallSettings callSettings = null)

Deletes the instance configuration. Deletion is only allowed when no instances are using the configuration. If any instances are using the configuration, returns FAILED_PRECONDITION.

Only user-managed configurations can be deleted.

Authorization requires spanner.instanceConfigs.delete permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
name InstanceConfigName

Required. The name of the instance configuration to be deleted. Values are of the form projects/<project>/instanceConfigs/<instance_config>

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceConfigName name = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]");
// Make the request
await instanceAdminClient.DeleteInstanceConfigAsync(name);

DeleteInstanceConfigAsync(InstanceConfigName, CancellationToken)

public virtual Task DeleteInstanceConfigAsync(InstanceConfigName name, CancellationToken cancellationToken)

Deletes the instance configuration. Deletion is only allowed when no instances are using the configuration. If any instances are using the configuration, returns FAILED_PRECONDITION.

Only user-managed configurations can be deleted.

Authorization requires spanner.instanceConfigs.delete permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
name InstanceConfigName

Required. The name of the instance configuration to be deleted. Values are of the form projects/<project>/instanceConfigs/<instance_config>

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceConfigName name = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]");
// Make the request
await instanceAdminClient.DeleteInstanceConfigAsync(name);

DeleteInstanceConfigAsync(string, CallSettings)

public virtual Task DeleteInstanceConfigAsync(string name, CallSettings callSettings = null)

Deletes the instance configuration. Deletion is only allowed when no instances are using the configuration. If any instances are using the configuration, returns FAILED_PRECONDITION.

Only user-managed configurations can be deleted.

Authorization requires spanner.instanceConfigs.delete permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
name string

Required. The name of the instance configuration to be deleted. Values are of the form projects/<project>/instanceConfigs/<instance_config>

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instanceConfigs/[INSTANCE_CONFIG]";
// Make the request
await instanceAdminClient.DeleteInstanceConfigAsync(name);

DeleteInstanceConfigAsync(string, CancellationToken)

public virtual Task DeleteInstanceConfigAsync(string name, CancellationToken cancellationToken)

Deletes the instance configuration. Deletion is only allowed when no instances are using the configuration. If any instances are using the configuration, returns FAILED_PRECONDITION.

Only user-managed configurations can be deleted.

Authorization requires spanner.instanceConfigs.delete permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
name string

Required. The name of the instance configuration to be deleted. Values are of the form projects/<project>/instanceConfigs/<instance_config>

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instanceConfigs/[INSTANCE_CONFIG]";
// Make the request
await instanceAdminClient.DeleteInstanceConfigAsync(name);

DeleteInstancePartition(DeleteInstancePartitionRequest, CallSettings)

public virtual void DeleteInstancePartition(DeleteInstancePartitionRequest request, CallSettings callSettings = null)

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance.

Authorization requires spanner.instancePartitions.delete permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
request DeleteInstancePartitionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
DeleteInstancePartitionRequest request = new DeleteInstancePartitionRequest
{
    InstancePartitionName = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"),
    Etag = "",
};
// Make the request
instanceAdminClient.DeleteInstancePartition(request);

DeleteInstancePartition(InstancePartitionName, CallSettings)

public virtual void DeleteInstancePartition(InstancePartitionName name, CallSettings callSettings = null)

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance.

Authorization requires spanner.instancePartitions.delete permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
name InstancePartitionName

Required. The name of the instance partition to be deleted. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
InstancePartitionName name = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]");
// Make the request
instanceAdminClient.DeleteInstancePartition(name);

DeleteInstancePartition(string, CallSettings)

public virtual void DeleteInstancePartition(string name, CallSettings callSettings = null)

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance.

Authorization requires spanner.instancePartitions.delete permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
name string

Required. The name of the instance partition to be deleted. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]/instancePartitions/[INSTANCE_PARTITION]";
// Make the request
instanceAdminClient.DeleteInstancePartition(name);

DeleteInstancePartitionAsync(DeleteInstancePartitionRequest, CallSettings)

public virtual Task DeleteInstancePartitionAsync(DeleteInstancePartitionRequest request, CallSettings callSettings = null)

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance.

Authorization requires spanner.instancePartitions.delete permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
request DeleteInstancePartitionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteInstancePartitionRequest request = new DeleteInstancePartitionRequest
{
    InstancePartitionName = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"),
    Etag = "",
};
// Make the request
await instanceAdminClient.DeleteInstancePartitionAsync(request);

DeleteInstancePartitionAsync(DeleteInstancePartitionRequest, CancellationToken)

public virtual Task DeleteInstancePartitionAsync(DeleteInstancePartitionRequest request, CancellationToken cancellationToken)

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance.

Authorization requires spanner.instancePartitions.delete permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
request DeleteInstancePartitionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
DeleteInstancePartitionRequest request = new DeleteInstancePartitionRequest
{
    InstancePartitionName = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"),
    Etag = "",
};
// Make the request
await instanceAdminClient.DeleteInstancePartitionAsync(request);

DeleteInstancePartitionAsync(InstancePartitionName, CallSettings)

public virtual Task DeleteInstancePartitionAsync(InstancePartitionName name, CallSettings callSettings = null)

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance.

Authorization requires spanner.instancePartitions.delete permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
name InstancePartitionName

Required. The name of the instance partition to be deleted. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstancePartitionName name = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]");
// Make the request
await instanceAdminClient.DeleteInstancePartitionAsync(name);

DeleteInstancePartitionAsync(InstancePartitionName, CancellationToken)

public virtual Task DeleteInstancePartitionAsync(InstancePartitionName name, CancellationToken cancellationToken)

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance.

Authorization requires spanner.instancePartitions.delete permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
name InstancePartitionName

Required. The name of the instance partition to be deleted. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstancePartitionName name = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]");
// Make the request
await instanceAdminClient.DeleteInstancePartitionAsync(name);

DeleteInstancePartitionAsync(string, CallSettings)

public virtual Task DeleteInstancePartitionAsync(string name, CallSettings callSettings = null)

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance.

Authorization requires spanner.instancePartitions.delete permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
name string

Required. The name of the instance partition to be deleted. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]/instancePartitions/[INSTANCE_PARTITION]";
// Make the request
await instanceAdminClient.DeleteInstancePartitionAsync(name);

DeleteInstancePartitionAsync(string, CancellationToken)

public virtual Task DeleteInstancePartitionAsync(string name, CancellationToken cancellationToken)

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance.

Authorization requires spanner.instancePartitions.delete permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
name string

Required. The name of the instance partition to be deleted. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]/instancePartitions/[INSTANCE_PARTITION]";
// Make the request
await instanceAdminClient.DeleteInstancePartitionAsync(name);

GetIamPolicy(IResourceName, CallSettings)

public virtual Policy GetIamPolicy(IResourceName resource, CallSettings callSettings = null)

Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.

Authorization requires spanner.instances.getIamPolicy on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = instanceAdminClient.GetIamPolicy(resource);

GetIamPolicy(GetIamPolicyRequest, CallSettings)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.

Authorization requires spanner.instances.getIamPolicy on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
Name Description
request GetIamPolicyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = instanceAdminClient.GetIamPolicy(request);

GetIamPolicy(string, CallSettings)

public virtual Policy GetIamPolicy(string resource, CallSettings callSettings = null)

Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.

Authorization requires spanner.instances.getIamPolicy on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = instanceAdminClient.GetIamPolicy(resource);

GetIamPolicyAsync(IResourceName, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CallSettings callSettings = null)

Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.

Authorization requires spanner.instances.getIamPolicy on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await instanceAdminClient.GetIamPolicyAsync(resource);

GetIamPolicyAsync(IResourceName, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CancellationToken cancellationToken)

Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.

Authorization requires spanner.instances.getIamPolicy on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await instanceAdminClient.GetIamPolicyAsync(resource);

GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.

Authorization requires spanner.instances.getIamPolicy on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
Name Description
request GetIamPolicyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await instanceAdminClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)

Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.

Authorization requires spanner.instances.getIamPolicy on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
Name Description
request GetIamPolicyRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await instanceAdminClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(string, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(string resource, CallSettings callSettings = null)

Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.

Authorization requires spanner.instances.getIamPolicy on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await instanceAdminClient.GetIamPolicyAsync(resource);

GetIamPolicyAsync(string, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(string resource, CancellationToken cancellationToken)

Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.

Authorization requires spanner.instances.getIamPolicy on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await instanceAdminClient.GetIamPolicyAsync(resource);

GetInstance(GetInstanceRequest, CallSettings)

public virtual Instance GetInstance(GetInstanceRequest request, CallSettings callSettings = null)

Gets information about a particular instance.

Parameters
Name Description
request GetInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Instance

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    FieldMask = new FieldMask(),
};
// Make the request
Instance response = instanceAdminClient.GetInstance(request);

GetInstance(InstanceName, CallSettings)

public virtual Instance GetInstance(InstanceName name, CallSettings callSettings = null)

Gets information about a particular instance.

Parameters
Name Description
name Google.Cloud.Spanner.Common.V1.InstanceName

Required. The name of the requested instance. Values are of the form projects/<project>/instances/<instance>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Instance

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
// Make the request
Instance response = instanceAdminClient.GetInstance(name);

GetInstance(string, CallSettings)

public virtual Instance GetInstance(string name, CallSettings callSettings = null)

Gets information about a particular instance.

Parameters
Name Description
name string

Required. The name of the requested instance. Values are of the form projects/<project>/instances/<instance>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Instance

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]";
// Make the request
Instance response = instanceAdminClient.GetInstance(name);

GetInstanceAsync(GetInstanceRequest, CallSettings)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CallSettings callSettings = null)

Gets information about a particular instance.

Parameters
Name Description
request GetInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    FieldMask = new FieldMask(),
};
// Make the request
Instance response = await instanceAdminClient.GetInstanceAsync(request);

GetInstanceAsync(GetInstanceRequest, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CancellationToken cancellationToken)

Gets information about a particular instance.

Parameters
Name Description
request GetInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    FieldMask = new FieldMask(),
};
// Make the request
Instance response = await instanceAdminClient.GetInstanceAsync(request);

GetInstanceAsync(InstanceName, CallSettings)

public virtual Task<Instance> GetInstanceAsync(InstanceName name, CallSettings callSettings = null)

Gets information about a particular instance.

Parameters
Name Description
name Google.Cloud.Spanner.Common.V1.InstanceName

Required. The name of the requested instance. Values are of the form projects/<project>/instances/<instance>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
// Make the request
Instance response = await instanceAdminClient.GetInstanceAsync(name);

GetInstanceAsync(InstanceName, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Gets information about a particular instance.

Parameters
Name Description
name Google.Cloud.Spanner.Common.V1.InstanceName

Required. The name of the requested instance. Values are of the form projects/<project>/instances/<instance>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
// Make the request
Instance response = await instanceAdminClient.GetInstanceAsync(name);

GetInstanceAsync(string, CallSettings)

public virtual Task<Instance> GetInstanceAsync(string name, CallSettings callSettings = null)

Gets information about a particular instance.

Parameters
Name Description
name string

Required. The name of the requested instance. Values are of the form projects/<project>/instances/<instance>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]";
// Make the request
Instance response = await instanceAdminClient.GetInstanceAsync(name);

GetInstanceAsync(string, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(string name, CancellationToken cancellationToken)

Gets information about a particular instance.

Parameters
Name Description
name string

Required. The name of the requested instance. Values are of the form projects/<project>/instances/<instance>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstance

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]";
// Make the request
Instance response = await instanceAdminClient.GetInstanceAsync(name);

GetInstanceConfig(GetInstanceConfigRequest, CallSettings)

public virtual InstanceConfig GetInstanceConfig(GetInstanceConfigRequest request, CallSettings callSettings = null)

Gets information about a particular instance configuration.

Parameters
Name Description
request GetInstanceConfigRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
InstanceConfig

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
GetInstanceConfigRequest request = new GetInstanceConfigRequest
{
    InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
};
// Make the request
InstanceConfig response = instanceAdminClient.GetInstanceConfig(request);

GetInstanceConfig(InstanceConfigName, CallSettings)

public virtual InstanceConfig GetInstanceConfig(InstanceConfigName name, CallSettings callSettings = null)

Gets information about a particular instance configuration.

Parameters
Name Description
name InstanceConfigName

Required. The name of the requested instance configuration. Values are of the form projects/<project>/instanceConfigs/<config>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
InstanceConfig

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
InstanceConfigName name = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]");
// Make the request
InstanceConfig response = instanceAdminClient.GetInstanceConfig(name);

GetInstanceConfig(string, CallSettings)

public virtual InstanceConfig GetInstanceConfig(string name, CallSettings callSettings = null)

Gets information about a particular instance configuration.

Parameters
Name Description
name string

Required. The name of the requested instance configuration. Values are of the form projects/<project>/instanceConfigs/<config>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
InstanceConfig

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instanceConfigs/[INSTANCE_CONFIG]";
// Make the request
InstanceConfig response = instanceAdminClient.GetInstanceConfig(name);

GetInstanceConfigAsync(GetInstanceConfigRequest, CallSettings)

public virtual Task<InstanceConfig> GetInstanceConfigAsync(GetInstanceConfigRequest request, CallSettings callSettings = null)

Gets information about a particular instance configuration.

Parameters
Name Description
request GetInstanceConfigRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstanceConfig

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
GetInstanceConfigRequest request = new GetInstanceConfigRequest
{
    InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
};
// Make the request
InstanceConfig response = await instanceAdminClient.GetInstanceConfigAsync(request);

GetInstanceConfigAsync(GetInstanceConfigRequest, CancellationToken)

public virtual Task<InstanceConfig> GetInstanceConfigAsync(GetInstanceConfigRequest request, CancellationToken cancellationToken)

Gets information about a particular instance configuration.

Parameters
Name Description
request GetInstanceConfigRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstanceConfig

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
GetInstanceConfigRequest request = new GetInstanceConfigRequest
{
    InstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
};
// Make the request
InstanceConfig response = await instanceAdminClient.GetInstanceConfigAsync(request);

GetInstanceConfigAsync(InstanceConfigName, CallSettings)

public virtual Task<InstanceConfig> GetInstanceConfigAsync(InstanceConfigName name, CallSettings callSettings = null)

Gets information about a particular instance configuration.

Parameters
Name Description
name InstanceConfigName

Required. The name of the requested instance configuration. Values are of the form projects/<project>/instanceConfigs/<config>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstanceConfig

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceConfigName name = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]");
// Make the request
InstanceConfig response = await instanceAdminClient.GetInstanceConfigAsync(name);

GetInstanceConfigAsync(InstanceConfigName, CancellationToken)

public virtual Task<InstanceConfig> GetInstanceConfigAsync(InstanceConfigName name, CancellationToken cancellationToken)

Gets information about a particular instance configuration.

Parameters
Name Description
name InstanceConfigName

Required. The name of the requested instance configuration. Values are of the form projects/<project>/instanceConfigs/<config>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstanceConfig

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceConfigName name = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]");
// Make the request
InstanceConfig response = await instanceAdminClient.GetInstanceConfigAsync(name);

GetInstanceConfigAsync(string, CallSettings)

public virtual Task<InstanceConfig> GetInstanceConfigAsync(string name, CallSettings callSettings = null)

Gets information about a particular instance configuration.

Parameters
Name Description
name string

Required. The name of the requested instance configuration. Values are of the form projects/<project>/instanceConfigs/<config>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstanceConfig

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instanceConfigs/[INSTANCE_CONFIG]";
// Make the request
InstanceConfig response = await instanceAdminClient.GetInstanceConfigAsync(name);

GetInstanceConfigAsync(string, CancellationToken)

public virtual Task<InstanceConfig> GetInstanceConfigAsync(string name, CancellationToken cancellationToken)

Gets information about a particular instance configuration.

Parameters
Name Description
name string

Required. The name of the requested instance configuration. Values are of the form projects/<project>/instanceConfigs/<config>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstanceConfig

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instanceConfigs/[INSTANCE_CONFIG]";
// Make the request
InstanceConfig response = await instanceAdminClient.GetInstanceConfigAsync(name);

GetInstancePartition(GetInstancePartitionRequest, CallSettings)

public virtual InstancePartition GetInstancePartition(GetInstancePartitionRequest request, CallSettings callSettings = null)

Gets information about a particular instance partition.

Parameters
Name Description
request GetInstancePartitionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
InstancePartition

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
GetInstancePartitionRequest request = new GetInstancePartitionRequest
{
    InstancePartitionName = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"),
};
// Make the request
InstancePartition response = instanceAdminClient.GetInstancePartition(request);

GetInstancePartition(InstancePartitionName, CallSettings)

public virtual InstancePartition GetInstancePartition(InstancePartitionName name, CallSettings callSettings = null)

Gets information about a particular instance partition.

Parameters
Name Description
name InstancePartitionName

Required. The name of the requested instance partition. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
InstancePartition

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
InstancePartitionName name = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]");
// Make the request
InstancePartition response = instanceAdminClient.GetInstancePartition(name);

GetInstancePartition(string, CallSettings)

public virtual InstancePartition GetInstancePartition(string name, CallSettings callSettings = null)

Gets information about a particular instance partition.

Parameters
Name Description
name string

Required. The name of the requested instance partition. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
InstancePartition

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]/instancePartitions/[INSTANCE_PARTITION]";
// Make the request
InstancePartition response = instanceAdminClient.GetInstancePartition(name);

GetInstancePartitionAsync(GetInstancePartitionRequest, CallSettings)

public virtual Task<InstancePartition> GetInstancePartitionAsync(GetInstancePartitionRequest request, CallSettings callSettings = null)

Gets information about a particular instance partition.

Parameters
Name Description
request GetInstancePartitionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstancePartition

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
GetInstancePartitionRequest request = new GetInstancePartitionRequest
{
    InstancePartitionName = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"),
};
// Make the request
InstancePartition response = await instanceAdminClient.GetInstancePartitionAsync(request);

GetInstancePartitionAsync(GetInstancePartitionRequest, CancellationToken)

public virtual Task<InstancePartition> GetInstancePartitionAsync(GetInstancePartitionRequest request, CancellationToken cancellationToken)

Gets information about a particular instance partition.

Parameters
Name Description
request GetInstancePartitionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstancePartition

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
GetInstancePartitionRequest request = new GetInstancePartitionRequest
{
    InstancePartitionName = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]"),
};
// Make the request
InstancePartition response = await instanceAdminClient.GetInstancePartitionAsync(request);

GetInstancePartitionAsync(InstancePartitionName, CallSettings)

public virtual Task<InstancePartition> GetInstancePartitionAsync(InstancePartitionName name, CallSettings callSettings = null)

Gets information about a particular instance partition.

Parameters
Name Description
name InstancePartitionName

Required. The name of the requested instance partition. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstancePartition

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstancePartitionName name = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]");
// Make the request
InstancePartition response = await instanceAdminClient.GetInstancePartitionAsync(name);

GetInstancePartitionAsync(InstancePartitionName, CancellationToken)

public virtual Task<InstancePartition> GetInstancePartitionAsync(InstancePartitionName name, CancellationToken cancellationToken)

Gets information about a particular instance partition.

Parameters
Name Description
name InstancePartitionName

Required. The name of the requested instance partition. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstancePartition

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstancePartitionName name = InstancePartitionName.FromProjectInstanceInstancePartition("[PROJECT]", "[INSTANCE]", "[INSTANCE_PARTITION]");
// Make the request
InstancePartition response = await instanceAdminClient.GetInstancePartitionAsync(name);

GetInstancePartitionAsync(string, CallSettings)

public virtual Task<InstancePartition> GetInstancePartitionAsync(string name, CallSettings callSettings = null)

Gets information about a particular instance partition.

Parameters
Name Description
name string

Required. The name of the requested instance partition. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskInstancePartition

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]/instancePartitions/[INSTANCE_PARTITION]";
// Make the request
InstancePartition response = await instanceAdminClient.GetInstancePartitionAsync(name);

GetInstancePartitionAsync(string, CancellationToken)

public virtual Task<InstancePartition> GetInstancePartitionAsync(string name, CancellationToken cancellationToken)

Gets information about a particular instance partition.

Parameters
Name Description
name string

Required. The name of the requested instance partition. Values are of the form projects/{project}/instances/{instance}/instancePartitions/{instance_partition}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskInstancePartition

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/instances/[INSTANCE]/instancePartitions/[INSTANCE_PARTITION]";
// Make the request
InstancePartition response = await instanceAdminClient.GetInstancePartitionAsync(name);

ListInstanceConfigOperations(ProjectName, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstanceConfigOperationsResponse, Operation> ListInstanceConfigOperations(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the user-managed instance configuration [long-running operations][google.longrunning.Operation] in the given project. An instance configuration operation has a name of the form projects/<project>/instanceConfigs/<instance_config>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Parameters
Name Description
parent ProjectName

Required. The project of the instance configuration operations. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstanceConfigOperationsResponseOperation

A pageable sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListInstanceConfigOperationsResponse, Operation> response = instanceAdminClient.ListInstanceConfigOperations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Operation 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 (ListInstanceConfigOperationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstanceConfigOperations(ListInstanceConfigOperationsRequest, CallSettings)

public virtual PagedEnumerable<ListInstanceConfigOperationsResponse, Operation> ListInstanceConfigOperations(ListInstanceConfigOperationsRequest request, CallSettings callSettings = null)

Lists the user-managed instance configuration [long-running operations][google.longrunning.Operation] in the given project. An instance configuration operation has a name of the form projects/<project>/instanceConfigs/<instance_config>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Parameters
Name Description
request ListInstanceConfigOperationsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstanceConfigOperationsResponseOperation

A pageable sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
ListInstanceConfigOperationsRequest request = new ListInstanceConfigOperationsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListInstanceConfigOperationsResponse, Operation> response = instanceAdminClient.ListInstanceConfigOperations(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Operation 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 (ListInstanceConfigOperationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstanceConfigOperations(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstanceConfigOperationsResponse, Operation> ListInstanceConfigOperations(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the user-managed instance configuration [long-running operations][google.longrunning.Operation] in the given project. An instance configuration operation has a name of the form projects/<project>/instanceConfigs/<instance_config>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Parameters
Name Description
parent string

Required. The project of the instance configuration operations. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstanceConfigOperationsResponseOperation

A pageable sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListInstanceConfigOperationsResponse, Operation> response = instanceAdminClient.ListInstanceConfigOperations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Operation 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 (ListInstanceConfigOperationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstanceConfigOperationsAsync(ProjectName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstanceConfigOperationsResponse, Operation> ListInstanceConfigOperationsAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the user-managed instance configuration [long-running operations][google.longrunning.Operation] in the given project. An instance configuration operation has a name of the form projects/<project>/instanceConfigs/<instance_config>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Parameters
Name Description
parent ProjectName

Required. The project of the instance configuration operations. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstanceConfigOperationsResponseOperation

A pageable asynchronous sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListInstanceConfigOperationsResponse, Operation> response = instanceAdminClient.ListInstanceConfigOperationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Operation 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((ListInstanceConfigOperationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstanceConfigOperationsAsync(ListInstanceConfigOperationsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListInstanceConfigOperationsResponse, Operation> ListInstanceConfigOperationsAsync(ListInstanceConfigOperationsRequest request, CallSettings callSettings = null)

Lists the user-managed instance configuration [long-running operations][google.longrunning.Operation] in the given project. An instance configuration operation has a name of the form projects/<project>/instanceConfigs/<instance_config>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Parameters
Name Description
request ListInstanceConfigOperationsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstanceConfigOperationsResponseOperation

A pageable asynchronous sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ListInstanceConfigOperationsRequest request = new ListInstanceConfigOperationsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListInstanceConfigOperationsResponse, Operation> response = instanceAdminClient.ListInstanceConfigOperationsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Operation 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((ListInstanceConfigOperationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstanceConfigOperationsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstanceConfigOperationsResponse, Operation> ListInstanceConfigOperationsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the user-managed instance configuration [long-running operations][google.longrunning.Operation] in the given project. An instance configuration operation has a name of the form projects/<project>/instanceConfigs/<instance_config>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Parameters
Name Description
parent string

Required. The project of the instance configuration operations. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstanceConfigOperationsResponseOperation

A pageable asynchronous sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListInstanceConfigOperationsResponse, Operation> response = instanceAdminClient.ListInstanceConfigOperationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Operation 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((ListInstanceConfigOperationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstanceConfigs(ProjectName, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstanceConfigsResponse, InstanceConfig> ListInstanceConfigs(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the supported instance configurations for a given project.

Parameters
Name Description
parent ProjectName

Required. The name of the project for which a list of supported instance configurations is requested. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstanceConfigsResponseInstanceConfig

A pageable sequence of InstanceConfig resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListInstanceConfigsResponse, InstanceConfig> response = instanceAdminClient.ListInstanceConfigs(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (InstanceConfig 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 (ListInstanceConfigsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstanceConfig 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<InstanceConfig> 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 (InstanceConfig 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;

ListInstanceConfigs(ListInstanceConfigsRequest, CallSettings)

public virtual PagedEnumerable<ListInstanceConfigsResponse, InstanceConfig> ListInstanceConfigs(ListInstanceConfigsRequest request, CallSettings callSettings = null)

Lists the supported instance configurations for a given project.

Parameters
Name Description
request ListInstanceConfigsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstanceConfigsResponseInstanceConfig

A pageable sequence of InstanceConfig resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
ListInstanceConfigsRequest request = new ListInstanceConfigsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListInstanceConfigsResponse, InstanceConfig> response = instanceAdminClient.ListInstanceConfigs(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (InstanceConfig 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 (ListInstanceConfigsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstanceConfig 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<InstanceConfig> 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 (InstanceConfig 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;

ListInstanceConfigs(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstanceConfigsResponse, InstanceConfig> ListInstanceConfigs(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the supported instance configurations for a given project.

Parameters
Name Description
parent string

Required. The name of the project for which a list of supported instance configurations is requested. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstanceConfigsResponseInstanceConfig

A pageable sequence of InstanceConfig resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListInstanceConfigsResponse, InstanceConfig> response = instanceAdminClient.ListInstanceConfigs(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (InstanceConfig 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 (ListInstanceConfigsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstanceConfig 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<InstanceConfig> 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 (InstanceConfig 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;

ListInstanceConfigsAsync(ProjectName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstanceConfigsResponse, InstanceConfig> ListInstanceConfigsAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the supported instance configurations for a given project.

Parameters
Name Description
parent ProjectName

Required. The name of the project for which a list of supported instance configurations is requested. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstanceConfigsResponseInstanceConfig

A pageable asynchronous sequence of InstanceConfig resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListInstanceConfigsResponse, InstanceConfig> response = instanceAdminClient.ListInstanceConfigsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((InstanceConfig 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((ListInstanceConfigsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstanceConfig 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<InstanceConfig> 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 (InstanceConfig 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;

ListInstanceConfigsAsync(ListInstanceConfigsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListInstanceConfigsResponse, InstanceConfig> ListInstanceConfigsAsync(ListInstanceConfigsRequest request, CallSettings callSettings = null)

Lists the supported instance configurations for a given project.

Parameters
Name Description
request ListInstanceConfigsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstanceConfigsResponseInstanceConfig

A pageable asynchronous sequence of InstanceConfig resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ListInstanceConfigsRequest request = new ListInstanceConfigsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListInstanceConfigsResponse, InstanceConfig> response = instanceAdminClient.ListInstanceConfigsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((InstanceConfig 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((ListInstanceConfigsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstanceConfig 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<InstanceConfig> 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 (InstanceConfig 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;

ListInstanceConfigsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstanceConfigsResponse, InstanceConfig> ListInstanceConfigsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the supported instance configurations for a given project.

Parameters
Name Description
parent string

Required. The name of the project for which a list of supported instance configurations is requested. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstanceConfigsResponseInstanceConfig

A pageable asynchronous sequence of InstanceConfig resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListInstanceConfigsResponse, InstanceConfig> response = instanceAdminClient.ListInstanceConfigsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((InstanceConfig 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((ListInstanceConfigsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstanceConfig 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<InstanceConfig> 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 (InstanceConfig 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;

ListInstancePartitionOperations(ListInstancePartitionOperationsRequest, CallSettings)

public virtual PagedEnumerable<ListInstancePartitionOperationsResponse, Operation> ListInstancePartitionOperations(ListInstancePartitionOperationsRequest request, CallSettings callSettings = null)

Lists instance partition [long-running operations][google.longrunning.Operation] in the given instance. An instance partition operation has a name of the form projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Authorization requires spanner.instancePartitionOperations.list permission on the resource [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].

Parameters
Name Description
request ListInstancePartitionOperationsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstancePartitionOperationsResponseOperation

A pageable sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
ListInstancePartitionOperationsRequest request = new ListInstancePartitionOperationsRequest
{
    ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    Filter = "",
    InstancePartitionDeadline = new Timestamp(),
};
// Make the request
PagedEnumerable<ListInstancePartitionOperationsResponse, Operation> response = instanceAdminClient.ListInstancePartitionOperations(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Operation 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 (ListInstancePartitionOperationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstancePartitionOperations(InstanceName, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstancePartitionOperationsResponse, Operation> ListInstancePartitionOperations(InstanceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists instance partition [long-running operations][google.longrunning.Operation] in the given instance. An instance partition operation has a name of the form projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Authorization requires spanner.instancePartitionOperations.list permission on the resource [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].

Parameters
Name Description
parent Google.Cloud.Spanner.Common.V1.InstanceName

Required. The parent instance of the instance partition operations. Values are of the form projects/<project>/instances/<instance>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstancePartitionOperationsResponseOperation

A pageable sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
// Make the request
PagedEnumerable<ListInstancePartitionOperationsResponse, Operation> response = instanceAdminClient.ListInstancePartitionOperations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Operation 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 (ListInstancePartitionOperationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstancePartitionOperations(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstancePartitionOperationsResponse, Operation> ListInstancePartitionOperations(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists instance partition [long-running operations][google.longrunning.Operation] in the given instance. An instance partition operation has a name of the form projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Authorization requires spanner.instancePartitionOperations.list permission on the resource [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].

Parameters
Name Description
parent string

Required. The parent instance of the instance partition operations. Values are of the form projects/<project>/instances/<instance>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstancePartitionOperationsResponseOperation

A pageable sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
// Make the request
PagedEnumerable<ListInstancePartitionOperationsResponse, Operation> response = instanceAdminClient.ListInstancePartitionOperations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Operation 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 (ListInstancePartitionOperationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstancePartitionOperationsAsync(ListInstancePartitionOperationsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancePartitionOperationsResponse, Operation> ListInstancePartitionOperationsAsync(ListInstancePartitionOperationsRequest request, CallSettings callSettings = null)

Lists instance partition [long-running operations][google.longrunning.Operation] in the given instance. An instance partition operation has a name of the form projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Authorization requires spanner.instancePartitionOperations.list permission on the resource [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].

Parameters
Name Description
request ListInstancePartitionOperationsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstancePartitionOperationsResponseOperation

A pageable asynchronous sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ListInstancePartitionOperationsRequest request = new ListInstancePartitionOperationsRequest
{
    ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    Filter = "",
    InstancePartitionDeadline = new Timestamp(),
};
// Make the request
PagedAsyncEnumerable<ListInstancePartitionOperationsResponse, Operation> response = instanceAdminClient.ListInstancePartitionOperationsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Operation 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((ListInstancePartitionOperationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstancePartitionOperationsAsync(InstanceName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancePartitionOperationsResponse, Operation> ListInstancePartitionOperationsAsync(InstanceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists instance partition [long-running operations][google.longrunning.Operation] in the given instance. An instance partition operation has a name of the form projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Authorization requires spanner.instancePartitionOperations.list permission on the resource [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].

Parameters
Name Description
parent Google.Cloud.Spanner.Common.V1.InstanceName

Required. The parent instance of the instance partition operations. Values are of the form projects/<project>/instances/<instance>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstancePartitionOperationsResponseOperation

A pageable asynchronous sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
// Make the request
PagedAsyncEnumerable<ListInstancePartitionOperationsResponse, Operation> response = instanceAdminClient.ListInstancePartitionOperationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Operation 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((ListInstancePartitionOperationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstancePartitionOperationsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancePartitionOperationsResponse, Operation> ListInstancePartitionOperationsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists instance partition [long-running operations][google.longrunning.Operation] in the given instance. An instance partition operation has a name of the form projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.start_time in descending order starting from the most recently started operation.

Authorization requires spanner.instancePartitionOperations.list permission on the resource [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].

Parameters
Name Description
parent string

Required. The parent instance of the instance partition operations. Values are of the form projects/<project>/instances/<instance>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstancePartitionOperationsResponseOperation

A pageable asynchronous sequence of Operation resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
// Make the request
PagedAsyncEnumerable<ListInstancePartitionOperationsResponse, Operation> response = instanceAdminClient.ListInstancePartitionOperationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Operation 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((ListInstancePartitionOperationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Operation 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<Operation> 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 (Operation 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;

ListInstancePartitions(ListInstancePartitionsRequest, CallSettings)

public virtual PagedEnumerable<ListInstancePartitionsResponse, InstancePartition> ListInstancePartitions(ListInstancePartitionsRequest request, CallSettings callSettings = null)

Lists all instance partitions for the given instance.

Parameters
Name Description
request ListInstancePartitionsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstancePartitionsResponseInstancePartition

A pageable sequence of InstancePartition resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
ListInstancePartitionsRequest request = new ListInstancePartitionsRequest
{
    ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    InstancePartitionDeadline = new Timestamp(),
};
// Make the request
PagedEnumerable<ListInstancePartitionsResponse, InstancePartition> response = instanceAdminClient.ListInstancePartitions(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (InstancePartition 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 (ListInstancePartitionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstancePartition 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<InstancePartition> 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 (InstancePartition 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;

ListInstancePartitions(InstanceName, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstancePartitionsResponse, InstancePartition> ListInstancePartitions(InstanceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all instance partitions for the given instance.

Parameters
Name Description
parent Google.Cloud.Spanner.Common.V1.InstanceName

Required. The instance whose instance partitions should be listed. Values are of the form projects/<project>/instances/<instance>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstancePartitionsResponseInstancePartition

A pageable sequence of InstancePartition resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
// Make the request
PagedEnumerable<ListInstancePartitionsResponse, InstancePartition> response = instanceAdminClient.ListInstancePartitions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (InstancePartition 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 (ListInstancePartitionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstancePartition 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<InstancePartition> 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 (InstancePartition 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;

ListInstancePartitions(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstancePartitionsResponse, InstancePartition> ListInstancePartitions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all instance partitions for the given instance.

Parameters
Name Description
parent string

Required. The instance whose instance partitions should be listed. Values are of the form projects/<project>/instances/<instance>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstancePartitionsResponseInstancePartition

A pageable sequence of InstancePartition resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
// Make the request
PagedEnumerable<ListInstancePartitionsResponse, InstancePartition> response = instanceAdminClient.ListInstancePartitions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (InstancePartition 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 (ListInstancePartitionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstancePartition 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<InstancePartition> 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 (InstancePartition 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;

ListInstancePartitionsAsync(ListInstancePartitionsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancePartitionsResponse, InstancePartition> ListInstancePartitionsAsync(ListInstancePartitionsRequest request, CallSettings callSettings = null)

Lists all instance partitions for the given instance.

Parameters
Name Description
request ListInstancePartitionsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstancePartitionsResponseInstancePartition

A pageable asynchronous sequence of InstancePartition resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ListInstancePartitionsRequest request = new ListInstancePartitionsRequest
{
    ParentAsInstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    InstancePartitionDeadline = new Timestamp(),
};
// Make the request
PagedAsyncEnumerable<ListInstancePartitionsResponse, InstancePartition> response = instanceAdminClient.ListInstancePartitionsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((InstancePartition 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((ListInstancePartitionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstancePartition 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<InstancePartition> 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 (InstancePartition 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;

ListInstancePartitionsAsync(InstanceName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancePartitionsResponse, InstancePartition> ListInstancePartitionsAsync(InstanceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all instance partitions for the given instance.

Parameters
Name Description
parent Google.Cloud.Spanner.Common.V1.InstanceName

Required. The instance whose instance partitions should be listed. Values are of the form projects/<project>/instances/<instance>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstancePartitionsResponseInstancePartition

A pageable asynchronous sequence of InstancePartition resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]");
// Make the request
PagedAsyncEnumerable<ListInstancePartitionsResponse, InstancePartition> response = instanceAdminClient.ListInstancePartitionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((InstancePartition 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((ListInstancePartitionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstancePartition 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<InstancePartition> 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 (InstancePartition 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;

ListInstancePartitionsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancePartitionsResponse, InstancePartition> ListInstancePartitionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all instance partitions for the given instance.

Parameters
Name Description
parent string

Required. The instance whose instance partitions should be listed. Values are of the form projects/<project>/instances/<instance>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstancePartitionsResponseInstancePartition

A pageable asynchronous sequence of InstancePartition resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/instances/[INSTANCE]";
// Make the request
PagedAsyncEnumerable<ListInstancePartitionsResponse, InstancePartition> response = instanceAdminClient.ListInstancePartitionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((InstancePartition 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((ListInstancePartitionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (InstancePartition 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<InstancePartition> 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 (InstancePartition 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;

ListInstances(ProjectName, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all instances in the given project.

Parameters
Name Description
parent ProjectName

Required. The name of the project for which a list of instances is requested. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstancesResponseInstance

A pageable sequence of Instance resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = instanceAdminClient.ListInstances(parent);

// 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 (ListInstancesResponse 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;

ListInstances(ListInstancesRequest, CallSettings)

public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(ListInstancesRequest request, CallSettings callSettings = null)

Lists all instances in the given project.

Parameters
Name Description
request ListInstancesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstancesResponseInstance

A pageable sequence of Instance resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
    InstanceDeadline = new Timestamp(),
};
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = instanceAdminClient.ListInstances(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 (ListInstancesResponse 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;

ListInstances(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all instances in the given project.

Parameters
Name Description
parent string

Required. The name of the project for which a list of instances is requested. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListInstancesResponseInstance

A pageable sequence of Instance resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = instanceAdminClient.ListInstances(parent);

// 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 (ListInstancesResponse 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;

ListInstancesAsync(ProjectName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all instances in the given project.

Parameters
Name Description
parent ProjectName

Required. The name of the project for which a list of instances is requested. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstancesResponseInstance

A pageable asynchronous sequence of Instance resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = instanceAdminClient.ListInstancesAsync(parent);

// 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((ListInstancesResponse 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;

ListInstancesAsync(ListInstancesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(ListInstancesRequest request, CallSettings callSettings = null)

Lists all instances in the given project.

Parameters
Name Description
request ListInstancesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstancesResponseInstance

A pageable asynchronous sequence of Instance resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Filter = "",
    InstanceDeadline = new Timestamp(),
};
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = instanceAdminClient.ListInstancesAsync(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((ListInstancesResponse 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;

ListInstancesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all instances in the given project.

Parameters
Name Description
parent string

Required. The name of the project for which a list of instances is requested. Values are of the form projects/<project>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListInstancesResponseInstance

A pageable asynchronous sequence of Instance resources.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = instanceAdminClient.ListInstancesAsync(parent);

// 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((ListInstancesResponse 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;

MoveInstance(MoveInstanceRequest, CallSettings)

public virtual Operation<MoveInstanceResponse, MoveInstanceMetadata> MoveInstance(MoveInstanceRequest request, CallSettings callSettings = null)

Moves an instance to the target instance configuration. You can use the returned [long-running operation][google.longrunning.Operation] to track the progress of moving the instance.

MoveInstance returns FAILED_PRECONDITION if the instance meets any of the following criteria:

  • Is undergoing a move to a different instance configuration
  • Has backups
  • Has an ongoing update
  • Contains any CMEK-enabled databases
  • Is a free trial instance

While the operation is pending:

  • All other attempts to modify the instance, including changes to its compute capacity, are rejected.
  • The following database and backup admin operations are rejected:

  • DatabaseAdmin.CreateDatabase

  • DatabaseAdmin.UpdateDatabaseDdl (disabled if default_leader is specified in the request.)
  • DatabaseAdmin.RestoreDatabase
  • DatabaseAdmin.CreateBackup
  • DatabaseAdmin.CopyBackup

  • Both the source and target instance configurations are subject to hourly compute and storage charges.

  • The instance might experience higher read-write latencies and a higher transaction abort rate. However, moving an instance doesn't cause any downtime.

The returned [long-running operation][google.longrunning.Operation] has a name of the format <instance_name>/operations/<operation_id> and can be used to track the move instance operation. The [metadata][google.longrunning.Operation.metadata] field type is [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful. Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time]. Cancellation is not immediate because it involves moving any data previously moved to the target instance configuration back to the original instance configuration. You can use this operation to track the progress of the cancellation. Upon successful completion of the cancellation, the operation terminates with CANCELLED status.

If not cancelled, upon completion of the returned operation:

  • The instance successfully moves to the target instance configuration.
  • You are billed for compute and storage in target instance configuration.

Authorization requires the spanner.instances.update permission on the resource [instance][google.spanner.admin.instance.v1.Instance].

For more details, see Move an instance.

Parameters
Name Description
request MoveInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMoveInstanceResponseMoveInstanceMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
MoveInstanceRequest request = new MoveInstanceRequest
{
    InstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    TargetConfigAsInstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
};
// Make the request
Operation<MoveInstanceResponse, MoveInstanceMetadata> response = instanceAdminClient.MoveInstance(request);

// Poll until the returned long-running operation is complete
Operation<MoveInstanceResponse, MoveInstanceMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
MoveInstanceResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MoveInstanceResponse, MoveInstanceMetadata> retrievedResponse = instanceAdminClient.PollOnceMoveInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MoveInstanceResponse retrievedResult = retrievedResponse.Result;
}

MoveInstanceAsync(MoveInstanceRequest, CallSettings)

public virtual Task<Operation<MoveInstanceResponse, MoveInstanceMetadata>> MoveInstanceAsync(MoveInstanceRequest request, CallSettings callSettings = null)

Moves an instance to the target instance configuration. You can use the returned [long-running operation][google.longrunning.Operation] to track the progress of moving the instance.

MoveInstance returns FAILED_PRECONDITION if the instance meets any of the following criteria:

  • Is undergoing a move to a different instance configuration
  • Has backups
  • Has an ongoing update
  • Contains any CMEK-enabled databases
  • Is a free trial instance

While the operation is pending:

  • All other attempts to modify the instance, including changes to its compute capacity, are rejected.
  • The following database and backup admin operations are rejected:

  • DatabaseAdmin.CreateDatabase

  • DatabaseAdmin.UpdateDatabaseDdl (disabled if default_leader is specified in the request.)
  • DatabaseAdmin.RestoreDatabase
  • DatabaseAdmin.CreateBackup
  • DatabaseAdmin.CopyBackup

  • Both the source and target instance configurations are subject to hourly compute and storage charges.

  • The instance might experience higher read-write latencies and a higher transaction abort rate. However, moving an instance doesn't cause any downtime.

The returned [long-running operation][google.longrunning.Operation] has a name of the format <instance_name>/operations/<operation_id> and can be used to track the move instance operation. The [metadata][google.longrunning.Operation.metadata] field type is [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful. Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time]. Cancellation is not immediate because it involves moving any data previously moved to the target instance configuration back to the original instance configuration. You can use this operation to track the progress of the cancellation. Upon successful completion of the cancellation, the operation terminates with CANCELLED status.

If not cancelled, upon completion of the returned operation:

  • The instance successfully moves to the target instance configuration.
  • You are billed for compute and storage in target instance configuration.

Authorization requires the spanner.instances.update permission on the resource [instance][google.spanner.admin.instance.v1.Instance].

For more details, see Move an instance.

Parameters
Name Description
request MoveInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMoveInstanceResponseMoveInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
MoveInstanceRequest request = new MoveInstanceRequest
{
    InstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    TargetConfigAsInstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
};
// Make the request
Operation<MoveInstanceResponse, MoveInstanceMetadata> response = await instanceAdminClient.MoveInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<MoveInstanceResponse, MoveInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MoveInstanceResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MoveInstanceResponse, MoveInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceMoveInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MoveInstanceResponse retrievedResult = retrievedResponse.Result;
}

MoveInstanceAsync(MoveInstanceRequest, CancellationToken)

public virtual Task<Operation<MoveInstanceResponse, MoveInstanceMetadata>> MoveInstanceAsync(MoveInstanceRequest request, CancellationToken cancellationToken)

Moves an instance to the target instance configuration. You can use the returned [long-running operation][google.longrunning.Operation] to track the progress of moving the instance.

MoveInstance returns FAILED_PRECONDITION if the instance meets any of the following criteria:

  • Is undergoing a move to a different instance configuration
  • Has backups
  • Has an ongoing update
  • Contains any CMEK-enabled databases
  • Is a free trial instance

While the operation is pending:

  • All other attempts to modify the instance, including changes to its compute capacity, are rejected.
  • The following database and backup admin operations are rejected:

  • DatabaseAdmin.CreateDatabase

  • DatabaseAdmin.UpdateDatabaseDdl (disabled if default_leader is specified in the request.)
  • DatabaseAdmin.RestoreDatabase
  • DatabaseAdmin.CreateBackup
  • DatabaseAdmin.CopyBackup

  • Both the source and target instance configurations are subject to hourly compute and storage charges.

  • The instance might experience higher read-write latencies and a higher transaction abort rate. However, moving an instance doesn't cause any downtime.

The returned [long-running operation][google.longrunning.Operation] has a name of the format <instance_name>/operations/<operation_id> and can be used to track the move instance operation. The [metadata][google.longrunning.Operation.metadata] field type is [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful. Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time]. Cancellation is not immediate because it involves moving any data previously moved to the target instance configuration back to the original instance configuration. You can use this operation to track the progress of the cancellation. Upon successful completion of the cancellation, the operation terminates with CANCELLED status.

If not cancelled, upon completion of the returned operation:

  • The instance successfully moves to the target instance configuration.
  • You are billed for compute and storage in target instance configuration.

Authorization requires the spanner.instances.update permission on the resource [instance][google.spanner.admin.instance.v1.Instance].

For more details, see Move an instance.

Parameters
Name Description
request MoveInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationMoveInstanceResponseMoveInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
MoveInstanceRequest request = new MoveInstanceRequest
{
    InstanceName = InstanceName.FromProjectInstance("[PROJECT]", "[INSTANCE]"),
    TargetConfigAsInstanceConfigName = InstanceConfigName.FromProjectInstanceConfig("[PROJECT]", "[INSTANCE_CONFIG]"),
};
// Make the request
Operation<MoveInstanceResponse, MoveInstanceMetadata> response = await instanceAdminClient.MoveInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<MoveInstanceResponse, MoveInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
MoveInstanceResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<MoveInstanceResponse, MoveInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceMoveInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    MoveInstanceResponse retrievedResult = retrievedResponse.Result;
}

PollOnceCreateInstance(string, CallSettings)

public virtual Operation<Instance, CreateInstanceMetadata> PollOnceCreateInstance(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateInstance.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceCreateInstanceMetadata

The result of polling the operation.

PollOnceCreateInstanceAsync(string, CallSettings)

public virtual Task<Operation<Instance, CreateInstanceMetadata>> PollOnceCreateInstanceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateInstance.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceCreateInstanceMetadata

A task representing the result of polling the operation.

PollOnceCreateInstanceConfig(string, CallSettings)

public virtual Operation<InstanceConfig, CreateInstanceConfigMetadata> PollOnceCreateInstanceConfig(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateInstanceConfig .

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceConfigCreateInstanceConfigMetadata

The result of polling the operation.

PollOnceCreateInstanceConfigAsync(string, CallSettings)

public virtual Task<Operation<InstanceConfig, CreateInstanceConfigMetadata>> PollOnceCreateInstanceConfigAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateInstanceConfig.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceConfigCreateInstanceConfigMetadata

A task representing the result of polling the operation.

PollOnceCreateInstancePartition(string, CallSettings)

public virtual Operation<InstancePartition, CreateInstancePartitionMetadata> PollOnceCreateInstancePartition(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateInstancePartition.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstancePartitionCreateInstancePartitionMetadata

The result of polling the operation.

PollOnceCreateInstancePartitionAsync(string, CallSettings)

public virtual Task<Operation<InstancePartition, CreateInstancePartitionMetadata>> PollOnceCreateInstancePartitionAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateInstancePartition.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstancePartitionCreateInstancePartitionMetadata

A task representing the result of polling the operation.

PollOnceMoveInstance(string, CallSettings)

public virtual Operation<MoveInstanceResponse, MoveInstanceMetadata> PollOnceMoveInstance(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of MoveInstance.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationMoveInstanceResponseMoveInstanceMetadata

The result of polling the operation.

PollOnceMoveInstanceAsync(string, CallSettings)

public virtual Task<Operation<MoveInstanceResponse, MoveInstanceMetadata>> PollOnceMoveInstanceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of MoveInstance.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationMoveInstanceResponseMoveInstanceMetadata

A task representing the result of polling the operation.

PollOnceUpdateInstance(string, CallSettings)

public virtual Operation<Instance, UpdateInstanceMetadata> PollOnceUpdateInstance(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateInstance.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceUpdateInstanceMetadata

The result of polling the operation.

PollOnceUpdateInstanceAsync(string, CallSettings)

public virtual Task<Operation<Instance, UpdateInstanceMetadata>> PollOnceUpdateInstanceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateInstance.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceUpdateInstanceMetadata

A task representing the result of polling the operation.

PollOnceUpdateInstanceConfig(string, CallSettings)

public virtual Operation<InstanceConfig, UpdateInstanceConfigMetadata> PollOnceUpdateInstanceConfig(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateInstanceConfig .

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceConfigUpdateInstanceConfigMetadata

The result of polling the operation.

PollOnceUpdateInstanceConfigAsync(string, CallSettings)

public virtual Task<Operation<InstanceConfig, UpdateInstanceConfigMetadata>> PollOnceUpdateInstanceConfigAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateInstanceConfig.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceConfigUpdateInstanceConfigMetadata

A task representing the result of polling the operation.

PollOnceUpdateInstancePartition(string, CallSettings)

public virtual Operation<InstancePartition, UpdateInstancePartitionMetadata> PollOnceUpdateInstancePartition(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateInstancePartition.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstancePartitionUpdateInstancePartitionMetadata

The result of polling the operation.

PollOnceUpdateInstancePartitionAsync(string, CallSettings)

public virtual Task<Operation<InstancePartition, UpdateInstancePartitionMetadata>> PollOnceUpdateInstancePartitionAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateInstancePartition.

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstancePartitionUpdateInstancePartitionMetadata

A task representing the result of polling the operation.

SetIamPolicy(IResourceName, Policy, CallSettings)

public virtual Policy SetIamPolicy(IResourceName resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on an instance resource. Replaces any existing policy.

Authorization requires spanner.instances.setIamPolicy on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = instanceAdminClient.SetIamPolicy(resource, policy);

SetIamPolicy(SetIamPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on an instance resource. Replaces any existing policy.

Authorization requires spanner.instances.setIamPolicy on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
Name Description
request SetIamPolicyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = instanceAdminClient.SetIamPolicy(request);

SetIamPolicy(string, Policy, CallSettings)

public virtual Policy SetIamPolicy(string resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on an instance resource. Replaces any existing policy.

Authorization requires spanner.instances.setIamPolicy on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = instanceAdminClient.SetIamPolicy(resource, policy);

SetIamPolicyAsync(IResourceName, Policy, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on an instance resource. Replaces any existing policy.

Authorization requires spanner.instances.setIamPolicy on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await instanceAdminClient.SetIamPolicyAsync(resource, policy);

SetIamPolicyAsync(IResourceName, Policy, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CancellationToken cancellationToken)

Sets the access control policy on an instance resource. Replaces any existing policy.

Authorization requires spanner.instances.setIamPolicy on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await instanceAdminClient.SetIamPolicyAsync(resource, policy);

SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on an instance resource. Replaces any existing policy.

Authorization requires spanner.instances.setIamPolicy on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
Name Description
request SetIamPolicyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await instanceAdminClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)

Sets the access control policy on an instance resource. Replaces any existing policy.

Authorization requires spanner.instances.setIamPolicy on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
Name Description
request SetIamPolicyRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await instanceAdminClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(string, Policy, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on an instance resource. Replaces any existing policy.

Authorization requires spanner.instances.setIamPolicy on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await instanceAdminClient.SetIamPolicyAsync(resource, policy);

SetIamPolicyAsync(string, Policy, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CancellationToken cancellationToken)

Sets the access control policy on an instance resource. Replaces any existing policy.

Authorization requires spanner.instances.setIamPolicy on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await instanceAdminClient.SetIamPolicyAsync(resource, policy);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

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.

TestIamPermissions(IResourceName, IEnumerable<string>, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that the caller has on the specified instance resource.

Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has spanner.instances.list permission on the containing Google Cloud Project. Otherwise returns an empty set of permissions.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestIamPermissionsResponse

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = instanceAdminClient.TestIamPermissions(resource, permissions);

TestIamPermissions(TestIamPermissionsRequest, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns permissions that the caller has on the specified instance resource.

Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has spanner.instances.list permission on the containing Google Cloud Project. Otherwise returns an empty set of permissions.

Parameters
Name Description
request TestIamPermissionsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestIamPermissionsResponse

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = instanceAdminClient.TestIamPermissions(request);

TestIamPermissions(string, IEnumerable<string>, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that the caller has on the specified instance resource.

Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has spanner.instances.list permission on the containing Google Cloud Project. Otherwise returns an empty set of permissions.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestIamPermissionsResponse

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = instanceAdminClient.TestIamPermissions(resource, permissions);

TestIamPermissionsAsync(IResourceName, IEnumerable<string>, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that the caller has on the specified instance resource.

Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has spanner.instances.list permission on the containing Google Cloud Project. Otherwise returns an empty set of permissions.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await instanceAdminClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(IResourceName, IEnumerable<string>, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns permissions that the caller has on the specified instance resource.

Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has spanner.instances.list permission on the containing Google Cloud Project. Otherwise returns an empty set of permissions.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await instanceAdminClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns permissions that the caller has on the specified instance resource.

Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has spanner.instances.list permission on the containing Google Cloud Project. Otherwise returns an empty set of permissions.

Parameters
Name Description
request TestIamPermissionsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await instanceAdminClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)

Returns permissions that the caller has on the specified instance resource.

Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has spanner.instances.list permission on the containing Google Cloud Project. Otherwise returns an empty set of permissions.

Parameters
Name Description
request TestIamPermissionsRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await instanceAdminClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(string, IEnumerable<string>, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that the caller has on the specified instance resource.

Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has spanner.instances.list permission on the containing Google Cloud Project. Otherwise returns an empty set of permissions.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await instanceAdminClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(string, IEnumerable<string>, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns permissions that the caller has on the specified instance resource.

Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has spanner.instances.list permission on the containing Google Cloud Project. Otherwise returns an empty set of permissions.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await instanceAdminClient.TestIamPermissionsAsync(resource, permissions);

UpdateInstance(Instance, FieldMask, CallSettings)

public virtual Operation<Instance, UpdateInstanceMetadata> UpdateInstance(Instance instance, FieldMask fieldMask, CallSettings callSettings = null)

Updates an instance, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance are rejected.
  • Reading the instance via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance's tables.
  • The instance's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track the instance modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Authorization requires spanner.instances.update permission on the resource [name][google.spanner.admin.instance.v1.Instance.name].

Parameters
Name Description
instance Instance

Required. The instance to update, which must always include the instance name. Otherwise, only fields mentioned in [field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need be included.

fieldMask FieldMask

Required. A mask specifying which fields in [Instance][google.spanner.admin.instance.v1.Instance] should be updated. The field mask must always be specified; this prevents any future fields in [Instance][google.spanner.admin.instance.v1.Instance] from being erased accidentally by clients that do not know about them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceUpdateInstanceMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
Instance instance = new Instance();
FieldMask fieldMask = new FieldMask();
// Make the request
Operation<Instance, UpdateInstanceMetadata> response = instanceAdminClient.UpdateInstance(instance, fieldMask);

// Poll until the returned long-running operation is complete
Operation<Instance, UpdateInstanceMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, UpdateInstanceMetadata> retrievedResponse = instanceAdminClient.PollOnceUpdateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpdateInstance(UpdateInstanceRequest, CallSettings)

public virtual Operation<Instance, UpdateInstanceMetadata> UpdateInstance(UpdateInstanceRequest request, CallSettings callSettings = null)

Updates an instance, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance are rejected.
  • Reading the instance via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance's tables.
  • The instance's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track the instance modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Authorization requires spanner.instances.update permission on the resource [name][google.spanner.admin.instance.v1.Instance.name].

Parameters
Name Description
request UpdateInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceUpdateInstanceMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
    Instance = new Instance(),
    FieldMask = new FieldMask(),
};
// Make the request
Operation<Instance, UpdateInstanceMetadata> response = instanceAdminClient.UpdateInstance(request);

// Poll until the returned long-running operation is complete
Operation<Instance, UpdateInstanceMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, UpdateInstanceMetadata> retrievedResponse = instanceAdminClient.PollOnceUpdateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpdateInstanceAsync(Instance, FieldMask, CallSettings)

public virtual Task<Operation<Instance, UpdateInstanceMetadata>> UpdateInstanceAsync(Instance instance, FieldMask fieldMask, CallSettings callSettings = null)

Updates an instance, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance are rejected.
  • Reading the instance via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance's tables.
  • The instance's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track the instance modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Authorization requires spanner.instances.update permission on the resource [name][google.spanner.admin.instance.v1.Instance.name].

Parameters
Name Description
instance Instance

Required. The instance to update, which must always include the instance name. Otherwise, only fields mentioned in [field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need be included.

fieldMask FieldMask

Required. A mask specifying which fields in [Instance][google.spanner.admin.instance.v1.Instance] should be updated. The field mask must always be specified; this prevents any future fields in [Instance][google.spanner.admin.instance.v1.Instance] from being erased accidentally by clients that do not know about them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceUpdateInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
Instance instance = new Instance();
FieldMask fieldMask = new FieldMask();
// Make the request
Operation<Instance, UpdateInstanceMetadata> response = await instanceAdminClient.UpdateInstanceAsync(instance, fieldMask);

// Poll until the returned long-running operation is complete
Operation<Instance, UpdateInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, UpdateInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpdateInstanceAsync(Instance, FieldMask, CancellationToken)

public virtual Task<Operation<Instance, UpdateInstanceMetadata>> UpdateInstanceAsync(Instance instance, FieldMask fieldMask, CancellationToken cancellationToken)

Updates an instance, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance are rejected.
  • Reading the instance via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance's tables.
  • The instance's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track the instance modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Authorization requires spanner.instances.update permission on the resource [name][google.spanner.admin.instance.v1.Instance.name].

Parameters
Name Description
instance Instance

Required. The instance to update, which must always include the instance name. Otherwise, only fields mentioned in [field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need be included.

fieldMask FieldMask

Required. A mask specifying which fields in [Instance][google.spanner.admin.instance.v1.Instance] should be updated. The field mask must always be specified; this prevents any future fields in [Instance][google.spanner.admin.instance.v1.Instance] from being erased accidentally by clients that do not know about them.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceUpdateInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
Instance instance = new Instance();
FieldMask fieldMask = new FieldMask();
// Make the request
Operation<Instance, UpdateInstanceMetadata> response = await instanceAdminClient.UpdateInstanceAsync(instance, fieldMask);

// Poll until the returned long-running operation is complete
Operation<Instance, UpdateInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, UpdateInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpdateInstanceAsync(UpdateInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, UpdateInstanceMetadata>> UpdateInstanceAsync(UpdateInstanceRequest request, CallSettings callSettings = null)

Updates an instance, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance are rejected.
  • Reading the instance via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance's tables.
  • The instance's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track the instance modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Authorization requires spanner.instances.update permission on the resource [name][google.spanner.admin.instance.v1.Instance.name].

Parameters
Name Description
request UpdateInstanceRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceUpdateInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
    Instance = new Instance(),
    FieldMask = new FieldMask(),
};
// Make the request
Operation<Instance, UpdateInstanceMetadata> response = await instanceAdminClient.UpdateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, UpdateInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, UpdateInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpdateInstanceAsync(UpdateInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, UpdateInstanceMetadata>> UpdateInstanceAsync(UpdateInstanceRequest request, CancellationToken cancellationToken)

Updates an instance, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance are rejected.
  • Reading the instance via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance's tables.
  • The instance's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_name>/operations/<operation_id> and can be used to track the instance modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.

Authorization requires spanner.instances.update permission on the resource [name][google.spanner.admin.instance.v1.Instance.name].

Parameters
Name Description
request UpdateInstanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceUpdateInstanceMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
    Instance = new Instance(),
    FieldMask = new FieldMask(),
};
// Make the request
Operation<Instance, UpdateInstanceMetadata> response = await instanceAdminClient.UpdateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, UpdateInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Instance, UpdateInstanceMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpdateInstanceConfig(InstanceConfig, FieldMask, CallSettings)

public virtual Operation<InstanceConfig, UpdateInstanceConfigMetadata> UpdateInstanceConfig(InstanceConfig instanceConfig, FieldMask updateMask, CallSettings callSettings = null)

Updates an instance configuration. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance configuration does not exist, returns NOT_FOUND.

Only user-managed configurations can be updated.

Immediately after the request returns:

  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true.

While the operation is pending:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time]. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance configuration are rejected.
  • Reading the instance configuration via the API continues to give the pre-request values.

Upon completion of the returned operation:

  • Creating instances using the instance configuration uses the new values.
  • The new values of the instance configuration are readable via the API.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track the instance configuration modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.update permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
instanceConfig InstanceConfig

Required. The user instance configuration to update, which must always include the instance configuration name. Otherwise, only fields mentioned in [update_mask][google.spanner.admin.instance.v1.UpdateInstanceConfigRequest.update_mask] need be included. To prevent conflicts of concurrent updates, [etag][google.spanner.admin.instance.v1.InstanceConfig.reconciling] can be used.

updateMask FieldMask

Required. A mask specifying which fields in [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] should be updated. The field mask must always be specified; this prevents any future fields in [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] from being erased accidentally by clients that do not know about them. Only display_name and labels can be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceConfigUpdateInstanceConfigMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
InstanceConfig instanceConfig = new InstanceConfig();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<InstanceConfig, UpdateInstanceConfigMetadata> response = instanceAdminClient.UpdateInstanceConfig(instanceConfig, updateMask);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, UpdateInstanceConfigMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, UpdateInstanceConfigMetadata> retrievedResponse = instanceAdminClient.PollOnceUpdateInstanceConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

UpdateInstanceConfig(UpdateInstanceConfigRequest, CallSettings)

public virtual Operation<InstanceConfig, UpdateInstanceConfigMetadata> UpdateInstanceConfig(UpdateInstanceConfigRequest request, CallSettings callSettings = null)

Updates an instance configuration. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance configuration does not exist, returns NOT_FOUND.

Only user-managed configurations can be updated.

Immediately after the request returns:

  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true.

While the operation is pending:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time]. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance configuration are rejected.
  • Reading the instance configuration via the API continues to give the pre-request values.

Upon completion of the returned operation:

  • Creating instances using the instance configuration uses the new values.
  • The new values of the instance configuration are readable via the API.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track the instance configuration modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.update permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
request UpdateInstanceConfigRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstanceConfigUpdateInstanceConfigMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
UpdateInstanceConfigRequest request = new UpdateInstanceConfigRequest
{
    InstanceConfig = new InstanceConfig(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<InstanceConfig, UpdateInstanceConfigMetadata> response = instanceAdminClient.UpdateInstanceConfig(request);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, UpdateInstanceConfigMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, UpdateInstanceConfigMetadata> retrievedResponse = instanceAdminClient.PollOnceUpdateInstanceConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

UpdateInstanceConfigAsync(InstanceConfig, FieldMask, CallSettings)

public virtual Task<Operation<InstanceConfig, UpdateInstanceConfigMetadata>> UpdateInstanceConfigAsync(InstanceConfig instanceConfig, FieldMask updateMask, CallSettings callSettings = null)

Updates an instance configuration. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance configuration does not exist, returns NOT_FOUND.

Only user-managed configurations can be updated.

Immediately after the request returns:

  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true.

While the operation is pending:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time]. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance configuration are rejected.
  • Reading the instance configuration via the API continues to give the pre-request values.

Upon completion of the returned operation:

  • Creating instances using the instance configuration uses the new values.
  • The new values of the instance configuration are readable via the API.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track the instance configuration modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.update permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
instanceConfig InstanceConfig

Required. The user instance configuration to update, which must always include the instance configuration name. Otherwise, only fields mentioned in [update_mask][google.spanner.admin.instance.v1.UpdateInstanceConfigRequest.update_mask] need be included. To prevent conflicts of concurrent updates, [etag][google.spanner.admin.instance.v1.InstanceConfig.reconciling] can be used.

updateMask FieldMask

Required. A mask specifying which fields in [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] should be updated. The field mask must always be specified; this prevents any future fields in [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] from being erased accidentally by clients that do not know about them. Only display_name and labels can be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceConfigUpdateInstanceConfigMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceConfig instanceConfig = new InstanceConfig();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<InstanceConfig, UpdateInstanceConfigMetadata> response = await instanceAdminClient.UpdateInstanceConfigAsync(instanceConfig, updateMask);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, UpdateInstanceConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, UpdateInstanceConfigMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

UpdateInstanceConfigAsync(InstanceConfig, FieldMask, CancellationToken)

public virtual Task<Operation<InstanceConfig, UpdateInstanceConfigMetadata>> UpdateInstanceConfigAsync(InstanceConfig instanceConfig, FieldMask updateMask, CancellationToken cancellationToken)

Updates an instance configuration. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance configuration does not exist, returns NOT_FOUND.

Only user-managed configurations can be updated.

Immediately after the request returns:

  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true.

While the operation is pending:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time]. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance configuration are rejected.
  • Reading the instance configuration via the API continues to give the pre-request values.

Upon completion of the returned operation:

  • Creating instances using the instance configuration uses the new values.
  • The new values of the instance configuration are readable via the API.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track the instance configuration modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.update permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
instanceConfig InstanceConfig

Required. The user instance configuration to update, which must always include the instance configuration name. Otherwise, only fields mentioned in [update_mask][google.spanner.admin.instance.v1.UpdateInstanceConfigRequest.update_mask] need be included. To prevent conflicts of concurrent updates, [etag][google.spanner.admin.instance.v1.InstanceConfig.reconciling] can be used.

updateMask FieldMask

Required. A mask specifying which fields in [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] should be updated. The field mask must always be specified; this prevents any future fields in [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] from being erased accidentally by clients that do not know about them. Only display_name and labels can be updated.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceConfigUpdateInstanceConfigMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstanceConfig instanceConfig = new InstanceConfig();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<InstanceConfig, UpdateInstanceConfigMetadata> response = await instanceAdminClient.UpdateInstanceConfigAsync(instanceConfig, updateMask);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, UpdateInstanceConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, UpdateInstanceConfigMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

UpdateInstanceConfigAsync(UpdateInstanceConfigRequest, CallSettings)

public virtual Task<Operation<InstanceConfig, UpdateInstanceConfigMetadata>> UpdateInstanceConfigAsync(UpdateInstanceConfigRequest request, CallSettings callSettings = null)

Updates an instance configuration. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance configuration does not exist, returns NOT_FOUND.

Only user-managed configurations can be updated.

Immediately after the request returns:

  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true.

While the operation is pending:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time]. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance configuration are rejected.
  • Reading the instance configuration via the API continues to give the pre-request values.

Upon completion of the returned operation:

  • Creating instances using the instance configuration uses the new values.
  • The new values of the instance configuration are readable via the API.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track the instance configuration modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.update permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
request UpdateInstanceConfigRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstanceConfigUpdateInstanceConfigMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceConfigRequest request = new UpdateInstanceConfigRequest
{
    InstanceConfig = new InstanceConfig(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<InstanceConfig, UpdateInstanceConfigMetadata> response = await instanceAdminClient.UpdateInstanceConfigAsync(request);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, UpdateInstanceConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, UpdateInstanceConfigMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

UpdateInstanceConfigAsync(UpdateInstanceConfigRequest, CancellationToken)

public virtual Task<Operation<InstanceConfig, UpdateInstanceConfigMetadata>> UpdateInstanceConfigAsync(UpdateInstanceConfigRequest request, CancellationToken cancellationToken)

Updates an instance configuration. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance. If the named instance configuration does not exist, returns NOT_FOUND.

Only user-managed configurations can be updated.

Immediately after the request returns:

  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field is set to true.

While the operation is pending:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time]. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance configuration are rejected.
  • Reading the instance configuration via the API continues to give the pre-request values.

Upon completion of the returned operation:

  • Creating instances using the instance configuration uses the new values.
  • The new values of the instance configuration are readable via the API.
  • The instance configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] field becomes false.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_config_name>/operations/<operation_id> and can be used to track the instance configuration modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata]. The [response][google.longrunning.Operation.response] field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.

Authorization requires spanner.instanceConfigs.update permission on the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].

Parameters
Name Description
request UpdateInstanceConfigRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstanceConfigUpdateInstanceConfigMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceConfigRequest request = new UpdateInstanceConfigRequest
{
    InstanceConfig = new InstanceConfig(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
Operation<InstanceConfig, UpdateInstanceConfigMetadata> response = await instanceAdminClient.UpdateInstanceConfigAsync(request);

// Poll until the returned long-running operation is complete
Operation<InstanceConfig, UpdateInstanceConfigMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstanceConfig result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstanceConfig, UpdateInstanceConfigMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstanceConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstanceConfig retrievedResult = retrievedResponse.Result;
}

UpdateInstancePartition(InstancePartition, FieldMask, CallSettings)

public virtual Operation<InstancePartition, UpdateInstancePartitionMetadata> UpdateInstancePartition(InstancePartition instancePartition, FieldMask fieldMask, CallSettings callSettings = null)

Updates an instance partition, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance partition are rejected.
  • Reading the instance partition via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance partition's tables.
  • The instance partition's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track the instance partition modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Authorization requires spanner.instancePartitions.update permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
instancePartition InstancePartition

Required. The instance partition to update, which must always include the instance partition name. Otherwise, only fields mentioned in [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask] need be included.

fieldMask FieldMask

Required. A mask specifying which fields in [InstancePartition][google.spanner.admin.instance.v1.InstancePartition] should be updated. The field mask must always be specified; this prevents any future fields in [InstancePartition][google.spanner.admin.instance.v1.InstancePartition] from being erased accidentally by clients that do not know about them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstancePartitionUpdateInstancePartitionMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
InstancePartition instancePartition = new InstancePartition();
FieldMask fieldMask = new FieldMask();
// Make the request
Operation<InstancePartition, UpdateInstancePartitionMetadata> response = instanceAdminClient.UpdateInstancePartition(instancePartition, fieldMask);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, UpdateInstancePartitionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, UpdateInstancePartitionMetadata> retrievedResponse = instanceAdminClient.PollOnceUpdateInstancePartition(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

UpdateInstancePartition(UpdateInstancePartitionRequest, CallSettings)

public virtual Operation<InstancePartition, UpdateInstancePartitionMetadata> UpdateInstancePartition(UpdateInstancePartitionRequest request, CallSettings callSettings = null)

Updates an instance partition, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance partition are rejected.
  • Reading the instance partition via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance partition's tables.
  • The instance partition's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track the instance partition modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Authorization requires spanner.instancePartitions.update permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
request UpdateInstancePartitionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationInstancePartitionUpdateInstancePartitionMetadata

The RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = InstanceAdminClient.Create();
// Initialize request argument(s)
UpdateInstancePartitionRequest request = new UpdateInstancePartitionRequest
{
    InstancePartition = new InstancePartition(),
    FieldMask = new FieldMask(),
};
// Make the request
Operation<InstancePartition, UpdateInstancePartitionMetadata> response = instanceAdminClient.UpdateInstancePartition(request);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, UpdateInstancePartitionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, UpdateInstancePartitionMetadata> retrievedResponse = instanceAdminClient.PollOnceUpdateInstancePartition(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

UpdateInstancePartitionAsync(InstancePartition, FieldMask, CallSettings)

public virtual Task<Operation<InstancePartition, UpdateInstancePartitionMetadata>> UpdateInstancePartitionAsync(InstancePartition instancePartition, FieldMask fieldMask, CallSettings callSettings = null)

Updates an instance partition, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance partition are rejected.
  • Reading the instance partition via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance partition's tables.
  • The instance partition's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track the instance partition modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Authorization requires spanner.instancePartitions.update permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
instancePartition InstancePartition

Required. The instance partition to update, which must always include the instance partition name. Otherwise, only fields mentioned in [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask] need be included.

fieldMask FieldMask

Required. A mask specifying which fields in [InstancePartition][google.spanner.admin.instance.v1.InstancePartition] should be updated. The field mask must always be specified; this prevents any future fields in [InstancePartition][google.spanner.admin.instance.v1.InstancePartition] from being erased accidentally by clients that do not know about them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstancePartitionUpdateInstancePartitionMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstancePartition instancePartition = new InstancePartition();
FieldMask fieldMask = new FieldMask();
// Make the request
Operation<InstancePartition, UpdateInstancePartitionMetadata> response = await instanceAdminClient.UpdateInstancePartitionAsync(instancePartition, fieldMask);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, UpdateInstancePartitionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, UpdateInstancePartitionMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstancePartitionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

UpdateInstancePartitionAsync(InstancePartition, FieldMask, CancellationToken)

public virtual Task<Operation<InstancePartition, UpdateInstancePartitionMetadata>> UpdateInstancePartitionAsync(InstancePartition instancePartition, FieldMask fieldMask, CancellationToken cancellationToken)

Updates an instance partition, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance partition are rejected.
  • Reading the instance partition via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance partition's tables.
  • The instance partition's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track the instance partition modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Authorization requires spanner.instancePartitions.update permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
instancePartition InstancePartition

Required. The instance partition to update, which must always include the instance partition name. Otherwise, only fields mentioned in [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask] need be included.

fieldMask FieldMask

Required. A mask specifying which fields in [InstancePartition][google.spanner.admin.instance.v1.InstancePartition] should be updated. The field mask must always be specified; this prevents any future fields in [InstancePartition][google.spanner.admin.instance.v1.InstancePartition] from being erased accidentally by clients that do not know about them.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstancePartitionUpdateInstancePartitionMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
InstancePartition instancePartition = new InstancePartition();
FieldMask fieldMask = new FieldMask();
// Make the request
Operation<InstancePartition, UpdateInstancePartitionMetadata> response = await instanceAdminClient.UpdateInstancePartitionAsync(instancePartition, fieldMask);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, UpdateInstancePartitionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, UpdateInstancePartitionMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstancePartitionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

UpdateInstancePartitionAsync(UpdateInstancePartitionRequest, CallSettings)

public virtual Task<Operation<InstancePartition, UpdateInstancePartitionMetadata>> UpdateInstancePartitionAsync(UpdateInstancePartitionRequest request, CallSettings callSettings = null)

Updates an instance partition, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance partition are rejected.
  • Reading the instance partition via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance partition's tables.
  • The instance partition's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track the instance partition modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Authorization requires spanner.instancePartitions.update permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
request UpdateInstancePartitionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationInstancePartitionUpdateInstancePartitionMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
UpdateInstancePartitionRequest request = new UpdateInstancePartitionRequest
{
    InstancePartition = new InstancePartition(),
    FieldMask = new FieldMask(),
};
// Make the request
Operation<InstancePartition, UpdateInstancePartitionMetadata> response = await instanceAdminClient.UpdateInstancePartitionAsync(request);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, UpdateInstancePartitionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, UpdateInstancePartitionMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstancePartitionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}

UpdateInstancePartitionAsync(UpdateInstancePartitionRequest, CancellationToken)

public virtual Task<Operation<InstancePartition, UpdateInstancePartitionMetadata>> UpdateInstancePartitionAsync(UpdateInstancePartitionRequest request, CancellationToken cancellationToken)

Updates an instance partition, and begins allocating or releasing resources as requested. The returned [long-running operation][google.longrunning.Operation] can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns NOT_FOUND.

Immediately upon completion of this request:

  • For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly-requested level.

Until completion of the returned operation:

  • Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time], and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status.
  • All other attempts to modify the instance partition are rejected.
  • Reading the instance partition via the API continues to give the pre-request resource levels.

Upon completion of the returned operation:

  • Billing begins for all successfully-allocated resources (some types may have lower than the requested levels).
  • All newly-reserved resources are available for serving the instance partition's tables.
  • The instance partition's new resource levels are readable via the API.

The returned [long-running operation][google.longrunning.Operation] will have a name of the format <instance_partition_name>/operations/<operation_id> and can be used to track the instance partition modification. The [metadata][google.longrunning.Operation.metadata] field type is [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. The [response][google.longrunning.Operation.response] field type is [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.

Authorization requires spanner.instancePartitions.update permission on the resource [name][google.spanner.admin.instance.v1.InstancePartition.name].

Parameters
Name Description
request UpdateInstancePartitionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationInstancePartitionUpdateInstancePartitionMetadata

A Task containing the RPC response.

Example
// Create client
InstanceAdminClient instanceAdminClient = await InstanceAdminClient.CreateAsync();
// Initialize request argument(s)
UpdateInstancePartitionRequest request = new UpdateInstancePartitionRequest
{
    InstancePartition = new InstancePartition(),
    FieldMask = new FieldMask(),
};
// Make the request
Operation<InstancePartition, UpdateInstancePartitionMetadata> response = await instanceAdminClient.UpdateInstancePartitionAsync(request);

// Poll until the returned long-running operation is complete
Operation<InstancePartition, UpdateInstancePartitionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
InstancePartition result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<InstancePartition, UpdateInstancePartitionMetadata> retrievedResponse = await instanceAdminClient.PollOnceUpdateInstancePartitionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    InstancePartition retrievedResult = retrievedResponse.Result;
}