Skip to main content

response_headers_policies

Creates, updates, deletes or gets a response_headers_policy resource or lists response_headers_policies in a region

Overview

Nameresponse_headers_policies
TypeResource
DescriptionResource Type definition for AWS::CloudFront::ResponseHeadersPolicy
Idaws.cloudfront.response_headers_policies

Fields

NameDatatypeDescription
idstring
last_modified_timestring
response_headers_policy_configobject
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTResponseHeadersPolicyConfig, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

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

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