File Coverage

blib/lib/Paws/KMS/CreateGrant.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::CreateGrant;
3 1     1   300 use Moose;
  1         2  
  1         5  
4             has Constraints => (is => 'ro', isa => 'Paws::KMS::GrantConstraints');
5             has GranteePrincipal => (is => 'ro', isa => 'Str', required => 1);
6             has GrantTokens => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
7             has KeyId => (is => 'ro', isa => 'Str', required => 1);
8             has Name => (is => 'ro', isa => 'Str');
9             has Operations => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
10             has RetiringPrincipal => (is => 'ro', isa => 'Str');
11              
12 1     1   5510 use MooseX::ClassAttribute;
  1         3  
  1         7  
13              
14             class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateGrant');
15             class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::KMS::CreateGrantResponse');
16             class_has _result_key => (isa => 'Str', is => 'ro');
17             1;
18              
19             ### main pod documentation begin ###
20              
21             =head1 NAME
22              
23             Paws::KMS::CreateGrant - Arguments for method CreateGrant on Paws::KMS
24              
25             =head1 DESCRIPTION
26              
27             This class represents the parameters used for calling the method CreateGrant on the
28             AWS Key Management Service service. Use the attributes of this class
29             as arguments to method CreateGrant.
30              
31             You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateGrant.
32              
33             As an example:
34              
35             $service_obj->CreateGrant(Att1 => $value1, Att2 => $value2, ...);
36              
37             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.
38              
39             =head1 ATTRIBUTES
40              
41              
42             =head2 Constraints => L<Paws::KMS::GrantConstraints>
43              
44             A structure that you can use to allow certain operations in the grant
45             only when the desired encryption context is present. For more
46             information about encryption context, see Encryption Context in the
47             I<AWS Key Management Service Developer Guide>.
48              
49              
50              
51             =head2 B<REQUIRED> GranteePrincipal => Str
52              
53             The principal that is given permission to perform the operations that
54             the grant permits.
55              
56             To specify the principal, use the Amazon Resource Name (ARN) of an AWS
57             principal. Valid AWS principals include AWS accounts (root), IAM users,
58             IAM roles, federated users, and assumed role users. For examples of the
59             ARN syntax to use for specifying a principal, see AWS Identity and
60             Access Management (IAM) in the Example ARNs section of the I<AWS
61             General Reference>.
62              
63              
64              
65             =head2 GrantTokens => ArrayRef[Str|Undef]
66              
67             A list of grant tokens.
68              
69             For more information, see Grant Tokens in the I<AWS Key Management
70             Service Developer Guide>.
71              
72              
73              
74             =head2 B<REQUIRED> KeyId => Str
75              
76             The unique identifier for the customer master key (CMK) that the grant
77             applies to.
78              
79             To specify this value, use the globally unique key ID or the Amazon
80             Resource Name (ARN) of the key. Examples:
81              
82             =over
83              
84             =item *
85              
86             Globally unique key ID: 12345678-1234-1234-1234-123456789012
87              
88             =item *
89              
90             Key ARN:
91             arn:aws:kms:us-west-2:123456789012:key/12345678-1234-1234-1234-123456789012
92              
93             =back
94              
95              
96              
97              
98             =head2 Name => Str
99              
100             A friendly name for identifying the grant. Use this value to prevent
101             unintended creation of duplicate grants when retrying this request.
102              
103             When this value is absent, all C<CreateGrant> requests result in a new
104             grant with a unique C<GrantId> even if all the supplied parameters are
105             identical. This can result in unintended duplicates when you retry the
106             C<CreateGrant> request.
107              
108             When this value is present, you can retry a C<CreateGrant> request with
109             identical parameters; if the grant already exists, the original
110             C<GrantId> is returned without creating a new grant. Note that the
111             returned grant token is unique with every C<CreateGrant> request, even
112             when a duplicate C<GrantId> is returned. All grant tokens obtained in
113             this way can be used interchangeably.
114              
115              
116              
117             =head2 Operations => ArrayRef[Str|Undef]
118              
119             A list of operations that the grant permits.
120              
121              
122              
123             =head2 RetiringPrincipal => Str
124              
125             The principal that is given permission to retire the grant by using
126             RetireGrant operation.
127              
128             To specify the principal, use the Amazon Resource Name (ARN) of an AWS
129             principal. Valid AWS principals include AWS accounts (root), IAM users,
130             federated users, and assumed role users. For examples of the ARN syntax
131             to use for specifying a principal, see AWS Identity and Access
132             Management (IAM) in the Example ARNs section of the I<AWS General
133             Reference>.
134              
135              
136              
137              
138             =head1 SEE ALSO
139              
140             This class forms part of L<Paws>, documenting arguments for method CreateGrant in L<Paws::KMS>
141              
142             =head1 BUGS and CONTRIBUTIONS
143              
144             The source code is located here: https://github.com/pplu/aws-sdk-perl
145              
146             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
147              
148             =cut
149