Skip to main content

Snapshot

View as Markdown

An immutable, point-in-time copy of a branch's data within a project. It remains available after the source branch is deleted. To restore a snapshot, create a new branch with spec.source_snapshot set to the snapshot's resource name. For an overview, see https://docs.databricks.com/aws/en/oltp/projects/snapshots.

Snapshot object​

An immutable, point-in-time copy of a branch's data within a project. It remains available after the source branch is deleted. To restore a snapshot, create a new branch with spec.source_snapshot set to the snapshot's resource name. For an overview, see https://docs.databricks.com/aws/en/oltp/projects/snapshots.

namestringIDImmutable

The resource name of the snapshot. Format: projects/{project_id}/snapshots/{snapshot_id}

uidstringOutput only

Unique system-generated ID for the snapshot.

create_timestringOutput only

When the snapshot was created.

specobject

Client-provided configuration of the snapshot. When you create a snapshot, set exactly one of expire_time, ttl, or no_expiry.

Show child attributesHide child attributes
source_branchstringImmutable

The source branch to snapshot. The branch must belong to the same project as the snapshot. Format: projects/{project_id}/branches/{branch_id}

source_branch_lsnstringImmutable

Postgres log sequence number (LSN) to snapshot from. It must fall within the project's history retention window. If neither this field nor source_branch_time is set, the snapshot captures the current head of the source branch. Mutually exclusive with source_branch_time.

Example: 16/B374D848

source_branch_timestringImmutable

Timestamp to snapshot from. It must fall within the project's history retention window. Mutually exclusive with source_branch_lsn.

expire_timestringImmutable

Absolute time at which the snapshot is deleted. It must not be in the past. Mutually exclusive with ttl and no_expiry.

ttlstringInput onlyImmutable

Time-to-live, as a positive duration in seconds with an s suffix. The snapshot expires this long after it is created. Mutually exclusive with expire_time and no_expiry. Reads report the resolved absolute expire_time instead.

no_expirybooleanImmutable

If true, the snapshot never expires. The value false is rejected; set expire_time or ttl instead. Mutually exclusive with ttl and expire_time.

statusobjectOutput only

Server-observed state of the snapshot.

Show child attributesHide child attributes
source_branchstringOutput only

The source branch the snapshot was taken from. Format: projects/{project_id}/branches/{branch_id}

expire_timestringOutput only

Absolute time at which the snapshot is deleted.

no_expirybooleanOutput only

True if the snapshot never expires.

full_size_bytesint64Output only

Full logical size of the snapshot, in bytes.

diff_size_bytesint64Output only

Incremental storage size in bytes since the previous snapshot. Unset when the snapshot is not billed on incremental usage.

snapshot_idstringOutput only

The user-chosen ID; the final segment of name.

Get a Snapshot GA​

GET /api/2.0/postgres/{name=projects/*/snapshots/*}

Retrieves information about the specified snapshot.

API scopes: postgres

Parameters​

namestringRequiredpath

The resource name of the snapshot to retrieve. Format: projects/{project_id}/snapshots/{snapshot_id}

Response​

Returns the Snapshot object.

List Snapshots GA​

GET /api/2.0/postgres/{parent=projects/*}/snapshots

Returns a paginated list of snapshots in the project.

API scopes: postgres

Parameters​

parentstringRequiredpath

The project that owns the snapshots. Format: projects/{project_id}

page_tokenstringquery

Page token from a previous response; omit for the first page.

page_sizeint32query

Maximum number of snapshots to return per page.

Response​

Returns a list of Snapshot objects.

Create a Snapshot GA​

POST /api/2.0/postgres/{parent=projects/*}/snapshots

Creates a snapshot, an immutable point-in-time copy of a branch's data, within the project. Returns a long-running operation. Poll it until done is true; its response holds the new snapshot.

API scopes: postgres

Parameters​

parentstringRequiredpath

The project in which to create the snapshot. Format: projects/{project_id}

snapshot_idstringRequiredquery

Client-chosen ID for the snapshot. It becomes the final segment of the snapshot resource name and cannot be changed after creation. The ID must be 3 to 63 characters long, start with a lowercase letter, end with a lowercase letter or digit, and contain only lowercase letters, digits, and hyphens.

Example: before-schema-change

Request body​

The snapshot to create. Only spec is read from this message; the system sets the other fields.

namestringIDImmutable

The resource name of the snapshot. Format: projects/{project_id}/snapshots/{snapshot_id}

specobject

Client-provided configuration of the snapshot. When you create a snapshot, set exactly one of expire_time, ttl, or no_expiry.

Show child attributesHide child attributes
source_branchstringRequiredImmutable

The source branch to snapshot. The branch must belong to the same project as the snapshot. Format: projects/{project_id}/branches/{branch_id}

source_branch_lsnstringImmutable

Postgres log sequence number (LSN) to snapshot from. It must fall within the project's history retention window. If neither this field nor source_branch_time is set, the snapshot captures the current head of the source branch. Mutually exclusive with source_branch_time.

Example: 16/B374D848

source_branch_timestringImmutable

Timestamp to snapshot from. It must fall within the project's history retention window. Mutually exclusive with source_branch_lsn.

expire_timestringImmutable

Absolute time at which the snapshot is deleted. It must not be in the past. Mutually exclusive with ttl and no_expiry.

ttlstringInput onlyImmutable

Time-to-live, as a positive duration in seconds with an s suffix. The snapshot expires this long after it is created. Mutually exclusive with expire_time and no_expiry. Reads report the resolved absolute expire_time instead.

no_expirybooleanImmutable

If true, the snapshot never expires. The value false is rejected; set expire_time or ttl instead. Mutually exclusive with ttl and expire_time.

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 name should be a resource name ending with operations/{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. If true, the operation is completed, and either error or response is available.

errorobject

The error result of the operation in case of failure or cancellation.

Show child attributesHide child attributes
error_codestring

Error codes returned by Databricks APIs to indicate specific failure conditions.

Values:

Show 81 possible values
  • UNKNOWN
  • INTERNAL_ERROR
  • TEMPORARILY_UNAVAILABLE
  • IO_ERROR
  • BAD_REQUEST
  • SERVICE_UNDER_MAINTENANCE
  • WORKSPACE_TEMPORARILY_UNAVAILABLE
  • DEADLINE_EXCEEDED
  • CANCELLED
  • RESOURCE_EXHAUSTED
  • ABORTED
  • NOT_FOUND
  • ALREADY_EXISTS
  • UNAUTHENTICATED
  • UNAVAILABLE
  • INVALID_PARAMETER_VALUE
  • ENDPOINT_NOT_FOUND
  • MALFORMED_REQUEST
  • INVALID_STATE
  • PERMISSION_DENIED
  • FEATURE_DISABLED
  • CUSTOMER_UNAUTHORIZED
  • REQUEST_LIMIT_EXCEEDED
  • RESOURCE_CONFLICT
  • UNPARSEABLE_HTTP_ERROR
  • NOT_IMPLEMENTED
  • DATA_LOSS
  • INVALID_STATE_TRANSITION
  • COULD_NOT_ACQUIRE_LOCK
  • RESOURCE_ALREADY_EXISTS
  • RESOURCE_DOES_NOT_EXIST
  • QUOTA_EXCEEDED
  • MAX_BLOCK_SIZE_EXCEEDED
  • MAX_READ_SIZE_EXCEEDED
  • PARTIAL_DELETE
  • MAX_LIST_SIZE_EXCEEDED
  • DRY_RUN_FAILED
  • RESOURCE_LIMIT_EXCEEDED
  • DIRECTORY_NOT_EMPTY
  • DIRECTORY_PROTECTED
  • MAX_NOTEBOOK_SIZE_EXCEEDED
  • MAX_CHILD_NODE_SIZE_EXCEEDED
  • SEARCH_QUERY_TOO_LONG
  • SEARCH_QUERY_TOO_SHORT
  • MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST
  • PERMISSION_NOT_PROPAGATED
  • DEPLOYMENT_TIMEOUT
  • GIT_CONFLICT
  • GIT_UNKNOWN_REF
  • GIT_SENSITIVE_TOKEN_DETECTED
  • GIT_URL_NOT_ON_ALLOW_LIST
  • GIT_REMOTE_ERROR
  • PROJECTS_OPERATION_TIMEOUT
  • IPYNB_FILE_IN_REPO
  • INSECURE_PARTNER_RESPONSE
  • MALFORMED_PARTNER_RESPONSE
  • METASTORE_DOES_NOT_EXIST
  • DAC_DOES_NOT_EXIST
  • CATALOG_DOES_NOT_EXIST
  • SCHEMA_DOES_NOT_EXIST
  • TABLE_DOES_NOT_EXIST
  • SHARE_DOES_NOT_EXIST
  • RECIPIENT_DOES_NOT_EXIST
  • STORAGE_CREDENTIAL_DOES_NOT_EXIST
  • EXTERNAL_LOCATION_DOES_NOT_EXIST
  • PRINCIPAL_DOES_NOT_EXIST
  • PROVIDER_DOES_NOT_EXIST
  • METASTORE_ALREADY_EXISTS
  • DAC_ALREADY_EXISTS
  • CATALOG_ALREADY_EXISTS
  • SCHEMA_ALREADY_EXISTS
  • TABLE_ALREADY_EXISTS
  • SHARE_ALREADY_EXISTS
  • RECIPIENT_ALREADY_EXISTS
  • STORAGE_CREDENTIAL_ALREADY_EXISTS
  • EXTERNAL_LOCATION_ALREADY_EXISTS
  • PROVIDER_ALREADY_EXISTS
  • CATALOG_NOT_EMPTY
  • SCHEMA_NOT_EMPTY
  • METASTORE_NOT_EMPTY
  • PROVIDER_SHARE_NOT_ACCESSIBLE
messagestring
stack_tracestring
detailsarray of object
responseobject

The normal, successful response of the operation.

Delete a Snapshot GA​

DELETE /api/2.0/postgres/{name=projects/*/snapshots/*}

Deletes the specified snapshot. A deleted snapshot cannot be recovered. Returns a long-running operation. Poll it until done is true.

API scopes: postgres

Parameters​

namestringRequiredpath

The resource name of the snapshot to delete. Format: projects/{project_id}/snapshots/{snapshot_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 name should be a resource name ending with operations/{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. If true, the operation is completed, and either error or response is available.

errorobject

The error result of the operation in case of failure or cancellation.

Show child attributesHide child attributes
error_codestring

Error codes returned by Databricks APIs to indicate specific failure conditions.

Values:

Show 81 possible values
  • UNKNOWN
  • INTERNAL_ERROR
  • TEMPORARILY_UNAVAILABLE
  • IO_ERROR
  • BAD_REQUEST
  • SERVICE_UNDER_MAINTENANCE
  • WORKSPACE_TEMPORARILY_UNAVAILABLE
  • DEADLINE_EXCEEDED
  • CANCELLED
  • RESOURCE_EXHAUSTED
  • ABORTED
  • NOT_FOUND
  • ALREADY_EXISTS
  • UNAUTHENTICATED
  • UNAVAILABLE
  • INVALID_PARAMETER_VALUE
  • ENDPOINT_NOT_FOUND
  • MALFORMED_REQUEST
  • INVALID_STATE
  • PERMISSION_DENIED
  • FEATURE_DISABLED
  • CUSTOMER_UNAUTHORIZED
  • REQUEST_LIMIT_EXCEEDED
  • RESOURCE_CONFLICT
  • UNPARSEABLE_HTTP_ERROR
  • NOT_IMPLEMENTED
  • DATA_LOSS
  • INVALID_STATE_TRANSITION
  • COULD_NOT_ACQUIRE_LOCK
  • RESOURCE_ALREADY_EXISTS
  • RESOURCE_DOES_NOT_EXIST
  • QUOTA_EXCEEDED
  • MAX_BLOCK_SIZE_EXCEEDED
  • MAX_READ_SIZE_EXCEEDED
  • PARTIAL_DELETE
  • MAX_LIST_SIZE_EXCEEDED
  • DRY_RUN_FAILED
  • RESOURCE_LIMIT_EXCEEDED
  • DIRECTORY_NOT_EMPTY
  • DIRECTORY_PROTECTED
  • MAX_NOTEBOOK_SIZE_EXCEEDED
  • MAX_CHILD_NODE_SIZE_EXCEEDED
  • SEARCH_QUERY_TOO_LONG
  • SEARCH_QUERY_TOO_SHORT
  • MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST
  • PERMISSION_NOT_PROPAGATED
  • DEPLOYMENT_TIMEOUT
  • GIT_CONFLICT
  • GIT_UNKNOWN_REF
  • GIT_SENSITIVE_TOKEN_DETECTED
  • GIT_URL_NOT_ON_ALLOW_LIST
  • GIT_REMOTE_ERROR
  • PROJECTS_OPERATION_TIMEOUT
  • IPYNB_FILE_IN_REPO
  • INSECURE_PARTNER_RESPONSE
  • MALFORMED_PARTNER_RESPONSE
  • METASTORE_DOES_NOT_EXIST
  • DAC_DOES_NOT_EXIST
  • CATALOG_DOES_NOT_EXIST
  • SCHEMA_DOES_NOT_EXIST
  • TABLE_DOES_NOT_EXIST
  • SHARE_DOES_NOT_EXIST
  • RECIPIENT_DOES_NOT_EXIST
  • STORAGE_CREDENTIAL_DOES_NOT_EXIST
  • EXTERNAL_LOCATION_DOES_NOT_EXIST
  • PRINCIPAL_DOES_NOT_EXIST
  • PROVIDER_DOES_NOT_EXIST
  • METASTORE_ALREADY_EXISTS
  • DAC_ALREADY_EXISTS
  • CATALOG_ALREADY_EXISTS
  • SCHEMA_ALREADY_EXISTS
  • TABLE_ALREADY_EXISTS
  • SHARE_ALREADY_EXISTS
  • RECIPIENT_ALREADY_EXISTS
  • STORAGE_CREDENTIAL_ALREADY_EXISTS
  • EXTERNAL_LOCATION_ALREADY_EXISTS
  • PROVIDER_ALREADY_EXISTS
  • CATALOG_NOT_EMPTY
  • SCHEMA_NOT_EMPTY
  • METASTORE_NOT_EMPTY
  • PROVIDER_SHARE_NOT_ACCESSIBLE
messagestring
stack_tracestring
detailsarray of object
responseobject

The normal, successful response of the operation.