Class: Aws::CloudFront::Types::CreateResponseHeadersPolicyRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-cloudfront/lib/aws-sdk-cloudfront/types.rb

Overview

Note:

When making an API call, you may pass CreateResponseHeadersPolicyRequest data as a hash:

{
  response_headers_policy_config: { # required
    comment: "string",
    name: "string", # required
    cors_config: {
      access_control_allow_origins: { # required
        quantity: 1, # required
        items: ["string"], # required
      },
      access_control_allow_headers: { # required
        quantity: 1, # required
        items: ["string"], # required
      },
      access_control_allow_methods: { # required
        quantity: 1, # required
        items: ["GET"], # required, accepts GET, POST, OPTIONS, PUT, DELETE, PATCH, HEAD, ALL
      },
      access_control_allow_credentials: false, # required
      access_control_expose_headers: {
        quantity: 1, # required
        items: ["string"],
      },
      access_control_max_age_sec: 1,
      origin_override: false, # required
    },
    security_headers_config: {
      xss_protection: {
        override: false, # required
        protection: false, # required
        mode_block: false,
        report_uri: "string",
      },
      frame_options: {
        override: false, # required
        frame_option: "DENY", # required, accepts DENY, SAMEORIGIN
      },
      referrer_policy: {
        override: false, # required
        referrer_policy: "no-referrer", # required, accepts no-referrer, no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
      },
      content_security_policy: {
        override: false, # required
        content_security_policy: "string", # required
      },
      content_type_options: {
        override: false, # required
      },
      strict_transport_security: {
        override: false, # required
        include_subdomains: false,
        preload: false,
        access_control_max_age_sec: 1, # required
      },
    },
    custom_headers_config: {
      quantity: 1, # required
      items: [
        {
          header: "string", # required
          value: "string", # required
          override: false, # required
        },
      ],
    },
    server_timing_headers_config: {
      enabled: false, # required
      sampling_rate: 1.0,
    },
  },
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#response_headers_policy_configTypes::ResponseHeadersPolicyConfig

Contains metadata about the response headers policy, and a set of configurations that specify the response headers.



3119
3120
3121
3122
3123
# File 'gems/aws-sdk-cloudfront/lib/aws-sdk-cloudfront/types.rb', line 3119

class CreateResponseHeadersPolicyRequest < Struct.new(
  :response_headers_policy_config)
  SENSITIVE = []
  include Aws::Structure
end