Class PubsubSubscriptionConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.pubsub_subscription.PubsubSubscriptionConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<PubsubSubscriptionConfig>
- Enclosing interface:
- PubsubSubscriptionConfig
@Stability(Stable) public static final class PubsubSubscriptionConfig.Builder extends Object implements software.amazon.jsii.Builder<PubsubSubscriptionConfig>
A builder forPubsubSubscriptionConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Stable) public PubsubSubscriptionConfig.Builder name(String name)
Sets the value ofPubsubSubscriptionConfig.getName()- Parameters:
name- Name of the subscription. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#name PubsubSubscription#name}- Returns:
this
-
topic
@Stability(Stable) public PubsubSubscriptionConfig.Builder topic(String topic)
Sets the value ofPubsubSubscriptionConfig.getTopic()- 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. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#topic PubsubSubscription#topic}- Returns:
this
-
ackDeadlineSeconds
@Stability(Stable) public PubsubSubscriptionConfig.Builder ackDeadlineSeconds(Number ackDeadlineSeconds)
Sets the value ofPubsubSubscriptionConfig.getAckDeadlineSeconds()- Parameters:
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}- Returns:
this
-
bigqueryConfig
@Stability(Stable) public PubsubSubscriptionConfig.Builder bigqueryConfig(PubsubSubscriptionBigqueryConfig bigqueryConfig)
Sets the value ofPubsubSubscriptionConfig.getBigqueryConfig()- Parameters:
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}- Returns:
this
-
cloudStorageConfig
@Stability(Stable) public PubsubSubscriptionConfig.Builder cloudStorageConfig(PubsubSubscriptionCloudStorageConfig cloudStorageConfig)
Sets the value ofPubsubSubscriptionConfig.getCloudStorageConfig()- Parameters:
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}- Returns:
this
-
deadLetterPolicy
@Stability(Stable) public PubsubSubscriptionConfig.Builder deadLetterPolicy(PubsubSubscriptionDeadLetterPolicy deadLetterPolicy)
Sets the value ofPubsubSubscriptionConfig.getDeadLetterPolicy()- Parameters:
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}- Returns:
this
-
enableExactlyOnceDelivery
@Stability(Stable) public PubsubSubscriptionConfig.Builder enableExactlyOnceDelivery(Boolean enableExactlyOnceDelivery)
Sets the value ofPubsubSubscriptionConfig.getEnableExactlyOnceDelivery()- 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. * 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}- Returns:
this
-
enableExactlyOnceDelivery
@Stability(Stable) public PubsubSubscriptionConfig.Builder enableExactlyOnceDelivery(com.hashicorp.cdktf.IResolvable enableExactlyOnceDelivery)
Sets the value ofPubsubSubscriptionConfig.getEnableExactlyOnceDelivery()- 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. * 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}- Returns:
this
-
enableMessageOrdering
@Stability(Stable) public PubsubSubscriptionConfig.Builder enableMessageOrdering(Boolean enableMessageOrdering)
Sets the value ofPubsubSubscriptionConfig.getEnableMessageOrdering()- 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. 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}- Returns:
this
-
enableMessageOrdering
@Stability(Stable) public PubsubSubscriptionConfig.Builder enableMessageOrdering(com.hashicorp.cdktf.IResolvable enableMessageOrdering)
Sets the value ofPubsubSubscriptionConfig.getEnableMessageOrdering()- 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. 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}- Returns:
this
-
expirationPolicy
@Stability(Stable) public PubsubSubscriptionConfig.Builder expirationPolicy(PubsubSubscriptionExpirationPolicy expirationPolicy)
Sets the value ofPubsubSubscriptionConfig.getExpirationPolicy()- Parameters:
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}- Returns:
this
-
filter
@Stability(Stable) public PubsubSubscriptionConfig.Builder filter(String filter)
Sets the value ofPubsubSubscriptionConfig.getFilter()- Parameters:
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}- Returns:
this
-
id
@Stability(Stable) public PubsubSubscriptionConfig.Builder id(String id)
Sets the value ofPubsubSubscriptionConfig.getId()- Parameters:
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.- Returns:
this
-
labels
@Stability(Stable) public PubsubSubscriptionConfig.Builder labels(Map<String,String> labels)
Sets the value ofPubsubSubscriptionConfig.getLabels()- Parameters:
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}- Returns:
this
-
messageRetentionDuration
@Stability(Stable) public PubsubSubscriptionConfig.Builder messageRetentionDuration(String messageRetentionDuration)
Sets the value ofPubsubSubscriptionConfig.getMessageRetentionDuration()- Parameters:
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}- Returns:
this
-
project
@Stability(Stable) public PubsubSubscriptionConfig.Builder project(String project)
Sets the value ofPubsubSubscriptionConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/pubsub_subscription#project PubsubSubscription#project}.- Returns:
this
-
pushConfig
@Stability(Stable) public PubsubSubscriptionConfig.Builder pushConfig(PubsubSubscriptionPushConfig pushConfig)
Sets the value ofPubsubSubscriptionConfig.getPushConfig()- Parameters:
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}- Returns:
this
-
retainAckedMessages
@Stability(Stable) public PubsubSubscriptionConfig.Builder retainAckedMessages(Boolean retainAckedMessages)
Sets the value ofPubsubSubscriptionConfig.getRetainAckedMessages()- Parameters:
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}- Returns:
this
-
retainAckedMessages
@Stability(Stable) public PubsubSubscriptionConfig.Builder retainAckedMessages(com.hashicorp.cdktf.IResolvable retainAckedMessages)
Sets the value ofPubsubSubscriptionConfig.getRetainAckedMessages()- Parameters:
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}- Returns:
this
-
retryPolicy
@Stability(Stable) public PubsubSubscriptionConfig.Builder retryPolicy(PubsubSubscriptionRetryPolicy retryPolicy)
Sets the value ofPubsubSubscriptionConfig.getRetryPolicy()- Parameters:
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}- Returns:
this
-
timeouts
@Stability(Stable) public PubsubSubscriptionConfig.Builder timeouts(PubsubSubscriptionTimeouts timeouts)
Sets the value ofPubsubSubscriptionConfig.getTimeouts()- Parameters:
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}- Returns:
this
-
connection
@Stability(Experimental) public PubsubSubscriptionConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
connection
@Stability(Experimental) public PubsubSubscriptionConfig.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public PubsubSubscriptionConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public PubsubSubscriptionConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
dependsOn
@Stability(Experimental) public PubsubSubscriptionConfig.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
Sets the value ofTerraformMetaArguments.getDependsOn()- Parameters:
dependsOn- the value to be set.- Returns:
this
-
forEach
@Stability(Experimental) public PubsubSubscriptionConfig.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
Sets the value ofTerraformMetaArguments.getForEach()- Parameters:
forEach- the value to be set.- Returns:
this
-
lifecycle
@Stability(Experimental) public PubsubSubscriptionConfig.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
Sets the value ofTerraformMetaArguments.getLifecycle()- Parameters:
lifecycle- the value to be set.- Returns:
this
-
provider
@Stability(Experimental) public PubsubSubscriptionConfig.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
Sets the value ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public PubsubSubscriptionConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public PubsubSubscriptionConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PubsubSubscriptionConfig>- Returns:
- a new instance of
PubsubSubscriptionConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-