blob: d3baa293651da9d5109e095677fda0967782254d [file] [log] [blame]
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/cloud-platform": {
"description": "View and manage your data across Google Cloud Platform services"
},
"https://www.googleapis.com/auth/spanner.admin": {
"description": "Administer your Spanner databases"
},
"https://www.googleapis.com/auth/spanner.data": {
"description": "View and manage the contents of your Spanner databases"
}
}
}
},
"basePath": "",
"baseUrl": "https://spanner.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Spanner",
"description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.",
"discoveryVersion": "v1",
"documentationLink": "https://cloud.google.com/spanner/",
"fullyEncodeReservedExpansion": true,
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "spanner:v1",
"kind": "discovery#restDescription",
"mtlsRootUrl": "https://spanner.mtls.googleapis.com/",
"name": "spanner",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"projects": {
"resources": {
"instanceConfigs": {
"methods": {
"get": {
"description": "Gets information about a particular instance configuration.",
"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}",
"httpMethod": "GET",
"id": "spanner.projects.instanceConfigs.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the requested instance configuration. Values are of\nthe form `projects/\u003cproject\u003e/instanceConfigs/\u003cconfig\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instanceConfigs/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "InstanceConfig"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"list": {
"description": "Lists the supported instance configurations for a given project.",
"flatPath": "v1/projects/{projectsId}/instanceConfigs",
"httpMethod": "GET",
"id": "spanner.projects.instanceConfigs.list",
"parameterOrder": [
"parent"
],
"parameters": {
"pageSize": {
"description": "Number of instance configurations to be returned in the response. If 0 or\nless, defaults to the server's maximum allowed page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "If non-empty, `page_token` should contain a\nnext_page_token\nfrom a previous ListInstanceConfigsResponse.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The name of the project for which a list of supported instance\nconfigurations is requested. Values are of the form\n`projects/\u003cproject\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/instanceConfigs",
"response": {
"$ref": "ListInstanceConfigsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
}
}
},
"instances": {
"methods": {
"create": {
"description": "Creates an instance and begins preparing it to begin serving. The\nreturned long-running operation\ncan be used to track the progress of preparing the new\ninstance. The instance name is assigned by the caller. If the\nnamed instance already exists, `CreateInstance` returns\n`ALREADY_EXISTS`.\n\nImmediately upon completion of this request:\n\n * The instance is readable via the API, with all requested attributes\n but no allocated resources. Its state is `CREATING`.\n\nUntil completion of the returned operation:\n\n * Cancelling the operation renders the instance immediately unreadable\n via the API.\n * The instance can be deleted.\n * All other attempts to modify the instance are rejected.\n\nUpon completion of the returned operation:\n\n * Billing for all successfully-allocated resources begins (some types\n may have lower than the requested levels).\n * Databases can be created in the instance.\n * The instance's allocated resource levels are readable via the API.\n * The instance's state becomes `READY`.\n\nThe returned long-running operation will\nhave a name of the format `\u003cinstance_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track creation of the instance. The\nmetadata field type is\nCreateInstanceMetadata.\nThe response field type is\nInstance, if successful.",
"flatPath": "v1/projects/{projectsId}/instances",
"httpMethod": "POST",
"id": "spanner.projects.instances.create",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. The name of the project in which to create the instance. Values\nare of the form `projects/\u003cproject\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/instances",
"request": {
"$ref": "CreateInstanceRequest"
},
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"delete": {
"description": "Deletes an instance.\n\nImmediately upon completion of the request:\n\n * Billing ceases for all of the instance's reserved resources.\n\nSoon afterward:\n\n * The instance and *all of its databases* immediately and\n irrevocably disappear from the API. All data in the databases\n is permanently deleted.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}",
"httpMethod": "DELETE",
"id": "spanner.projects.instances.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the instance to be deleted. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"get": {
"description": "Gets information about a particular instance.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}",
"httpMethod": "GET",
"id": "spanner.projects.instances.get",
"parameterOrder": [
"name"
],
"parameters": {
"fieldMask": {
"description": "If field_mask is present, specifies the subset of Instance fields that\nshould be returned.\nIf absent, all Instance fields are returned.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
},
"name": {
"description": "Required. The name of the requested instance. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Instance"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"getIamPolicy": {
"description": "Gets the access control policy for an instance resource. Returns an empty\npolicy if an instance exists but does not have a policy set.\n\nAuthorization requires `spanner.instances.getIamPolicy` on\nresource.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}:getIamPolicy",
"httpMethod": "POST",
"id": "spanner.projects.instances.getIamPolicy",
"parameterOrder": [
"resource"
],
"parameters": {
"resource": {
"description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+resource}:getIamPolicy",
"request": {
"$ref": "GetIamPolicyRequest"
},
"response": {
"$ref": "Policy"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"list": {
"description": "Lists all instances in the given project.",
"flatPath": "v1/projects/{projectsId}/instances",
"httpMethod": "GET",
"id": "spanner.projects.instances.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n * `name`\n * `display_name`\n * `labels.key` where key is the name of a label\n\nSome examples of using filters are:\n\n * `name:*` --\u003e The instance has a name.\n * `name:Howl` --\u003e The instance's name contains the string \"howl\".\n * `name:HOWL` --\u003e Equivalent to above.\n * `NAME:howl` --\u003e Equivalent to above.\n * `labels.env:*` --\u003e The instance has the label \"env\".\n * `labels.env:dev` --\u003e The instance has the label \"env\" and the value of\n the label contains the string \"dev\".\n * `name:howl labels.env:dev` --\u003e The instance's name contains \"howl\" and\n it has the label \"env\" with its value\n containing \"dev\".",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Number of instances to be returned in the response. If 0 or less, defaults\nto the server's maximum allowed page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListInstancesResponse.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The name of the project for which a list of instances is\nrequested. Values are of the form `projects/\u003cproject\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/instances",
"response": {
"$ref": "ListInstancesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"patch": {
"description": "Updates an instance, and begins allocating or releasing resources\nas requested. The returned long-running\noperation can be used to track the\nprogress of updating the instance. If the named instance does not\nexist, returns `NOT_FOUND`.\n\nImmediately upon completion of this request:\n\n * For resource types for which a decrease in the instance's allocation\n has been requested, billing is based on the newly-requested level.\n\nUntil completion of the returned operation:\n\n * Cancelling the operation sets its metadata's\n cancel_time, and begins\n restoring resources to their pre-request values. The operation\n is guaranteed to succeed at undoing all resource changes,\n after which point it terminates with a `CANCELLED` status.\n * All other attempts to modify the instance are rejected.\n * Reading the instance via the API continues to give the pre-request\n resource levels.\n\nUpon completion of the returned operation:\n\n * Billing begins for all successfully-allocated resources (some types\n may have lower than the requested levels).\n * All newly-reserved resources are available for serving the instance's\n tables.\n * The instance's new resource levels are readable via the API.\n\nThe returned long-running operation will\nhave a name of the format `\u003cinstance_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track the instance modification. The\nmetadata field type is\nUpdateInstanceMetadata.\nThe response field type is\nInstance, if successful.\n\nAuthorization requires `spanner.instances.update` permission on\nresource name.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}",
"httpMethod": "PATCH",
"id": "spanner.projects.instances.patch",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 2 and 64 characters in length.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"request": {
"$ref": "UpdateInstanceRequest"
},
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"setIamPolicy": {
"description": "Sets the access control policy on an instance resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.instances.setIamPolicy` on\nresource.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}:setIamPolicy",
"httpMethod": "POST",
"id": "spanner.projects.instances.setIamPolicy",
"parameterOrder": [
"resource"
],
"parameters": {
"resource": {
"description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for databases resources.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+resource}:setIamPolicy",
"request": {
"$ref": "SetIamPolicyRequest"
},
"response": {
"$ref": "Policy"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"testIamPermissions": {
"description": "Returns permissions that the caller has on the specified instance resource.\n\nAttempting this RPC on a non-existent Cloud Spanner instance resource will\nresult in a NOT_FOUND error if the user has `spanner.instances.list`\npermission on the containing Google Cloud Project. Otherwise returns an\nempty set of permissions.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}:testIamPermissions",
"httpMethod": "POST",
"id": "spanner.projects.instances.testIamPermissions",
"parameterOrder": [
"resource"
],
"parameters": {
"resource": {
"description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+resource}:testIamPermissions",
"request": {
"$ref": "TestIamPermissionsRequest"
},
"response": {
"$ref": "TestIamPermissionsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
}
},
"resources": {
"backupOperations": {
"methods": {
"list": {
"description": "Lists the backup long-running operations in\nthe given instance. A backup operation has a name of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/backups/\u003cbackup\u003e/operations/\u003coperation\u003e`.\nThe long-running operation\nmetadata field type\n`metadata.type_url` describes the type of the metadata. Operations returned\ninclude those that have completed/failed/canceled within the last 7 days,\nand pending operations. Operations returned are ordered by\n`operation.metadata.value.progress.start_time` in descending order starting\nfrom the most recently started operation.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backupOperations",
"httpMethod": "GET",
"id": "spanner.projects.instances.backupOperations.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "A filter expression that filters what operations are returned in the\nresponse.\n\nThe filter expression must specify the field name of an operation, a\ncomparison operator, and the value that you want to use for filtering.\nThe value must be a string, a number, or a boolean. The comparison operator\nmust be\n\u003c, \u003e, \u003c=, \u003e=, !=, =, or :. Colon ‘:’ represents a HAS operator which is\nroughly synonymous with equality. Filter rules are case insensitive.\n\nThe long-running operation fields eligible for filtering are:\n * `name` --\u003e The name of the long-running operation\n * `done` --\u003e False if the operation is in progress, else true.\n * `metadata.type_url` (using filter string `metadata.@type`) and fields\n in `metadata.value` (using filter string `metadata.\u003cfield_name\u003e`,\n where \u003cfield_name\u003e is a field in metadata.value) are eligible for\n filtering.\n * `error` --\u003e Error associated with the long-running operation.\n * `response.type_url` (using filter string `response.@type`) and fields\n in `response.value` (using filter string `response.\u003cfield_name\u003e`,\n where \u003cfield_name\u003e is a field in response.value) are eligible for\n filtering.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. By default, each expression is an AND expression. However,\nyou can include AND, OR, and NOT expressions explicitly.\n\nSome examples of using filters are:\n\n * `done:true` --\u003e The operation is complete.\n * `metadata.database:prod`\n --\u003e The database the backup was taken from has a name containing\n the string \"prod\".\n * `(metadata.@type:type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata)\n AND (metadata.name:howl)\n AND (metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\")\n AND (error:*)`\n --\u003e Return CreateBackup operations where the created backup name\n contains the string \"howl\", the progress.start_time of the\n backup operation is before 2018-03-28T14:50:00Z, and the\n operation returned an error.",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Number of operations to be returned in the response. If 0 or\nless, defaults to the server's maximum allowed page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "If non-empty, `page_token` should contain a\nnext_page_token\nfrom a previous ListBackupOperationsResponse to the\nsame `parent` and with the same `filter`.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The instance of the backup operations. Values are of\nthe form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/backupOperations",
"response": {
"$ref": "ListBackupOperationsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
}
}
},
"backups": {
"methods": {
"create": {
"description": "Starts creating a new Cloud Spanner Backup.\nThe returned backup long-running operation\nwill have a name of the format\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/backups/\u003cbackup\u003e/operations/\u003coperation_id\u003e`\nand can be used to track creation of the backup. The\nmetadata field type is\nCreateBackupMetadata. The\nresponse field type is\nBackup, if successful. Cancelling the returned operation will stop the\ncreation and delete the backup.\nThere can be only one pending backup creation per database. Backup creation\nof different databases can run concurrently.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups",
"httpMethod": "POST",
"id": "spanner.projects.instances.backups.create",
"parameterOrder": [
"parent"
],
"parameters": {
"backupId": {
"description": "Required. The id of the backup to be created. The `backup_id` appended to\n`parent` forms the full backup name of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/backups/\u003cbackup_id\u003e`.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The name of the instance in which the backup will be\ncreated. This must be the same instance that contains the database the\nbackup will be created from. The backup will be stored in the\nlocation(s) specified in the instance configuration of this\ninstance. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/backups",
"request": {
"$ref": "Backup"
},
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"delete": {
"description": "Deletes a pending or completed Backup.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}",
"httpMethod": "DELETE",
"id": "spanner.projects.instances.backups.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Name of the backup to delete.\nValues are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/backups/\u003cbackup\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"get": {
"description": "Gets metadata on a pending or completed Backup.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}",
"httpMethod": "GET",
"id": "spanner.projects.instances.backups.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Name of the backup.\nValues are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/backups/\u003cbackup\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Backup"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"getIamPolicy": {
"description": "Gets the access control policy for a database or backup resource.\nReturns an empty policy if a database or backup exists but does not have a\npolicy set.\n\nAuthorization requires `spanner.databases.getIamPolicy` permission on\nresource.\nFor backups, authorization requires `spanner.backups.getIamPolicy`\npermission on resource.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}:getIamPolicy",
"httpMethod": "POST",
"id": "spanner.projects.instances.backups.getIamPolicy",
"parameterOrder": [
"resource"
],
"parameters": {
"resource": {
"description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+resource}:getIamPolicy",
"request": {
"$ref": "GetIamPolicyRequest"
},
"response": {
"$ref": "Policy"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"list": {
"description": "Lists completed and pending backups.\nBackups returned are ordered by `create_time` in descending order,\nstarting from the most recent `create_time`.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups",
"httpMethod": "GET",
"id": "spanner.projects.instances.backups.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "A filter expression that filters backups listed in the response.\nThe expression must specify the field name, a comparison operator,\nand the value that you want to use for filtering. The value must be a\nstring, a number, or a boolean. The comparison operator must be\n\u003c, \u003e, \u003c=, \u003e=, !=, =, or :. Colon ‘:’ represents a HAS operator which is\nroughly synonymous with equality. Filter rules are case insensitive.\n\nThe fields eligible for filtering are:\n * `name`\n * `database`\n * `state`\n * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)\n * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)\n * `size_bytes`\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. By default, each expression is an AND expression. However,\nyou can include AND, OR, and NOT expressions explicitly.\n\nSome examples of using filters are:\n\n * `name:Howl` --\u003e The backup's name contains the string \"howl\".\n * `database:prod`\n --\u003e The database's name contains the string \"prod\".\n * `state:CREATING` --\u003e The backup is pending creation.\n * `state:READY` --\u003e The backup is fully created and ready for use.\n * `(name:howl) AND (create_time \u003c \\\"2018-03-28T14:50:00Z\\\")`\n --\u003e The backup name contains the string \"howl\" and `create_time`\n of the backup is before 2018-03-28T14:50:00Z.\n * `expire_time \u003c \\\"2018-03-28T14:50:00Z\\\"`\n --\u003e The backup `expire_time` is before 2018-03-28T14:50:00Z.\n * `size_bytes \u003e 10000000000` --\u003e The backup's size is greater than 10GB",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Number of backups to be returned in the response. If 0 or\nless, defaults to the server's maximum allowed page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListBackupsResponse to the same `parent` and with the same\n`filter`.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The instance to list backups from. Values are of the\nform `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/backups",
"response": {
"$ref": "ListBackupsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"patch": {
"description": "Updates a pending or completed Backup.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}",
"httpMethod": "PATCH",
"id": "spanner.projects.instances.backups.patch",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Output only for the CreateBackup][DatabaseAdmin.CreateBackup] operation.\nRequired for the UpdateBackup operation.\n\nA globally unique identifier for the backup which cannot be\nchanged. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/backups/a-z*[a-z0-9]`\nThe final segment of the name must be between 2 and 60 characters\nin length.\n\nThe backup is stored in the location(s) specified in the instance\nconfiguration of the instance containing the backup, identified\nby the prefix of the backup name of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "Required. A mask specifying which fields (e.g. `expire_time`) in the\nBackup resource should be updated. This mask is relative to the Backup\nresource, not to the request message. The field mask must always be\nspecified; this prevents any future fields from being erased accidentally\nby clients that do not know about them.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"request": {
"$ref": "Backup"
},
"response": {
"$ref": "Backup"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"setIamPolicy": {
"description": "Sets the access control policy on a database or backup resource.\nReplaces any existing policy.\n\nAuthorization requires `spanner.databases.setIamPolicy`\npermission on resource.\nFor backups, authorization requires `spanner.backups.setIamPolicy`\npermission on resource.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}:setIamPolicy",
"httpMethod": "POST",
"id": "spanner.projects.instances.backups.setIamPolicy",
"parameterOrder": [
"resource"
],
"parameters": {
"resource": {
"description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for databases resources.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+resource}:setIamPolicy",
"request": {
"$ref": "SetIamPolicyRequest"
},
"response": {
"$ref": "Policy"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"testIamPermissions": {
"description": "Returns permissions that the caller has on the specified database or backup\nresource.\n\nAttempting this RPC on a non-existent Cloud Spanner database will\nresult in a NOT_FOUND error if the user has\n`spanner.databases.list` permission on the containing Cloud\nSpanner instance. Otherwise returns an empty set of permissions.\nCalling this method on a backup that does not exist will\nresult in a NOT_FOUND error if the user has\n`spanner.backups.list` permission on the containing instance.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}:testIamPermissions",
"httpMethod": "POST",
"id": "spanner.projects.instances.backups.testIamPermissions",
"parameterOrder": [
"resource"
],
"parameters": {
"resource": {
"description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+resource}:testIamPermissions",
"request": {
"$ref": "TestIamPermissionsRequest"
},
"response": {
"$ref": "TestIamPermissionsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
}
},
"resources": {
"operations": {
"methods": {
"cancel": {
"description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}/operations/{operationsId}:cancel",
"httpMethod": "POST",
"id": "spanner.projects.instances.backups.operations.cancel",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource to be cancelled.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}:cancel",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"delete": {
"description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}/operations/{operationsId}",
"httpMethod": "DELETE",
"id": "spanner.projects.instances.backups.operations.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource to be deleted.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"get": {
"description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}/operations/{operationsId}",
"httpMethod": "GET",
"id": "spanner.projects.instances.backups.operations.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"list": {
"description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}/operations",
"httpMethod": "GET",
"id": "spanner.projects.instances.backups.operations.list",
"parameterOrder": [
"name"
],
"parameters": {
"filter": {
"description": "The standard list filter.",
"location": "query",
"type": "string"
},
"name": {
"description": "The name of the operation's parent resource.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations$",
"required": true,
"type": "string"
},
"pageSize": {
"description": "The standard list page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "The standard list page token.",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "ListOperationsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
}
}
}
}
},
"databaseOperations": {
"methods": {
"list": {
"description": "Lists database longrunning-operations.\nA database operation has a name of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e/operations/\u003coperation\u003e`.\nThe long-running operation\nmetadata field type\n`metadata.type_url` describes the type of the metadata. Operations returned\ninclude those that have completed/failed/canceled within the last 7 days,\nand pending operations.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databaseOperations",
"httpMethod": "GET",
"id": "spanner.projects.instances.databaseOperations.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "A filter expression that filters what operations are returned in the\nresponse.\n\nThe filter expression must specify the field name, a comparison operator,\nand the value that you want to use for filtering. The value must be a\nstring, a number, or a boolean. The comparison operator must be\n\u003c, \u003e, \u003c=, \u003e=, !=, =, or :. Colon ‘:’ represents a HAS operator which is\nroughly synonymous with equality. Filter rules are case insensitive.\n\nThe long-running operation fields eligible for filtering are:\n * `name` --\u003e The name of the long-running operation\n * `done` --\u003e False if the operation is in progress, else true.\n * `metadata.type_url` (using filter string `metadata.@type`) and fields\n in `metadata.value` (using filter string `metadata.\u003cfield_name\u003e`,\n where \u003cfield_name\u003e is a field in metadata.value) are eligible for\n filtering.\n * `error` --\u003e Error associated with the long-running operation.\n * `response.type_url` (using filter string `response.@type`) and fields\n in `response.value` (using filter string `response.\u003cfield_name\u003e`,\n where \u003cfield_name\u003e is a field in response.value) are eligible for\n filtering.\n\nTo filter on multiple expressions, provide each separate expression within\nparentheses. By default, each expression is an AND expression. However,\nyou can include AND, OR, and NOT expressions explicitly.\n\nSome examples of using filters are:\n\n * `done:true` --\u003e The operation is complete.\n * `(metadata.@type:type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata)\n AND (metadata.source_type:BACKUP)\n AND (metadata.backup_info.backup:backup_howl)\n AND (metadata.name:restored_howl)\n AND (metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\")\n AND (error:*)`\n --\u003e Return RestoreDatabase operations from backups whose name\n contains \"backup_howl\", where the created database name\n contains the string \"restored_howl\", the start_time of the\n restore operation is before 2018-03-28T14:50:00Z,\n and the operation returned an error.",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Number of operations to be returned in the response. If 0 or\nless, defaults to the server's maximum allowed page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "If non-empty, `page_token` should contain a\nnext_page_token\nfrom a previous ListDatabaseOperationsResponse to the\nsame `parent` and with the same `filter`.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The instance of the database operations.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/databaseOperations",
"response": {
"$ref": "ListDatabaseOperationsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
}
}
},
"databases": {
"methods": {
"create": {
"description": "Creates a new Cloud Spanner database and starts to prepare it for serving.\nThe returned long-running operation will\nhave a name of the format `\u003cdatabase_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track preparation of the database. The\nmetadata field type is\nCreateDatabaseMetadata. The\nresponse field type is\nDatabase, if successful.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.create",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. The name of the instance that will serve the new database.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/databases",
"request": {
"$ref": "CreateDatabaseRequest"
},
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"dropDatabase": {
"description": "Drops (aka deletes) a Cloud Spanner database.\nCompleted backups for the database will be retained according to their\n`expire_time`.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}",
"httpMethod": "DELETE",
"id": "spanner.projects.instances.databases.dropDatabase",
"parameterOrder": [
"database"
],
"parameters": {
"database": {
"description": "Required. The database to be dropped.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+database}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"get": {
"description": "Gets the state of a Cloud Spanner database.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}",
"httpMethod": "GET",
"id": "spanner.projects.instances.databases.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the requested database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Database"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"getDdl": {
"description": "Returns the schema of a Cloud Spanner database as a list of formatted\nDDL statements. This method does not show pending schema updates, those may\nbe queried using the Operations API.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl",
"httpMethod": "GET",
"id": "spanner.projects.instances.databases.getDdl",
"parameterOrder": [
"database"
],
"parameters": {
"database": {
"description": "Required. The database whose schema we wish to get.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+database}/ddl",
"response": {
"$ref": "GetDatabaseDdlResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"getIamPolicy": {
"description": "Gets the access control policy for a database or backup resource.\nReturns an empty policy if a database or backup exists but does not have a\npolicy set.\n\nAuthorization requires `spanner.databases.getIamPolicy` permission on\nresource.\nFor backups, authorization requires `spanner.backups.getIamPolicy`\npermission on resource.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:getIamPolicy",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.getIamPolicy",
"parameterOrder": [
"resource"
],
"parameters": {
"resource": {
"description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+resource}:getIamPolicy",
"request": {
"$ref": "GetIamPolicyRequest"
},
"response": {
"$ref": "Policy"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"list": {
"description": "Lists Cloud Spanner databases.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases",
"httpMethod": "GET",
"id": "spanner.projects.instances.databases.list",
"parameterOrder": [
"parent"
],
"parameters": {
"pageSize": {
"description": "Number of databases to be returned in the response. If 0 or less,\ndefaults to the server's maximum allowed page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListDatabasesResponse.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The instance whose databases should be listed.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/databases",
"response": {
"$ref": "ListDatabasesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"restore": {
"description": "Create a new database by restoring from a completed backup. The new\ndatabase must be in the same project and in an instance with the same\ninstance configuration as the instance containing\nthe backup. The returned database long-running\noperation has a name of the format\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e/operations/\u003coperation_id\u003e`,\nand can be used to track the progress of the operation, and to cancel it.\nThe metadata field type is\nRestoreDatabaseMetadata.\nThe response type\nis Database, if\nsuccessful. Cancelling the returned operation will stop the restore and\ndelete the database.\nThere can be only one database being restored into an instance at a time.\nOnce the restore operation completes, a new restore operation can be\ninitiated, without waiting for the optimize operation associated with the\nfirst restore to complete.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases:restore",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.restore",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. The name of the instance in which to create the\nrestored database. This instance must be in the same project and\nhave the same instance configuration as the instance containing\nthe source backup. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/databases:restore",
"request": {
"$ref": "RestoreDatabaseRequest"
},
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"setIamPolicy": {
"description": "Sets the access control policy on a database or backup resource.\nReplaces any existing policy.\n\nAuthorization requires `spanner.databases.setIamPolicy`\npermission on resource.\nFor backups, authorization requires `spanner.backups.setIamPolicy`\npermission on resource.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:setIamPolicy",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.setIamPolicy",
"parameterOrder": [
"resource"
],
"parameters": {
"resource": {
"description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for databases resources.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+resource}:setIamPolicy",
"request": {
"$ref": "SetIamPolicyRequest"
},
"response": {
"$ref": "Policy"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"testIamPermissions": {
"description": "Returns permissions that the caller has on the specified database or backup\nresource.\n\nAttempting this RPC on a non-existent Cloud Spanner database will\nresult in a NOT_FOUND error if the user has\n`spanner.databases.list` permission on the containing Cloud\nSpanner instance. Otherwise returns an empty set of permissions.\nCalling this method on a backup that does not exist will\nresult in a NOT_FOUND error if the user has\n`spanner.backups.list` permission on the containing instance.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:testIamPermissions",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.testIamPermissions",
"parameterOrder": [
"resource"
],
"parameters": {
"resource": {
"description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+resource}:testIamPermissions",
"request": {
"$ref": "TestIamPermissionsRequest"
},
"response": {
"$ref": "TestIamPermissionsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"updateDdl": {
"description": "Updates the schema of a Cloud Spanner database by\ncreating/altering/dropping tables, columns, indexes, etc. The returned\nlong-running operation will have a name of\nthe format `\u003cdatabase_name\u003e/operations/\u003coperation_id\u003e` and can be used to\ntrack execution of the schema change(s). The\nmetadata field type is\nUpdateDatabaseDdlMetadata. The operation has no response.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl",
"httpMethod": "PATCH",
"id": "spanner.projects.instances.databases.updateDdl",
"parameterOrder": [
"database"
],
"parameters": {
"database": {
"description": "Required. The database to update.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+database}/ddl",
"request": {
"$ref": "UpdateDatabaseDdlRequest"
},
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
}
},
"resources": {
"operations": {
"methods": {
"cancel": {
"description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}:cancel",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.operations.cancel",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource to be cancelled.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}:cancel",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"delete": {
"description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}",
"httpMethod": "DELETE",
"id": "spanner.projects.instances.databases.operations.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource to be deleted.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"get": {
"description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}",
"httpMethod": "GET",
"id": "spanner.projects.instances.databases.operations.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"list": {
"description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations",
"httpMethod": "GET",
"id": "spanner.projects.instances.databases.operations.list",
"parameterOrder": [
"name"
],
"parameters": {
"filter": {
"description": "The standard list filter.",
"location": "query",
"type": "string"
},
"name": {
"description": "The name of the operation's parent resource.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations$",
"required": true,
"type": "string"
},
"pageSize": {
"description": "The standard list page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "The standard list page token.",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "ListOperationsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
}
}
},
"sessions": {
"methods": {
"batchCreate": {
"description": "Creates multiple new sessions.\n\nThis API can be used to initialize a session cache on the clients.\nSee https://goo.gl/TgSFN2 for best practices on session cache management.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions:batchCreate",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.batchCreate",
"parameterOrder": [
"database"
],
"parameters": {
"database": {
"description": "Required. The database in which the new sessions are created.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+database}/sessions:batchCreate",
"request": {
"$ref": "BatchCreateSessionsRequest"
},
"response": {
"$ref": "BatchCreateSessionsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"beginTransaction": {
"description": "Begins a new transaction. This step can often be skipped:\nRead, ExecuteSql and\nCommit can begin a new transaction as a\nside-effect.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:beginTransaction",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.beginTransaction",
"parameterOrder": [
"session"
],
"parameters": {
"session": {
"description": "Required. The session in which the transaction runs.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+session}:beginTransaction",
"request": {
"$ref": "BeginTransactionRequest"
},
"response": {
"$ref": "Transaction"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"commit": {
"description": "Commits a transaction. The request includes the mutations to be\napplied to rows in the database.\n\n`Commit` might return an `ABORTED` error. This can occur at any time;\ncommonly, the cause is conflicts with concurrent\ntransactions. However, it can also happen for a variety of other\nreasons. If `Commit` returns `ABORTED`, the caller should re-attempt\nthe transaction from the beginning, re-using the same session.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:commit",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.commit",
"parameterOrder": [
"session"
],
"parameters": {
"session": {
"description": "Required. The session in which the transaction to be committed is running.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+session}:commit",
"request": {
"$ref": "CommitRequest"
},
"response": {
"$ref": "CommitResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"create": {
"description": "Creates a new session. A session can be used to perform\ntransactions that read and/or modify data in a Cloud Spanner database.\nSessions are meant to be reused for many consecutive\ntransactions.\n\nSessions can only execute one transaction at a time. To execute\nmultiple concurrent read-write/write-only transactions, create\nmultiple sessions. Note that standalone reads and queries use a\ntransaction internally, and count toward the one transaction\nlimit.\n\nActive sessions use additional server resources, so it is a good idea to\ndelete idle and unneeded sessions.\nAside from explicit deletes, Cloud Spanner may delete sessions for which no\noperations are sent for more than an hour. If a session is deleted,\nrequests to it return `NOT_FOUND`.\n\nIdle sessions can be kept alive by sending a trivial SQL query\nperiodically, e.g., `\"SELECT 1\"`.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.create",
"parameterOrder": [
"database"
],
"parameters": {
"database": {
"description": "Required. The database in which the new session is created.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+database}/sessions",
"request": {
"$ref": "CreateSessionRequest"
},
"response": {
"$ref": "Session"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"delete": {
"description": "Ends a session, releasing server resources associated with it. This will\nasynchronously trigger cancellation of any operations that are running with\nthis session.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}",
"httpMethod": "DELETE",
"id": "spanner.projects.instances.databases.sessions.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the session to delete.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"executeBatchDml": {
"description": "Executes a batch of SQL DML statements. This method allows many statements\nto be run with lower latency than submitting them sequentially with\nExecuteSql.\n\nStatements are executed in sequential order. A request can succeed even if\na statement fails. The ExecuteBatchDmlResponse.status field in the\nresponse provides information about the statement that failed. Clients must\ninspect this field to determine whether an error occurred.\n\nExecution stops after the first failed statement; the remaining statements\nare not executed.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeBatchDml",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.executeBatchDml",
"parameterOrder": [
"session"
],
"parameters": {
"session": {
"description": "Required. The session in which the DML statements should be performed.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+session}:executeBatchDml",
"request": {
"$ref": "ExecuteBatchDmlRequest"
},
"response": {
"$ref": "ExecuteBatchDmlResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"executeSql": {
"description": "Executes an SQL statement, returning all results in a single reply. This\nmethod cannot be used to return a result set larger than 10 MiB;\nif the query yields more data than that, the query fails with\na `FAILED_PRECONDITION` error.\n\nOperations inside read-write transactions might return `ABORTED`. If\nthis occurs, the application should restart the transaction from\nthe beginning. See Transaction for more details.\n\nLarger result sets can be fetched in streaming fashion by calling\nExecuteStreamingSql instead.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeSql",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.executeSql",
"parameterOrder": [
"session"
],
"parameters": {
"session": {
"description": "Required. The session in which the SQL query should be performed.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+session}:executeSql",
"request": {
"$ref": "ExecuteSqlRequest"
},
"response": {
"$ref": "ResultSet"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"executeStreamingSql": {
"description": "Like ExecuteSql, except returns the result\nset as a stream. Unlike ExecuteSql, there\nis no limit on the size of the returned result set. However, no\nindividual row in the result set can exceed 100 MiB, and no\ncolumn value can exceed 10 MiB.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeStreamingSql",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.executeStreamingSql",
"parameterOrder": [
"session"
],
"parameters": {
"session": {
"description": "Required. The session in which the SQL query should be performed.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+session}:executeStreamingSql",
"request": {
"$ref": "ExecuteSqlRequest"
},
"response": {
"$ref": "PartialResultSet"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"get": {
"description": "Gets a session. Returns `NOT_FOUND` if the session does not exist.\nThis is mainly useful for determining whether a session is still\nalive.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}",
"httpMethod": "GET",
"id": "spanner.projects.instances.databases.sessions.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The name of the session to retrieve.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Session"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"list": {
"description": "Lists all sessions in a given database.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions",
"httpMethod": "GET",
"id": "spanner.projects.instances.databases.sessions.list",
"parameterOrder": [
"database"
],
"parameters": {
"database": {
"description": "Required. The database in which to list sessions.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
"required": true,
"type": "string"
},
"filter": {
"description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n * `labels.key` where key is the name of a label\n\nSome examples of using filters are:\n\n * `labels.env:*` --\u003e The session has the label \"env\".\n * `labels.env:dev` --\u003e The session has the label \"env\" and the value of\n the label contains the string \"dev\".",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Number of sessions to be returned in the response. If 0 or less, defaults\nto the server's maximum allowed page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "If non-empty, `page_token` should contain a\nnext_page_token from a previous\nListSessionsResponse.",
"location": "query",
"type": "string"
}
},
"path": "v1/{+database}/sessions",
"response": {
"$ref": "ListSessionsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"partitionQuery": {
"description": "Creates a set of partition tokens that can be used to execute a query\noperation in parallel. Each of the returned partition tokens can be used\nby ExecuteStreamingSql to specify a subset\nof the query result to read. The same session and read-only transaction\nmust be used by the PartitionQueryRequest used to create the\npartition tokens and the ExecuteSqlRequests that use the partition tokens.\n\nPartition tokens become invalid when the session used to create them\nis deleted, is idle for too long, begins a new transaction, or becomes too\nold. When any of these happen, it is not possible to resume the query, and\nthe whole operation must be restarted from the beginning.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:partitionQuery",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.partitionQuery",
"parameterOrder": [
"session"
],
"parameters": {
"session": {
"description": "Required. The session used to create the partitions.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+session}:partitionQuery",
"request": {
"$ref": "PartitionQueryRequest"
},
"response": {
"$ref": "PartitionResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"partitionRead": {
"description": "Creates a set of partition tokens that can be used to execute a read\noperation in parallel. Each of the returned partition tokens can be used\nby StreamingRead to specify a subset of the read\nresult to read. The same session and read-only transaction must be used by\nthe PartitionReadRequest used to create the partition tokens and the\nReadRequests that use the partition tokens. There are no ordering\nguarantees on rows returned among the returned partition tokens, or even\nwithin each individual StreamingRead call issued with a partition_token.\n\nPartition tokens become invalid when the session used to create them\nis deleted, is idle for too long, begins a new transaction, or becomes too\nold. When any of these happen, it is not possible to resume the read, and\nthe whole operation must be restarted from the beginning.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:partitionRead",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.partitionRead",
"parameterOrder": [
"session"
],
"parameters": {
"session": {
"description": "Required. The session used to create the partitions.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+session}:partitionRead",
"request": {
"$ref": "PartitionReadRequest"
},
"response": {
"$ref": "PartitionResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"read": {
"description": "Reads rows from the database using key lookups and scans, as a\nsimple key/value style alternative to\nExecuteSql. This method cannot be used to\nreturn a result set larger than 10 MiB; if the read matches more\ndata than that, the read fails with a `FAILED_PRECONDITION`\nerror.\n\nReads inside read-write transactions might return `ABORTED`. If\nthis occurs, the application should restart the transaction from\nthe beginning. See Transaction for more details.\n\nLarger result sets can be yielded in streaming fashion by calling\nStreamingRead instead.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:read",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.read",
"parameterOrder": [
"session"
],
"parameters": {
"session": {
"description": "Required. The session in which the read should be performed.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+session}:read",
"request": {
"$ref": "ReadRequest"
},
"response": {
"$ref": "ResultSet"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"rollback": {
"description": "Rolls back a transaction, releasing any locks it holds. It is a good\nidea to call this for any transaction that includes one or more\nRead or ExecuteSql requests and\nultimately decides not to commit.\n\n`Rollback` returns `OK` if it successfully aborts the transaction, the\ntransaction was already aborted, or the transaction is not\nfound. `Rollback` never returns `ABORTED`.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:rollback",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.rollback",
"parameterOrder": [
"session"
],
"parameters": {
"session": {
"description": "Required. The session in which the transaction to roll back is running.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+session}:rollback",
"request": {
"$ref": "RollbackRequest"
},
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
},
"streamingRead": {
"description": "Like Read, except returns the result set as a\nstream. Unlike Read, there is no limit on the\nsize of the returned result set. However, no individual row in\nthe result set can exceed 100 MiB, and no column value can exceed\n10 MiB.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:streamingRead",
"httpMethod": "POST",
"id": "spanner.projects.instances.databases.sessions.streamingRead",
"parameterOrder": [
"session"
],
"parameters": {
"session": {
"description": "Required. The session in which the read should be performed.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+session}:streamingRead",
"request": {
"$ref": "ReadRequest"
},
"response": {
"$ref": "PartialResultSet"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.data"
]
}
}
}
}
},
"operations": {
"methods": {
"cancel": {
"description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}:cancel",
"httpMethod": "POST",
"id": "spanner.projects.instances.operations.cancel",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource to be cancelled.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}:cancel",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"delete": {
"description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}",
"httpMethod": "DELETE",
"id": "spanner.projects.instances.operations.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource to be deleted.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"get": {
"description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}",
"httpMethod": "GET",
"id": "spanner.projects.instances.operations.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Operation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
},
"list": {
"description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations",
"httpMethod": "GET",
"id": "spanner.projects.instances.operations.list",
"parameterOrder": [
"name"
],
"parameters": {
"filter": {
"description": "The standard list filter.",
"location": "query",
"type": "string"
},
"name": {
"description": "The name of the operation's parent resource.",
"location": "path",
"pattern": "^projects/[^/]+/instances/[^/]+/operations$",
"required": true,
"type": "string"
},
"pageSize": {
"description": "The standard list page size.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "The standard list page token.",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "ListOperationsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/spanner.admin"
]
}
}
}
}
}
}
}
},
"revision": "20200309",
"rootUrl": "https://spanner.googleapis.com/",
"schemas": {
"Backup": {
"description": "A backup of a Cloud Spanner database.",
"id": "Backup",
"properties": {
"createTime": {
"description": "Output only. The backup will contain an externally consistent\ncopy of the database at the timestamp specified by\n`create_time`. `create_time` is approximately the time the\nCreateBackup request is received.",
"format": "google-datetime",
"type": "string"
},
"database": {
"description": "Required for the CreateBackup operation.\nName of the database from which this backup was\ncreated. This needs to be in the same instance as the backup.\nValues are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`.",
"type": "string"
},
"expireTime": {
"description": "Required for the CreateBackup\noperation. The expiration time of the backup, with microseconds\ngranularity that must be at least 6 hours and at most 366 days\nfrom the time the CreateBackup request is processed. Once the `expire_time`\nhas passed, the backup is eligible to be automatically deleted by Cloud\nSpanner to free the resources used by the backup.",
"format": "google-datetime",
"type": "string"
},
"name": {
"description": "Output only for the CreateBackup][DatabaseAdmin.CreateBackup] operation.\nRequired for the UpdateBackup operation.\n\nA globally unique identifier for the backup which cannot be\nchanged. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/backups/a-z*[a-z0-9]`\nThe final segment of the name must be between 2 and 60 characters\nin length.\n\nThe backup is stored in the location(s) specified in the instance\nconfiguration of the instance containing the backup, identified\nby the prefix of the backup name of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
"type": "string"
},
"referencingDatabases": {
"description": "Output only. The names of the restored databases that reference the backup.\nThe database names are of\nthe form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`.\nReferencing databases may exist in different instances. The existence of\nany referencing database prevents the backup from being deleted. When a\nrestored database from the backup enters the `READY` state, the reference\nto the backup is removed.",
"items": {
"type": "string"
},
"type": "array"
},
"sizeBytes": {
"description": "Output only. Size of the backup in bytes.",
"format": "int64",
"type": "string"
},
"state": {
"description": "Output only. The current state of the backup.",
"enum": [
"STATE_UNSPECIFIED",
"CREATING",
"READY"
],
"enumDescriptions": [
"Not specified.",
"The pending backup is still being created. Operations on the\nbackup may fail with `FAILED_PRECONDITION` in this state.",
"The backup is complete and ready for use."
],
"type": "string"
}
},
"type": "object"
},
"BackupInfo": {
"description": "Information about a backup.",
"id": "BackupInfo",
"properties": {
"backup": {
"description": "Name of the backup.",
"type": "string"
},
"createTime": {
"description": "The backup contains an externally consistent copy of `source_database` at\nthe timestamp specified by `create_time`.",
"format": "google-datetime",
"type": "string"
},
"sourceDatabase": {
"description": "Name of the database the backup was created from.",
"type": "string"
}
},
"type": "object"
},
"BatchCreateSessionsRequest": {
"description": "The request for BatchCreateSessions.",
"id": "BatchCreateSessionsRequest",
"properties": {
"sessionCount": {
"description": "Required. The number of sessions to be created in this batch call.\nThe API may return fewer than the requested number of sessions. If a\nspecific number of sessions are desired, the client can make additional\ncalls to BatchCreateSessions (adjusting\nsession_count as necessary).",
"format": "int32",
"type": "integer"
},
"sessionTemplate": {
"$ref": "Session",
"description": "Parameters to be applied to each created session."
}
},
"type": "object"
},
"BatchCreateSessionsResponse": {
"description": "The response for BatchCreateSessions.",
"id": "BatchCreateSessionsResponse",
"properties": {
"session": {
"description": "The freshly created sessions.",
"items": {
"$ref": "Session"
},
"type": "array"
}
},
"type": "object"
},
"BeginTransactionRequest": {
"description": "The request for BeginTransaction.",
"id": "BeginTransactionRequest",
"properties": {
"options": {
"$ref": "TransactionOptions",
"description": "Required. Options for the new transaction."
}
},
"type": "object"
},
"Binding": {
"description": "Associates `members` with a `role`.",
"id": "Binding",
"properties": {
"condition": {
"$ref": "Expr",
"description": "The condition that is associated with this binding.\nNOTE: An unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently."
},
"members": {
"description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@example.com` .\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n* `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique\n identifier) representing a user that has been recently deleted. For\n example, `alice@example.com?uid=123456789012345678901`. If the user is\n recovered, this value reverts to `user:{emailid}` and the recovered user\n retains the role in the binding.\n\n* `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus\n unique identifier) representing a service account that has been recently\n deleted. For example,\n `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.\n If the service account is undeleted, this value reverts to\n `serviceAccount:{emailid}` and the undeleted service account retains the\n role in the binding.\n\n* `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique\n identifier) representing a Google group that has been recently\n deleted. For example, `admins@example.com?uid=123456789012345678901`. If\n the group is recovered, this value reverts to `group:{emailid}` and the\n recovered group retains the role in the binding.\n\n\n* `domain:{domain}`: The G Suite domain (primary) that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n",
"items": {
"type": "string"
},
"type": "array"
},
"role": {
"description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.",
"type": "string"
}
},
"type": "object"
},
"ChildLink": {
"description": "Metadata associated with a parent-child relationship appearing in a\nPlanNode.",
"id": "ChildLink",
"properties": {
"childIndex": {
"description": "The node to which the link points.",
"format": "int32",
"type": "integer"
},
"type": {
"description": "The type of the link. For example, in Hash Joins this could be used to\ndistinguish between the build child and the probe child, or in the case\nof the child being an output variable, to represent the tag associated\nwith the output variable.",
"type": "string"
},
"variable": {
"description": "Only present if the child node is SCALAR and corresponds\nto an output variable of the parent node. The field carries the name of\nthe output variable.\nFor example, a `TableScan` operator that reads rows from a table will\nhave child links to the `SCALAR` nodes representing the output variables\ncreated for each column that is read by the operator. The corresponding\n`variable` fields will be set to the variable names assigned to the\ncolumns.",
"type": "string"
}
},
"type": "object"
},
"CommitRequest": {
"description": "The request for Commit.",
"id": "CommitRequest",
"properties": {
"mutations": {
"description": "The mutations to be executed when this transaction commits. All\nmutations are applied atomically, in the order they appear in\nthis list.",
"items": {
"$ref": "Mutation"
},
"type": "array"
},
"singleUseTransaction": {
"$ref": "TransactionOptions",
"description": "Execute mutations in a temporary transaction. Note that unlike\ncommit of a previously-started transaction, commit with a\ntemporary transaction is non-idempotent. That is, if the\n`CommitRequest` is sent to Cloud Spanner more than once (for\ninstance, due to retries in the application, or in the\ntransport library), it is possible that the mutations are\nexecuted more than once. If this is undesirable, use\nBeginTransaction and\nCommit instead."
},
"transactionId": {
"description": "Commit a previously-started transaction.",
"format": "byte",
"type": "string"
}
},
"type": "object"
},
"CommitResponse": {
"description": "The response for Commit.",
"id": "CommitResponse",
"properties": {
"commitTimestamp": {
"description": "The Cloud Spanner timestamp at which the transaction committed.",
"format": "google-datetime",
"type": "string"
}
},
"type": "object"
},
"CreateBackupMetadata": {
"description": "Metadata type for the operation returned by\nCreateBackup.",
"id": "CreateBackupMetadata",
"properties": {
"cancelTime": {
"description": "The time at which cancellation of this operation was received.\nOperations.CancelOperation\nstarts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not guaranteed.\nClients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.",
"format": "google-datetime",
"type": "string"
},
"database": {
"description": "The name of the database the backup is created from.",
"type": "string"
},
"name": {
"description": "The name of the backup being created.",
"type": "string"
},
"progress": {
"$ref": "OperationProgress",
"description": "The progress of the\nCreateBackup operation."
}
},
"type": "object"
},
"CreateDatabaseMetadata": {
"description": "Metadata type for the operation returned by\nCreateDatabase.",
"id": "CreateDatabaseMetadata",
"properties": {
"database": {
"description": "The database being created.",
"type": "string"
}
},
"type": "object"
},
"CreateDatabaseRequest": {
"description": "The request for CreateDatabase.",
"id": "CreateDatabaseRequest",
"properties": {
"createStatement": {
"description": "Required. A `CREATE DATABASE` statement, which specifies the ID of the\nnew database. The database ID must conform to the regular expression\n`a-z*[a-z0-9]` and be between 2 and 30 characters in length.\nIf the database ID is a reserved word or if it contains a hyphen, the\ndatabase ID must be enclosed in backticks (`` ` ``).",
"type": "string"
},
"extraStatements": {
"description": "Optional. A list of DDL statements to run inside the newly created\ndatabase. Statements can create tables, indexes, etc. These\nstatements execute atomically with the creation of the database:\nif there is an error in any statement, the database is not created.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"CreateInstanceMetadata": {
"description": "Metadata type for the operation returned by\nCreateInstance.",
"id": "CreateInstanceMetadata",
"properties": {
"cancelTime": {
"description": "The time at which this operation was cancelled. If set, this operation is\nin the process of undoing itself (which is guaranteed to succeed) and\ncannot be cancelled again.",
"format": "google-datetime",
"type": "string"
},
"endTime": {
"description": "The time at which this operation failed or was completed successfully.",
"format": "google-datetime",
"type": "string"
},
"instance": {
"$ref": "Instance",
"description": "The instance being created."
},
"startTime": {
"description": "The time at which the\nCreateInstance request was\nreceived.",
"format": "google-datetime",
"type": "string"
}
},
"type": "object"
},
"CreateInstanceRequest": {
"description": "The request for CreateInstance.",
"id": "CreateInstanceRequest",
"properties": {
"instance": {
"$ref": "Instance",
"description": "Required. The instance to create. The name may be omitted, but if\nspecified must be `\u003cparent\u003e/instances/\u003cinstance_id\u003e`."
},
"instanceId": {
"description": "Required. The ID of the instance to create. Valid identifiers are of the\nform `a-z*[a-z0-9]` and must be between 2 and 64 characters in\nlength.",
"type": "string"
}
},
"type": "object"
},
"CreateSessionRequest": {
"description": "The request for CreateSession.",
"id": "CreateSessionRequest",
"properties": {
"session": {
"$ref": "Session",
"description": "The session to create."
}
},
"type": "object"
},
"Database": {
"description": "A Cloud Spanner database.",
"id": "Database",
"properties": {
"createTime": {
"description": "Output only. If exists, the time at which the database creation started.",
"format": "google-datetime",
"type": "string"
},
"name": {
"description": "Required. The name of the database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`,\nwhere `\u003cdatabase\u003e` is as specified in the `CREATE DATABASE`\nstatement. This name can be passed to other API methods to\nidentify the database.",
"type": "string"
},
"restoreInfo": {
"$ref": "RestoreInfo",
"description": "Output only. Applicable only for restored databases. Contains information\nabout the restore source."
},
"state": {
"description": "Output only. The current database state.",
"enum": [
"STATE_UNSPECIFIED",
"CREATING",
"READY",
"READY_OPTIMIZING"
],
"enumDescriptions": [
"Not specified.",
"The database is still being created. Operations on the database may fail\nwith `FAILED_PRECONDITION` in this state.",
"The database is fully created and ready for use.",
"The database is fully created and ready for use, but is still\nbeing optimized for performance and cannot handle full load.\n\nIn this state, the database still references the backup\nit was restore from, preventing the backup\nfrom being deleted. When optimizations are complete, the full performance\nof the database will be restored, and the database will transition to\n`READY` state."
],
"type": "string"
}
},
"type": "object"
},
"Delete": {
"description": "Arguments to delete operations.",
"id": "Delete",
"properties": {
"keySet": {
"$ref": "KeySet",
"description": "Required. The primary keys of the rows within table to delete. The\nprimary keys must be specified in the order in which they appear in the\n`PRIMARY KEY()` clause of the table's equivalent DDL statement (the DDL\nstatement used to create the table).\nDelete is idempotent. The transaction will succeed even if some or all\nrows do not exist."
},
"table": {
"description": "Required. The table whose rows will be deleted.",
"type": "string"
}
},
"type": "object"
},
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.",
"id": "Empty",
"properties": {},
"type": "object"
},
"ExecuteBatchDmlRequest": {
"description": "The request for ExecuteBatchDml.",
"id": "ExecuteBatchDmlRequest",
"properties": {
"seqno": {
"description": "Required. A per-transaction sequence number used to identify this request. This field\nmakes each request idempotent such that if the request is received multiple\ntimes, at most one will succeed.\n\nThe sequence number must be monotonically increasing within the\ntransaction. If a request arrives for the first time with an out-of-order\nsequence number, the transaction may be aborted. Replays of previously\nhandled requests will yield the same response as the first execution.",
"format": "int64",
"type": "string"
},
"statements": {
"description": "Required. The list of statements to execute in this batch. Statements are executed\nserially, such that the effects of statement `i` are visible to statement\n`i+1`. Each statement must be a DML statement. Execution stops at the\nfirst failed statement; the remaining statements are not executed.\n\nCallers must provide at least one statement.",
"items": {
"$ref": "Statement"
},
"type": "array"
},
"transaction": {
"$ref": "TransactionSelector",
"description": "Required. The transaction to use. Must be a read-write transaction.\n\nTo protect against replays, single-use transactions are not supported. The\ncaller must either supply an existing transaction ID or begin a new\ntransaction."
}
},
"type": "object"
},
"ExecuteBatchDmlResponse": {
"description": "The response for ExecuteBatchDml. Contains a list\nof ResultSet messages, one for each DML statement that has successfully\nexecuted, in the same order as the statements in the request. If a statement\nfails, the status in the response body identifies the cause of the failure.\n\nTo check for DML statements that failed, use the following approach:\n\n1. Check the status in the response message. The google.rpc.Code enum\n value `OK` indicates that all statements were executed successfully.\n2. If the status was not `OK`, check the number of result sets in the\n response. If the response contains `N` ResultSet messages, then\n statement `N+1` in the request failed.\n\nExample 1:\n\n* Request: 5 DML statements, all executed successfully.\n* Response: 5 ResultSet messages, with the status `OK`.\n\nExample 2:\n\n* Request: 5 DML statements. The third statement has a syntax error.\n* Response: 2 ResultSet messages, and a syntax error (`INVALID_ARGUMENT`)\n status. The number of ResultSet messages indicates that the third\n statement failed, and the fourth and fifth statements were not executed.",
"id": "ExecuteBatchDmlResponse",
"properties": {
"resultSets": {
"description": "One ResultSet for each statement in the request that ran successfully,\nin the same order as the statements in the request. Each ResultSet does\nnot contain any rows. The ResultSetStats in each ResultSet contain\nthe number of rows modified by the statement.\n\nOnly the first ResultSet in the response contains valid\nResultSetMetadata.",
"items": {
"$ref": "ResultSet"
},
"type": "array"
},
"status": {
"$ref": "Status",
"description": "If all DML statements are executed successfully, the status is `OK`.\nOtherwise, the error status of the first failed statement."
}
},
"type": "object"
},
"ExecuteSqlRequest": {
"description": "The request for ExecuteSql and\nExecuteStreamingSql.",
"id": "ExecuteSqlRequest",
"properties": {
"paramTypes": {
"additionalProperties": {
"$ref": "Type"
},
"description": "It is not always possible for Cloud Spanner to infer the right SQL type\nfrom a JSON value. For example, values of type `BYTES` and values\nof type `STRING` both appear in params as JSON strings.\n\nIn these cases, `param_types` can be used to specify the exact\nSQL type for some or all of the SQL statement parameters. See the\ndefinition of Type for more information\nabout SQL types.",
"type": "object"
},
"params": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Parameter names and values that bind to placeholders in the SQL string.\n\nA parameter placeholder consists of the `@` character followed by the\nparameter name (for example, `@firstName`). Parameter names can contain\nletters, numbers, and underscores.\n\nParameters can appear anywhere that a literal value is expected. The same\nparameter name can be used more than once, for example:\n\n`\"WHERE id \u003e @msg_id AND id \u003c @msg_id + 100\"`\n\nIt is an error to execute a SQL statement with unbound parameters.",
"type": "object"
},
"partitionToken": {
"description": "If present, results will be restricted to the specified partition\npreviously created using PartitionQuery(). There must be an exact\nmatch for the values of fields common to this message and the\nPartitionQueryRequest message used to create this partition_token.",
"format": "byte",
"type": "string"
},
"queryMode": {
"description": "Used to control the amount of debugging information returned in\nResultSetStats. If partition_token is set, query_mode can only\nbe set to QueryMode.NORMAL.",
"enum": [
"NORMAL",
"PLAN",
"PROFILE"
],
"enumDescriptions": [
"The default mode. Only the statement results are returned.",
"This mode returns only the query plan, without any results or\nexecution statistics information.",
"This mode returns both the query plan and the execution statistics along\nwith the results."
],
"type": "string"
},
"queryOptions": {
"$ref": "QueryOptions",
"description": "Query optimizer configuration to use for the given query."
},
"resumeToken": {
"description": "If this request is resuming a previously interrupted SQL statement\nexecution, `resume_token` should be copied from the last\nPartialResultSet yielded before the interruption. Doing this\nenables the new SQL statement execution to resume where the last one left\noff. The rest of the request parameters must exactly match the\nrequest that yielded this token.",
"format": "byte",
"type": "string"
},
"seqno": {
"description": "A per-transaction sequence number used to identify this request. This field\nmakes each request idempotent such that if the request is received multiple\ntimes, at most one will succeed.\n\nThe sequence number must be monotonically increasing within the\ntransaction. If a request arrives for the first time with an out-of-order\nsequence number, the transaction may be aborted. Replays of previously\nhandled requests will yield the same response as the first execution.\n\nRequired for DML statements. Ignored for queries.",
"format": "int64",
"type": "string"
},
"sql": {
"description": "Required. The SQL string.",
"type": "string"
},
"transaction": {
"$ref": "TransactionSelector",
"description": "The transaction to use.\n\nFor queries, if none is provided, the default is a temporary read-only\ntransaction with strong concurrency.\n\nStandard DML statements require a read-write transaction. To protect\nagainst replays, single-use transactions are not supported. The caller\nmust either supply an existing transaction ID or begin a new transaction.\n\nPartitioned DML requires an existing Partitioned DML transaction ID."
}
},
"type": "object"
},
"Expr": {
"description": "Represents a textual expression in the Common Expression Language (CEL)\nsyntax. CEL is a C-like expression language. The syntax and semantics of CEL\nare documented at https://github.com/google/cel-spec.\n\nExample (Comparison):\n\n title: \"Summary size limit\"\n description: \"Determines if a summary is less than 100 chars\"\n expression: \"document.summary.size() \u003c 100\"\n\nExample (Equality):\n\n title: \"Requestor is owner\"\n description: \"Determines if requestor is the document owner\"\n expression: \"document.owner == request.auth.claims.email\"\n\nExample (Logic):\n\n title: \"Public documents\"\n description: \"Determine whether the document should be publicly visible\"\n expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\"\n\nExample (Data Manipulation):\n\n title: \"Notification string\"\n description: \"Create a notification string with a timestamp.\"\n expression: \"'New message received at ' + string(document.create_time)\"\n\nThe exact variables and functions that may be referenced within an expression\nare determined by the service that evaluates it. See the service\ndocumentation for additional information.",
"id": "Expr",
"properties": {
"description": {
"description": "Optional. Description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.",
"type": "string"
},
"expression": {
"description": "Textual representation of an expression in Common Expression Language\nsyntax.",
"type": "string"
},
"location": {
"description": "Optional. String indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.",
"type": "string"
},
"title": {
"description": "Optional. Title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.",
"type": "string"
}
},
"type": "object"
},
"Field": {
"description": "Message representing a single field of a struct.",
"id": "Field",
"properties": {
"name": {
"description": "The name of the field. For reads, this is the column name. For\nSQL queries, it is the column alias (e.g., `\"Word\"` in the\nquery `\"SELECT 'hello' AS Word\"`), or the column name (e.g.,\n`\"ColName\"` in the query `\"SELECT ColName FROM Table\"`). Some\ncolumns might have an empty name (e.g., !\"SELECT\nUPPER(ColName)\"`). Note that a query result can contain\nmultiple fields with the same name.",
"type": "string"
},
"type": {
"$ref": "Type",
"description": "The type of the field."
}
},
"type": "object"
},
"GetDatabaseDdlResponse": {
"description": "The response for GetDatabaseDdl.",
"id": "GetDatabaseDdlResponse",
"properties": {
"statements": {
"description": "A list of formatted DDL statements defining the schema of the database\nspecified in the request.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"GetIamPolicyRequest": {
"description": "Request message for `GetIamPolicy` method.",
"id": "GetIamPolicyRequest",
"properties": {
"options": {
"$ref": "GetPolicyOptions",
"description": "OPTIONAL: A `GetPolicyOptions` object for specifying options to\n`GetIamPolicy`. This field is only used by Cloud IAM."
}
},
"type": "object"
},
"GetPolicyOptions": {
"description": "Encapsulates settings provided to GetIamPolicy.",
"id": "GetPolicyOptions",
"properties": {
"requestedPolicyVersion": {
"description": "Optional. The policy format version to be returned.\n\nValid values are 0, 1, and 3. Requests specifying an invalid value will be\nrejected.\n\nRequests for policies with any conditional bindings must specify version 3.\nPolicies without any conditional bindings may specify any valid value or\nleave the field unset.",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"Instance": {
"description": "An isolated set of Cloud Spanner resources on which databases can be hosted.",
"id": "Instance",
"properties": {
"config": {
"description": "Required. The name of the instance's configuration. Values are of the form\n`projects/\u003cproject\u003e/instanceConfigs/\u003cconfiguration\u003e`. See\nalso InstanceConfig and\nListInstanceConfigs.",
"type": "string"
},
"displayName": {
"description": "Required. The descriptive name for this instance as it appears in UIs.\nMust be unique per project and between 4 and 30 characters in length.",
"type": "string"
},
"endpointUris": {
"description": "Deprecated. This field is not populated.",
"items": {
"type": "string"
},
"type": "array"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "Cloud Labels are a flexible and lightweight mechanism for organizing cloud\nresources into groups that reflect a customer's organizational needs and\ndeployment strategies. Cloud Labels can be used to filter collections of\nresources. They can be used to control how resource metrics are aggregated.\nAnd they can be used as arguments to policy management rules (e.g. route,\nfirewall, load balancing, etc.).\n\n * Label keys must be between 1 and 63 characters long and must conform to\n the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.\n * Label values must be between 0 and 63 characters long and must conform\n to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.\n * No more than 64 labels can be associated with a given resource.\n\nSee https://goo.gl/xmQnxf for more information on and examples of labels.\n\nIf you plan to use labels in your own code, please note that additional\ncharacters may be allowed in the future. And so you are advised to use an\ninternal label representation, such as JSON, which doesn't rely upon\nspecific characters being disallowed. For example, representing labels\nas the string: name + \"_\" + value would prove problematic if we were to\nallow \"_\" in a future release.",
"type": "object"
},
"name": {
"description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 2 and 64 characters in length.",
"type": "string"
},
"nodeCount": {
"description": "The number of nodes allocated to this instance. This\nmay be zero in API responses for instances that are not yet in state\n`READY`.\n\nSee [the\ndocumentation](https://cloud.google.com/spanner/docs/instances#node_count)\nfor more information about nodes.",
"format": "int32",
"type": "integer"
},
"state": {
"description": "Output only. The current instance state. For\nCreateInstance, the state must be\neither omitted or set to `CREATING`. For\nUpdateInstance, the state must be\neither omitted or set to `READY`.",
"enum": [
"STATE_UNSPECIFIED",
"CREATING",
"READY"
],
"enumDescriptions": [
"Not specified.",
"The instance is still being created. Resources may not be\navailable yet, and operations such as database creation may not\nwork.",
"The instance is fully created and ready to do work such as\ncreating databases."
],
"type": "string"
}
},
"type": "object"
},
"InstanceConfig": {
"description": "A possible configuration for a Cloud Spanner instance. Configurations\ndefine the geographic placement of nodes and their replication.",
"id": "InstanceConfig",
"properties": {
"displayName": {
"description": "The name of this instance configuration as it appears in UIs.",
"type": "string"
},
"name": {
"description": "A unique identifier for the instance configuration. Values\nare of the form\n`projects/\u003cproject\u003e/instanceConfigs/a-z*`",
"type": "string"
},
"replicas": {
"description": "The geographic placement of nodes in this instance configuration and their\nreplication properties.",
"items": {
"$ref": "ReplicaInfo"
},
"type": "array"
}
},
"type": "object"
},
"KeyRange": {
"description": "KeyRange represents a range of rows in a table or index.\n\nA range has a start key and an end key. These keys can be open or\nclosed, indicating if the range includes rows with that key.\n\nKeys are represented by lists, where the ith value in the list\ncorresponds to the ith component of the table or index primary key.\nIndividual values are encoded as described\nhere.\n\nFor example, consider the following table definition:\n\n CREATE TABLE UserEvents (\n UserName STRING(MAX),\n EventDate STRING(10)\n ) PRIMARY KEY(UserName, EventDate);\n\nThe following keys name rows in this table:\n\n \"Bob\", \"2014-09-23\"\n\nSince the `UserEvents` table's `PRIMARY KEY` clause names two\ncolumns, each `UserEvents` key has two elements; the first is the\n`UserName`, and the second is the `EventDate`.\n\nKey ranges with multiple components are interpreted\nlexicographically by component using the table or index key's declared\nsort order. For example, the following range returns all events for\nuser `\"Bob\"` that occurred in the year 2015:\n\n \"start_closed\": [\"Bob\", \"2015-01-01\"]\n \"end_closed\": [\"Bob\", \"2015-12-31\"]\n\nStart and end keys can omit trailing key components. This affects the\ninclusion and exclusion of rows that exactly match the provided key\ncomponents: if the key is closed, then rows that exactly match the\nprovided components are included; if the key is open, then rows\nthat exactly match are not included.\n\nFor example, the following range includes all events for `\"Bob\"` that\noccurred during and after the year 2000:\n\n \"start_closed\": [\"Bob\", \"2000-01-01\"]\n \"end_closed\": [\"Bob\"]\n\nThe next example retrieves all events for `\"Bob\"`:\n\n \"start_closed\": [\"Bob\"]\n \"end_closed\": [\"Bob\"]\n\nTo retrieve events before the year 2000:\n\n \"start_closed\": [\"Bob\"]\n \"end_open\": [\"Bob\", \"2000-01-01\"]\n\nThe following range includes all rows in the table:\n\n \"start_closed\": []\n \"end_closed\": []\n\nThis range returns all users whose `UserName` begins with any\ncharacter from A to C:\n\n \"start_closed\": [\"A\"]\n \"end_open\": [\"D\"]\n\nThis range returns all users whose `UserName` begins with B:\n\n \"start_closed\": [\"B\"]\n \"end_open\": [\"C\"]\n\nKey ranges honor column sort order. For example, suppose a table is\ndefined as follows:\n\n CREATE TABLE DescendingSortedTable {\n Key INT64,\n ...\n ) PRIMARY KEY(Key DESC);\n\nThe following range retrieves all rows with key values between 1\nand 100 inclusive:\n\n \"start_closed\": [\"100\"]\n \"end_closed\": [\"1\"]\n\nNote that 100 is passed as the start, and 1 is passed as the end,\nbecause `Key` is a descending column in the schema.",
"id": "KeyRange",
"properties": {
"endClosed": {
"description": "If the end is closed, then the range includes all rows whose\nfirst `len(end_closed)` key columns exactly match `end_closed`.",
"items": {
"type": "any"
},
"type": "array"
},
"endOpen": {
"description": "If the end is open, then the range excludes rows whose first\n`len(end_open)` key columns exactly match `end_open`.",
"items": {
"type": "any"
},
"type": "array"
},
"startClosed": {
"description": "If the start is closed, then the range includes all rows whose\nfirst `len(start_closed)` key columns exactly match `start_closed`.",
"items": {
"type": "any"
},
"type": "array"
},
"startOpen": {
"description": "If the start is open, then the range excludes rows whose first\n`len(start_open)` key columns exactly match `start_open`.",
"items": {
"type": "any"
},
"type": "array"
}
},
"type": "object"
},
"KeySet": {
"description": "`KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All\nthe keys are expected to be in the same table or index. The keys need\nnot be sorted in any particular way.\n\nIf the same key is specified multiple times in the set (for example\nif two ranges, two keys, or a key and a range overlap), Cloud Spanner\nbehaves as if the key were only specified once.",
"id": "KeySet",
"properties": {
"all": {
"description": "For convenience `all` can be set to `true` to indicate that this\n`KeySet` matches all keys in the table or index. Note that any keys\nspecified in `keys` or `ranges` are only yielded once.",
"type": "boolean"
},
"keys": {
"description": "A list of specific keys. Entries in `keys` should have exactly as\nmany elements as there are columns in the primary or index key\nwith which this `KeySet` is used. Individual key values are\nencoded as described here.",
"items": {
"items": {
"type": "any"
},
"type": "array"
},
"type": "array"
},
"ranges": {
"description": "A list of key ranges. See KeyRange for more information about\nkey range specifications.",
"items": {
"$ref": "KeyRange"
},
"type": "array"
}
},
"type": "object"
},
"ListBackupOperationsResponse": {
"description": "The response for\nListBackupOperations.",
"id": "ListBackupOperationsResponse",
"properties": {
"nextPageToken": {
"description": "`next_page_token` can be sent in a subsequent\nListBackupOperations\ncall to fetch more of the matching metadata.",
"type": "string"
},
"operations": {
"description": "The list of matching backup long-running\noperations. Each operation's name will be\nprefixed by the backup's name and the operation's\nmetadata will be of type\nCreateBackupMetadata. Operations returned include those that are\npending or have completed/failed/canceled within the last 7 days.\nOperations returned are ordered by\n`operation.metadata.value.progress.start_time` in descending order starting\nfrom the most recently started operation.",
"items": {
"$ref": "Operation"
},
"type": "array"
}
},
"type": "object"
},
"ListBackupsResponse": {
"description": "The response for ListBackups.",
"id": "ListBackupsResponse",
"properties": {
"backups": {
"description": "The list of matching backups. Backups returned are ordered by `create_time`\nin descending order, starting from the most recent `create_time`.",
"items": {
"$ref": "Backup"
},
"type": "array"
},
"nextPageToken": {
"description": "`next_page_token` can be sent in a subsequent\nListBackups call to fetch more\nof the matching backups.",
"type": "string"
}
},
"type": "object"
},
"ListDatabaseOperationsResponse": {
"description": "The response for\nListDatabaseOperations.",
"id": "ListDatabaseOperationsResponse",
"properties": {
"nextPageToken": {
"description": "`next_page_token` can be sent in a subsequent\nListDatabaseOperations\ncall to fetch more of the matching metadata.",
"type": "string"
},
"operations": {
"description": "The list of matching database long-running\noperations. Each operation's name will be\nprefixed by the database's name. The operation's\nmetadata field type\n`metadata.type_url` describes the type of the metadata.",
"items": {
"$ref": "Operation"
},
"type": "array"
}
},
"type": "object"
},
"ListDatabasesResponse": {
"description": "The response for ListDatabases.",
"id": "ListDatabasesResponse",
"properties": {
"databases": {
"description": "Databases that matched the request.",
"items": {
"$ref": "Database"
},
"type": "array"
},
"nextPageToken": {
"description": "`next_page_token` can be sent in a subsequent\nListDatabases call to fetch more\nof the matching databases.",
"type": "string"
}
},
"type": "object"
},
"ListInstanceConfigsResponse": {
"description": "The response for ListInstanceConfigs.",
"id": "ListInstanceConfigsResponse",
"properties": {
"instanceConfigs": {
"description": "The list of requested instance configurations.",
"items": {
"$ref": "InstanceConfig"
},
"type": "array"
},
"nextPageToken": {
"description": "`next_page_token` can be sent in a subsequent\nListInstanceConfigs call to\nfetch more of the matching instance configurations.",
"type": "string"
}
},
"type": "object"
},
"ListInstancesResponse": {
"description": "The response for ListInstances.",
"id": "ListInstancesResponse",
"properties": {
"instances": {
"description": "The list of requested instances.",
"items": {
"$ref": "Instance"
},
"type": "array"
},
"nextPageToken": {
"description": "`next_page_token` can be sent in a subsequent\nListInstances call to fetch more\nof the matching instances.",
"type": "string"
}
},
"type": "object"
},
"ListOperationsResponse": {
"description": "The response message for Operations.ListOperations.",
"id": "ListOperationsResponse",
"properties": {
"nextPageToken": {
"description": "The standard List next-page token.",
"type": "string"
},
"operations": {
"description": "A list of operations that matches the specified filter in the request.",
"items": {
"$ref": "Operation"
},
"type": "array"
}
},
"type": "object"
},
"ListSessionsResponse": {
"description": "The response for ListSessions.",
"id": "ListSessionsResponse",
"properties": {
"nextPageToken": {
"description": "`next_page_token` can be sent in a subsequent\nListSessions call to fetch more of the matching\nsessions.",
"type": "string"
},
"sessions": {
"description": "The list of requested sessions.",
"items": {
"$ref": "Session"
},
"type": "array"
}
},
"type": "object"
},
"Mutation": {
"description": "A modification to one or more Cloud Spanner rows. Mutations can be\napplied to a Cloud Spanner database by sending them in a\nCommit call.",
"id": "Mutation",
"properties": {
"delete": {
"$ref": "Delete",
"description": "Delete rows from a table. Succeeds whether or not the named\nrows were present."
},
"insert": {
"$ref": "Write",
"description": "Insert new rows in a table. If any of the rows already exist,\nthe write or transaction fails with error `ALREADY_EXISTS`."
},
"insertOrUpdate": {
"$ref": "Write",
"description": "Like insert, except that if the row already exists, then\nits column values are overwritten with the ones provided. Any\ncolumn values not explicitly written are preserved.\n\nWhen using insert_or_update, just as when using insert, all `NOT\nNULL` columns in the table must be given a value. This holds true\neven when the row already exists and will therefore actually be updated."
},
"replace": {
"$ref": "Write",
"description": "Like insert, except that if the row already exists, it is\ndeleted, and the column values provided are inserted\ninstead. Unlike insert_or_update, this means any values not\nexplicitly written become `NULL`.\n\nIn an interleaved table, if you create the child table with the\n`ON DELETE CASCADE` annotation, then replacing a parent row\nalso deletes the child rows. Otherwise, you must delete the\nchild rows before you replace the parent row."
},
"update": {
"$ref": "Write",
"description": "Update existing rows in a table. If any of the rows does not\nalready exist, the transaction fails with error `NOT_FOUND`."
}
},
"type": "object"
},
"Operation": {
"description": "This resource represents a long-running operation that is the result of a\nnetwork API call.",
"id": "Operation",
"properties": {
"done": {
"description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.",
"type": "boolean"
},
"error": {
"$ref": "Status",
"description": "The error result of the operation in case of failure or cancellation."
},
"metadata": {
"additionalProperties": {
"description": "Properties of the object. Contains field @type with type URL.",
"type": "any"
},
"description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.",
"type": "object"
},
"name": {
"description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should be a resource name ending with `operations/{unique_id}`.",
"type": "string"
},
"response": {
"additionalProperties": {
"description": "Properties of the object. Contains field @type with type URL.",
"type": "any"
},
"description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.",
"type": "object"
}
},
"type": "object"
},
"OperationProgress": {
"description": "Encapsulates progress related information for a Cloud Spanner long\nrunning operation.",
"id": "OperationProgress",
"properties": {
"endTime": {
"description": "If set, the time at which this operation failed or was completed\nsuccessfully.",
"format": "google-datetime",
"type": "string"
},
"progressPercent": {
"description": "Percent completion of the operation.\nValues are between 0 and 100 inclusive.",
"format": "int32",
"type": "integer"
},
"startTime": {
"description": "Time the request was received.",
"format": "google-datetime",
"type": "string"
}
},
"type": "object"
},
"OptimizeRestoredDatabaseMetadata": {
"description": "Metadata type for the long-running operation used to track the progress\nof optimizations performed on a newly restored database. This long-running\noperation is automatically created by the system after the successful\ncompletion of a database restore, and cannot be cancelled.",
"id": "OptimizeRestoredDatabaseMetadata",
"properties": {
"name": {
"description": "Name of the restored database being optimized.",
"type": "string"
},
"progress": {
"$ref": "OperationProgress",
"description": "The progress of the post-restore optimizations."
}
},
"type": "object"
},
"PartialResultSet": {
"description": "Partial results from a streaming read or SQL query. Streaming reads and\nSQL queries better tolerate large result sets, large rows, and large\nvalues, but are a little trickier to consume.",
"id": "PartialResultSet",
"properties": {
"chunkedValue": {
"description": "If true, then the final value in values is chunked, and must\nbe combined with more values from subsequent `PartialResultSet`s\nto obtain a complete field value.",
"type": "boolean"
},
"metadata": {
"$ref": "ResultSetMetadata",
"description": "Metadata about the result set, such as row type information.\nOnly present in the first response."
},
"resumeToken": {
"description": "Streaming calls might be interrupted for a variety of reasons, such\nas TCP connection loss. If this occurs, the stream of results can\nbe resumed by re-sending the original request and including\n`resume_token`. Note that executing any other transaction in the\nsame session invalidates the token.",
"format": "byte",
"type": "string"
},
"stats": {
"$ref": "ResultSetStats",
"description": "Query plan and execution statistics for the statement that produced this\nstreaming result set. These can be requested by setting\nExecuteSqlRequest.query_mode and are sent\nonly once with the last response in the stream.\nThis field will also be present in the last response for DML\nstatements."
},
"values": {
"description": "A streamed result set consists of a stream of values, which might\nbe split into many `PartialResultSet` messages to accommodate\nlarge rows and/or large values. Every N complete values defines a\nrow, where N is equal to the number of entries in\nmetadata.row_type.fields.\n\nMost values are encoded based on type as described\nhere.\n\nIt is possible that the last value in values is \"chunked\",\nmeaning that the rest of the value is sent in subsequent\n`PartialResultSet`(s). This is denoted by the chunked_value\nfield. Two or more chunked values can be merged to form a\ncomplete value as follows:\n\n * `bool/number/null`: cannot be chunked\n * `string`: concatenate the strings\n * `list`: concatenate the lists. If the last element in a list is a\n `string`, `list`, or `object`, merge it with the first element in\n the next list by applying these rules recursively.\n * `object`: concatenate the (field name, field value) pairs. If a\n field name is duplicated, then apply these rules recursively\n to merge the field values.\n\nSome examples of merging:\n\n # Strings are concatenated.\n \"foo\", \"bar\" =\u003e \"foobar\"\n\n # Lists of non-strings are concatenated.\n [2, 3], [4] =\u003e [2, 3, 4]\n\n # Lists are concatenated, but the last and first elements are merged\n # because they are strings.\n [\"a\", \"b\"], [\"c\", \"d\"] =\u003e [\"a\", \"bc\", \"d\"]\n\n # Lists are concatenated, but the last and first elements are merged\n # because they are lists. Recursively, the last and first elements\n # of the inner lists are merged because they are strings.\n [\"a\", [\"b\", \"c\"]], [[\"d\"], \"e\"] =\u003e [\"a\", [\"b\", \"cd\"], \"e\"]\n\n # Non-overlapping object fields are combined.\n {\"a\": \"1\"}, {\"b\": \"2\"} =\u003e {\"a\": \"1\", \"b\": 2\"}\n\n # Overlapping object fields are merged.\n {\"a\": \"1\"}, {\"a\": \"2\"} =\u003e {\"a\": \"12\"}\n\n # Examples of merging objects containing lists of strings.\n {\"a\": [\"1\"]}, {\"a\": [\"2\"]} =\u003e {\"a\": [\"12\"]}\n\nFor a more complete example, suppose a streaming SQL query is\nyielding a result set whose rows contain a single string\nfield. The following `PartialResultSet`s might be yielded:\n\n {\n \"metadata\": { ... }\n \"values\": [\"Hello\", \"W\"]\n \"chunked_value\": true\n \"resume_token\": \"Af65...\"\n }\n {\n \"values\": [\"orl\"]\n \"chunked_value\": true\n \"resume_token\": \"Bqp2...\"\n }\n {\n \"values\": [\"d\"]\n \"resume_token\": \"Zx1B...\"\n }\n\nThis sequence of `PartialResultSet`s encodes two rows, one\ncontaining the field value `\"Hello\"`, and a second containing the\nfield value `\"World\" = \"W\" + \"orl\" + \"d\"`.",
"items": {
"type": "any"
},
"type": "array"
}
},
"type": "object"
},
"Partition": {
"description": "Information returned for each partition returned in a\nPartitionResponse.",
"id": "Partition",
"properties": {
"partitionToken": {
"description": "This token can be passed to Read, StreamingRead, ExecuteSql, or\nExecuteStreamingSql requests to restrict the results to those identified by\nthis partition token.",
"format": "byte",
"type": "string"
}
},
"type": "object"
},
"PartitionOptions": {
"description": "Options for a PartitionQueryRequest and\nPartitionReadRequest.",
"id": "PartitionOptions",
"properties": {
"maxPartitions": {
"description": "**Note:** This hint is currently ignored by PartitionQuery and\nPartitionRead requests.\n\nThe desired maximum number of partitions to return. For example, this may\nbe set to the number of workers available. The default for this option\nis currently 10,000. The maximum value is currently 200,000. This is only\na hint. The actual number of partitions returned may be smaller or larger\nthan this maximum count request.",
"format": "int64",
"type": "string"
},
"partitionSizeBytes": {
"description": "**Note:** This hint is currently ignored by PartitionQuery and\nPartitionRead requests.\n\nThe desired data size for each partition generated. The default for this\noption is currently 1 GiB. This is only a hint. The actual size of each\npartition may be smaller or larger than this size request.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"PartitionQueryRequest": {
"description": "The request for PartitionQuery",
"id": "PartitionQueryRequest",
"properties": {
"paramTypes": {
"additionalProperties": {
"$ref": "Type"
},
"description": "It is not always possible for Cloud Spanner to infer the right SQL type\nfrom a JSON value. For example, values of type `BYTES` and values\nof type `STRING` both appear in params as JSON strings.\n\nIn these cases, `param_types` can be used to specify the exact\nSQL type for some or all of the SQL query parameters. See the\ndefinition of Type for more information\nabout SQL types.",
"type": "object"
},
"params": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Parameter names and values that bind to placeholders in the SQL string.\n\nA parameter placeholder consists of the `@` character followed by the\nparameter name (for example, `@firstName`). Parameter names can contain\nletters, numbers, and underscores.\n\nParameters can appear anywhere that a literal value is expected. The same\nparameter name can be used more than once, for example:\n\n`\"WHERE id \u003e @msg_id AND id \u003c @msg_id + 100\"`\n\nIt is an error to execute a SQL statement with unbound parameters.",
"type": "object"
},
"partitionOptions": {
"$ref": "PartitionOptions",
"description": "Additional options that affect how many partitions are created."
},
"sql": {
"description": "Required. The query request to generate partitions for. The request will fail if\nthe query is not root partitionable. The query plan of a root\npartitionable query has a single distributed union operator. A distributed\nunion operator conceptually divides one or more tables into multiple\nsplits, remotely evaluates a subquery independently on each split, and\nthen unions all results.\n\nThis must not contain DML commands, such as INSERT, UPDATE, or\nDELETE. Use ExecuteStreamingSql with a\nPartitionedDml transaction for large, partition-friendly DML operations.",
"type": "string"
},
"transaction": {
"$ref": "TransactionSelector",
"description": "Read only snapshot transactions are supported, read/write and single use\ntransactions are not."
}
},
"type": "object"
},
"PartitionReadRequest": {
"description": "The request for PartitionRead",
"id": "PartitionReadRequest",
"properties": {
"columns": {
"description": "The columns of table to be returned for each row matching\nthis request.",
"items": {
"type": "string"
},
"type": "array"
},
"index": {
"description": "If non-empty, the name of an index on table. This index is\nused instead of the table primary key when interpreting key_set\nand sorting result rows. See key_set for further information.",
"type": "string"
},
"keySet": {
"$ref": "KeySet",
"description": "Required. `key_set` identifies the rows to be yielded. `key_set` names the\nprimary keys of the rows in table to be yielded, unless index\nis present. If index is present, then key_set instead names\nindex keys in index.\n\nIt is not an error for the `key_set` to name rows that do not\nexist in the database. Read yields nothing for nonexistent rows."
},
"partitionOptions": {
"$ref": "PartitionOptions",
"description": "Additional options that affect how many partitions are created."
},
"table": {
"description": "Required. The name of the table in the database to be read.",
"type": "string"
},
"transaction": {
"$ref": "TransactionSelector",
"description": "Read only snapshot transactions are supported, read/write and single use\ntransactions are not."
}
},
"type": "object"
},
"PartitionResponse": {
"description": "The response for PartitionQuery\nor PartitionRead",
"id": "PartitionResponse",
"properties": {
"partitions": {
"description": "Partitions created by this request.",
"items": {
"$ref": "Partition"
},
"type": "array"
},
"transaction": {
"$ref": "Transaction",
"description": "Transaction created by this request."
}
},
"type": "object"
},
"PartitionedDml": {
"description": "Message type to initiate a Partitioned DML transaction.",
"id": "PartitionedDml",
"properties": {},
"type": "object"
},
"PlanNode": {
"description": "Node information for nodes appearing in a QueryPlan.plan_nodes.",
"id": "PlanNode",
"properties": {
"childLinks": {
"description": "List of child node `index`es and their relationship to this parent.",
"items": {
"$ref": "ChildLink"
},
"type": "array"
},
"displayName": {
"description": "The display name for the node.",
"type": "string"
},
"executionStats": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "The execution statistics associated with the node, contained in a group of\nkey-value pairs. Only present if the plan was returned as a result of a\nprofile query. For example, number of executions, number of rows/time per\nexecution etc.",
"type": "object"
},
"index": {
"description": "The `PlanNode`'s index in node list.",
"format": "int32",
"type": "integer"
},
"kind": {
"description": "Used to determine the type of node. May be needed for visualizing\ndifferent kinds of nodes differently. For example, If the node is a\nSCALAR node, it will have a condensed representation\nwhich can be used to directly embed a description of the node in its\nparent.",
"enum": [
"KIND_UNSPECIFIED",
"RELATIONAL",
"SCALAR"
],
"enumDescriptions": [
"Not specified.",
"Denotes a Relational operator node in the expression tree. Relational\noperators represent iterative processing of rows during query execution.\nFor example, a `TableScan` operation that reads rows from a table.",
"Denotes a Scalar node in the expression tree. Scalar nodes represent\nnon-iterable entities in the query plan. For example, constants or\narithmetic operators appearing inside predicate expressions or references\nto column names."
],
"type": "string"
},
"metadata": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Attributes relevant to the node contained in a group of key-value pairs.\nFor example, a Parameter Reference node could have the following\ninformation in its metadata:\n\n {\n \"parameter_reference\": \"param1\",\n \"parameter_type\": \"array\"\n }",
"type": "object"
},
"shortRepresentation": {
"$ref": "ShortRepresentation",
"description": "Condensed representation for SCALAR nodes."
}
},
"type": "object"
},
"Policy": {
"description": "An Identity and Access Management (IAM) policy, which specifies access\ncontrols for Google Cloud resources.\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more\n`members` to a single `role`. Members can be user accounts, service accounts,\nGoogle groups, and domains (such as G Suite). A `role` is a named list of\npermissions; each `role` can be an IAM predefined role or a user-created\ncustom role.\n\nOptionally, a `binding` can specify a `condition`, which is a logical\nexpression that allows access to a resource only if the expression evaluates\nto `true`. A condition can add constraints based on attributes of the\nrequest, the resource, or both.\n\n**JSON example:**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/resourcemanager.organizationAdmin\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-project-id@appspot.gserviceaccount.com\"\n ]\n },\n {\n \"role\": \"roles/resourcemanager.organizationViewer\",\n \"members\": [\"user:eve@example.com\"],\n \"condition\": {\n \"title\": \"expirable access\",\n \"description\": \"Does not grant access after Sep 2020\",\n \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\",\n }\n }\n ],\n \"etag\": \"BwWWja0YfJA=\",\n \"version\": 3\n }\n\n**YAML example:**\n\n bindings:\n - members:\n - user:mike@example.com\n - group:admins@example.com\n - domain:google.com\n - serviceAccount:my-project-id@appspot.gserviceaccount.com\n role: roles/resourcemanager.organizationAdmin\n - members:\n - user:eve@example.com\n role: roles/resourcemanager.organizationViewer\n condition:\n title: expirable access\n description: Does not grant access after Sep 2020\n expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\n - etag: BwWWja0YfJA=\n - version: 3\n\nFor a description of IAM and its features, see the\n[IAM documentation](https://cloud.google.com/iam/docs/).",
"id": "Policy",
"properties": {
"bindings": {
"description": "Associates a list of `members` to a `role`. Optionally, may specify a\n`condition` that determines how and when the `bindings` are applied. Each\nof the `bindings` must contain at least one member.",
"items": {
"$ref": "Binding"
},
"type": "array"
},
"etag": {
"description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\n**Important:** If you use IAM Conditions, you must include the `etag` field\nwhenever you call `setIamPolicy`. If you omit this field, then IAM allows\nyou to overwrite a version `3` policy with a version `1` policy, and all of\nthe conditions in the version `3` policy are lost.",
"format": "byte",
"type": "string"
},
"version": {
"description": "Specifies the format of the policy.\n\nValid values are `0`, `1`, and `3`. Requests that specify an invalid value\nare rejected.\n\nAny operation that affects conditional role bindings must specify version\n`3`. This requirement applies to the following operations:\n\n* Getting a policy that includes a conditional role binding\n* Adding a conditional role binding to a policy\n* Changing a conditional role binding in a policy\n* Removing any role binding, with or without a condition, from a policy\n that includes conditions\n\n**Important:** If you use IAM Conditions, you must include the `etag` field\nwhenever you call `setIamPolicy`. If you omit this field, then IAM allows\nyou to overwrite a version `3` policy with a version `1` policy, and all of\nthe conditions in the version `3` policy are lost.\n\nIf a policy does not include any conditions, operations on that policy may\nspecify any valid version or leave the field unset.",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"QueryOptions": {
"description": "Query optimizer configuration.",
"id": "QueryOptions",
"properties": {
"optimizerVersion": {
"description": "An option to control the selection of optimizer version.\n\nThis parameter allows individual queries to pick different query\noptimizer versions.\n\nSpecifying \"latest\" as a value instructs Cloud Spanner to use the\nlatest supported query optimizer version. If not specified, Cloud Spanner\nuses optimizer version set at the database level options. Any other\npositive integer (from the list of supported optimizer versions)\noverrides the default optimizer version for query execution.\nThe list of supported optimizer versions can be queried from\nSPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement\nwith an invalid optimizer version will fail with a syntax error\n(`INVALID_ARGUMENT`) status.\n\nThe `optimizer_version` statement hint has precedence over this setting.",
"type": "string"
}
},
"type": "object"
},
"QueryPlan": {
"description": "Contains an ordered list of nodes appearing in the query plan.",
"id": "QueryPlan",
"properties": {
"planNodes": {
"description": "The nodes in the query plan. Plan nodes are returned in pre-order starting\nwith the plan root. Each PlanNode's `id` corresponds to its index in\n`plan_nodes`.",
"items": {
"$ref": "PlanNode"
},
"type": "array"
}
},
"type": "object"
},
"ReadOnly": {
"description": "Message type to initiate a read-only transaction.",
"id": "ReadOnly",
"properties": {
"exactStaleness": {
"description": "Executes all reads at a timestamp that is `exact_staleness`\nold. The timestamp is chosen soon after the read is started.\n\nGuarantees that all writes that have committed more than the\nspecified number of seconds ago are visible. Because Cloud Spanner\nchooses the exact timestamp, this mode works even if the client's\nlocal clock is substantially skewed from Cloud Spanner commit\ntimestamps.\n\nUseful for reading at nearby replicas without the distributed\ntimestamp negotiation overhead of `max_staleness`.",
"format": "google-duration",
"type": "string"
},
"maxStaleness": {
"description": "Read data at a timestamp \u003e= `NOW - max_staleness`\nseconds. Guarantees that all writes that have committed more\nthan the specified number of seconds ago are visible. Because\nCloud Spanner chooses the exact timestamp, this mode works even if\nthe client's local clock is substantially skewed from Cloud Spanner\ncommit timestamps.\n\nUseful for reading the freshest data available at a nearby\nreplica, while bounding the possible staleness if the local\nreplica has fallen behind.\n\nNote that this option can only be used in single-use\ntransactions.",
"format": "google-duration",
"type": "string"
},
"minReadTimestamp": {
"description": "Executes all reads at a timestamp \u003e= `min_read_timestamp`.\n\nThis is useful for requesting fresher data than some previous\nread, or data that is fresh enough to observe the effects of some\npreviously committed transaction whose timestamp is known.\n\nNote that this option can only be used in single-use transactions.\n\nA timestamp in RFC3339 UTC \\\"Zulu\\\" format, accurate to nanoseconds.\nExample: `\"2014-10-02T15:01:23.045123456Z\"`.",
"format": "google-datetime",
"type": "string"
},
"readTimestamp": {
"description": "Executes all reads at the given timestamp. Unlike other modes,\nreads at a specific timestamp are repeatable; the same read at\nthe same timestamp always returns the same data. If the\ntimestamp is in the future, the read will block until the\nspecified timestamp, modulo the read's deadline.\n\nUseful for large scale consistent reads such as mapreduces, or\nfor coordinating many reads against a consistent snapshot of the\ndata.\n\nA timestamp in RFC3339 UTC \\\"Zulu\\\" format, accurate to nanoseconds.\nExample: `\"2014-10-02T15:01:23.045123456Z\"`.",
"format": "google-datetime",
"type": "string"
},
"returnReadTimestamp": {
"description": "If true, the Cloud Spanner-selected read timestamp is included in\nthe Transaction message that describes the transaction.",
"type": "boolean"
},
"strong": {
"description": "Read at a timestamp where all previously committed transactions\nare visible.",
"type": "boolean"
}
},
"type": "object"
},
"ReadRequest": {
"description": "The request for Read and\nStreamingRead.",
"id": "ReadRequest",
"properties": {
"columns": {
"description": "Required. The columns of table to be returned for each row matching\nthis request.",
"items": {
"type": "string"
},
"type": "array"
},
"index": {
"description": "If non-empty, the name of an index on table. This index is\nused instead of the table primary key when interpreting key_set\nand sorting result rows. See key_set for further information.",
"type": "string"
},
"keySet": {
"$ref": "KeySet",
"description": "Required. `key_set` identifies the rows to be yielded. `key_set` names the\nprimary keys of the rows in table to be yielded, unless index\nis present. If index is present, then key_set instead names\nindex keys in index.\n\nIf the partition_token field is empty, rows are yielded\nin table primary key order (if index is empty) or index key order\n(if index is non-empty). If the partition_token field is not\nempty, rows will be yielded in an unspecified order.\n\nIt is not an error for the `key_set` to name rows that do not\nexist in the database. Read yields nothing for nonexistent rows."
},
"limit": {
"description": "If greater than zero, only the first `limit` rows are yielded. If `limit`\nis zero, the default is no limit. A limit cannot be specified if\n`partition_token` is set.",
"format": "int64",
"type": "string"
},
"partitionToken": {
"description": "If present, results will be restricted to the specified partition\npreviously created using PartitionRead(). There must be an exact\nmatch for the values of fields common to this message and the\nPartitionReadRequest message used to create this partition_token.",
"format": "byte",
"type": "string"
},
"resumeToken": {
"description": "If this request is resuming a previously interrupted read,\n`resume_token` should be copied from the last\nPartialResultSet yielded before the interruption. Doing this\nenables the new read to resume where the last read left off. The\nrest of the request parameters must exactly match the request\nthat yielded this token.",
"format": "byte",
"type": "string"
},
"table": {
"description": "Required. The name of the table in the database to be read.",
"type": "string"
},
"transaction": {
"$ref": "TransactionSelector",
"description": "The transaction to use. If none is provided, the default is a\ntemporary read-only transaction with strong concurrency."
}
},
"type": "object"
},
"ReadWrite": {
"description": "Message type to initiate a read-write transaction. Currently this\ntransaction type has no options.",
"id": "ReadWrite",
"properties": {},
"type": "object"
},
"ReplicaInfo": {
"id": "ReplicaInfo",
"properties": {
"defaultLeaderLocation": {
"description": "If true, this location is designated as the default leader location where\nleader replicas are placed. See the [region types\ndocumentation](https://cloud.google.com/spanner/docs/instances#region_types)\nfor more details.",
"type": "boolean"
},
"location": {
"description": "The location of the serving resources, e.g. \"us-central1\".",
"type": "string"
},
"type": {
"description": "The type of replica.",
"enum": [
"TYPE_UNSPECIFIED",
"READ_WRITE",
"READ_ONLY",
"WITNESS"
],
"enumDescriptions": [
"Not specified.",
"Read-write replicas support both reads and writes. These replicas:\n\n* Maintain a full copy of your data.\n* Serve reads.\n* Can vote whether to commit a write.\n* Participate in leadership election.\n* Are eligible to become a leader.",
"Read-only replicas only support reads (not writes). Read-only replicas:\n\n* Maintain a full copy of your data.\n* Serve reads.\n* Do not participate in voting to commit writes.\n* Are not eligible to become a leader.",
"Witness replicas don't support reads but do participate in voting to\ncommit writes. Witness replicas:\n\n* Do not maintain a full copy of data.\n* Do not serve reads.\n* Vote whether to commit writes.\n* Participate in leader election but are not eligible to become leader."
],
"type": "string"
}
},
"type": "object"
},
"RestoreDatabaseMetadata": {
"description": "Metadata type for the long-running operation returned by\nRestoreDatabase.",
"id": "RestoreDatabaseMetadata",
"properties": {
"backupInfo": {
"$ref": "BackupInfo",
"description": "Information about the backup used to restore the database."
},
"cancelTime": {
"description": "The time at which cancellation of this operation was received.\nOperations.CancelOperation\nstarts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not guaranteed.\nClients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.",
"format": "google-datetime",
"type": "string"
},
"name": {
"description": "Name of the database being created and restored to.",
"type": "string"
},
"optimizeDatabaseOperationName": {
"description": "If exists, the name of the long-running operation that will be used to\ntrack the post-restore optimization process to optimize the performance of\nthe restored database, and remove the dependency on the restore source.\nThe name is of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e/operations/\u003coperation\u003e\nwhere the \u003cdatabase\u003e is the name of database being created and restored to.\nThe metadata type of the long-running operation is\nOptimizeRestoredDatabaseMetadata. This long-running operation will be\nautomatically created by the system after the RestoreDatabase long-running\noperation completes successfully. This operation will not be created if the\nrestore was not successful.",
"type": "string"
},
"progress": {
"$ref": "OperationProgress",
"description": "The progress of the\nRestoreDatabase\noperation."
},
"sourceType": {
"description": "The type of the restore source.",
"enum": [
"TYPE_UNSPECIFIED",
"BACKUP"
],
"enumDescriptions": [
"No restore associated.",