SubscriptionArgs class
The set of arguments for Subscription. The set of arguments for Subscription.
Constructors
-
SubscriptionArgs({Input<
int?> ? ackDeadlineSeconds, Input<SubscriptionBigqueryConfig?> ? bigqueryConfig, Input<SubscriptionCloudStorageConfig?> ? cloudStorageConfig, Input<SubscriptionDeadLetterPolicy?> ? deadLetterPolicy, Input<String?> ? deletionPolicy, Input<bool?> ? enableExactlyOnceDelivery, Input<bool?> ? enableMessageOrdering, Input<SubscriptionExpirationPolicy?> ? expirationPolicy, Input<String?> ? filter, Input<Map< ? labels, Input<String, String> ?>String?> ? messageRetentionDuration, Input<List< ? messageTransforms, Input<SubscriptionMessageTransform> ?>String?> ? name, Input<String?> ? project, Input<SubscriptionPushConfig?> ? pushConfig, Input<bool?> ? retainAckedMessages, Input<SubscriptionRetryPolicy?> ? retryPolicy, Input<Map< ? tags, required Input<String, String> ?>String> topic}) -
Creates a new SubscriptionArgs.
ackDeadlineSecondsThis value is the maximum time after a subscriber receives a messagebigqueryConfigIf delivery to BigQuery is used with this subscription, this field is used to configure it.cloudStorageConfigIf delivery to Cloud Storage is used with this subscription, this field is used to configure it.deadLetterPolicyA policy that specifies the conditions for dead lettering messages indeletionPolicyWhether Terraform will be prevented from destroying the resource. Defaults to DELETE.enableExactlyOnceDeliveryIftrue, Pub/Sub provides the following guarantees for the deliveryenableMessageOrderingIftrue, messages published with the same orderingKey in PubsubMessage will be delivered toexpirationPolicyA policy that specifies the conditions for this subscription's expiration.filterThe subscription only delivers the messages that match the filter.labelsA set of key/value label pairs to assign to this Subscription.messageRetentionDurationHow long to retain unacknowledged messages in the subscription'smessageTransformsTransforms to be applied to messages published to the topic. Transforms are applied in thenameName of the subscription.projectThe ID of the project in which the resource belongs.pushConfigIf push delivery is used with this subscription, this field is used toretainAckedMessagesIndicates whether to retain acknowledged messages. Iftrue, thenretryPolicyA policy that specifies how Pub/Sub retries message delivery for this subscription.tagsInput only. Resource manager tags to be bound to the subscription. TagtopicA reference to a Topic resource, of the form projects/{project}/topics/{{name}}const -
SubscriptionArgs.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
ackDeadlineSeconds
→ Input<
int?> ? -
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.
final
-
bigqueryConfig
→ Input<
SubscriptionBigqueryConfig?> ? -
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.
final
-
cloudStorageConfig
→ Input<
SubscriptionCloudStorageConfig?> ? -
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.
final
-
deadLetterPolicy
→ Input<
SubscriptionDeadLetterPolicy?> ? -
A policy that specifies the conditions for dead lettering messages in
this subscription. If deadLetterPolicy 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.
final
-
deletionPolicy
→ Input<
String?> ? -
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
final
-
enableExactlyOnceDelivery
→ Input<
bool?> ? -
If
true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of messageId on this Subscriptions':final -
enableMessageOrdering
→ Input<
bool?> ? -
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.final -
expirationPolicy
→ Input<
SubscriptionExpirationPolicy?> ? -
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.
final
-
filter
→ Input<
String?> ? -
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.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
labels
→ Input<
Map< ?String, String> ?> -
A set of key/value label pairs to assign to this Subscription.
final
-
messageRetentionDuration
→ Input<
String?> ? -
How long to retain unacknowledged messages in the subscription's
backlog, from the moment a message is published. If
retainAckedMessages 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 31 days (
"2678400s") or less than 10 minutes ("600s"). A duration in seconds with up to nine fractional digits, terminated by 's'. Example:"600.5s".final -
messageTransforms
→ Input<
List< ?SubscriptionMessageTransform> ?> -
Transforms to be applied to messages published to the topic. Transforms are applied in the
order specified.
Structure is documented below.
final
-
name
→ Input<
String?> ? -
Name of the subscription.
final
-
project
→ Input<
String?> ? -
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
final
-
pushConfig
→ Input<
SubscriptionPushConfig?> ? -
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.
final
-
retainAckedMessages
→ Input<
bool?> ? -
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.final -
retryPolicy
→ Input<
SubscriptionRetryPolicy?> ? -
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.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Input only. Resource manager tags to be bound to the subscription. Tag
keys and values have the same definition as resource manager tags. Keys
must be in the format tagKeys/{tag_key_id}, and values are in the format
tagValues/456. The field is ignored when empty. The field is immutable and
causes resource replacement when mutated. This field is only set at create
time and modifying this field after creation will trigger recreation. To
apply tags to an existing resource, see the
gcp.tags.TagValueresource.final -
topic
→ Input<
String> -
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.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited