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

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::SSM::UpdateMaintenanceWindowTask;
3 use Moose;
4 has Description => (is => 'ro', isa => 'Str');
5 has LoggingInfo => (is => 'ro', isa => 'Paws::SSM::LoggingInfo');
6 has MaxConcurrency => (is => 'ro', isa => 'Str');
7 has MaxErrors => (is => 'ro', isa => 'Str');
8 has Name => (is => 'ro', isa => 'Str');
9 has Priority => (is => 'ro', isa => 'Int');
10 has Replace => (is => 'ro', isa => 'Bool');
11 has ServiceRoleArn => (is => 'ro', isa => 'Str');
12 has Targets => (is => 'ro', isa => 'ArrayRef[Paws::SSM::Target]');
13 has TaskArn => (is => 'ro', isa => 'Str');
14 has TaskInvocationParameters => (is => 'ro', isa => 'Paws::SSM::MaintenanceWindowTaskInvocationParameters');
15 has TaskParameters => (is => 'ro', isa => 'Paws::SSM::MaintenanceWindowTaskParameters');
16 has WindowId => (is => 'ro', isa => 'Str', required => 1);
17 has WindowTaskId => (is => 'ro', isa => 'Str', required => 1);
18  
19 use MooseX::ClassAttribute;
20  
21 class_has _api_call => (isa => 'Str', is => 'ro', default => 'UpdateMaintenanceWindowTask');
22 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SSM::UpdateMaintenanceWindowTaskResult');
23 class_has _result_key => (isa => 'Str', is => 'ro');
24 1;
25  
26 ### main pod documentation begin ###
27  
28 =head1 NAME
29  
30 Paws::SSM::UpdateMaintenanceWindowTask - Arguments for method UpdateMaintenanceWindowTask on L<Paws::SSM>
31  
32 =head1 DESCRIPTION
33  
34 This class represents the parameters used for calling the method UpdateMaintenanceWindowTask on the
35 L<Amazon Simple Systems Manager (SSM)|Paws::SSM> service. Use the attributes of this class
36 as arguments to method UpdateMaintenanceWindowTask.
37  
38 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to UpdateMaintenanceWindowTask.
39  
40 =head1 SYNOPSIS
41  
42 my $ssm = Paws->service('SSM');
43 my $UpdateMaintenanceWindowTaskResult = $ssm->UpdateMaintenanceWindowTask(
44 WindowId => 'MyMaintenanceWindowId',
45 WindowTaskId => 'MyMaintenanceWindowTaskId',
46 Description => 'MyMaintenanceWindowDescription', # OPTIONAL
47 LoggingInfo => {
48 S3BucketName => 'MyS3BucketName', # min: 3, max: 63
49 S3Region => 'MyS3Region', # min: 3, max: 20
50 S3KeyPrefix => 'MyS3KeyPrefix', # max: 500; OPTIONAL
51 }, # OPTIONAL
52 MaxConcurrency => 'MyMaxConcurrency', # OPTIONAL
53 MaxErrors => 'MyMaxErrors', # OPTIONAL
54 Name => 'MyMaintenanceWindowName', # OPTIONAL
55 Priority => 1, # OPTIONAL
56 Replace => 1, # OPTIONAL
57 ServiceRoleArn => 'MyServiceRole', # OPTIONAL
58 Targets => [
59 {
60 Key => 'MyTargetKey', # min: 1, max: 163; OPTIONAL
61 Values => [ 'MyTargetValue', ... ], # max: 50; OPTIONAL
62 },
63 ...
64 ], # OPTIONAL
65 TaskArn => 'MyMaintenanceWindowTaskArn', # OPTIONAL
66 TaskInvocationParameters => {
67 Automation => {
68 DocumentVersion => 'MyDocumentVersion', # OPTIONAL
69 Parameters => {
70 'MyAutomationParameterKey' => [
71 'MyAutomationParameterValue', ... # min: 1, max: 512
72 ], # key: min: 1, max: 50, value: max: 50
73 }, # min: 1, max: 200; OPTIONAL
74 }, # OPTIONAL
75 Lambda => {
76 ClientContext => 'MyMaintenanceWindowLambdaClientContext'
77 , # min: 1, max: 8000; OPTIONAL
78 Payload => 'BlobMaintenanceWindowLambdaPayload', # max: 4096; OPTIONAL
79 Qualifier =>
80 'MyMaintenanceWindowLambdaQualifier', # min: 1, max: 128; OPTIONAL
81 }, # OPTIONAL
82 RunCommand => {
83 CloudWatchOutputConfig => {
84 CloudWatchLogGroupName =>
85 'MyCloudWatchLogGroupName', # min: 1, max: 512; OPTIONAL
86 CloudWatchOutputEnabled => 1, # OPTIONAL
87 }, # OPTIONAL
88 Comment => 'MyComment', # max: 100; OPTIONAL
89 DocumentHash => 'MyDocumentHash', # max: 256; OPTIONAL
90 DocumentHashType => 'Sha256', # values: Sha256, Sha1; OPTIONAL
91 DocumentVersion => 'MyDocumentVersion', # OPTIONAL
92 NotificationConfig => {
93 NotificationArn => 'MyNotificationArn', # OPTIONAL
94 NotificationEvents => [
95 'All',
96 ... # values: All, InProgress, Success, TimedOut, Cancelled, Failed
97 ], # OPTIONAL
98 NotificationType =>
99 'Command', # values: Command, Invocation; OPTIONAL
100 }, # OPTIONAL
101 OutputS3BucketName => 'MyS3BucketName', # min: 3, max: 63
102 OutputS3KeyPrefix => 'MyS3KeyPrefix', # max: 500; OPTIONAL
103 Parameters => { 'MyParameterName' => [ 'MyParameterValue', ... ], }
104 , # OPTIONAL
105 ServiceRoleArn => 'MyServiceRole',
106 TimeoutSeconds => 1, # min: 30, max: 2592000; OPTIONAL
107 }, # OPTIONAL
108 StepFunctions => {
109 Input =>
110 'MyMaintenanceWindowStepFunctionsInput', # max: 4096; OPTIONAL
111 Name =>
112 'MyMaintenanceWindowStepFunctionsName', # min: 1, max: 80; OPTIONAL
113 }, # OPTIONAL
114 }, # OPTIONAL
115 TaskParameters => {
116 'MyMaintenanceWindowTaskParameterName' => {
117 Values => [
118 'MyMaintenanceWindowTaskParameterValue', ... # min: 1, max: 255
119 ], # OPTIONAL
120 }, # key: min: 1, max: 255
121 }, # OPTIONAL
122 );
123  
124 # Results:
125 my $Description = $UpdateMaintenanceWindowTaskResult->Description;
126 my $LoggingInfo = $UpdateMaintenanceWindowTaskResult->LoggingInfo;
127 my $MaxConcurrency = $UpdateMaintenanceWindowTaskResult->MaxConcurrency;
128 my $MaxErrors = $UpdateMaintenanceWindowTaskResult->MaxErrors;
129 my $Name = $UpdateMaintenanceWindowTaskResult->Name;
130 my $Priority = $UpdateMaintenanceWindowTaskResult->Priority;
131 my $ServiceRoleArn = $UpdateMaintenanceWindowTaskResult->ServiceRoleArn;
132 my $Targets = $UpdateMaintenanceWindowTaskResult->Targets;
133 my $TaskArn = $UpdateMaintenanceWindowTaskResult->TaskArn;
134 my $TaskInvocationParameters =
135 $UpdateMaintenanceWindowTaskResult->TaskInvocationParameters;
136 my $TaskParameters = $UpdateMaintenanceWindowTaskResult->TaskParameters;
137 my $WindowId = $UpdateMaintenanceWindowTaskResult->WindowId;
138 my $WindowTaskId = $UpdateMaintenanceWindowTaskResult->WindowTaskId;
139  
140 # Returns a L<Paws::SSM::UpdateMaintenanceWindowTaskResult> object.
141  
142 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.
143 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ssm/UpdateMaintenanceWindowTask>
144  
145 =head1 ATTRIBUTES
146  
147  
148 =head2 Description => Str
149  
150 The new task description to specify.
151  
152  
153  
154 =head2 LoggingInfo => L<Paws::SSM::LoggingInfo>
155  
156 The new logging location in Amazon S3 to specify.
157  
158 C<LoggingInfo> has been deprecated. To specify an S3 bucket to contain
159 logs, instead use the C<OutputS3BucketName> and C<OutputS3KeyPrefix>
160 options in the C<TaskInvocationParameters> structure. For information
161 about how Systems Manager handles these options for the supported
162 maintenance window task types, see
163 MaintenanceWindowTaskInvocationParameters.
164  
165  
166  
167 =head2 MaxConcurrency => Str
168  
169 The new C<MaxConcurrency> value you want to specify. C<MaxConcurrency>
170 is the number of targets that are allowed to run this task in parallel.
171  
172 For maintenance window tasks without a target specified, you cannot
173 supply a value for this option. Instead, the system inserts a
174 placeholder value of C<1>, which may be reported in the response to
175 this command. This value does not affect the running of your task and
176 can be ignored.
177  
178  
179  
180 =head2 MaxErrors => Str
181  
182 The new C<MaxErrors> value to specify. C<MaxErrors> is the maximum
183 number of errors that are allowed before the task stops being
184 scheduled.
185  
186 For maintenance window tasks without a target specified, you cannot
187 supply a value for this option. Instead, the system inserts a
188 placeholder value of C<1>, which may be reported in the response to
189 this command. This value does not affect the running of your task and
190 can be ignored.
191  
192  
193  
194 =head2 Name => Str
195  
196 The new task name to specify.
197  
198  
199  
200 =head2 Priority => Int
201  
202 The new task priority to specify. The lower the number, the higher the
203 priority. Tasks that have the same priority are scheduled in parallel.
204  
205  
206  
207 =head2 Replace => Bool
208  
209 If True, then all fields that are required by the
210 RegisterTaskWithMaintenanceWindow action are also required for this API
211 request. Optional fields that are not specified are set to null.
212  
213  
214  
215 =head2 ServiceRoleArn => Str
216  
217 The ARN of the IAM service role for Systems Manager to assume when
218 running a maintenance window task. If you do not specify a service role
219 ARN, Systems Manager uses your account's service-linked role. If no
220 service-linked role for Systems Manager exists in your account, it is
221 created when you run C<RegisterTaskWithMaintenanceWindow>.
222  
223 For more information, see the following topics in the in the I<AWS
224 Systems Manager User Guide>:
225  
226 =over
227  
228 =item *
229  
230 Using service-linked roles for Systems Manager
231 (https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions)
232  
233 =item *
234  
235 Should I use a service-linked role or a custom service role to run
236 maintenance window tasks?
237 (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role)
238  
239 =back
240  
241  
242  
243  
244 =head2 Targets => ArrayRef[L<Paws::SSM::Target>]
245  
246 The targets (either instances or tags) to modify. Instances are
247 specified using Key=instanceids,Values=instanceID_1,instanceID_2. Tags
248 are specified using Key=tag_name,Values=tag_value.
249  
250 One or more targets must be specified for maintenance window Run
251 Command-type tasks. Depending on the task, targets are optional for
252 other maintenance window task types (Automation, AWS Lambda, and AWS
253 Step Functions). For more information about running tasks that do not
254 specify targets, see Registering maintenance window tasks without
255 targets
256 (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html)
257 in the I<AWS Systems Manager User Guide>.
258  
259  
260  
261 =head2 TaskArn => Str
262  
263 The task ARN to modify.
264  
265  
266  
267 =head2 TaskInvocationParameters => L<Paws::SSM::MaintenanceWindowTaskInvocationParameters>
268  
269 The parameters that the task should use during execution. Populate only
270 the fields that match the task type. All other fields should be empty.
271  
272 When you update a maintenance window task that has options specified in
273 C<TaskInvocationParameters>, you must provide again all the
274 C<TaskInvocationParameters> values that you want to retain. The values
275 you do not specify again are removed. For example, suppose that when
276 you registered a Run Command task, you specified
277 C<TaskInvocationParameters> values for C<Comment>,
278 C<NotificationConfig>, and C<OutputS3BucketName>. If you update the
279 maintenance window task and specify only a different
280 C<OutputS3BucketName> value, the values for C<Comment> and
281 C<NotificationConfig> are removed.
282  
283  
284  
285 =head2 TaskParameters => L<Paws::SSM::MaintenanceWindowTaskParameters>
286  
287 The parameters to modify.
288  
289 C<TaskParameters> has been deprecated. To specify parameters to pass to
290 a task when it runs, instead use the C<Parameters> option in the
291 C<TaskInvocationParameters> structure. For information about how
292 Systems Manager handles these options for the supported maintenance
293 window task types, see MaintenanceWindowTaskInvocationParameters.
294  
295 The map has the following format:
296  
297 Key: string, between 1 and 255 characters
298  
299 Value: an array of strings, each string is between 1 and 255 characters
300  
301  
302  
303 =head2 B<REQUIRED> WindowId => Str
304  
305 The maintenance window ID that contains the task to modify.
306  
307  
308  
309 =head2 B<REQUIRED> WindowTaskId => Str
310  
311 The task ID to modify.
312  
313  
314  
315  
316 =head1 SEE ALSO
317  
318 This class forms part of L<Paws>, documenting arguments for method UpdateMaintenanceWindowTask in L<Paws::SSM>
319  
320 =head1 BUGS and CONTRIBUTIONS
321  
322 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
323  
324 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
325  
326 =cut
327