topic resource¶
Description¶
TopicResource is an SNS topic: a named publish/subscribe channel plus the attributes that govern delivery, encryption, access, and FIFO behavior. CreateTopic fixes the name and, for a FIFO topic, the FIFO flag; both are baked into the topic's ARN, so a change to either replaces the topic. Every other attribute is reconciled in place by Update through SetTopicAttributes.
The name is validated in code rather than by a constraint, since the allowed pattern depends on whether the topic is FIFO: a FIFO name must match ^[0-9A-Za-z_-]{1,251}.fifo$ and a standard name ^[0-9A-Za-z_-]{1,256}$.
Source: internal/service/sns/topic_rsrc.go:91
Example usage:
imports: {
aws-sns: 'github.com/cloudboss/unobin-library-aws//service/sns'
}
resources: {
example: aws-sns.topic {
# Set input fields here.
}
}
Inputs¶
name
string
fifo-topic
optional(boolean)
fifo-throughput-scope
optional(string)
content-based-deduplication
optional(boolean)
archive-policy
optional(string)
display-name
optional(string)
policy
optional(string)
delivery-policy
optional(string)
kms-master-key-id
optional(string)
signature-version
optional(string)
tracing-config
optional(string)
http-success-feedback-role-arn
optional(string)
http-success-feedback-sample-rate
optional(integer)
http-failure-feedback-role-arn
optional(string)
sqs-success-feedback-role-arn
optional(string)
sqs-success-feedback-sample-rate
optional(integer)
sqs-failure-feedback-role-arn
optional(string)
application-success-feedback-role-arn
optional(string)
application-success-feedback-sample-rate
optional(integer)
application-failure-feedback-role-arn
optional(string)
firehose-success-feedback-role-arn
optional(string)
firehose-success-feedback-sample-rate
optional(integer)
firehose-failure-feedback-role-arn
optional(string)
lambda-success-feedback-role-arn
optional(string)
lambda-success-feedback-sample-rate
optional(integer)
lambda-failure-feedback-role-arn
optional(string)
tags
optional(map(string))
Input Constraints¶
Archive policy rules
archive-policy requires fifo-topic to be true.
Rule logic
- When
input.archive-policy != null- Require
input.fifo-topic == true
Fifo throughput scope rules
fifo-throughput-scope requires fifo-topic to be true.
Rule logic
- When
input.fifo-throughput-scope != null- Require
input.fifo-topic == true
fifo-throughput-scope must be Topic or MessageGroup.
Rule logic
- When
input.fifo-throughput-scope != null- Require
input.fifo-throughput-scope == 'Topic'
|| input.fifo-throughput-scope == 'MessageGroup'
Content based deduplication rules
content-based-deduplication requires fifo-topic to be true.
Rule logic
- When
input.content-based-deduplication == true- Require
input.fifo-topic == true
Tracing config rules
tracing-config must be Active or PassThrough.
Rule logic
- When
input.tracing-config != null- Require
input.tracing-config == 'Active'
|| input.tracing-config == 'PassThrough'
Signature version rules
signature-version must be 1 or 2.
Rule logic
- When
input.signature-version != null- Require
input.signature-version == '1'
|| input.signature-version == '2'
Http success feedback sample rate rules
http-success-feedback-sample-rate must be between 0 and 100.
Rule logic
- When
input.http-success-feedback-sample-rate != null- Require
input.http-success-feedback-sample-rate >= 0
&& input.http-success-feedback-sample-rate <= 100
Sqs success feedback sample rate rules
sqs-success-feedback-sample-rate must be between 0 and 100.
Rule logic
- When
input.sqs-success-feedback-sample-rate != null- Require
input.sqs-success-feedback-sample-rate >= 0
&& input.sqs-success-feedback-sample-rate <= 100
Application success feedback sample rate rules
application-success-feedback-sample-rate must be between 0 and 100.
Rule logic
- When
input.application-success-feedback-sample-rate != null- Require
input.application-success-feedback-sample-rate >= 0
&& input.application-success-feedback-sample-rate <= 100
Firehose success feedback sample rate rules
firehose-success-feedback-sample-rate must be between 0 and 100.
Rule logic
- When
input.firehose-success-feedback-sample-rate != null- Require
input.firehose-success-feedback-sample-rate >= 0
&& input.firehose-success-feedback-sample-rate <= 100
Lambda success feedback sample rate rules
lambda-success-feedback-sample-rate must be between 0 and 100.
Rule logic
- When
input.lambda-success-feedback-sample-rate != null- Require
input.lambda-success-feedback-sample-rate >= 0
&& input.lambda-success-feedback-sample-rate <= 100
Outputs¶
arn
string
owner
string