Skip to main content

origin_access_controls

Creates, updates, deletes or gets an origin_access_control resource or lists origin_access_controls in a region

Overview

Nameorigin_access_controls
TypeResource
DescriptionResource Type definition for AWS::CloudFront::OriginAccessControl
Idaws.cloudfront.origin_access_controls

Fields

NameDatatypeDescription
idstring
origin_access_control_configobject
regionstringAWS region.

Methods

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

SELECT examples

Gets all origin_access_controls in a region.

SELECT
region,
id,
origin_access_control_config
FROM aws.cloudfront.origin_access_controls
;

Gets all properties from an individual origin_access_control.

SELECT
region,
id,
origin_access_control_config
FROM aws.cloudfront.origin_access_controls
WHERE data__Identifier = '<Id>';

INSERT example

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

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

DELETE example

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

Permissions

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

Create

cloudfront:CreateOriginAccessControl

Delete

cloudfront:DeleteOriginAccessControl,
cloudfront:GetOriginAccessControl

List

cloudfront:ListOriginAccessControls

Read

cloudfront:GetOriginAccessControl

Update

cloudfront:UpdateOriginAccessControl,
cloudfront:GetOriginAccessControl