Skip to main content

cloud_front_origin_access_identities

Creates, updates, deletes or gets a cloud_front_origin_access_identity resource or lists cloud_front_origin_access_identities in a region

Overview

Namecloud_front_origin_access_identities
TypeResource
DescriptionThe request to create a new origin access identity (OAI). An origin access identity is a special CloudFront user that you can associate with Amazon S3 origins, so that you can secure all or just some of your Amazon S3 content. For more information, see [Restricting Access to Amazon S3 Content by Using an Origin Access Identity](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html) in the *Amazon CloudFront Developer Guide*.
Idawscc.cloudfront.cloud_front_origin_access_identities

Fields

NameDatatypeDescription
cloud_front_origin_access_identity_configobjectThe current configuration information for the identity.
idstring
s3_canonical_user_idstring
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcecloud_front_origin_access_identitiesINSERTCloudFrontOriginAccessIdentityConfig, region
delete_resourcecloud_front_origin_access_identitiesDELETEIdentifier, region
update_resourcecloud_front_origin_access_identitiesUPDATEIdentifier, PatchDocument, region
list_resourcescloud_front_origin_access_identities_list_onlySELECTregion
get_resourcecloud_front_origin_access_identitiesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual cloud_front_origin_access_identity.

SELECT
region,
cloud_front_origin_access_identity_config,
id,
s3_canonical_user_id
FROM awscc.cloudfront.cloud_front_origin_access_identities
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.cloudfront.cloud_front_origin_access_identities (
CloudFrontOriginAccessIdentityConfig,
region
)
SELECT
'{{ cloud_front_origin_access_identity_config }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a cloud_front_origin_access_identity resource, using stack-deploy.

/*+ update */
UPDATE awscc.cloudfront.cloud_front_origin_access_identities
SET PatchDocument = string('{{ {
"CloudFrontOriginAccessIdentityConfig": cloud_front_origin_access_identity_config
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.cloudfront.cloud_front_origin_access_identities
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';

Permissions

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

cloudfront:CreateCloudFrontOriginAccessIdentity