Package com.pulumi.gcp.pubsub
Class SubscriptionArgs.Builder
- java.lang.Object
-
- com.pulumi.gcp.pubsub.SubscriptionArgs.Builder
-
- Enclosing class:
- SubscriptionArgs
public static final class SubscriptionArgs.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
Builder(SubscriptionArgs defaults)
-
Method Summary
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(SubscriptionArgs defaults)
-
-
Method Detail
-
ackDeadlineSeconds
public SubscriptionArgs.Builder ackDeadlineSeconds(@Nullable com.pulumi.core.Output<java.lang.Integer> ackDeadlineSeconds)
- 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.- Returns:
- builder
-
ackDeadlineSeconds
public SubscriptionArgs.Builder ackDeadlineSeconds(java.lang.Integer ackDeadlineSeconds)
- 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.- Returns:
- builder
-
bigqueryConfig
public SubscriptionArgs.Builder bigqueryConfig(@Nullable com.pulumi.core.Output<SubscriptionBigqueryConfigArgs> bigqueryConfig)
- Parameters:
bigqueryConfig
- If delivery to BigQuery is used with this subscription, this field is used to configure it. Either pushConfig, bigQueryConfig or cloudStorageConfig can be set, but not combined. If all three are empty, then the subscriber will pull and ack messages using API methods. Structure is documented below.- Returns:
- builder
-
bigqueryConfig
public SubscriptionArgs.Builder bigqueryConfig(SubscriptionBigqueryConfigArgs bigqueryConfig)
- Parameters:
bigqueryConfig
- If delivery to BigQuery is used with this subscription, this field is used to configure it. Either pushConfig, bigQueryConfig or cloudStorageConfig can be set, but not combined. If all three are empty, then the subscriber will pull and ack messages using API methods. Structure is documented below.- Returns:
- builder
-
cloudStorageConfig
public SubscriptionArgs.Builder cloudStorageConfig(@Nullable com.pulumi.core.Output<SubscriptionCloudStorageConfigArgs> cloudStorageConfig)
- Parameters:
cloudStorageConfig
- If delivery to Cloud Storage is used with this subscription, this field is used to configure it. Either pushConfig, bigQueryConfig or cloudStorageConfig can be set, but not combined. If all three are empty, then the subscriber will pull and ack messages using API methods. Structure is documented below.- Returns:
- builder
-
cloudStorageConfig
public SubscriptionArgs.Builder cloudStorageConfig(SubscriptionCloudStorageConfigArgs cloudStorageConfig)
- Parameters:
cloudStorageConfig
- If delivery to Cloud Storage is used with this subscription, this field is used to configure it. Either pushConfig, bigQueryConfig or cloudStorageConfig can be set, but not combined. If all three are empty, then the subscriber will pull and ack messages using API methods. Structure is documented below.- Returns:
- builder
-
deadLetterPolicy
public SubscriptionArgs.Builder deadLetterPolicy(@Nullable com.pulumi.core.Output<SubscriptionDeadLetterPolicyArgs> deadLetterPolicy)
- Parameters:
deadLetterPolicy
- A policy that specifies the conditions for dead lettering messages in this subscription. If dead_letter_policy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscription'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.- Returns:
- builder
-
deadLetterPolicy
public SubscriptionArgs.Builder deadLetterPolicy(SubscriptionDeadLetterPolicyArgs deadLetterPolicy)
- Parameters:
deadLetterPolicy
- A policy that specifies the conditions for dead lettering messages in this subscription. If dead_letter_policy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscription'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.- Returns:
- builder
-
enableExactlyOnceDelivery
public SubscriptionArgs.Builder enableExactlyOnceDelivery(@Nullable com.pulumi.core.Output<java.lang.Boolean> enableExactlyOnceDelivery)
- 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- Returns:
- builder
-
enableExactlyOnceDelivery
public SubscriptionArgs.Builder enableExactlyOnceDelivery(java.lang.Boolean enableExactlyOnceDelivery)
- 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- Returns:
- builder
-
enableMessageOrdering
public SubscriptionArgs.Builder enableMessageOrdering(@Nullable com.pulumi.core.Output<java.lang.Boolean> enableMessageOrdering)
- 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.- Returns:
- builder
-
enableMessageOrdering
public SubscriptionArgs.Builder enableMessageOrdering(java.lang.Boolean enableMessageOrdering)
- 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.- Returns:
- builder
-
expirationPolicy
public SubscriptionArgs.Builder expirationPolicy(@Nullable com.pulumi.core.Output<SubscriptionExpirationPolicyArgs> expirationPolicy)
- Parameters:
expirationPolicy
- 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.- Returns:
- builder
-
expirationPolicy
public SubscriptionArgs.Builder expirationPolicy(SubscriptionExpirationPolicyArgs expirationPolicy)
- Parameters:
expirationPolicy
- 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.- Returns:
- builder
-
filter
public SubscriptionArgs.Builder filter(@Nullable com.pulumi.core.Output<java.lang.String> filter)
- 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.- Returns:
- builder
-
filter
public SubscriptionArgs.Builder filter(java.lang.String filter)
- 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.- Returns:
- builder
-
labels
public SubscriptionArgs.Builder labels(@Nullable com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> labels)
- 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.- Returns:
- builder
-
labels
public SubscriptionArgs.Builder labels(java.util.Map<java.lang.String,java.lang.String> labels)
- 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.- Returns:
- builder
-
messageRetentionDuration
public SubscriptionArgs.Builder messageRetentionDuration(@Nullable com.pulumi.core.Output<java.lang.String> messageRetentionDuration)
- 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"`.- Returns:
- builder
-
messageRetentionDuration
public SubscriptionArgs.Builder messageRetentionDuration(java.lang.String messageRetentionDuration)
- 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"`.- Returns:
- builder
-
name
public SubscriptionArgs.Builder name(@Nullable com.pulumi.core.Output<java.lang.String> name)
- Parameters:
name
- Name of the subscription.- Returns:
- builder
-
name
public SubscriptionArgs.Builder name(java.lang.String name)
- Parameters:
name
- Name of the subscription.- Returns:
- builder
-
project
public SubscriptionArgs.Builder project(@Nullable com.pulumi.core.Output<java.lang.String> project)
- Parameters:
project
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.- Returns:
- builder
-
project
public SubscriptionArgs.Builder project(java.lang.String project)
- Parameters:
project
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.- Returns:
- builder
-
pushConfig
public SubscriptionArgs.Builder pushConfig(@Nullable com.pulumi.core.Output<SubscriptionPushConfigArgs> pushConfig)
- Parameters:
pushConfig
- 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.- Returns:
- builder
-
pushConfig
public SubscriptionArgs.Builder pushConfig(SubscriptionPushConfigArgs pushConfig)
- Parameters:
pushConfig
- 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.- Returns:
- builder
-
retainAckedMessages
public SubscriptionArgs.Builder retainAckedMessages(@Nullable com.pulumi.core.Output<java.lang.Boolean> retainAckedMessages)
- 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.- Returns:
- builder
-
retainAckedMessages
public SubscriptionArgs.Builder retainAckedMessages(java.lang.Boolean retainAckedMessages)
- 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.- Returns:
- builder
-
retryPolicy
public SubscriptionArgs.Builder retryPolicy(@Nullable com.pulumi.core.Output<SubscriptionRetryPolicyArgs> retryPolicy)
- Parameters:
retryPolicy
- A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message Structure is documented below.- Returns:
- builder
-
retryPolicy
public SubscriptionArgs.Builder retryPolicy(SubscriptionRetryPolicyArgs retryPolicy)
- Parameters:
retryPolicy
- A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message Structure is documented below.- Returns:
- builder
-
topic
public SubscriptionArgs.Builder topic(com.pulumi.core.Output<java.lang.String> topic)
- Parameters:
topic
- A reference to a Topic resource. ***- Returns:
- builder
-
topic
public SubscriptionArgs.Builder topic(java.lang.String topic)
- Parameters:
topic
- A reference to a Topic resource. ***- Returns:
- builder
-
build
public SubscriptionArgs build()
-
-