Module pubsub
This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.
Resources
- Subscription
- SubscriptionIAMBinding
- SubscriptionIAMMember
- SubscriptionIAMPolicy
- Topic
- TopicIAMBinding
- TopicIAMMember
- TopicIAMPolicy
Others
- SubscriptionArgs
- SubscriptionIAMBindingArgs
- SubscriptionIAMBindingState
- SubscriptionIAMMemberArgs
- SubscriptionIAMMemberState
- SubscriptionIAMPolicyArgs
- SubscriptionIAMPolicyState
- SubscriptionState
- TopicArgs
- TopicContext
- TopicData
- TopicEventCallbackFunctionArgs
- TopicEventHandler
- TopicIAMBindingArgs
- TopicIAMBindingState
- TopicIAMMemberArgs
- TopicIAMMemberState
- TopicIAMPolicyArgs
- TopicIAMPolicyState
- TopicMessagePublishedArgs
- TopicState
Resources
Resource Subscription
class Subscription extends CustomResourceA named resource representing the stream of messages from a single, specific topic, to be delivered to the subscribing application.
To get more information about Subscription, see:
- API documentation
- How-to Guides
Example Usage - Pubsub Subscription Push
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const exampleTopic = new gcp.pubsub.Topic("exampleTopic", {});
const exampleSubscription = new gcp.pubsub.Subscription("exampleSubscription", {
topic: exampleTopic.name,
ackDeadlineSeconds: 20,
labels: {
foo: "bar",
},
push_config: {
pushEndpoint: "https://example.com/push",
attributes: {
"x-goog-version": "v1",
},
},
});Example Usage - Pubsub Subscription Pull
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const exampleTopic = new gcp.pubsub.Topic("exampleTopic", {});
const exampleSubscription = new gcp.pubsub.Subscription("exampleSubscription", {
topic: exampleTopic.name,
labels: {
foo: "bar",
},
messageRetentionDuration: "1200s",
retainAckedMessages: true,
ackDeadlineSeconds: 20,
expiration_policy: {
ttl: "300000.5s",
},
});Example Usage - Pubsub Subscription Different Project
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const exampleTopic = new gcp.pubsub.Topic("exampleTopic", {project: "topic-project"});
const exampleSubscription = new gcp.pubsub.Subscription("exampleSubscription", {
project: "subscription-project",
topic: exampleTopic.name,
});Example Usage - Pubsub Subscription Dead Letter
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const exampleTopic = new gcp.pubsub.Topic("exampleTopic", {});
const exampleDeadLetter = new gcp.pubsub.Topic("exampleDeadLetter", {});
const exampleSubscription = new gcp.pubsub.Subscription("exampleSubscription", {
topic: exampleTopic.name,
dead_letter_policy: {
deadLetterTopic: exampleDeadLetter.id,
maxDeliveryAttempts: 10,
},
});constructor
new Subscription(name: string, args: SubscriptionArgs, opts?: pulumi.CustomResourceOptions)Create a Subscription resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SubscriptionState, opts?: pulumi.CustomResourceOptions): SubscriptionGet an existing Subscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is SubscriptionReturns true if the given object is an instance of Subscription. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property ackDeadlineSeconds
public ackDeadlineSeconds: pulumi.Output<number>;This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call subscriptions.modifyAckDeadline with the corresponding ackId if using pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.
property deadLetterPolicy
public deadLetterPolicy: pulumi.Output<SubscriptionDeadLetterPolicy | undefined>;A policy that specifies the conditions for dead lettering messages in this subscription. If deadLetterPolicy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscriptions’s parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription. Structure is documented below.
property expirationPolicy
public expirationPolicy: pulumi.Output<SubscriptionExpirationPolicy>;A policy that specifies the conditions for this subscription’s expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be used. If it is set but ttl is “”, the resource never expires. The minimum allowed value for expirationPolicy.ttl is 1 day. Structure is documented below.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property labels
public labels: pulumi.Output<{[key: string]: string} | undefined>;A set of key/value label pairs to assign to this Subscription.
property messageRetentionDuration
public messageRetentionDuration: pulumi.Output<string | undefined>;How long to retain unacknowledged messages in the subscription’s
backlog, from the moment a message is published. If
retainAckedMessages is true, then this also configures the retention
of acknowledged messages, and thus configures how far back in time a
subscriptions.seek can be done. Defaults to 7 days. Cannot be more
than 7 days ("604800s") or less than 10 minutes ("600s").
A duration in seconds with up to nine fractional digits, terminated
by ’s’. Example: "600.5s".
property name
public name: pulumi.Output<string>;Name of the subscription.
property path
public path: pulumi.Output<string>;property project
public project: pulumi.Output<string>;The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
property pushConfig
public pushConfig: pulumi.Output<SubscriptionPushConfig | undefined>;If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods. Structure is documented below.
property retainAckedMessages
public retainAckedMessages: pulumi.Output<boolean | undefined>;Indicates whether to retain acknowledged messages. If true, then
messages are not expunged from the subscription’s backlog, even if
they are acknowledged, until they fall out of the
messageRetentionDuration window.
property topic
public topic: pulumi.Output<string>;A reference to a Topic resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource SubscriptionIAMBinding
class SubscriptionIAMBinding extends CustomResourceThree different resources help you manage your IAM policy for pubsub subscription. Each of these resources serves a different use case:
gcp.pubsub.SubscriptionIAMPolicy: Authoritative. Sets the IAM policy for the subscription and replaces any existing policy already attached.gcp.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.gcp.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:
gcp.pubsub.SubscriptionIAMPolicycannot be used in conjunction withgcp.pubsub.SubscriptionIAMBindingandgcp.pubsub.SubscriptionIAMMemberor they will fight over what your policy should be.Note:
gcp.pubsub.SubscriptionIAMBindingresources can be used in conjunction withgcp.pubsub.SubscriptionIAMMemberresources only if they do not grant privilege to the same role.
google_pubsub_subscription_iam_policy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const admin = gcp.organizations.getIAMPolicy({
binding: [{
role: "roles/editor",
members: ["user:jane@example.com"],
}],
});
const editor = new gcp.pubsub.SubscriptionIAMPolicy("editor", {
subscription: "your-subscription-name",
policyData: admin.then(admin => admin.policyData),
});google_pubsub_subscription_iam_binding
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const editor = new gcp.pubsub.SubscriptionIAMBinding("editor", {
members: ["user:jane@example.com"],
role: "roles/editor",
subscription: "your-subscription-name",
});google_pubsub_subscription_iam_member
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const editor = new gcp.pubsub.SubscriptionIAMMember("editor", {
member: "user:jane@example.com",
role: "roles/editor",
subscription: "your-subscription-name",
});constructor
new SubscriptionIAMBinding(name: string, args: SubscriptionIAMBindingArgs, opts?: pulumi.CustomResourceOptions)Create a SubscriptionIAMBinding resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SubscriptionIAMBindingState, opts?: pulumi.CustomResourceOptions): SubscriptionIAMBindingGet an existing SubscriptionIAMBinding resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is SubscriptionIAMBindingReturns true if the given object is an instance of SubscriptionIAMBinding. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property condition
public condition: pulumi.Output<SubscriptionIAMBindingCondition | undefined>;property etag
public etag: pulumi.Output<string>;(Computed) The etag of the subscription’s IAM policy.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property members
public members: pulumi.Output<string[]>;property project
public project: pulumi.Output<string>;The project in which the resource belongs. If it is not provided, the provider project is used.
property role
public role: pulumi.Output<string>;The role that should be applied. Only one
gcp.pubsub.SubscriptionIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property subscription
public subscription: pulumi.Output<string>;The subscription name or id to bind to attach IAM policy to.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource SubscriptionIAMMember
class SubscriptionIAMMember extends CustomResourceThree different resources help you manage your IAM policy for pubsub subscription. Each of these resources serves a different use case:
gcp.pubsub.SubscriptionIAMPolicy: Authoritative. Sets the IAM policy for the subscription and replaces any existing policy already attached.gcp.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.gcp.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:
gcp.pubsub.SubscriptionIAMPolicycannot be used in conjunction withgcp.pubsub.SubscriptionIAMBindingandgcp.pubsub.SubscriptionIAMMemberor they will fight over what your policy should be.Note:
gcp.pubsub.SubscriptionIAMBindingresources can be used in conjunction withgcp.pubsub.SubscriptionIAMMemberresources only if they do not grant privilege to the same role.
google_pubsub_subscription_iam_policy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const admin = gcp.organizations.getIAMPolicy({
binding: [{
role: "roles/editor",
members: ["user:jane@example.com"],
}],
});
const editor = new gcp.pubsub.SubscriptionIAMPolicy("editor", {
subscription: "your-subscription-name",
policyData: admin.then(admin => admin.policyData),
});google_pubsub_subscription_iam_binding
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const editor = new gcp.pubsub.SubscriptionIAMBinding("editor", {
members: ["user:jane@example.com"],
role: "roles/editor",
subscription: "your-subscription-name",
});google_pubsub_subscription_iam_member
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const editor = new gcp.pubsub.SubscriptionIAMMember("editor", {
member: "user:jane@example.com",
role: "roles/editor",
subscription: "your-subscription-name",
});constructor
new SubscriptionIAMMember(name: string, args: SubscriptionIAMMemberArgs, opts?: pulumi.CustomResourceOptions)Create a SubscriptionIAMMember resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SubscriptionIAMMemberState, opts?: pulumi.CustomResourceOptions): SubscriptionIAMMemberGet an existing SubscriptionIAMMember resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is SubscriptionIAMMemberReturns true if the given object is an instance of SubscriptionIAMMember. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property condition
public condition: pulumi.Output<SubscriptionIAMMemberCondition | undefined>;property etag
public etag: pulumi.Output<string>;(Computed) The etag of the subscription’s IAM policy.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property member
public member: pulumi.Output<string>;property project
public project: pulumi.Output<string>;The project in which the resource belongs. If it is not provided, the provider project is used.
property role
public role: pulumi.Output<string>;The role that should be applied. Only one
gcp.pubsub.SubscriptionIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property subscription
public subscription: pulumi.Output<string>;The subscription name or id to bind to attach IAM policy to.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource SubscriptionIAMPolicy
class SubscriptionIAMPolicy extends CustomResourceThree different resources help you manage your IAM policy for pubsub subscription. Each of these resources serves a different use case:
gcp.pubsub.SubscriptionIAMPolicy: Authoritative. Sets the IAM policy for the subscription and replaces any existing policy already attached.gcp.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.gcp.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:
gcp.pubsub.SubscriptionIAMPolicycannot be used in conjunction withgcp.pubsub.SubscriptionIAMBindingandgcp.pubsub.SubscriptionIAMMemberor they will fight over what your policy should be.Note:
gcp.pubsub.SubscriptionIAMBindingresources can be used in conjunction withgcp.pubsub.SubscriptionIAMMemberresources only if they do not grant privilege to the same role.
google_pubsub_subscription_iam_policy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const admin = gcp.organizations.getIAMPolicy({
binding: [{
role: "roles/editor",
members: ["user:jane@example.com"],
}],
});
const editor = new gcp.pubsub.SubscriptionIAMPolicy("editor", {
subscription: "your-subscription-name",
policyData: admin.then(admin => admin.policyData),
});google_pubsub_subscription_iam_binding
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const editor = new gcp.pubsub.SubscriptionIAMBinding("editor", {
members: ["user:jane@example.com"],
role: "roles/editor",
subscription: "your-subscription-name",
});google_pubsub_subscription_iam_member
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const editor = new gcp.pubsub.SubscriptionIAMMember("editor", {
member: "user:jane@example.com",
role: "roles/editor",
subscription: "your-subscription-name",
});constructor
new SubscriptionIAMPolicy(name: string, args: SubscriptionIAMPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a SubscriptionIAMPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SubscriptionIAMPolicyState, opts?: pulumi.CustomResourceOptions): SubscriptionIAMPolicyGet an existing SubscriptionIAMPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is SubscriptionIAMPolicyReturns true if the given object is an instance of SubscriptionIAMPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property etag
public etag: pulumi.Output<string>;(Computed) The etag of the subscription’s IAM policy.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property policyData
public policyData: pulumi.Output<string>;The policy data generated by
a gcp.organizations.getIAMPolicy data source.
property project
public project: pulumi.Output<string>;The project in which the resource belongs. If it is not provided, the provider project is used.
property subscription
public subscription: pulumi.Output<string>;The subscription name or id to bind to attach IAM policy to.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Topic
class Topic extends CustomResourceA named resource to which messages are sent by publishers.
To get more information about Topic, see:
- API documentation
- How-to Guides
Example Usage - Pubsub Topic Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.pubsub.Topic("example", {
labels: {
foo: "bar",
},
});Example Usage - Pubsub Topic Cmek
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const keyRing = new gcp.kms.KeyRing("keyRing", {location: "global"});
const cryptoKey = new gcp.kms.CryptoKey("cryptoKey", {keyRing: keyRing.id});
const example = new gcp.pubsub.Topic("example", {kmsKeyName: cryptoKey.id});Example Usage - Pubsub Topic Geo Restricted
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = new gcp.pubsub.Topic("example", {
messageStoragePolicy: {
allowedPersistenceRegions: ["europe-west3"],
},
});constructor
new Topic(name: string, args?: TopicArgs, opts?: pulumi.CustomResourceOptions)Create a Topic resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TopicState, opts?: pulumi.CustomResourceOptions): TopicGet an existing Topic resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is TopicReturns true if the given object is an instance of Topic. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method onMessagePublished
onMessagePublished(name: string, handler: TopicEventHandler | TopicEventCallbackFunctionArgs, args?: TopicMessagePublishedArgs, opts?: pulumi.ComponentResourceOptions): CallbackFunctionCreates and publishes a Cloud Functions that will be triggered by messages published to Cloud Pub/Sub topics in the same GCP project as the Function. Cloud Pub/Sub is a globally distributed message bus that automatically scales as you need it and provides a foundation for building your own robust, global services.
See https://cloud.google.com/functions/docs/calling/pubsub for more details.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property kmsKeyName
public kmsKeyName: pulumi.Output<string | undefined>;The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project’s PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
roles/cloudkms.cryptoKeyEncrypterDecrypter to use this feature.
The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/*
property labels
public labels: pulumi.Output<{[key: string]: string} | undefined>;A set of key/value label pairs to assign to this Topic.
property messageStoragePolicy
public messageStoragePolicy: pulumi.Output<TopicMessageStoragePolicy>;Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
property name
public name: pulumi.Output<string>;Name of the topic.
property project
public project: pulumi.Output<string>;The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource TopicIAMBinding
class TopicIAMBinding extends CustomResourceThree different resources help you manage your IAM policy for Cloud Pub/Sub Topic. Each of these resources serves a different use case:
gcp.pubsub.TopicIAMPolicy: Authoritative. Sets the IAM policy for the topic and replaces any existing policy already attached.gcp.pubsub.TopicIAMBinding: 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 topic are preserved.gcp.pubsub.TopicIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the topic are preserved.
Note:
gcp.pubsub.TopicIAMPolicycannot be used in conjunction withgcp.pubsub.TopicIAMBindingandgcp.pubsub.TopicIAMMemberor they will fight over what your policy should be.Note:
gcp.pubsub.TopicIAMBindingresources can be used in conjunction withgcp.pubsub.TopicIAMMemberresources only if they do not grant privilege to the same role.
google_pubsub_topic_iam_policy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const admin = gcp.organizations.getIAMPolicy({
binding: [{
role: "roles/viewer",
members: ["user:jane@example.com"],
}],
});
const policy = new gcp.pubsub.TopicIAMPolicy("policy", {
project: google_pubsub_topic.example.project,
topic: google_pubsub_topic.example.name,
policyData: admin.then(admin => admin.policyData),
});google_pubsub_topic_iam_binding
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const binding = new gcp.pubsub.TopicIAMBinding("binding", {
project: google_pubsub_topic.example.project,
topic: google_pubsub_topic.example.name,
role: "roles/viewer",
members: ["user:jane@example.com"],
});google_pubsub_topic_iam_member
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const member = new gcp.pubsub.TopicIAMMember("member", {
project: google_pubsub_topic.example.project,
topic: google_pubsub_topic.example.name,
role: "roles/viewer",
member: "user:jane@example.com",
});constructor
new TopicIAMBinding(name: string, args: TopicIAMBindingArgs, opts?: pulumi.CustomResourceOptions)Create a TopicIAMBinding resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TopicIAMBindingState, opts?: pulumi.CustomResourceOptions): TopicIAMBindingGet an existing TopicIAMBinding resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is TopicIAMBindingReturns true if the given object is an instance of TopicIAMBinding. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property condition
public condition: pulumi.Output<TopicIAMBindingCondition | undefined>;property etag
public etag: pulumi.Output<string>;(Computed) The etag of the IAM policy.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property members
public members: pulumi.Output<string[]>;property project
public project: pulumi.Output<string>;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.
property role
public role: pulumi.Output<string>;The role that should be applied. Only one
gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property topic
public topic: pulumi.Output<string>;Used to find the parent resource to bind the IAM policy to
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource TopicIAMMember
class TopicIAMMember extends CustomResourceThree different resources help you manage your IAM policy for Cloud Pub/Sub Topic. Each of these resources serves a different use case:
gcp.pubsub.TopicIAMPolicy: Authoritative. Sets the IAM policy for the topic and replaces any existing policy already attached.gcp.pubsub.TopicIAMBinding: 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 topic are preserved.gcp.pubsub.TopicIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the topic are preserved.
Note:
gcp.pubsub.TopicIAMPolicycannot be used in conjunction withgcp.pubsub.TopicIAMBindingandgcp.pubsub.TopicIAMMemberor they will fight over what your policy should be.Note:
gcp.pubsub.TopicIAMBindingresources can be used in conjunction withgcp.pubsub.TopicIAMMemberresources only if they do not grant privilege to the same role.
google_pubsub_topic_iam_policy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const admin = gcp.organizations.getIAMPolicy({
binding: [{
role: "roles/viewer",
members: ["user:jane@example.com"],
}],
});
const policy = new gcp.pubsub.TopicIAMPolicy("policy", {
project: google_pubsub_topic.example.project,
topic: google_pubsub_topic.example.name,
policyData: admin.then(admin => admin.policyData),
});google_pubsub_topic_iam_binding
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const binding = new gcp.pubsub.TopicIAMBinding("binding", {
project: google_pubsub_topic.example.project,
topic: google_pubsub_topic.example.name,
role: "roles/viewer",
members: ["user:jane@example.com"],
});google_pubsub_topic_iam_member
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const member = new gcp.pubsub.TopicIAMMember("member", {
project: google_pubsub_topic.example.project,
topic: google_pubsub_topic.example.name,
role: "roles/viewer",
member: "user:jane@example.com",
});constructor
new TopicIAMMember(name: string, args: TopicIAMMemberArgs, opts?: pulumi.CustomResourceOptions)Create a TopicIAMMember resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TopicIAMMemberState, opts?: pulumi.CustomResourceOptions): TopicIAMMemberGet an existing TopicIAMMember resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is TopicIAMMemberReturns true if the given object is an instance of TopicIAMMember. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property condition
public condition: pulumi.Output<TopicIAMMemberCondition | undefined>;property etag
public etag: pulumi.Output<string>;(Computed) The etag of the IAM policy.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property member
public member: pulumi.Output<string>;property project
public project: pulumi.Output<string>;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.
property role
public role: pulumi.Output<string>;The role that should be applied. Only one
gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property topic
public topic: pulumi.Output<string>;Used to find the parent resource to bind the IAM policy to
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource TopicIAMPolicy
class TopicIAMPolicy extends CustomResourceThree different resources help you manage your IAM policy for Cloud Pub/Sub Topic. Each of these resources serves a different use case:
gcp.pubsub.TopicIAMPolicy: Authoritative. Sets the IAM policy for the topic and replaces any existing policy already attached.gcp.pubsub.TopicIAMBinding: 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 topic are preserved.gcp.pubsub.TopicIAMMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the topic are preserved.
Note:
gcp.pubsub.TopicIAMPolicycannot be used in conjunction withgcp.pubsub.TopicIAMBindingandgcp.pubsub.TopicIAMMemberor they will fight over what your policy should be.Note:
gcp.pubsub.TopicIAMBindingresources can be used in conjunction withgcp.pubsub.TopicIAMMemberresources only if they do not grant privilege to the same role.
google_pubsub_topic_iam_policy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const admin = gcp.organizations.getIAMPolicy({
binding: [{
role: "roles/viewer",
members: ["user:jane@example.com"],
}],
});
const policy = new gcp.pubsub.TopicIAMPolicy("policy", {
project: google_pubsub_topic.example.project,
topic: google_pubsub_topic.example.name,
policyData: admin.then(admin => admin.policyData),
});google_pubsub_topic_iam_binding
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const binding = new gcp.pubsub.TopicIAMBinding("binding", {
project: google_pubsub_topic.example.project,
topic: google_pubsub_topic.example.name,
role: "roles/viewer",
members: ["user:jane@example.com"],
});google_pubsub_topic_iam_member
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const member = new gcp.pubsub.TopicIAMMember("member", {
project: google_pubsub_topic.example.project,
topic: google_pubsub_topic.example.name,
role: "roles/viewer",
member: "user:jane@example.com",
});constructor
new TopicIAMPolicy(name: string, args: TopicIAMPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a TopicIAMPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TopicIAMPolicyState, opts?: pulumi.CustomResourceOptions): TopicIAMPolicyGet an existing TopicIAMPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is TopicIAMPolicyReturns true if the given object is an instance of TopicIAMPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property etag
public etag: pulumi.Output<string>;(Computed) The etag of the IAM policy.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property policyData
public policyData: pulumi.Output<string>;The policy data generated by
a gcp.organizations.getIAMPolicy data source.
property project
public project: pulumi.Output<string>;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.
property topic
public topic: pulumi.Output<string>;Used to find the parent resource to bind the IAM policy to
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Others
interface SubscriptionArgs
interface SubscriptionArgsThe set of arguments for constructing a Subscription resource.
property ackDeadlineSeconds
ackDeadlineSeconds?: pulumi.Input<number>;This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call subscriptions.modifyAckDeadline with the corresponding ackId if using pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.
property deadLetterPolicy
deadLetterPolicy?: pulumi.Input<SubscriptionDeadLetterPolicy>;A policy that specifies the conditions for dead lettering messages in this subscription. If deadLetterPolicy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscriptions’s parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription. Structure is documented below.
property expirationPolicy
expirationPolicy?: pulumi.Input<SubscriptionExpirationPolicy>;A policy that specifies the conditions for this subscription’s expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be used. If it is set but ttl is “”, the resource never expires. The minimum allowed value for expirationPolicy.ttl is 1 day. Structure is documented below.
property labels
labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A set of key/value label pairs to assign to this Subscription.
property messageRetentionDuration
messageRetentionDuration?: pulumi.Input<string>;How long to retain unacknowledged messages in the subscription’s
backlog, from the moment a message is published. If
retainAckedMessages is true, then this also configures the retention
of acknowledged messages, and thus configures how far back in time a
subscriptions.seek can be done. Defaults to 7 days. Cannot be more
than 7 days ("604800s") or less than 10 minutes ("600s").
A duration in seconds with up to nine fractional digits, terminated
by ’s’. Example: "600.5s".
property name
name?: pulumi.Input<string>;Name of the subscription.
property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
property pushConfig
pushConfig?: pulumi.Input<SubscriptionPushConfig>;If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods. Structure is documented below.
property retainAckedMessages
retainAckedMessages?: pulumi.Input<boolean>;Indicates whether to retain acknowledged messages. If true, then
messages are not expunged from the subscription’s backlog, even if
they are acknowledged, until they fall out of the
messageRetentionDuration window.
property topic
topic: pulumi.Input<string>;A reference to a Topic resource.
interface SubscriptionIAMBindingArgs
interface SubscriptionIAMBindingArgsThe set of arguments for constructing a SubscriptionIAMBinding resource.
property condition
condition?: pulumi.Input<SubscriptionIAMBindingCondition>;property members
members: pulumi.Input<pulumi.Input<string>[]>;property project
project?: pulumi.Input<string>;The project in which the resource belongs. If it is not provided, the provider project is used.
property role
role: pulumi.Input<string>;The role that should be applied. Only one
gcp.pubsub.SubscriptionIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property subscription
subscription: pulumi.Input<string>;The subscription name or id to bind to attach IAM policy to.
interface SubscriptionIAMBindingState
interface SubscriptionIAMBindingStateInput properties used for looking up and filtering SubscriptionIAMBinding resources.
property condition
condition?: pulumi.Input<SubscriptionIAMBindingCondition>;property etag
etag?: pulumi.Input<string>;(Computed) The etag of the subscription’s IAM policy.
property members
members?: pulumi.Input<pulumi.Input<string>[]>;property project
project?: pulumi.Input<string>;The project in which the resource belongs. If it is not provided, the provider project is used.
property role
role?: pulumi.Input<string>;The role that should be applied. Only one
gcp.pubsub.SubscriptionIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property subscription
subscription?: pulumi.Input<string>;The subscription name or id to bind to attach IAM policy to.
interface SubscriptionIAMMemberArgs
interface SubscriptionIAMMemberArgsThe set of arguments for constructing a SubscriptionIAMMember resource.
property condition
condition?: pulumi.Input<SubscriptionIAMMemberCondition>;property member
member: pulumi.Input<string>;property project
project?: pulumi.Input<string>;The project in which the resource belongs. If it is not provided, the provider project is used.
property role
role: pulumi.Input<string>;The role that should be applied. Only one
gcp.pubsub.SubscriptionIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property subscription
subscription: pulumi.Input<string>;The subscription name or id to bind to attach IAM policy to.
interface SubscriptionIAMMemberState
interface SubscriptionIAMMemberStateInput properties used for looking up and filtering SubscriptionIAMMember resources.
property condition
condition?: pulumi.Input<SubscriptionIAMMemberCondition>;property etag
etag?: pulumi.Input<string>;(Computed) The etag of the subscription’s IAM policy.
property member
member?: pulumi.Input<string>;property project
project?: pulumi.Input<string>;The project in which the resource belongs. If it is not provided, the provider project is used.
property role
role?: pulumi.Input<string>;The role that should be applied. Only one
gcp.pubsub.SubscriptionIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property subscription
subscription?: pulumi.Input<string>;The subscription name or id to bind to attach IAM policy to.
interface SubscriptionIAMPolicyArgs
interface SubscriptionIAMPolicyArgsThe set of arguments for constructing a SubscriptionIAMPolicy resource.
property policyData
policyData: pulumi.Input<string>;The policy data generated by
a gcp.organizations.getIAMPolicy data source.
property project
project?: pulumi.Input<string>;The project in which the resource belongs. If it is not provided, the provider project is used.
property subscription
subscription: pulumi.Input<string>;The subscription name or id to bind to attach IAM policy to.
interface SubscriptionIAMPolicyState
interface SubscriptionIAMPolicyStateInput properties used for looking up and filtering SubscriptionIAMPolicy resources.
property etag
etag?: pulumi.Input<string>;(Computed) The etag of the subscription’s IAM policy.
property policyData
policyData?: pulumi.Input<string>;The policy data generated by
a gcp.organizations.getIAMPolicy data source.
property project
project?: pulumi.Input<string>;The project in which the resource belongs. If it is not provided, the provider project is used.
property subscription
subscription?: pulumi.Input<string>;The subscription name or id to bind to attach IAM policy to.
interface SubscriptionState
interface SubscriptionStateInput properties used for looking up and filtering Subscription resources.
property ackDeadlineSeconds
ackDeadlineSeconds?: pulumi.Input<number>;This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call subscriptions.modifyAckDeadline with the corresponding ackId if using pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.
property deadLetterPolicy
deadLetterPolicy?: pulumi.Input<SubscriptionDeadLetterPolicy>;A policy that specifies the conditions for dead lettering messages in this subscription. If deadLetterPolicy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscriptions’s parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription. Structure is documented below.
property expirationPolicy
expirationPolicy?: pulumi.Input<SubscriptionExpirationPolicy>;A policy that specifies the conditions for this subscription’s expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be used. If it is set but ttl is “”, the resource never expires. The minimum allowed value for expirationPolicy.ttl is 1 day. Structure is documented below.
property labels
labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A set of key/value label pairs to assign to this Subscription.
property messageRetentionDuration
messageRetentionDuration?: pulumi.Input<string>;How long to retain unacknowledged messages in the subscription’s
backlog, from the moment a message is published. If
retainAckedMessages is true, then this also configures the retention
of acknowledged messages, and thus configures how far back in time a
subscriptions.seek can be done. Defaults to 7 days. Cannot be more
than 7 days ("604800s") or less than 10 minutes ("600s").
A duration in seconds with up to nine fractional digits, terminated
by ’s’. Example: "600.5s".
property name
name?: pulumi.Input<string>;Name of the subscription.
property path
path?: pulumi.Input<string>;property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
property pushConfig
pushConfig?: pulumi.Input<SubscriptionPushConfig>;If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods. Structure is documented below.
property retainAckedMessages
retainAckedMessages?: pulumi.Input<boolean>;Indicates whether to retain acknowledged messages. If true, then
messages are not expunged from the subscription’s backlog, even if
they are acknowledged, until they fall out of the
messageRetentionDuration window.
property topic
topic?: pulumi.Input<string>;A reference to a Topic resource.
interface TopicArgs
interface TopicArgsThe set of arguments for constructing a Topic resource.
property kmsKeyName
kmsKeyName?: pulumi.Input<string>;The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project’s PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
roles/cloudkms.cryptoKeyEncrypterDecrypter to use this feature.
The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/*
property labels
labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A set of key/value label pairs to assign to this Topic.
property messageStoragePolicy
messageStoragePolicy?: pulumi.Input<TopicMessageStoragePolicy>;Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
property name
name?: pulumi.Input<string>;Name of the topic.
property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
interface TopicContext
interface TopicContext extends ContextShape of the [context] object passed to a Cloud Function when a topic event fires.
property eventId
eventId: string;A unique ID for the event. For example: “70172329041928”.
property eventType
eventType: "google.pubsub.topic.publish";property resource
resource: {
name: string;
service: "pubsub.googleapis.com";
type: "type.googleapis.com/google.pubsub.v1.PubsubMessage";
};property timestamp
timestamp: string;The date/time this event was created. For example: “2018-04-09T07:56:12.975Z”.
interface TopicData
interface TopicDataShape of the [data] object passed to a Cloud Function when a topic event fires.
See https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage for more details.
property @type
@type: "type.googleapis.com/google.pubsub.v1.PubsubMessage";property attributes
attributes: Record<string, string>;key/value pairs included with the topic even.
property data
data: string;Base64 encoded data. Use Buffer.from(pubSubMessage.data, 'base64') to get raw bytes of the
message.
interface TopicEventCallbackFunctionArgs
interface TopicEventCallbackFunctionArgs extends CallbackFunctionArgsArguments that can be provided to control the Cloud Function created as the serverless endpoint for a topic event.
property availableMemoryMb
availableMemoryMb?: pulumi.Input<number>;Memory (in MB), available to the function. Default value is 256MB. Allowed values are: 128MB, 256MB, 512MB, 1024MB, and 2048MB.
property bucket
bucket?: storage.Bucket;The bucket to use as the sourceArchiveBucket for the generated CloudFunctions Function source to be placed in. A fresh [storage.BucketObject] will be made there containing the serialized code.
property callback
callback?: TopicEventHandler;property callbackFactory
callbackFactory?: undefined | () => TopicEventHandler;property codePathOptions
codePathOptions?: pulumi.runtime.CodePathOptions;Options to control which paths/packages should be included or excluded in the zip file containing the code for the GCP Function.
property description
description?: pulumi.Input<string>;Description of the function.
property environmentVariables
environmentVariables?: pulumi.Input<{[key: string]: any}>;A set of key/value environment variable pairs to assign to the function.
property eventTrigger
eventTrigger?: undefined;property httpsTriggerUrl
httpsTriggerUrl?: undefined;property iamMember
iamMember?: pulumi.Input<string>;The specific member to grant access to the function. If not specifiedm then we default to allUsers.
Available options are allAuthenticatedUsers, user:{emailid}, serviceAccount:{emailid},
group:{emailid} and domain:{domain}:
property iamRole
iamRole?: pulumi.Input<string>;The specific role to attach to the function. If not specified, then we default to roles/cloudfunctions.invoker.
Role must be in the format roles/{role-name}
property labels
labels?: pulumi.Input<{[key: string]: any}>;A set of key/value label pairs to assign to the function.
property project
project?: pulumi.Input<string>;Project of the function. If it is not provided, the provider project is used.
property region
region?: pulumi.Input<string>;Region of function. Currently can be only “us-central1”. If it is not provided, the provider region is used.
property runtime
runtime?: pulumi.Input<string>;The specific runtime for the function. If not specified, a default will be applied
property serviceAccountEmail
serviceAccountEmail?: pulumi.Input<string>;If provided, the self-provided service account to run the function with.
property timeout
timeout?: pulumi.Input<number>;Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
property triggerHttp
triggerHttp?: undefined;type TopicEventHandler
type TopicEventHandler = cloudfunctions.Callback<TopicData, TopicContext, void>;interface TopicIAMBindingArgs
interface TopicIAMBindingArgsThe set of arguments for constructing a TopicIAMBinding resource.
property condition
condition?: pulumi.Input<TopicIAMBindingCondition>;property members
members: pulumi.Input<pulumi.Input<string>[]>;property project
project?: pulumi.Input<string>;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.
property role
role: pulumi.Input<string>;The role that should be applied. Only one
gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property topic
topic: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
interface TopicIAMBindingState
interface TopicIAMBindingStateInput properties used for looking up and filtering TopicIAMBinding resources.
property condition
condition?: pulumi.Input<TopicIAMBindingCondition>;property etag
etag?: pulumi.Input<string>;(Computed) The etag of the IAM policy.
property members
members?: pulumi.Input<pulumi.Input<string>[]>;property project
project?: pulumi.Input<string>;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.
property role
role?: pulumi.Input<string>;The role that should be applied. Only one
gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property topic
topic?: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
interface TopicIAMMemberArgs
interface TopicIAMMemberArgsThe set of arguments for constructing a TopicIAMMember resource.
property condition
condition?: pulumi.Input<TopicIAMMemberCondition>;property member
member: pulumi.Input<string>;property project
project?: pulumi.Input<string>;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.
property role
role: pulumi.Input<string>;The role that should be applied. Only one
gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property topic
topic: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
interface TopicIAMMemberState
interface TopicIAMMemberStateInput properties used for looking up and filtering TopicIAMMember resources.
property condition
condition?: pulumi.Input<TopicIAMMemberCondition>;property etag
etag?: pulumi.Input<string>;(Computed) The etag of the IAM policy.
property member
member?: pulumi.Input<string>;property project
project?: pulumi.Input<string>;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.
property role
role?: pulumi.Input<string>;The role that should be applied. Only one
gcp.pubsub.TopicIAMBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property topic
topic?: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
interface TopicIAMPolicyArgs
interface TopicIAMPolicyArgsThe set of arguments for constructing a TopicIAMPolicy resource.
property policyData
policyData: pulumi.Input<string>;The policy data generated by
a gcp.organizations.getIAMPolicy data source.
property project
project?: pulumi.Input<string>;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.
property topic
topic: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
interface TopicIAMPolicyState
interface TopicIAMPolicyStateInput properties used for looking up and filtering TopicIAMPolicy resources.
property etag
etag?: pulumi.Input<string>;(Computed) The etag of the IAM policy.
property policyData
policyData?: pulumi.Input<string>;The policy data generated by
a gcp.organizations.getIAMPolicy data source.
property project
project?: pulumi.Input<string>;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.
property topic
topic?: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
interface TopicMessagePublishedArgs
interface TopicMessagePublishedArgsArguments to control how GCP will respond if the Cloud Function fails. Currently, the only specialized behavior supported is to attempt retrying the Cloud Function. See [cloudfunctions.FailurePolicy] for more information on this.
property failurePolicy
failurePolicy?: cloudfunctions.FailurePolicy;interface TopicState
interface TopicStateInput properties used for looking up and filtering Topic resources.
property kmsKeyName
kmsKeyName?: pulumi.Input<string>;The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic. Your project’s PubSub service account
(service-{{PROJECT_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
roles/cloudkms.cryptoKeyEncrypterDecrypter to use this feature.
The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/*
property labels
labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A set of key/value label pairs to assign to this Topic.
property messageStoragePolicy
messageStoragePolicy?: pulumi.Input<TopicMessageStoragePolicy>;Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. Structure is documented below.
property name
name?: pulumi.Input<string>;Name of the topic.
property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the provider project is used.