Class SubscriptionArgs


  • public final class SubscriptionArgs
    extends com.pulumi.resources.ResourceArgs
    • Method Detail

      • ackDeadlineSeconds

        public java.util.Optional<com.pulumi.core.Output<java.lang.Integer>> ackDeadlineSeconds()
        Returns:
        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.
      • bigqueryConfig

        public java.util.Optional<com.pulumi.core.Output<SubscriptionBigqueryConfigArgs>> bigqueryConfig()
        Returns:
        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.
      • cloudStorageConfig

        public java.util.Optional<com.pulumi.core.Output<SubscriptionCloudStorageConfigArgs>> cloudStorageConfig()
        Returns:
        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.
      • deadLetterPolicy

        public java.util.Optional<com.pulumi.core.Output<SubscriptionDeadLetterPolicyArgs>> deadLetterPolicy()
        Returns:
        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.
      • enableExactlyOnceDelivery

        public java.util.Optional<com.pulumi.core.Output<java.lang.Boolean>> enableExactlyOnceDelivery()
        Returns:
        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
      • enableMessageOrdering

        public java.util.Optional<com.pulumi.core.Output<java.lang.Boolean>> enableMessageOrdering()
        Returns:
        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.
      • expirationPolicy

        public java.util.Optional<com.pulumi.core.Output<SubscriptionExpirationPolicyArgs>> expirationPolicy()
        Returns:
        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.
      • filter

        public java.util.Optional<com.pulumi.core.Output<java.lang.String>> filter()
        Returns:
        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.
      • labels

        public java.util.Optional<com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>>> labels()
        Returns:
        A set of key/value label pairs to assign to this Subscription.
      • messageRetentionDuration

        public java.util.Optional<com.pulumi.core.Output<java.lang.String>> messageRetentionDuration()
        Returns:
        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"`.
      • name

        public java.util.Optional<com.pulumi.core.Output<java.lang.String>> name()
        Returns:
        Name of the subscription.
      • project

        public java.util.Optional<com.pulumi.core.Output<java.lang.String>> project()
        Returns:
        The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
      • pushConfig

        public java.util.Optional<com.pulumi.core.Output<SubscriptionPushConfigArgs>> pushConfig()
        Returns:
        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.
      • retainAckedMessages

        public java.util.Optional<com.pulumi.core.Output<java.lang.Boolean>> retainAckedMessages()
        Returns:
        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.
      • retryPolicy

        public java.util.Optional<com.pulumi.core.Output<SubscriptionRetryPolicyArgs>> retryPolicy()
        Returns:
        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.
      • topic

        public com.pulumi.core.Output<java.lang.String> topic()
        Returns:
        A reference to a Topic resource. ***