| 1 | |||
| 2 | package Paws::KMS::Sign; | ||
| 3 | use Moose; | ||
| 4 | has GrantTokens => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 5 | has KeyId => (is => 'ro', isa => 'Str', required => 1); | ||
| 6 | has Message => (is => 'ro', isa => 'Str', required => 1); | ||
| 7 | has MessageType => (is => 'ro', isa => 'Str'); | ||
| 8 | has SigningAlgorithm => (is => 'ro', isa => 'Str', required => 1); | ||
| 9 | |||
| 10 | use MooseX::ClassAttribute; | ||
| 11 | |||
| 12 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'Sign'); | ||
| 13 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::KMS::SignResponse'); | ||
| 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::Sign - Arguments for method Sign on L<Paws::KMS> | ||
| 22 | |||
| 23 | =head1 DESCRIPTION | ||
| 24 | |||
| 25 | This class represents the parameters used for calling the method Sign on the | ||
| 26 | L<AWS Key Management Service|Paws::KMS> service. Use the attributes of this class | ||
| 27 | as arguments to method Sign. | ||
| 28 | |||
| 29 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to Sign. | ||
| 30 | |||
| 31 | =head1 SYNOPSIS | ||
| 32 | |||
| 33 | my $kms = Paws->service('KMS'); | ||
| 34 | my $SignResponse = $kms->Sign( | ||
| 35 | KeyId => 'MyKeyIdType', | ||
| 36 | Message => 'BlobPlaintextType', | ||
| 37 | SigningAlgorithm => 'RSASSA_PSS_SHA_256', | ||
| 38 | GrantTokens => [ | ||
| 39 | 'MyGrantTokenType', ... # min: 1, max: 8192 | ||
| 40 | ], # OPTIONAL | ||
| 41 | MessageType => 'RAW', # OPTIONAL | ||
| 42 | ); | ||
| 43 | |||
| 44 | # Results: | ||
| 45 | my $KeyId = $SignResponse->KeyId; | ||
| 46 | my $Signature = $SignResponse->Signature; | ||
| 47 | my $SigningAlgorithm = $SignResponse->SigningAlgorithm; | ||
| 48 | |||
| 49 | # Returns a L<Paws::KMS::SignResponse> 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/Sign> | ||
| 53 | |||
| 54 | =head1 ATTRIBUTES | ||
| 55 | |||
| 56 | |||
| 57 | =head2 GrantTokens => ArrayRef[Str|Undef] | ||
| 58 | |||
| 59 | A list of grant tokens. | ||
| 60 | |||
| 61 | Use a grant token when your permission to call this operation comes | ||
| 62 | from a new grant that has not yet achieved I<eventual consistency>. For | ||
| 63 | more information, see Grant token | ||
| 64 | (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) | ||
| 65 | in the I<AWS Key Management Service Developer Guide>. | ||
| 66 | |||
| 67 | |||
| 68 | |||
| 69 | =head2 B<REQUIRED> KeyId => Str | ||
| 70 | |||
| 71 | Identifies an asymmetric CMK. AWS KMS uses the private key in the | ||
| 72 | asymmetric CMK to sign the message. The C<KeyUsage> type of the CMK | ||
| 73 | must be C<SIGN_VERIFY>. To find the C<KeyUsage> of a CMK, use the | ||
| 74 | DescribeKey operation. | ||
| 75 | |||
| 76 | To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. | ||
| 77 | When using an alias name, prefix it with C<"alias/">. To specify a CMK | ||
| 78 | in a different AWS account, you must use the key ARN or alias ARN. | ||
| 79 | |||
| 80 | For example: | ||
| 81 | |||
| 82 | =over | ||
| 83 | |||
| 84 | =item * | ||
| 85 | |||
| 86 | Key ID: C<1234abcd-12ab-34cd-56ef-1234567890ab> | ||
| 87 | |||
| 88 | =item * | ||
| 89 | |||
| 90 | Key ARN: | ||
| 91 | C<arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab> | ||
| 92 | |||
| 93 | =item * | ||
| 94 | |||
| 95 | Alias name: C<alias/ExampleAlias> | ||
| 96 | |||
| 97 | =item * | ||
| 98 | |||
| 99 | Alias ARN: C<arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias> | ||
| 100 | |||
| 101 | =back | ||
| 102 | |||
| 103 | To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. | ||
| 104 | To get the alias name and alias ARN, use ListAliases. | ||
| 105 | |||
| 106 | |||
| 107 | |||
| 108 | =head2 B<REQUIRED> Message => Str | ||
| 109 | |||
| 110 | Specifies the message or message digest to sign. Messages can be 0-4096 | ||
| 111 | bytes. To sign a larger message, provide the message digest. | ||
| 112 | |||
| 113 | If you provide a message, AWS KMS generates a hash digest of the | ||
| 114 | message and then signs it. | ||
| 115 | |||
| 116 | |||
| 117 | |||
| 118 | =head2 MessageType => Str | ||
| 119 | |||
| 120 | Tells AWS KMS whether the value of the C<Message> parameter is a | ||
| 121 | message or message digest. The default value, RAW, indicates a message. | ||
| 122 | To indicate a message digest, enter C<DIGEST>. | ||
| 123 | |||
| 124 | Valid values are: C<"RAW">, C<"DIGEST"> | ||
| 125 | |||
| 126 | =head2 B<REQUIRED> SigningAlgorithm => Str | ||
| 127 | |||
| 128 | Specifies the signing algorithm to use when signing the message. | ||
| 129 | |||
| 130 | Choose an algorithm that is compatible with the type and size of the | ||
| 131 | specified asymmetric CMK. | ||
| 132 | |||
| 133 | Valid values are: C<"RSASSA_PSS_SHA_256">, C<"RSASSA_PSS_SHA_384">, C<"RSASSA_PSS_SHA_512">, C<"RSASSA_PKCS1_V1_5_SHA_256">, C<"RSASSA_PKCS1_V1_5_SHA_384">, C<"RSASSA_PKCS1_V1_5_SHA_512">, C<"ECDSA_SHA_256">, C<"ECDSA_SHA_384">, C<"ECDSA_SHA_512"> | ||
| 134 | |||
| 135 | |||
| 136 | =head1 SEE ALSO | ||
| 137 | |||
| 138 | This class forms part of L<Paws>, documenting arguments for method Sign in L<Paws::KMS> | ||
| 139 | |||
| 140 | =head1 BUGS and CONTRIBUTIONS | ||
| 141 | |||
| 142 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 143 | |||
| 144 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 145 | |||
| 146 | =cut | ||
| 147 |