« blib/lib/Paws/KMS/GenerateDataKeyResponse.pm
↑ Summary
blib/lib/Paws/KMS/GenerateDataKeyWithoutPlaintextResponse.pm »
| 1 | |||
| 2 | package Paws::KMS::GenerateDataKeyWithoutPlaintext; | ||
| 3 | use Moose; | ||
| 4 | has EncryptionContext => (is => 'ro', isa => 'Paws::KMS::EncryptionContextType'); | ||
| 5 | has GrantTokens => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 6 | has KeyId => (is => 'ro', isa => 'Str', required => 1); | ||
| 7 | has KeySpec => (is => 'ro', isa => 'Str'); | ||
| 8 | has NumberOfBytes => (is => 'ro', isa => 'Int'); | ||
| 9 | |||
| 10 | use MooseX::ClassAttribute; | ||
| 11 | |||
| 12 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'GenerateDataKeyWithoutPlaintext'); | ||
| 13 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::KMS::GenerateDataKeyWithoutPlaintextResponse'); | ||
| 14 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 15 | 1; | ||
| 16 | |||
| 17 | ### main pod documentation begin ### | ||
| 18 | |||
| 19 | =head1 NAME | ||
| 20 | |||
| 21 | Paws::KMS::GenerateDataKeyWithoutPlaintext - Arguments for method GenerateDataKeyWithoutPlaintext on L<Paws::KMS> | ||
| 22 | |||
| 23 | =head1 DESCRIPTION | ||
| 24 | |||
| 25 | This class represents the parameters used for calling the method GenerateDataKeyWithoutPlaintext on the | ||
| 26 | L<AWS Key Management Service|Paws::KMS> service. Use the attributes of this class | ||
| 27 | as arguments to method GenerateDataKeyWithoutPlaintext. | ||
| 28 | |||
| 29 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GenerateDataKeyWithoutPlaintext. | ||
| 30 | |||
| 31 | =head1 SYNOPSIS | ||
| 32 | |||
| 33 | my $kms = Paws->service('KMS'); | ||
| 34 | # To generate an encrypted data key | ||
| 35 | # The following example generates an encrypted copy of a 256-bit symmetric data | ||
| 36 | # encryption key (data key). The data key is encrypted with the specified | ||
| 37 | # customer master key (CMK). | ||
| 38 | my $GenerateDataKeyWithoutPlaintextResponse = | ||
| 39 | $kms->GenerateDataKeyWithoutPlaintext( | ||
| 40 | 'KeyId' => 'alias/ExampleAlias', | ||
| 41 | 'KeySpec' => 'AES_256' | ||
| 42 | ); | ||
| 43 | |||
| 44 | # Results: | ||
| 45 | my $CiphertextBlob = | ||
| 46 | $GenerateDataKeyWithoutPlaintextResponse->CiphertextBlob; | ||
| 47 | my $KeyId = $GenerateDataKeyWithoutPlaintextResponse->KeyId; | ||
| 48 | |||
| 49 | # Returns a L<Paws::KMS::GenerateDataKeyWithoutPlaintextResponse> object. | ||
| 50 | |||
| 51 | 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. | ||
| 52 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/kms/GenerateDataKeyWithoutPlaintext> | ||
| 53 | |||
| 54 | =head1 ATTRIBUTES | ||
| 55 | |||
| 56 | |||
| 57 | =head2 EncryptionContext => L<Paws::KMS::EncryptionContextType> | ||
| 58 | |||
| 59 | Specifies the encryption context that will be used when encrypting the | ||
| 60 | data key. | ||
| 61 | |||
| 62 | An I<encryption context> is a collection of non-secret key-value pairs | ||
| 63 | that represents additional authenticated data. When you use an | ||
| 64 | encryption context to encrypt data, you must specify the same (an exact | ||
| 65 | case-sensitive match) encryption context to decrypt the data. An | ||
| 66 | encryption context is optional when encrypting with a symmetric CMK, | ||
| 67 | but it is highly recommended. | ||
| 68 | |||
| 69 | For more information, see Encryption Context | ||
| 70 | (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context) | ||
| 71 | in the I<AWS Key Management Service Developer Guide>. | ||
| 72 | |||
| 73 | |||
| 74 | |||
| 75 | =head2 GrantTokens => ArrayRef[Str|Undef] | ||
| 76 | |||
| 77 | A list of grant tokens. | ||
| 78 | |||
| 79 | Use a grant token when your permission to call this operation comes | ||
| 80 | from a new grant that has not yet achieved I<eventual consistency>. For | ||
| 81 | more information, see Grant token | ||
| 82 | (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) | ||
| 83 | in the I<AWS Key Management Service Developer Guide>. | ||
| 84 | |||
| 85 | |||
| 86 | |||
| 87 | =head2 B<REQUIRED> KeyId => Str | ||
| 88 | |||
| 89 | The identifier of the symmetric customer master key (CMK) that encrypts | ||
| 90 | the data key. | ||
| 91 | |||
| 92 | To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. | ||
| 93 | When using an alias name, prefix it with C<"alias/">. To specify a CMK | ||
| 94 | in a different AWS account, you must use the key ARN or alias ARN. | ||
| 95 | |||
| 96 | For example: | ||
| 97 | |||
| 98 | =over | ||
| 99 | |||
| 100 | =item * | ||
| 101 | |||
| 102 | Key ID: C<1234abcd-12ab-34cd-56ef-1234567890ab> | ||
| 103 | |||
| 104 | =item * | ||
| 105 | |||
| 106 | Key ARN: | ||
| 107 | C<arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab> | ||
| 108 | |||
| 109 | =item * | ||
| 110 | |||
| 111 | Alias name: C<alias/ExampleAlias> | ||
| 112 | |||
| 113 | =item * | ||
| 114 | |||
| 115 | Alias ARN: C<arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias> | ||
| 116 | |||
| 117 | =back | ||
| 118 | |||
| 119 | To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. | ||
| 120 | To get the alias name and alias ARN, use ListAliases. | ||
| 121 | |||
| 122 | |||
| 123 | |||
| 124 | =head2 KeySpec => Str | ||
| 125 | |||
| 126 | The length of the data key. Use C<AES_128> to generate a 128-bit | ||
| 127 | symmetric key, or C<AES_256> to generate a 256-bit symmetric key. | ||
| 128 | |||
| 129 | Valid values are: C<"AES_256">, C<"AES_128"> | ||
| 130 | |||
| 131 | =head2 NumberOfBytes => Int | ||
| 132 | |||
| 133 | The length of the data key in bytes. For example, use the value 64 to | ||
| 134 | generate a 512-bit data key (64 bytes is 512 bits). For common key | ||
| 135 | lengths (128-bit and 256-bit symmetric keys), we recommend that you use | ||
| 136 | the C<KeySpec> field instead of this one. | ||
| 137 | |||
| 138 | |||
| 139 | |||
| 140 | |||
| 141 | =head1 SEE ALSO | ||
| 142 | |||
| 143 | This class forms part of L<Paws>, documenting arguments for method GenerateDataKeyWithoutPlaintext in L<Paws::KMS> | ||
| 144 | |||
| 145 | =head1 BUGS and CONTRIBUTIONS | ||
| 146 | |||
| 147 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 148 | |||
| 149 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 150 | |||
| 151 | =cut | ||
| 152 |