All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.googlenative.pubsub.v1.inputs.DeadLetterPolicyArgs Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.googlenative.pubsub.v1.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Dead lettering is done on a best effort basis. The same message might be dead lettered multiple times. If validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail.
 * 
 */
public final class DeadLetterPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final DeadLetterPolicyArgs Empty = new DeadLetterPolicyArgs();

    /**
     * The name of the topic to which dead letter messages should be published. Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.
     * 
     */
    @Import(name="deadLetterTopic")
    private @Nullable Output deadLetterTopic;

    /**
     * @return The name of the topic to which dead letter messages should be published. Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.
     * 
     */
    public Optional> deadLetterTopic() {
        return Optional.ofNullable(this.deadLetterTopic);
    }

    /**
     * The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.
     * 
     */
    @Import(name="maxDeliveryAttempts")
    private @Nullable Output maxDeliveryAttempts;

    /**
     * @return The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.
     * 
     */
    public Optional> maxDeliveryAttempts() {
        return Optional.ofNullable(this.maxDeliveryAttempts);
    }

    private DeadLetterPolicyArgs() {}

    private DeadLetterPolicyArgs(DeadLetterPolicyArgs $) {
        this.deadLetterTopic = $.deadLetterTopic;
        this.maxDeliveryAttempts = $.maxDeliveryAttempts;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(DeadLetterPolicyArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private DeadLetterPolicyArgs $;

        public Builder() {
            $ = new DeadLetterPolicyArgs();
        }

        public Builder(DeadLetterPolicyArgs defaults) {
            $ = new DeadLetterPolicyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param deadLetterTopic The name of the topic to which dead letter messages should be published. Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.
         * 
         * @return builder
         * 
         */
        public Builder deadLetterTopic(@Nullable Output deadLetterTopic) {
            $.deadLetterTopic = deadLetterTopic;
            return this;
        }

        /**
         * @param deadLetterTopic The name of the topic to which dead letter messages should be published. Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.
         * 
         * @return builder
         * 
         */
        public Builder deadLetterTopic(String deadLetterTopic) {
            return deadLetterTopic(Output.of(deadLetterTopic));
        }

        /**
         * @param maxDeliveryAttempts The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.
         * 
         * @return builder
         * 
         */
        public Builder maxDeliveryAttempts(@Nullable Output maxDeliveryAttempts) {
            $.maxDeliveryAttempts = maxDeliveryAttempts;
            return this;
        }

        /**
         * @param maxDeliveryAttempts The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.
         * 
         * @return builder
         * 
         */
        public Builder maxDeliveryAttempts(Integer maxDeliveryAttempts) {
            return maxDeliveryAttempts(Output.of(maxDeliveryAttempts));
        }

        public DeadLetterPolicyArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy