cloud_front_origin_access_identities
Creates, updates, deletes, gets or lists a cloud_front_origin_access_identities resource.
Overview
| Name | cloud_front_origin_access_identities |
| Type | Resource |
| Id | aws.cloudfront.cloud_front_origin_access_identities |
Fields
The following fields are returned by SELECT queries:
- get_cloud_front_origin_access_identity
- list_cloud_front_origin_access_identities
| Name | Datatype | Description |
|---|---|---|
cloud_front_origin_access_identity_config | string | The current configuration information for the identity. |
id | string | The ID for the origin access identity, for example, E74FTE3AJFJ256A. |
s3_canonical_user_id | string | The Amazon S3 canonical user ID for the origin access identity, used when giving the origin access identity read permission to an object in Amazon S3. |
| Name | Datatype | Description |
|---|---|---|
is_truncated | boolean | A flag that indicates whether more origin access identities remain to be listed. If your results were truncated, you can make a follow-up pagination request using the Marker request parameter to retrieve more items in the list. |
items | string | A complex type that contains one CloudFrontOriginAccessIdentitySummary element for each origin access identity that was created by the current Amazon Web Services account. |
marker | string | Use this when paginating results to indicate where to begin in your list of origin access identities. The results include identities in the list that occur after the marker. To get the next page of results, set the Marker to the value of the NextMarker from the current page's response (which is also the ID of the last identity on that page). |
max_items | integer | The maximum number of origin access identities you want in the response body. |
next_marker | string | If IsTruncated is true, this element is present and contains the value you can use for the Marker request parameter to continue listing your origin access identities where they left off. |
quantity | integer | The number of CloudFront origin access identities that were created by the current Amazon Web Services account. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_cloud_front_origin_access_identity | select | id, region | Get the information about an origin access identity. | |
list_cloud_front_origin_access_identities | select | region | Marker, MaxItems | Lists origin access identities. |
create_cloud_front_origin_access_identity | insert | region, CloudFrontOriginAccessIdentityConfig | Creates a new origin access identity. If you're using Amazon S3 for your origin, you can use an origin access identity to require users to access your content using a CloudFront URL instead of the Amazon S3 URL. For more information about how to use origin access identities, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide. | |
update_cloud_front_origin_access_identity | update | id, region, CloudFrontOriginAccessIdentityConfig | If-Match | Update an origin access identity. |
delete_cloud_front_origin_access_identity | delete | id, region | If-Match | Delete an origin access identity. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
id | string | The origin access identity's ID. |
region | string | AWS region (default: us-east-1) |
If-Match | string | The value of the ETag header you received from a previous GET or PUT request. For example: E2QWRUHAPOMQZL. |
Marker | string | Use this when paginating results to indicate where to begin in your list of origin access identities. The results include identities in the list that occur after the marker. To get the next page of results, set the Marker to the value of the NextMarker from the current page's response (which is also the ID of the last identity on that page). |
MaxItems | string | The maximum number of origin access identities you want in the response body. |
SELECT examples
- get_cloud_front_origin_access_identity
- list_cloud_front_origin_access_identities
Get the information about an origin access identity.
SELECT
cloud_front_origin_access_identity_config,
id,
s3_canonical_user_id
FROM aws.cloudfront.cloud_front_origin_access_identities
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;
Lists origin access identities.
SELECT
is_truncated,
items,
marker,
max_items,
next_marker,
quantity
FROM aws.cloudfront.cloud_front_origin_access_identities
WHERE region = '{{ region }}' -- required
AND Marker = '{{ Marker }}'
AND MaxItems = '{{ MaxItems }}'
;
INSERT examples
- create_cloud_front_origin_access_identity
- Manifest
Creates a new origin access identity. If you're using Amazon S3 for your origin, you can use an origin access identity to require users to access your content using a CloudFront URL instead of the Amazon S3 URL. For more information about how to use origin access identities, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide.
INSERT INTO aws.cloudfront.cloud_front_origin_access_identities (
CloudFrontOriginAccessIdentityConfig,
region
)
SELECT
'{{ CloudFrontOriginAccessIdentityConfig }}' /* required */,
'{{ region }}'
RETURNING
cloud_front_origin_access_identity_config,
id,
s3_canonical_user_id
;
# Description fields are for documentation purposes
- name: cloud_front_origin_access_identities
props:
- name: region
value: "{{ region }}"
description: Required parameter for the cloud_front_origin_access_identities resource.
- name: CloudFrontOriginAccessIdentityConfig
description: |
Origin access identity configuration. Send a GET request to the /CloudFront API version/CloudFront/identity ID/config resource.
value:
CallerReference: "{{ CallerReference }}"
Comment: "{{ Comment }}"
UPDATE examples
- update_cloud_front_origin_access_identity
Update an origin access identity.
UPDATE aws.cloudfront.cloud_front_origin_access_identities
SET
CloudFrontOriginAccessIdentityConfig = '{{ CloudFrontOriginAccessIdentityConfig }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND CloudFrontOriginAccessIdentityConfig = '{{ CloudFrontOriginAccessIdentityConfig }}' --required
AND `If-Match` = '{{ If-Match}}'
RETURNING
cloud_front_origin_access_identity_config,
id,
s3_canonical_user_id;
DELETE examples
- delete_cloud_front_origin_access_identity
Delete an origin access identity.
DELETE FROM aws.cloudfront.cloud_front_origin_access_identities
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND `If-Match` = '{{ If-Match }}'
;