Database
Database represents a Postgres database within a Branch.
Database object
Database represents a Postgres database within a Branch.
- namestring
The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
- parentstring
The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
- create_timestring
A timestamp indicating when the database was created.
- update_timestring
A timestamp indicating when the database was last updated.
- specobject
The desired state of the Database.
Show child attributesHide child attributes
- rolestring
The name of the role that owns the database. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
To change the owner, pass valid existing Role name when updating the Database
A database always has an owner.
- postgres_databasestring
The name of the Postgres database.
This expects a valid Postgres identifier as specified in the link below. https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS Required when creating the Database.
To rename, pass a valid postgres identifier when updating the Database.
- statusobject
The observed state of the Database.
Show child attributesHide child attributes
- rolestring
The name of the role that owns the database. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- postgres_databasestring
The name of the Postgres database.
- database_idstring
Part of the resource name.
- database_idstring
The part of the name, chosen by the user when the resource was created.
Get GA
GET
Get a Database.
API scopes: postgres
Parameters
- namestringpath
The name of the Database to retrieve. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
Response
Returns the Database object.
List GA
GET
List Databases.
API scopes: postgres
Parameters
- parentstringpath
The Branch that owns this collection of databases. Format: projects/{project_id}/branches/{branch_id}
- page_tokenstringquery
Pagination token to go to the next page of Databases. Requests first page if absent.
- page_sizeint32query
Upper bound for items returned.
Response
Returns a list of Database objects.
Create GA
POST
Create a Database.
Creates a database in the specified branch. A branch can have multiple databases.
API scopes: postgres
Parameters
- parentstringpath
The Branch where this Database will be created. Format: projects/{project_id}/branches/{branch_id}
- database_idstringquery
The ID to use for the Database, which will become the final component of the database's resource name. This ID becomes the database name in postgres.
This value should be 4-63 characters, and only use characters available in DNS names, as defined by RFC-1123
If database_id is not specified in the request, it is generated automatically.
- replace_existingbooleanquery
If true, update the database if it already exists instead of returning an error.
Request body
- databaseobject
The desired specification of a Database.
Show child attributesHide child attributes
- namestring
The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
- parentstring
The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
- create_timestring
A timestamp indicating when the database was created.
- update_timestring
A timestamp indicating when the database was last updated.
- specobject
The desired state of the Database.
Show child attributesHide child attributes
- rolestring
The name of the role that owns the database. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
To change the owner, pass valid existing Role name when updating the Database
A database always has an owner.
- postgres_databasestring
The name of the Postgres database.
This expects a valid Postgres identifier as specified in the link below. https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS Required when creating the Database.
To rename, pass a valid postgres identifier when updating the Database.
- statusobject
The observed state of the Database.
Show child attributesHide child attributes
- rolestring
The name of the role that owns the database. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- postgres_databasestring
The name of the Postgres database.
- database_idstring
Part of the resource name.
- database_idstring
The part of the name, chosen by the user when the resource was created.
Response
- namestring
The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the
nameshould be a resource name ending withoperations/{unique_id}.
- metadataobject
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata.
- doneboolean
If the value is
false, it means the operation is still in progress. Iftrue, the operation is completed, and eithererrororresponseis available.
- errorobjectRequired
The error result of the operation in case of failure or cancellation.
Show child attributesHide child attributes
- error_codestring
- messagestring
- stack_tracestring
- detailsarray of object
- responseobjectRequired
The normal, successful response of the operation.
Update GA
PATCH
Update a Database.
API scopes: postgres
Parameters
- databaseobjectpath
The Database to update.
The database's
namefield is used to identify the database to update. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}Show child attributesHide child attributes
- namestring
The resource name of the database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
- parentstring
The branch containing this database. Format: projects/{project_id}/branches/{branch_id}
- create_timestring
A timestamp indicating when the database was created.
- update_timestring
A timestamp indicating when the database was last updated.
- specobject
The desired state of the Database.
Show child attributesHide child attributes
- rolestring
The name of the role that owns the database. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
To change the owner, pass valid existing Role name when updating the Database
A database always has an owner.
- postgres_databasestring
The name of the Postgres database.
This expects a valid Postgres identifier as specified in the link below. https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS Required when creating the Database.
To rename, pass a valid postgres identifier when updating the Database.
- statusobject
The observed state of the Database.
Show child attributesHide child attributes
- rolestring
The name of the role that owns the database. Format: projects/{project_id}/branches/{branch_id}/roles/{role_id}
- postgres_databasestring
The name of the Postgres database.
- database_idstring
Part of the resource name.
- database_idstring
The part of the name, chosen by the user when the resource was created.
- update_maskstringquery
The list of fields to update.
Response
- namestring
The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the
nameshould be a resource name ending withoperations/{unique_id}.
- metadataobject
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata.
- doneboolean
If the value is
false, it means the operation is still in progress. Iftrue, the operation is completed, and eithererrororresponseis available.
- errorobjectRequired
The error result of the operation in case of failure or cancellation.
Show child attributesHide child attributes
- error_codestring
- messagestring
- stack_tracestring
- detailsarray of object
- responseobjectRequired
The normal, successful response of the operation.
Delete GA
DELETE
Delete a Database.
API scopes: postgres
Parameters
- namestringpath
The resource name of the postgres database. Format: projects/{project_id}/branches/{branch_id}/databases/{database_id}
Response
- namestring
The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the
nameshould be a resource name ending withoperations/{unique_id}.
- metadataobject
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata.
- doneboolean
If the value is
false, it means the operation is still in progress. Iftrue, the operation is completed, and eithererrororresponseis available.
- errorobjectRequired
The error result of the operation in case of failure or cancellation.
Show child attributesHide child attributes
- error_codestring
- messagestring
- stack_tracestring
- detailsarray of object
- responseobjectRequired
The normal, successful response of the operation.