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