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

filter: Statementstmt 0.0% 0 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::SSM::PutParameter;
3 use Moose;
4 has AllowedPattern => (is => 'ro', isa => 'Str');
5 has DataType => (is => 'ro', isa => 'Str');
6 has Description => (is => 'ro', isa => 'Str');
7 has KeyId => (is => 'ro', isa => 'Str');
8 has Name => (is => 'ro', isa => 'Str', required => 1);
9 has Overwrite => (is => 'ro', isa => 'Bool');
10 has Policies => (is => 'ro', isa => 'Str');
11 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::SSM::Tag]');
12 has Tier => (is => 'ro', isa => 'Str');
13 has Type => (is => 'ro', isa => 'Str');
14 has Value => (is => 'ro', isa => 'Str', required => 1);
15  
16 use MooseX::ClassAttribute;
17  
18 class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutParameter');
19 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SSM::PutParameterResult');
20 class_has _result_key => (isa => 'Str', is => 'ro');
21 1;
22  
23 ### main pod documentation begin ###
24  
25 =head1 NAME
26  
27 Paws::SSM::PutParameter - Arguments for method PutParameter on L<Paws::SSM>
28  
29 =head1 DESCRIPTION
30  
31 This class represents the parameters used for calling the method PutParameter on the
32 L<Amazon Simple Systems Manager (SSM)|Paws::SSM> service. Use the attributes of this class
33 as arguments to method PutParameter.
34  
35 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutParameter.
36  
37 =head1 SYNOPSIS
38  
39 my $ssm = Paws->service('SSM');
40 my $PutParameterResult = $ssm->PutParameter(
41 Name => 'MyPSParameterName',
42 Value => 'MyPSParameterValue',
43 AllowedPattern => 'MyAllowedPattern', # OPTIONAL
44 DataType => 'MyParameterDataType', # OPTIONAL
45 Description => 'MyParameterDescription', # OPTIONAL
46 KeyId => 'MyParameterKeyId', # OPTIONAL
47 Overwrite => 1, # OPTIONAL
48 Policies => 'MyParameterPolicies', # OPTIONAL
49 Tags => [
50 {
51 Key => 'MyTagKey', # min: 1, max: 128
52 Value => 'MyTagValue', # min: 1, max: 256
53  
54 },
55 ...
56 ], # OPTIONAL
57 Tier => 'Standard', # OPTIONAL
58 Type => 'String', # OPTIONAL
59 );
60  
61 # Results:
62 my $Tier = $PutParameterResult->Tier;
63 my $Version = $PutParameterResult->Version;
64  
65 # Returns a L<Paws::SSM::PutParameterResult> object.
66  
67 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.
68 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ssm/PutParameter>
69  
70 =head1 ATTRIBUTES
71  
72  
73 =head2 AllowedPattern => Str
74  
75 A regular expression used to validate the parameter value. For example,
76 for String types with values restricted to numbers, you can specify the
77 following: AllowedPattern=^\d+$
78  
79  
80  
81 =head2 DataType => Str
82  
83 The data type for a C<String> parameter. Supported data types include
84 plain text and Amazon Machine Image IDs.
85  
86 B<The following data type values are supported.>
87  
88 =over
89  
90 =item *
91  
92 C<text>
93  
94 =item *
95  
96 C<aws:ec2:image>
97  
98 =back
99  
100 When you create a C<String> parameter and specify C<aws:ec2:image>,
101 Systems Manager validates the parameter value is in the required
102 format, such as C<ami-12345abcdeEXAMPLE>, and that the specified AMI is
103 available in your AWS account. For more information, see Native
104 parameter support for Amazon Machine Image IDs
105 (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html)
106 in the I<AWS Systems Manager User Guide>.
107  
108  
109  
110 =head2 Description => Str
111  
112 Information about the parameter that you want to add to the system.
113 Optional but recommended.
114  
115 Do not enter personally identifiable information in this field.
116  
117  
118  
119 =head2 KeyId => Str
120  
121 The KMS Key ID that you want to use to encrypt a parameter. Either the
122 default AWS Key Management Service (AWS KMS) key automatically assigned
123 to your AWS account or a custom key. Required for parameters that use
124 the C<SecureString> data type.
125  
126 If you don't specify a key ID, the system uses the default key
127 associated with your AWS account.
128  
129 =over
130  
131 =item *
132  
133 To use your default AWS KMS key, choose the C<SecureString> data type,
134 and do I<not> specify the C<Key ID> when you create the parameter. The
135 system automatically populates C<Key ID> with your default KMS key.
136  
137 =item *
138  
139 To use a custom KMS key, choose the C<SecureString> data type with the
140 C<Key ID> parameter.
141  
142 =back
143  
144  
145  
146  
147 =head2 B<REQUIRED> Name => Str
148  
149 The fully qualified name of the parameter that you want to add to the
150 system. The fully qualified name includes the complete hierarchy of the
151 parameter path and name. For parameters in a hierarchy, you must
152 include a leading forward slash character (/) when you create or
153 reference a parameter. For example: C</Dev/DBServer/MySQL/db-string13>
154  
155 Naming Constraints:
156  
157 =over
158  
159 =item *
160  
161 Parameter names are case sensitive.
162  
163 =item *
164  
165 A parameter name must be unique within an AWS Region
166  
167 =item *
168  
169 A parameter name can't be prefixed with "aws" or "ssm"
170 (case-insensitive).
171  
172 =item *
173  
174 Parameter names can include only the following symbols and letters:
175 C<a-zA-Z0-9_.->
176  
177 In addition, the slash character ( / ) is used to delineate hierarchies
178 in parameter names. For example:
179 C</Dev/Production/East/Project-ABC/MyParameter>
180  
181 =item *
182  
183 A parameter name can't include spaces.
184  
185 =item *
186  
187 Parameter hierarchies are limited to a maximum depth of fifteen levels.
188  
189 =back
190  
191 For additional information about valid values for parameter names, see
192 Creating Systems Manager parameters
193 (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html)
194 in the I<AWS Systems Manager User Guide>.
195  
196 The maximum length constraint listed below includes capacity for
197 additional system attributes that are not part of the name. The maximum
198 length for a parameter name, including the full length of the parameter
199 ARN, is 1011 characters. For example, the length of the following
200 parameter name is 65 characters, not 20 characters:
201  
202 C<arn:aws:ssm:us-east-2:111122223333:parameter/ExampleParameterName>
203  
204  
205  
206 =head2 Overwrite => Bool
207  
208 Overwrite an existing parameter. The default value is 'false'.
209  
210  
211  
212 =head2 Policies => Str
213  
214 One or more policies to apply to a parameter. This action takes a JSON
215 array. Parameter Store supports the following policy types:
216  
217 Expiration: This policy deletes the parameter after it expires. When
218 you create the policy, you specify the expiration date. You can update
219 the expiration date and time by updating the policy. Updating the
220 I<parameter> does not affect the expiration date and time. When the
221 expiration time is reached, Parameter Store deletes the parameter.
222  
223 ExpirationNotification: This policy triggers an event in Amazon
224 CloudWatch Events that notifies you about the expiration. By using this
225 policy, you can receive notification before or after the expiration
226 time is reached, in units of days or hours.
227  
228 NoChangeNotification: This policy triggers a CloudWatch event if a
229 parameter has not been modified for a specified period of time. This
230 policy type is useful when, for example, a secret needs to be changed
231 within a period of time, but it has not been changed.
232  
233 All existing policies are preserved until you send new policies or an
234 empty policy. For more information about parameter policies, see
235 Assigning parameter policies
236 (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html).
237  
238  
239  
240 =head2 Tags => ArrayRef[L<Paws::SSM::Tag>]
241  
242 Optional metadata that you assign to a resource. Tags enable you to
243 categorize a resource in different ways, such as by purpose, owner, or
244 environment. For example, you might want to tag a Systems Manager
245 parameter to identify the type of resource to which it applies, the
246 environment, or the type of configuration data referenced by the
247 parameter. In this case, you could specify the following key name/value
248 pairs:
249  
250 =over
251  
252 =item *
253  
254 C<Key=Resource,Value=S3bucket>
255  
256 =item *
257  
258 C<Key=OS,Value=Windows>
259  
260 =item *
261  
262 C<Key=ParameterType,Value=LicenseKey>
263  
264 =back
265  
266 To add tags to an existing Systems Manager parameter, use the
267 AddTagsToResource action.
268  
269  
270  
271 =head2 Tier => Str
272  
273 The parameter tier to assign to a parameter.
274  
275 Parameter Store offers a standard tier and an advanced tier for
276 parameters. Standard parameters have a content size limit of 4 KB and
277 can't be configured to use parameter policies. You can create a maximum
278 of 10,000 standard parameters for each Region in an AWS account.
279 Standard parameters are offered at no additional cost.
280  
281 Advanced parameters have a content size limit of 8 KB and can be
282 configured to use parameter policies. You can create a maximum of
283 100,000 advanced parameters for each Region in an AWS account. Advanced
284 parameters incur a charge. For more information, see Standard and
285 advanced parameter tiers
286 (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html)
287 in the I<AWS Systems Manager User Guide>.
288  
289 You can change a standard parameter to an advanced parameter any time.
290 But you can't revert an advanced parameter to a standard parameter.
291 Reverting an advanced parameter to a standard parameter would result in
292 data loss because the system would truncate the size of the parameter
293 from 8 KB to 4 KB. Reverting would also remove any policies attached to
294 the parameter. Lastly, advanced parameters use a different form of
295 encryption than standard parameters.
296  
297 If you no longer need an advanced parameter, or if you no longer want
298 to incur charges for an advanced parameter, you must delete it and
299 recreate it as a new standard parameter.
300  
301 B<Using the Default Tier Configuration>
302  
303 In C<PutParameter> requests, you can specify the tier to create the
304 parameter in. Whenever you specify a tier in the request, Parameter
305 Store creates or updates the parameter according to that request.
306 However, if you do not specify a tier in a request, Parameter Store
307 assigns the tier based on the current Parameter Store default tier
308 configuration.
309  
310 The default tier when you begin using Parameter Store is the
311 standard-parameter tier. If you use the advanced-parameter tier, you
312 can specify one of the following as the default:
313  
314 =over
315  
316 =item *
317  
318 B<Advanced>: With this option, Parameter Store evaluates all requests
319 as advanced parameters.
320  
321 =item *
322  
323 B<Intelligent-Tiering>: With this option, Parameter Store evaluates
324 each request to determine if the parameter is standard or advanced.
325  
326 If the request doesn't include any options that require an advanced
327 parameter, the parameter is created in the standard-parameter tier. If
328 one or more options requiring an advanced parameter are included in the
329 request, Parameter Store create a parameter in the advanced-parameter
330 tier.
331  
332 This approach helps control your parameter-related costs by always
333 creating standard parameters unless an advanced parameter is necessary.
334  
335 =back
336  
337 Options that require an advanced parameter include the following:
338  
339 =over
340  
341 =item *
342  
343 The content size of the parameter is more than 4 KB.
344  
345 =item *
346  
347 The parameter uses a parameter policy.
348  
349 =item *
350  
351 More than 10,000 parameters already exist in your AWS account in the
352 current Region.
353  
354 =back
355  
356 For more information about configuring the default tier option, see
357 Specifying a default parameter tier
358 (https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html)
359 in the I<AWS Systems Manager User Guide>.
360  
361 Valid values are: C<"Standard">, C<"Advanced">, C<"Intelligent-Tiering">
362  
363 =head2 Type => Str
364  
365 The type of parameter that you want to add to the system.
366  
367 C<SecureString> is not currently supported for AWS CloudFormation
368 templates.
369  
370 Items in a C<StringList> must be separated by a comma (,). You can't
371 use other punctuation or special character to escape items in the list.
372 If you have a parameter value that requires a comma, then use the
373 C<String> data type.
374  
375 Specifying a parameter type is not required when updating a parameter.
376 You must specify a parameter type when creating a parameter.
377  
378 Valid values are: C<"String">, C<"StringList">, C<"SecureString">
379  
380 =head2 B<REQUIRED> Value => Str
381  
382 The parameter value that you want to add to the system. Standard
383 parameters have a value limit of 4 KB. Advanced parameters have a value
384 limit of 8 KB.
385  
386 Parameters can't be referenced or nested in the values of other
387 parameters. You can't include C<{{}}> or C<{{ssm:I<parameter-name>}}>
388 in a parameter value.
389  
390  
391  
392  
393 =head1 SEE ALSO
394  
395 This class forms part of L<Paws>, documenting arguments for method PutParameter in L<Paws::SSM>
396  
397 =head1 BUGS and CONTRIBUTIONS
398  
399 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
400  
401 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
402  
403 =cut
404