Skip to main content

@swamp/gcp/spanner

v2026.04.23.1

Google Cloud spanner infrastructure models

Repository

https://github.com/systeminit/swamp-extensions

Labels

gcpgoogle-cloudspannercloudinfrastructure

Contents

Quality score

Verified by Swamp

How well-documented and verifiable this extension is.

100%

Grade A

  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned

Install

$ swamp extension pull @swamp/gcp/spanner

@swamp/gcp/spanner/instanceconfigsv2026.04.23.1instanceconfigs.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
instanceConfig?objectA possible configuration for a Cloud Spanner instance. Configurations define the geographic placement of nodes and their replication.
instanceConfigId?stringRequired. The ID of the instance configuration to create. Valid identifiers are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in length. The `custom-` prefix is required to avoid name conflicts with Google-managed configurations.
validateOnly?booleanAn option to validate, but not actually execute, a request, and provide the same response.
updateMask?stringRequired. A mask specifying which fields in InstanceConfig should be updated. The field mask must always be specified; this prevents any future fields in InstanceConfig from being erased accidentally by clients that do not know about them. Only display_name and labels can be updated.
location?stringThe location for this resource (e.g., 'us', 'us-central1', 'europe-west1')
createCreate a instanceConfigs
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after creation (default: true)
getGet a instanceConfigs
ArgumentTypeDescription
identifierstringThe name of the instanceConfigs
updateUpdate instanceConfigs attributes
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after update (default: true)
deleteDelete the instanceConfigs
ArgumentTypeDescription
identifierstringThe name of the instanceConfigs
syncSync instanceConfigs state from GCP

Resources

state(infinite)— A possible configuration for a Cloud Spanner instance. Configurations define ...
@swamp/gcp/spanner/instancesv2026.04.23.1instances.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
instance?objectAn isolated set of Cloud Spanner resources on which databases can be hosted.
instanceId?stringRequired. The ID of the instance to create. Valid identifiers are of the form `a-z*[a-z0-9]` and must be between 2 and 64 characters in length.
fieldMask?stringRequired. A mask specifying which fields in Instance should be updated. The field mask must always be specified; this prevents any future fields in Instance from being erased accidentally by clients that do not know about them.
location?stringThe location for this resource (e.g., 'us', 'us-central1', 'europe-west1')
createCreate a instances
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after creation (default: true)
getGet a instances
ArgumentTypeDescription
identifierstringThe name of the instances
updateUpdate instances attributes
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after update (default: true)
deleteDelete the instances
ArgumentTypeDescription
identifierstringThe name of the instances
syncSync instances state from GCP
movemove
ArgumentTypeDescription
targetConfig?any
targetDatabaseMoveConfigs?any

Resources

state(infinite)— An isolated set of Cloud Spanner resources on which databases can be hosted.
@swamp/gcp/spanner/instances-backupsv2026.04.23.1instances_backups.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
database?stringRequired for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects//instances//databases/`.
encryptionInfo?objectEncryption information for a Cloud Spanner database or backup.
expireTime?stringRequired for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.
versionTime?stringThe backup will contain an externally consistent copy of the database at the timestamp specified by `version_time`. If `version_time` is not specified, the system will set `version_time` to the `create_time` of the backup.
backupId?stringRequired. The id of the backup to be created. The `backup_id` appended to `parent` forms the full backup name of the form `projects//instances//backups/`.
encryptionConfig_encryptionType?stringRequired. The encryption type of the backup.
encryptionConfig_kmsKeyName?stringOptional. This field is maintained for backwards compatibility. For new callers, we recommend using `kms_key_names` to specify the KMS key. Only use `kms_key_name` if the location of the KMS key matches the database instance's configuration (location) exactly. For example, if the KMS location is in `us-central1` or `nam3`, then the database instance must also be in `us-central1` or `nam3`. The Cloud KMS key that is used to encrypt and decrypt the restored database. Set this field only when encry
encryptionConfig_kmsKeyNames?stringOptional. Specifies the KMS configuration for the one or more keys used to protect the backup. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all regions of the backup's instance configuration. Some examples: * For regional (single-region) instance configurations, specify a regional location KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a multi-region location KMS key or m
location?stringThe location for this resource (e.g., 'us', 'us-central1', 'europe-west1')
createCreate a backups
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after creation (default: true)
getGet a backups
ArgumentTypeDescription
identifierstringThe name of the backups
updateUpdate backups attributes
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after update (default: true)
deleteDelete the backups
ArgumentTypeDescription
identifierstringThe name of the backups
syncSync backups state from GCP
copycopy
ArgumentTypeDescription
backupId?any
encryptionConfig?any
expireTime?any
sourceBackup?any

Resources

state(infinite)— A backup of a Cloud Spanner database.
@swamp/gcp/spanner/instances-databasesv2026.04.23.1instances_databases.ts

Global Arguments

ArgumentTypeDescription
createStatement?stringRequired. A `CREATE DATABASE` statement, which specifies the ID of the new database. The database ID must conform to the regular expression `a-z*[a-z0-9]` and be between 2 and 30 characters in length. If the database ID is a reserved word or if it contains a hyphen, the database ID must be enclosed in backticks (`` ` ``).
databaseDialect?enumOutput only. The dialect of the Cloud Spanner Database.
encryptionConfig?objectEncryption configuration for a Cloud Spanner database.
extraStatements?arrayOptional. A list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created.
protoDescriptors?stringOptional. Proto descriptors used by `CREATE/ALTER PROTO BUNDLE` statements in 'extra_statements'. Contains a protobuf-serialized [`google.protobuf.FileDescriptorSet`](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto) descriptor set. To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run ` $protoc --proto_path=/app_path --p
createTime?stringOutput only. If exists, the time at which the database creation started.
defaultLeader?stringOutput only. The read-write region which contains the database's leader replicas. This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
earliestVersionTime?stringOutput only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
enableDropProtection?booleanOptional. Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to [prevent accidental database deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion).
encryptionInfo?arrayOutput only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The `encryption_status` field inside of each `EncryptionInfo` is not populated. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in thi
name?stringRequired. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database.
quorumInfo?objectInformation about the dual-region quorum.
reconciling?booleanOutput only. If true, the database is being updated. If false, there are no ongoing update operations for the database.
restoreInfo?objectInformation about the database restore.
state?enumOutput only. The current database state.
versionRetentionPeriod?stringOutput only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.
location?stringThe location for this resource (e.g., 'us', 'us-central1', 'europe-west1')
createCreate a databases
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after creation (default: true)
getGet a databases
ArgumentTypeDescription
identifierstringThe name of the databases
updateUpdate databases attributes
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after update (default: true)
syncSync databases state from GCP
add_split_pointsadd split points
ArgumentTypeDescription
initiator?any
splitPoints?any
changequorumchangequorum
ArgumentTypeDescription
etag?any
name?any
quorumType?any
drop_databasedrop database
get_ddlget ddl
get_scansget scans
restorerestore
ArgumentTypeDescription
backup?any
databaseId?any
encryptionConfig?any
update_ddlupdate ddl
ArgumentTypeDescription
operationId?any
protoDescriptors?any
statements?any

Resources

state(infinite)— A Cloud Spanner database.
@swamp/gcp/spanner/instances-databases-backupschedulesv2026.04.23.1instances_databases_backupschedules.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
encryptionConfig?objectEncryption configuration for the backup to create.
fullBackupSpec?objectThe specification for full backups. A full backup stores the entire contents of the database at a given version time.
incrementalBackupSpec?objectThe specification for incremental backup chains. An incremental backup stores the delta of changes between a previous backup and the database contents at a given version time. An incremental backup chain consists of a full backup and zero or more successive incremental backups. The first backup created for an incremental backup chain is always a full backup.
retentionDuration?stringOptional. The retention duration of a backup that must be at least 6 hours and at most 366 days. The backup is eligible to be automatically deleted once the retention period has elapsed.
spec?objectDefines specifications of the backup schedule.
backupScheduleId?stringRequired. The Id to use for the backup schedule. The `backup_schedule_id` appended to `parent` forms the full backup schedule name of the form `projects//instances//databases//backupSchedules/`.
location?stringThe location for this resource (e.g., 'us', 'us-central1', 'europe-west1')
createCreate a backupSchedules
getGet a backupSchedules
ArgumentTypeDescription
identifierstringThe name of the backupSchedules
updateUpdate backupSchedules attributes
deleteDelete the backupSchedules
ArgumentTypeDescription
identifierstringThe name of the backupSchedules
syncSync backupSchedules state from GCP

Resources

state(infinite)— BackupSchedule expresses the automated backup creation specification for a Sp...
@swamp/gcp/spanner/instances-databases-databaserolesv2026.04.23.1instances_databases_databaseroles.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
location?stringThe location for this resource (e.g., 'us', 'us-central1', 'europe-west1')
getGet a databaseRoles
ArgumentTypeDescription
identifierstringThe name of the databaseRoles
syncSync databaseRoles state from GCP

Resources

state(infinite)— A Cloud Spanner database role.
@swamp/gcp/spanner/instances-databases-sessionsv2026.04.23.1instances_databases_sessions.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
session?objectA session in the Cloud Spanner API.
databasestringRequired. The database in which the new session is created.
createCreate a sessions
getGet a sessions
ArgumentTypeDescription
identifierstringThe name of the sessions
deleteDelete the sessions
ArgumentTypeDescription
identifierstringThe name of the sessions
syncSync sessions state from GCP
adapteradapter
ArgumentTypeDescription
name?any
adapt_messageadapt message
ArgumentTypeDescription
attachments?any
payload?any
protocol?any
batch_createbatch create
ArgumentTypeDescription
sessionCount?any
sessionTemplate?any
batch_writebatch write
ArgumentTypeDescription
excludeTxnFromChangeStreams?any
mutationGroups?any
requestOptions?any
begin_transactionbegin transaction
ArgumentTypeDescription
mutationKey?any
options?any
requestOptions?any
commitcommit
ArgumentTypeDescription
maxCommitDelay?any
mutations?any
precommitToken?any
requestOptions?any
returnCommitStats?any
singleUseTransaction?any
transactionId?any
execute_batch_dmlexecute batch dml
ArgumentTypeDescription
lastStatements?any
requestOptions?any
seqno?any
statements?any
transaction?any
execute_sqlexecute sql
ArgumentTypeDescription
dataBoostEnabled?any
directedReadOptions?any
lastStatement?any
paramTypes?any
params?any
partitionToken?any
queryMode?any
queryOptions?any
requestOptions?any
resumeToken?any
seqno?any
sql?any
transaction?any
execute_streaming_sqlexecute streaming sql
ArgumentTypeDescription
dataBoostEnabled?any
directedReadOptions?any
lastStatement?any
paramTypes?any
params?any
partitionToken?any
queryMode?any
queryOptions?any
requestOptions?any
resumeToken?any
seqno?any
sql?any
transaction?any
partition_querypartition query
ArgumentTypeDescription
paramTypes?any
params?any
partitionOptions?any
sql?any
transaction?any
partition_readpartition read
ArgumentTypeDescription
columns?any
index?any
keySet?any
partitionOptions?any
table?any
transaction?any
readread
ArgumentTypeDescription
columns?any
index?any
keySet?any
partitionOptions?any
table?any
transaction?any
rollbackrollback
ArgumentTypeDescription
transactionId?any
streaming_readstreaming read
ArgumentTypeDescription
columns?any
dataBoostEnabled?any
directedReadOptions?any
index?any
keySet?any
limit?any
lockHint?any
orderBy?any
partitionToken?any
requestOptions?any
resumeToken?any
table?any
transaction?any

Resources

state(infinite)— A session in the Cloud Spanner API.
@swamp/gcp/spanner/instances-instancepartitionsv2026.04.23.1instances_instancepartitions.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
instancePartition?objectAn isolated set of Cloud Spanner resources that databases can define placements on.
instancePartitionId?stringRequired. The ID of the instance partition to create. Valid identifiers are of the form `a-z*[a-z0-9]` and must be between 2 and 64 characters in length.
fieldMask?stringRequired. A mask specifying which fields in InstancePartition should be updated. The field mask must always be specified; this prevents any future fields in InstancePartition from being erased accidentally by clients that do not know about them.
location?stringThe location for this resource (e.g., 'us', 'us-central1', 'europe-west1')
createCreate a instancePartitions
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after creation (default: true)
getGet a instancePartitions
ArgumentTypeDescription
identifierstringThe name of the instancePartitions
updateUpdate instancePartitions attributes
ArgumentTypeDescription
waitForReady?booleanWait for the resource to reach a ready state after update (default: true)
deleteDelete the instancePartitions
ArgumentTypeDescription
identifierstringThe name of the instancePartitions
syncSync instancePartitions state from GCP

Resources

state(infinite)— An isolated set of Cloud Spanner resources that databases can define placemen...
@swamp/gcp/spanner/scansv2026.04.23.1scans.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
getGet a scans
ArgumentTypeDescription
identifierstringThe name of the scans
syncSync scans state from GCP

Resources

state(infinite)— Scan is a structure which describes Cloud Key Visualizer scan information.