spanner

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.

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

Create a Database resource with the given unique name, props, and options.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

project = None

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

static get(resource_name, id, opts=None, ddls=None, instance=None, name=None, project=None, state=None)

Get an existing Database resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • project (pulumi.Input[str]) – 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.DatabaseIAMBinding(resource_name, opts=None, condition=None, database=None, instance=None, members=None, project=None, role=None, __props__=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:

  • spanner.DatabaseIAMPolicy: 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 spanner.DatabaseIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.

  • spanner.DatabaseIAMBinding: 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.

  • spanner.DatabaseIAMMember: 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: spanner.DatabaseIAMPolicy cannot be used in conjunction with spanner.DatabaseIAMBinding and spanner.DatabaseIAMMember or they will fight over what your policy should be.

Note: spanner.DatabaseIAMBinding resources can be used in conjunction with spanner.DatabaseIAMMember 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.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • role (pulumi.Input[str]) – The role that should be applied. Only one spanner.DatabaseIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

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 spanner.DatabaseIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

static get(resource_name, id, opts=None, condition=None, database=None, etag=None, instance=None, members=None, project=None, role=None)

Get an existing DatabaseIAMBinding resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • database (pulumi.Input[str]) – The name of the Spanner database.

  • etag (pulumi.Input[str]) – (Computed) The etag of the database’s IAM policy.

  • instance (pulumi.Input[str]) – The name of the Spanner instance the database belongs to.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • role (pulumi.Input[str]) – The role that should be applied. Only one spanner.DatabaseIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

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, condition=None, database=None, instance=None, member=None, project=None, role=None, __props__=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:

  • spanner.DatabaseIAMPolicy: 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 spanner.DatabaseIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.

  • spanner.DatabaseIAMBinding: 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.

  • spanner.DatabaseIAMMember: 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: spanner.DatabaseIAMPolicy cannot be used in conjunction with spanner.DatabaseIAMBinding and spanner.DatabaseIAMMember or they will fight over what your policy should be.

Note: spanner.DatabaseIAMBinding resources can be used in conjunction with spanner.DatabaseIAMMember 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.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • role (pulumi.Input[str]) – The role that should be applied. Only one spanner.DatabaseIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

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 spanner.DatabaseIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

static get(resource_name, id, opts=None, condition=None, database=None, etag=None, instance=None, member=None, project=None, role=None)

Get an existing DatabaseIAMMember resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • database (pulumi.Input[str]) – The name of the Spanner database.

  • etag (pulumi.Input[str]) – (Computed) The etag of the database’s IAM policy.

  • instance (pulumi.Input[str]) – The name of the Spanner instance the database belongs to.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • role (pulumi.Input[str]) – The role that should be applied. Only one spanner.DatabaseIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

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, __props__=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:

  • spanner.DatabaseIAMPolicy: 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 spanner.DatabaseIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.

  • spanner.DatabaseIAMBinding: 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.

  • spanner.DatabaseIAMMember: 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: spanner.DatabaseIAMPolicy cannot be used in conjunction with spanner.DatabaseIAMBinding and spanner.DatabaseIAMMember or they will fight over what your policy should be.

Note: spanner.DatabaseIAMBinding resources can be used in conjunction with spanner.DatabaseIAMMember 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 organizations.getIAMPolicy 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 organizations.getIAMPolicy data source.

project = None

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

static get(resource_name, id, opts=None, database=None, etag=None, instance=None, policy_data=None, project=None)

Get an existing DatabaseIAMPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • database (pulumi.Input[str]) – The name of the Spanner database.

  • etag (pulumi.Input[str]) – (Computed) The etag of the database’s IAM policy.

  • 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 organizations.getIAMPolicy 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.

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, __props__=None, __name__=None, __opts__=None)

Create a Instance resource with the given unique name, props, and options.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

project = None

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

static get(resource_name, id, opts=None, config=None, display_name=None, labels=None, name=None, num_nodes=None, project=None, state=None)

Get an existing Instance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • project (pulumi.Input[str]) – 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.InstanceIAMBinding(resource_name, opts=None, condition=None, instance=None, members=None, project=None, role=None, __props__=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:

  • spanner.InstanceIAMPolicy: 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 spanner.InstanceIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.

  • spanner.InstanceIAMBinding: 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.

  • spanner.InstanceIAMMember: 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: spanner.InstanceIAMPolicy cannot be used in conjunction with spanner.InstanceIAMBinding and spanner.InstanceIAMMember or they will fight over what your policy should be.

Note: spanner.InstanceIAMBinding resources can be used in conjunction with spanner.InstanceIAMMember 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.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • role (pulumi.Input[str]) – The role that should be applied. Only one spanner.InstanceIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

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 spanner.InstanceIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

static get(resource_name, id, opts=None, condition=None, etag=None, instance=None, members=None, project=None, role=None)

Get an existing InstanceIAMBinding resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • etag (pulumi.Input[str]) – (Computed) The etag of the instance’s IAM policy.

  • instance (pulumi.Input[str]) – The name of the instance.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • role (pulumi.Input[str]) – The role that should be applied. Only one spanner.InstanceIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

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, condition=None, instance=None, member=None, project=None, role=None, __props__=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:

  • spanner.InstanceIAMPolicy: 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 spanner.InstanceIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.

  • spanner.InstanceIAMBinding: 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.

  • spanner.InstanceIAMMember: 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: spanner.InstanceIAMPolicy cannot be used in conjunction with spanner.InstanceIAMBinding and spanner.InstanceIAMMember or they will fight over what your policy should be.

Note: spanner.InstanceIAMBinding resources can be used in conjunction with spanner.InstanceIAMMember 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.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • role (pulumi.Input[str]) – The role that should be applied. Only one spanner.InstanceIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

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 spanner.InstanceIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

static get(resource_name, id, opts=None, condition=None, etag=None, instance=None, member=None, project=None, role=None)

Get an existing InstanceIAMMember resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • etag (pulumi.Input[str]) – (Computed) The etag of the instance’s IAM policy.

  • instance (pulumi.Input[str]) – The name of the instance.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • role (pulumi.Input[str]) – The role that should be applied. Only one spanner.InstanceIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

The condition object supports the following:

  • description (pulumi.Input[str])

  • expression (pulumi.Input[str])

  • title (pulumi.Input[str])

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, __props__=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:

  • spanner.InstanceIAMPolicy: 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 spanner.InstanceIAMPolicy. Any permissions granted by default will be removed unless you include them in your config.

  • spanner.InstanceIAMBinding: 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.

  • spanner.InstanceIAMMember: 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: spanner.InstanceIAMPolicy cannot be used in conjunction with spanner.InstanceIAMBinding and spanner.InstanceIAMMember or they will fight over what your policy should be.

Note: spanner.InstanceIAMBinding resources can be used in conjunction with spanner.InstanceIAMMember 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 organizations.getIAMPolicy 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 organizations.getIAMPolicy data source.

project = None

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

static get(resource_name, id, opts=None, etag=None, instance=None, policy_data=None, project=None)

Get an existing InstanceIAMPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • etag (pulumi.Input[str]) – (Computed) The etag of the instance’s IAM policy.

  • instance (pulumi.Input[str]) – The name of the instance.

  • policy_data (pulumi.Input[str]) – The policy data generated by a organizations.getIAMPolicy 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.

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