aws::cloudfront-origin-request-policy

Create a cloudfront origin request policy.

Example

aws::cloudfront-origin-request-policy origin-request-policy-example
    origin-request-policy-config
        default-ttl: 3600
        max-ttl: 86400
        min-ttl: 0
        name: "origin-request-policy-example"

        key-param
            accept-encoding-brotli: true
            accept-encoding-gzip: true

            headers-config
                header-behavior: "whitelist"
                headers: [
                    "example-header1",
                    "example-header2"
                ]
            end

            query-strings-config
                query-string-behavior: "whitelist"
                query-strings: [
                    "example-query1",
                    "example-query2"
                ]
            end

            cookies-config
                cookie-behavior: "whitelist"
                cookies: [
                    "example-cookie1",
                    "example-cookie2"
                ]
            end
        end
    end
end

Attributes

Attribute Description
origin-request-policy-config subresource

The origin request policy configuration. (Required)

cookies-config subresource

The cookies configuration for the origin request policy.

cookie-behavior
The cookie behavior for the origin request policy. Valid values are none, whitelist, allExcept or all. (Required)
cookies set
The cookies for the origin request policy.
headers-config subresource

The headers configuration for the origin request policy.

header-behavior
The header behavior for the origin request policy. Valid values are none, whitelist, allViewer, allExcept or allViewerAndWhitelistCloudFront. (Required)
headers set
The headers for the origin request policy.
query-strings-config subresource

The query strings configuration for the origin request policy.

query-string-behavior
The query string behavior for this origin request policy. Valid values are none, whitelist, allExcept or all. (Required)
query-strings set
The query strings for this origin request policy.
comment
The comment for the origin request policy.
name
The name for the origin request policy. (Required)

Outputs

Attribute Description
id The ID for the origin request policy.