aws_sdk_sns/operation/create_topic/_create_topic_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Input for CreateTopic action.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateTopicInput {
7 /// <p>The name of the topic you want to create.</p>
8 /// <p>Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.</p>
9 /// <p>For a FIFO (first-in-first-out) topic, the name must end with the <code>.fifo</code> suffix.</p>
10 pub name: ::std::option::Option<::std::string::String>,
11 /// <p>A map of attributes with their corresponding values.</p>
12 /// <p>The following lists names, descriptions, and values of the special request parameters that the <code>CreateTopic</code> action uses:</p>
13 /// <ul>
14 /// <li>
15 /// <p><code>DeliveryPolicy</code> – The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints.</p></li>
16 /// <li>
17 /// <p><code>DisplayName</code> – The display name to use for a topic with SMS subscriptions.</p></li>
18 /// <li>
19 /// <p><code>Policy</code> – The policy that defines who can access your topic. By default, only the topic owner can publish or subscribe to the topic.</p></li>
20 /// <li>
21 /// <p><code>TracingConfig</code> – Tracing mode of an Amazon SNS topic. By default <code>TracingConfig</code> is set to <code>PassThrough</code>, and the topic passes through the tracing header it receives from an Amazon SNS publisher to its subscriptions. If set to <code>Active</code>, Amazon SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true. This is only supported on standard topics.</p></li>
22 /// <li>
23 /// <p>HTTP</p>
24 /// <ul>
25 /// <li>
26 /// <p><code>HTTPSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
27 /// <li>
28 /// <p><code>HTTPSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
29 /// <li>
30 /// <p><code>HTTPFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
31 /// </ul></li>
32 /// <li>
33 /// <p>Amazon Data Firehose</p>
34 /// <ul>
35 /// <li>
36 /// <p><code>FirehoseSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
37 /// <li>
38 /// <p><code>FirehoseSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
39 /// <li>
40 /// <p><code>FirehoseFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
41 /// </ul></li>
42 /// <li>
43 /// <p>Lambda</p>
44 /// <ul>
45 /// <li>
46 /// <p><code>LambdaSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
47 /// <li>
48 /// <p><code>LambdaSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
49 /// <li>
50 /// <p><code>LambdaFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
51 /// </ul></li>
52 /// <li>
53 /// <p>Platform application endpoint</p>
54 /// <ul>
55 /// <li>
56 /// <p><code>ApplicationSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to a platform application endpoint.</p></li>
57 /// <li>
58 /// <p><code>ApplicationSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an platform application endpoint.</p></li>
59 /// <li>
60 /// <p><code>ApplicationFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an platform application endpoint.</p></li>
61 /// </ul><note>
62 /// <p>In addition to being able to configure topic attributes for message delivery status of notification messages sent to Amazon SNS application endpoints, you can also configure application attributes for the delivery status of push notification messages sent to push notification services.</p>
63 /// <p>For example, For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html">Using Amazon SNS Application Attributes for Message Delivery Status</a>.</p>
64 /// </note></li>
65 /// <li>
66 /// <p>Amazon SQS</p>
67 /// <ul>
68 /// <li>
69 /// <p><code>SQSSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
70 /// <li>
71 /// <p><code>SQSSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
72 /// <li>
73 /// <p><code>SQSFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
74 /// </ul></li>
75 /// </ul><note>
76 /// <p>The <endpoint>
77 /// SuccessFeedbackRoleArn and
78 /// <endpoint>
79 /// FailureFeedbackRoleArn attributes are used to give Amazon SNS write access to use CloudWatch Logs on your behalf. The
80 /// <endpoint>
81 /// SuccessFeedbackSampleRate attribute is for specifying the sample rate percentage (0-100) of successfully delivered messages. After you configure the
82 /// <endpoint>
83 /// FailureFeedbackRoleArn attribute, then all failed message deliveries generate CloudWatch Logs.
84 /// </endpoint>
85 /// </endpoint>
86 /// </endpoint>
87 /// </endpoint></p>
88 /// </note>
89 /// <p>The following attribute applies only to <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html">server-side encryption</a>:</p>
90 /// <ul>
91 /// <li>
92 /// <p><code>KmsMasterKeyId</code> – The ID of an Amazon Web Services managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms">Key Terms</a>. For more examples, see <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters">KeyId</a> in the <i>Key Management Service API Reference</i>.</p></li>
93 /// </ul>
94 /// <p>The following attributes apply only to <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html">FIFO topics</a>:</p>
95 /// <ul>
96 /// <li>
97 /// <p><code>ArchivePolicy</code> – The policy that sets the retention period for messages stored in the message archive of an Amazon SNS FIFO topic.</p></li>
98 /// <li>
99 /// <p><code>ContentBasedDeduplication</code> – Enables content-based deduplication for FIFO topics.</p>
100 /// <ul>
101 /// <li>
102 /// <p>By default, <code>ContentBasedDeduplication</code> is set to <code>false</code>. If you create a FIFO topic and this attribute is <code>false</code>, you must specify a value for the <code>MessageDeduplicationId</code> parameter for the <a href="https://docs.aws.amazon.com/sns/latest/api/API_Publish.html">Publish</a> action.</p></li>
103 /// <li>
104 /// <p>When you set <code>ContentBasedDeduplication</code> to <code>true</code>, Amazon SNS uses a SHA-256 hash to generate the <code>MessageDeduplicationId</code> using the body of the message (but not the attributes of the message).</p>
105 /// <p>(Optional) To override the generated value, you can specify a value for the <code>MessageDeduplicationId</code> parameter for the <code>Publish</code> action.</p></li>
106 /// </ul></li>
107 /// </ul>
108 /// <ul>
109 /// <li>
110 /// <p><code>FifoThroughputScope</code> – Enables higher throughput for your FIFO topic by adjusting the scope of deduplication. This attribute has two possible values:</p>
111 /// <ul>
112 /// <li>
113 /// <p><code>Topic</code> – The scope of message deduplication is across the entire topic. This is the default value and maintains existing behavior, with a maximum throughput of 3000 messages per second or 20MB per second, whichever comes first.</p></li>
114 /// <li>
115 /// <p><code>MessageGroup</code> – The scope of deduplication is within each individual message group, which enables higher throughput per topic subject to regional quotas. For more information on quotas or to request an increase, see <a href="https://docs.aws.amazon.com/general/latest/gr/sns.html">Amazon SNS service quotas</a> in the Amazon Web Services General Reference.</p></li>
116 /// </ul></li>
117 /// </ul>
118 pub attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
119 /// <p>The list of tags to add to a new topic.</p><note>
120 /// <p>To be able to tag a topic on creation, you must have the <code>sns:CreateTopic</code> and <code>sns:TagResource</code> permissions.</p>
121 /// </note>
122 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
123 /// <p>The body of the policy document you want to use for this topic.</p>
124 /// <p>You can only add one policy per topic.</p>
125 /// <p>The policy must be in JSON string format.</p>
126 /// <p>Length Constraints: Maximum length of 30,720.</p>
127 pub data_protection_policy: ::std::option::Option<::std::string::String>,
128}
129impl CreateTopicInput {
130 /// <p>The name of the topic you want to create.</p>
131 /// <p>Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.</p>
132 /// <p>For a FIFO (first-in-first-out) topic, the name must end with the <code>.fifo</code> suffix.</p>
133 pub fn name(&self) -> ::std::option::Option<&str> {
134 self.name.as_deref()
135 }
136 /// <p>A map of attributes with their corresponding values.</p>
137 /// <p>The following lists names, descriptions, and values of the special request parameters that the <code>CreateTopic</code> action uses:</p>
138 /// <ul>
139 /// <li>
140 /// <p><code>DeliveryPolicy</code> – The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints.</p></li>
141 /// <li>
142 /// <p><code>DisplayName</code> – The display name to use for a topic with SMS subscriptions.</p></li>
143 /// <li>
144 /// <p><code>Policy</code> – The policy that defines who can access your topic. By default, only the topic owner can publish or subscribe to the topic.</p></li>
145 /// <li>
146 /// <p><code>TracingConfig</code> – Tracing mode of an Amazon SNS topic. By default <code>TracingConfig</code> is set to <code>PassThrough</code>, and the topic passes through the tracing header it receives from an Amazon SNS publisher to its subscriptions. If set to <code>Active</code>, Amazon SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true. This is only supported on standard topics.</p></li>
147 /// <li>
148 /// <p>HTTP</p>
149 /// <ul>
150 /// <li>
151 /// <p><code>HTTPSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
152 /// <li>
153 /// <p><code>HTTPSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
154 /// <li>
155 /// <p><code>HTTPFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
156 /// </ul></li>
157 /// <li>
158 /// <p>Amazon Data Firehose</p>
159 /// <ul>
160 /// <li>
161 /// <p><code>FirehoseSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
162 /// <li>
163 /// <p><code>FirehoseSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
164 /// <li>
165 /// <p><code>FirehoseFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
166 /// </ul></li>
167 /// <li>
168 /// <p>Lambda</p>
169 /// <ul>
170 /// <li>
171 /// <p><code>LambdaSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
172 /// <li>
173 /// <p><code>LambdaSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
174 /// <li>
175 /// <p><code>LambdaFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
176 /// </ul></li>
177 /// <li>
178 /// <p>Platform application endpoint</p>
179 /// <ul>
180 /// <li>
181 /// <p><code>ApplicationSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to a platform application endpoint.</p></li>
182 /// <li>
183 /// <p><code>ApplicationSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an platform application endpoint.</p></li>
184 /// <li>
185 /// <p><code>ApplicationFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an platform application endpoint.</p></li>
186 /// </ul><note>
187 /// <p>In addition to being able to configure topic attributes for message delivery status of notification messages sent to Amazon SNS application endpoints, you can also configure application attributes for the delivery status of push notification messages sent to push notification services.</p>
188 /// <p>For example, For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html">Using Amazon SNS Application Attributes for Message Delivery Status</a>.</p>
189 /// </note></li>
190 /// <li>
191 /// <p>Amazon SQS</p>
192 /// <ul>
193 /// <li>
194 /// <p><code>SQSSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
195 /// <li>
196 /// <p><code>SQSSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
197 /// <li>
198 /// <p><code>SQSFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
199 /// </ul></li>
200 /// </ul><note>
201 /// <p>The <endpoint>
202 /// SuccessFeedbackRoleArn and
203 /// <endpoint>
204 /// FailureFeedbackRoleArn attributes are used to give Amazon SNS write access to use CloudWatch Logs on your behalf. The
205 /// <endpoint>
206 /// SuccessFeedbackSampleRate attribute is for specifying the sample rate percentage (0-100) of successfully delivered messages. After you configure the
207 /// <endpoint>
208 /// FailureFeedbackRoleArn attribute, then all failed message deliveries generate CloudWatch Logs.
209 /// </endpoint>
210 /// </endpoint>
211 /// </endpoint>
212 /// </endpoint></p>
213 /// </note>
214 /// <p>The following attribute applies only to <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html">server-side encryption</a>:</p>
215 /// <ul>
216 /// <li>
217 /// <p><code>KmsMasterKeyId</code> – The ID of an Amazon Web Services managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms">Key Terms</a>. For more examples, see <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters">KeyId</a> in the <i>Key Management Service API Reference</i>.</p></li>
218 /// </ul>
219 /// <p>The following attributes apply only to <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html">FIFO topics</a>:</p>
220 /// <ul>
221 /// <li>
222 /// <p><code>ArchivePolicy</code> – The policy that sets the retention period for messages stored in the message archive of an Amazon SNS FIFO topic.</p></li>
223 /// <li>
224 /// <p><code>ContentBasedDeduplication</code> – Enables content-based deduplication for FIFO topics.</p>
225 /// <ul>
226 /// <li>
227 /// <p>By default, <code>ContentBasedDeduplication</code> is set to <code>false</code>. If you create a FIFO topic and this attribute is <code>false</code>, you must specify a value for the <code>MessageDeduplicationId</code> parameter for the <a href="https://docs.aws.amazon.com/sns/latest/api/API_Publish.html">Publish</a> action.</p></li>
228 /// <li>
229 /// <p>When you set <code>ContentBasedDeduplication</code> to <code>true</code>, Amazon SNS uses a SHA-256 hash to generate the <code>MessageDeduplicationId</code> using the body of the message (but not the attributes of the message).</p>
230 /// <p>(Optional) To override the generated value, you can specify a value for the <code>MessageDeduplicationId</code> parameter for the <code>Publish</code> action.</p></li>
231 /// </ul></li>
232 /// </ul>
233 /// <ul>
234 /// <li>
235 /// <p><code>FifoThroughputScope</code> – Enables higher throughput for your FIFO topic by adjusting the scope of deduplication. This attribute has two possible values:</p>
236 /// <ul>
237 /// <li>
238 /// <p><code>Topic</code> – The scope of message deduplication is across the entire topic. This is the default value and maintains existing behavior, with a maximum throughput of 3000 messages per second or 20MB per second, whichever comes first.</p></li>
239 /// <li>
240 /// <p><code>MessageGroup</code> – The scope of deduplication is within each individual message group, which enables higher throughput per topic subject to regional quotas. For more information on quotas or to request an increase, see <a href="https://docs.aws.amazon.com/general/latest/gr/sns.html">Amazon SNS service quotas</a> in the Amazon Web Services General Reference.</p></li>
241 /// </ul></li>
242 /// </ul>
243 pub fn attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
244 self.attributes.as_ref()
245 }
246 /// <p>The list of tags to add to a new topic.</p><note>
247 /// <p>To be able to tag a topic on creation, you must have the <code>sns:CreateTopic</code> and <code>sns:TagResource</code> permissions.</p>
248 /// </note>
249 ///
250 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
251 pub fn tags(&self) -> &[crate::types::Tag] {
252 self.tags.as_deref().unwrap_or_default()
253 }
254 /// <p>The body of the policy document you want to use for this topic.</p>
255 /// <p>You can only add one policy per topic.</p>
256 /// <p>The policy must be in JSON string format.</p>
257 /// <p>Length Constraints: Maximum length of 30,720.</p>
258 pub fn data_protection_policy(&self) -> ::std::option::Option<&str> {
259 self.data_protection_policy.as_deref()
260 }
261}
262impl CreateTopicInput {
263 /// Creates a new builder-style object to manufacture [`CreateTopicInput`](crate::operation::create_topic::CreateTopicInput).
264 pub fn builder() -> crate::operation::create_topic::builders::CreateTopicInputBuilder {
265 crate::operation::create_topic::builders::CreateTopicInputBuilder::default()
266 }
267}
268
269/// A builder for [`CreateTopicInput`](crate::operation::create_topic::CreateTopicInput).
270#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
271#[non_exhaustive]
272pub struct CreateTopicInputBuilder {
273 pub(crate) name: ::std::option::Option<::std::string::String>,
274 pub(crate) attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
275 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
276 pub(crate) data_protection_policy: ::std::option::Option<::std::string::String>,
277}
278impl CreateTopicInputBuilder {
279 /// <p>The name of the topic you want to create.</p>
280 /// <p>Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.</p>
281 /// <p>For a FIFO (first-in-first-out) topic, the name must end with the <code>.fifo</code> suffix.</p>
282 /// This field is required.
283 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
284 self.name = ::std::option::Option::Some(input.into());
285 self
286 }
287 /// <p>The name of the topic you want to create.</p>
288 /// <p>Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.</p>
289 /// <p>For a FIFO (first-in-first-out) topic, the name must end with the <code>.fifo</code> suffix.</p>
290 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
291 self.name = input;
292 self
293 }
294 /// <p>The name of the topic you want to create.</p>
295 /// <p>Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.</p>
296 /// <p>For a FIFO (first-in-first-out) topic, the name must end with the <code>.fifo</code> suffix.</p>
297 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
298 &self.name
299 }
300 /// Adds a key-value pair to `attributes`.
301 ///
302 /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
303 ///
304 /// <p>A map of attributes with their corresponding values.</p>
305 /// <p>The following lists names, descriptions, and values of the special request parameters that the <code>CreateTopic</code> action uses:</p>
306 /// <ul>
307 /// <li>
308 /// <p><code>DeliveryPolicy</code> – The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints.</p></li>
309 /// <li>
310 /// <p><code>DisplayName</code> – The display name to use for a topic with SMS subscriptions.</p></li>
311 /// <li>
312 /// <p><code>Policy</code> – The policy that defines who can access your topic. By default, only the topic owner can publish or subscribe to the topic.</p></li>
313 /// <li>
314 /// <p><code>TracingConfig</code> – Tracing mode of an Amazon SNS topic. By default <code>TracingConfig</code> is set to <code>PassThrough</code>, and the topic passes through the tracing header it receives from an Amazon SNS publisher to its subscriptions. If set to <code>Active</code>, Amazon SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true. This is only supported on standard topics.</p></li>
315 /// <li>
316 /// <p>HTTP</p>
317 /// <ul>
318 /// <li>
319 /// <p><code>HTTPSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
320 /// <li>
321 /// <p><code>HTTPSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
322 /// <li>
323 /// <p><code>HTTPFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
324 /// </ul></li>
325 /// <li>
326 /// <p>Amazon Data Firehose</p>
327 /// <ul>
328 /// <li>
329 /// <p><code>FirehoseSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
330 /// <li>
331 /// <p><code>FirehoseSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
332 /// <li>
333 /// <p><code>FirehoseFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
334 /// </ul></li>
335 /// <li>
336 /// <p>Lambda</p>
337 /// <ul>
338 /// <li>
339 /// <p><code>LambdaSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
340 /// <li>
341 /// <p><code>LambdaSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
342 /// <li>
343 /// <p><code>LambdaFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
344 /// </ul></li>
345 /// <li>
346 /// <p>Platform application endpoint</p>
347 /// <ul>
348 /// <li>
349 /// <p><code>ApplicationSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to a platform application endpoint.</p></li>
350 /// <li>
351 /// <p><code>ApplicationSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an platform application endpoint.</p></li>
352 /// <li>
353 /// <p><code>ApplicationFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an platform application endpoint.</p></li>
354 /// </ul><note>
355 /// <p>In addition to being able to configure topic attributes for message delivery status of notification messages sent to Amazon SNS application endpoints, you can also configure application attributes for the delivery status of push notification messages sent to push notification services.</p>
356 /// <p>For example, For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html">Using Amazon SNS Application Attributes for Message Delivery Status</a>.</p>
357 /// </note></li>
358 /// <li>
359 /// <p>Amazon SQS</p>
360 /// <ul>
361 /// <li>
362 /// <p><code>SQSSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
363 /// <li>
364 /// <p><code>SQSSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
365 /// <li>
366 /// <p><code>SQSFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
367 /// </ul></li>
368 /// </ul><note>
369 /// <p>The <endpoint>
370 /// SuccessFeedbackRoleArn and
371 /// <endpoint>
372 /// FailureFeedbackRoleArn attributes are used to give Amazon SNS write access to use CloudWatch Logs on your behalf. The
373 /// <endpoint>
374 /// SuccessFeedbackSampleRate attribute is for specifying the sample rate percentage (0-100) of successfully delivered messages. After you configure the
375 /// <endpoint>
376 /// FailureFeedbackRoleArn attribute, then all failed message deliveries generate CloudWatch Logs.
377 /// </endpoint>
378 /// </endpoint>
379 /// </endpoint>
380 /// </endpoint></p>
381 /// </note>
382 /// <p>The following attribute applies only to <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html">server-side encryption</a>:</p>
383 /// <ul>
384 /// <li>
385 /// <p><code>KmsMasterKeyId</code> – The ID of an Amazon Web Services managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms">Key Terms</a>. For more examples, see <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters">KeyId</a> in the <i>Key Management Service API Reference</i>.</p></li>
386 /// </ul>
387 /// <p>The following attributes apply only to <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html">FIFO topics</a>:</p>
388 /// <ul>
389 /// <li>
390 /// <p><code>ArchivePolicy</code> – The policy that sets the retention period for messages stored in the message archive of an Amazon SNS FIFO topic.</p></li>
391 /// <li>
392 /// <p><code>ContentBasedDeduplication</code> – Enables content-based deduplication for FIFO topics.</p>
393 /// <ul>
394 /// <li>
395 /// <p>By default, <code>ContentBasedDeduplication</code> is set to <code>false</code>. If you create a FIFO topic and this attribute is <code>false</code>, you must specify a value for the <code>MessageDeduplicationId</code> parameter for the <a href="https://docs.aws.amazon.com/sns/latest/api/API_Publish.html">Publish</a> action.</p></li>
396 /// <li>
397 /// <p>When you set <code>ContentBasedDeduplication</code> to <code>true</code>, Amazon SNS uses a SHA-256 hash to generate the <code>MessageDeduplicationId</code> using the body of the message (but not the attributes of the message).</p>
398 /// <p>(Optional) To override the generated value, you can specify a value for the <code>MessageDeduplicationId</code> parameter for the <code>Publish</code> action.</p></li>
399 /// </ul></li>
400 /// </ul>
401 /// <ul>
402 /// <li>
403 /// <p><code>FifoThroughputScope</code> – Enables higher throughput for your FIFO topic by adjusting the scope of deduplication. This attribute has two possible values:</p>
404 /// <ul>
405 /// <li>
406 /// <p><code>Topic</code> – The scope of message deduplication is across the entire topic. This is the default value and maintains existing behavior, with a maximum throughput of 3000 messages per second or 20MB per second, whichever comes first.</p></li>
407 /// <li>
408 /// <p><code>MessageGroup</code> – The scope of deduplication is within each individual message group, which enables higher throughput per topic subject to regional quotas. For more information on quotas or to request an increase, see <a href="https://docs.aws.amazon.com/general/latest/gr/sns.html">Amazon SNS service quotas</a> in the Amazon Web Services General Reference.</p></li>
409 /// </ul></li>
410 /// </ul>
411 pub fn attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
412 let mut hash_map = self.attributes.unwrap_or_default();
413 hash_map.insert(k.into(), v.into());
414 self.attributes = ::std::option::Option::Some(hash_map);
415 self
416 }
417 /// <p>A map of attributes with their corresponding values.</p>
418 /// <p>The following lists names, descriptions, and values of the special request parameters that the <code>CreateTopic</code> action uses:</p>
419 /// <ul>
420 /// <li>
421 /// <p><code>DeliveryPolicy</code> – The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints.</p></li>
422 /// <li>
423 /// <p><code>DisplayName</code> – The display name to use for a topic with SMS subscriptions.</p></li>
424 /// <li>
425 /// <p><code>Policy</code> – The policy that defines who can access your topic. By default, only the topic owner can publish or subscribe to the topic.</p></li>
426 /// <li>
427 /// <p><code>TracingConfig</code> – Tracing mode of an Amazon SNS topic. By default <code>TracingConfig</code> is set to <code>PassThrough</code>, and the topic passes through the tracing header it receives from an Amazon SNS publisher to its subscriptions. If set to <code>Active</code>, Amazon SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true. This is only supported on standard topics.</p></li>
428 /// <li>
429 /// <p>HTTP</p>
430 /// <ul>
431 /// <li>
432 /// <p><code>HTTPSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
433 /// <li>
434 /// <p><code>HTTPSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
435 /// <li>
436 /// <p><code>HTTPFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
437 /// </ul></li>
438 /// <li>
439 /// <p>Amazon Data Firehose</p>
440 /// <ul>
441 /// <li>
442 /// <p><code>FirehoseSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
443 /// <li>
444 /// <p><code>FirehoseSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
445 /// <li>
446 /// <p><code>FirehoseFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
447 /// </ul></li>
448 /// <li>
449 /// <p>Lambda</p>
450 /// <ul>
451 /// <li>
452 /// <p><code>LambdaSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
453 /// <li>
454 /// <p><code>LambdaSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
455 /// <li>
456 /// <p><code>LambdaFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
457 /// </ul></li>
458 /// <li>
459 /// <p>Platform application endpoint</p>
460 /// <ul>
461 /// <li>
462 /// <p><code>ApplicationSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to a platform application endpoint.</p></li>
463 /// <li>
464 /// <p><code>ApplicationSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an platform application endpoint.</p></li>
465 /// <li>
466 /// <p><code>ApplicationFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an platform application endpoint.</p></li>
467 /// </ul><note>
468 /// <p>In addition to being able to configure topic attributes for message delivery status of notification messages sent to Amazon SNS application endpoints, you can also configure application attributes for the delivery status of push notification messages sent to push notification services.</p>
469 /// <p>For example, For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html">Using Amazon SNS Application Attributes for Message Delivery Status</a>.</p>
470 /// </note></li>
471 /// <li>
472 /// <p>Amazon SQS</p>
473 /// <ul>
474 /// <li>
475 /// <p><code>SQSSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
476 /// <li>
477 /// <p><code>SQSSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
478 /// <li>
479 /// <p><code>SQSFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
480 /// </ul></li>
481 /// </ul><note>
482 /// <p>The <endpoint>
483 /// SuccessFeedbackRoleArn and
484 /// <endpoint>
485 /// FailureFeedbackRoleArn attributes are used to give Amazon SNS write access to use CloudWatch Logs on your behalf. The
486 /// <endpoint>
487 /// SuccessFeedbackSampleRate attribute is for specifying the sample rate percentage (0-100) of successfully delivered messages. After you configure the
488 /// <endpoint>
489 /// FailureFeedbackRoleArn attribute, then all failed message deliveries generate CloudWatch Logs.
490 /// </endpoint>
491 /// </endpoint>
492 /// </endpoint>
493 /// </endpoint></p>
494 /// </note>
495 /// <p>The following attribute applies only to <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html">server-side encryption</a>:</p>
496 /// <ul>
497 /// <li>
498 /// <p><code>KmsMasterKeyId</code> – The ID of an Amazon Web Services managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms">Key Terms</a>. For more examples, see <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters">KeyId</a> in the <i>Key Management Service API Reference</i>.</p></li>
499 /// </ul>
500 /// <p>The following attributes apply only to <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html">FIFO topics</a>:</p>
501 /// <ul>
502 /// <li>
503 /// <p><code>ArchivePolicy</code> – The policy that sets the retention period for messages stored in the message archive of an Amazon SNS FIFO topic.</p></li>
504 /// <li>
505 /// <p><code>ContentBasedDeduplication</code> – Enables content-based deduplication for FIFO topics.</p>
506 /// <ul>
507 /// <li>
508 /// <p>By default, <code>ContentBasedDeduplication</code> is set to <code>false</code>. If you create a FIFO topic and this attribute is <code>false</code>, you must specify a value for the <code>MessageDeduplicationId</code> parameter for the <a href="https://docs.aws.amazon.com/sns/latest/api/API_Publish.html">Publish</a> action.</p></li>
509 /// <li>
510 /// <p>When you set <code>ContentBasedDeduplication</code> to <code>true</code>, Amazon SNS uses a SHA-256 hash to generate the <code>MessageDeduplicationId</code> using the body of the message (but not the attributes of the message).</p>
511 /// <p>(Optional) To override the generated value, you can specify a value for the <code>MessageDeduplicationId</code> parameter for the <code>Publish</code> action.</p></li>
512 /// </ul></li>
513 /// </ul>
514 /// <ul>
515 /// <li>
516 /// <p><code>FifoThroughputScope</code> – Enables higher throughput for your FIFO topic by adjusting the scope of deduplication. This attribute has two possible values:</p>
517 /// <ul>
518 /// <li>
519 /// <p><code>Topic</code> – The scope of message deduplication is across the entire topic. This is the default value and maintains existing behavior, with a maximum throughput of 3000 messages per second or 20MB per second, whichever comes first.</p></li>
520 /// <li>
521 /// <p><code>MessageGroup</code> – The scope of deduplication is within each individual message group, which enables higher throughput per topic subject to regional quotas. For more information on quotas or to request an increase, see <a href="https://docs.aws.amazon.com/general/latest/gr/sns.html">Amazon SNS service quotas</a> in the Amazon Web Services General Reference.</p></li>
522 /// </ul></li>
523 /// </ul>
524 pub fn set_attributes(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
525 self.attributes = input;
526 self
527 }
528 /// <p>A map of attributes with their corresponding values.</p>
529 /// <p>The following lists names, descriptions, and values of the special request parameters that the <code>CreateTopic</code> action uses:</p>
530 /// <ul>
531 /// <li>
532 /// <p><code>DeliveryPolicy</code> – The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints.</p></li>
533 /// <li>
534 /// <p><code>DisplayName</code> – The display name to use for a topic with SMS subscriptions.</p></li>
535 /// <li>
536 /// <p><code>Policy</code> – The policy that defines who can access your topic. By default, only the topic owner can publish or subscribe to the topic.</p></li>
537 /// <li>
538 /// <p><code>TracingConfig</code> – Tracing mode of an Amazon SNS topic. By default <code>TracingConfig</code> is set to <code>PassThrough</code>, and the topic passes through the tracing header it receives from an Amazon SNS publisher to its subscriptions. If set to <code>Active</code>, Amazon SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true. This is only supported on standard topics.</p></li>
539 /// <li>
540 /// <p>HTTP</p>
541 /// <ul>
542 /// <li>
543 /// <p><code>HTTPSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
544 /// <li>
545 /// <p><code>HTTPSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
546 /// <li>
547 /// <p><code>HTTPFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an HTTP endpoint.</p></li>
548 /// </ul></li>
549 /// <li>
550 /// <p>Amazon Data Firehose</p>
551 /// <ul>
552 /// <li>
553 /// <p><code>FirehoseSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
554 /// <li>
555 /// <p><code>FirehoseSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
556 /// <li>
557 /// <p><code>FirehoseFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon Data Firehose endpoint.</p></li>
558 /// </ul></li>
559 /// <li>
560 /// <p>Lambda</p>
561 /// <ul>
562 /// <li>
563 /// <p><code>LambdaSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
564 /// <li>
565 /// <p><code>LambdaSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
566 /// <li>
567 /// <p><code>LambdaFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Lambda endpoint.</p></li>
568 /// </ul></li>
569 /// <li>
570 /// <p>Platform application endpoint</p>
571 /// <ul>
572 /// <li>
573 /// <p><code>ApplicationSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to a platform application endpoint.</p></li>
574 /// <li>
575 /// <p><code>ApplicationSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an platform application endpoint.</p></li>
576 /// <li>
577 /// <p><code>ApplicationFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an platform application endpoint.</p></li>
578 /// </ul><note>
579 /// <p>In addition to being able to configure topic attributes for message delivery status of notification messages sent to Amazon SNS application endpoints, you can also configure application attributes for the delivery status of push notification messages sent to push notification services.</p>
580 /// <p>For example, For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html">Using Amazon SNS Application Attributes for Message Delivery Status</a>.</p>
581 /// </note></li>
582 /// <li>
583 /// <p>Amazon SQS</p>
584 /// <ul>
585 /// <li>
586 /// <p><code>SQSSuccessFeedbackRoleArn</code> – Indicates successful message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
587 /// <li>
588 /// <p><code>SQSSuccessFeedbackSampleRate</code> – Indicates percentage of successful messages to sample for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
589 /// <li>
590 /// <p><code>SQSFailureFeedbackRoleArn</code> – Indicates failed message delivery status for an Amazon SNS topic that is subscribed to an Amazon SQS endpoint.</p></li>
591 /// </ul></li>
592 /// </ul><note>
593 /// <p>The <endpoint>
594 /// SuccessFeedbackRoleArn and
595 /// <endpoint>
596 /// FailureFeedbackRoleArn attributes are used to give Amazon SNS write access to use CloudWatch Logs on your behalf. The
597 /// <endpoint>
598 /// SuccessFeedbackSampleRate attribute is for specifying the sample rate percentage (0-100) of successfully delivered messages. After you configure the
599 /// <endpoint>
600 /// FailureFeedbackRoleArn attribute, then all failed message deliveries generate CloudWatch Logs.
601 /// </endpoint>
602 /// </endpoint>
603 /// </endpoint>
604 /// </endpoint></p>
605 /// </note>
606 /// <p>The following attribute applies only to <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html">server-side encryption</a>:</p>
607 /// <ul>
608 /// <li>
609 /// <p><code>KmsMasterKeyId</code> – The ID of an Amazon Web Services managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms">Key Terms</a>. For more examples, see <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters">KeyId</a> in the <i>Key Management Service API Reference</i>.</p></li>
610 /// </ul>
611 /// <p>The following attributes apply only to <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html">FIFO topics</a>:</p>
612 /// <ul>
613 /// <li>
614 /// <p><code>ArchivePolicy</code> – The policy that sets the retention period for messages stored in the message archive of an Amazon SNS FIFO topic.</p></li>
615 /// <li>
616 /// <p><code>ContentBasedDeduplication</code> – Enables content-based deduplication for FIFO topics.</p>
617 /// <ul>
618 /// <li>
619 /// <p>By default, <code>ContentBasedDeduplication</code> is set to <code>false</code>. If you create a FIFO topic and this attribute is <code>false</code>, you must specify a value for the <code>MessageDeduplicationId</code> parameter for the <a href="https://docs.aws.amazon.com/sns/latest/api/API_Publish.html">Publish</a> action.</p></li>
620 /// <li>
621 /// <p>When you set <code>ContentBasedDeduplication</code> to <code>true</code>, Amazon SNS uses a SHA-256 hash to generate the <code>MessageDeduplicationId</code> using the body of the message (but not the attributes of the message).</p>
622 /// <p>(Optional) To override the generated value, you can specify a value for the <code>MessageDeduplicationId</code> parameter for the <code>Publish</code> action.</p></li>
623 /// </ul></li>
624 /// </ul>
625 /// <ul>
626 /// <li>
627 /// <p><code>FifoThroughputScope</code> – Enables higher throughput for your FIFO topic by adjusting the scope of deduplication. This attribute has two possible values:</p>
628 /// <ul>
629 /// <li>
630 /// <p><code>Topic</code> – The scope of message deduplication is across the entire topic. This is the default value and maintains existing behavior, with a maximum throughput of 3000 messages per second or 20MB per second, whichever comes first.</p></li>
631 /// <li>
632 /// <p><code>MessageGroup</code> – The scope of deduplication is within each individual message group, which enables higher throughput per topic subject to regional quotas. For more information on quotas or to request an increase, see <a href="https://docs.aws.amazon.com/general/latest/gr/sns.html">Amazon SNS service quotas</a> in the Amazon Web Services General Reference.</p></li>
633 /// </ul></li>
634 /// </ul>
635 pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
636 &self.attributes
637 }
638 /// Appends an item to `tags`.
639 ///
640 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
641 ///
642 /// <p>The list of tags to add to a new topic.</p><note>
643 /// <p>To be able to tag a topic on creation, you must have the <code>sns:CreateTopic</code> and <code>sns:TagResource</code> permissions.</p>
644 /// </note>
645 pub fn tags(mut self, input: crate::types::Tag) -> Self {
646 let mut v = self.tags.unwrap_or_default();
647 v.push(input);
648 self.tags = ::std::option::Option::Some(v);
649 self
650 }
651 /// <p>The list of tags to add to a new topic.</p><note>
652 /// <p>To be able to tag a topic on creation, you must have the <code>sns:CreateTopic</code> and <code>sns:TagResource</code> permissions.</p>
653 /// </note>
654 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
655 self.tags = input;
656 self
657 }
658 /// <p>The list of tags to add to a new topic.</p><note>
659 /// <p>To be able to tag a topic on creation, you must have the <code>sns:CreateTopic</code> and <code>sns:TagResource</code> permissions.</p>
660 /// </note>
661 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
662 &self.tags
663 }
664 /// <p>The body of the policy document you want to use for this topic.</p>
665 /// <p>You can only add one policy per topic.</p>
666 /// <p>The policy must be in JSON string format.</p>
667 /// <p>Length Constraints: Maximum length of 30,720.</p>
668 pub fn data_protection_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
669 self.data_protection_policy = ::std::option::Option::Some(input.into());
670 self
671 }
672 /// <p>The body of the policy document you want to use for this topic.</p>
673 /// <p>You can only add one policy per topic.</p>
674 /// <p>The policy must be in JSON string format.</p>
675 /// <p>Length Constraints: Maximum length of 30,720.</p>
676 pub fn set_data_protection_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
677 self.data_protection_policy = input;
678 self
679 }
680 /// <p>The body of the policy document you want to use for this topic.</p>
681 /// <p>You can only add one policy per topic.</p>
682 /// <p>The policy must be in JSON string format.</p>
683 /// <p>Length Constraints: Maximum length of 30,720.</p>
684 pub fn get_data_protection_policy(&self) -> &::std::option::Option<::std::string::String> {
685 &self.data_protection_policy
686 }
687 /// Consumes the builder and constructs a [`CreateTopicInput`](crate::operation::create_topic::CreateTopicInput).
688 pub fn build(self) -> ::std::result::Result<crate::operation::create_topic::CreateTopicInput, ::aws_smithy_types::error::operation::BuildError> {
689 ::std::result::Result::Ok(crate::operation::create_topic::CreateTopicInput {
690 name: self.name,
691 attributes: self.attributes,
692 tags: self.tags,
693 data_protection_policy: self.data_protection_policy,
694 })
695 }
696}