Skip to main content

public_keys

Creates, updates, deletes or gets a public_key resource or lists public_keys in a region

Overview

Namepublic_keys
TypeResource
DescriptionA public key that you can use with [signed URLs and signed cookies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html), or with [field-level encryption](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html).
Idaws.cloudfront.public_keys

Fields

NameDatatypeDescription
created_timestring
idstring
public_key_configobjectConfiguration information about a public key that you can use with [signed URLs and signed cookies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html), or with [field-level encryption](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html).
regionstringAWS region.

For more information, see AWS::CloudFront::PublicKey.

Methods

NameAccessible byRequired Params
create_resourceINSERTPublicKeyConfig, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all public_keys in a region.

SELECT
region,
created_time,
id,
public_key_config
FROM aws.cloudfront.public_keys
;

Gets all properties from an individual public_key.

SELECT
region,
created_time,
id,
public_key_config
FROM aws.cloudfront.public_keys
WHERE data__Identifier = '<Id>';

INSERT example

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

/*+ create */
INSERT INTO aws.cloudfront.public_keys (
PublicKeyConfig,
region
)
SELECT
'{{ PublicKeyConfig }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.cloudfront.public_keys
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

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

Create

cloudfront:CreatePublicKey

Delete

cloudfront:DeletePublicKey,
cloudfront:GetPublicKey

List

cloudfront:ListPublicKeys

Read

cloudfront:GetPublicKey

Update

cloudfront:UpdatePublicKey,
cloudfront:GetPublicKey