key_groups
Creates, updates, deletes or gets a key_group
resource or lists key_groups
in a region
Overview
Name | key_groups |
Type | Resource |
Description | Resource Type definition for AWS::CloudFront::KeyGroup |
Id | aws.cloudfront.key_groups |
Fields
Name | Datatype | Description |
---|---|---|
id | string | |
key_group_config | object | |
last_modified_time | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | KeyGroupConfig, 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 key_groups
in a region.
SELECT
region,
id,
key_group_config,
last_modified_time
FROM aws.cloudfront.key_groups
;
Gets all properties from an individual key_group
.
SELECT
region,
id,
key_group_config,
last_modified_time
FROM aws.cloudfront.key_groups
WHERE data__Identifier = '<Id>';
INSERT
example
Use the following StackQL query and manifest file to create a new key_group
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cloudfront.key_groups (
KeyGroupConfig,
region
)
SELECT
'{{ KeyGroupConfig }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cloudfront.key_groups (
KeyGroupConfig,
region
)
SELECT
'{{ KeyGroupConfig }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: key_group
props:
- name: KeyGroupConfig
value:
Comment: '{{ Comment }}'
Items:
- '{{ Items[0] }}'
Name: '{{ Name }}'
DELETE
example
/*+ delete */
DELETE FROM aws.cloudfront.key_groups
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the key_groups
resource, the following permissions are required:
Create
cloudfront:CreateKeyGroup
Delete
cloudfront:DeleteKeyGroup,
cloudfront:GetKeyGroup
List
cloudfront:ListKeyGroups
Read
cloudfront:GetKeyGroup
Update
cloudfront:UpdateKeyGroup,
cloudfront:GetKeyGroup