spanner

class pulumi_gcp.spanner.Database(resource_name, opts=None, ddls=None, instance=None, name=None, project=None, __name__=None, __opts__=None)

Creates a Google Spanner Database within a Spanner Instance. For more information, see the official documentation, or the JSON API.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • ddls (pulumi.Input[list]) – An optional 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.
  • instance (pulumi.Input[str]) – The name of the instance that will serve the new database.
  • name (pulumi.Input[str]) – The name of the database.
  • project (pulumi.Input[str]) – The ID of the project in which to look for the instance specified. If it is not provided, the provider project is used.
ddls = None

An optional 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.

instance = None

The name of the instance that will serve the new database.

name = None

The name of the database.

project = None

The ID of the project in which to look for the instance specified. If it is not provided, the provider project is used.

state = None

The current state of the database.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_gcp.spanner.DatabaseIAMBinding(resource_name, opts=None, database=None, instance=None, members=None, project=None, role=None, __name__=None, __opts__=None)

Three different resources help you manage your IAM policy for a Spanner database. Each of these resources serves a different use case:

  • google_spanner_database_iam_policy: Authoritative. Sets the IAM policy for the database and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your database using google_spanner_database_iam_policy. Any permissions granted by default will be removed unless you include them in your config.
  • google_spanner_database_iam_binding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the database are preserved.
  • google_spanner_database_iam_member: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the database are preserved.

Note: google_spanner_database_iam_policy cannot be used in conjunction with google_spanner_database_iam_binding and google_spanner_database_iam_member or they will fight over what your policy should be.

Note: google_spanner_database_iam_binding resources can be used in conjunction with google_spanner_database_iam_member resources only if they do not grant privilege to the same role.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • database (pulumi.Input[str]) – The name of the Spanner database.
  • instance (pulumi.Input[str]) – The name of the Spanner instance the database belongs to.

:param pulumi.Input[list] members :param pulumi.Input[str] project: The ID of the project in which the resource belongs. If it

is not provided, the provider project is used.
Parameters:role (pulumi.Input[str]) – The role that should be applied. Only one google_spanner_database_iam_binding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.
database = None

The name of the Spanner database.

etag = None

(Computed) The etag of the database’s IAM policy.

instance = None

The name of the Spanner instance the database belongs to.

project = None

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role = None

The role that should be applied. Only one google_spanner_database_iam_binding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_gcp.spanner.DatabaseIAMMember(resource_name, opts=None, database=None, instance=None, member=None, project=None, role=None, __name__=None, __opts__=None)

Three different resources help you manage your IAM policy for a Spanner database. Each of these resources serves a different use case:

  • google_spanner_database_iam_policy: Authoritative. Sets the IAM policy for the database and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your database using google_spanner_database_iam_policy. Any permissions granted by default will be removed unless you include them in your config.
  • google_spanner_database_iam_binding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the database are preserved.
  • google_spanner_database_iam_member: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the database are preserved.

Note: google_spanner_database_iam_policy cannot be used in conjunction with google_spanner_database_iam_binding and google_spanner_database_iam_member or they will fight over what your policy should be.

Note: google_spanner_database_iam_binding resources can be used in conjunction with google_spanner_database_iam_member resources only if they do not grant privilege to the same role.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • database (pulumi.Input[str]) – The name of the Spanner database.
  • instance (pulumi.Input[str]) – The name of the Spanner instance the database belongs to.

:param pulumi.Input[str] member :param pulumi.Input[str] project: The ID of the project in which the resource belongs. If it

is not provided, the provider project is used.
Parameters:role (pulumi.Input[str]) – The role that should be applied. Only one google_spanner_database_iam_binding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.
database = None

The name of the Spanner database.

etag = None

(Computed) The etag of the database’s IAM policy.

instance = None

The name of the Spanner instance the database belongs to.

project = None

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role = None

The role that should be applied. Only one google_spanner_database_iam_binding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_gcp.spanner.DatabaseIAMPolicy(resource_name, opts=None, database=None, instance=None, policy_data=None, project=None, __name__=None, __opts__=None)

Three different resources help you manage your IAM policy for a Spanner database. Each of these resources serves a different use case:

  • google_spanner_database_iam_policy: Authoritative. Sets the IAM policy for the database and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your database using google_spanner_database_iam_policy. Any permissions granted by default will be removed unless you include them in your config.
  • google_spanner_database_iam_binding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the database are preserved.
  • google_spanner_database_iam_member: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the database are preserved.

Note: google_spanner_database_iam_policy cannot be used in conjunction with google_spanner_database_iam_binding and google_spanner_database_iam_member or they will fight over what your policy should be.

Note: google_spanner_database_iam_binding resources can be used in conjunction with google_spanner_database_iam_member resources only if they do not grant privilege to the same role.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • database (pulumi.Input[str]) – The name of the Spanner database.
  • instance (pulumi.Input[str]) – The name of the Spanner instance the database belongs to.
  • policy_data (pulumi.Input[str]) – The policy data generated by a google_iam_policy data source.
  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
database = None

The name of the Spanner database.

etag = None

(Computed) The etag of the database’s IAM policy.

instance = None

The name of the Spanner instance the database belongs to.

policy_data = None

The policy data generated by a google_iam_policy data source.

project = None

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_gcp.spanner.Instance(resource_name, opts=None, config=None, display_name=None, labels=None, name=None, num_nodes=None, project=None, __name__=None, __opts__=None)

Creates and manages a Google Spanner Instance. For more information, see the official documentation, or the JSON API.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • config (pulumi.Input[str]) – The name of the instance’s configuration (similar but not quite the same as a region) which defines defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
  • display_name (pulumi.Input[str]) – The descriptive name for this instance as it appears in UIs. Can be updated, however should be kept globally unique to avoid confusion.
  • labels (pulumi.Input[dict]) – A mapping (key/value pairs) of labels to assign to the instance.
  • name (pulumi.Input[str]) – The unique name (ID) of the instance. If the name is left blank, Terraform will randomly generate one when the instance is first created.
  • num_nodes (pulumi.Input[int]) – The number of nodes allocated to this instance. Defaults to 1. This can be updated after creation.
  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
config = None

The name of the instance’s configuration (similar but not quite the same as a region) which defines defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.

display_name = None

The descriptive name for this instance as it appears in UIs. Can be updated, however should be kept globally unique to avoid confusion.

labels = None

A mapping (key/value pairs) of labels to assign to the instance.

name = None

The unique name (ID) of the instance. If the name is left blank, Terraform will randomly generate one when the instance is first created.

num_nodes = None

The number of nodes allocated to this instance. Defaults to 1. This can be updated after creation.

project = None

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

state = None

The current state of the instance.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_gcp.spanner.InstanceIAMBinding(resource_name, opts=None, instance=None, members=None, project=None, role=None, __name__=None, __opts__=None)

Three different resources help you manage your IAM policy for a Spanner instance. Each of these resources serves a different use case:

  • google_spanner_instance_iam_policy: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your instance using google_spanner_instance_iam_policy. Any permissions granted by default will be removed unless you include them in your config.
  • google_spanner_instance_iam_binding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved.
  • google_spanner_instance_iam_member: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved.

Note: google_spanner_instance_iam_policy cannot be used in conjunction with google_spanner_instance_iam_binding and google_spanner_instance_iam_member or they will fight over what your policy should be.

Note: google_spanner_instance_iam_binding resources can be used in conjunction with google_spanner_instance_iam_member resources only if they do not grant privilege to the same role.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • instance (pulumi.Input[str]) – The name of the instance.

:param pulumi.Input[list] members :param pulumi.Input[str] project: The ID of the project in which the resource belongs. If it

is not provided, the provider project is used.
Parameters:role (pulumi.Input[str]) – The role that should be applied. Only one google_spanner_instance_iam_binding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.
etag = None

(Computed) The etag of the instance’s IAM policy.

instance = None

The name of the instance.

project = None

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role = None

The role that should be applied. Only one google_spanner_instance_iam_binding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_gcp.spanner.InstanceIAMMember(resource_name, opts=None, instance=None, member=None, project=None, role=None, __name__=None, __opts__=None)

Three different resources help you manage your IAM policy for a Spanner instance. Each of these resources serves a different use case:

  • google_spanner_instance_iam_policy: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your instance using google_spanner_instance_iam_policy. Any permissions granted by default will be removed unless you include them in your config.
  • google_spanner_instance_iam_binding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved.
  • google_spanner_instance_iam_member: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved.

Note: google_spanner_instance_iam_policy cannot be used in conjunction with google_spanner_instance_iam_binding and google_spanner_instance_iam_member or they will fight over what your policy should be.

Note: google_spanner_instance_iam_binding resources can be used in conjunction with google_spanner_instance_iam_member resources only if they do not grant privilege to the same role.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • instance (pulumi.Input[str]) – The name of the instance.

:param pulumi.Input[str] member :param pulumi.Input[str] project: The ID of the project in which the resource belongs. If it

is not provided, the provider project is used.
Parameters:role (pulumi.Input[str]) – The role that should be applied. Only one google_spanner_instance_iam_binding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.
etag = None

(Computed) The etag of the instance’s IAM policy.

instance = None

The name of the instance.

project = None

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role = None

The role that should be applied. Only one google_spanner_instance_iam_binding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_gcp.spanner.InstanceIAMPolicy(resource_name, opts=None, instance=None, policy_data=None, project=None, __name__=None, __opts__=None)

Three different resources help you manage your IAM policy for a Spanner instance. Each of these resources serves a different use case:

  • google_spanner_instance_iam_policy: Authoritative. Sets the IAM policy for the instance and replaces any existing policy already attached.
Warning: It’s entirely possibly to lock yourself out of your instance using google_spanner_instance_iam_policy. Any permissions granted by default will be removed unless you include them in your config.
  • google_spanner_instance_iam_binding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the instance are preserved.
  • google_spanner_instance_iam_member: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the instance are preserved.

Note: google_spanner_instance_iam_policy cannot be used in conjunction with google_spanner_instance_iam_binding and google_spanner_instance_iam_member or they will fight over what your policy should be.

Note: google_spanner_instance_iam_binding resources can be used in conjunction with google_spanner_instance_iam_member resources only if they do not grant privilege to the same role.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • instance (pulumi.Input[str]) – The name of the instance.
  • policy_data (pulumi.Input[str]) – The policy data generated by a google_iam_policy data source.
  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
etag = None

(Computed) The etag of the instance’s IAM policy.

instance = None

The name of the instance.

policy_data = None

The policy data generated by a google_iam_policy data source.

project = None

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str