File Coverage

blib/lib/Paws/KMS/PutKeyPolicy.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::PutKeyPolicy;
3 1     1   619 use Moose;
  1         4  
  1         7  
4             has BypassPolicyLockoutSafetyCheck => (is => 'ro', isa => 'Bool');
5             has KeyId => (is => 'ro', isa => 'Str', required => 1);
6             has Policy => (is => 'ro', isa => 'Str', required => 1);
7             has PolicyName => (is => 'ro', isa => 'Str', required => 1);
8              
9 1     1   7042 use MooseX::ClassAttribute;
  1         3  
  1         9  
10              
11             class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutKeyPolicy');
12             class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response');
13             class_has _result_key => (isa => 'Str', is => 'ro');
14             1;
15              
16             ### main pod documentation begin ###
17              
18             =head1 NAME
19              
20             Paws::KMS::PutKeyPolicy - Arguments for method PutKeyPolicy on Paws::KMS
21              
22             =head1 DESCRIPTION
23              
24             This class represents the parameters used for calling the method PutKeyPolicy on the
25             AWS Key Management Service service. Use the attributes of this class
26             as arguments to method PutKeyPolicy.
27              
28             You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutKeyPolicy.
29              
30             As an example:
31              
32             $service_obj->PutKeyPolicy(Att1 => $value1, Att2 => $value2, ...);
33              
34             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.
35              
36             =head1 ATTRIBUTES
37              
38              
39             =head2 BypassPolicyLockoutSafetyCheck => Bool
40              
41             A flag to indicate whether to bypass the key policy lockout safety
42             check.
43              
44             Setting this value to true increases the likelihood that the CMK
45             becomes unmanageable. Do not set this value to true indiscriminately.
46              
47             For more information, refer to the scenario in the Default Key Policy
48             section in the I<AWS Key Management Service Developer Guide>.
49              
50             Use this parameter only when you intend to prevent the principal that
51             is making the request from making a subsequent C<PutKeyPolicy> request
52             on the CMK.
53              
54             The default value is false.
55              
56              
57              
58             =head2 B<REQUIRED> KeyId => Str
59              
60             A unique identifier for the CMK.
61              
62             Use the CMK's unique identifier or its Amazon Resource Name (ARN). For
63             example:
64              
65             =over
66              
67             =item *
68              
69             Unique ID: 1234abcd-12ab-34cd-56ef-1234567890ab
70              
71             =item *
72              
73             ARN:
74             arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
75              
76             =back
77              
78              
79              
80              
81             =head2 B<REQUIRED> Policy => Str
82              
83             The key policy to attach to the CMK.
84              
85             If you do not set C<BypassPolicyLockoutSafetyCheck> to true, the policy
86             must meet the following criteria:
87              
88             =over
89              
90             =item *
91              
92             It must allow the principal that is making the C<PutKeyPolicy> request
93             to make a subsequent C<PutKeyPolicy> request on the CMK. This reduces
94             the likelihood that the CMK becomes unmanageable. For more information,
95             refer to the scenario in the Default Key Policy section in the I<AWS
96             Key Management Service Developer Guide>.
97              
98             =item *
99              
100             The principals that are specified in the key policy must exist and be
101             visible to AWS KMS. When you create a new AWS principal (for example,
102             an IAM user or role), you might need to enforce a delay before
103             specifying the new principal in a key policy because the new principal
104             might not immediately be visible to AWS KMS. For more information, see
105             Changes that I make are not always immediately visible in the I<IAM
106             User Guide>.
107              
108             =back
109              
110             The policy size limit is 32 KiB (32768 bytes).
111              
112              
113              
114             =head2 B<REQUIRED> PolicyName => Str
115              
116             The name of the key policy.
117              
118             This value must be C<default>.
119              
120              
121              
122              
123             =head1 SEE ALSO
124              
125             This class forms part of L<Paws>, documenting arguments for method PutKeyPolicy in L<Paws::KMS>
126              
127             =head1 BUGS and CONTRIBUTIONS
128              
129             The source code is located here: https://github.com/pplu/aws-sdk-perl
130              
131             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
132              
133             =cut
134