Cloud Spanner API (spanner:v1)

2024-03-17

6 new methods

Additions

    Methods
  • spanner.projects.instances.instancePartitions.list

      Path: v1/{+parent}/instancePartitions

      Flat Path: v1/projects/{projectsId}/instances/{instancesId}/instancePartitions

      HTTP Method: GET

      Parameters:

        parent

          Description: Required. The instance whose instance partitions should be listed. Values are of the form `projects//instances/`.

          Pattern: ^projects/[^/]+/instances/[^/]+$

          Location: path

          Required: Yes

          Type: string

        pageSize

          Description: Number of instance partitions to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.

          Location: query

          Type: integer

          Format: int32

        pageToken

          Description: If non-empty, `page_token` should contain a next_page_token from a previous ListInstancePartitionsResponse.

          Location: query

          Type: string

        instancePartitionDeadline

          Description: Optional. Deadline used while retrieving metadata for instance partitions. Instance partitions whose metadata cannot be retrieved within this deadline will be added to unreachable in ListInstancePartitionsResponse.

          Location: query

          Type: string

          Format: google-datetime

      Parameter Order: parent

      Scopes:

    • https://www.googleapis.com/auth/cloud-platform
    • https://www.googleapis.com/auth/spanner.admin
    • Description: Lists all instance partitions for the given instance.

  • spanner.projects.instances.instancePartitions.get

      Path: v1/{+name}

      Flat Path: v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}

      HTTP Method: GET

      Parameters:

        name

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

          Pattern: ^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: name

      Scopes:

    • https://www.googleapis.com/auth/cloud-platform
    • https://www.googleapis.com/auth/spanner.admin
    • Description: Gets information about a particular instance partition.

  • spanner.projects.instances.instancePartitions.create

      Path: v1/{+parent}/instancePartitions

      Flat Path: v1/projects/{projectsId}/instances/{instancesId}/instancePartitions

      HTTP Method: POST

      Parameters:

        parent

          Description: Required. The name of the instance in which to create the instance partition. Values are of the form `projects//instances/`.

          Pattern: ^projects/[^/]+/instances/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: parent

      Scopes:

    • https://www.googleapis.com/auth/cloud-platform
    • https://www.googleapis.com/auth/spanner.admin
    • Description: 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, `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 will have a name of the format `/operations/` 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.

  • spanner.projects.instances.instancePartitions.delete

      Path: v1/{+name}

      Flat Path: v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}

      HTTP Method: DELETE

      Parameters:

        name

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

          Pattern: ^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$

          Location: path

          Required: Yes

          Type: string

        etag

          Description: Optional. If not empty, the API only deletes the instance partition when the etag provided matches the current status of the requested instance partition. Otherwise, deletes the instance partition without checking the current status of the requested instance partition.

          Location: query

          Type: string

      Parameter Order: name

      Scopes:

    • https://www.googleapis.com/auth/cloud-platform
    • https://www.googleapis.com/auth/spanner.admin
    • Description: 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.

  • spanner.projects.instances.instancePartitions.patch

      Path: v1/{+name}

      Flat Path: v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}

      HTTP Method: PATCH

      Parameters:

        name

          Description: Required. A unique identifier for the instance partition. Values are of the form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length. An instance partition's name cannot be changed after the instance partition is created.

          Pattern: ^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: name

      Scopes:

    • https://www.googleapis.com/auth/cloud-platform
    • https://www.googleapis.com/auth/spanner.admin
    • Description: Updates an instance partition, and begins allocating or releasing resources as requested. The returned long-running 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, 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 will have a name of the format `/operations/` and can be used to track the instance partition modification. The metadata field type is UpdateInstancePartitionMetadata. The response field type is InstancePartition, if successful. Authorization requires `spanner.instancePartitions.update` permission on the resource name.

  • spanner.projects.instances.instancePartitionOperations.list

      Path: v1/{+parent}/instancePartitionOperations

      Flat Path: v1/projects/{projectsId}/instances/{instancesId}/instancePartitionOperations

      HTTP Method: GET

      Parameters:

        parent

          Description: Required. The parent instance of the instance partition operations. Values are of the form `projects//instances/`.

          Pattern: ^projects/[^/]+/instances/[^/]+$

          Location: path

          Required: Yes

          Type: string

        filter

          Description: Optional. An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateInstancePartitionMetadata is `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=` \ `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) AND` \ `(metadata.instance_partition.name:custom-instance-partition) AND` \ `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ `(error:*)` - Return operations where: * The operation's metadata type is CreateInstancePartitionMetadata. * The instance partition name contains "custom-instance-partition". * The operation started before 2021-03-28T14:50:00Z. * The operation resulted in an error.

          Location: query

          Type: string

        pageSize

          Description: Optional. Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.

          Location: query

          Type: integer

          Format: int32

        pageToken

          Description: Optional. If non-empty, `page_token` should contain a next_page_token from a previous ListInstancePartitionOperationsResponse to the same `parent` and with the same `filter`.

          Location: query

          Type: string

        instancePartitionDeadline

          Description: Optional. Deadline used while retrieving metadata for instance partition operations. Instance partitions whose operation metadata cannot be retrieved within this deadline will be added to unreachable in ListInstancePartitionOperationsResponse.

          Location: query

          Type: string

          Format: google-datetime

      Parameter Order: parent

      Scopes:

    • https://www.googleapis.com/auth/cloud-platform
    • https://www.googleapis.com/auth/spanner.admin
    • Description: Lists instance partition long-running operations in the given instance. An instance partition operation has a name of the form `projects//instances//instancePartitions//operations/`. The long-running 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.