Creates an instance partition and begins preparing it to be used. The returned long-running 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, instancePartitions.create
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 will have a name of the format <instance_partition_name>/operations/<operationId>
and can be used to track creation of the instance partition. The metadata field type is CreateInstancePartitionMetadata
. The response field type is InstancePartition
, if successful.
HTTP request
POST https://spanner.googleapis.com/v1/{parent=projects/*/instances/*}/instancePartitions
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. The name of the instance in which to create the instance partition. Values are of the form Authorization requires the following IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"instancePartitionId": string,
"instancePartition": {
object ( |
Fields | |
---|---|
instance |
Required. The ID of the instance partition to create. Valid identifiers are of the form |
instance |
Required. The instance partition to create. The instancePartition.name may be omitted, but if specified must be |
Response body
If successful, the response body contains a newly created instance of Operation
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/spanner.admin
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.