blib/lib/Paws/KMS/ReplicateKey.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 17 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::KMS::ReplicateKey;
3 use Moose;
4 has BypassPolicyLockoutSafetyCheck => (is => 'ro', isa => 'Bool');
5 has Description => (is => 'ro', isa => 'Str');
6 has KeyId => (is => 'ro', isa => 'Str', required => 1);
7 has Policy => (is => 'ro', isa => 'Str');
8 has ReplicaRegion => (is => 'ro', isa => 'Str', required => 1);
9 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::KMS::Tag]');
10  
11 use MooseX::ClassAttribute;
12  
13 class_has _api_call => (isa => 'Str', is => 'ro', default => 'ReplicateKey');
14 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::KMS::ReplicateKeyResponse');
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::ReplicateKey - Arguments for method ReplicateKey on L<Paws::KMS>
23  
24 =head1 DESCRIPTION
25  
26 This class represents the parameters used for calling the method ReplicateKey on the
27 L<AWS Key Management Service|Paws::KMS> service. Use the attributes of this class
28 as arguments to method ReplicateKey.
29  
30 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to ReplicateKey.
31  
32 =head1 SYNOPSIS
33  
34 my $kms = Paws->service('KMS');
35 my $ReplicateKeyResponse = $kms->ReplicateKey(
36 KeyId => 'MyKeyIdType',
37 ReplicaRegion => 'MyRegionType',
38 BypassPolicyLockoutSafetyCheck => 1, # OPTIONAL
39 Description => 'MyDescriptionType', # OPTIONAL
40 Policy => 'MyPolicyType', # OPTIONAL
41 Tags => [
42 {
43 TagKey => 'MyTagKeyType', # min: 1, max: 128
44 TagValue => 'MyTagValueType', # max: 256
45  
46 },
47 ...
48 ], # OPTIONAL
49 );
50  
51 # Results:
52 my $ReplicaKeyMetadata = $ReplicateKeyResponse->ReplicaKeyMetadata;
53 my $ReplicaPolicy = $ReplicateKeyResponse->ReplicaPolicy;
54 my $ReplicaTags = $ReplicateKeyResponse->ReplicaTags;
55  
56 # Returns a L<Paws::KMS::ReplicateKeyResponse> object.
57  
58 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.
59 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/kms/ReplicateKey>
60  
61 =head1 ATTRIBUTES
62  
63  
64 =head2 BypassPolicyLockoutSafetyCheck => Bool
65  
66 A flag to indicate whether to bypass the key policy lockout safety
67 check.
68  
69 Setting this value to true increases the risk that the CMK becomes
70 unmanageable. Do not set this value to true indiscriminately.
71  
72 For more information, refer to the scenario in the Default Key Policy
73 (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam)
74 section in the I<AWS Key Management Service Developer Guide>.
75  
76 Use this parameter only when you intend to prevent the principal that
77 is making the request from making a subsequent C<PutKeyPolicy> request
78 on the CMK.
79  
80 The default value is false.
81  
82  
83  
84 =head2 Description => Str
85  
86 A description of the CMK. Use a description that helps you decide
87 whether the CMK is appropriate for a task. The default value is an
88 empty string (no description).
89  
90 The description is not a shared property of multi-Region keys. You can
91 specify the same description or a different description for each key in
92 a set of related multi-Region keys. AWS KMS does not synchronize this
93 property.
94  
95  
96  
97 =head2 B<REQUIRED> KeyId => Str
98  
99 Identifies the multi-Region primary key that is being replicated. To
100 determine whether a CMK is a multi-Region primary key, use the
101 DescribeKey operation to check the value of the C<MultiRegionKeyType>
102 property.
103  
104 Specify the key ID or key ARN of a multi-Region primary key.
105  
106 For example:
107  
108 =over
109  
110 =item *
111  
112 Key ID: C<mrk-1234abcd12ab34cd56ef1234567890ab>
113  
114 =item *
115  
116 Key ARN:
117 C<arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab>
118  
119 =back
120  
121 To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
122  
123  
124  
125 =head2 Policy => Str
126  
127 The key policy to attach to the CMK. This parameter is optional. If you
128 do not provide a key policy, AWS KMS attaches the default key policy
129 (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default)
130 to the CMK.
131  
132 The key policy is not a shared property of multi-Region keys. You can
133 specify the same key policy or a different key policy for each key in a
134 set of related multi-Region keys. AWS KMS does not synchronize this
135 property.
136  
137 If you provide a key policy, it must meet the following criteria:
138  
139 =over
140  
141 =item *
142  
143 If you don't set C<BypassPolicyLockoutSafetyCheck> to true, the key
144 policy must give the caller C<kms:PutKeyPolicy> permission on the
145 replica CMK. This reduces the risk that the CMK becomes unmanageable.
146 For more information, refer to the scenario in the Default Key Policy
147 (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam)
148 section of the I< I<AWS Key Management Service Developer Guide> >.
149  
150 =item *
151  
152 Each statement in the key policy must contain one or more principals.
153 The principals in the key policy must exist and be visible to AWS KMS.
154 When you create a new AWS principal (for example, an IAM user or role),
155 you might need to enforce a delay before including the new principal in
156 a key policy because the new principal might not be immediately visible
157 to AWS KMS. For more information, see Changes that I make are not
158 always immediately visible
159 (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency)
160 in the I<AWS Identity and Access Management User Guide>.
161  
162 =item *
163  
164 The key policy size quota is 32 kilobytes (32768 bytes).
165  
166 =back
167  
168  
169  
170  
171 =head2 B<REQUIRED> ReplicaRegion => Str
172  
173 The Region ID of the AWS Region for this replica key.
174  
175 Enter the Region ID, such as C<us-east-1> or C<ap-southeast-2>. For a
176 list of AWS Regions in which AWS KMS is supported, see AWS KMS service
177 endpoints
178 (https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region) in
179 the I<Amazon Web Services General Reference>.
180  
181 The replica must be in a different AWS Region than its primary key and
182 other replicas of that primary key, but in the same AWS partition. AWS
183 KMS must be available in the replica Region. If the Region is not
184 enabled by default, the AWS account must be enabled in the Region.
185  
186 For information about AWS partitions, see Amazon Resource Names (ARNs)
187 in the I<Amazon Web Services General Reference>.
188 (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
189 For information about enabling and disabling Regions, see Enabling a
190 Region
191 (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable)
192 and Disabling a Region
193 (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-disable)
194 in the I<Amazon Web Services General Reference>.
195  
196  
197  
198 =head2 Tags => ArrayRef[L<Paws::KMS::Tag>]
199  
200 Assigns one or more tags to the replica key. Use this parameter to tag
201 the CMK when it is created. To tag an existing CMK, use the TagResource
202 operation.
203  
204 Tagging or untagging a CMK can allow or deny permission to the CMK. For
205 details, see Using ABAC in AWS KMS
206 (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) in
207 the I<AWS Key Management Service Developer Guide>.
208  
209 To use this parameter, you must have kms:TagResource
210 (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
211 permission in an IAM policy.
212  
213 Tags are not a shared property of multi-Region keys. You can specify
214 the same tags or different tags for each key in a set of related
215 multi-Region keys. AWS KMS does not synchronize this property.
216  
217 Each tag consists of a tag key and a tag value. Both the tag key and
218 the tag value are required, but the tag value can be an empty (null)
219 string. You cannot have more than one tag on a CMK with the same tag
220 key. If you specify an existing tag key with a different tag value, AWS
221 KMS replaces the current tag value with the specified one.
222  
223 When you assign tags to an AWS resource, AWS generates a cost
224 allocation report with usage and costs aggregated by tags. Tags can
225 also be used to control access to a CMK. For details, see Tagging Keys
226 (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html).
227  
228  
229  
230  
231 =head1 SEE ALSO
232  
233 This class forms part of L<Paws>, documenting arguments for method ReplicateKey in L<Paws::KMS>
234  
235 =head1 BUGS and CONTRIBUTIONS
236  
237 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
238  
239 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
240  
241 =cut
242