Package-level declarations

Types

Link copied to clipboard
class Backup : KotlinCustomResource

Starts creating a new Cloud Spanner Backup. The returned backup long-running operation will have a name of the format projects//instances//backups//operations/ and can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.

Link copied to clipboard
data class BackupArgs(val backupId: Output<String>? = null, val database: Output<String>? = null, val encryptionConfigEncryptionType: Output<String>? = null, val encryptionConfigKmsKeyName: Output<String>? = null, val expireTime: Output<String>? = null, val instanceId: Output<String>? = null, val name: Output<String>? = null, val project: Output<String>? = null, val versionTime: Output<String>? = null) : ConvertibleToJava<BackupArgs>

Starts creating a new Cloud Spanner Backup. The returned backup long-running operation will have a name of the format projects//instances//backups//operations/ and can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.

Link copied to clipboard

Builder for BackupArgs.

Link copied to clipboard
object BackupMapper : ResourceMapper<Backup>
Link copied to clipboard

Builder for Backup.

Link copied to clipboard
class Database : KotlinCustomResource

Creates a new Cloud Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format /operations/ and can be used to track preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful. Auto-naming is currently not supported for this resource.

Link copied to clipboard
data class DatabaseArgs(val createStatement: Output<String>? = null, val databaseDialect: Output<DatabaseDatabaseDialect>? = null, val encryptionConfig: Output<EncryptionConfigArgs>? = null, val extraStatements: Output<List<String>>? = null, val instanceId: Output<String>? = null, val project: Output<String>? = null, val protoDescriptors: Output<String>? = null) : ConvertibleToJava<DatabaseArgs>

Creates a new Cloud Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format /operations/ and can be used to track preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful. Auto-naming is currently not supported for this resource.

Link copied to clipboard
Link copied to clipboard
object DatabaseMapper : ResourceMapper<Database>
Link copied to clipboard
Link copied to clipboard
class Instance : KotlinCustomResource

Creates an instance and begins preparing it to begin serving. The returned long-running operation can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, CreateInstance returns ALREADY_EXISTS. Immediately upon completion of this request: * The instance is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING. Until completion of the returned operation: * Cancelling the operation renders the instance immediately unreadable via the API. * The instance can be deleted. * All other attempts to modify the instance are rejected. Upon completion of the returned operation: * Billing for all successfully-allocated resources begins (some types may have lower than the requested levels). * Databases can be created in the instance. * The instance's allocated resource levels are readable via the API. * The instance's state becomes READY. The returned long-running operation will have a name of the format /operations/ and can be used to track creation of the instance. The metadata field type is CreateInstanceMetadata. The response field type is Instance, if successful.

Link copied to clipboard
data class InstanceArgs(val config: Output<String>? = null, val displayName: Output<String>? = null, val endpointUris: Output<List<String>>? = null, val freeInstanceMetadata: Output<FreeInstanceMetadataArgs>? = null, val instanceId: Output<String>? = null, val instanceType: Output<InstanceInstanceType>? = null, val labels: Output<Map<String, String>>? = null, val name: Output<String>? = null, val nodeCount: Output<Int>? = null, val processingUnits: Output<Int>? = null, val project: Output<String>? = null) : ConvertibleToJava<InstanceArgs>

Creates an instance and begins preparing it to begin serving. The returned long-running operation can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, CreateInstance returns ALREADY_EXISTS. Immediately upon completion of this request: * The instance is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING. Until completion of the returned operation: * Cancelling the operation renders the instance immediately unreadable via the API. * The instance can be deleted. * All other attempts to modify the instance are rejected. Upon completion of the returned operation: * Billing for all successfully-allocated resources begins (some types may have lower than the requested levels). * Databases can be created in the instance. * The instance's allocated resource levels are readable via the API. * The instance's state becomes READY. The returned long-running operation will have a name of the format /operations/ and can be used to track creation of the instance. The metadata field type is CreateInstanceMetadata. The response field type is Instance, if successful.

Link copied to clipboard
Link copied to clipboard
class InstanceBackupIamBinding : KotlinCustomResource

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource.

Link copied to clipboard
data class InstanceBackupIamBindingArgs(val condition: Output<ConditionArgs>? = null, val members: Output<List<String>>? = null, val name: Output<String>? = null, val role: Output<String>? = null) : ConvertibleToJava<InstanceBackupIamBindingArgs>

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource.

Link copied to clipboard
class InstanceBackupIamMember : KotlinCustomResource

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource.

Link copied to clipboard
data class InstanceBackupIamMemberArgs(val condition: Output<ConditionArgs>? = null, val member: Output<String>? = null, val name: Output<String>? = null, val role: Output<String>? = null) : ConvertibleToJava<InstanceBackupIamMemberArgs>

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource.

Link copied to clipboard
Link copied to clipboard
class InstanceBackupIamPolicy : KotlinCustomResource

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource. Note - this resource's API doesn't support deletion. When deleted, the resource will persist on Google Cloud even though it will be deleted from Pulumi state.

Link copied to clipboard
data class InstanceBackupIamPolicyArgs(val backupId: Output<String>? = null, val bindings: Output<List<BindingArgs>>? = null, val etag: Output<String>? = null, val instanceId: Output<String>? = null, val project: Output<String>? = null, val version: Output<Int>? = null) : ConvertibleToJava<InstanceBackupIamPolicyArgs>

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource. Note - this resource's API doesn't support deletion. When deleted, the resource will persist on Google Cloud even though it will be deleted from Pulumi state.

Link copied to clipboard
Link copied to clipboard
class InstanceConfig : KotlinCustomResource

Creates an instance config and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance config. The instance config name is assigned by the caller. If the named instance config already exists, CreateInstanceConfig returns ALREADY_EXISTS. Immediately after the request returns: * The instance config is readable via the API, with all requested attributes. The instance config's reconciling field is set to true. Its state is CREATING. While the operation is pending: * Cancelling the operation renders the instance config immediately unreadable via the API. * Except for deleting the creating resource, all other attempts to modify the instance config are rejected. Upon completion of the returned operation: * Instances can be created using the instance configuration. * The instance config's reconciling field becomes false. Its state becomes READY. The returned long-running operation will have a name of the format /operations/ and can be used to track creation of the instance config. The metadata field type is CreateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires spanner.instanceConfigs.create permission on the resource parent.

Link copied to clipboard
data class InstanceConfigArgs(val baseConfig: Output<String>? = null, val displayName: Output<String>? = null, val etag: Output<String>? = null, val instanceConfigId: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val leaderOptions: Output<List<String>>? = null, val name: Output<String>? = null, val project: Output<String>? = null, val replicas: Output<List<ReplicaInfoArgs>>? = null, val validateOnly: Output<Boolean>? = null) : ConvertibleToJava<InstanceConfigArgs>

Creates an instance config and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance config. The instance config name is assigned by the caller. If the named instance config already exists, CreateInstanceConfig returns ALREADY_EXISTS. Immediately after the request returns: * The instance config is readable via the API, with all requested attributes. The instance config's reconciling field is set to true. Its state is CREATING. While the operation is pending: * Cancelling the operation renders the instance config immediately unreadable via the API. * Except for deleting the creating resource, all other attempts to modify the instance config are rejected. Upon completion of the returned operation: * Instances can be created using the instance configuration. * The instance config's reconciling field becomes false. Its state becomes READY. The returned long-running operation will have a name of the format /operations/ and can be used to track creation of the instance config. The metadata field type is CreateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires spanner.instanceConfigs.create permission on the resource parent.

Link copied to clipboard
Link copied to clipboard
object InstanceConfigMapper : ResourceMapper<InstanceConfig>
Link copied to clipboard
class InstanceDatabaseIamBinding : KotlinCustomResource

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource.

Link copied to clipboard
data class InstanceDatabaseIamBindingArgs(val condition: Output<ConditionArgs>? = null, val members: Output<List<String>>? = null, val name: Output<String>? = null, val role: Output<String>? = null) : ConvertibleToJava<InstanceDatabaseIamBindingArgs>

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource.

Link copied to clipboard
class InstanceDatabaseIamMember : KotlinCustomResource

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource.

Link copied to clipboard
data class InstanceDatabaseIamMemberArgs(val condition: Output<ConditionArgs>? = null, val member: Output<String>? = null, val name: Output<String>? = null, val role: Output<String>? = null) : ConvertibleToJava<InstanceDatabaseIamMemberArgs>

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource.

Link copied to clipboard
class InstanceDatabaseIamPolicy : KotlinCustomResource

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource. Note - this resource's API doesn't support deletion. When deleted, the resource will persist on Google Cloud even though it will be deleted from Pulumi state.

Link copied to clipboard
data class InstanceDatabaseIamPolicyArgs(val bindings: Output<List<BindingArgs>>? = null, val databaseId: Output<String>? = null, val etag: Output<String>? = null, val instanceId: Output<String>? = null, val project: Output<String>? = null, val version: Output<Int>? = null) : ConvertibleToJava<InstanceDatabaseIamPolicyArgs>

Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource. Note - this resource's API doesn't support deletion. When deleted, the resource will persist on Google Cloud even though it will be deleted from Pulumi state.

Link copied to clipboard
class InstanceIamBinding : KotlinCustomResource

Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires spanner.instances.setIamPolicy on resource.

Link copied to clipboard
data class InstanceIamBindingArgs(val condition: Output<ConditionArgs>? = null, val members: Output<List<String>>? = null, val name: Output<String>? = null, val role: Output<String>? = null) : ConvertibleToJava<InstanceIamBindingArgs>

Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires spanner.instances.setIamPolicy on resource.

Link copied to clipboard
Link copied to clipboard
class InstanceIamMember : KotlinCustomResource

Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires spanner.instances.setIamPolicy on resource.

Link copied to clipboard
data class InstanceIamMemberArgs(val condition: Output<ConditionArgs>? = null, val member: Output<String>? = null, val name: Output<String>? = null, val role: Output<String>? = null) : ConvertibleToJava<InstanceIamMemberArgs>

Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires spanner.instances.setIamPolicy on resource.

Link copied to clipboard
object InstanceIamMemberMapper : ResourceMapper<InstanceIamMember>
Link copied to clipboard
class InstanceIamPolicy : KotlinCustomResource

Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires spanner.instances.setIamPolicy on resource. Note - this resource's API doesn't support deletion. When deleted, the resource will persist on Google Cloud even though it will be deleted from Pulumi state.

Link copied to clipboard
data class InstanceIamPolicyArgs(val bindings: Output<List<BindingArgs>>? = null, val etag: Output<String>? = null, val instanceId: Output<String>? = null, val project: Output<String>? = null, val version: Output<Int>? = null) : ConvertibleToJava<InstanceIamPolicyArgs>

Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires spanner.instances.setIamPolicy on resource. Note - this resource's API doesn't support deletion. When deleted, the resource will persist on Google Cloud even though it will be deleted from Pulumi state.

Link copied to clipboard
object InstanceIamPolicyMapper : ResourceMapper<InstanceIamPolicy>
Link copied to clipboard
object InstanceMapper : ResourceMapper<Instance>
Link copied to clipboard
Link copied to clipboard
class Session : KotlinCustomResource

Creates a new session. A session can be used to perform transactions that read and/or modify data in a Cloud Spanner database. Sessions are meant to be reused for many consecutive transactions. Sessions can only execute one transaction at a time. To execute multiple concurrent read-write/write-only transactions, create multiple sessions. Note that standalone reads and queries use a transaction internally, and count toward the one transaction limit. Active sessions use additional server resources, so it is a good idea to delete idle and unneeded sessions. Aside from explicit deletes, Cloud Spanner may delete sessions for which no operations are sent for more than an hour. If a session is deleted, requests to it return NOT_FOUND. Idle sessions can be kept alive by sending a trivial SQL query periodically, e.g., "SELECT 1". Auto-naming is currently not supported for this resource.

Link copied to clipboard
data class SessionArgs(val creatorRole: Output<String>? = null, val databaseId: Output<String>? = null, val instanceId: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val project: Output<String>? = null) : ConvertibleToJava<SessionArgs>

Creates a new session. A session can be used to perform transactions that read and/or modify data in a Cloud Spanner database. Sessions are meant to be reused for many consecutive transactions. Sessions can only execute one transaction at a time. To execute multiple concurrent read-write/write-only transactions, create multiple sessions. Note that standalone reads and queries use a transaction internally, and count toward the one transaction limit. Active sessions use additional server resources, so it is a good idea to delete idle and unneeded sessions. Aside from explicit deletes, Cloud Spanner may delete sessions for which no operations are sent for more than an hour. If a session is deleted, requests to it return NOT_FOUND. Idle sessions can be kept alive by sending a trivial SQL query periodically, e.g., "SELECT 1". Auto-naming is currently not supported for this resource.

Link copied to clipboard
Link copied to clipboard
object SessionMapper : ResourceMapper<Session>
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun backup(name: String): Backup
suspend fun backup(name: String, block: suspend BackupResourceBuilder.() -> Unit): Backup
Link copied to clipboard
suspend fun database(name: String, block: suspend DatabaseResourceBuilder.() -> Unit): Database
Link copied to clipboard
suspend fun instance(name: String, block: suspend InstanceResourceBuilder.() -> Unit): Instance
Link copied to clipboard
Link copied to clipboard
fun session(name: String): Session
suspend fun session(name: String, block: suspend SessionResourceBuilder.() -> Unit): Session