Method: projects.instances.databases.addSplitPoints

Adds split points to specified tables, indexes of a database.

HTTP request


The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
database

string

Required. The database on whose tables and indexes split points are to be added. Values are of the form projects/<project>/instances/<instance>/databases/<database>.

Authorization requires the following IAM permission on the specified resource database:

  • spanner.databases.addSplitPoints

Request body

The request body contains data with the following structure:

JSON representation
{
  "splitPoints": [
    {
      object (SplitPoints)
    }
  ],
  "initiator": string
}
Fields
splitPoints[]

object (SplitPoints)

Required. The split points to add.

initiator

string

Optional. A user-supplied tag associated with the split points. For example, "initial_data_load", "special_event_1". Defaults to "CloudAddSplitPointsAPI" if not specified. The length of the tag must not exceed 50 characters, or else it is trimmed. Only valid UTF8 characters are allowed.

Response body

If successful, the response body is empty.

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.

SplitPoints

The split points of a table or an index.

JSON representation
{
  "table": string,
  "index": string,
  "keys": [
    {
      object (Key)
    }
  ],
  "expireTime": string
}
Fields
table

string

The table to split.

index

string

The index to split. If specified, the table field must refer to the index's base table.

keys[]

object (Key)

Required. The list of split keys. In essence, the split boundaries.

expireTime

string (Timestamp format)

Optional. The expiration timestamp of the split points. A timestamp in the past means immediate expiration. The maximum value can be 30 days in the future. Defaults to 10 days in the future if not specified.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Key

A split key.

JSON representation
{
  "keyParts": array
}
Fields
keyParts

array (ListValue format)

Required. The column values making up the split key.