blib/lib/Paws/RDS/CreateEventSubscription.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 18 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::RDS::CreateEventSubscription;
3 use Moose;
4 has Enabled => (is => 'ro', isa => 'Bool');
5 has EventCategories => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
6 has SnsTopicArn => (is => 'ro', isa => 'Str', required => 1);
7 has SourceIds => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
8 has SourceType => (is => 'ro', isa => 'Str');
9 has SubscriptionName => (is => 'ro', isa => 'Str', required => 1);
10 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::RDS::Tag]');
11  
12 use MooseX::ClassAttribute;
13  
14 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateEventSubscription');
15 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::RDS::CreateEventSubscriptionResult');
16 class_has _result_key => (isa => 'Str', is => 'ro', default => 'CreateEventSubscriptionResult');
17 1;
18  
19 ### main pod documentation begin ###
20  
21 =head1 NAME
22  
23 Paws::RDS::CreateEventSubscription - Arguments for method CreateEventSubscription on L<Paws::RDS>
24  
25 =head1 DESCRIPTION
26  
27 This class represents the parameters used for calling the method CreateEventSubscription on the
28 L<Amazon Relational Database Service|Paws::RDS> service. Use the attributes of this class
29 as arguments to method CreateEventSubscription.
30  
31 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateEventSubscription.
32  
33 =head1 SYNOPSIS
34  
35 my $rds = Paws->service('RDS');
36 # To create an event notification subscription
37 # This example creates an event notification subscription.
38 my $CreateEventSubscriptionResult = $rds->CreateEventSubscription(
39 'Enabled' => 1,
40 'EventCategories' => ['availability'],
41 'SnsTopicArn' => 'arn:aws:sns:us-east-1:992648334831:MyDemoSNSTopic',
42 'SourceIds' => ['mymysqlinstance'],
43 'SourceType' => 'db-instance',
44 'SubscriptionName' => 'mymysqleventsubscription'
45 );
46  
47 # Results:
48 my $EventSubscription = $CreateEventSubscriptionResult->EventSubscription;
49  
50 # Returns a L<Paws::RDS::CreateEventSubscriptionResult> object.
51  
52 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.
53 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/rds/CreateEventSubscription>
54  
55 =head1 ATTRIBUTES
56  
57  
58 =head2 Enabled => Bool
59  
60 A value that indicates whether to activate the subscription. If the
61 event notification subscription isn't activated, the subscription is
62 created but not active.
63  
64  
65  
66 =head2 EventCategories => ArrayRef[Str|Undef]
67  
68 A list of event categories for a particular source type (C<SourceType>)
69 that you want to subscribe to. You can see a list of the categories for
70 a given source type in Events
71 (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html)
72 in the I<Amazon RDS User Guide> or by using the
73 C<DescribeEventCategories> operation.
74  
75  
76  
77 =head2 B<REQUIRED> SnsTopicArn => Str
78  
79 The Amazon Resource Name (ARN) of the SNS topic created for event
80 notification. The ARN is created by Amazon SNS when you create a topic
81 and subscribe to it.
82  
83  
84  
85 =head2 SourceIds => ArrayRef[Str|Undef]
86  
87 The list of identifiers of the event sources for which events are
88 returned. If not specified, then all sources are included in the
89 response. An identifier must begin with a letter and must contain only
90 ASCII letters, digits, and hyphens. It can't end with a hyphen or
91 contain two consecutive hyphens.
92  
93 Constraints:
94  
95 =over
96  
97 =item *
98  
99 If C<SourceIds> are supplied, C<SourceType> must also be provided.
100  
101 =item *
102  
103 If the source type is a DB instance, a C<DBInstanceIdentifier> value
104 must be supplied.
105  
106 =item *
107  
108 If the source type is a DB cluster, a C<DBClusterIdentifier> value must
109 be supplied.
110  
111 =item *
112  
113 If the source type is a DB parameter group, a C<DBParameterGroupName>
114 value must be supplied.
115  
116 =item *
117  
118 If the source type is a DB security group, a C<DBSecurityGroupName>
119 value must be supplied.
120  
121 =item *
122  
123 If the source type is a DB snapshot, a C<DBSnapshotIdentifier> value
124 must be supplied.
125  
126 =item *
127  
128 If the source type is a DB cluster snapshot, a
129 C<DBClusterSnapshotIdentifier> value must be supplied.
130  
131 =back
132  
133  
134  
135  
136 =head2 SourceType => Str
137  
138 The type of source that is generating the events. For example, if you
139 want to be notified of events generated by a DB instance, you set this
140 parameter to C<db-instance>. If this value isn't specified, all events
141 are returned.
142  
143 Valid values: C<db-instance> | C<db-cluster> | C<db-parameter-group> |
144 C<db-security-group> | C<db-snapshot> | C<db-cluster-snapshot>
145  
146  
147  
148 =head2 B<REQUIRED> SubscriptionName => Str
149  
150 The name of the subscription.
151  
152 Constraints: The name must be less than 255 characters.
153  
154  
155  
156 =head2 Tags => ArrayRef[L<Paws::RDS::Tag>]
157  
158  
159  
160  
161  
162  
163 =head1 SEE ALSO
164  
165 This class forms part of L<Paws>, documenting arguments for method CreateEventSubscription in L<Paws::RDS>
166  
167 =head1 BUGS and CONTRIBUTIONS
168  
169 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
170  
171 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
172  
173 =cut
174