Skip to main content

origin_request_policies

Creates, updates, deletes or gets an origin_request_policy resource or lists origin_request_policies in a region

Overview

Nameorigin_request_policies
TypeResource
DescriptionResource Type definition for AWS::CloudFront::OriginRequestPolicy
Idaws.cloudfront.origin_request_policies

Fields

NameDatatypeDescription
idstring
last_modified_timestring
origin_request_policy_configobject
regionstringAWS region.

Methods

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

SELECT examples

Gets all origin_request_policies in a region.

SELECT
region,
id,
last_modified_time,
origin_request_policy_config
FROM aws.cloudfront.origin_request_policies
;

Gets all properties from an individual origin_request_policy.

SELECT
region,
id,
last_modified_time,
origin_request_policy_config
FROM aws.cloudfront.origin_request_policies
WHERE data__Identifier = '<Id>';

INSERT example

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

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

DELETE example

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

Permissions

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

Create

cloudfront:CreateOriginRequestPolicy

Delete

cloudfront:DeleteOriginRequestPolicy,
cloudfront:GetOriginRequestPolicy

List

cloudfront:ListOriginRequestPolicies

Read

cloudfront:GetOriginRequestPolicy

Update

cloudfront:UpdateOriginRequestPolicy,
cloudfront:GetOriginRequestPolicy