blib/lib/Paws/CodeStarNotifications/CreateNotificationRule.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 20 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::CodeStarNotifications::CreateNotificationRule;
3 use Moose;
4 has ClientRequestToken => (is => 'ro', isa => 'Str');
5 has DetailType => (is => 'ro', isa => 'Str', required => 1);
6 has EventTypeIds => (is => 'ro', isa => 'ArrayRef[Str|Undef]', required => 1);
7 has Name => (is => 'ro', isa => 'Str', required => 1);
8 has Resource => (is => 'ro', isa => 'Str', required => 1);
9 has Status => (is => 'ro', isa => 'Str');
10 has Tags => (is => 'ro', isa => 'Paws::CodeStarNotifications::Tags');
11 has Targets => (is => 'ro', isa => 'ArrayRef[Paws::CodeStarNotifications::Target]', required => 1);
12  
13 use MooseX::ClassAttribute;
14  
15 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateNotificationRule');
16 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/createNotificationRule');
17 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
18 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CodeStarNotifications::CreateNotificationRuleResult');
19 1;
20  
21 ### main pod documentation begin ###
22  
23 =head1 NAME
24  
25 Paws::CodeStarNotifications::CreateNotificationRule - Arguments for method CreateNotificationRule on L<Paws::CodeStarNotifications>
26  
27 =head1 DESCRIPTION
28  
29 This class represents the parameters used for calling the method CreateNotificationRule on the
30 L<AWS CodeStar Notifications|Paws::CodeStarNotifications> service. Use the attributes of this class
31 as arguments to method CreateNotificationRule.
32  
33 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateNotificationRule.
34  
35 =head1 SYNOPSIS
36  
37 my $codestar-notifications = Paws->service('CodeStarNotifications');
38 my $CreateNotificationRuleResult =
39 $codestar -notifications->CreateNotificationRule(
40 DetailType => 'BASIC',
41 EventTypeIds => [
42 'MyEventTypeId', ... # min: 1, max: 200
43 ],
44 Name => 'MyNotificationRuleName',
45 Resource => 'MyNotificationRuleResource',
46 Targets => [
47 {
48 TargetAddress => 'MyTargetAddress', # min: 1, max: 320; OPTIONAL
49 TargetType => 'MyTargetType', # OPTIONAL
50 },
51 ...
52 ],
53 ClientRequestToken => 'MyClientRequestToken', # OPTIONAL
54 Status => 'ENABLED', # OPTIONAL
55 Tags => {
56 'MyTagKey' => 'MyTagValue', # key: min: 1, max: 128, value: max: 256
57 }, # OPTIONAL
58 );
59  
60 # Results:
61 my $Arn = $CreateNotificationRuleResult->Arn;
62  
63 # Returns a L<Paws::CodeStarNotifications::CreateNotificationRuleResult> object.
64  
65 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.
66 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications/CreateNotificationRule>
67  
68 =head1 ATTRIBUTES
69  
70  
71 =head2 ClientRequestToken => Str
72  
73 A unique, client-generated idempotency token that, when provided in a
74 request, ensures the request cannot be repeated with a changed
75 parameter. If a request with the same parameters is received and a
76 token is included, the request returns information about the initial
77 request that used that token.
78  
79 The AWS SDKs prepopulate client request tokens. If you are using an AWS
80 SDK, an idempotency token is created for you.
81  
82  
83  
84 =head2 B<REQUIRED> DetailType => Str
85  
86 The level of detail to include in the notifications for this resource.
87 BASIC will include only the contents of the event as it would appear in
88 AWS CloudWatch. FULL will include any supplemental information provided
89 by AWS CodeStar Notifications and/or the service for the resource for
90 which the notification is created.
91  
92 Valid values are: C<"BASIC">, C<"FULL">
93  
94 =head2 B<REQUIRED> EventTypeIds => ArrayRef[Str|Undef]
95  
96 A list of event types associated with this notification rule. For a
97 list of allowed events, see EventTypeSummary.
98  
99  
100  
101 =head2 B<REQUIRED> Name => Str
102  
103 The name for the notification rule. Notifictaion rule names must be
104 unique in your AWS account.
105  
106  
107  
108 =head2 B<REQUIRED> Resource => Str
109  
110 The Amazon Resource Name (ARN) of the resource to associate with the
111 notification rule. Supported resources include pipelines in AWS
112 CodePipeline, repositories in AWS CodeCommit, and build projects in AWS
113 CodeBuild.
114  
115  
116  
117 =head2 Status => Str
118  
119 The status of the notification rule. The default value is ENABLED. If
120 the status is set to DISABLED, notifications aren't sent for the
121 notification rule.
122  
123 Valid values are: C<"ENABLED">, C<"DISABLED">
124  
125 =head2 Tags => L<Paws::CodeStarNotifications::Tags>
126  
127 A list of tags to apply to this notification rule. Key names cannot
128 start with "aws".
129  
130  
131  
132 =head2 B<REQUIRED> Targets => ArrayRef[L<Paws::CodeStarNotifications::Target>]
133  
134 A list of Amazon Resource Names (ARNs) of SNS topics to associate with
135 the notification rule.
136  
137  
138  
139  
140 =head1 SEE ALSO
141  
142 This class forms part of L<Paws>, documenting arguments for method CreateNotificationRule in L<Paws::CodeStarNotifications>
143  
144 =head1 BUGS and CONTRIBUTIONS
145  
146 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
147  
148 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
149  
150 =cut
151