Skip to content

aws.cloudfront.get_response_headers_policy

Example SQL Queries

SELECT * FROM
aws.cloudfront.get_response_headers_policy
WHERE
"id" = 'VALUE';

Description

Gets a response headers policy, including metadata (the policy's identifier and the date and time when the policy was last modified).

To get a response headers policy, 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.

Table Definition

Column NameColumn Data Type
id Required Input Column

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.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

e_tag

The version identifier for the current version of the response headers policy.

VARCHAR
response_headers_policy

Contains a response headers policy.

STRUCT(
"id" VARCHAR,
"last_modified_time" TIMESTAMP_S,
"response_headers_policy_config" STRUCT(
"comment" VARCHAR,
"name" VARCHAR,
"cors_config" STRUCT(
"access_control_allow_origins" STRUCT(
"quantity" BIGINT,
"items" VARCHAR[]
),
"access_control_allow_headers" STRUCT(
"quantity" BIGINT,
"items" VARCHAR[]
),
"access_control_allow_methods" STRUCT(
"quantity" BIGINT,
"items" VARCHAR[]
),
"access_control_allow_credentials" BOOLEAN,
"access_control_expose_headers" STRUCT(
"quantity" BIGINT,
"items" VARCHAR[]
),
"access_control_max_age_sec" BIGINT,
"origin_override" BOOLEAN
),
"security_headers_config" STRUCT(
"xss_protection" STRUCT(
"override" BOOLEAN,
"protection" BOOLEAN,
"mode_block" BOOLEAN,
"report_uri" VARCHAR
),
"frame_options" STRUCT(
"override" BOOLEAN,
"frame_option" VARCHAR
),
"referrer_policy" STRUCT(
"override" BOOLEAN,
"referrer_policy" VARCHAR
),
"content_security_policy" STRUCT(
"override" BOOLEAN,
"content_security_policy" VARCHAR
),
"content_type_options" STRUCT(
"override" BOOLEAN
),
"strict_transport_security" STRUCT(
"override" BOOLEAN,
"include_subdomains" BOOLEAN,
"preload" BOOLEAN,
"access_control_max_age_sec" BIGINT
)
),
"server_timing_headers_config" STRUCT(
"enabled" BOOLEAN,
"sampling_rate" DOUBLE
),
"custom_headers_config" STRUCT(
"quantity" BIGINT,
"items" STRUCT(
"header" VARCHAR,
"value" VARCHAR,
"override" BOOLEAN
)[]
),
"remove_headers_config" STRUCT(
"quantity" BIGINT,
"items" STRUCT(
"header" VARCHAR
)[]
)
)
)
Show child fields
response_headers_policy.id

The identifier for the response headers policy.

response_headers_policy.last_modified_time

The date and time when the response headers policy was last modified.

response_headers_policy.response_headers_policy_config

A response headers policy configuration.

Show child fields
response_headers_policy.response_headers_policy_config.comment

A comment to describe the response headers policy.

The comment cannot be longer than 128 characters.

response_headers_policy.response_headers_policy_config.cors_config

A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).

Show child fields
response_headers_policy.response_headers_policy_config.cors_config.access_control_allow_credentials

A Boolean that CloudFront uses as the value for the Access-Control-Allow-Credentials HTTP response header.

For more information about the Access-Control-Allow-Credentials HTTP response header, see Access-Control-Allow-Credentials in the MDN Web Docs.

response_headers_policy.response_headers_policy_config.cors_config.access_control_allow_headers

A list of HTTP header names that CloudFront includes as values for the Access-Control-Allow-Headers HTTP response header.

For more information about the Access-Control-Allow-Headers HTTP response header, see Access-Control-Allow-Headers in the MDN Web Docs.

Show child fields
response_headers_policy.response_headers_policy_config.cors_config.access_control_allow_headers.items[]
response_headers_policy.response_headers_policy_config.cors_config.access_control_allow_headers.quantity

The number of HTTP header names in the list.

response_headers_policy.response_headers_policy_config.cors_config.access_control_allow_methods

A list of HTTP methods that CloudFront includes as values for the Access-Control-Allow-Methods HTTP response header.

For more information about the Access-Control-Allow-Methods HTTP response header, see Access-Control-Allow-Methods in the MDN Web Docs.

Show child fields
response_headers_policy.response_headers_policy_config.cors_config.access_control_allow_methods.items[]
response_headers_policy.response_headers_policy_config.cors_config.access_control_allow_methods.quantity

The number of HTTP methods in the list.

response_headers_policy.response_headers_policy_config.cors_config.access_control_allow_origins

A list of origins (domain names) that CloudFront can use as the value for the Access-Control-Allow-Origin HTTP response header.

For more information about the Access-Control-Allow-Origin HTTP response header, see Access-Control-Allow-Origin in the MDN Web Docs.

Show child fields
response_headers_policy.response_headers_policy_config.cors_config.access_control_allow_origins.items[]
response_headers_policy.response_headers_policy_config.cors_config.access_control_allow_origins.quantity

The number of origins in the list.

response_headers_policy.response_headers_policy_config.cors_config.access_control_expose_headers

A list of HTTP headers that CloudFront includes as values for the Access-Control-Expose-Headers HTTP response header.

For more information about the Access-Control-Expose-Headers HTTP response header, see Access-Control-Expose-Headers in the MDN Web Docs.

Show child fields
response_headers_policy.response_headers_policy_config.cors_config.access_control_expose_headers.items[]
response_headers_policy.response_headers_policy_config.cors_config.access_control_expose_headers.quantity

The number of HTTP headers in the list.

response_headers_policy.response_headers_policy_config.cors_config.access_control_max_age_sec

A number that CloudFront uses as the value for the Access-Control-Max-Age HTTP response header.

For more information about the Access-Control-Max-Age HTTP response header, see Access-Control-Max-Age in the MDN Web Docs.

response_headers_policy.response_headers_policy_config.cors_config.origin_override

A Boolean that determines whether CloudFront overrides HTTP response headers received from the origin with the ones specified in this response headers policy.

response_headers_policy.response_headers_policy_config.custom_headers_config

A configuration for a set of custom HTTP response headers.

Show child fields
response_headers_policy.response_headers_policy_config.custom_headers_config.items[]
Show child fields
response_headers_policy.response_headers_policy_config.custom_headers_config.items[].header

The HTTP response header name.

response_headers_policy.response_headers_policy_config.custom_headers_config.items[].override

A Boolean that determines whether CloudFront overrides a response header with the same name received from the origin with the header specified here.

response_headers_policy.response_headers_policy_config.custom_headers_config.items[].value

The value for the HTTP response header.

response_headers_policy.response_headers_policy_config.custom_headers_config.quantity

The number of HTTP response headers in the list.

response_headers_policy.response_headers_policy_config.name

A name to identify the response headers policy.

The name must be unique for response headers policies in this Amazon Web Services account.

response_headers_policy.response_headers_policy_config.remove_headers_config

A configuration for a set of HTTP headers to remove from the HTTP response.

Show child fields
response_headers_policy.response_headers_policy_config.remove_headers_config.items[]
Show child fields
response_headers_policy.response_headers_policy_config.remove_headers_config.items[].header

The HTTP header name.

response_headers_policy.response_headers_policy_config.remove_headers_config.quantity

The number of HTTP header names in the list.

response_headers_policy.response_headers_policy_config.security_headers_config

A configuration for a set of security-related HTTP response headers.

Show child fields
response_headers_policy.response_headers_policy_config.security_headers_config.content_security_policy

The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header.

For more information about the Content-Security-Policy HTTP response header, see Content-Security-Policy in the MDN Web Docs.

Show child fields
response_headers_policy.response_headers_policy_config.security_headers_config.content_security_policy.content_security_policy

The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header.

response_headers_policy.response_headers_policy_config.security_headers_config.content_security_policy.override

A Boolean that determines whether CloudFront overrides the Content-Security-Policy HTTP response header received from the origin with the one specified in this response headers policy.

response_headers_policy.response_headers_policy_config.security_headers_config.content_type_options

Determines whether CloudFront includes the X-Content-Type-Options HTTP response header with its value set to nosniff.

For more information about the X-Content-Type-Options HTTP response header, see X-Content-Type-Options in the MDN Web Docs.

Show child fields
response_headers_policy.response_headers_policy_config.security_headers_config.content_type_options.override

A Boolean that determines whether CloudFront overrides the X-Content-Type-Options HTTP response header received from the origin with the one specified in this response headers policy.

response_headers_policy.response_headers_policy_config.security_headers_config.frame_options

Determines whether CloudFront includes the X-Frame-Options HTTP response header and the header's value.

For more information about the X-Frame-Options HTTP response header, see X-Frame-Options in the MDN Web Docs.

Show child fields
response_headers_policy.response_headers_policy_config.security_headers_config.frame_options.frame_option

The value of the X-Frame-Options HTTP response header. Valid values are DENY and SAMEORIGIN.

For more information about these values, see X-Frame-Options in the MDN Web Docs.

response_headers_policy.response_headers_policy_config.security_headers_config.frame_options.override

A Boolean that determines whether CloudFront overrides the X-Frame-Options HTTP response header received from the origin with the one specified in this response headers policy.

response_headers_policy.response_headers_policy_config.security_headers_config.referrer_policy

Determines whether CloudFront includes the Referrer-Policy HTTP response header and the header's value.

For more information about the Referrer-Policy HTTP response header, see Referrer-Policy in the MDN Web Docs.

Show child fields
response_headers_policy.response_headers_policy_config.security_headers_config.referrer_policy.override

A Boolean that determines whether CloudFront overrides the Referrer-Policy HTTP response header received from the origin with the one specified in this response headers policy.

response_headers_policy.response_headers_policy_config.security_headers_config.referrer_policy.referrer_policy

The value of the Referrer-Policy HTTP response header. Valid values are:

  • no-referrer

  • no-referrer-when-downgrade

  • origin

  • origin-when-cross-origin

  • same-origin

  • strict-origin

  • strict-origin-when-cross-origin

  • unsafe-url

For more information about these values, see Referrer-Policy in the MDN Web Docs.

response_headers_policy.response_headers_policy_config.security_headers_config.strict_transport_security

Determines whether CloudFront includes the Strict-Transport-Security HTTP response header and the header's value.

For more information about the Strict-Transport-Security HTTP response header, see Security headers in the Amazon CloudFront Developer Guide and Strict-Transport-Security in the MDN Web Docs.

Show child fields
response_headers_policy.response_headers_policy_config.security_headers_config.strict_transport_security.access_control_max_age_sec

A number that CloudFront uses as the value for the max-age directive in the Strict-Transport-Security HTTP response header.

response_headers_policy.response_headers_policy_config.security_headers_config.strict_transport_security.include_subdomains

A Boolean that determines whether CloudFront includes the includeSubDomains directive in the Strict-Transport-Security HTTP response header.

response_headers_policy.response_headers_policy_config.security_headers_config.strict_transport_security.override

A Boolean that determines whether CloudFront overrides the Strict-Transport-Security HTTP response header received from the origin with the one specified in this response headers policy.

response_headers_policy.response_headers_policy_config.security_headers_config.strict_transport_security.preload

A Boolean that determines whether CloudFront includes the preload directive in the Strict-Transport-Security HTTP response header.

response_headers_policy.response_headers_policy_config.security_headers_config.xss_protection

Determines whether CloudFront includes the X-XSS-Protection HTTP response header and the header's value.

For more information about the X-XSS-Protection HTTP response header, see X-XSS-Protection in the MDN Web Docs.

Show child fields
response_headers_policy.response_headers_policy_config.security_headers_config.xss_protection.mode_block

A Boolean that determines whether CloudFront includes the mode=block directive in the X-XSS-Protection header.

For more information about this directive, see X-XSS-Protection in the MDN Web Docs.

response_headers_policy.response_headers_policy_config.security_headers_config.xss_protection.override

A Boolean that determines whether CloudFront overrides the X-XSS-Protection HTTP response header received from the origin with the one specified in this response headers policy.

response_headers_policy.response_headers_policy_config.security_headers_config.xss_protection.protection

A Boolean that determines the value of the X-XSS-Protection HTTP response header. When this setting is true, the value of the X-XSS-Protection header is 1. When this setting is false, the value of the X-XSS-Protection header is 0.

For more information about these settings, see X-XSS-Protection in the MDN Web Docs.

response_headers_policy.response_headers_policy_config.security_headers_config.xss_protection.report_uri

A reporting URI, which CloudFront uses as the value of the report directive in the X-XSS-Protection header.

You cannot specify a ReportUri when ModeBlock is true.

For more information about using a reporting URL, see X-XSS-Protection in the MDN Web Docs.

response_headers_policy.response_headers_policy_config.server_timing_headers_config

A configuration for enabling the Server-Timing header in HTTP responses sent from CloudFront.

Show child fields
response_headers_policy.response_headers_policy_config.server_timing_headers_config.enabled

A Boolean that determines whether CloudFront adds the Server-Timing header to HTTP responses that it sends in response to requests that match a cache behavior that's associated with this response headers policy.

response_headers_policy.response_headers_policy_config.server_timing_headers_config.sampling_rate

A number 0–100 (inclusive) that specifies the percentage of responses that you want CloudFront to add the Server-Timing header to. When you set the sampling rate to 100, CloudFront adds the Server-Timing header to the HTTP response for every request that matches the cache behavior that this response headers policy is attached to. When you set it to 50, CloudFront adds the header to 50% of the responses for requests that match the cache behavior. You can set the sampling rate to any number 0–100 with up to four decimal places.