| 1 | |||
| 2 | package Paws::KMS::Decrypt; | ||
| 3 | use Moose; | ||
| 4 | has CiphertextBlob => (is => 'ro', isa => 'Str', required => 1); | ||
| 5 | has EncryptionAlgorithm => (is => 'ro', isa => 'Str'); | ||
| 6 | has EncryptionContext => (is => 'ro', isa => 'Paws::KMS::EncryptionContextType'); | ||
| 7 | has GrantTokens => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 8 | has KeyId => (is => 'ro', isa => 'Str'); | ||
| 9 | |||
| 10 | use MooseX::ClassAttribute; | ||
| 11 | |||
| 12 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'Decrypt'); | ||
| 13 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::KMS::DecryptResponse'); | ||
| 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::Decrypt - Arguments for method Decrypt on L<Paws::KMS> | ||
| 22 | |||
| 23 | =head1 DESCRIPTION | ||
| 24 | |||
| 25 | This class represents the parameters used for calling the method Decrypt on the | ||
| 26 | L<AWS Key Management Service|Paws::KMS> service. Use the attributes of this class | ||
| 27 | as arguments to method Decrypt. | ||
| 28 | |||
| 29 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to Decrypt. | ||
| 30 | |||
| 31 | =head1 SYNOPSIS | ||
| 32 | |||
| 33 | my $kms = Paws->service('KMS'); | ||
| 34 | # To decrypt data | ||
| 35 | # The following example decrypts data that was encrypted with a customer master | ||
| 36 | # key (CMK) in AWS KMS. | ||
| 37 | my $DecryptResponse = $kms->Decrypt( 'CiphertextBlob' => '<binary data>' ); | ||
| 38 | |||
| 39 | # Results: | ||
| 40 | my $KeyId = $DecryptResponse->KeyId; | ||
| 41 | my $Plaintext = $DecryptResponse->Plaintext; | ||
| 42 | |||
| 43 | # Returns a L<Paws::KMS::DecryptResponse> object. | ||
| 44 | |||
| 45 | 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. | ||
| 46 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/kms/Decrypt> | ||
| 47 | |||
| 48 | =head1 ATTRIBUTES | ||
| 49 | |||
| 50 | |||
| 51 | =head2 B<REQUIRED> CiphertextBlob => Str | ||
| 52 | |||
| 53 | Ciphertext to be decrypted. The blob includes metadata. | ||
| 54 | |||
| 55 | |||
| 56 | |||
| 57 | =head2 EncryptionAlgorithm => Str | ||
| 58 | |||
| 59 | Specifies the encryption algorithm that will be used to decrypt the | ||
| 60 | ciphertext. Specify the same algorithm that was used to encrypt the | ||
| 61 | data. If you specify a different algorithm, the C<Decrypt> operation | ||
| 62 | fails. | ||
| 63 | |||
| 64 | This parameter is required only when the ciphertext was encrypted under | ||
| 65 | an asymmetric CMK. The default value, C<SYMMETRIC_DEFAULT>, represents | ||
| 66 | the only supported algorithm that is valid for symmetric CMKs. | ||
| 67 | |||
| 68 | Valid values are: C<"SYMMETRIC_DEFAULT">, C<"RSAES_OAEP_SHA_1">, C<"RSAES_OAEP_SHA_256"> | ||
| 69 | |||
| 70 | =head2 EncryptionContext => L<Paws::KMS::EncryptionContextType> | ||
| 71 | |||
| 72 | Specifies the encryption context to use when decrypting the data. An | ||
| 73 | encryption context is valid only for cryptographic operations | ||
| 74 | (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) | ||
| 75 | with a symmetric CMK. The standard asymmetric encryption algorithms | ||
| 76 | that AWS KMS uses do not support an encryption context. | ||
| 77 | |||
| 78 | An I<encryption context> is a collection of non-secret key-value pairs | ||
| 79 | that represents additional authenticated data. When you use an | ||
| 80 | encryption context to encrypt data, you must specify the same (an exact | ||
| 81 | case-sensitive match) encryption context to decrypt the data. An | ||
| 82 | encryption context is optional when encrypting with a symmetric CMK, | ||
| 83 | but it is highly recommended. | ||
| 84 | |||
| 85 | For more information, see Encryption Context | ||
| 86 | (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context) | ||
| 87 | in the I<AWS Key Management Service Developer Guide>. | ||
| 88 | |||
| 89 | |||
| 90 | |||
| 91 | =head2 GrantTokens => ArrayRef[Str|Undef] | ||
| 92 | |||
| 93 | A list of grant tokens. | ||
| 94 | |||
| 95 | Use a grant token when your permission to call this operation comes | ||
| 96 | from a newly created grant that has not yet achieved eventual | ||
| 97 | consistency. Use a grant token when your permission to call this | ||
| 98 | operation comes from a new grant that has not yet achieved I<eventual | ||
| 99 | consistency>. For more information, see Grant token | ||
| 100 | (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) | ||
| 101 | in the I<AWS Key Management Service Developer Guide>. | ||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | =head2 KeyId => Str | ||
| 106 | |||
| 107 | Specifies the customer master key (CMK) that AWS KMS uses to decrypt | ||
| 108 | the ciphertext. Enter a key ID of the CMK that was used to encrypt the | ||
| 109 | ciphertext. | ||
| 110 | |||
| 111 | This parameter is required only when the ciphertext was encrypted under | ||
| 112 | an asymmetric CMK. If you used a symmetric CMK, AWS KMS can get the CMK | ||
| 113 | from metadata that it adds to the symmetric ciphertext blob. However, | ||
| 114 | it is always recommended as a best practice. This practice ensures that | ||
| 115 | you use the CMK that you intend. | ||
| 116 | |||
| 117 | To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. | ||
| 118 | When using an alias name, prefix it with C<"alias/">. To specify a CMK | ||
| 119 | in a different AWS account, you must use the key ARN or alias ARN. | ||
| 120 | |||
| 121 | For example: | ||
| 122 | |||
| 123 | =over | ||
| 124 | |||
| 125 | =item * | ||
| 126 | |||
| 127 | Key ID: C<1234abcd-12ab-34cd-56ef-1234567890ab> | ||
| 128 | |||
| 129 | =item * | ||
| 130 | |||
| 131 | Key ARN: | ||
| 132 | C<arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab> | ||
| 133 | |||
| 134 | =item * | ||
| 135 | |||
| 136 | Alias name: C<alias/ExampleAlias> | ||
| 137 | |||
| 138 | =item * | ||
| 139 | |||
| 140 | Alias ARN: C<arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias> | ||
| 141 | |||
| 142 | =back | ||
| 143 | |||
| 144 | To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. | ||
| 145 | To get the alias name and alias ARN, use ListAliases. | ||
| 146 | |||
| 147 | |||
| 148 | |||
| 149 | |||
| 150 | =head1 SEE ALSO | ||
| 151 | |||
| 152 | This class forms part of L<Paws>, documenting arguments for method Decrypt in L<Paws::KMS> | ||
| 153 | |||
| 154 | =head1 BUGS and CONTRIBUTIONS | ||
| 155 | |||
| 156 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 157 | |||
| 158 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 159 | |||
| 160 | =cut | ||
| 161 |