origin_request_policies
Creates, updates, deletes or gets an origin_request_policy
resource or lists origin_request_policies
in a region
Overview
Name | origin_request_policies |
Type | Resource |
Description | Resource Type definition for AWS::CloudFront::OriginRequestPolicy |
Id | aws.cloudfront.origin_request_policies |
Fields
Name | Datatype | Description |
---|---|---|
id | string | |
last_modified_time | string | |
origin_request_policy_config | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | OriginRequestPolicyConfig, 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 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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cloudfront.origin_request_policies (
OriginRequestPolicyConfig,
region
)
SELECT
'{{ OriginRequestPolicyConfig }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cloudfront.origin_request_policies (
OriginRequestPolicyConfig,
region
)
SELECT
'{{ OriginRequestPolicyConfig }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: origin_request_policy
props:
- name: OriginRequestPolicyConfig
value:
Comment: '{{ Comment }}'
CookiesConfig:
CookieBehavior: '{{ CookieBehavior }}'
Cookies:
- '{{ Cookies[0] }}'
HeadersConfig:
HeaderBehavior: '{{ HeaderBehavior }}'
Headers:
- '{{ Headers[0] }}'
Name: '{{ Name }}'
QueryStringsConfig:
QueryStringBehavior: '{{ QueryStringBehavior }}'
QueryStrings:
- '{{ QueryStrings[0] }}'
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