File Coverage

blib/lib/Paws/KMS/CreateKey.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1              
2             package Paws::KMS::CreateKey;
3 1     1   493 use Moose;
  1         3  
  1         7  
4             has BypassPolicyLockoutSafetyCheck => (is => 'ro', isa => 'Bool');
5             has Description => (is => 'ro', isa => 'Str');
6             has KeyUsage => (is => 'ro', isa => 'Str');
7             has Origin => (is => 'ro', isa => 'Str');
8             has Policy => (is => 'ro', isa => 'Str');
9             has Tags => (is => 'ro', isa => 'ArrayRef[Paws::KMS::Tag]');
10              
11 1     1   6509 use MooseX::ClassAttribute;
  1         2  
  1         9  
12              
13             class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateKey');
14             class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::KMS::CreateKeyResponse');
15             class_has _result_key => (isa => 'Str', is => 'ro');
16             1;
17              
18             ### main pod documentation begin ###
19              
20             =head1 NAME
21              
22             Paws::KMS::CreateKey - Arguments for method CreateKey on Paws::KMS
23              
24             =head1 DESCRIPTION
25              
26             This class represents the parameters used for calling the method CreateKey on the
27             AWS Key Management Service service. Use the attributes of this class
28             as arguments to method CreateKey.
29              
30             You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateKey.
31              
32             As an example:
33              
34             $service_obj->CreateKey(Att1 => $value1, Att2 => $value2, ...);
35              
36             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.
37              
38             =head1 ATTRIBUTES
39              
40              
41             =head2 BypassPolicyLockoutSafetyCheck => Bool
42              
43             A flag to indicate whether to bypass the key policy lockout safety
44             check.
45              
46             Setting this value to true increases the likelihood that the CMK
47             becomes unmanageable. Do not set this value to true indiscriminately.
48              
49             For more information, refer to the scenario in the Default Key Policy
50             section in the I<AWS Key Management Service Developer Guide>.
51              
52             Use this parameter only when you include a policy in the request and
53             you intend to prevent the principal that is making the request from
54             making a subsequent PutKeyPolicy request on the CMK.
55              
56             The default value is false.
57              
58              
59              
60             =head2 Description => Str
61              
62             A description of the CMK.
63              
64             Use a description that helps you decide whether the CMK is appropriate
65             for a task.
66              
67              
68              
69             =head2 KeyUsage => Str
70              
71             The intended use of the CMK.
72              
73             You can use CMKs only for symmetric encryption and decryption.
74              
75             Valid values are: C<"ENCRYPT_DECRYPT">
76              
77             =head2 Origin => Str
78              
79             The source of the CMK's key material.
80              
81             The default is C<AWS_KMS>, which means AWS KMS creates the key
82             material. When this parameter is set to C<EXTERNAL>, the request
83             creates a CMK without key material so that you can import key material
84             from your existing key management infrastructure. For more information
85             about importing key material into AWS KMS, see Importing Key Material
86             in the I<AWS Key Management Service Developer Guide>.
87              
88             The CMK's C<Origin> is immutable and is set when the CMK is created.
89              
90             Valid values are: C<"AWS_KMS">, C<"EXTERNAL">
91              
92             =head2 Policy => Str
93              
94             The key policy to attach to the CMK.
95              
96             If you specify a policy and do not set
97             C<BypassPolicyLockoutSafetyCheck> to true, the policy must meet the
98             following criteria:
99              
100             =over
101              
102             =item *
103              
104             It must allow the principal that is making the C<CreateKey> request to
105             make a subsequent PutKeyPolicy request on the CMK. This reduces the
106             likelihood that the CMK becomes unmanageable. For more information,
107             refer to the scenario in the Default Key Policy section in the I<AWS
108             Key Management Service Developer Guide>.
109              
110             =item *
111              
112             The principals that are specified in the key policy must exist and be
113             visible to AWS KMS. When you create a new AWS principal (for example,
114             an IAM user or role), you might need to enforce a delay before
115             specifying the new principal in a key policy because the new principal
116             might not immediately be visible to AWS KMS. For more information, see
117             Changes that I make are not always immediately visible in the I<IAM
118             User Guide>.
119              
120             =back
121              
122             If you do not specify a policy, AWS KMS attaches a default key policy
123             to the CMK. For more information, see Default Key Policy in the I<AWS
124             Key Management Service Developer Guide>.
125              
126             The policy size limit is 32 KiB (32768 bytes).
127              
128              
129              
130             =head2 Tags => ArrayRef[L<Paws::KMS::Tag>]
131              
132             One or more tags. Each tag consists of a tag key and a tag value. Tag
133             keys and tag values are both required, but tag values can be empty
134             (null) strings.
135              
136             Use this parameter to tag the CMK when it is created. Alternately, you
137             can omit this parameter and instead tag the CMK after it is created
138             using TagResource.
139              
140              
141              
142              
143             =head1 SEE ALSO
144              
145             This class forms part of L<Paws>, documenting arguments for method CreateKey in L<Paws::KMS>
146              
147             =head1 BUGS and CONTRIBUTIONS
148              
149             The source code is located here: https://github.com/pplu/aws-sdk-perl
150              
151             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
152              
153             =cut
154