Resource: Schema
The application schema of a Firebase SQL Connect service.
| JSON representation |
|---|
{ "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "annotations": { string: string, ... }, "datasources": [ { object ( |
| Fields | |
|---|---|
name |
Identifier. The relative resource name of the schema, in the format: Right now, the only supported schema is "main". |
createTime |
Output only. [Output only] Create time stamp. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. [Output only] Update time stamp. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
labels |
Optional. Labels as key value pairs. An object containing a list of |
annotations |
Optional. Stores small amounts of arbitrary data. An object containing a list of |
datasources[] |
Required. The data sources linked in the schema. |
source |
Required. The source files that comprise the application schema. |
uid |
Output only. System-assigned, unique identifier. |
reconciling |
Output only. A field that if true, indicates that the system is working to compile and deploy the schema. |
displayName |
Optional. Mutable human-readable name. 63 character limit. |
etag |
Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. AIP-154 |
Datasource
A data source that backs Firebase SQL Connect services.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field configuration. Settings and configurations of the underlying data source. configuration can be only one of the following: |
|
postgresql |
PostgreSQL configurations. |
httpGraphql |
HTTP GraphQL server webhook configurations. |
PostgreSql
Settings for PostgreSQL data source.
| JSON representation |
|---|
{ "database": string, "ephemeral": boolean, "schema": string, // Union field |
| Fields | |
|---|---|
database |
Required. Name of the PostgreSQL database. |
ephemeral |
Output only. Ephemeral is true if this SQL Connect service is served from temporary in-memory emulation of Postgres. While Cloud SQL is being provisioned, the SQL Connect service provides the ephemeral service to help developers get started. Once the Cloud SQL is provisioned, SQL Connect service will transfer its data on a best-effort basis to the Cloud SQL instance. WARNING: Ephemeral data sources will expire after 24 hour. The data will be lost if they aren't transferred to the Cloud SQL instance. WARNING: When |
schema |
Optional. User-configured PostgreSQL schema. Defaults to "public" if not specified. |
Union field before_deploy. Configure the behavior before deploying this schema. Default to schema_validation=STRICT if not specified. before_deploy can be only one of the following: |
|
schemaValidation |
Optional. Configure how much Postgresql schema validation to perform. |
schemaMigration |
Optional. Configure how to perform Postgresql schema migration. |
Union field configuration. Settings and configurations of the underlying database. configuration can be only one of the following: |
|
unlinked |
No Postgres data source is linked. If set, don't allow |
cloudSql |
Cloud SQL configurations. |
SqlSchemaValidation
Configure how much SQL Schema to perform for the given schema.
| Enums | |
|---|---|
SQL_SCHEMA_VALIDATION_UNSPECIFIED |
Unspecified SQL schema validation. Default to STRICT. |
NONE |
Skip no SQL schema validation. Use it with extreme caution. schemas.create or schemas.patch will succeed even if SQL database is unavailable or SQL schema is incompatible. Generated SQL may fail at execution time. |
STRICT |
Connect to the SQL database and validate that the SQL DDL matches the schema exactly. Surface any discrepancies as FAILED_PRECONDITION with an IncompatibleSqlSchemaError error detail. |
COMPATIBLE |
Connect to the SQL database and validate that the SQL DDL has all the SQL resources used in the given Firebase SQL Connect Schema. Surface any missing resources as FAILED_PRECONDITION with an IncompatibleSqlSchemaError error detail. Succeed even if there are unknown tables and columns. |
SqlSchemaMigration
Configure how to perform SQL Schema migration before deploying the Schema.
| Enums | |
|---|---|
SQL_SCHEMA_MIGRATION_UNSPECIFIED |
Unspecified SQL schema migration. |
MIGRATE_COMPATIBLE |
Connect to the SQL database and identify any missing SQL resources used in the given Firebase SQL Connect Schema. Automatically create necessary SQL resources (SQL table, column, etc) before deploying the schema. During migration steps, the SQL Schema must comply with the previous before_deploy setting in case the migration is interrupted. Therefore, the previous before_deploy setting must not be schemaValidation=STRICT. |
CloudSqlInstance
Settings for CloudSQL instance configuration.
| JSON representation |
|---|
{ "instance": string } |
| Fields | |
|---|---|
instance |
Required. Name of the CloudSQL instance, in the format: |
HttpGraphql
Settings for HTTP GraphQL server webhook.
| JSON representation |
|---|
{ "uri": string, "timeout": string } |
| Fields | |
|---|---|
uri |
Required. The endpoint of the HTTP GraphQL server. |
timeout |
Optional. Timeout duration for the HTTP request. A duration in seconds with up to nine fractional digits, ending with ' |
Methods |
|
|---|---|
|
Creates a new Schema in a given project and location. |
|
Deletes a single Schema. |
|
Gets details of a single Schema. |
|
Lists Schemas in a given project and location. |
|
Updates the parameters of a single Schema, and creates a new SchemaRevision with the updated Schema. |