DatabaseAdminGrpcClient
class DatabaseAdminGrpcClient extends BaseStub
Cloud Spanner Database Admin API
The Cloud Spanner Database Admin API can be used to create, drop, and list databases. It also enables updating the schema of pre-existing databases.
Methods
No description
Lists Cloud Spanner databases.
Creates a new Cloud Spanner database and starts to prepare it for serving.
Gets the state of a Cloud Spanner database.
Updates the schema of a Cloud Spanner database by
creating/altering/dropping tables, columns, indexes, etc. The returned
[long-running operation][google.longrunning.Operation] will have a name of
the format <database_name>/operations/<operation_id>
and can be used to
track execution of the schema change(s). The
[metadata][google.longrunning.Operation.metadata] field type is
[UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
Drops (aka deletes) a Cloud Spanner database.
Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the [Operations][google.longrunning.Operations] API.
Sets the access control policy on a database resource. Replaces any existing policy.
Gets the access control policy for a database resource. Returns an empty policy if a database exists but does not have a policy set.
Returns permissions that the caller has on the specified database resource.
Details
at line 35
__construct(string $hostname, array $opts, Channel $channel = null)
at line 45
ListDatabases(ListDatabasesRequest $argument, array $metadata = [], array $options = [])
Lists Cloud Spanner databases.
at line 66
CreateDatabase(CreateDatabaseRequest $argument, array $metadata = [], array $options = [])
Creates a new Cloud Spanner database and starts to prepare it for serving.
The returned [long-running operation][google.longrunning.Operation] will
have a name of the format <database_name>/operations/<operation_id>
and
can be used to track preparation of the database. The
[metadata][google.longrunning.Operation.metadata] field type is
[CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The
[response][google.longrunning.Operation.response] field type is
[Database][google.spanner.admin.database.v1.Database], if successful.
at line 80
GetDatabase(GetDatabaseRequest $argument, array $metadata = [], array $options = [])
Gets the state of a Cloud Spanner database.
at line 100
UpdateDatabaseDdl(UpdateDatabaseDdlRequest $argument, array $metadata = [], array $options = [])
Updates the schema of a Cloud Spanner database by
creating/altering/dropping tables, columns, indexes, etc. The returned
[long-running operation][google.longrunning.Operation] will have a name of
the format <database_name>/operations/<operation_id>
and can be used to
track execution of the schema change(s). The
[metadata][google.longrunning.Operation.metadata] field type is
[UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.
at line 114
DropDatabase(DropDatabaseRequest $argument, array $metadata = [], array $options = [])
Drops (aka deletes) a Cloud Spanner database.
at line 130
GetDatabaseDdl(GetDatabaseDdlRequest $argument, array $metadata = [], array $options = [])
Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the [Operations][google.longrunning.Operations] API.
at line 148
SetIamPolicy(SetIamPolicyRequest $argument, array $metadata = [], array $options = [])
Sets the access control policy on a database resource. Replaces any existing policy.
Authorization requires spanner.databases.setIamPolicy
permission on
[resource][google.iam.v1.SetIamPolicyRequest.resource].
at line 166
GetIamPolicy(GetIamPolicyRequest $argument, array $metadata = [], array $options = [])
Gets the access control policy for a database resource. Returns an empty policy if a database exists but does not have a policy set.
Authorization requires spanner.databases.getIamPolicy
permission on
[resource][google.iam.v1.GetIamPolicyRequest.resource].
at line 185
TestIamPermissions(TestIamPermissionsRequest $argument, array $metadata = [], array $options = [])
Returns permissions that the caller has on the specified database resource.
Attempting this RPC on a non-existent Cloud Spanner database will result in
a NOT_FOUND error if the user has spanner.databases.list
permission on
the containing Cloud Spanner instance. Otherwise returns an empty set of
permissions.