Class PubsubSubscription.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.pubsub_subscription.PubsubSubscription.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<PubsubSubscription>
- Enclosing class:
- PubsubSubscription
@Stability(Stable) public static final class PubsubSubscription.Builder extends Object implements software.amazon.jsii.Builder<PubsubSubscription>
A fluent builder forPubsubSubscription.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PubsubSubscription.BuilderackDeadlineSeconds(Number ackDeadlineSeconds)This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message.PubsubSubscription.BuilderbigqueryConfig(PubsubSubscriptionBigqueryConfig bigqueryConfig)bigquery_config block.PubsubSubscriptionbuild()PubsubSubscription.BuildercloudStorageConfig(PubsubSubscriptionCloudStorageConfig cloudStorageConfig)cloud_storage_config block.PubsubSubscription.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)PubsubSubscription.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)PubsubSubscription.Buildercount(com.hashicorp.cdktf.TerraformCount count)PubsubSubscription.Buildercount(Number count)static PubsubSubscription.Buildercreate(software.constructs.Construct scope, String id)PubsubSubscription.BuilderdeadLetterPolicy(PubsubSubscriptionDeadLetterPolicy deadLetterPolicy)dead_letter_policy block.PubsubSubscription.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)PubsubSubscription.BuilderenableExactlyOnceDelivery(com.hashicorp.cdktf.IResolvable enableExactlyOnceDelivery)If 'true', Pub/Sub provides the following guarantees for the delivery of a message with a given value of messageId on this Subscriptions': - The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires.PubsubSubscription.BuilderenableExactlyOnceDelivery(Boolean enableExactlyOnceDelivery)If 'true', Pub/Sub provides the following guarantees for the delivery of a message with a given value of messageId on this Subscriptions': - The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires.PubsubSubscription.BuilderenableMessageOrdering(com.hashicorp.cdktf.IResolvable enableMessageOrdering)If 'true', messages published with the same orderingKey in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system.PubsubSubscription.BuilderenableMessageOrdering(Boolean enableMessageOrdering)If 'true', messages published with the same orderingKey in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system.PubsubSubscription.BuilderexpirationPolicy(PubsubSubscriptionExpirationPolicy expirationPolicy)expiration_policy block.PubsubSubscription.Builderfilter(String filter)The subscription only delivers the messages that match the filter.PubsubSubscription.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)PubsubSubscription.Builderid(String id)Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#id PubsubSubscription#id}.PubsubSubscription.Builderlabels(Map<String,String> labels)A set of key/value label pairs to assign to this Subscription.PubsubSubscription.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)PubsubSubscription.BuildermessageRetentionDuration(String messageRetentionDuration)How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published.PubsubSubscription.Buildername(String name)Name of the subscription.PubsubSubscription.Builderproject(String project)Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#project PubsubSubscription#project}.PubsubSubscription.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)PubsubSubscription.Builderprovisioners(List<? extends Object> provisioners)PubsubSubscription.BuilderpushConfig(PubsubSubscriptionPushConfig pushConfig)push_config block.PubsubSubscription.BuilderretainAckedMessages(com.hashicorp.cdktf.IResolvable retainAckedMessages)Indicates whether to retain acknowledged messages.PubsubSubscription.BuilderretainAckedMessages(Boolean retainAckedMessages)Indicates whether to retain acknowledged messages.PubsubSubscription.BuilderretryPolicy(PubsubSubscriptionRetryPolicy retryPolicy)retry_policy block.PubsubSubscription.Buildertimeouts(PubsubSubscriptionTimeouts timeouts)timeouts block.PubsubSubscription.Buildertopic(String topic)A reference to a Topic resource, of the form projects/{project}/topics/{{name}} (as in the id property of a google_pubsub_topic), or just a topic name if the topic is in the same project as the subscription.
-
-
-
Method Detail
-
create
@Stability(Stable) public static PubsubSubscription.Builder create(software.constructs.Construct scope, String id)
- Parameters:
scope- The scope in which to define this construct. This parameter is required.id- The scoped construct ID. This parameter is required.- Returns:
- a new instance of
PubsubSubscription.Builder.
-
connection
@Stability(Experimental) public PubsubSubscription.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
- Parameters:
connection- This parameter is required.- Returns:
this
-
connection
@Stability(Experimental) public PubsubSubscription.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
- Parameters:
connection- This parameter is required.- Returns:
this
-
count
@Stability(Experimental) public PubsubSubscription.Builder count(Number count)
- Parameters:
count- This parameter is required.- Returns:
this
-
count
@Stability(Experimental) public PubsubSubscription.Builder count(com.hashicorp.cdktf.TerraformCount count)
- Parameters:
count- This parameter is required.- Returns:
this
-
dependsOn
@Stability(Experimental) public PubsubSubscription.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
- Parameters:
dependsOn- This parameter is required.- Returns:
this
-
forEach
@Stability(Experimental) public PubsubSubscription.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
- Parameters:
forEach- This parameter is required.- Returns:
this
-
lifecycle
@Stability(Experimental) public PubsubSubscription.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
- Parameters:
lifecycle- This parameter is required.- Returns:
this
-
provider
@Stability(Experimental) public PubsubSubscription.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
- Parameters:
provider- This parameter is required.- Returns:
this
-
provisioners
@Stability(Experimental) public PubsubSubscription.Builder provisioners(List<? extends Object> provisioners)
- Parameters:
provisioners- This parameter is required.- Returns:
this
-
name
@Stability(Stable) public PubsubSubscription.Builder name(String name)
Name of the subscription.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#name PubsubSubscription#name}
- Parameters:
name- Name of the subscription. This parameter is required.- Returns:
this
-
topic
@Stability(Stable) public PubsubSubscription.Builder topic(String topic)
A reference to a Topic resource, of the form projects/{project}/topics/{{name}} (as in the id property of a google_pubsub_topic), or just a topic name if the topic is in the same project as the subscription.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#topic PubsubSubscription#topic}
- Parameters:
topic- A reference to a Topic resource, of the form projects/{project}/topics/{{name}} (as in the id property of a google_pubsub_topic), or just a topic name if the topic is in the same project as the subscription. This parameter is required.- Returns:
this
-
ackDeadlineSeconds
@Stability(Stable) public PubsubSubscription.Builder ackDeadlineSeconds(Number ackDeadlineSeconds)
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. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#ack_deadline_seconds PubsubSubscription#ack_deadline_seconds}
- Parameters:
ackDeadlineSeconds- This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. This parameter is required.- Returns:
this
-
bigqueryConfig
@Stability(Stable) public PubsubSubscription.Builder bigqueryConfig(PubsubSubscriptionBigqueryConfig bigqueryConfig)
bigquery_config block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#bigquery_config PubsubSubscription#bigquery_config}
- Parameters:
bigqueryConfig- bigquery_config block. This parameter is required.- Returns:
this
-
cloudStorageConfig
@Stability(Stable) public PubsubSubscription.Builder cloudStorageConfig(PubsubSubscriptionCloudStorageConfig cloudStorageConfig)
cloud_storage_config block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#cloud_storage_config PubsubSubscription#cloud_storage_config}
- Parameters:
cloudStorageConfig- cloud_storage_config block. This parameter is required.- Returns:
this
-
deadLetterPolicy
@Stability(Stable) public PubsubSubscription.Builder deadLetterPolicy(PubsubSubscriptionDeadLetterPolicy deadLetterPolicy)
dead_letter_policy block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#dead_letter_policy PubsubSubscription#dead_letter_policy}
- Parameters:
deadLetterPolicy- dead_letter_policy block. This parameter is required.- Returns:
this
-
enableExactlyOnceDelivery
@Stability(Stable) public PubsubSubscription.Builder enableExactlyOnceDelivery(Boolean enableExactlyOnceDelivery)
If 'true', Pub/Sub provides the following guarantees for the delivery of a message with a given value of messageId on this Subscriptions': - The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires.* An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when 'enable_exactly_once_delivery' is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct messageId values Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#enable_exactly_once_delivery PubsubSubscription#enable_exactly_once_delivery}
- Parameters:
enableExactlyOnceDelivery- If 'true', Pub/Sub provides the following guarantees for the delivery of a message with a given value of messageId on this Subscriptions': - The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires. This parameter is required.- Returns:
this
-
enableExactlyOnceDelivery
@Stability(Stable) public PubsubSubscription.Builder enableExactlyOnceDelivery(com.hashicorp.cdktf.IResolvable enableExactlyOnceDelivery)
If 'true', Pub/Sub provides the following guarantees for the delivery of a message with a given value of messageId on this Subscriptions': - The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires.* An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when 'enable_exactly_once_delivery' is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct messageId values Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#enable_exactly_once_delivery PubsubSubscription#enable_exactly_once_delivery}
- Parameters:
enableExactlyOnceDelivery- If 'true', Pub/Sub provides the following guarantees for the delivery of a message with a given value of messageId on this Subscriptions': - The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires. This parameter is required.- Returns:
this
-
enableMessageOrdering
@Stability(Stable) public PubsubSubscription.Builder enableMessageOrdering(Boolean enableMessageOrdering)
If 'true', messages published with the same orderingKey in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system.Otherwise, they may be delivered in any order. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#enable_message_ordering PubsubSubscription#enable_message_ordering}
- Parameters:
enableMessageOrdering- If 'true', messages published with the same orderingKey in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. This parameter is required.- Returns:
this
-
enableMessageOrdering
@Stability(Stable) public PubsubSubscription.Builder enableMessageOrdering(com.hashicorp.cdktf.IResolvable enableMessageOrdering)
If 'true', messages published with the same orderingKey in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system.Otherwise, they may be delivered in any order. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#enable_message_ordering PubsubSubscription#enable_message_ordering}
- Parameters:
enableMessageOrdering- If 'true', messages published with the same orderingKey in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. This parameter is required.- Returns:
this
-
expirationPolicy
@Stability(Stable) public PubsubSubscription.Builder expirationPolicy(PubsubSubscriptionExpirationPolicy expirationPolicy)
expiration_policy block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#expiration_policy PubsubSubscription#expiration_policy}
- Parameters:
expirationPolicy- expiration_policy block. This parameter is required.- Returns:
this
-
filter
@Stability(Stable) public PubsubSubscription.Builder filter(String filter)
The subscription only delivers the messages that match the filter.Pub/Sub automatically acknowledges the messages that don't match the filter. You can filter messages by their attributes. The maximum length of a filter is 256 bytes. After creating the subscription, you can't modify the filter. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#filter PubsubSubscription#filter}
- Parameters:
filter- The subscription only delivers the messages that match the filter. This parameter is required.- Returns:
this
-
id
@Stability(Stable) public PubsubSubscription.Builder id(String id)
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#id PubsubSubscription#id}.Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.
- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#id PubsubSubscription#id}. This parameter is required.- Returns:
this
-
labels
@Stability(Stable) public PubsubSubscription.Builder labels(Map<String,String> labels)
A set of key/value label pairs to assign to this Subscription.**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#labels PubsubSubscription#labels}
- Parameters:
labels- A set of key/value label pairs to assign to this Subscription. This parameter is required.- Returns:
this
-
messageRetentionDuration
@Stability(Stable) public PubsubSubscription.Builder messageRetentionDuration(String messageRetentionDuration)
How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published.If retain_acked_messages 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"'. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#message_retention_duration PubsubSubscription#message_retention_duration}
- Parameters:
messageRetentionDuration- How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. This parameter is required.- Returns:
this
-
project
@Stability(Stable) public PubsubSubscription.Builder project(String project)
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#project PubsubSubscription#project}.- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#project PubsubSubscription#project}. This parameter is required.- Returns:
this
-
pushConfig
@Stability(Stable) public PubsubSubscription.Builder pushConfig(PubsubSubscriptionPushConfig pushConfig)
push_config block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#push_config PubsubSubscription#push_config}
- Parameters:
pushConfig- push_config block. This parameter is required.- Returns:
this
-
retainAckedMessages
@Stability(Stable) public PubsubSubscription.Builder retainAckedMessages(Boolean retainAckedMessages)
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. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#retain_acked_messages PubsubSubscription#retain_acked_messages}
- Parameters:
retainAckedMessages- Indicates whether to retain acknowledged messages. This parameter is required.- Returns:
this
-
retainAckedMessages
@Stability(Stable) public PubsubSubscription.Builder retainAckedMessages(com.hashicorp.cdktf.IResolvable retainAckedMessages)
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. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#retain_acked_messages PubsubSubscription#retain_acked_messages}
- Parameters:
retainAckedMessages- Indicates whether to retain acknowledged messages. This parameter is required.- Returns:
this
-
retryPolicy
@Stability(Stable) public PubsubSubscription.Builder retryPolicy(PubsubSubscriptionRetryPolicy retryPolicy)
retry_policy block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#retry_policy PubsubSubscription#retry_policy}
- Parameters:
retryPolicy- retry_policy block. This parameter is required.- Returns:
this
-
timeouts
@Stability(Stable) public PubsubSubscription.Builder timeouts(PubsubSubscriptionTimeouts timeouts)
timeouts block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#timeouts PubsubSubscription#timeouts}
- Parameters:
timeouts- timeouts block. This parameter is required.- Returns:
this
-
build
@Stability(Stable) public PubsubSubscription build()
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PubsubSubscription>- Returns:
- a newly built instance of
PubsubSubscription.
-
-