Class: Aws::CloudFront::Types::UpdateDistributionRequest

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

Overview

Note:

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

{
  distribution_config: { # required
    caller_reference: "string", # required
    aliases: {
      quantity: 1, # required
      items: ["string"],
    },
    default_root_object: "string",
    origins: { # required
      quantity: 1, # required
      items: [ # required
        {
          id: "string", # required
          domain_name: "string", # required
          origin_path: "string",
          custom_headers: {
            quantity: 1, # required
            items: [
              {
                header_name: "string", # required
                header_value: "string", # required
              },
            ],
          },
          s3_origin_config: {
            origin_access_identity: "string", # required
          },
          custom_origin_config: {
            http_port: 1, # required
            https_port: 1, # required
            origin_protocol_policy: "http-only", # required, accepts http-only, match-viewer, https-only
            origin_ssl_protocols: {
              quantity: 1, # required
              items: ["SSLv3"], # required, accepts SSLv3, TLSv1, TLSv1.1, TLSv1.2
            },
            origin_read_timeout: 1,
            origin_keepalive_timeout: 1,
          },
        },
      ],
    },
    origin_groups: {
      quantity: 1, # required
      items: [
        {
          id: "string", # required
          failover_criteria: { # required
            status_codes: { # required
              quantity: 1, # required
              items: [1], # required
            },
          },
          members: { # required
            quantity: 1, # required
            items: [ # required
              {
                origin_id: "string", # required
              },
            ],
          },
        },
      ],
    },
    default_cache_behavior: { # required
      target_origin_id: "string", # required
      forwarded_values: { # required
        query_string: false, # required
        cookies: { # required
          forward: "none", # required, accepts none, whitelist, all
          whitelisted_names: {
            quantity: 1, # required
            items: ["string"],
          },
        },
        headers: {
          quantity: 1, # required
          items: ["string"],
        },
        query_string_cache_keys: {
          quantity: 1, # required
          items: ["string"],
        },
      },
      trusted_signers: { # required
        enabled: false, # required
        quantity: 1, # required
        items: ["string"],
      },
      viewer_protocol_policy: "allow-all", # required, accepts allow-all, https-only, redirect-to-https
      min_ttl: 1, # required
      allowed_methods: {
        quantity: 1, # required
        items: ["GET"], # required, accepts GET, HEAD, POST, PUT, PATCH, OPTIONS, DELETE
        cached_methods: {
          quantity: 1, # required
          items: ["GET"], # required, accepts GET, HEAD, POST, PUT, PATCH, OPTIONS, DELETE
        },
      },
      smooth_streaming: false,
      default_ttl: 1,
      max_ttl: 1,
      compress: false,
      lambda_function_associations: {
        quantity: 1, # required
        items: [
          {
            lambda_function_arn: "LambdaFunctionARN", # required
            event_type: "viewer-request", # required, accepts viewer-request, viewer-response, origin-request, origin-response
            include_body: false,
          },
        ],
      },
      field_level_encryption_id: "string",
    },
    cache_behaviors: {
      quantity: 1, # required
      items: [
        {
          path_pattern: "string", # required
          target_origin_id: "string", # required
          forwarded_values: { # required
            query_string: false, # required
            cookies: { # required
              forward: "none", # required, accepts none, whitelist, all
              whitelisted_names: {
                quantity: 1, # required
                items: ["string"],
              },
            },
            headers: {
              quantity: 1, # required
              items: ["string"],
            },
            query_string_cache_keys: {
              quantity: 1, # required
              items: ["string"],
            },
          },
          trusted_signers: { # required
            enabled: false, # required
            quantity: 1, # required
            items: ["string"],
          },
          viewer_protocol_policy: "allow-all", # required, accepts allow-all, https-only, redirect-to-https
          min_ttl: 1, # required
          allowed_methods: {
            quantity: 1, # required
            items: ["GET"], # required, accepts GET, HEAD, POST, PUT, PATCH, OPTIONS, DELETE
            cached_methods: {
              quantity: 1, # required
              items: ["GET"], # required, accepts GET, HEAD, POST, PUT, PATCH, OPTIONS, DELETE
            },
          },
          smooth_streaming: false,
          default_ttl: 1,
          max_ttl: 1,
          compress: false,
          lambda_function_associations: {
            quantity: 1, # required
            items: [
              {
                lambda_function_arn: "LambdaFunctionARN", # required
                event_type: "viewer-request", # required, accepts viewer-request, viewer-response, origin-request, origin-response
                include_body: false,
              },
            ],
          },
          field_level_encryption_id: "string",
        },
      ],
    },
    custom_error_responses: {
      quantity: 1, # required
      items: [
        {
          error_code: 1, # required
          response_page_path: "string",
          response_code: "string",
          error_caching_min_ttl: 1,
        },
      ],
    },
    comment: "CommentType", # required
    logging: {
      enabled: false, # required
      include_cookies: false, # required
      bucket: "string", # required
      prefix: "string", # required
    },
    price_class: "PriceClass_100", # accepts PriceClass_100, PriceClass_200, PriceClass_All
    enabled: false, # required
    viewer_certificate: {
      cloud_front_default_certificate: false,
      iam_certificate_id: "string",
      acm_certificate_arn: "string",
      ssl_support_method: "sni-only", # accepts sni-only, vip
      minimum_protocol_version: "SSLv3", # accepts SSLv3, TLSv1, TLSv1_2016, TLSv1.1_2016, TLSv1.2_2018
      certificate: "string",
      certificate_source: "cloudfront", # accepts cloudfront, iam, acm
    },
    restrictions: {
      geo_restriction: { # required
        restriction_type: "blacklist", # required, accepts blacklist, whitelist, none
        quantity: 1, # required
        items: ["string"],
      },
    },
    web_acl_id: "string",
    http_version: "http1.1", # accepts http1.1, http2
    is_ipv6_enabled: false,
  },
  id: "string", # required
  if_match: "string",
}

The request to update a distribution.

Instance Attribute Summary collapse

Instance Attribute Details

#distribution_configTypes::DistributionConfig

The distribution’s configuration information.



8365
8366
8367
8368
8369
8370
# File 'lib/aws-sdk-cloudfront/types.rb', line 8365

class UpdateDistributionRequest < Struct.new(
  :distribution_config,
  :id,
  :if_match)
  include Aws::Structure
end

#idString

The distribution’s id.

Returns:

  • (String)


8365
8366
8367
8368
8369
8370
# File 'lib/aws-sdk-cloudfront/types.rb', line 8365

class UpdateDistributionRequest < Struct.new(
  :distribution_config,
  :id,
  :if_match)
  include Aws::Structure
end

#if_matchString

The value of the ‘ETag` header that you received when retrieving the distribution’s configuration. For example: ‘E2QWRUHAPOMQZL`.

Returns:

  • (String)


8365
8366
8367
8368
8369
8370
# File 'lib/aws-sdk-cloudfront/types.rb', line 8365

class UpdateDistributionRequest < Struct.new(
  :distribution_config,
  :id,
  :if_match)
  include Aws::Structure
end