mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 09:36:44 +00:00
2696 lines
154 KiB
JSON
2696 lines
154 KiB
JSON
{
|
|
"schemas": {
|
|
"UpdateInstanceMetadata": {
|
|
"description": "Metadata type for the operation returned by\nUpdateInstance.",
|
|
"type": "object",
|
|
"properties": {
|
|
"endTime": {
|
|
"type": "string",
|
|
"format": "google-datetime",
|
|
"description": "The time at which this operation failed or was completed successfully."
|
|
},
|
|
"cancelTime": {
|
|
"format": "google-datetime",
|
|
"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.",
|
|
"type": "string"
|
|
},
|
|
"startTime": {
|
|
"format": "google-datetime",
|
|
"description": "The time at which UpdateInstance\nrequest was received.",
|
|
"type": "string"
|
|
},
|
|
"instance": {
|
|
"$ref": "Instance",
|
|
"description": "The desired end state of the update."
|
|
}
|
|
},
|
|
"id": "UpdateInstanceMetadata"
|
|
},
|
|
"ListOperationsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"operations": {
|
|
"description": "A list of operations that matches the specified filter in the request.",
|
|
"items": {
|
|
"$ref": "Operation"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"nextPageToken": {
|
|
"description": "The standard List next-page token.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "ListOperationsResponse",
|
|
"description": "The response message for Operations.ListOperations."
|
|
},
|
|
"ResultSetMetadata": {
|
|
"type": "object",
|
|
"properties": {
|
|
"rowType": {
|
|
"$ref": "StructType",
|
|
"description": "Indicates the field names and types for the rows in the result\nset. For example, a SQL query like `\"SELECT UserId, UserName FROM\nUsers\"` could return a `row_type` value like:\n\n \"fields\": [\n { \"name\": \"UserId\", \"type\": { \"code\": \"INT64\" } },\n { \"name\": \"UserName\", \"type\": { \"code\": \"STRING\" } },\n ]"
|
|
},
|
|
"transaction": {
|
|
"description": "If the read or SQL query began a transaction as a side-effect, the\ninformation about the new transaction is yielded here.",
|
|
"$ref": "Transaction"
|
|
}
|
|
},
|
|
"id": "ResultSetMetadata",
|
|
"description": "Metadata about a ResultSet or PartialResultSet."
|
|
},
|
|
"TransactionSelector": {
|
|
"description": "This message is used to select the transaction in which a\nRead or\nExecuteSql call runs.\n\nSee TransactionOptions for more information about transactions.",
|
|
"type": "object",
|
|
"properties": {
|
|
"begin": {
|
|
"description": "Begin a new transaction and execute this read or SQL query in\nit. The transaction ID of the new transaction is returned in\nResultSetMetadata.transaction, which is a Transaction.",
|
|
"$ref": "TransactionOptions"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"format": "byte",
|
|
"description": "Execute the read or SQL query in a previously-started transaction."
|
|
},
|
|
"singleUse": {
|
|
"$ref": "TransactionOptions",
|
|
"description": "Execute the read or SQL query in a temporary transaction.\nThis is the most efficient way to execute a transaction that\nconsists of a single SQL query."
|
|
}
|
|
},
|
|
"id": "TransactionSelector"
|
|
},
|
|
"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.",
|
|
"type": "object",
|
|
"properties": {
|
|
"delete": {
|
|
"description": "Delete rows from a table. Succeeds whether or not the named\nrows were present.",
|
|
"$ref": "Delete"
|
|
},
|
|
"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."
|
|
},
|
|
"insert": {
|
|
"description": "Insert new rows in a table. If any of the rows already exist,\nthe write or transaction fails with error `ALREADY_EXISTS`.",
|
|
"$ref": "Write"
|
|
},
|
|
"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`."
|
|
},
|
|
"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`."
|
|
}
|
|
},
|
|
"id": "Mutation"
|
|
},
|
|
"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.",
|
|
"type": "object",
|
|
"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"
|
|
}
|
|
},
|
|
"id": "KeySet"
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"id": "GetDatabaseDdlResponse",
|
|
"description": "The response for GetDatabaseDdl.",
|
|
"type": "object"
|
|
},
|
|
"Database": {
|
|
"description": "A Cloud Spanner database.",
|
|
"type": "object",
|
|
"properties": {
|
|
"state": {
|
|
"enum": [
|
|
"STATE_UNSPECIFIED",
|
|
"CREATING",
|
|
"READY"
|
|
],
|
|
"description": "Output only. The current database state.",
|
|
"type": "string",
|
|
"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."
|
|
]
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"id": "Database"
|
|
},
|
|
"Instance": {
|
|
"id": "Instance",
|
|
"description": "An isolated set of Cloud Spanner resources on which databases can be hosted.",
|
|
"type": "object",
|
|
"properties": {
|
|
"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"
|
|
},
|
|
"nodeCount": {
|
|
"format": "int32",
|
|
"description": "Required. The number of nodes allocated to this instance. This may be zero\nin API responses for instances that are not yet in state `READY`.",
|
|
"type": "integer"
|
|
},
|
|
"labels": {
|
|
"type": "object",
|
|
"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."
|
|
},
|
|
"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"
|
|
},
|
|
"state": {
|
|
"type": "string",
|
|
"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."
|
|
],
|
|
"enum": [
|
|
"STATE_UNSPECIFIED",
|
|
"CREATING",
|
|
"READY"
|
|
],
|
|
"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`."
|
|
},
|
|
"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 6 and 30 characters in length.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"ListDatabasesResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"nextPageToken": {
|
|
"description": "`next_page_token` can be sent in a subsequent\nListDatabases call to fetch more\nof the matching databases.",
|
|
"type": "string"
|
|
},
|
|
"databases": {
|
|
"description": "Databases that matched the request.",
|
|
"items": {
|
|
"$ref": "Database"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"id": "ListDatabasesResponse",
|
|
"description": "The response for ListDatabases."
|
|
},
|
|
"SetIamPolicyRequest": {
|
|
"description": "Request message for `SetIamPolicy` method.",
|
|
"type": "object",
|
|
"properties": {
|
|
"updateMask": {
|
|
"format": "google-fieldmask",
|
|
"description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.",
|
|
"type": "string"
|
|
},
|
|
"policy": {
|
|
"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.",
|
|
"$ref": "Policy"
|
|
}
|
|
},
|
|
"id": "SetIamPolicyRequest"
|
|
},
|
|
"RollbackRequest": {
|
|
"description": "The request for Rollback.",
|
|
"type": "object",
|
|
"properties": {
|
|
"transactionId": {
|
|
"format": "byte",
|
|
"description": "Required. The transaction to roll back.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "RollbackRequest"
|
|
},
|
|
"Transaction": {
|
|
"properties": {
|
|
"id": {
|
|
"format": "byte",
|
|
"description": "`id` may be used to identify the transaction in subsequent\nRead,\nExecuteSql,\nCommit, or\nRollback calls.\n\nSingle-use read-only transactions do not have IDs, because\nsingle-use transactions do not support multiple requests.",
|
|
"type": "string"
|
|
},
|
|
"readTimestamp": {
|
|
"format": "google-datetime",
|
|
"description": "For snapshot read-only transactions, the read timestamp chosen\nfor the transaction. Not returned by default: see\nTransactionOptions.ReadOnly.return_read_timestamp.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "Transaction",
|
|
"description": "A transaction.",
|
|
"type": "object"
|
|
},
|
|
"UpdateDatabaseDdlMetadata": {
|
|
"id": "UpdateDatabaseDdlMetadata",
|
|
"description": "Metadata type for the operation returned by\nUpdateDatabaseDdl.",
|
|
"type": "object",
|
|
"properties": {
|
|
"database": {
|
|
"description": "The database being modified.",
|
|
"type": "string"
|
|
},
|
|
"statements": {
|
|
"description": "For an update this list contains all the statements. For an\nindividual statement, this list contains only that statement.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"commitTimestamps": {
|
|
"items": {
|
|
"format": "google-datetime",
|
|
"type": "string"
|
|
},
|
|
"type": "array",
|
|
"description": "Reports the commit timestamps of all statements that have\nsucceeded so far, where `commit_timestamps[i]` is the commit\ntimestamp for the statement `statements[i]`."
|
|
}
|
|
}
|
|
},
|
|
"CounterOptions": {
|
|
"id": "CounterOptions",
|
|
"description": "Options for counters",
|
|
"type": "object",
|
|
"properties": {
|
|
"field": {
|
|
"description": "The field value to attribute.",
|
|
"type": "string"
|
|
},
|
|
"metric": {
|
|
"description": "The metric to update.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"QueryPlan": {
|
|
"description": "Contains an ordered list of nodes appearing in the query plan.",
|
|
"type": "object",
|
|
"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"
|
|
}
|
|
},
|
|
"id": "QueryPlan"
|
|
},
|
|
"StructType": {
|
|
"properties": {
|
|
"fields": {
|
|
"description": "The list of fields that make up this struct. Order is\nsignificant, because values of this struct type are represented as\nlists, where the order of field values matches the order of\nfields in the StructType. In turn, the order of fields\nmatches the order of columns in a read request, or the order of\nfields in the `SELECT` clause of a query.",
|
|
"items": {
|
|
"$ref": "Field"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"id": "StructType",
|
|
"description": "`StructType` defines the fields of a STRUCT type.",
|
|
"type": "object"
|
|
},
|
|
"Field": {
|
|
"description": "Message representing a single field of a struct.",
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"$ref": "Type",
|
|
"description": "The type of the field."
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"id": "Field"
|
|
},
|
|
"ResultSetStats": {
|
|
"description": "Additional statistics about a ResultSet or PartialResultSet.",
|
|
"type": "object",
|
|
"properties": {
|
|
"queryPlan": {
|
|
"$ref": "QueryPlan",
|
|
"description": "QueryPlan for the query associated with this result."
|
|
},
|
|
"queryStats": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"description": "Properties of the object.",
|
|
"type": "any"
|
|
},
|
|
"description": "Aggregated statistics from the execution of the query. Only present when\nthe query is profiled. For example, a query could return the statistics as\nfollows:\n\n {\n \"rows_returned\": \"3\",\n \"elapsed_time\": \"1.22 secs\",\n \"cpu_time\": \"1.19 secs\"\n }"
|
|
}
|
|
},
|
|
"id": "ResultSetStats"
|
|
},
|
|
"TestIamPermissionsRequest": {
|
|
"description": "Request message for `TestIamPermissions` method.",
|
|
"type": "object",
|
|
"properties": {
|
|
"permissions": {
|
|
"description": "REQUIRED: The set of permissions to check for 'resource'.\nPermissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*') are not allowed.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"id": "TestIamPermissionsRequest"
|
|
},
|
|
"CommitResponse": {
|
|
"description": "The response for Commit.",
|
|
"type": "object",
|
|
"properties": {
|
|
"commitTimestamp": {
|
|
"type": "string",
|
|
"format": "google-datetime",
|
|
"description": "The Cloud Spanner timestamp at which the transaction committed."
|
|
}
|
|
},
|
|
"id": "CommitResponse"
|
|
},
|
|
"Type": {
|
|
"description": "`Type` indicates the type of a Cloud Spanner value, as might be stored in a\ntable cell or returned from an SQL query.",
|
|
"type": "object",
|
|
"properties": {
|
|
"structType": {
|
|
"$ref": "StructType",
|
|
"description": "If code == STRUCT, then `struct_type`\nprovides type information for the struct's fields."
|
|
},
|
|
"arrayElementType": {
|
|
"$ref": "Type",
|
|
"description": "If code == ARRAY, then `array_element_type`\nis the type of the array elements."
|
|
},
|
|
"code": {
|
|
"type": "string",
|
|
"enumDescriptions": [
|
|
"Not specified.",
|
|
"Encoded as JSON `true` or `false`.",
|
|
"Encoded as `string`, in decimal format.",
|
|
"Encoded as `number`, or the strings `\"NaN\"`, `\"Infinity\"`, or\n`\"-Infinity\"`.",
|
|
"Encoded as `string` in RFC 3339 timestamp format. The time zone\nmust be present, and must be `\"Z\"`.",
|
|
"Encoded as `string` in RFC 3339 date format.",
|
|
"Encoded as `string`.",
|
|
"Encoded as a base64-encoded `string`, as described in RFC 4648,\nsection 4.",
|
|
"Encoded as `list`, where the list elements are represented\naccording to array_element_type.",
|
|
"Encoded as `list`, where list element `i` is represented according\nto [struct_type.fields[i]][google.spanner.v1.StructType.fields]."
|
|
],
|
|
"enum": [
|
|
"TYPE_CODE_UNSPECIFIED",
|
|
"BOOL",
|
|
"INT64",
|
|
"FLOAT64",
|
|
"TIMESTAMP",
|
|
"DATE",
|
|
"STRING",
|
|
"BYTES",
|
|
"ARRAY",
|
|
"STRUCT"
|
|
],
|
|
"description": "Required. The TypeCode for this type."
|
|
}
|
|
},
|
|
"id": "Type"
|
|
},
|
|
"PlanNode": {
|
|
"description": "Node information for nodes appearing in a QueryPlan.plan_nodes.",
|
|
"type": "object",
|
|
"properties": {
|
|
"index": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "The `PlanNode`'s index in node list."
|
|
},
|
|
"displayName": {
|
|
"description": "The display name for the node.",
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"enum": [
|
|
"KIND_UNSPECIFIED",
|
|
"RELATIONAL",
|
|
"SCALAR"
|
|
],
|
|
"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.",
|
|
"type": "string",
|
|
"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."
|
|
]
|
|
},
|
|
"childLinks": {
|
|
"description": "List of child node `index`es and their relationship to this parent.",
|
|
"items": {
|
|
"$ref": "ChildLink"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"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"
|
|
},
|
|
"executionStats": {
|
|
"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",
|
|
"additionalProperties": {
|
|
"description": "Properties of the object.",
|
|
"type": "any"
|
|
}
|
|
},
|
|
"shortRepresentation": {
|
|
"$ref": "ShortRepresentation",
|
|
"description": "Condensed representation for SCALAR nodes."
|
|
}
|
|
},
|
|
"id": "PlanNode"
|
|
},
|
|
"CreateInstanceMetadata": {
|
|
"description": "Metadata type for the operation returned by\nCreateInstance.",
|
|
"type": "object",
|
|
"properties": {
|
|
"endTime": {
|
|
"format": "google-datetime",
|
|
"description": "The time at which this operation failed or was completed successfully.",
|
|
"type": "string"
|
|
},
|
|
"cancelTime": {
|
|
"format": "google-datetime",
|
|
"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.",
|
|
"type": "string"
|
|
},
|
|
"startTime": {
|
|
"format": "google-datetime",
|
|
"description": "The time at which the\nCreateInstance request was\nreceived.",
|
|
"type": "string"
|
|
},
|
|
"instance": {
|
|
"description": "The instance being created.",
|
|
"$ref": "Instance"
|
|
}
|
|
},
|
|
"id": "CreateInstanceMetadata"
|
|
},
|
|
"AuditConfig": {
|
|
"description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.",
|
|
"type": "object",
|
|
"properties": {
|
|
"auditLogConfigs": {
|
|
"description": "The configuration for logging of each type of permission.\nNext ID: 4",
|
|
"items": {
|
|
"$ref": "AuditLogConfig"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"exemptedMembers": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"service": {
|
|
"description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "AuditConfig"
|
|
},
|
|
"ChildLink": {
|
|
"description": "Metadata associated with a parent-child relationship appearing in a\nPlanNode.",
|
|
"type": "object",
|
|
"properties": {
|
|
"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"
|
|
},
|
|
"childIndex": {
|
|
"format": "int32",
|
|
"description": "The node to which the link points.",
|
|
"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"
|
|
}
|
|
},
|
|
"id": "ChildLink"
|
|
},
|
|
"CloudAuditOptions": {
|
|
"description": "Write a Cloud Audit log",
|
|
"type": "object",
|
|
"properties": {
|
|
"logName": {
|
|
"enum": [
|
|
"UNSPECIFIED_LOG_NAME",
|
|
"ADMIN_ACTIVITY",
|
|
"DATA_ACCESS"
|
|
],
|
|
"description": "The log_name to populate in the Cloud Audit Record.",
|
|
"type": "string",
|
|
"enumDescriptions": [
|
|
"Default. Should not be used.",
|
|
"Corresponds to \"cloudaudit.googleapis.com/activity\"",
|
|
"Corresponds to \"cloudaudit.googleapis.com/data_access\""
|
|
]
|
|
}
|
|
},
|
|
"id": "CloudAuditOptions"
|
|
},
|
|
"Expr": {
|
|
"description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"",
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"description": "An 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\n[Common Expression Language](http://go/api-expr) syntax.\n\nThe application context of the containing message determines which\nwell-known feature set of CEL is supported.",
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"description": "An 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": "An 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"
|
|
}
|
|
},
|
|
"id": "Expr"
|
|
},
|
|
"Delete": {
|
|
"type": "object",
|
|
"properties": {
|
|
"keySet": {
|
|
"$ref": "KeySet",
|
|
"description": "Required. The primary keys of the rows within table to delete."
|
|
},
|
|
"table": {
|
|
"description": "Required. The table whose rows will be deleted.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "Delete",
|
|
"description": "Arguments to delete operations."
|
|
},
|
|
"ListInstanceConfigsResponse": {
|
|
"description": "The response for ListInstanceConfigs.",
|
|
"type": "object",
|
|
"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"
|
|
}
|
|
},
|
|
"id": "ListInstanceConfigsResponse"
|
|
},
|
|
"BeginTransactionRequest": {
|
|
"description": "The request for BeginTransaction.",
|
|
"type": "object",
|
|
"properties": {
|
|
"options": {
|
|
"$ref": "TransactionOptions",
|
|
"description": "Required. Options for the new transaction."
|
|
}
|
|
},
|
|
"id": "BeginTransactionRequest"
|
|
},
|
|
"CommitRequest": {
|
|
"description": "The request for Commit.",
|
|
"type": "object",
|
|
"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": {
|
|
"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.",
|
|
"$ref": "TransactionOptions"
|
|
},
|
|
"transactionId": {
|
|
"format": "byte",
|
|
"description": "Commit a previously-started transaction.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "CommitRequest"
|
|
},
|
|
"TestIamPermissionsResponse": {
|
|
"description": "Response message for `TestIamPermissions` method.",
|
|
"type": "object",
|
|
"properties": {
|
|
"permissions": {
|
|
"description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"id": "TestIamPermissionsResponse"
|
|
},
|
|
"GetIamPolicyRequest": {
|
|
"description": "Request message for `GetIamPolicy` method.",
|
|
"type": "object",
|
|
"properties": {},
|
|
"id": "GetIamPolicyRequest"
|
|
},
|
|
"Rule": {
|
|
"description": "A rule to be applied in a Policy.",
|
|
"type": "object",
|
|
"properties": {
|
|
"in": {
|
|
"description": "If one or more 'in' clauses are specified, the rule matches if\nthe PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"permissions": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array",
|
|
"description": "A permission is a string of form '\u003cservice\u003e.\u003cresource type\u003e.\u003cverb\u003e'\n(e.g., 'storage.buckets.list'). A value of '*' matches all permissions,\nand a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs."
|
|
},
|
|
"action": {
|
|
"description": "Required",
|
|
"type": "string",
|
|
"enumDescriptions": [
|
|
"Default no action.",
|
|
"Matching 'Entries' grant access.",
|
|
"Matching 'Entries' grant access and the caller promises to log\nthe request per the returned log_configs.",
|
|
"Matching 'Entries' deny access.",
|
|
"Matching 'Entries' deny access and the caller promises to log\nthe request per the returned log_configs.",
|
|
"Matching 'Entries' tell IAM.Check callers to generate logs."
|
|
],
|
|
"enum": [
|
|
"NO_ACTION",
|
|
"ALLOW",
|
|
"ALLOW_WITH_LOG",
|
|
"DENY",
|
|
"DENY_WITH_LOG",
|
|
"LOG"
|
|
]
|
|
},
|
|
"notIn": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array",
|
|
"description": "If one or more 'not_in' clauses are specified, the rule matches\nif the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.\nThe format for in and not_in entries is the same as for members in a\nBinding (see google/iam/v1/policy.proto)."
|
|
},
|
|
"description": {
|
|
"description": "Human-readable description of the rule.",
|
|
"type": "string"
|
|
},
|
|
"conditions": {
|
|
"description": "Additional restrictions that must be met",
|
|
"items": {
|
|
"$ref": "Condition"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"logConfig": {
|
|
"description": "The config returned to callers of tech.iam.IAM.CheckPolicy for any entries\nthat match the LOG action.",
|
|
"items": {
|
|
"$ref": "LogConfig"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"id": "Rule"
|
|
},
|
|
"CreateDatabaseMetadata": {
|
|
"type": "object",
|
|
"properties": {
|
|
"database": {
|
|
"description": "The database being created.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "CreateDatabaseMetadata",
|
|
"description": "Metadata type for the operation returned by\nCreateDatabase."
|
|
},
|
|
"LogConfig": {
|
|
"description": "Specifies what kind of log the caller must write",
|
|
"type": "object",
|
|
"properties": {
|
|
"counter": {
|
|
"description": "Counter options.",
|
|
"$ref": "CounterOptions"
|
|
},
|
|
"dataAccess": {
|
|
"$ref": "DataAccessOptions",
|
|
"description": "Data access options."
|
|
},
|
|
"cloudAudit": {
|
|
"$ref": "CloudAuditOptions",
|
|
"description": "Cloud audit options."
|
|
}
|
|
},
|
|
"id": "LogConfig"
|
|
},
|
|
"Session": {
|
|
"properties": {
|
|
"name": {
|
|
"description": "Required. The name of the session.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "Session",
|
|
"description": "A session in the Cloud Spanner API.",
|
|
"type": "object"
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"id": "ListInstancesResponse",
|
|
"description": "The response for ListInstances.",
|
|
"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 here.\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.",
|
|
"type": "object",
|
|
"properties": {
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"startClosed": {
|
|
"items": {
|
|
"type": "any"
|
|
},
|
|
"type": "array",
|
|
"description": "If the start is closed, then the range includes all rows whose\nfirst `len(start_closed)` key columns exactly match `start_closed`."
|
|
}
|
|
},
|
|
"id": "KeyRange"
|
|
},
|
|
"ShortRepresentation": {
|
|
"description": "Condensed representation of a node and its subtree. Only present for\n`SCALAR` PlanNode(s).",
|
|
"type": "object",
|
|
"properties": {
|
|
"subqueries": {
|
|
"additionalProperties": {
|
|
"format": "int32",
|
|
"type": "integer"
|
|
},
|
|
"description": "A mapping of (subquery variable name) -\u003e (subquery node id) for cases\nwhere the `description` string of this node references a `SCALAR`\nsubquery contained in the expression subtree rooted at this node. The\nreferenced `SCALAR` subquery may not necessarily be a direct child of\nthis node.",
|
|
"type": "object"
|
|
},
|
|
"description": {
|
|
"description": "A string representation of the expression subtree rooted at this node.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "ShortRepresentation"
|
|
},
|
|
"InstanceConfig": {
|
|
"properties": {
|
|
"name": {
|
|
"description": "A unique identifier for the instance configuration. Values\nare of the form\n`projects/\u003cproject\u003e/instanceConfigs/a-z*`",
|
|
"type": "string"
|
|
},
|
|
"displayName": {
|
|
"description": "The name of this instance configuration as it appears in UIs.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "InstanceConfig",
|
|
"description": "A possible configuration for a Cloud Spanner instance. Configurations\ndefine the geographic placement of nodes and their replication.",
|
|
"type": "object"
|
|
},
|
|
"UpdateInstanceRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"fieldMask": {
|
|
"type": "string",
|
|
"format": "google-fieldmask",
|
|
"description": "Required. A mask specifying which fields in [][google.spanner.admin.instance.v1.UpdateInstanceRequest.instance] should be updated.\nThe field mask must always be specified; this prevents any future fields in\n[][google.spanner.admin.instance.v1.Instance] from being erased accidentally by clients that do not know\nabout them."
|
|
},
|
|
"instance": {
|
|
"$ref": "Instance",
|
|
"description": "Required. The instance to update, which must always include the instance\nname. Otherwise, only fields mentioned in [][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask] need be included."
|
|
}
|
|
},
|
|
"id": "UpdateInstanceRequest",
|
|
"description": "The request for UpdateInstance."
|
|
},
|
|
"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 `{}`.",
|
|
"type": "object",
|
|
"properties": {},
|
|
"id": "Empty"
|
|
},
|
|
"TransactionOptions": {
|
|
"properties": {
|
|
"readOnly": {
|
|
"$ref": "ReadOnly",
|
|
"description": "Transaction will not write.\n\nAuthorization to begin a read-only transaction requires\n`spanner.databases.beginReadOnlyTransaction` permission\non the `session` resource."
|
|
},
|
|
"readWrite": {
|
|
"description": "Transaction may write.\n\nAuthorization to begin a read-write transaction requires\n`spanner.databases.beginOrRollbackReadWriteTransaction` permission\non the `session` resource.",
|
|
"$ref": "ReadWrite"
|
|
}
|
|
},
|
|
"id": "TransactionOptions",
|
|
"description": "# Transactions\n\n\nEach session can have at most one active transaction at a time. After the\nactive transaction is completed, the session can immediately be\nre-used for the next transaction. It is not necessary to create a\nnew session for each transaction.\n\n# Transaction Modes\n\nCloud Spanner supports two transaction modes:\n\n 1. Locking read-write. This type of transaction is the only way\n to write data into Cloud Spanner. These transactions rely on\n pessimistic locking and, if necessary, two-phase commit.\n Locking read-write transactions may abort, requiring the\n application to retry.\n\n 2. Snapshot read-only. This transaction type provides guaranteed\n consistency across several reads, but does not allow\n writes. Snapshot read-only transactions can be configured to\n read at timestamps in the past. Snapshot read-only\n transactions do not need to be committed.\n\nFor transactions that only read, snapshot read-only transactions\nprovide simpler semantics and are almost always faster. In\nparticular, read-only transactions do not take locks, so they do\nnot conflict with read-write transactions. As a consequence of not\ntaking locks, they also do not abort, so retry loops are not needed.\n\nTransactions may only read/write data in a single database. They\nmay, however, read/write data in different tables within that\ndatabase.\n\n## Locking Read-Write Transactions\n\nLocking transactions may be used to atomically read-modify-write\ndata anywhere in a database. This type of transaction is externally\nconsistent.\n\nClients should attempt to minimize the amount of time a transaction\nis active. Faster transactions commit with higher probability\nand cause less contention. Cloud Spanner attempts to keep read locks\nactive as long as the transaction continues to do reads, and the\ntransaction has not been terminated by\nCommit or\nRollback. Long periods of\ninactivity at the client may cause Cloud Spanner to release a\ntransaction's locks and abort it.\n\nReads performed within a transaction acquire locks on the data\nbeing read. Writes can only be done at commit time, after all reads\nhave been completed.\nConceptually, a read-write transaction consists of zero or more\nreads or SQL queries followed by\nCommit. At any time before\nCommit, the client can send a\nRollback request to abort the\ntransaction.\n\n### Semantics\n\nCloud Spanner can commit the transaction if all read locks it acquired\nare still valid at commit time, and it is able to acquire write\nlocks for all writes. Cloud Spanner can abort the transaction for any\nreason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees\nthat the transaction has not modified any user data in Cloud Spanner.\n\nUnless the transaction commits, Cloud Spanner makes no guarantees about\nhow long the transaction's locks were held for. It is an error to\nuse Cloud Spanner locks for any sort of mutual exclusion other than\nbetween Cloud Spanner transactions themselves.\n\n### Retrying Aborted Transactions\n\nWhen a transaction aborts, the application can choose to retry the\nwhole transaction again. To maximize the chances of successfully\ncommitting the retry, the client should execute the retry in the\nsame session as the original attempt. The original session's lock\npriority increases with each consecutive abort, meaning that each\nattempt has a slightly better chance of success than the previous.\n\nUnder some circumstances (e.g., many transactions attempting to\nmodify the same row(s)), a transaction can abort many times in a\nshort period before successfully committing. Thus, it is not a good\nidea to cap the number of retries a transaction can attempt;\ninstead, it is better to limit the total amount of wall time spent\nretrying.\n\n### Idle Transactions\n\nA transaction is considered idle if it has no outstanding reads or\nSQL queries and has not started a read or SQL query within the last 10\nseconds. Idle transactions can be aborted by Cloud Spanner so that they\ndon't hold on to locks indefinitely. In that case, the commit will\nfail with error `ABORTED`.\n\nIf this behavior is undesirable, periodically executing a simple\nSQL query in the transaction (e.g., `SELECT 1`) prevents the\ntransaction from becoming idle.\n\n## Snapshot Read-Only Transactions\n\nSnapshot read-only transactions provides a simpler method than\nlocking read-write transactions for doing several consistent\nreads. However, this type of transaction does not support writes.\n\nSnapshot transactions do not take locks. Instead, they work by\nchoosing a Cloud Spanner timestamp, then executing all reads at that\ntimestamp. Since they do not acquire locks, they do not block\nconcurrent read-write transactions.\n\nUnlike locking read-write transactions, snapshot read-only\ntransactions never abort. They can fail if the chosen read\ntimestamp is garbage collected; however, the default garbage\ncollection policy is generous enough that most applications do not\nneed to worry about this in practice.\n\nSnapshot read-only transactions do not need to call\nCommit or\nRollback (and in fact are not\npermitted to do so).\n\nTo execute a snapshot transaction, the client specifies a timestamp\nbound, which tells Cloud Spanner how to choose a read timestamp.\n\nThe types of timestamp bound are:\n\n - Strong (the default).\n - Bounded staleness.\n - Exact staleness.\n\nIf the Cloud Spanner database to be read is geographically distributed,\nstale read-only transactions can execute more quickly than strong\nor read-write transaction, because they are able to execute far\nfrom the leader replica.\n\nEach type of timestamp bound is discussed in detail below.\n\n### Strong\n\nStrong reads are guaranteed to see the effects of all transactions\nthat have committed before the start of the read. Furthermore, all\nrows yielded by a single read are consistent with each other -- if\nany part of the read observes a transaction, all parts of the read\nsee the transaction.\n\nStrong reads are not repeatable: two consecutive strong read-only\ntransactions might return inconsistent results if there are\nconcurrent writes. If consistency across reads is required, the\nreads should be executed within a transaction or at an exact read\ntimestamp.\n\nSee TransactionOptions.ReadOnly.strong.\n\n### Exact Staleness\n\nThese timestamp bounds execute reads at a user-specified\ntimestamp. Reads at a timestamp are guaranteed to see a consistent\nprefix of the global transaction history: they observe\nmodifications done by all transactions with a commit timestamp \u003c=\nthe read timestamp, and observe none of the modifications done by\ntransactions with a larger commit timestamp. They will block until\nall conflicting transactions that may be assigned commit timestamps\n\u003c= the read timestamp have finished.\n\nThe timestamp can either be expressed as an absolute Cloud Spanner commit\ntimestamp or a staleness relative to the current time.\n\nThese modes do not require a \"negotiation phase\" to pick a\ntimestamp. As a result, they execute slightly faster than the\nequivalent boundedly stale concurrency modes. On the other hand,\nboundedly stale reads usually return fresher results.\n\nSee TransactionOptions.ReadOnly.read_timestamp and\nTransactionOptions.ReadOnly.exact_staleness.\n\n### Bounded Staleness\n\nBounded staleness modes allow Cloud Spanner to pick the read timestamp,\nsubject to a user-provided staleness bound. Cloud Spanner chooses the\nnewest timestamp within the staleness bound that allows execution\nof the reads at the closest available replica without blocking.\n\nAll rows yielded are consistent with each other -- if any part of\nthe read observes a transaction, all parts of the read see the\ntransaction. Boundedly stale reads are not repeatable: two stale\nreads, even if they use the same staleness bound, can execute at\ndifferent timestamps and thus return inconsistent results.\n\nBoundedly stale reads execute in two phases: the first phase\nnegotiates a timestamp among all replicas needed to serve the\nread. In the second phase, reads are executed at the negotiated\ntimestamp.\n\nAs a result of the two phase execution, bounded staleness reads are\nusually a little slower than comparable exact staleness\nreads. However, they are typically able to return fresher\nresults, and are more likely to execute at the closest replica.\n\nBecause the timestamp negotiation requires up-front knowledge of\nwhich rows will be read, it can only be used with single-use\nread-only transactions.\n\nSee TransactionOptions.ReadOnly.max_staleness and\nTransactionOptions.ReadOnly.min_read_timestamp.\n\n### Old Read Timestamps and Garbage Collection\n\nCloud Spanner continuously garbage collects deleted and overwritten data\nin the background to reclaim storage space. This process is known\nas \"version GC\". By default, version GC reclaims versions after they\nare one hour old. Because of this, Cloud Spanner cannot perform reads\nat read timestamps more than one hour in the past. This\nrestriction also applies to in-progress reads and/or SQL queries whose\ntimestamp become too old while executing. Reads and SQL queries with\ntoo-old read timestamps fail with the error `FAILED_PRECONDITION`.",
|
|
"type": "object"
|
|
},
|
|
"CreateDatabaseRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"extraStatements": {
|
|
"description": "An optional 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"
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"id": "CreateDatabaseRequest",
|
|
"description": "The request for CreateDatabase."
|
|
},
|
|
"CreateInstanceRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"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 6 and 30 characters in\nlength.",
|
|
"type": "string"
|
|
},
|
|
"instance": {
|
|
"description": "Required. The instance to create. The name may be omitted, but if\nspecified must be `\u003cparent\u003e/instances/\u003cinstance_id\u003e`.",
|
|
"$ref": "Instance"
|
|
}
|
|
},
|
|
"id": "CreateInstanceRequest",
|
|
"description": "The request for CreateInstance."
|
|
},
|
|
"Condition": {
|
|
"description": "A condition to be met.",
|
|
"type": "object",
|
|
"properties": {
|
|
"iam": {
|
|
"enum": [
|
|
"NO_ATTR",
|
|
"AUTHORITY",
|
|
"ATTRIBUTION",
|
|
"SECURITY_REALM",
|
|
"APPROVER",
|
|
"JUSTIFICATION_TYPE"
|
|
],
|
|
"description": "Trusted attributes supplied by the IAM system.",
|
|
"type": "string",
|
|
"enumDescriptions": [
|
|
"Default non-attribute.",
|
|
"Either principal or (if present) authority selector.",
|
|
"The principal (even if an authority selector is present), which\nmust only be used for attribution, not authorization.",
|
|
"Any of the security realms in the IAMContext (go/security-realms).\nWhen used with IN, the condition indicates \"any of the request's realms\nmatch one of the given values; with NOT_IN, \"none of the realms match\nany of the given values\". It is not permitted to grant access based on\nthe *absence* of a realm, so realm conditions can only be used in\na \"positive\" context (e.g., ALLOW/IN or DENY/NOT_IN).",
|
|
"An approver (distinct from the requester) that has authorized this\nrequest.\nWhen used with IN, the condition indicates that one of the approvers\nassociated with the request matches the specified principal, or is a\nmember of the specified group. Approvers can only grant additional\naccess, and are thus only used in a strictly positive context\n(e.g. ALLOW/IN or DENY/NOT_IN).",
|
|
"What types of justifications have been supplied with this request.\nString values should match enum names from tech.iam.JustificationType,\ne.g. \"MANUAL_STRING\". It is not permitted to grant access based on\nthe *absence* of a justification, so justification conditions can only\nbe used in a \"positive\" context (e.g., ALLOW/IN or DENY/NOT_IN).\n\nMultiple justifications, e.g., a Buganizer ID and a manually-entered\nreason, are normal and supported."
|
|
]
|
|
},
|
|
"values": {
|
|
"description": "The objects of the condition. This is mutually exclusive with 'value'.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"op": {
|
|
"enumDescriptions": [
|
|
"Default no-op.",
|
|
"DEPRECATED. Use IN instead.",
|
|
"DEPRECATED. Use NOT_IN instead.",
|
|
"The condition is true if the subject (or any element of it if it is\na set) matches any of the supplied values.",
|
|
"The condition is true if the subject (or every element of it if it is\na set) matches none of the supplied values.",
|
|
"Subject is discharged"
|
|
],
|
|
"enum": [
|
|
"NO_OP",
|
|
"EQUALS",
|
|
"NOT_EQUALS",
|
|
"IN",
|
|
"NOT_IN",
|
|
"DISCHARGED"
|
|
],
|
|
"description": "An operator to apply the subject with.",
|
|
"type": "string"
|
|
},
|
|
"svc": {
|
|
"description": "Trusted attributes discharged by the service.",
|
|
"type": "string"
|
|
},
|
|
"sys": {
|
|
"enumDescriptions": [
|
|
"Default non-attribute type",
|
|
"Region of the resource",
|
|
"Service name",
|
|
"Resource name",
|
|
"IP address of the caller"
|
|
],
|
|
"enum": [
|
|
"NO_ATTR",
|
|
"REGION",
|
|
"SERVICE",
|
|
"NAME",
|
|
"IP"
|
|
],
|
|
"description": "Trusted attributes supplied by any service that owns resources and uses\nthe IAM system for access control.",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"description": "DEPRECATED. Use 'values' instead.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "Condition"
|
|
},
|
|
"AuditLogConfig": {
|
|
"description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.",
|
|
"type": "object",
|
|
"properties": {
|
|
"exemptedMembers": {
|
|
"description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"logType": {
|
|
"enum": [
|
|
"LOG_TYPE_UNSPECIFIED",
|
|
"ADMIN_READ",
|
|
"DATA_WRITE",
|
|
"DATA_READ"
|
|
],
|
|
"description": "The log type that this config enables.",
|
|
"type": "string",
|
|
"enumDescriptions": [
|
|
"Default case. Should never be this.",
|
|
"Admin reads. Example: CloudIAM getIamPolicy",
|
|
"Data writes. Example: CloudSQL Users create",
|
|
"Data reads. Example: CloudSQL Users list"
|
|
]
|
|
}
|
|
},
|
|
"id": "AuditLogConfig"
|
|
},
|
|
"ReadOnly": {
|
|
"description": "Message type to initiate a read-only transaction.",
|
|
"type": "object",
|
|
"properties": {
|
|
"maxStaleness": {
|
|
"format": "google-duration",
|
|
"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.",
|
|
"type": "string"
|
|
},
|
|
"readTimestamp": {
|
|
"format": "google-datetime",
|
|
"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.",
|
|
"type": "string"
|
|
},
|
|
"returnReadTimestamp": {
|
|
"description": "If true, the Cloud Spanner-selected read timestamp is included in\nthe Transaction message that describes the transaction.",
|
|
"type": "boolean"
|
|
},
|
|
"exactStaleness": {
|
|
"format": "google-duration",
|
|
"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`.",
|
|
"type": "string"
|
|
},
|
|
"strong": {
|
|
"description": "Read at a timestamp where all previously committed transactions\nare visible.",
|
|
"type": "boolean"
|
|
},
|
|
"minReadTimestamp": {
|
|
"format": "google-datetime",
|
|
"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.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "ReadOnly"
|
|
},
|
|
"ExecuteSqlRequest": {
|
|
"description": "The request for ExecuteSql and\nExecuteStreamingSql.",
|
|
"type": "object",
|
|
"properties": {
|
|
"queryMode": {
|
|
"enumDescriptions": [
|
|
"The default mode where only the query result, without any information\nabout the query plan is returned.",
|
|
"This mode returns only the query plan, without any result rows or\nexecution statistics information.",
|
|
"This mode returns both the query plan and the execution statistics along\nwith the result rows."
|
|
],
|
|
"enum": [
|
|
"NORMAL",
|
|
"PLAN",
|
|
"PROFILE"
|
|
],
|
|
"description": "Used to control the amount of debugging information returned in\nResultSetStats.",
|
|
"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."
|
|
},
|
|
"resumeToken": {
|
|
"format": "byte",
|
|
"description": "If this request is resuming a previously interrupted SQL query\nexecution, `resume_token` should be copied from the last\nPartialResultSet yielded before the interruption. Doing this\nenables the new SQL query execution to resume where the last one left\noff. The rest of the request parameters must exactly match the\nrequest that yielded this token.",
|
|
"type": "string"
|
|
},
|
|
"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"
|
|
},
|
|
"sql": {
|
|
"description": "Required. The SQL query string.",
|
|
"type": "string"
|
|
},
|
|
"params": {
|
|
"description": "The SQL query string can contain parameter placeholders. A parameter\nplaceholder consists of `'@'` followed by the parameter\nname. Parameter names consist of any combination of letters,\nnumbers, 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 `\"WHERE id \u003e @msg_id AND id \u003c @msg_id + 100\"`\n\nIt is an error to execute an SQL query with unbound parameters.\n\nParameter values are specified using `params`, which is a JSON\nobject whose keys are parameter names, and whose values are the\ncorresponding parameter values.",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"description": "Properties of the object.",
|
|
"type": "any"
|
|
}
|
|
}
|
|
},
|
|
"id": "ExecuteSqlRequest"
|
|
},
|
|
"Policy": {
|
|
"type": "object",
|
|
"properties": {
|
|
"iamOwned": {
|
|
"type": "boolean"
|
|
},
|
|
"rules": {
|
|
"description": "If more than one rule is specified, the rules are applied in the following\nmanner:\n- All matching LOG rules are always applied.\n- If any DENY/DENY_WITH_LOG rule matches, permission is denied.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is\n granted.\n Logging will be applied if one or more matching rule requires logging.\n- Otherwise, if no rule applies, permission is denied.",
|
|
"items": {
|
|
"$ref": "Rule"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"version": {
|
|
"format": "int32",
|
|
"description": "Version of the `Policy`. The default version is 0.",
|
|
"type": "integer"
|
|
},
|
|
"auditConfigs": {
|
|
"description": "Specifies cloud audit logging configuration for this policy.",
|
|
"items": {
|
|
"$ref": "AuditConfig"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"bindings": {
|
|
"description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.",
|
|
"items": {
|
|
"$ref": "Binding"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"etag": {
|
|
"format": "byte",
|
|
"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\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "Policy",
|
|
"description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam)."
|
|
},
|
|
"ReadRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"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": {
|
|
"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\nRows are yielded in table primary key order (if index is empty)\nor index key order (if index is non-empty).\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.",
|
|
"$ref": "KeySet"
|
|
},
|
|
"columns": {
|
|
"description": "The columns of table to be returned for each row matching\nthis request.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"transaction": {
|
|
"description": "The transaction to use. If none is provided, the default is a\ntemporary read-only transaction with strong concurrency.",
|
|
"$ref": "TransactionSelector"
|
|
},
|
|
"resumeToken": {
|
|
"format": "byte",
|
|
"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.",
|
|
"type": "string"
|
|
},
|
|
"table": {
|
|
"description": "Required. The name of the table in the database to be read.",
|
|
"type": "string"
|
|
},
|
|
"limit": {
|
|
"format": "int64",
|
|
"description": "If greater than zero, only the first `limit` rows are yielded. If `limit`\nis zero, the default is no limit.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "ReadRequest",
|
|
"description": "The request for Read and\nStreamingRead."
|
|
},
|
|
"Write": {
|
|
"properties": {
|
|
"table": {
|
|
"type": "string",
|
|
"description": "Required. The table whose rows will be written."
|
|
},
|
|
"values": {
|
|
"description": "The values to be written. `values` can contain more than one\nlist of values. If it does, then multiple rows are written, one\nfor each entry in `values`. Each list in `values` must have\nexactly as many entries as there are entries in columns\nabove. Sending multiple lists is equivalent to sending multiple\n`Mutation`s, each containing one `values` entry and repeating\ntable and columns. Individual values in each list are\nencoded as described here.",
|
|
"items": {
|
|
"items": {
|
|
"type": "any"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"columns": {
|
|
"description": "The names of the columns in table to be written.\n\nThe list of columns must contain enough columns to allow\nCloud Spanner to derive values for all primary key columns in the\nrow(s) to be modified.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"id": "Write",
|
|
"description": "Arguments to insert, update, insert_or_update, and\nreplace operations.",
|
|
"type": "object"
|
|
},
|
|
"DataAccessOptions": {
|
|
"type": "object",
|
|
"properties": {},
|
|
"id": "DataAccessOptions",
|
|
"description": "Write a Data Access (Gin) log"
|
|
},
|
|
"ReadWrite": {
|
|
"properties": {},
|
|
"id": "ReadWrite",
|
|
"description": "Message type to initiate a read-write transaction. Currently this\ntransaction type has no options.",
|
|
"type": "object"
|
|
},
|
|
"Operation": {
|
|
"type": "object",
|
|
"properties": {
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"response": {
|
|
"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",
|
|
"additionalProperties": {
|
|
"description": "Properties of the object. Contains field @type with type URL.",
|
|
"type": "any"
|
|
}
|
|
},
|
|
"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 have the format of `operations/some/unique/name`.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "Operation",
|
|
"description": "This resource represents a long-running operation that is the result of a\nnetwork API call."
|
|
},
|
|
"Status": {
|
|
"description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"format": "int32",
|
|
"description": "The status code, which should be an enum value of google.rpc.Code.",
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.",
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"description": "A list of messages that carry the error details. There will be a\ncommon set of message types for APIs to use.",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"description": "Properties of the object. Contains field @type with type URL.",
|
|
"type": "any"
|
|
}
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"id": "Status"
|
|
},
|
|
"ResultSet": {
|
|
"properties": {
|
|
"metadata": {
|
|
"$ref": "ResultSetMetadata",
|
|
"description": "Metadata about the result set, such as row type information."
|
|
},
|
|
"stats": {
|
|
"description": "Query plan and execution statistics for the query that produced this\nresult set. These can be requested by setting\nExecuteSqlRequest.query_mode.",
|
|
"$ref": "ResultSetStats"
|
|
},
|
|
"rows": {
|
|
"description": "Each element in `rows` is a row whose format is defined by\nmetadata.row_type. The ith element\nin each row matches the ith field in\nmetadata.row_type. Elements are\nencoded based on type as described\nhere.",
|
|
"items": {
|
|
"items": {
|
|
"type": "any"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"id": "ResultSet",
|
|
"description": "Results from Read or\nExecuteSql.",
|
|
"type": "object"
|
|
},
|
|
"Binding": {
|
|
"description": "Associates `members` with a `role`.",
|
|
"type": "object",
|
|
"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.\nThis field is GOOGLE_INTERNAL."
|
|
},
|
|
"members": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array",
|
|
"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@gmail.com` or `joe@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\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n"
|
|
},
|
|
"role": {
|
|
"description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"id": "Binding"
|
|
},
|
|
"UpdateDatabaseDdlRequest": {
|
|
"description": "Enqueues the given DDL statements to be applied, in order but not\nnecessarily all at once, to the database schema at some point (or\npoints) in the future. The server checks that the statements\nare executable (syntactically valid, name tables that exist, etc.)\nbefore enqueueing them, but they may still fail upon\nlater execution (e.g., if a statement from another batch of\nstatements is applied first and it conflicts in some way, or if\nthere is some data-related problem like a `NULL` value in a column to\nwhich `NOT NULL` would be added). If a statement fails, all\nsubsequent statements in the batch are automatically cancelled.\n\nEach batch of statements is assigned a name which can be used with\nthe Operations API to monitor\nprogress. See the\noperation_id field for more\ndetails.",
|
|
"type": "object",
|
|
"properties": {
|
|
"operationId": {
|
|
"description": "If empty, the new update request is assigned an\nautomatically-generated operation ID. Otherwise, `operation_id`\nis used to construct the name of the resulting\nOperation.\n\nSpecifying an explicit operation ID simplifies determining\nwhether the statements were executed in the event that the\nUpdateDatabaseDdl call is replayed,\nor the return value is otherwise lost: the database and\n`operation_id` fields can be combined to form the\nname of the resulting\nlongrunning.Operation: `\u003cdatabase\u003e/operations/\u003coperation_id\u003e`.\n\n`operation_id` should be unique within the database, and must be\na valid identifier: `a-z*`. Note that\nautomatically-generated operation IDs always begin with an\nunderscore. If the named operation already exists,\nUpdateDatabaseDdl returns\n`ALREADY_EXISTS`.",
|
|
"type": "string"
|
|
},
|
|
"statements": {
|
|
"description": "DDL statements to be applied to the database.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"id": "UpdateDatabaseDdlRequest"
|
|
},
|
|
"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.",
|
|
"type": "object",
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"metadata": {
|
|
"$ref": "ResultSetMetadata",
|
|
"description": "Metadata about the result set, such as row type information.\nOnly present in the first response."
|
|
},
|
|
"resumeToken": {
|
|
"format": "byte",
|
|
"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.",
|
|
"type": "string"
|
|
},
|
|
"stats": {
|
|
"$ref": "ResultSetStats",
|
|
"description": "Query plan and execution statistics for the query 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."
|
|
}
|
|
},
|
|
"id": "PartialResultSet"
|
|
}
|
|
},
|
|
"protocol": "rest",
|
|
"icons": {
|
|
"x32": "http://www.google.com/images/icons/product/search-32.gif",
|
|
"x16": "http://www.google.com/images/icons/product/search-16.gif"
|
|
},
|
|
"canonicalName": "Spanner",
|
|
"auth": {
|
|
"oauth2": {
|
|
"scopes": {
|
|
"https://www.googleapis.com/auth/spanner.admin": {
|
|
"description": "Administer your Spanner databases"
|
|
},
|
|
"https://www.googleapis.com/auth/cloud-platform": {
|
|
"description": "View and manage your data across Google Cloud Platform services"
|
|
},
|
|
"https://www.googleapis.com/auth/spanner.data": {
|
|
"description": "View and manage the contents of your Spanner databases"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"rootUrl": "https://spanner.googleapis.com/",
|
|
"ownerDomain": "google.com",
|
|
"name": "spanner",
|
|
"batchPath": "batch",
|
|
"title": "Cloud Spanner API",
|
|
"ownerName": "Google",
|
|
"resources": {
|
|
"projects": {
|
|
"resources": {
|
|
"instanceConfigs": {
|
|
"methods": {
|
|
"get": {
|
|
"response": {
|
|
"$ref": "InstanceConfig"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"httpMethod": "GET",
|
|
"parameters": {
|
|
"name": {
|
|
"description": "Required. The name of the requested instance configuration. Values are of\nthe form `projects/\u003cproject\u003e/instanceConfigs/\u003cconfig\u003e`.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instanceConfigs/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}",
|
|
"id": "spanner.projects.instanceConfigs.get",
|
|
"path": "v1/{+name}",
|
|
"description": "Gets information about a particular instance configuration."
|
|
},
|
|
"list": {
|
|
"path": "v1/{+parent}/instanceConfigs",
|
|
"id": "spanner.projects.instanceConfigs.list",
|
|
"description": "Lists the supported instance configurations for a given project.",
|
|
"httpMethod": "GET",
|
|
"parameterOrder": [
|
|
"parent"
|
|
],
|
|
"response": {
|
|
"$ref": "ListInstanceConfigsResponse"
|
|
},
|
|
"parameters": {
|
|
"parent": {
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+$",
|
|
"location": "path",
|
|
"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`."
|
|
},
|
|
"pageToken": {
|
|
"type": "string",
|
|
"location": "query",
|
|
"description": "If non-empty, `page_token` should contain a\nnext_page_token\nfrom a previous ListInstanceConfigsResponse."
|
|
},
|
|
"pageSize": {
|
|
"location": "query",
|
|
"format": "int32",
|
|
"description": "Number of instance configurations to be returned in the response. If 0 or\nless, defaults to the server's maximum allowed page size.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instanceConfigs"
|
|
}
|
|
}
|
|
},
|
|
"instances": {
|
|
"methods": {
|
|
"delete": {
|
|
"response": {
|
|
"$ref": "Empty"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"httpMethod": "DELETE",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"parameters": {
|
|
"name": {
|
|
"pattern": "^projects/[^/]+/instances/[^/]+$",
|
|
"location": "path",
|
|
"description": "Required. The name of the instance to be deleted. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}",
|
|
"id": "spanner.projects.instances.delete",
|
|
"path": "v1/{+name}",
|
|
"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."
|
|
},
|
|
"list": {
|
|
"description": "Lists all instances in the given project.",
|
|
"httpMethod": "GET",
|
|
"parameterOrder": [
|
|
"parent"
|
|
],
|
|
"response": {
|
|
"$ref": "ListInstancesResponse"
|
|
},
|
|
"parameters": {
|
|
"pageSize": {
|
|
"format": "int32",
|
|
"description": "Number of instances to be returned in the response. If 0 or less, defaults\nto the server's maximum allowed page size.",
|
|
"type": "integer",
|
|
"location": "query"
|
|
},
|
|
"parent": {
|
|
"location": "path",
|
|
"description": "Required. The name of the project for which a list of instances is\nrequested. Values are of the form `projects/\u003cproject\u003e`.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+$"
|
|
},
|
|
"filter": {
|
|
"location": "query",
|
|
"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\".",
|
|
"type": "string"
|
|
},
|
|
"pageToken": {
|
|
"description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListInstancesResponse.",
|
|
"type": "string",
|
|
"location": "query"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances",
|
|
"path": "v1/{+parent}/instances",
|
|
"id": "spanner.projects.instances.list"
|
|
},
|
|
"setIamPolicy": {
|
|
"httpMethod": "POST",
|
|
"parameterOrder": [
|
|
"resource"
|
|
],
|
|
"response": {
|
|
"$ref": "Policy"
|
|
},
|
|
"parameters": {
|
|
"resource": {
|
|
"pattern": "^projects/[^/]+/instances/[^/]+$",
|
|
"location": "path",
|
|
"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.",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}:setIamPolicy",
|
|
"path": "v1/{+resource}:setIamPolicy",
|
|
"id": "spanner.projects.instances.setIamPolicy",
|
|
"description": "Sets the access control policy on an instance resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.instances.setIamPolicy` on\nresource.",
|
|
"request": {
|
|
"$ref": "SetIamPolicyRequest"
|
|
}
|
|
},
|
|
"create": {
|
|
"response": {
|
|
"$ref": "Operation"
|
|
},
|
|
"parameterOrder": [
|
|
"parent"
|
|
],
|
|
"httpMethod": "POST",
|
|
"parameters": {
|
|
"parent": {
|
|
"pattern": "^projects/[^/]+$",
|
|
"location": "path",
|
|
"description": "Required. The name of the project in which to create the instance. Values\nare of the form `projects/\u003cproject\u003e`.",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances",
|
|
"id": "spanner.projects.instances.create",
|
|
"path": "v1/{+parent}/instances",
|
|
"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.",
|
|
"request": {
|
|
"$ref": "CreateInstanceRequest"
|
|
}
|
|
},
|
|
"getIamPolicy": {
|
|
"request": {
|
|
"$ref": "GetIamPolicyRequest"
|
|
},
|
|
"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.",
|
|
"response": {
|
|
"$ref": "Policy"
|
|
},
|
|
"parameterOrder": [
|
|
"resource"
|
|
],
|
|
"httpMethod": "POST",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"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.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}:getIamPolicy",
|
|
"id": "spanner.projects.instances.getIamPolicy",
|
|
"path": "v1/{+resource}:getIamPolicy"
|
|
},
|
|
"patch": {
|
|
"response": {
|
|
"$ref": "Operation"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"httpMethod": "PATCH",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"parameters": {
|
|
"name": {
|
|
"pattern": "^projects/[^/]+/instances/[^/]+$",
|
|
"location": "path",
|
|
"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 6 and 30 characters in length.",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}",
|
|
"id": "spanner.projects.instances.patch",
|
|
"path": "v1/{+name}",
|
|
"request": {
|
|
"$ref": "UpdateInstanceRequest"
|
|
},
|
|
"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."
|
|
},
|
|
"get": {
|
|
"response": {
|
|
"$ref": "Instance"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"httpMethod": "GET",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"parameters": {
|
|
"name": {
|
|
"description": "Required. The name of the requested instance. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}",
|
|
"id": "spanner.projects.instances.get",
|
|
"path": "v1/{+name}",
|
|
"description": "Gets information about a particular instance."
|
|
},
|
|
"testIamPermissions": {
|
|
"response": {
|
|
"$ref": "TestIamPermissionsResponse"
|
|
},
|
|
"parameterOrder": [
|
|
"resource"
|
|
],
|
|
"httpMethod": "POST",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"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.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}:testIamPermissions",
|
|
"id": "spanner.projects.instances.testIamPermissions",
|
|
"path": "v1/{+resource}:testIamPermissions",
|
|
"request": {
|
|
"$ref": "TestIamPermissionsRequest"
|
|
},
|
|
"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."
|
|
}
|
|
},
|
|
"resources": {
|
|
"operations": {
|
|
"methods": {
|
|
"cancel": {
|
|
"response": {
|
|
"$ref": "Empty"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"httpMethod": "POST",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"parameters": {
|
|
"name": {
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$",
|
|
"location": "path",
|
|
"description": "The name of the operation resource to be cancelled."
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}:cancel",
|
|
"id": "spanner.projects.instances.operations.cancel",
|
|
"path": "v1/{+name}: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`."
|
|
},
|
|
"delete": {
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}",
|
|
"path": "v1/{+name}",
|
|
"id": "spanner.projects.instances.operations.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`.",
|
|
"httpMethod": "DELETE",
|
|
"response": {
|
|
"$ref": "Empty"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"parameters": {
|
|
"name": {
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$",
|
|
"location": "path",
|
|
"description": "The name of the operation resource to be deleted.",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"response": {
|
|
"$ref": "Operation"
|
|
},
|
|
"httpMethod": "GET",
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"parameters": {
|
|
"name": {
|
|
"location": "path",
|
|
"description": "The name of the operation resource.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}",
|
|
"id": "spanner.projects.instances.operations.get",
|
|
"path": "v1/{+name}",
|
|
"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."
|
|
},
|
|
"list": {
|
|
"response": {
|
|
"$ref": "ListOperationsResponse"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"httpMethod": "GET",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"parameters": {
|
|
"filter": {
|
|
"description": "The standard list filter.",
|
|
"type": "string",
|
|
"location": "query"
|
|
},
|
|
"pageToken": {
|
|
"description": "The standard list page token.",
|
|
"type": "string",
|
|
"location": "query"
|
|
},
|
|
"name": {
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/operations$",
|
|
"location": "path",
|
|
"description": "The name of the operation's parent resource.",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
"pageSize": {
|
|
"format": "int32",
|
|
"description": "The standard list page size.",
|
|
"type": "integer",
|
|
"location": "query"
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations",
|
|
"id": "spanner.projects.instances.operations.list",
|
|
"path": "v1/{+name}",
|
|
"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."
|
|
}
|
|
}
|
|
},
|
|
"databases": {
|
|
"methods": {
|
|
"getDdl": {
|
|
"id": "spanner.projects.instances.databases.getDdl",
|
|
"path": "v1/{+database}/ddl",
|
|
"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.",
|
|
"response": {
|
|
"$ref": "GetDatabaseDdlResponse"
|
|
},
|
|
"parameterOrder": [
|
|
"database"
|
|
],
|
|
"httpMethod": "GET",
|
|
"parameters": {
|
|
"database": {
|
|
"location": "path",
|
|
"description": "Required. The database whose schema we wish to get.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl"
|
|
},
|
|
"list": {
|
|
"description": "Lists Cloud Spanner databases.",
|
|
"parameterOrder": [
|
|
"parent"
|
|
],
|
|
"httpMethod": "GET",
|
|
"response": {
|
|
"$ref": "ListDatabasesResponse"
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"parameters": {
|
|
"pageToken": {
|
|
"location": "query",
|
|
"description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListDatabasesResponse.",
|
|
"type": "string"
|
|
},
|
|
"pageSize": {
|
|
"format": "int32",
|
|
"description": "Number of databases to be returned in the response. If 0 or less,\ndefaults to the server's maximum allowed page size.",
|
|
"type": "integer",
|
|
"location": "query"
|
|
},
|
|
"parent": {
|
|
"location": "path",
|
|
"description": "Required. The instance whose databases should be listed.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+$"
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases",
|
|
"id": "spanner.projects.instances.databases.list",
|
|
"path": "v1/{+parent}/databases"
|
|
},
|
|
"setIamPolicy": {
|
|
"id": "spanner.projects.instances.databases.setIamPolicy",
|
|
"path": "v1/{+resource}:setIamPolicy",
|
|
"description": "Sets the access control policy on a database resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.databases.setIamPolicy` permission on\nresource.",
|
|
"request": {
|
|
"$ref": "SetIamPolicyRequest"
|
|
},
|
|
"response": {
|
|
"$ref": "Policy"
|
|
},
|
|
"parameterOrder": [
|
|
"resource"
|
|
],
|
|
"httpMethod": "POST",
|
|
"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.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:setIamPolicy"
|
|
},
|
|
"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.",
|
|
"request": {
|
|
"$ref": "CreateDatabaseRequest"
|
|
},
|
|
"httpMethod": "POST",
|
|
"parameterOrder": [
|
|
"parent"
|
|
],
|
|
"response": {
|
|
"$ref": "Operation"
|
|
},
|
|
"parameters": {
|
|
"parent": {
|
|
"pattern": "^projects/[^/]+/instances/[^/]+$",
|
|
"location": "path",
|
|
"description": "Required. The name of the instance that will serve the new database.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases",
|
|
"path": "v1/{+parent}/databases",
|
|
"id": "spanner.projects.instances.databases.create"
|
|
},
|
|
"getIamPolicy": {
|
|
"response": {
|
|
"$ref": "Policy"
|
|
},
|
|
"parameterOrder": [
|
|
"resource"
|
|
],
|
|
"httpMethod": "POST",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"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.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:getIamPolicy",
|
|
"id": "spanner.projects.instances.databases.getIamPolicy",
|
|
"path": "v1/{+resource}:getIamPolicy",
|
|
"request": {
|
|
"$ref": "GetIamPolicyRequest"
|
|
},
|
|
"description": "Gets the access control policy for a database resource. Returns an empty\npolicy if a database exists but does not have a policy set.\n\nAuthorization requires `spanner.databases.getIamPolicy` permission on\nresource."
|
|
},
|
|
"get": {
|
|
"httpMethod": "GET",
|
|
"response": {
|
|
"$ref": "Database"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"parameters": {
|
|
"name": {
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
|
|
"location": "path",
|
|
"description": "Required. The name of the requested database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`."
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}",
|
|
"path": "v1/{+name}",
|
|
"id": "spanner.projects.instances.databases.get",
|
|
"description": "Gets the state of a Cloud Spanner database."
|
|
},
|
|
"dropDatabase": {
|
|
"httpMethod": "DELETE",
|
|
"response": {
|
|
"$ref": "Empty"
|
|
},
|
|
"parameterOrder": [
|
|
"database"
|
|
],
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"parameters": {
|
|
"database": {
|
|
"location": "path",
|
|
"description": "Required. The database to be dropped.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$"
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}",
|
|
"path": "v1/{+database}",
|
|
"id": "spanner.projects.instances.databases.dropDatabase",
|
|
"description": "Drops (aka deletes) a Cloud Spanner database."
|
|
},
|
|
"updateDdl": {
|
|
"httpMethod": "PATCH",
|
|
"parameterOrder": [
|
|
"database"
|
|
],
|
|
"response": {
|
|
"$ref": "Operation"
|
|
},
|
|
"parameters": {
|
|
"database": {
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
|
|
"location": "path",
|
|
"description": "Required. The database to update.",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl",
|
|
"path": "v1/{+database}/ddl",
|
|
"id": "spanner.projects.instances.databases.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.",
|
|
"request": {
|
|
"$ref": "UpdateDatabaseDdlRequest"
|
|
}
|
|
},
|
|
"testIamPermissions": {
|
|
"path": "v1/{+resource}:testIamPermissions",
|
|
"id": "spanner.projects.instances.databases.testIamPermissions",
|
|
"description": "Returns permissions that the caller has on the specified database resource.\n\nAttempting this RPC on a non-existent Cloud Spanner database will result in\na NOT_FOUND error if the user has `spanner.databases.list` permission on\nthe containing Cloud Spanner instance. Otherwise returns an empty set of\npermissions.",
|
|
"request": {
|
|
"$ref": "TestIamPermissionsRequest"
|
|
},
|
|
"httpMethod": "POST",
|
|
"parameterOrder": [
|
|
"resource"
|
|
],
|
|
"response": {
|
|
"$ref": "TestIamPermissionsResponse"
|
|
},
|
|
"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.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:testIamPermissions"
|
|
}
|
|
},
|
|
"resources": {
|
|
"sessions": {
|
|
"methods": {
|
|
"read": {
|
|
"httpMethod": "POST",
|
|
"parameterOrder": [
|
|
"session"
|
|
],
|
|
"response": {
|
|
"$ref": "ResultSet"
|
|
},
|
|
"parameters": {
|
|
"session": {
|
|
"description": "Required. The session in which the read should be performed.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.data"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:read",
|
|
"path": "v1/{+session}:read",
|
|
"id": "spanner.projects.instances.databases.sessions.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.",
|
|
"request": {
|
|
"$ref": "ReadRequest"
|
|
}
|
|
},
|
|
"get": {
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}",
|
|
"path": "v1/{+name}",
|
|
"id": "spanner.projects.instances.databases.sessions.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.",
|
|
"httpMethod": "GET",
|
|
"response": {
|
|
"$ref": "Session"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"parameters": {
|
|
"name": {
|
|
"location": "path",
|
|
"description": "Required. The name of the session to retrieve.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$"
|
|
}
|
|
},
|
|
"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.",
|
|
"request": {
|
|
"$ref": "CommitRequest"
|
|
},
|
|
"response": {
|
|
"$ref": "CommitResponse"
|
|
},
|
|
"parameterOrder": [
|
|
"session"
|
|
],
|
|
"httpMethod": "POST",
|
|
"parameters": {
|
|
"session": {
|
|
"description": "Required. The session in which the transaction to be committed is running.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.data"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:commit",
|
|
"id": "spanner.projects.instances.databases.sessions.commit",
|
|
"path": "v1/{+session}:commit"
|
|
},
|
|
"beginTransaction": {
|
|
"response": {
|
|
"$ref": "Transaction"
|
|
},
|
|
"parameterOrder": [
|
|
"session"
|
|
],
|
|
"httpMethod": "POST",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.data"
|
|
],
|
|
"parameters": {
|
|
"session": {
|
|
"description": "Required. The session in which the transaction runs.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:beginTransaction",
|
|
"id": "spanner.projects.instances.databases.sessions.beginTransaction",
|
|
"path": "v1/{+session}:beginTransaction",
|
|
"request": {
|
|
"$ref": "BeginTransactionRequest"
|
|
},
|
|
"description": "Begins a new transaction. This step can often be skipped:\nRead, ExecuteSql and\nCommit can begin a new transaction as a\nside-effect."
|
|
},
|
|
"delete": {
|
|
"response": {
|
|
"$ref": "Empty"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"httpMethod": "DELETE",
|
|
"parameters": {
|
|
"name": {
|
|
"description": "Required. The name of the session to delete.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.data"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}",
|
|
"id": "spanner.projects.instances.databases.sessions.delete",
|
|
"path": "v1/{+name}",
|
|
"description": "Ends a session, releasing server resources associated with it."
|
|
},
|
|
"executeStreamingSql": {
|
|
"parameters": {
|
|
"session": {
|
|
"description": "Required. The session in which the SQL query should be performed.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.data"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeStreamingSql",
|
|
"path": "v1/{+session}:executeStreamingSql",
|
|
"id": "spanner.projects.instances.databases.sessions.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.",
|
|
"request": {
|
|
"$ref": "ExecuteSqlRequest"
|
|
},
|
|
"httpMethod": "POST",
|
|
"parameterOrder": [
|
|
"session"
|
|
],
|
|
"response": {
|
|
"$ref": "PartialResultSet"
|
|
}
|
|
},
|
|
"executeSql": {
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeSql",
|
|
"path": "v1/{+session}:executeSql",
|
|
"id": "spanner.projects.instances.databases.sessions.executeSql",
|
|
"description": "Executes an SQL query, returning all rows 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\nQueries 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.",
|
|
"request": {
|
|
"$ref": "ExecuteSqlRequest"
|
|
},
|
|
"httpMethod": "POST",
|
|
"parameterOrder": [
|
|
"session"
|
|
],
|
|
"response": {
|
|
"$ref": "ResultSet"
|
|
},
|
|
"parameters": {
|
|
"session": {
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
|
|
"location": "path",
|
|
"description": "Required. The session in which the SQL query should be performed."
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.data"
|
|
]
|
|
},
|
|
"rollback": {
|
|
"path": "v1/{+session}:rollback",
|
|
"id": "spanner.projects.instances.databases.sessions.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`.",
|
|
"request": {
|
|
"$ref": "RollbackRequest"
|
|
},
|
|
"httpMethod": "POST",
|
|
"parameterOrder": [
|
|
"session"
|
|
],
|
|
"response": {
|
|
"$ref": "Empty"
|
|
},
|
|
"parameters": {
|
|
"session": {
|
|
"location": "path",
|
|
"description": "Required. The session in which the transaction to roll back is running.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.data"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:rollback"
|
|
},
|
|
"streamingRead": {
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:streamingRead",
|
|
"id": "spanner.projects.instances.databases.sessions.streamingRead",
|
|
"path": "v1/{+session}:streamingRead",
|
|
"request": {
|
|
"$ref": "ReadRequest"
|
|
},
|
|
"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.",
|
|
"response": {
|
|
"$ref": "PartialResultSet"
|
|
},
|
|
"parameterOrder": [
|
|
"session"
|
|
],
|
|
"httpMethod": "POST",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.data"
|
|
],
|
|
"parameters": {
|
|
"session": {
|
|
"description": "Required. The session in which the read should be performed.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
}
|
|
},
|
|
"create": {
|
|
"response": {
|
|
"$ref": "Session"
|
|
},
|
|
"parameterOrder": [
|
|
"database"
|
|
],
|
|
"httpMethod": "POST",
|
|
"parameters": {
|
|
"database": {
|
|
"description": "Required. The database in which the new session is created.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.data"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions",
|
|
"id": "spanner.projects.instances.databases.sessions.create",
|
|
"path": "v1/{+database}/sessions",
|
|
"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\nCloud Spanner limits the number of sessions that can exist at any given\ntime; thus, it is a good idea to delete idle and/or unneeded sessions.\nAside from explicit deletes, Cloud Spanner can 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\"`."
|
|
}
|
|
}
|
|
},
|
|
"operations": {
|
|
"methods": {
|
|
"cancel": {
|
|
"response": {
|
|
"$ref": "Empty"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"httpMethod": "POST",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"parameters": {
|
|
"name": {
|
|
"description": "The name of the operation resource to be cancelled.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}:cancel",
|
|
"id": "spanner.projects.instances.databases.operations.cancel",
|
|
"path": "v1/{+name}: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`."
|
|
},
|
|
"delete": {
|
|
"path": "v1/{+name}",
|
|
"id": "spanner.projects.instances.databases.operations.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`.",
|
|
"httpMethod": "DELETE",
|
|
"response": {
|
|
"$ref": "Empty"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"parameters": {
|
|
"name": {
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$",
|
|
"location": "path",
|
|
"description": "The name of the operation resource to be deleted.",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}"
|
|
},
|
|
"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.",
|
|
"response": {
|
|
"$ref": "Operation"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"httpMethod": "GET",
|
|
"parameters": {
|
|
"name": {
|
|
"description": "The name of the operation resource.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$",
|
|
"location": "path"
|
|
}
|
|
},
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}",
|
|
"id": "spanner.projects.instances.databases.operations.get",
|
|
"path": "v1/{+name}"
|
|
},
|
|
"list": {
|
|
"response": {
|
|
"$ref": "ListOperationsResponse"
|
|
},
|
|
"parameterOrder": [
|
|
"name"
|
|
],
|
|
"httpMethod": "GET",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/cloud-platform",
|
|
"https://www.googleapis.com/auth/spanner.admin"
|
|
],
|
|
"parameters": {
|
|
"filter": {
|
|
"type": "string",
|
|
"location": "query",
|
|
"description": "The standard list filter."
|
|
},
|
|
"pageToken": {
|
|
"location": "query",
|
|
"description": "The standard list page token.",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "The name of the operation's parent resource.",
|
|
"type": "string",
|
|
"required": true,
|
|
"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations$",
|
|
"location": "path"
|
|
},
|
|
"pageSize": {
|
|
"location": "query",
|
|
"format": "int32",
|
|
"description": "The standard list page size.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations",
|
|
"id": "spanner.projects.instances.databases.operations.list",
|
|
"path": "v1/{+name}",
|
|
"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."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": {
|
|
"oauth_token": {
|
|
"location": "query",
|
|
"description": "OAuth 2.0 token for the current user.",
|
|
"type": "string"
|
|
},
|
|
"bearer_token": {
|
|
"description": "OAuth bearer token.",
|
|
"type": "string",
|
|
"location": "query"
|
|
},
|
|
"upload_protocol": {
|
|
"type": "string",
|
|
"location": "query",
|
|
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
|
|
},
|
|
"prettyPrint": {
|
|
"description": "Returns response with indentations and line breaks.",
|
|
"default": "true",
|
|
"type": "boolean",
|
|
"location": "query"
|
|
},
|
|
"uploadType": {
|
|
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
|
|
"type": "string",
|
|
"location": "query"
|
|
},
|
|
"fields": {
|
|
"location": "query",
|
|
"description": "Selector specifying which fields to include in a partial response.",
|
|
"type": "string"
|
|
},
|
|
"callback": {
|
|
"description": "JSONP",
|
|
"type": "string",
|
|
"location": "query"
|
|
},
|
|
"$.xgafv": {
|
|
"location": "query",
|
|
"enum": [
|
|
"1",
|
|
"2"
|
|
],
|
|
"description": "V1 error format.",
|
|
"type": "string",
|
|
"enumDescriptions": [
|
|
"v1 error format",
|
|
"v2 error format"
|
|
]
|
|
},
|
|
"alt": {
|
|
"enum": [
|
|
"json",
|
|
"media",
|
|
"proto"
|
|
],
|
|
"type": "string",
|
|
"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",
|
|
"description": "Data format for response.",
|
|
"default": "json"
|
|
},
|
|
"access_token": {
|
|
"location": "query",
|
|
"description": "OAuth access token.",
|
|
"type": "string"
|
|
},
|
|
"key": {
|
|
"location": "query",
|
|
"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.",
|
|
"type": "string"
|
|
},
|
|
"quotaUser": {
|
|
"location": "query",
|
|
"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.",
|
|
"type": "string"
|
|
},
|
|
"pp": {
|
|
"default": "true",
|
|
"type": "boolean",
|
|
"location": "query",
|
|
"description": "Pretty-print response."
|
|
}
|
|
},
|
|
"version": "v1",
|
|
"baseUrl": "https://spanner.googleapis.com/",
|
|
"kind": "discovery#restDescription",
|
|
"servicePath": "",
|
|
"description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.",
|
|
"basePath": "",
|
|
"id": "spanner:v1",
|
|
"documentationLink": "https://cloud.google.com/spanner/",
|
|
"revision": "20170613",
|
|
"discoveryVersion": "v1",
|
|
"version_module": "True"
|
|
}
|