blib/lib/Paws/SSM/SendCommand.pm

filter: Statementstmt 100% 27 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 29 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/SSM/Parameters.pm ↑ Summary blib/lib/Paws/STS/Credentials.pm »
1  
2 package Paws::SSM::SendCommand;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has CloudWatchOutputConfig => (is => 'ro', isa => 'Paws::SSM::CloudWatchOutputConfig');
5 1 has Comment => (is => 'ro', isa => 'Str');
6 1 has DocumentHash => (is => 'ro', isa => 'Str');
7 1 has DocumentHashType => (is => 'ro', isa => 'Str');
8 1 has DocumentName => (is => 'ro', isa => 'Str', required => 1);
9 1 has DocumentVersion => (is => 'ro', isa => 'Str');
10 1 has InstanceIds => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
11 1 has MaxConcurrency => (is => 'ro', isa => 'Str');
12 1 has MaxErrors => (is => 'ro', isa => 'Str');
13 1 has NotificationConfig => (is => 'ro', isa => 'Paws::SSM::NotificationConfig');
14 1 has OutputS3BucketName => (is => 'ro', isa => 'Str');
15 1 has OutputS3KeyPrefix => (is => 'ro', isa => 'Str');
16 1 has OutputS3Region => (is => 'ro', isa => 'Str');
17 1 has Parameters => (is => 'ro', isa => 'Paws::SSM::Parameters');
18 1 has ServiceRoleArn => (is => 'ro', isa => 'Str');
19 1 has Targets => (is => 'ro', isa => 'ArrayRef[Paws::SSM::Target]');
20 1 has TimeoutSeconds => (is => 'ro', isa => 'Int');
21  
22 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'SendCommand');
25 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SSM::SendCommandResult');
26 1 class_has _result_key => (isa => 'Str', is => 'ro');
27 1 1;
28  
29 ### main pod documentation begin ###
30  
31 =head1 NAME
32  
33 Paws::SSM::SendCommand - Arguments for method SendCommand on L<Paws::SSM>
34  
35 =head1 DESCRIPTION
36  
37 This class represents the parameters used for calling the method SendCommand on the
38 L<Amazon Simple Systems Manager (SSM)|Paws::SSM> service. Use the attributes of this class
39 as arguments to method SendCommand.
40  
41 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to SendCommand.
42  
43 =head1 SYNOPSIS
44  
45 my $ssm = Paws->service('SSM');
46 my $SendCommandResult = $ssm->SendCommand(
47 DocumentName => 'MyDocumentARN',
48 CloudWatchOutputConfig => {
49 CloudWatchLogGroupName =>
50 'MyCloudWatchLogGroupName', # min: 1, max: 512; OPTIONAL
51 CloudWatchOutputEnabled => 1, # OPTIONAL
52 }, # OPTIONAL
53 Comment => 'MyComment', # OPTIONAL
54 DocumentHash => 'MyDocumentHash', # OPTIONAL
55 DocumentHashType => 'Sha256', # OPTIONAL
56 DocumentVersion => 'MyDocumentVersion', # OPTIONAL
57 InstanceIds => [ 'MyInstanceId', ... ], # OPTIONAL
58 MaxConcurrency => 'MyMaxConcurrency', # OPTIONAL
59 MaxErrors => 'MyMaxErrors', # OPTIONAL
60 NotificationConfig => {
61 NotificationArn => 'MyNotificationArn', # OPTIONAL
62 NotificationEvents => [
63 'All',
64 ... # values: All, InProgress, Success, TimedOut, Cancelled, Failed
65 ], # OPTIONAL
66 NotificationType => 'Command', # values: Command, Invocation; OPTIONAL
67 }, # OPTIONAL
68 OutputS3BucketName => 'MyS3BucketName', # OPTIONAL
69 OutputS3KeyPrefix => 'MyS3KeyPrefix', # OPTIONAL
70 OutputS3Region => 'MyS3Region', # OPTIONAL
71 Parameters => { 'MyParameterName' => [ 'MyParameterValue', ... ], }
72 , # OPTIONAL
73 ServiceRoleArn => 'MyServiceRole', # OPTIONAL
74 Targets => [
75 {
76 Key => 'MyTargetKey', # min: 1, max: 163; OPTIONAL
77 Values => [ 'MyTargetValue', ... ], # max: 50; OPTIONAL
78 },
79 ...
80 ], # OPTIONAL
81 TimeoutSeconds => 1, # OPTIONAL
82 );
83  
84 # Results:
85 my $Command = $SendCommandResult->Command;
86  
87 # Returns a L<Paws::SSM::SendCommandResult> object.
88  
89 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.
90 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ssm/SendCommand>
91  
92 =head1 ATTRIBUTES
93  
94  
95 =head2 CloudWatchOutputConfig => L<Paws::SSM::CloudWatchOutputConfig>
96  
97 Enables Systems Manager to send Run Command output to Amazon CloudWatch
98 Logs.
99  
100  
101  
102 =head2 Comment => Str
103  
104 User-specified information about the command, such as a brief
105 description of what the command should do.
106  
107  
108  
109 =head2 DocumentHash => Str
110  
111 The Sha256 or Sha1 hash created by the system when the document was
112 created.
113  
114 Sha1 hashes have been deprecated.
115  
116  
117  
118 =head2 DocumentHashType => Str
119  
120 Sha256 or Sha1.
121  
122 Sha1 hashes have been deprecated.
123  
124 Valid values are: C<"Sha256">, C<"Sha1">
125  
126 =head2 B<REQUIRED> DocumentName => Str
127  
128 The name of the Systems Manager document to run. This can be a public
129 document or a custom document. To run a shared document belonging to
130 another account, specify the document ARN. For more information about
131 how to use shared documents, see Using shared SSM documents
132 (https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-using-shared.html)
133 in the I<AWS Systems Manager User Guide>.
134  
135  
136  
137 =head2 DocumentVersion => Str
138  
139 The SSM document version to use in the request. You can specify
140 $DEFAULT, $LATEST, or a specific version number. If you run commands by
141 using the AWS CLI, then you must escape the first two options by using
142 a backslash. If you specify a version number, then you don't need to
143 use the backslash. For example:
144  
145 --document-version "\$DEFAULT"
146  
147 --document-version "\$LATEST"
148  
149 --document-version "3"
150  
151  
152  
153 =head2 InstanceIds => ArrayRef[Str|Undef]
154  
155 The IDs of the instances where the command should run. Specifying
156 instance IDs is most useful when you are targeting a limited number of
157 instances, though you can specify up to 50 IDs.
158  
159 To target a larger number of instances, or if you prefer not to list
160 individual instance IDs, we recommend using the C<Targets> option
161 instead. Using C<Targets>, which accepts tag key-value pairs to
162 identify the instances to send commands to, you can a send command to
163 tens, hundreds, or thousands of instances at once.
164  
165 For more information about how to use targets, see Using targets and
166 rate controls to send commands to a fleet
167 (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html)
168 in the I<AWS Systems Manager User Guide>.
169  
170  
171  
172 =head2 MaxConcurrency => Str
173  
174 (Optional) The maximum number of instances that are allowed to run the
175 command at the same time. You can specify a number such as 10 or a
176 percentage such as 10%. The default value is 50. For more information
177 about how to use MaxConcurrency, see Using concurrency controls
178 (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-velocity)
179 in the I<AWS Systems Manager User Guide>.
180  
181  
182  
183 =head2 MaxErrors => Str
184  
185 The maximum number of errors allowed without the command failing. When
186 the command fails one more time beyond the value of MaxErrors, the
187 systems stops sending the command to additional targets. You can
188 specify a number like 10 or a percentage like 10%. The default value is
189 0. For more information about how to use MaxErrors, see Using error
190 controls
191 (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-maxerrors)
192 in the I<AWS Systems Manager User Guide>.
193  
194  
195  
196 =head2 NotificationConfig => L<Paws::SSM::NotificationConfig>
197  
198 Configurations for sending notifications.
199  
200  
201  
202 =head2 OutputS3BucketName => Str
203  
204 The name of the S3 bucket where command execution responses should be
205 stored.
206  
207  
208  
209 =head2 OutputS3KeyPrefix => Str
210  
211 The directory structure within the S3 bucket where the responses should
212 be stored.
213  
214  
215  
216 =head2 OutputS3Region => Str
217  
218 (Deprecated) You can no longer specify this parameter. The system
219 ignores it. Instead, Systems Manager automatically determines the
220 Region of the S3 bucket.
221  
222  
223  
224 =head2 Parameters => L<Paws::SSM::Parameters>
225  
226 The required and optional parameters specified in the document being
227 run.
228  
229  
230  
231 =head2 ServiceRoleArn => Str
232  
233 The ARN of the IAM service role to use to publish Amazon Simple
234 Notification Service (Amazon SNS) notifications for Run Command
235 commands.
236  
237  
238  
239 =head2 Targets => ArrayRef[L<Paws::SSM::Target>]
240  
241 An array of search criteria that targets instances using a C<Key,Value>
242 combination that you specify. Specifying targets is most useful when
243 you want to send a command to a large number of instances at once.
244 Using C<Targets>, which accepts tag key-value pairs to identify
245 instances, you can send a command to tens, hundreds, or thousands of
246 instances at once.
247  
248 To send a command to a smaller number of instances, you can use the
249 C<InstanceIds> option instead.
250  
251 For more information about how to use targets, see Sending commands to
252 a fleet
253 (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html)
254 in the I<AWS Systems Manager User Guide>.
255  
256  
257  
258 =head2 TimeoutSeconds => Int
259  
260 If this time is reached and the command has not already started
261 running, it will not run.
262  
263  
264  
265  
266 =head1 SEE ALSO
267  
268 This class forms part of L<Paws>, documenting arguments for method SendCommand in L<Paws::SSM>
269  
270 =head1 BUGS and CONTRIBUTIONS
271  
272 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
273  
274 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
275  
276 =cut
277  
« blib/lib/Paws/SSM/Parameters.pm ↑ Summary blib/lib/Paws/STS/Credentials.pm »