response_headers_policy_configs
Creates, updates, deletes, gets or lists a response_headers_policy_configs resource.
Overview
| Name | response_headers_policy_configs |
| Type | Resource |
| Id | aws.cloudfront.response_headers_policy_configs |
Fields
The following fields are returned by SELECT queries:
- get_response_headers_policy_config
| Name | Datatype | Description |
|---|---|---|
comment | string | A comment to describe the response headers policy. The comment cannot be longer than 128 characters. |
cors_config | string | A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS). |
custom_headers_config | string | A configuration for a set of custom HTTP response headers. |
name | string | A name to identify the response headers policy. The name must be unique for response headers policies in this Amazon Web Services account. |
remove_headers_config | string | A configuration for a set of HTTP headers to remove from the HTTP response. |
security_headers_config | string | A configuration for a set of security-related HTTP response headers. |
server_timing_headers_config | string | A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_response_headers_policy_config | select | id, region | Gets a response headers policy configuration. To get a response headers policy configuration, you must provide the policy's identifier. If the response headers policy is attached to a distribution's cache behavior, you can get the policy's identifier using ListDistributions or GetDistribution. If the response headers policy is not attached to a cache behavior, you can get the identifier using ListResponseHeadersPolicies. |
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 identifier for the response headers policy. If the response headers policy is attached to a distribution's cache behavior, you can get the policy's identifier using ListDistributions or GetDistribution. If the response headers policy is not attached to a cache behavior, you can get the identifier using ListResponseHeadersPolicies. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_response_headers_policy_config
Gets a response headers policy configuration. To get a response headers policy configuration, you must provide the policy's identifier. If the response headers policy is attached to a distribution's cache behavior, you can get the policy's identifier using ListDistributions or GetDistribution. If the response headers policy is not attached to a cache behavior, you can get the identifier using ListResponseHeadersPolicies.
SELECT
comment,
cors_config,
custom_headers_config,
name,
remove_headers_config,
security_headers_config,
server_timing_headers_config
FROM aws.cloudfront.response_headers_policy_configs
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;