response_headers_policies
Creates, updates, deletes or gets a response_headers_policy
resource or lists response_headers_policies
in a region
Overview
Name | response_headers_policies |
Type | Resource |
Description | Resource Type definition for AWS::CloudFront::ResponseHeadersPolicy |
Id | aws.cloudfront.response_headers_policies |
Fields
Name | Datatype | Description |
---|---|---|
id | string | |
last_modified_time | string | |
response_headers_policy_config | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ResponseHeadersPolicyConfig, 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 response_headers_policies
in a region.
SELECT
region,
id,
last_modified_time,
response_headers_policy_config
FROM aws.cloudfront.response_headers_policies
;
Gets all properties from an individual response_headers_policy
.
SELECT
region,
id,
last_modified_time,
response_headers_policy_config
FROM aws.cloudfront.response_headers_policies
WHERE data__Identifier = '<Id>';
INSERT
example
Use the following StackQL query and manifest file to create a new response_headers_policy
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cloudfront.response_headers_policies (
ResponseHeadersPolicyConfig,
region
)
SELECT
'{{ ResponseHeadersPolicyConfig }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cloudfront.response_headers_policies (
ResponseHeadersPolicyConfig,
region
)
SELECT
'{{ ResponseHeadersPolicyConfig }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: response_headers_policy
props:
- name: ResponseHeadersPolicyConfig
value:
Comment: '{{ Comment }}'
CorsConfig:
AccessControlAllowCredentials: '{{ AccessControlAllowCredentials }}'
AccessControlAllowHeaders:
Items:
- '{{ Items[0] }}'
AccessControlAllowMethods:
Items:
- '{{ Items[0] }}'
AccessControlAllowOrigins:
Items:
- '{{ Items[0] }}'
AccessControlExposeHeaders:
Items:
- '{{ Items[0] }}'
AccessControlMaxAgeSec: '{{ AccessControlMaxAgeSec }}'
OriginOverride: '{{ OriginOverride }}'
CustomHeadersConfig:
Items:
- Header: '{{ Header }}'
Override: '{{ Override }}'
Value: '{{ Value }}'
Name: '{{ Name }}'
RemoveHeadersConfig:
Items:
- Header: '{{ Header }}'
SecurityHeadersConfig:
ContentSecurityPolicy:
ContentSecurityPolicy: '{{ ContentSecurityPolicy }}'
Override: '{{ Override }}'
ContentTypeOptions:
Override: '{{ Override }}'
FrameOptions:
FrameOption: '{{ FrameOption }}'
Override: '{{ Override }}'
ReferrerPolicy:
Override: '{{ Override }}'
ReferrerPolicy: '{{ ReferrerPolicy }}'
StrictTransportSecurity:
AccessControlMaxAgeSec: '{{ AccessControlMaxAgeSec }}'
IncludeSubdomains: '{{ IncludeSubdomains }}'
Override: '{{ Override }}'
Preload: '{{ Preload }}'
XSSProtection:
ModeBlock: '{{ ModeBlock }}'
Override: '{{ Override }}'
Protection: '{{ Protection }}'
ReportUri: '{{ ReportUri }}'
ServerTimingHeadersConfig:
Enabled: '{{ Enabled }}'
SamplingRate: null
DELETE
example
/*+ delete */
DELETE FROM aws.cloudfront.response_headers_policies
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the response_headers_policies
resource, the following permissions are required:
Create
cloudfront:CreateResponseHeadersPolicy
Delete
cloudfront:DeleteResponseHeadersPolicy,
cloudfront:GetResponseHeadersPolicy
List
cloudfront:ListResponseHeadersPolicies
Read
cloudfront:GetResponseHeadersPolicy
Update
cloudfront:UpdateResponseHeadersPolicy,
cloudfront:GetResponseHeadersPolicy