blib/lib/Paws/SSM/CreateAssociation.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 27 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::SSM::CreateAssociation;
3 use Moose;
4 has ApplyOnlyAtCronInterval => (is => 'ro', isa => 'Bool');
5 has AssociationName => (is => 'ro', isa => 'Str');
6 has AutomationTargetParameterName => (is => 'ro', isa => 'Str');
7 has CalendarNames => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
8 has ComplianceSeverity => (is => 'ro', isa => 'Str');
9 has DocumentVersion => (is => 'ro', isa => 'Str');
10 has InstanceId => (is => 'ro', isa => 'Str');
11 has MaxConcurrency => (is => 'ro', isa => 'Str');
12 has MaxErrors => (is => 'ro', isa => 'Str');
13 has Name => (is => 'ro', isa => 'Str', required => 1);
14 has OutputLocation => (is => 'ro', isa => 'Paws::SSM::InstanceAssociationOutputLocation');
15 has Parameters => (is => 'ro', isa => 'Paws::SSM::Parameters');
16 has ScheduleExpression => (is => 'ro', isa => 'Str');
17 has SyncCompliance => (is => 'ro', isa => 'Str');
18 has TargetLocations => (is => 'ro', isa => 'ArrayRef[Paws::SSM::TargetLocation]');
19 has Targets => (is => 'ro', isa => 'ArrayRef[Paws::SSM::Target]');
20  
21 use MooseX::ClassAttribute;
22  
23 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateAssociation');
24 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SSM::CreateAssociationResult');
25 class_has _result_key => (isa => 'Str', is => 'ro');
26 1;
27  
28 ### main pod documentation begin ###
29  
30 =head1 NAME
31  
32 Paws::SSM::CreateAssociation - Arguments for method CreateAssociation on L<Paws::SSM>
33  
34 =head1 DESCRIPTION
35  
36 This class represents the parameters used for calling the method CreateAssociation on the
37 L<Amazon Simple Systems Manager (SSM)|Paws::SSM> service. Use the attributes of this class
38 as arguments to method CreateAssociation.
39  
40 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateAssociation.
41  
42 =head1 SYNOPSIS
43  
44 my $ssm = Paws->service('SSM');
45 my $CreateAssociationResult = $ssm->CreateAssociation(
46 Name => 'MyDocumentARN',
47 ApplyOnlyAtCronInterval => 1, # OPTIONAL
48 AssociationName => 'MyAssociationName', # OPTIONAL
49 AutomationTargetParameterName =>
50 'MyAutomationTargetParameterName', # OPTIONAL
51 CalendarNames => [ 'MyCalendarNameOrARN', ... ], # OPTIONAL
52 ComplianceSeverity => 'CRITICAL', # OPTIONAL
53 DocumentVersion => 'MyDocumentVersion', # OPTIONAL
54 InstanceId => 'MyInstanceId', # OPTIONAL
55 MaxConcurrency => 'MyMaxConcurrency', # OPTIONAL
56 MaxErrors => 'MyMaxErrors', # OPTIONAL
57 OutputLocation => {
58 S3Location => {
59 OutputS3BucketName => 'MyS3BucketName', # min: 3, max: 63; OPTIONAL
60 OutputS3KeyPrefix => 'MyS3KeyPrefix', # max: 500; OPTIONAL
61 OutputS3Region => 'MyS3Region', # min: 3, max: 20; OPTIONAL
62 }, # OPTIONAL
63 }, # OPTIONAL
64 Parameters => { 'MyParameterName' => [ 'MyParameterValue', ... ], }
65 , # OPTIONAL
66 ScheduleExpression => 'MyScheduleExpression', # OPTIONAL
67 SyncCompliance => 'AUTO', # OPTIONAL
68 TargetLocations => [
69 {
70 Accounts => [ 'MyAccount', ... ], # min: 1, max: 50; OPTIONAL
71 ExecutionRoleName =>
72 'MyExecutionRoleName', # min: 1, max: 64; OPTIONAL
73 Regions => [ 'MyRegion', ... ], # min: 1, max: 50; OPTIONAL
74 TargetLocationMaxConcurrency => 'MyMaxConcurrency', # min: 1, max: 7
75 TargetLocationMaxErrors => 'MyMaxErrors', # min: 1, max: 7
76 },
77 ...
78 ], # OPTIONAL
79 Targets => [
80 {
81 Key => 'MyTargetKey', # min: 1, max: 163; OPTIONAL
82 Values => [ 'MyTargetValue', ... ], # max: 50; OPTIONAL
83 },
84 ...
85 ], # OPTIONAL
86 );
87  
88 # Results:
89 my $AssociationDescription =
90 $CreateAssociationResult->AssociationDescription;
91  
92 # Returns a L<Paws::SSM::CreateAssociationResult> object.
93  
94 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.
95 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ssm/CreateAssociation>
96  
97 =head1 ATTRIBUTES
98  
99  
100 =head2 ApplyOnlyAtCronInterval => Bool
101  
102 By default, when you create a new association, the system runs it
103 immediately after it is created and then according to the schedule you
104 specified. Specify this option if you don't want an association to run
105 immediately after you create it. This parameter is not supported for
106 rate expressions.
107  
108  
109  
110 =head2 AssociationName => Str
111  
112 Specify a descriptive name for the association.
113  
114  
115  
116 =head2 AutomationTargetParameterName => Str
117  
118 Specify the target for the association. This target is required for
119 associations that use an Automation document and target resources by
120 using rate controls.
121  
122  
123  
124 =head2 CalendarNames => ArrayRef[Str|Undef]
125  
126 The names or Amazon Resource Names (ARNs) of the Systems Manager Change
127 Calendar type documents you want to gate your associations under. The
128 associations only run when that Change Calendar is open. For more
129 information, see AWS Systems Manager Change Calendar
130 (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar).
131  
132  
133  
134 =head2 ComplianceSeverity => Str
135  
136 The severity level to assign to the association.
137  
138 Valid values are: C<"CRITICAL">, C<"HIGH">, C<"MEDIUM">, C<"LOW">, C<"UNSPECIFIED">
139  
140 =head2 DocumentVersion => Str
141  
142 The document version you want to associate with the target(s). Can be a
143 specific version or the default version.
144  
145  
146  
147 =head2 InstanceId => Str
148  
149 The instance ID.
150  
151 C<InstanceId> has been deprecated. To specify an instance ID for an
152 association, use the C<Targets> parameter. Requests that include the
153 parameter C<InstanceID> with SSM documents that use schema version 2.0
154 or later will fail. In addition, if you use the parameter
155 C<InstanceId>, you cannot use the parameters C<AssociationName>,
156 C<DocumentVersion>, C<MaxErrors>, C<MaxConcurrency>, C<OutputLocation>,
157 or C<ScheduleExpression>. To use these parameters, you must use the
158 C<Targets> parameter.
159  
160  
161  
162 =head2 MaxConcurrency => Str
163  
164 The maximum number of targets allowed to run the association at the
165 same time. You can specify a number, for example 10, or a percentage of
166 the target set, for example 10%. The default value is 100%, which means
167 all targets run the association at the same time.
168  
169 If a new instance starts and attempts to run an association while
170 Systems Manager is running MaxConcurrency associations, the association
171 is allowed to run. During the next association interval, the new
172 instance will process its association within the limit specified for
173 MaxConcurrency.
174  
175  
176  
177 =head2 MaxErrors => Str
178  
179 The number of errors that are allowed before the system stops sending
180 requests to run the association on additional targets. You can specify
181 either an absolute number of errors, for example 10, or a percentage of
182 the target set, for example 10%. If you specify 3, for example, the
183 system stops sending requests when the fourth error is received. If you
184 specify 0, then the system stops sending requests after the first error
185 is returned. If you run an association on 50 instances and set MaxError
186 to 10%, then the system stops sending the request when the sixth error
187 is received.
188  
189 Executions that are already running an association when MaxErrors is
190 reached are allowed to complete, but some of these executions may fail
191 as well. If you need to ensure that there won't be more than max-errors
192 failed executions, set MaxConcurrency to 1 so that executions proceed
193 one at a time.
194  
195  
196  
197 =head2 B<REQUIRED> Name => Str
198  
199 The name of the SSM document that contains the configuration
200 information for the instance. You can specify Command or Automation
201 documents.
202  
203 You can specify AWS-predefined documents, documents you created, or a
204 document that is shared with you from another account.
205  
206 For SSM documents that are shared with you from other AWS accounts, you
207 must specify the complete SSM document ARN, in the following format:
208  
209 C<arn:I<partition>:ssm:I<region>:I<account-id>:document/I<document-name>>
210  
211 For example:
212  
213 C<arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document>
214  
215 For AWS-predefined documents and SSM documents you created in your
216 account, you only need to specify the document name. For example,
217 C<AWS-ApplyPatchBaseline> or C<My-Document>.
218  
219  
220  
221 =head2 OutputLocation => L<Paws::SSM::InstanceAssociationOutputLocation>
222  
223 An S3 bucket where you want to store the output details of the request.
224  
225  
226  
227 =head2 Parameters => L<Paws::SSM::Parameters>
228  
229 The parameters for the runtime configuration of the document.
230  
231  
232  
233 =head2 ScheduleExpression => Str
234  
235 A cron expression when the association will be applied to the
236 target(s).
237  
238  
239  
240 =head2 SyncCompliance => Str
241  
242 The mode for generating association compliance. You can specify C<AUTO>
243 or C<MANUAL>. In C<AUTO> mode, the system uses the status of the
244 association execution to determine the compliance status. If the
245 association execution runs successfully, then the association is
246 C<COMPLIANT>. If the association execution doesn't run successfully,
247 the association is C<NON-COMPLIANT>.
248  
249 In C<MANUAL> mode, you must specify the C<AssociationId> as a parameter
250 for the PutComplianceItems API action. In this case, compliance data is
251 not managed by State Manager. It is managed by your direct call to the
252 PutComplianceItems API action.
253  
254 By default, all associations use C<AUTO> mode.
255  
256 Valid values are: C<"AUTO">, C<"MANUAL">
257  
258 =head2 TargetLocations => ArrayRef[L<Paws::SSM::TargetLocation>]
259  
260 A location is a combination of AWS Regions and AWS accounts where you
261 want to run the association. Use this action to create an association
262 in multiple Regions and multiple accounts.
263  
264  
265  
266 =head2 Targets => ArrayRef[L<Paws::SSM::Target>]
267  
268 The targets for the association. You can target instances by using
269 tags, AWS Resource Groups, all instances in an AWS account, or
270 individual instance IDs. For more information about choosing targets
271 for an association, see Using targets and rate controls with State
272 Manager associations
273 (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html)
274 in the I<AWS Systems Manager User Guide>.
275  
276  
277  
278  
279 =head1 SEE ALSO
280  
281 This class forms part of L<Paws>, documenting arguments for method CreateAssociation in L<Paws::SSM>
282  
283 =head1 BUGS and CONTRIBUTIONS
284  
285 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
286  
287 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
288  
289 =cut
290