blib/lib/Paws/SNS/CreateTopic.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 15 / 15 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/SNS/ConfirmSubscriptionResponse.pm ↑ Summary blib/lib/Paws/SNS/CreateTopicResponse.pm »
1  
2 package Paws::SNS::CreateTopic;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has Attributes => (is => 'ro', isa => 'Paws::SNS::TopicAttributesMap');
5 1 has Name => (is => 'ro', isa => 'Str', required => 1);
6 1 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::SNS::Tag]');
7  
8 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateTopic');
11 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SNS::CreateTopicResponse');
12 1 class_has _result_key => (isa => 'Str', is => 'ro', default => 'CreateTopicResult');
13 1 1;
14  
15 ### main pod documentation begin ###
16  
17 =head1 NAME
18  
19 Paws::SNS::CreateTopic - Arguments for method CreateTopic on L<Paws::SNS>
20  
21 =head1 DESCRIPTION
22  
23 This class represents the parameters used for calling the method CreateTopic on the
24 L<Amazon Simple Notification Service|Paws::SNS> service. Use the attributes of this class
25 as arguments to method CreateTopic.
26  
27 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateTopic.
28  
29 =head1 SYNOPSIS
30  
31 my $sns = Paws->service('SNS');
32 my $CreateTopicResponse = $sns->CreateTopic(
33 Name => 'MytopicName',
34 Attributes => { 'MyattributeName' => 'MyattributeValue', }, # OPTIONAL
35 Tags => [
36 {
37 Key => 'MyTagKey', # min: 1, max: 128
38 Value => 'MyTagValue', # max: 256
39  
40 },
41 ...
42 ], # OPTIONAL
43 );
44  
45 # Results:
46 my $TopicArn = $CreateTopicResponse->TopicArn;
47  
48 # Returns a L<Paws::SNS::CreateTopicResponse> object.
49  
50 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
51 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/sns/CreateTopic>
52  
53 =head1 ATTRIBUTES
54  
55  
56 =head2 Attributes => L<Paws::SNS::TopicAttributesMap>
57  
58 A map of attributes with their corresponding values.
59  
60 The following lists the names, descriptions, and values of the special
61 request parameters that the C<CreateTopic> action uses:
62  
63 =over
64  
65 =item *
66  
67 C<DeliveryPolicy> E<ndash> The policy that defines how Amazon SNS
68 retries failed deliveries to HTTP/S endpoints.
69  
70 =item *
71  
72 C<DisplayName> E<ndash> The display name to use for a topic with SMS
73 subscriptions.
74  
75 =item *
76  
77 C<FifoTopic> E<ndash> Set to true to create a FIFO topic.
78  
79 =item *
80  
81 C<Policy> E<ndash> The policy that defines who can access your topic.
82 By default, only the topic owner can publish or subscribe to the topic.
83  
84 =back
85  
86 The following attribute applies only to server-side encryption
87 (https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html):
88  
89 =over
90  
91 =item *
92  
93 C<KmsMasterKeyId> E<ndash> The ID of an Amazon Web Services managed
94 customer master key (CMK) for Amazon SNS or a custom CMK. For more
95 information, see Key Terms
96 (https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms).
97 For more examples, see KeyId
98 (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters)
99 in the I<Key Management Service API Reference>.
100  
101 =back
102  
103 The following attributes apply only to FIFO topics
104 (https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html):
105  
106 =over
107  
108 =item *
109  
110 C<FifoTopic> E<ndash> When this is set to C<true>, a FIFO topic is
111 created.
112  
113 =item *
114  
115 C<ContentBasedDeduplication> E<ndash> Enables content-based
116 deduplication for FIFO topics.
117  
118 =over
119  
120 =item *
121  
122 By default, C<ContentBasedDeduplication> is set to C<false>. If you
123 create a FIFO topic and this attribute is C<false>, you must specify a
124 value for the C<MessageDeduplicationId> parameter for the Publish
125 (https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action.
126  
127 =item *
128  
129 When you set C<ContentBasedDeduplication> to C<true>, Amazon SNS uses a
130 SHA-256 hash to generate the C<MessageDeduplicationId> using the body
131 of the message (but not the attributes of the message).
132  
133 (Optional) To override the generated value, you can specify a value for
134 the C<MessageDeduplicationId> parameter for the C<Publish> action.
135  
136 =back
137  
138 =back
139  
140  
141  
142  
143 =head2 B<REQUIRED> Name => Str
144  
145 The name of the topic you want to create.
146  
147 Constraints: Topic names must be made up of only uppercase and
148 lowercase ASCII letters, numbers, underscores, and hyphens, and must be
149 between 1 and 256 characters long.
150  
151 For a FIFO (first-in-first-out) topic, the name must end with the
152 C<.fifo> suffix.
153  
154  
155  
156 =head2 Tags => ArrayRef[L<Paws::SNS::Tag>]
157  
158 The list of tags to add to a new topic.
159  
160 To be able to tag a topic on creation, you must have the
161 C<sns:CreateTopic> and C<sns:TagResource> permissions.
162  
163  
164  
165  
166 =head1 SEE ALSO
167  
168 This class forms part of L<Paws>, documenting arguments for method CreateTopic in L<Paws::SNS>
169  
170 =head1 BUGS and CONTRIBUTIONS
171  
172 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
173  
174 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
175  
176 =cut
177  
« blib/lib/Paws/SNS/ConfirmSubscriptionResponse.pm ↑ Summary blib/lib/Paws/SNS/CreateTopicResponse.pm »