public_keys
Creates, updates, deletes or gets a public_key
resource or lists public_keys
in a region
Overview
Name | public_keys |
Type | Resource |
Description | Resource Type definition for AWS::CloudFront::PublicKey |
Id | aws.cloudfront.public_keys |
Fields
Name | Datatype | Description |
---|---|---|
created_time | string | |
id | string | |
public_key_config | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | PublicKeyConfig, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cloudfront.public_keys (
PublicKeyConfig,
region
)
SELECT
'{{ PublicKeyConfig }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cloudfront.public_keys (
PublicKeyConfig,
region
)
SELECT
'{{ PublicKeyConfig }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: public_key
props:
- name: PublicKeyConfig
value:
CallerReference: '{{ CallerReference }}'
Comment: '{{ Comment }}'
EncodedKey: '{{ EncodedKey }}'
Name: '{{ Name }}'
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