Skip to main content

keys

Creates, updates, deletes or gets a key resource or lists keys in a region

Overview

Namekeys
TypeResource
DescriptionDefinition of AWS::PaymentCryptography::Key Resource Type
Idaws.paymentcryptography.keys

Fields

NameDatatypeDescription
enabledboolean
exportableboolean
key_attributesobject
key_check_value_algorithmstring
key_identifierstring
key_originstringDefines the source of a key
key_statestringDefines the state of a key
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTExportable, KeyAttributes, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all keys in a region.

SELECT
region,
enabled,
exportable,
key_attributes,
key_check_value_algorithm,
key_identifier,
key_origin,
key_state,
tags
FROM aws.paymentcryptography.keys
WHERE region = 'us-east-1';

Gets all properties from an individual key.

SELECT
region,
enabled,
exportable,
key_attributes,
key_check_value_algorithm,
key_identifier,
key_origin,
key_state,
tags
FROM aws.paymentcryptography.keys
WHERE region = 'us-east-1' AND data__Identifier = '<KeyIdentifier>';

INSERT example

Use the following StackQL query and manifest file to create a new key resource, using stack-deploy.

/*+ create */
INSERT INTO aws.paymentcryptography.keys (
Exportable,
KeyAttributes,
region
)
SELECT
'{{ Exportable }}',
'{{ KeyAttributes }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.paymentcryptography.keys
WHERE data__Identifier = '<KeyIdentifier>'
AND region = 'us-east-1';

Permissions

To operate on the keys resource, the following permissions are required:

Create

payment-cryptography:GetKey,
payment-cryptography:CreateKey,
payment-cryptography:TagResource

Read

payment-cryptography:GetKey,
payment-cryptography:ListTagsForResource

Update

payment-cryptography:GetKey,
payment-cryptography:ListTagsForResource,
payment-cryptography:TagResource,
payment-cryptography:UntagResource,
payment-cryptography:StartKeyUsage,
payment-cryptography:StopKeyUsage

Delete

payment-cryptography:GetKey,
payment-cryptography:DeleteKey

List

payment-cryptography:ListKeys