pubsub

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.pubsub.Subscription(resource_name, opts=None, ack_deadline_seconds=None, expiration_policy=None, labels=None, message_retention_duration=None, name=None, project=None, push_config=None, retain_acked_messages=None, topic=None, __props__=None, __name__=None, __opts__=None)

Create a Subscription 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.

The expiration_policy object supports the following:

  • ttl (pulumi.Input[str])

The push_config object supports the following:

  • attributes (pulumi.Input[dict])

  • oidcToken (pulumi.Input[dict])

    • audience (pulumi.Input[str])

    • service_account_email (pulumi.Input[str])

  • pushEndpoint (pulumi.Input[str])

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, ack_deadline_seconds=None, expiration_policy=None, labels=None, message_retention_duration=None, name=None, path=None, project=None, push_config=None, retain_acked_messages=None, topic=None)

Get an existing Subscription 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.

The expiration_policy object supports the following:

  • ttl (pulumi.Input[str])

The push_config object supports the following:

  • attributes (pulumi.Input[dict])

  • oidcToken (pulumi.Input[dict])

    • audience (pulumi.Input[str])

    • service_account_email (pulumi.Input[str])

  • pushEndpoint (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.pubsub.SubscriptionIAMBinding(resource_name, opts=None, condition=None, members=None, project=None, role=None, subscription=None, __props__=None, __name__=None, __opts__=None)

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

  • pubsub.SubscriptionIAMPolicy: Authoritative. Sets the IAM policy for the subscription and replaces any existing policy already attached.

  • pubsub.SubscriptionIAMBinding: 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 subscription are preserved.

  • pubsub.SubscriptionIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the subscription are preserved.

Note: pubsub.SubscriptionIAMPolicy cannot be used in conjunction with pubsub.SubscriptionIAMBinding and pubsub.SubscriptionIAMMember or they will fight over what your policy should be.

Note: pubsub.SubscriptionIAMBinding resources can be used in conjunction with pubsub.SubscriptionIAMMember 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.

  • project (pulumi.Input[str]) – 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 pubsub.SubscriptionIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

  • subscription (pulumi.Input[str]) – The subscription name or id to bind to attach IAM policy to.

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 subscription’s IAM policy.

project = None

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

subscription = None

The subscription name or id to bind to attach IAM policy to.

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

Get an existing SubscriptionIAMBinding 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 subscription’s IAM policy.

  • project (pulumi.Input[str]) – 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 pubsub.SubscriptionIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

  • subscription (pulumi.Input[str]) – The subscription name or id to bind to attach IAM policy to.

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.pubsub.SubscriptionIAMMember(resource_name, opts=None, condition=None, member=None, project=None, role=None, subscription=None, __props__=None, __name__=None, __opts__=None)

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

  • pubsub.SubscriptionIAMPolicy: Authoritative. Sets the IAM policy for the subscription and replaces any existing policy already attached.

  • pubsub.SubscriptionIAMBinding: 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 subscription are preserved.

  • pubsub.SubscriptionIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the subscription are preserved.

Note: pubsub.SubscriptionIAMPolicy cannot be used in conjunction with pubsub.SubscriptionIAMBinding and pubsub.SubscriptionIAMMember or they will fight over what your policy should be.

Note: pubsub.SubscriptionIAMBinding resources can be used in conjunction with pubsub.SubscriptionIAMMember 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.

  • project (pulumi.Input[str]) – 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 pubsub.SubscriptionIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

  • subscription (pulumi.Input[str]) – The subscription name or id to bind to attach IAM policy to.

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 subscription’s IAM policy.

project = None

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

subscription = None

The subscription name or id to bind to attach IAM policy to.

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

Get an existing SubscriptionIAMMember 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 subscription’s IAM policy.

  • project (pulumi.Input[str]) – 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 pubsub.SubscriptionIAMBinding can be used per role. Note that custom roles must be of the format [projects|organizations]/{parent-name}/roles/{role-name}.

  • subscription (pulumi.Input[str]) – The subscription name or id to bind to attach IAM policy to.

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.pubsub.SubscriptionIAMPolicy(resource_name, opts=None, policy_data=None, project=None, subscription=None, __props__=None, __name__=None, __opts__=None)

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

  • pubsub.SubscriptionIAMPolicy: Authoritative. Sets the IAM policy for the subscription and replaces any existing policy already attached.

  • pubsub.SubscriptionIAMBinding: 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 subscription are preserved.

  • pubsub.SubscriptionIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the subscription are preserved.

Note: pubsub.SubscriptionIAMPolicy cannot be used in conjunction with pubsub.SubscriptionIAMBinding and pubsub.SubscriptionIAMMember or they will fight over what your policy should be.

Note: pubsub.SubscriptionIAMBinding resources can be used in conjunction with pubsub.SubscriptionIAMMember 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.

  • policy_data (pulumi.Input[str]) – The policy data generated by a organizations.getIAMPolicy data source.

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

  • subscription (pulumi.Input[str]) – The subscription name or id to bind to attach IAM policy to.

etag = None

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

policy_data = None

The policy data generated by a organizations.getIAMPolicy data source.

project = None

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

subscription = None

The subscription name or id to bind to attach IAM policy to.

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

Get an existing SubscriptionIAMPolicy 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 subscription’s IAM policy.

  • policy_data (pulumi.Input[str]) – The policy data generated by a organizations.getIAMPolicy data source.

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

  • subscription (pulumi.Input[str]) – The subscription name or id to bind to attach IAM policy to.

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.pubsub.Topic(resource_name, opts=None, kms_key_name=None, labels=None, message_storage_policy=None, name=None, project=None, __props__=None, __name__=None, __opts__=None)

Create a Topic 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.

The message_storage_policy object supports the following:

  • allowedPersistenceRegions (pulumi.Input[list])

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, kms_key_name=None, labels=None, message_storage_policy=None, name=None, project=None)

Get an existing Topic 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.

The message_storage_policy object supports the following:

  • allowedPersistenceRegions (pulumi.Input[list])

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.pubsub.TopicIAMBinding(resource_name, opts=None, condition=None, members=None, project=None, role=None, topic=None, __props__=None, __name__=None, __opts__=None)

Create a TopicIAMBinding 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 project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

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

  • topic (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to

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 IAM policy.

project = None

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

role = None

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

topic = None

Used to find the parent resource to bind the IAM policy to

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

Get an existing TopicIAMBinding 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 IAM policy.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

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

  • topic (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to

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.pubsub.TopicIAMMember(resource_name, opts=None, condition=None, member=None, project=None, role=None, topic=None, __props__=None, __name__=None, __opts__=None)

Create a TopicIAMMember 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 project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

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

  • topic (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to

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 IAM policy.

project = None

The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

role = None

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

topic = None

Used to find the parent resource to bind the IAM policy to

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

Get an existing TopicIAMMember 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 IAM policy.

  • project (pulumi.Input[str]) – The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

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

  • topic (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to

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.pubsub.TopicIAMPolicy(resource_name, opts=None, policy_data=None, project=None, topic=None, __props__=None, __name__=None, __opts__=None)

Create a TopicIAMPolicy 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.

  • 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 project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

  • topic (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to

etag = None

(Computed) The etag of the IAM policy.

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 project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

topic = None

Used to find the parent resource to bind the IAM policy to

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

Get an existing TopicIAMPolicy 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 IAM policy.

  • 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 project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

  • topic (pulumi.Input[str]) – Used to find the parent resource to bind the IAM policy to

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