Class: Aws::CloudFront::Client

Inherits:
Seahorse::Client::Base
  • Object
show all
Includes:
Aws::ClientStubs
Defined in:
lib/aws-sdk-cloudfront/client.rb

Overview

An API client for CloudFront. To construct a client, you need to configure a ‘:region` and `:credentials`.

client = Aws::CloudFront::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).

See #initialize for a full list of supported configuration options.

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • ‘Aws::Credentials` - Used for configuring static, non-refreshing credentials.

    • ‘Aws::InstanceProfileCredentials` - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • ‘Aws::SharedCredentials` - Used for loading credentials from a shared file, such as `~/.aws/config`.

    • ‘Aws::AssumeRoleCredentials` - Used when you need to assume a role.

    When ‘:credentials` are not configured directly, the following locations will be searched for credentials:

    • Aws.config`

    • The ‘:access_key_id`, `:secret_access_key`, and `:session_token` options.

    • ENV, ENV

    • ‘~/.aws/credentials`

    • ‘~/.aws/config`

    • EC2 IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of ‘Aws::InstanceProfileCredentails` to enable retries and extended timeouts.

  • :region (required, String)

    The AWS region to connect to. The configured ‘:region` is used to determine the service `:endpoint`. When not passed, a default `:region` is search for in the following locations:

  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to ‘true`, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to `false`.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in ‘adaptive` retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a `RetryCapacityNotAvailableError` and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When ‘true`, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When ‘true`, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in ‘standard` and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the ‘:region` option. You should only configure an `:endpoint` when connecting to test endpoints. This should be avalid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to ‘true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the ‘:logger` at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in ‘standard` and `adaptive` retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, ‘default’ is used.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the ‘legacy` retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the ‘legacy` retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the ‘legacy` retry mode.

    @see www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the ‘legacy` retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the ‘legacy` retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    * `legacy` - The pre-existing retry behavior.  This is default value if
      no retry mode is provided.
    * `standard` - A standardized set of retry rules across the AWS SDKs.
      This includes support for retry quotas, which limit the number of
      unsuccessful retries a client can make.
    * `adaptive` - An experimental retry mode that includes all the
      functionality of `standard` mode along with automatic client side
      throttling.  This is a provisional mode that may change behavior
      in the future.
    
  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    ** Please note ** When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :validate_params (Boolean) — default: true

    When ‘true`, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like ‘proxy.com:123’.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a ‘Timeout::Error`.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session yielded by #session_for.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has “Expect” header set to “100-continue”. Defaults to ‘nil` which disables this behaviour. This value can safely be set per request on the session yielded by #session_for.

  • :http_wire_trace (Boolean) — default: false

    When ‘true`, HTTP debug output will be sent to the `:logger`.

  • :ssl_verify_peer (Boolean) — default: true

    When ‘true`, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass ‘:ssl_ca_bundle` or `:ssl_ca_directory` the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass ‘:ssl_ca_bundle` or `:ssl_ca_directory` the the system default will be used if available.



302
303
304
# File 'lib/aws-sdk-cloudfront/client.rb', line 302

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



4265
4266
4267
# File 'lib/aws-sdk-cloudfront/client.rb', line 4265

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



4268
4269
4270
# File 'lib/aws-sdk-cloudfront/client.rb', line 4268

def errors_module
  Errors
end

Instance Method Details

#build_request(operation_name, params = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • params ({}) (defaults to: {})


4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
# File 'lib/aws-sdk-cloudfront/client.rb', line 4126

def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config)
  context[:gem_name] = 'aws-sdk-cloudfront'
  context[:gem_version] = '1.26.0'
  Seahorse::Client::Request.new(handlers, context)
end

#create_cloud_front_origin_access_identity(params = {}) ⇒ Types::CreateCloudFrontOriginAccessIdentityResult

Creates a new origin access identity. If you’re using Amazon S3 for your origin, you can use an origin access identity to require users to access your content using a CloudFront URL instead of the Amazon S3 URL. For more information about how to use origin access identities, see [Serving Private Content through CloudFront] in the *Amazon CloudFront Developer Guide*.

[1]: docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html

Examples:

Request syntax with placeholder values


resp = client.create_cloud_front_origin_access_identity({
  cloud_front_origin_access_identity_config: { # required
    caller_reference: "string", # required
    comment: "string", # required
  },
})

Response structure


resp.cloud_front_origin_access_identity.id #=> String
resp.cloud_front_origin_access_identity.s3_canonical_user_id #=> String
resp.cloud_front_origin_access_identity.cloud_front_origin_access_identity_config.caller_reference #=> String
resp.cloud_front_origin_access_identity.cloud_front_origin_access_identity_config.comment #=> String
resp.location #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

Returns:

See Also:



350
351
352
353
# File 'lib/aws-sdk-cloudfront/client.rb', line 350

def create_cloud_front_origin_access_identity(params = {}, options = {})
  req = build_request(:create_cloud_front_origin_access_identity, params)
  req.send_request(options)
end

#create_distribution(params = {}) ⇒ Types::CreateDistributionResult

Creates a new web distribution. You create a CloudFront distribution to tell CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery. Send a ‘POST` request to the `/CloudFront API version/distribution`/`distribution ID` resource.

When you update a distribution, there are more required fields than when you create a distribution. When you update your distribution by using [UpdateDistribution], follow the steps included in the documentation to get the current configuration and then make your updates. This helps to make sure that you include all of the required fields. To view a summary, see [Required Fields for Create Distribution and Update Distribution] in the *Amazon CloudFront Developer Guide*.

[1]: docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html [2]: docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html

Examples:

Request syntax with placeholder values


resp = client.create_distribution({
  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,
  },
})

Response structure


resp.distribution.id #=> String
resp.distribution.arn #=> String
resp.distribution.status #=> String
resp.distribution.last_modified_time #=> Time
resp.distribution.in_progress_invalidation_batches #=> Integer
resp.distribution.domain_name #=> String
resp.distribution.active_trusted_signers.enabled #=> Boolean
resp.distribution.active_trusted_signers.quantity #=> Integer
resp.distribution.active_trusted_signers.items #=> Array
resp.distribution.active_trusted_signers.items[0]. #=> String
resp.distribution.active_trusted_signers.items[0].key_pair_ids.quantity #=> Integer
resp.distribution.active_trusted_signers.items[0].key_pair_ids.items #=> Array
resp.distribution.active_trusted_signers.items[0].key_pair_ids.items[0] #=> String
resp.distribution.distribution_config.caller_reference #=> String
resp.distribution.distribution_config.aliases.quantity #=> Integer
resp.distribution.distribution_config.aliases.items #=> Array
resp.distribution.distribution_config.aliases.items[0] #=> String
resp.distribution.distribution_config.default_root_object #=> String
resp.distribution.distribution_config.origins.quantity #=> Integer
resp.distribution.distribution_config.origins.items #=> Array
resp.distribution.distribution_config.origins.items[0].id #=> String
resp.distribution.distribution_config.origins.items[0].domain_name #=> String
resp.distribution.distribution_config.origins.items[0].origin_path #=> String
resp.distribution.distribution_config.origins.items[0].custom_headers.quantity #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_headers.items #=> Array
resp.distribution.distribution_config.origins.items[0].custom_headers.items[0].header_name #=> String
resp.distribution.distribution_config.origins.items[0].custom_headers.items[0].header_value #=> String
resp.distribution.distribution_config.origins.items[0].s3_origin_config.origin_access_identity #=> String
resp.distribution.distribution_config.origins.items[0].custom_origin_config.http_port #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.https_port #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_protocol_policy #=> String, one of "http-only", "match-viewer", "https-only"
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.quantity #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.items #=> Array
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.items[0] #=> String, one of "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_read_timeout #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_keepalive_timeout #=> Integer
resp.distribution.distribution_config.origin_groups.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].id #=> String
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.items[0] #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].members.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].members.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].members.items[0].origin_id #=> String
resp.distribution.distribution_config.default_cache_behavior.target_origin_id #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.enabled #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution.distribution_config.default_cache_behavior.min_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.default_cache_behavior.smooth_streaming #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.default_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.max_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.compress #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.field_level_encryption_id #=> String
resp.distribution.distribution_config.cache_behaviors.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].path_pattern #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].target_origin_id #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.enabled #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution.distribution_config.cache_behaviors.items[0].min_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.cache_behaviors.items[0].smooth_streaming #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].default_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].max_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].compress #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].field_level_encryption_id #=> String
resp.distribution.distribution_config.custom_error_responses.quantity #=> Integer
resp.distribution.distribution_config.custom_error_responses.items #=> Array
resp.distribution.distribution_config.custom_error_responses.items[0].error_code #=> Integer
resp.distribution.distribution_config.custom_error_responses.items[0].response_page_path #=> String
resp.distribution.distribution_config.custom_error_responses.items[0].response_code #=> String
resp.distribution.distribution_config.custom_error_responses.items[0].error_caching_min_ttl #=> Integer
resp.distribution.distribution_config.comment #=> String
resp.distribution.distribution_config.logging.enabled #=> Boolean
resp.distribution.distribution_config.logging.include_cookies #=> Boolean
resp.distribution.distribution_config.logging.bucket #=> String
resp.distribution.distribution_config.logging.prefix #=> String
resp.distribution.distribution_config.price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.distribution.distribution_config.enabled #=> Boolean
resp.distribution.distribution_config.viewer_certificate.cloud_front_default_certificate #=> Boolean
resp.distribution.distribution_config.viewer_certificate.iam_certificate_id #=> String
resp.distribution.distribution_config.viewer_certificate.acm_certificate_arn #=> String
resp.distribution.distribution_config.viewer_certificate.ssl_support_method #=> String, one of "sni-only", "vip"
resp.distribution.distribution_config.viewer_certificate.minimum_protocol_version #=> String, one of "SSLv3", "TLSv1", "TLSv1_2016", "TLSv1.1_2016", "TLSv1.2_2018"
resp.distribution.distribution_config.viewer_certificate.certificate #=> String
resp.distribution.distribution_config.viewer_certificate.certificate_source #=> String, one of "cloudfront", "iam", "acm"
resp.distribution.distribution_config.restrictions.geo_restriction.restriction_type #=> String, one of "blacklist", "whitelist", "none"
resp.distribution.distribution_config.restrictions.geo_restriction.quantity #=> Integer
resp.distribution.distribution_config.restrictions.geo_restriction.items #=> Array
resp.distribution.distribution_config.restrictions.geo_restriction.items[0] #=> String
resp.distribution.distribution_config.web_acl_id #=> String
resp.distribution.distribution_config.http_version #=> String, one of "http1.1", "http2"
resp.distribution.distribution_config.is_ipv6_enabled #=> Boolean
resp.distribution.alias_icp_recordals #=> Array
resp.distribution.alias_icp_recordals[0].cname #=> String
resp.distribution.alias_icp_recordals[0].icp_recordal_status #=> String, one of "APPROVED", "SUSPENDED", "PENDING"
resp.location #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

Returns:

See Also:



754
755
756
757
# File 'lib/aws-sdk-cloudfront/client.rb', line 754

def create_distribution(params = {}, options = {})
  req = build_request(:create_distribution, params)
  req.send_request(options)
end

#create_distribution_with_tags(params = {}) ⇒ Types::CreateDistributionWithTagsResult

Create a new distribution with tags.

Examples:

Request syntax with placeholder values


resp = client.create_distribution_with_tags({
  distribution_config_with_tags: { # required
    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,
    },
    tags: { # required
      items: [
        {
          key: "TagKey", # required
          value: "TagValue",
        },
      ],
    },
  },
})

Response structure


resp.distribution.id #=> String
resp.distribution.arn #=> String
resp.distribution.status #=> String
resp.distribution.last_modified_time #=> Time
resp.distribution.in_progress_invalidation_batches #=> Integer
resp.distribution.domain_name #=> String
resp.distribution.active_trusted_signers.enabled #=> Boolean
resp.distribution.active_trusted_signers.quantity #=> Integer
resp.distribution.active_trusted_signers.items #=> Array
resp.distribution.active_trusted_signers.items[0]. #=> String
resp.distribution.active_trusted_signers.items[0].key_pair_ids.quantity #=> Integer
resp.distribution.active_trusted_signers.items[0].key_pair_ids.items #=> Array
resp.distribution.active_trusted_signers.items[0].key_pair_ids.items[0] #=> String
resp.distribution.distribution_config.caller_reference #=> String
resp.distribution.distribution_config.aliases.quantity #=> Integer
resp.distribution.distribution_config.aliases.items #=> Array
resp.distribution.distribution_config.aliases.items[0] #=> String
resp.distribution.distribution_config.default_root_object #=> String
resp.distribution.distribution_config.origins.quantity #=> Integer
resp.distribution.distribution_config.origins.items #=> Array
resp.distribution.distribution_config.origins.items[0].id #=> String
resp.distribution.distribution_config.origins.items[0].domain_name #=> String
resp.distribution.distribution_config.origins.items[0].origin_path #=> String
resp.distribution.distribution_config.origins.items[0].custom_headers.quantity #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_headers.items #=> Array
resp.distribution.distribution_config.origins.items[0].custom_headers.items[0].header_name #=> String
resp.distribution.distribution_config.origins.items[0].custom_headers.items[0].header_value #=> String
resp.distribution.distribution_config.origins.items[0].s3_origin_config.origin_access_identity #=> String
resp.distribution.distribution_config.origins.items[0].custom_origin_config.http_port #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.https_port #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_protocol_policy #=> String, one of "http-only", "match-viewer", "https-only"
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.quantity #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.items #=> Array
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.items[0] #=> String, one of "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_read_timeout #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_keepalive_timeout #=> Integer
resp.distribution.distribution_config.origin_groups.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].id #=> String
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.items[0] #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].members.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].members.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].members.items[0].origin_id #=> String
resp.distribution.distribution_config.default_cache_behavior.target_origin_id #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.enabled #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution.distribution_config.default_cache_behavior.min_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.default_cache_behavior.smooth_streaming #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.default_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.max_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.compress #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.field_level_encryption_id #=> String
resp.distribution.distribution_config.cache_behaviors.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].path_pattern #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].target_origin_id #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.enabled #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution.distribution_config.cache_behaviors.items[0].min_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.cache_behaviors.items[0].smooth_streaming #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].default_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].max_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].compress #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].field_level_encryption_id #=> String
resp.distribution.distribution_config.custom_error_responses.quantity #=> Integer
resp.distribution.distribution_config.custom_error_responses.items #=> Array
resp.distribution.distribution_config.custom_error_responses.items[0].error_code #=> Integer
resp.distribution.distribution_config.custom_error_responses.items[0].response_page_path #=> String
resp.distribution.distribution_config.custom_error_responses.items[0].response_code #=> String
resp.distribution.distribution_config.custom_error_responses.items[0].error_caching_min_ttl #=> Integer
resp.distribution.distribution_config.comment #=> String
resp.distribution.distribution_config.logging.enabled #=> Boolean
resp.distribution.distribution_config.logging.include_cookies #=> Boolean
resp.distribution.distribution_config.logging.bucket #=> String
resp.distribution.distribution_config.logging.prefix #=> String
resp.distribution.distribution_config.price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.distribution.distribution_config.enabled #=> Boolean
resp.distribution.distribution_config.viewer_certificate.cloud_front_default_certificate #=> Boolean
resp.distribution.distribution_config.viewer_certificate.iam_certificate_id #=> String
resp.distribution.distribution_config.viewer_certificate.acm_certificate_arn #=> String
resp.distribution.distribution_config.viewer_certificate.ssl_support_method #=> String, one of "sni-only", "vip"
resp.distribution.distribution_config.viewer_certificate.minimum_protocol_version #=> String, one of "SSLv3", "TLSv1", "TLSv1_2016", "TLSv1.1_2016", "TLSv1.2_2018"
resp.distribution.distribution_config.viewer_certificate.certificate #=> String
resp.distribution.distribution_config.viewer_certificate.certificate_source #=> String, one of "cloudfront", "iam", "acm"
resp.distribution.distribution_config.restrictions.geo_restriction.restriction_type #=> String, one of "blacklist", "whitelist", "none"
resp.distribution.distribution_config.restrictions.geo_restriction.quantity #=> Integer
resp.distribution.distribution_config.restrictions.geo_restriction.items #=> Array
resp.distribution.distribution_config.restrictions.geo_restriction.items[0] #=> String
resp.distribution.distribution_config.web_acl_id #=> String
resp.distribution.distribution_config.http_version #=> String, one of "http1.1", "http2"
resp.distribution.distribution_config.is_ipv6_enabled #=> Boolean
resp.distribution.alias_icp_recordals #=> Array
resp.distribution.alias_icp_recordals[0].cname #=> String
resp.distribution.alias_icp_recordals[0].icp_recordal_status #=> String, one of "APPROVED", "SUSPENDED", "PENDING"
resp.location #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

Returns:

See Also:



1150
1151
1152
1153
# File 'lib/aws-sdk-cloudfront/client.rb', line 1150

def create_distribution_with_tags(params = {}, options = {})
  req = build_request(:create_distribution_with_tags, params)
  req.send_request(options)
end

#create_field_level_encryption_config(params = {}) ⇒ Types::CreateFieldLevelEncryptionConfigResult

Create a new field-level encryption configuration.

Examples:

Request syntax with placeholder values


resp = client.create_field_level_encryption_config({
  field_level_encryption_config: { # required
    caller_reference: "string", # required
    comment: "string",
    query_arg_profile_config: {
      forward_when_query_arg_profile_is_unknown: false, # required
      query_arg_profiles: {
        quantity: 1, # required
        items: [
          {
            query_arg: "string", # required
            profile_id: "string", # required
          },
        ],
      },
    },
    content_type_profile_config: {
      forward_when_content_type_is_unknown: false, # required
      content_type_profiles: {
        quantity: 1, # required
        items: [
          {
            format: "URLEncoded", # required, accepts URLEncoded
            profile_id: "string",
            content_type: "string", # required
          },
        ],
      },
    },
  },
})

Response structure


resp.field_level_encryption.id #=> String
resp.field_level_encryption.last_modified_time #=> Time
resp.field_level_encryption.field_level_encryption_config.caller_reference #=> String
resp.field_level_encryption.field_level_encryption_config.comment #=> String
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.forward_when_query_arg_profile_is_unknown #=> Boolean
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.quantity #=> Integer
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items #=> Array
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items[0].query_arg #=> String
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items[0].profile_id #=> String
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.forward_when_content_type_is_unknown #=> Boolean
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.quantity #=> Integer
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items #=> Array
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].format #=> String, one of "URLEncoded"
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].profile_id #=> String
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].content_type #=> String
resp.location #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

Returns:

See Also:



1224
1225
1226
1227
# File 'lib/aws-sdk-cloudfront/client.rb', line 1224

def create_field_level_encryption_config(params = {}, options = {})
  req = build_request(:create_field_level_encryption_config, params)
  req.send_request(options)
end

#create_field_level_encryption_profile(params = {}) ⇒ Types::CreateFieldLevelEncryptionProfileResult

Create a field-level encryption profile.

Examples:

Request syntax with placeholder values


resp = client.create_field_level_encryption_profile({
  field_level_encryption_profile_config: { # required
    name: "string", # required
    caller_reference: "string", # required
    comment: "string",
    encryption_entities: { # required
      quantity: 1, # required
      items: [
        {
          public_key_id: "string", # required
          provider_id: "string", # required
          field_patterns: { # required
            quantity: 1, # required
            items: ["string"],
          },
        },
      ],
    },
  },
})

Response structure


resp.field_level_encryption_profile.id #=> String
resp.field_level_encryption_profile.last_modified_time #=> Time
resp.field_level_encryption_profile.field_level_encryption_profile_config.name #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.caller_reference #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.comment #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.quantity #=> Integer
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items #=> Array
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].public_key_id #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].provider_id #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.quantity #=> Integer
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.items #=> Array
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.items[0] #=> String
resp.location #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

Returns:

See Also:



1284
1285
1286
1287
# File 'lib/aws-sdk-cloudfront/client.rb', line 1284

def create_field_level_encryption_profile(params = {}, options = {})
  req = build_request(:create_field_level_encryption_profile, params)
  req.send_request(options)
end

#create_invalidation(params = {}) ⇒ Types::CreateInvalidationResult

Create a new invalidation.

Examples:

Request syntax with placeholder values


resp = client.create_invalidation({
  distribution_id: "string", # required
  invalidation_batch: { # required
    paths: { # required
      quantity: 1, # required
      items: ["string"],
    },
    caller_reference: "string", # required
  },
})

Response structure


resp.location #=> String
resp.invalidation.id #=> String
resp.invalidation.status #=> String
resp.invalidation.create_time #=> Time
resp.invalidation.invalidation_batch.paths.quantity #=> Integer
resp.invalidation.invalidation_batch.paths.items #=> Array
resp.invalidation.invalidation_batch.paths.items[0] #=> String
resp.invalidation.invalidation_batch.caller_reference #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :distribution_id (required, String)

    The distribution’s id.

  • :invalidation_batch (required, Types::InvalidationBatch)

    The batch information for the invalidation.

Returns:

See Also:



1330
1331
1332
1333
# File 'lib/aws-sdk-cloudfront/client.rb', line 1330

def create_invalidation(params = {}, options = {})
  req = build_request(:create_invalidation, params)
  req.send_request(options)
end

#create_public_key(params = {}) ⇒ Types::CreatePublicKeyResult

Add a new public key to CloudFront to use, for example, for field-level encryption. You can add a maximum of 10 public keys with one AWS account.

Examples:

Request syntax with placeholder values


resp = client.create_public_key({
  public_key_config: { # required
    caller_reference: "string", # required
    name: "string", # required
    encoded_key: "string", # required
    comment: "string",
  },
})

Response structure


resp.public_key.id #=> String
resp.public_key.created_time #=> Time
resp.public_key.public_key_config.caller_reference #=> String
resp.public_key.public_key_config.name #=> String
resp.public_key.public_key_config.encoded_key #=> String
resp.public_key.public_key_config.comment #=> String
resp.location #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

Returns:

See Also:



1374
1375
1376
1377
# File 'lib/aws-sdk-cloudfront/client.rb', line 1374

def create_public_key(params = {}, options = {})
  req = build_request(:create_public_key, params)
  req.send_request(options)
end

#create_streaming_distribution(params = {}) ⇒ Types::CreateStreamingDistributionResult

Creates a new RTMP distribution. An RTMP distribution is similar to a web distribution, but an RTMP distribution streams media files using the Adobe Real-Time Messaging Protocol (RTMP) instead of serving files using HTTP.

To create a new distribution, submit a ‘POST` request to the *CloudFront API version*/distribution resource. The request body must include a document with a StreamingDistributionConfig element. The response echoes the `StreamingDistributionConfig` element and returns other information about the RTMP distribution.

To get the status of your request, use the *GET StreamingDistribution* API action. When the value of ‘Enabled` is `true` and the value of `Status` is `Deployed`, your distribution is ready. A distribution usually deploys in less than 15 minutes.

For more information about web distributions, see [Working with RTMP Distributions] in the *Amazon CloudFront Developer Guide*.

Beginning with the 2012-05-05 version of the CloudFront API, we made substantial changes to the format of the XML document that you include in the request body when you create or update a web distribution or an RTMP distribution, and when you invalidate objects. With previous versions of the API, we discovered that it was too easy to accidentally delete one or more values for an element that accepts multiple values, for example, CNAMEs and trusted signers. Our changes for the 2012-05-05 release are intended to prevent these accidental deletions and to notify you when there’s a mismatch between the number of values you say you’re specifying in the ‘Quantity` element and the number of values specified.

[1]: docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-rtmp.html

Examples:

Request syntax with placeholder values


resp = client.create_streaming_distribution({
  streaming_distribution_config: { # required
    caller_reference: "string", # required
    s3_origin: { # required
      domain_name: "string", # required
      origin_access_identity: "string", # required
    },
    aliases: {
      quantity: 1, # required
      items: ["string"],
    },
    comment: "string", # required
    logging: {
      enabled: false, # required
      bucket: "string", # required
      prefix: "string", # required
    },
    trusted_signers: { # required
      enabled: false, # required
      quantity: 1, # required
      items: ["string"],
    },
    price_class: "PriceClass_100", # accepts PriceClass_100, PriceClass_200, PriceClass_All
    enabled: false, # required
  },
})

Response structure


resp.streaming_distribution.id #=> String
resp.streaming_distribution.arn #=> String
resp.streaming_distribution.status #=> String
resp.streaming_distribution.last_modified_time #=> Time
resp.streaming_distribution.domain_name #=> String
resp.streaming_distribution.active_trusted_signers.enabled #=> Boolean
resp.streaming_distribution.active_trusted_signers.quantity #=> Integer
resp.streaming_distribution.active_trusted_signers.items #=> Array
resp.streaming_distribution.active_trusted_signers.items[0]. #=> String
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.quantity #=> Integer
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.items #=> Array
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.caller_reference #=> String
resp.streaming_distribution.streaming_distribution_config.s3_origin.domain_name #=> String
resp.streaming_distribution.streaming_distribution_config.s3_origin.origin_access_identity #=> String
resp.streaming_distribution.streaming_distribution_config.aliases.quantity #=> Integer
resp.streaming_distribution.streaming_distribution_config.aliases.items #=> Array
resp.streaming_distribution.streaming_distribution_config.aliases.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.comment #=> String
resp.streaming_distribution.streaming_distribution_config.logging.enabled #=> Boolean
resp.streaming_distribution.streaming_distribution_config.logging.bucket #=> String
resp.streaming_distribution.streaming_distribution_config.logging.prefix #=> String
resp.streaming_distribution.streaming_distribution_config.trusted_signers.enabled #=> Boolean
resp.streaming_distribution.streaming_distribution_config.trusted_signers.quantity #=> Integer
resp.streaming_distribution.streaming_distribution_config.trusted_signers.items #=> Array
resp.streaming_distribution.streaming_distribution_config.trusted_signers.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.streaming_distribution.streaming_distribution_config.enabled #=> Boolean
resp.location #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

Returns:

See Also:



1489
1490
1491
1492
# File 'lib/aws-sdk-cloudfront/client.rb', line 1489

def create_streaming_distribution(params = {}, options = {})
  req = build_request(:create_streaming_distribution, params)
  req.send_request(options)
end

#create_streaming_distribution_with_tags(params = {}) ⇒ Types::CreateStreamingDistributionWithTagsResult

Create a new streaming distribution with tags.

Examples:

Request syntax with placeholder values


resp = client.create_streaming_distribution_with_tags({
  streaming_distribution_config_with_tags: { # required
    streaming_distribution_config: { # required
      caller_reference: "string", # required
      s3_origin: { # required
        domain_name: "string", # required
        origin_access_identity: "string", # required
      },
      aliases: {
        quantity: 1, # required
        items: ["string"],
      },
      comment: "string", # required
      logging: {
        enabled: false, # required
        bucket: "string", # required
        prefix: "string", # required
      },
      trusted_signers: { # required
        enabled: false, # required
        quantity: 1, # required
        items: ["string"],
      },
      price_class: "PriceClass_100", # accepts PriceClass_100, PriceClass_200, PriceClass_All
      enabled: false, # required
    },
    tags: { # required
      items: [
        {
          key: "TagKey", # required
          value: "TagValue",
        },
      ],
    },
  },
})

Response structure


resp.streaming_distribution.id #=> String
resp.streaming_distribution.arn #=> String
resp.streaming_distribution.status #=> String
resp.streaming_distribution.last_modified_time #=> Time
resp.streaming_distribution.domain_name #=> String
resp.streaming_distribution.active_trusted_signers.enabled #=> Boolean
resp.streaming_distribution.active_trusted_signers.quantity #=> Integer
resp.streaming_distribution.active_trusted_signers.items #=> Array
resp.streaming_distribution.active_trusted_signers.items[0]. #=> String
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.quantity #=> Integer
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.items #=> Array
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.caller_reference #=> String
resp.streaming_distribution.streaming_distribution_config.s3_origin.domain_name #=> String
resp.streaming_distribution.streaming_distribution_config.s3_origin.origin_access_identity #=> String
resp.streaming_distribution.streaming_distribution_config.aliases.quantity #=> Integer
resp.streaming_distribution.streaming_distribution_config.aliases.items #=> Array
resp.streaming_distribution.streaming_distribution_config.aliases.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.comment #=> String
resp.streaming_distribution.streaming_distribution_config.logging.enabled #=> Boolean
resp.streaming_distribution.streaming_distribution_config.logging.bucket #=> String
resp.streaming_distribution.streaming_distribution_config.logging.prefix #=> String
resp.streaming_distribution.streaming_distribution_config.trusted_signers.enabled #=> Boolean
resp.streaming_distribution.streaming_distribution_config.trusted_signers.quantity #=> Integer
resp.streaming_distribution.streaming_distribution_config.trusted_signers.items #=> Array
resp.streaming_distribution.streaming_distribution_config.trusted_signers.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.streaming_distribution.streaming_distribution_config.enabled #=> Boolean
resp.location #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

Returns:

See Also:



1581
1582
1583
1584
# File 'lib/aws-sdk-cloudfront/client.rb', line 1581

def create_streaming_distribution_with_tags(params = {}, options = {})
  req = build_request(:create_streaming_distribution_with_tags, params)
  req.send_request(options)
end

#delete_cloud_front_origin_access_identity(params = {}) ⇒ Struct

Delete an origin access identity.

Examples:

Request syntax with placeholder values


resp = client.delete_cloud_front_origin_access_identity({
  id: "string", # required
  if_match: "string",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The origin access identity’s ID.

  • :if_match (String)

    The value of the ‘ETag` header you received from a previous `GET` or `PUT` request. For example: `E2QWRUHAPOMQZL`.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1608
1609
1610
1611
# File 'lib/aws-sdk-cloudfront/client.rb', line 1608

def delete_cloud_front_origin_access_identity(params = {}, options = {})
  req = build_request(:delete_cloud_front_origin_access_identity, params)
  req.send_request(options)
end

#delete_distribution(params = {}) ⇒ Struct

Delete a distribution.

Examples:

Request syntax with placeholder values


resp = client.delete_distribution({
  id: "string", # required
  if_match: "string",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The distribution ID.

  • :if_match (String)

    The value of the ‘ETag` header that you received when you disabled the distribution. For example: `E2QWRUHAPOMQZL`.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1635
1636
1637
1638
# File 'lib/aws-sdk-cloudfront/client.rb', line 1635

def delete_distribution(params = {}, options = {})
  req = build_request(:delete_distribution, params)
  req.send_request(options)
end

#delete_field_level_encryption_config(params = {}) ⇒ Struct

Remove a field-level encryption configuration.

Examples:

Request syntax with placeholder values


resp = client.delete_field_level_encryption_config({
  id: "string", # required
  if_match: "string",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The ID of the configuration you want to delete from CloudFront.

  • :if_match (String)

    The value of the ‘ETag` header that you received when retrieving the configuration identity to delete. For example: `E2QWRUHAPOMQZL`.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1662
1663
1664
1665
# File 'lib/aws-sdk-cloudfront/client.rb', line 1662

def delete_field_level_encryption_config(params = {}, options = {})
  req = build_request(:delete_field_level_encryption_config, params)
  req.send_request(options)
end

#delete_field_level_encryption_profile(params = {}) ⇒ Struct

Remove a field-level encryption profile.

Examples:

Request syntax with placeholder values


resp = client.delete_field_level_encryption_profile({
  id: "string", # required
  if_match: "string",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    Request the ID of the profile you want to delete from CloudFront.

  • :if_match (String)

    The value of the ‘ETag` header that you received when retrieving the profile to delete. For example: `E2QWRUHAPOMQZL`.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1689
1690
1691
1692
# File 'lib/aws-sdk-cloudfront/client.rb', line 1689

def delete_field_level_encryption_profile(params = {}, options = {})
  req = build_request(:delete_field_level_encryption_profile, params)
  req.send_request(options)
end

#delete_public_key(params = {}) ⇒ Struct

Remove a public key you previously added to CloudFront.

Examples:

Request syntax with placeholder values


resp = client.delete_public_key({
  id: "string", # required
  if_match: "string",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The ID of the public key you want to remove from CloudFront.

  • :if_match (String)

    The value of the ‘ETag` header that you received when retrieving the public key identity to delete. For example: `E2QWRUHAPOMQZL`.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1716
1717
1718
1719
# File 'lib/aws-sdk-cloudfront/client.rb', line 1716

def delete_public_key(params = {}, options = {})
  req = build_request(:delete_public_key, params)
  req.send_request(options)
end

#delete_streaming_distribution(params = {}) ⇒ Struct

Delete a streaming distribution. To delete an RTMP distribution using the CloudFront API, perform the following steps.

**To delete an RTMP distribution using the CloudFront API**:

  1. Disable the RTMP distribution.

  2. Submit a ‘GET Streaming Distribution Config` request to get the current configuration and the `Etag` header for the distribution.

  3. Update the XML document that was returned in the response to your ‘GET Streaming Distribution Config` request to change the value of `Enabled` to `false`.

  4. Submit a ‘PUT Streaming Distribution Config` request to update the configuration for your distribution. In the request body, include the XML document that you updated in Step 3. Then set the value of the HTTP `If-Match` header to the value of the `ETag` header that CloudFront returned when you submitted the `GET Streaming Distribution Config` request in Step 2.

  5. Review the response to the ‘PUT Streaming Distribution Config` request to confirm that the distribution was successfully disabled.

  6. Submit a ‘GET Streaming Distribution Config` request to confirm that your changes have propagated. When propagation is complete, the value of `Status` is `Deployed`.

  7. Submit a ‘DELETE Streaming Distribution` request. Set the value of the HTTP `If-Match` header to the value of the `ETag` header that CloudFront returned when you submitted the `GET Streaming Distribution Config` request in Step 2.

  8. Review the response to your ‘DELETE Streaming Distribution` request to confirm that the distribution was successfully deleted.

For information about deleting a distribution using the CloudFront console, see [Deleting a Distribution] in the *Amazon CloudFront Developer Guide*.

[1]: docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html

Examples:

Request syntax with placeholder values


resp = client.delete_streaming_distribution({
  id: "string", # required
  if_match: "string",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The distribution ID.

  • :if_match (String)

    The value of the ‘ETag` header that you received when you disabled the streaming distribution. For example: `E2QWRUHAPOMQZL`.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1786
1787
1788
1789
# File 'lib/aws-sdk-cloudfront/client.rb', line 1786

def delete_streaming_distribution(params = {}, options = {})
  req = build_request(:delete_streaming_distribution, params)
  req.send_request(options)
end

#get_cloud_front_origin_access_identity(params = {}) ⇒ Types::GetCloudFrontOriginAccessIdentityResult

Get the information about an origin access identity.

Examples:

Request syntax with placeholder values


resp = client.get_cloud_front_origin_access_identity({
  id: "string", # required
})

Response structure


resp.cloud_front_origin_access_identity.id #=> String
resp.cloud_front_origin_access_identity.s3_canonical_user_id #=> String
resp.cloud_front_origin_access_identity.cloud_front_origin_access_identity_config.caller_reference #=> String
resp.cloud_front_origin_access_identity.cloud_front_origin_access_identity_config.comment #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The identity’s ID.

Returns:

See Also:



1819
1820
1821
1822
# File 'lib/aws-sdk-cloudfront/client.rb', line 1819

def get_cloud_front_origin_access_identity(params = {}, options = {})
  req = build_request(:get_cloud_front_origin_access_identity, params)
  req.send_request(options)
end

#get_cloud_front_origin_access_identity_config(params = {}) ⇒ Types::GetCloudFrontOriginAccessIdentityConfigResult

Get the configuration information about an origin access identity.

Examples:

Request syntax with placeholder values


resp = client.get_cloud_front_origin_access_identity_config({
  id: "string", # required
})

Response structure


resp.cloud_front_origin_access_identity_config.caller_reference #=> String
resp.cloud_front_origin_access_identity_config.comment #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The identity’s ID.

Returns:

See Also:



1850
1851
1852
1853
# File 'lib/aws-sdk-cloudfront/client.rb', line 1850

def get_cloud_front_origin_access_identity_config(params = {}, options = {})
  req = build_request(:get_cloud_front_origin_access_identity_config, params)
  req.send_request(options)
end

#get_distribution(params = {}) ⇒ Types::GetDistributionResult

Get the information about a distribution.

Examples:

Request syntax with placeholder values


resp = client.get_distribution({
  id: "string", # required
})

Response structure


resp.distribution.id #=> String
resp.distribution.arn #=> String
resp.distribution.status #=> String
resp.distribution.last_modified_time #=> Time
resp.distribution.in_progress_invalidation_batches #=> Integer
resp.distribution.domain_name #=> String
resp.distribution.active_trusted_signers.enabled #=> Boolean
resp.distribution.active_trusted_signers.quantity #=> Integer
resp.distribution.active_trusted_signers.items #=> Array
resp.distribution.active_trusted_signers.items[0]. #=> String
resp.distribution.active_trusted_signers.items[0].key_pair_ids.quantity #=> Integer
resp.distribution.active_trusted_signers.items[0].key_pair_ids.items #=> Array
resp.distribution.active_trusted_signers.items[0].key_pair_ids.items[0] #=> String
resp.distribution.distribution_config.caller_reference #=> String
resp.distribution.distribution_config.aliases.quantity #=> Integer
resp.distribution.distribution_config.aliases.items #=> Array
resp.distribution.distribution_config.aliases.items[0] #=> String
resp.distribution.distribution_config.default_root_object #=> String
resp.distribution.distribution_config.origins.quantity #=> Integer
resp.distribution.distribution_config.origins.items #=> Array
resp.distribution.distribution_config.origins.items[0].id #=> String
resp.distribution.distribution_config.origins.items[0].domain_name #=> String
resp.distribution.distribution_config.origins.items[0].origin_path #=> String
resp.distribution.distribution_config.origins.items[0].custom_headers.quantity #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_headers.items #=> Array
resp.distribution.distribution_config.origins.items[0].custom_headers.items[0].header_name #=> String
resp.distribution.distribution_config.origins.items[0].custom_headers.items[0].header_value #=> String
resp.distribution.distribution_config.origins.items[0].s3_origin_config.origin_access_identity #=> String
resp.distribution.distribution_config.origins.items[0].custom_origin_config.http_port #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.https_port #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_protocol_policy #=> String, one of "http-only", "match-viewer", "https-only"
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.quantity #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.items #=> Array
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.items[0] #=> String, one of "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_read_timeout #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_keepalive_timeout #=> Integer
resp.distribution.distribution_config.origin_groups.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].id #=> String
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.items[0] #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].members.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].members.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].members.items[0].origin_id #=> String
resp.distribution.distribution_config.default_cache_behavior.target_origin_id #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.enabled #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution.distribution_config.default_cache_behavior.min_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.default_cache_behavior.smooth_streaming #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.default_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.max_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.compress #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.field_level_encryption_id #=> String
resp.distribution.distribution_config.cache_behaviors.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].path_pattern #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].target_origin_id #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.enabled #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution.distribution_config.cache_behaviors.items[0].min_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.cache_behaviors.items[0].smooth_streaming #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].default_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].max_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].compress #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].field_level_encryption_id #=> String
resp.distribution.distribution_config.custom_error_responses.quantity #=> Integer
resp.distribution.distribution_config.custom_error_responses.items #=> Array
resp.distribution.distribution_config.custom_error_responses.items[0].error_code #=> Integer
resp.distribution.distribution_config.custom_error_responses.items[0].response_page_path #=> String
resp.distribution.distribution_config.custom_error_responses.items[0].response_code #=> String
resp.distribution.distribution_config.custom_error_responses.items[0].error_caching_min_ttl #=> Integer
resp.distribution.distribution_config.comment #=> String
resp.distribution.distribution_config.logging.enabled #=> Boolean
resp.distribution.distribution_config.logging.include_cookies #=> Boolean
resp.distribution.distribution_config.logging.bucket #=> String
resp.distribution.distribution_config.logging.prefix #=> String
resp.distribution.distribution_config.price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.distribution.distribution_config.enabled #=> Boolean
resp.distribution.distribution_config.viewer_certificate.cloud_front_default_certificate #=> Boolean
resp.distribution.distribution_config.viewer_certificate.iam_certificate_id #=> String
resp.distribution.distribution_config.viewer_certificate.acm_certificate_arn #=> String
resp.distribution.distribution_config.viewer_certificate.ssl_support_method #=> String, one of "sni-only", "vip"
resp.distribution.distribution_config.viewer_certificate.minimum_protocol_version #=> String, one of "SSLv3", "TLSv1", "TLSv1_2016", "TLSv1.1_2016", "TLSv1.2_2018"
resp.distribution.distribution_config.viewer_certificate.certificate #=> String
resp.distribution.distribution_config.viewer_certificate.certificate_source #=> String, one of "cloudfront", "iam", "acm"
resp.distribution.distribution_config.restrictions.geo_restriction.restriction_type #=> String, one of "blacklist", "whitelist", "none"
resp.distribution.distribution_config.restrictions.geo_restriction.quantity #=> Integer
resp.distribution.distribution_config.restrictions.geo_restriction.items #=> Array
resp.distribution.distribution_config.restrictions.geo_restriction.items[0] #=> String
resp.distribution.distribution_config.web_acl_id #=> String
resp.distribution.distribution_config.http_version #=> String, one of "http1.1", "http2"
resp.distribution.distribution_config.is_ipv6_enabled #=> Boolean
resp.distribution.alias_icp_recordals #=> Array
resp.distribution.alias_icp_recordals[0].cname #=> String
resp.distribution.alias_icp_recordals[0].icp_recordal_status #=> String, one of "APPROVED", "SUSPENDED", "PENDING"
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The distribution’s ID. If the ID is empty, an empty distribution configuration is returned.

Returns:

See Also:



2026
2027
2028
2029
# File 'lib/aws-sdk-cloudfront/client.rb', line 2026

def get_distribution(params = {}, options = {})
  req = build_request(:get_distribution, params)
  req.send_request(options)
end

#get_distribution_config(params = {}) ⇒ Types::GetDistributionConfigResult

Get the configuration information about a distribution.

Examples:

Request syntax with placeholder values


resp = client.get_distribution_config({
  id: "string", # required
})

Response structure


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

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The distribution’s ID. If the ID is empty, an empty distribution configuration is returned.

Returns:

See Also:



2186
2187
2188
2189
# File 'lib/aws-sdk-cloudfront/client.rb', line 2186

def get_distribution_config(params = {}, options = {})
  req = build_request(:get_distribution_config, params)
  req.send_request(options)
end

#get_field_level_encryption(params = {}) ⇒ Types::GetFieldLevelEncryptionResult

Get the field-level encryption configuration information.

Examples:

Request syntax with placeholder values


resp = client.get_field_level_encryption({
  id: "string", # required
})

Response structure


resp.field_level_encryption.id #=> String
resp.field_level_encryption.last_modified_time #=> Time
resp.field_level_encryption.field_level_encryption_config.caller_reference #=> String
resp.field_level_encryption.field_level_encryption_config.comment #=> String
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.forward_when_query_arg_profile_is_unknown #=> Boolean
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.quantity #=> Integer
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items #=> Array
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items[0].query_arg #=> String
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items[0].profile_id #=> String
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.forward_when_content_type_is_unknown #=> Boolean
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.quantity #=> Integer
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items #=> Array
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].format #=> String, one of "URLEncoded"
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].profile_id #=> String
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].content_type #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    Request the ID for the field-level encryption configuration information.

Returns:

See Also:



2231
2232
2233
2234
# File 'lib/aws-sdk-cloudfront/client.rb', line 2231

def get_field_level_encryption(params = {}, options = {})
  req = build_request(:get_field_level_encryption, params)
  req.send_request(options)
end

#get_field_level_encryption_config(params = {}) ⇒ Types::GetFieldLevelEncryptionConfigResult

Get the field-level encryption configuration information.

Examples:

Request syntax with placeholder values


resp = client.get_field_level_encryption_config({
  id: "string", # required
})

Response structure


resp.field_level_encryption_config.caller_reference #=> String
resp.field_level_encryption_config.comment #=> String
resp.field_level_encryption_config.query_arg_profile_config.forward_when_query_arg_profile_is_unknown #=> Boolean
resp.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.quantity #=> Integer
resp.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items #=> Array
resp.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items[0].query_arg #=> String
resp.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items[0].profile_id #=> String
resp.field_level_encryption_config.content_type_profile_config.forward_when_content_type_is_unknown #=> Boolean
resp.field_level_encryption_config.content_type_profile_config.content_type_profiles.quantity #=> Integer
resp.field_level_encryption_config.content_type_profile_config.content_type_profiles.items #=> Array
resp.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].format #=> String, one of "URLEncoded"
resp.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].profile_id #=> String
resp.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].content_type #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    Request the ID for the field-level encryption configuration information.

Returns:

See Also:



2274
2275
2276
2277
# File 'lib/aws-sdk-cloudfront/client.rb', line 2274

def get_field_level_encryption_config(params = {}, options = {})
  req = build_request(:get_field_level_encryption_config, params)
  req.send_request(options)
end

#get_field_level_encryption_profile(params = {}) ⇒ Types::GetFieldLevelEncryptionProfileResult

Get the field-level encryption profile information.

Examples:

Request syntax with placeholder values


resp = client.get_field_level_encryption_profile({
  id: "string", # required
})

Response structure


resp.field_level_encryption_profile.id #=> String
resp.field_level_encryption_profile.last_modified_time #=> Time
resp.field_level_encryption_profile.field_level_encryption_profile_config.name #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.caller_reference #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.comment #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.quantity #=> Integer
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items #=> Array
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].public_key_id #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].provider_id #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.quantity #=> Integer
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.items #=> Array
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.items[0] #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    Get the ID for the field-level encryption profile information.

Returns:

See Also:



2315
2316
2317
2318
# File 'lib/aws-sdk-cloudfront/client.rb', line 2315

def get_field_level_encryption_profile(params = {}, options = {})
  req = build_request(:get_field_level_encryption_profile, params)
  req.send_request(options)
end

#get_field_level_encryption_profile_config(params = {}) ⇒ Types::GetFieldLevelEncryptionProfileConfigResult

Get the field-level encryption profile configuration information.

Examples:

Request syntax with placeholder values


resp = client.get_field_level_encryption_profile_config({
  id: "string", # required
})

Response structure


resp.field_level_encryption_profile_config.name #=> String
resp.field_level_encryption_profile_config.caller_reference #=> String
resp.field_level_encryption_profile_config.comment #=> String
resp.field_level_encryption_profile_config.encryption_entities.quantity #=> Integer
resp.field_level_encryption_profile_config.encryption_entities.items #=> Array
resp.field_level_encryption_profile_config.encryption_entities.items[0].public_key_id #=> String
resp.field_level_encryption_profile_config.encryption_entities.items[0].provider_id #=> String
resp.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.quantity #=> Integer
resp.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.items #=> Array
resp.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.items[0] #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    Get the ID for the field-level encryption profile configuration information.

Returns:

See Also:



2355
2356
2357
2358
# File 'lib/aws-sdk-cloudfront/client.rb', line 2355

def get_field_level_encryption_profile_config(params = {}, options = {})
  req = build_request(:get_field_level_encryption_profile_config, params)
  req.send_request(options)
end

#get_invalidation(params = {}) ⇒ Types::GetInvalidationResult

Get the information about an invalidation.

Examples:

Request syntax with placeholder values


resp = client.get_invalidation({
  distribution_id: "string", # required
  id: "string", # required
})

Response structure


resp.invalidation.id #=> String
resp.invalidation.status #=> String
resp.invalidation.create_time #=> Time
resp.invalidation.invalidation_batch.paths.quantity #=> Integer
resp.invalidation.invalidation_batch.paths.items #=> Array
resp.invalidation.invalidation_batch.paths.items[0] #=> String
resp.invalidation.invalidation_batch.caller_reference #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :distribution_id (required, String)

    The distribution’s ID.

  • :id (required, String)

    The identifier for the invalidation request, for example, ‘IDFDVBD632BHDS5`.

Returns:

See Also:



2394
2395
2396
2397
# File 'lib/aws-sdk-cloudfront/client.rb', line 2394

def get_invalidation(params = {}, options = {})
  req = build_request(:get_invalidation, params)
  req.send_request(options)
end

#get_public_key(params = {}) ⇒ Types::GetPublicKeyResult

Get the public key information.

Examples:

Request syntax with placeholder values


resp = client.get_public_key({
  id: "string", # required
})

Response structure


resp.public_key.id #=> String
resp.public_key.created_time #=> Time
resp.public_key.public_key_config.caller_reference #=> String
resp.public_key.public_key_config.name #=> String
resp.public_key.public_key_config.encoded_key #=> String
resp.public_key.public_key_config.comment #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    Request the ID for the public key.

Returns:

See Also:



2429
2430
2431
2432
# File 'lib/aws-sdk-cloudfront/client.rb', line 2429

def get_public_key(params = {}, options = {})
  req = build_request(:get_public_key, params)
  req.send_request(options)
end

#get_public_key_config(params = {}) ⇒ Types::GetPublicKeyConfigResult

Return public key configuration informaation

Examples:

Request syntax with placeholder values


resp = client.get_public_key_config({
  id: "string", # required
})

Response structure


resp.public_key_config.caller_reference #=> String
resp.public_key_config.name #=> String
resp.public_key_config.encoded_key #=> String
resp.public_key_config.comment #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    Request the ID for the public key configuration.

Returns:

See Also:



2462
2463
2464
2465
# File 'lib/aws-sdk-cloudfront/client.rb', line 2462

def get_public_key_config(params = {}, options = {})
  req = build_request(:get_public_key_config, params)
  req.send_request(options)
end

#get_streaming_distribution(params = {}) ⇒ Types::GetStreamingDistributionResult

Gets information about a specified RTMP distribution, including the distribution configuration.

Examples:

Request syntax with placeholder values


resp = client.get_streaming_distribution({
  id: "string", # required
})

Response structure


resp.streaming_distribution.id #=> String
resp.streaming_distribution.arn #=> String
resp.streaming_distribution.status #=> String
resp.streaming_distribution.last_modified_time #=> Time
resp.streaming_distribution.domain_name #=> String
resp.streaming_distribution.active_trusted_signers.enabled #=> Boolean
resp.streaming_distribution.active_trusted_signers.quantity #=> Integer
resp.streaming_distribution.active_trusted_signers.items #=> Array
resp.streaming_distribution.active_trusted_signers.items[0]. #=> String
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.quantity #=> Integer
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.items #=> Array
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.caller_reference #=> String
resp.streaming_distribution.streaming_distribution_config.s3_origin.domain_name #=> String
resp.streaming_distribution.streaming_distribution_config.s3_origin.origin_access_identity #=> String
resp.streaming_distribution.streaming_distribution_config.aliases.quantity #=> Integer
resp.streaming_distribution.streaming_distribution_config.aliases.items #=> Array
resp.streaming_distribution.streaming_distribution_config.aliases.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.comment #=> String
resp.streaming_distribution.streaming_distribution_config.logging.enabled #=> Boolean
resp.streaming_distribution.streaming_distribution_config.logging.bucket #=> String
resp.streaming_distribution.streaming_distribution_config.logging.prefix #=> String
resp.streaming_distribution.streaming_distribution_config.trusted_signers.enabled #=> Boolean
resp.streaming_distribution.streaming_distribution_config.trusted_signers.quantity #=> Integer
resp.streaming_distribution.streaming_distribution_config.trusted_signers.items #=> Array
resp.streaming_distribution.streaming_distribution_config.trusted_signers.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.streaming_distribution.streaming_distribution_config.enabled #=> Boolean
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The streaming distribution’s ID.

Returns:

See Also:



2520
2521
2522
2523
# File 'lib/aws-sdk-cloudfront/client.rb', line 2520

def get_streaming_distribution(params = {}, options = {})
  req = build_request(:get_streaming_distribution, params)
  req.send_request(options)
end

#get_streaming_distribution_config(params = {}) ⇒ Types::GetStreamingDistributionConfigResult

Get the configuration information about a streaming distribution.

Examples:

Request syntax with placeholder values


resp = client.get_streaming_distribution_config({
  id: "string", # required
})

Response structure


resp.streaming_distribution_config.caller_reference #=> String
resp.streaming_distribution_config.s3_origin.domain_name #=> String
resp.streaming_distribution_config.s3_origin.origin_access_identity #=> String
resp.streaming_distribution_config.aliases.quantity #=> Integer
resp.streaming_distribution_config.aliases.items #=> Array
resp.streaming_distribution_config.aliases.items[0] #=> String
resp.streaming_distribution_config.comment #=> String
resp.streaming_distribution_config.logging.enabled #=> Boolean
resp.streaming_distribution_config.logging.bucket #=> String
resp.streaming_distribution_config.logging.prefix #=> String
resp.streaming_distribution_config.trusted_signers.enabled #=> Boolean
resp.streaming_distribution_config.trusted_signers.quantity #=> Integer
resp.streaming_distribution_config.trusted_signers.items #=> Array
resp.streaming_distribution_config.trusted_signers.items[0] #=> String
resp.streaming_distribution_config.price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.streaming_distribution_config.enabled #=> Boolean
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :id (required, String)

    The streaming distribution’s ID.

Returns:

See Also:



2565
2566
2567
2568
# File 'lib/aws-sdk-cloudfront/client.rb', line 2565

def get_streaming_distribution_config(params = {}, options = {})
  req = build_request(:get_streaming_distribution_config, params)
  req.send_request(options)
end

#list_cloud_front_origin_access_identities(params = {}) ⇒ Types::ListCloudFrontOriginAccessIdentitiesResult

Lists origin access identities.

Examples:

Request syntax with placeholder values


resp = client.list_cloud_front_origin_access_identities({
  marker: "string",
  max_items: 1,
})

Response structure


resp.cloud_front_origin_access_identity_list.marker #=> String
resp.cloud_front_origin_access_identity_list.next_marker #=> String
resp.cloud_front_origin_access_identity_list.max_items #=> Integer
resp.cloud_front_origin_access_identity_list.is_truncated #=> Boolean
resp.cloud_front_origin_access_identity_list.quantity #=> Integer
resp.cloud_front_origin_access_identity_list.items #=> Array
resp.cloud_front_origin_access_identity_list.items[0].id #=> String
resp.cloud_front_origin_access_identity_list.items[0].s3_canonical_user_id #=> String
resp.cloud_front_origin_access_identity_list.items[0].comment #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :marker (String)

    Use this when paginating results to indicate where to begin in your list of origin access identities. The results include identities in the list that occur after the marker. To get the next page of results, set the ‘Marker` to the value of the `NextMarker` from the current page’s response (which is also the ID of the last identity on that page).

  • :max_items (Integer)

    The maximum number of origin access identities you want in the response body.

Returns:

See Also:



2611
2612
2613
2614
# File 'lib/aws-sdk-cloudfront/client.rb', line 2611

def list_cloud_front_origin_access_identities(params = {}, options = {})
  req = build_request(:list_cloud_front_origin_access_identities, params)
  req.send_request(options)
end

#list_distributions(params = {}) ⇒ Types::ListDistributionsResult

List CloudFront distributions.

Examples:

Request syntax with placeholder values


resp = client.list_distributions({
  marker: "string",
  max_items: 1,
})

Response structure


resp.distribution_list.marker #=> String
resp.distribution_list.next_marker #=> String
resp.distribution_list.max_items #=> Integer
resp.distribution_list.is_truncated #=> Boolean
resp.distribution_list.quantity #=> Integer
resp.distribution_list.items #=> Array
resp.distribution_list.items[0].id #=> String
resp.distribution_list.items[0].arn #=> String
resp.distribution_list.items[0].status #=> String
resp.distribution_list.items[0].last_modified_time #=> Time
resp.distribution_list.items[0].domain_name #=> String
resp.distribution_list.items[0].aliases.quantity #=> Integer
resp.distribution_list.items[0].aliases.items #=> Array
resp.distribution_list.items[0].aliases.items[0] #=> String
resp.distribution_list.items[0].origins.quantity #=> Integer
resp.distribution_list.items[0].origins.items #=> Array
resp.distribution_list.items[0].origins.items[0].id #=> String
resp.distribution_list.items[0].origins.items[0].domain_name #=> String
resp.distribution_list.items[0].origins.items[0].origin_path #=> String
resp.distribution_list.items[0].origins.items[0].custom_headers.quantity #=> Integer
resp.distribution_list.items[0].origins.items[0].custom_headers.items #=> Array
resp.distribution_list.items[0].origins.items[0].custom_headers.items[0].header_name #=> String
resp.distribution_list.items[0].origins.items[0].custom_headers.items[0].header_value #=> String
resp.distribution_list.items[0].origins.items[0].s3_origin_config.origin_access_identity #=> String
resp.distribution_list.items[0].origins.items[0].custom_origin_config.http_port #=> Integer
resp.distribution_list.items[0].origins.items[0].custom_origin_config.https_port #=> Integer
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_protocol_policy #=> String, one of "http-only", "match-viewer", "https-only"
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_ssl_protocols.quantity #=> Integer
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_ssl_protocols.items #=> Array
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_ssl_protocols.items[0] #=> String, one of "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_read_timeout #=> Integer
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_keepalive_timeout #=> Integer
resp.distribution_list.items[0].origin_groups.quantity #=> Integer
resp.distribution_list.items[0].origin_groups.items #=> Array
resp.distribution_list.items[0].origin_groups.items[0].id #=> String
resp.distribution_list.items[0].origin_groups.items[0].failover_criteria.status_codes.quantity #=> Integer
resp.distribution_list.items[0].origin_groups.items[0].failover_criteria.status_codes.items #=> Array
resp.distribution_list.items[0].origin_groups.items[0].failover_criteria.status_codes.items[0] #=> Integer
resp.distribution_list.items[0].origin_groups.items[0].members.quantity #=> Integer
resp.distribution_list.items[0].origin_groups.items[0].members.items #=> Array
resp.distribution_list.items[0].origin_groups.items[0].members.items[0].origin_id #=> String
resp.distribution_list.items[0].default_cache_behavior.target_origin_id #=> String
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.query_string #=> Boolean
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.headers.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.headers.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.headers.items[0] #=> String
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution_list.items[0].default_cache_behavior.trusted_signers.enabled #=> Boolean
resp.distribution_list.items[0].default_cache_behavior.trusted_signers.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.trusted_signers.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.trusted_signers.items[0] #=> String
resp.distribution_list.items[0].default_cache_behavior.viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution_list.items[0].default_cache_behavior.min_ttl #=> Integer
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.cached_methods.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.cached_methods.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution_list.items[0].default_cache_behavior.smooth_streaming #=> Boolean
resp.distribution_list.items[0].default_cache_behavior.default_ttl #=> Integer
resp.distribution_list.items[0].default_cache_behavior.max_ttl #=> Integer
resp.distribution_list.items[0].default_cache_behavior.compress #=> Boolean
resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution_list.items[0].default_cache_behavior.field_level_encryption_id #=> String
resp.distribution_list.items[0].cache_behaviors.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].path_pattern #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].target_origin_id #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.query_string #=> Boolean
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.headers.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.headers.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.headers.items[0] #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].trusted_signers.enabled #=> Boolean
resp.distribution_list.items[0].cache_behaviors.items[0].trusted_signers.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].trusted_signers.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].trusted_signers.items[0] #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution_list.items[0].cache_behaviors.items[0].min_ttl #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.cached_methods.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.cached_methods.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution_list.items[0].cache_behaviors.items[0].smooth_streaming #=> Boolean
resp.distribution_list.items[0].cache_behaviors.items[0].default_ttl #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].max_ttl #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].compress #=> Boolean
resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution_list.items[0].cache_behaviors.items[0].field_level_encryption_id #=> String
resp.distribution_list.items[0].custom_error_responses.quantity #=> Integer
resp.distribution_list.items[0].custom_error_responses.items #=> Array
resp.distribution_list.items[0].custom_error_responses.items[0].error_code #=> Integer
resp.distribution_list.items[0].custom_error_responses.items[0].response_page_path #=> String
resp.distribution_list.items[0].custom_error_responses.items[0].response_code #=> String
resp.distribution_list.items[0].custom_error_responses.items[0].error_caching_min_ttl #=> Integer
resp.distribution_list.items[0].comment #=> String
resp.distribution_list.items[0].price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.distribution_list.items[0].enabled #=> Boolean
resp.distribution_list.items[0].viewer_certificate.cloud_front_default_certificate #=> Boolean
resp.distribution_list.items[0].viewer_certificate.iam_certificate_id #=> String
resp.distribution_list.items[0].viewer_certificate.acm_certificate_arn #=> String
resp.distribution_list.items[0].viewer_certificate.ssl_support_method #=> String, one of "sni-only", "vip"
resp.distribution_list.items[0].viewer_certificate.minimum_protocol_version #=> String, one of "SSLv3", "TLSv1", "TLSv1_2016", "TLSv1.1_2016", "TLSv1.2_2018"
resp.distribution_list.items[0].viewer_certificate.certificate #=> String
resp.distribution_list.items[0].viewer_certificate.certificate_source #=> String, one of "cloudfront", "iam", "acm"
resp.distribution_list.items[0].restrictions.geo_restriction.restriction_type #=> String, one of "blacklist", "whitelist", "none"
resp.distribution_list.items[0].restrictions.geo_restriction.quantity #=> Integer
resp.distribution_list.items[0].restrictions.geo_restriction.items #=> Array
resp.distribution_list.items[0].restrictions.geo_restriction.items[0] #=> String
resp.distribution_list.items[0].web_acl_id #=> String
resp.distribution_list.items[0].http_version #=> String, one of "http1.1", "http2"
resp.distribution_list.items[0].is_ipv6_enabled #=> Boolean
resp.distribution_list.items[0].alias_icp_recordals #=> Array
resp.distribution_list.items[0].alias_icp_recordals[0].cname #=> String
resp.distribution_list.items[0].alias_icp_recordals[0].icp_recordal_status #=> String, one of "APPROVED", "SUSPENDED", "PENDING"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :marker (String)

    Use this when paginating results to indicate where to begin in your list of distributions. The results include distributions in the list that occur after the marker. To get the next page of results, set the ‘Marker` to the value of the `NextMarker` from the current page’s response (which is also the ID of the last distribution on that page).

  • :max_items (Integer)

    The maximum number of distributions you want in the response body.

Returns:

See Also:



2784
2785
2786
2787
# File 'lib/aws-sdk-cloudfront/client.rb', line 2784

def list_distributions(params = {}, options = {})
  req = build_request(:list_distributions, params)
  req.send_request(options)
end

#list_distributions_by_web_acl_id(params = {}) ⇒ Types::ListDistributionsByWebACLIdResult

List the distributions that are associated with a specified AWS WAF web ACL.

Examples:

Request syntax with placeholder values


resp = client.list_distributions_by_web_acl_id({
  marker: "string",
  max_items: 1,
  web_acl_id: "string", # required
})

Response structure


resp.distribution_list.marker #=> String
resp.distribution_list.next_marker #=> String
resp.distribution_list.max_items #=> Integer
resp.distribution_list.is_truncated #=> Boolean
resp.distribution_list.quantity #=> Integer
resp.distribution_list.items #=> Array
resp.distribution_list.items[0].id #=> String
resp.distribution_list.items[0].arn #=> String
resp.distribution_list.items[0].status #=> String
resp.distribution_list.items[0].last_modified_time #=> Time
resp.distribution_list.items[0].domain_name #=> String
resp.distribution_list.items[0].aliases.quantity #=> Integer
resp.distribution_list.items[0].aliases.items #=> Array
resp.distribution_list.items[0].aliases.items[0] #=> String
resp.distribution_list.items[0].origins.quantity #=> Integer
resp.distribution_list.items[0].origins.items #=> Array
resp.distribution_list.items[0].origins.items[0].id #=> String
resp.distribution_list.items[0].origins.items[0].domain_name #=> String
resp.distribution_list.items[0].origins.items[0].origin_path #=> String
resp.distribution_list.items[0].origins.items[0].custom_headers.quantity #=> Integer
resp.distribution_list.items[0].origins.items[0].custom_headers.items #=> Array
resp.distribution_list.items[0].origins.items[0].custom_headers.items[0].header_name #=> String
resp.distribution_list.items[0].origins.items[0].custom_headers.items[0].header_value #=> String
resp.distribution_list.items[0].origins.items[0].s3_origin_config.origin_access_identity #=> String
resp.distribution_list.items[0].origins.items[0].custom_origin_config.http_port #=> Integer
resp.distribution_list.items[0].origins.items[0].custom_origin_config.https_port #=> Integer
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_protocol_policy #=> String, one of "http-only", "match-viewer", "https-only"
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_ssl_protocols.quantity #=> Integer
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_ssl_protocols.items #=> Array
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_ssl_protocols.items[0] #=> String, one of "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_read_timeout #=> Integer
resp.distribution_list.items[0].origins.items[0].custom_origin_config.origin_keepalive_timeout #=> Integer
resp.distribution_list.items[0].origin_groups.quantity #=> Integer
resp.distribution_list.items[0].origin_groups.items #=> Array
resp.distribution_list.items[0].origin_groups.items[0].id #=> String
resp.distribution_list.items[0].origin_groups.items[0].failover_criteria.status_codes.quantity #=> Integer
resp.distribution_list.items[0].origin_groups.items[0].failover_criteria.status_codes.items #=> Array
resp.distribution_list.items[0].origin_groups.items[0].failover_criteria.status_codes.items[0] #=> Integer
resp.distribution_list.items[0].origin_groups.items[0].members.quantity #=> Integer
resp.distribution_list.items[0].origin_groups.items[0].members.items #=> Array
resp.distribution_list.items[0].origin_groups.items[0].members.items[0].origin_id #=> String
resp.distribution_list.items[0].default_cache_behavior.target_origin_id #=> String
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.query_string #=> Boolean
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.headers.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.headers.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.headers.items[0] #=> String
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution_list.items[0].default_cache_behavior.trusted_signers.enabled #=> Boolean
resp.distribution_list.items[0].default_cache_behavior.trusted_signers.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.trusted_signers.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.trusted_signers.items[0] #=> String
resp.distribution_list.items[0].default_cache_behavior.viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution_list.items[0].default_cache_behavior.min_ttl #=> Integer
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.cached_methods.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.cached_methods.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution_list.items[0].default_cache_behavior.smooth_streaming #=> Boolean
resp.distribution_list.items[0].default_cache_behavior.default_ttl #=> Integer
resp.distribution_list.items[0].default_cache_behavior.max_ttl #=> Integer
resp.distribution_list.items[0].default_cache_behavior.compress #=> Boolean
resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.quantity #=> Integer
resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items #=> Array
resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution_list.items[0].default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution_list.items[0].default_cache_behavior.field_level_encryption_id #=> String
resp.distribution_list.items[0].cache_behaviors.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].path_pattern #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].target_origin_id #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.query_string #=> Boolean
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.headers.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.headers.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.headers.items[0] #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].trusted_signers.enabled #=> Boolean
resp.distribution_list.items[0].cache_behaviors.items[0].trusted_signers.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].trusted_signers.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].trusted_signers.items[0] #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution_list.items[0].cache_behaviors.items[0].min_ttl #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.cached_methods.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.cached_methods.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution_list.items[0].cache_behaviors.items[0].smooth_streaming #=> Boolean
resp.distribution_list.items[0].cache_behaviors.items[0].default_ttl #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].max_ttl #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].compress #=> Boolean
resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.quantity #=> Integer
resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items #=> Array
resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution_list.items[0].cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution_list.items[0].cache_behaviors.items[0].field_level_encryption_id #=> String
resp.distribution_list.items[0].custom_error_responses.quantity #=> Integer
resp.distribution_list.items[0].custom_error_responses.items #=> Array
resp.distribution_list.items[0].custom_error_responses.items[0].error_code #=> Integer
resp.distribution_list.items[0].custom_error_responses.items[0].response_page_path #=> String
resp.distribution_list.items[0].custom_error_responses.items[0].response_code #=> String
resp.distribution_list.items[0].custom_error_responses.items[0].error_caching_min_ttl #=> Integer
resp.distribution_list.items[0].comment #=> String
resp.distribution_list.items[0].price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.distribution_list.items[0].enabled #=> Boolean
resp.distribution_list.items[0].viewer_certificate.cloud_front_default_certificate #=> Boolean
resp.distribution_list.items[0].viewer_certificate.iam_certificate_id #=> String
resp.distribution_list.items[0].viewer_certificate.acm_certificate_arn #=> String
resp.distribution_list.items[0].viewer_certificate.ssl_support_method #=> String, one of "sni-only", "vip"
resp.distribution_list.items[0].viewer_certificate.minimum_protocol_version #=> String, one of "SSLv3", "TLSv1", "TLSv1_2016", "TLSv1.1_2016", "TLSv1.2_2018"
resp.distribution_list.items[0].viewer_certificate.certificate #=> String
resp.distribution_list.items[0].viewer_certificate.certificate_source #=> String, one of "cloudfront", "iam", "acm"
resp.distribution_list.items[0].restrictions.geo_restriction.restriction_type #=> String, one of "blacklist", "whitelist", "none"
resp.distribution_list.items[0].restrictions.geo_restriction.quantity #=> Integer
resp.distribution_list.items[0].restrictions.geo_restriction.items #=> Array
resp.distribution_list.items[0].restrictions.geo_restriction.items[0] #=> String
resp.distribution_list.items[0].web_acl_id #=> String
resp.distribution_list.items[0].http_version #=> String, one of "http1.1", "http2"
resp.distribution_list.items[0].is_ipv6_enabled #=> Boolean
resp.distribution_list.items[0].alias_icp_recordals #=> Array
resp.distribution_list.items[0].alias_icp_recordals[0].cname #=> String
resp.distribution_list.items[0].alias_icp_recordals[0].icp_recordal_status #=> String, one of "APPROVED", "SUSPENDED", "PENDING"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :marker (String)

    Use ‘Marker` and `MaxItems` to control pagination of results. If you have more than `MaxItems` distributions that satisfy the request, the response includes a `NextMarker` element. To get the next page of results, submit another request. For the value of `Marker`, specify the value of `NextMarker` from the last response. (For the first request, omit `Marker`.)

  • :max_items (Integer)

    The maximum number of distributions that you want CloudFront to return in the response body. The maximum and default values are both 100.

  • :web_acl_id (required, String)

    The ID of the AWS WAF web ACL that you want to list the associated distributions. If you specify “null” for the ID, the request returns a list of the distributions that aren’t associated with a web ACL.

Returns:

See Also:



2966
2967
2968
2969
# File 'lib/aws-sdk-cloudfront/client.rb', line 2966

def list_distributions_by_web_acl_id(params = {}, options = {})
  req = build_request(:list_distributions_by_web_acl_id, params)
  req.send_request(options)
end

#list_field_level_encryption_configs(params = {}) ⇒ Types::ListFieldLevelEncryptionConfigsResult

List all field-level encryption configurations that have been created in CloudFront for this account.

Examples:

Request syntax with placeholder values


resp = client.list_field_level_encryption_configs({
  marker: "string",
  max_items: 1,
})

Response structure


resp.field_level_encryption_list.next_marker #=> String
resp.field_level_encryption_list.max_items #=> Integer
resp.field_level_encryption_list.quantity #=> Integer
resp.field_level_encryption_list.items #=> Array
resp.field_level_encryption_list.items[0].id #=> String
resp.field_level_encryption_list.items[0].last_modified_time #=> Time
resp.field_level_encryption_list.items[0].comment #=> String
resp.field_level_encryption_list.items[0].query_arg_profile_config.forward_when_query_arg_profile_is_unknown #=> Boolean
resp.field_level_encryption_list.items[0].query_arg_profile_config.query_arg_profiles.quantity #=> Integer
resp.field_level_encryption_list.items[0].query_arg_profile_config.query_arg_profiles.items #=> Array
resp.field_level_encryption_list.items[0].query_arg_profile_config.query_arg_profiles.items[0].query_arg #=> String
resp.field_level_encryption_list.items[0].query_arg_profile_config.query_arg_profiles.items[0].profile_id #=> String
resp.field_level_encryption_list.items[0].content_type_profile_config.forward_when_content_type_is_unknown #=> Boolean
resp.field_level_encryption_list.items[0].content_type_profile_config.content_type_profiles.quantity #=> Integer
resp.field_level_encryption_list.items[0].content_type_profile_config.content_type_profiles.items #=> Array
resp.field_level_encryption_list.items[0].content_type_profile_config.content_type_profiles.items[0].format #=> String, one of "URLEncoded"
resp.field_level_encryption_list.items[0].content_type_profile_config.content_type_profiles.items[0].profile_id #=> String
resp.field_level_encryption_list.items[0].content_type_profile_config.content_type_profiles.items[0].content_type #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :marker (String)

    Use this when paginating results to indicate where to begin in your list of configurations. The results include configurations in the list that occur after the marker. To get the next page of results, set the ‘Marker` to the value of the `NextMarker` from the current page’s response (which is also the ID of the last configuration on that page).

  • :max_items (Integer)

    The maximum number of field-level encryption configurations you want in the response body.

Returns:

See Also:



3022
3023
3024
3025
# File 'lib/aws-sdk-cloudfront/client.rb', line 3022

def list_field_level_encryption_configs(params = {}, options = {})
  req = build_request(:list_field_level_encryption_configs, params)
  req.send_request(options)
end

#list_field_level_encryption_profiles(params = {}) ⇒ Types::ListFieldLevelEncryptionProfilesResult

Request a list of field-level encryption profiles that have been created in CloudFront for this account.

Examples:

Request syntax with placeholder values


resp = client.list_field_level_encryption_profiles({
  marker: "string",
  max_items: 1,
})

Response structure


resp.field_level_encryption_profile_list.next_marker #=> String
resp.field_level_encryption_profile_list.max_items #=> Integer
resp.field_level_encryption_profile_list.quantity #=> Integer
resp.field_level_encryption_profile_list.items #=> Array
resp.field_level_encryption_profile_list.items[0].id #=> String
resp.field_level_encryption_profile_list.items[0].last_modified_time #=> Time
resp.field_level_encryption_profile_list.items[0].name #=> String
resp.field_level_encryption_profile_list.items[0].encryption_entities.quantity #=> Integer
resp.field_level_encryption_profile_list.items[0].encryption_entities.items #=> Array
resp.field_level_encryption_profile_list.items[0].encryption_entities.items[0].public_key_id #=> String
resp.field_level_encryption_profile_list.items[0].encryption_entities.items[0].provider_id #=> String
resp.field_level_encryption_profile_list.items[0].encryption_entities.items[0].field_patterns.quantity #=> Integer
resp.field_level_encryption_profile_list.items[0].encryption_entities.items[0].field_patterns.items #=> Array
resp.field_level_encryption_profile_list.items[0].encryption_entities.items[0].field_patterns.items[0] #=> String
resp.field_level_encryption_profile_list.items[0].comment #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :marker (String)

    Use this when paginating results to indicate where to begin in your list of profiles. The results include profiles in the list that occur after the marker. To get the next page of results, set the ‘Marker` to the value of the `NextMarker` from the current page’s response (which is also the ID of the last profile on that page).

  • :max_items (Integer)

    The maximum number of field-level encryption profiles you want in the response body.

Returns:

See Also:



3074
3075
3076
3077
# File 'lib/aws-sdk-cloudfront/client.rb', line 3074

def list_field_level_encryption_profiles(params = {}, options = {})
  req = build_request(:list_field_level_encryption_profiles, params)
  req.send_request(options)
end

#list_invalidations(params = {}) ⇒ Types::ListInvalidationsResult

Lists invalidation batches.

Examples:

Request syntax with placeholder values


resp = client.list_invalidations({
  distribution_id: "string", # required
  marker: "string",
  max_items: 1,
})

Response structure


resp.invalidation_list.marker #=> String
resp.invalidation_list.next_marker #=> String
resp.invalidation_list.max_items #=> Integer
resp.invalidation_list.is_truncated #=> Boolean
resp.invalidation_list.quantity #=> Integer
resp.invalidation_list.items #=> Array
resp.invalidation_list.items[0].id #=> String
resp.invalidation_list.items[0].create_time #=> Time
resp.invalidation_list.items[0].status #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :distribution_id (required, String)

    The distribution’s ID.

  • :marker (String)

    Use this parameter when paginating results to indicate where to begin in your list of invalidation batches. Because the results are returned in decreasing order from most recent to oldest, the most recent results are on the first page, the second page will contain earlier results, and so on. To get the next page of results, set ‘Marker` to the value of the `NextMarker` from the current page’s response. This value is the same as the ID of the last invalidation batch on that page.

  • :max_items (Integer)

    The maximum number of invalidation batches that you want in the response body.

Returns:

See Also:



3126
3127
3128
3129
# File 'lib/aws-sdk-cloudfront/client.rb', line 3126

def list_invalidations(params = {}, options = {})
  req = build_request(:list_invalidations, params)
  req.send_request(options)
end

#list_public_keys(params = {}) ⇒ Types::ListPublicKeysResult

List all public keys that have been added to CloudFront for this account.

Examples:

Request syntax with placeholder values


resp = client.list_public_keys({
  marker: "string",
  max_items: 1,
})

Response structure


resp.public_key_list.next_marker #=> String
resp.public_key_list.max_items #=> Integer
resp.public_key_list.quantity #=> Integer
resp.public_key_list.items #=> Array
resp.public_key_list.items[0].id #=> String
resp.public_key_list.items[0].name #=> String
resp.public_key_list.items[0].created_time #=> Time
resp.public_key_list.items[0].encoded_key #=> String
resp.public_key_list.items[0].comment #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :marker (String)

    Use this when paginating results to indicate where to begin in your list of public keys. The results include public keys in the list that occur after the marker. To get the next page of results, set the ‘Marker` to the value of the `NextMarker` from the current page’s response (which is also the ID of the last public key on that page).

  • :max_items (Integer)

    The maximum number of public keys you want in the response body.

Returns:

See Also:



3171
3172
3173
3174
# File 'lib/aws-sdk-cloudfront/client.rb', line 3171

def list_public_keys(params = {}, options = {})
  req = build_request(:list_public_keys, params)
  req.send_request(options)
end

#list_streaming_distributions(params = {}) ⇒ Types::ListStreamingDistributionsResult

List streaming distributions.

Examples:

Request syntax with placeholder values


resp = client.list_streaming_distributions({
  marker: "string",
  max_items: 1,
})

Response structure


resp.streaming_distribution_list.marker #=> String
resp.streaming_distribution_list.next_marker #=> String
resp.streaming_distribution_list.max_items #=> Integer
resp.streaming_distribution_list.is_truncated #=> Boolean
resp.streaming_distribution_list.quantity #=> Integer
resp.streaming_distribution_list.items #=> Array
resp.streaming_distribution_list.items[0].id #=> String
resp.streaming_distribution_list.items[0].arn #=> String
resp.streaming_distribution_list.items[0].status #=> String
resp.streaming_distribution_list.items[0].last_modified_time #=> Time
resp.streaming_distribution_list.items[0].domain_name #=> String
resp.streaming_distribution_list.items[0].s3_origin.domain_name #=> String
resp.streaming_distribution_list.items[0].s3_origin.origin_access_identity #=> String
resp.streaming_distribution_list.items[0].aliases.quantity #=> Integer
resp.streaming_distribution_list.items[0].aliases.items #=> Array
resp.streaming_distribution_list.items[0].aliases.items[0] #=> String
resp.streaming_distribution_list.items[0].trusted_signers.enabled #=> Boolean
resp.streaming_distribution_list.items[0].trusted_signers.quantity #=> Integer
resp.streaming_distribution_list.items[0].trusted_signers.items #=> Array
resp.streaming_distribution_list.items[0].trusted_signers.items[0] #=> String
resp.streaming_distribution_list.items[0].comment #=> String
resp.streaming_distribution_list.items[0].price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.streaming_distribution_list.items[0].enabled #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :marker (String)

    The value that you provided for the ‘Marker` request parameter.

  • :max_items (Integer)

    The value that you provided for the ‘MaxItems` request parameter.

Returns:

See Also:



3225
3226
3227
3228
# File 'lib/aws-sdk-cloudfront/client.rb', line 3225

def list_streaming_distributions(params = {}, options = {})
  req = build_request(:list_streaming_distributions, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResult

List tags for a CloudFront resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource: "ResourceARN", # required
})

Response structure


resp.tags.items #=> Array
resp.tags.items[0].key #=> String
resp.tags.items[0].value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource (required, String)

    An ARN of a CloudFront resource.

Returns:

See Also:



3255
3256
3257
3258
# File 'lib/aws-sdk-cloudfront/client.rb', line 3255

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Add tags to a CloudFront resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource: "ResourceARN", # required
  tags: { # required
    items: [
      {
        key: "TagKey", # required
        value: "TagValue",
      },
    ],
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource (required, String)

    An ARN of a CloudFront resource.

  • :tags (required, Types::Tags)

    A complex type that contains zero or more ‘Tag` elements.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3288
3289
3290
3291
# File 'lib/aws-sdk-cloudfront/client.rb', line 3288

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Remove tags from a CloudFront resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource: "ResourceARN", # required
  tag_keys: { # required
    items: ["TagKey"],
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource (required, String)

    An ARN of a CloudFront resource.

  • :tag_keys (required, Types::TagKeys)

    A complex type that contains zero or more ‘Tag` key elements.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3316
3317
3318
3319
# File 'lib/aws-sdk-cloudfront/client.rb', line 3316

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_cloud_front_origin_access_identity(params = {}) ⇒ Types::UpdateCloudFrontOriginAccessIdentityResult

Update an origin access identity.

Examples:

Request syntax with placeholder values


resp = client.update_cloud_front_origin_access_identity({
  cloud_front_origin_access_identity_config: { # required
    caller_reference: "string", # required
    comment: "string", # required
  },
  id: "string", # required
  if_match: "string",
})

Response structure


resp.cloud_front_origin_access_identity.id #=> String
resp.cloud_front_origin_access_identity.s3_canonical_user_id #=> String
resp.cloud_front_origin_access_identity.cloud_front_origin_access_identity_config.caller_reference #=> String
resp.cloud_front_origin_access_identity.cloud_front_origin_access_identity_config.comment #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cloud_front_origin_access_identity_config (required, Types::CloudFrontOriginAccessIdentityConfig)

    The identity’s configuration information.

  • :id (required, String)

    The identity’s id.

  • :if_match (String)

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

Returns:

See Also:



3361
3362
3363
3364
# File 'lib/aws-sdk-cloudfront/client.rb', line 3361

def update_cloud_front_origin_access_identity(params = {}, options = {})
  req = build_request(:update_cloud_front_origin_access_identity, params)
  req.send_request(options)
end

#update_distribution(params = {}) ⇒ Types::UpdateDistributionResult

Updates the configuration for a web distribution.

When you update a distribution, there are more required fields than when you create a distribution. When you update your distribution by using this API action, follow the steps here to get the current configuration and then make your updates, to make sure that you include all of the required fields. To view a summary, see [Required Fields for Create Distribution and Update Distribution] in the *Amazon CloudFront Developer Guide*.

The update process includes getting the current distribution configuration, updating the XML document that is returned to make your changes, and then submitting an ‘UpdateDistribution` request to make the updates.

For information about updating a distribution using the CloudFront console instead, see [Creating a Distribution] in the *Amazon CloudFront Developer Guide*.

**To update a web distribution using the CloudFront API**

  1. Submit a [GetDistributionConfig] request to get the current configuration and an ‘Etag` header for the distribution.

    <note markdown=“1”> If you update the distribution again, you must get a new ‘Etag` header.

    </note>
    
  2. Update the XML document that was returned in the response to your ‘GetDistributionConfig` request to include your changes.

    When you edit the XML file, be aware of the following:

    * You must strip out the ETag parameter that is returned.
    
    • Additional fields are required when you update a distribution. There may be fields included in the XML file for features that you haven’t configured for your distribution. This is expected and required to successfully update the distribution.

    • You can’t change the value of ‘CallerReference`. If you try to change this value, CloudFront returns an `IllegalUpdate` error.

    • The new configuration replaces the existing configuration; the values that you specify in an ‘UpdateDistribution` request are not merged into your existing configuration. When you add, delete, or replace values in an element that allows multiple values (for example, `CNAME`), you must specify all of the values that you want to appear in the updated distribution. In addition, you must update the corresponding `Quantity` element.

  3. Submit an ‘UpdateDistribution` request to update the configuration for your distribution:

    • In the request body, include the XML document that you updated in Step 2. The request body must include an XML document with a ‘DistributionConfig` element.

    • Set the value of the HTTP ‘If-Match` header to the value of the `ETag` header that CloudFront returned when you submitted the `GetDistributionConfig` request in Step 1.

  4. Review the response to the ‘UpdateDistribution` request to confirm that the configuration was successfully updated.

  5. Optional: Submit a [GetDistribution] request to confirm that your changes have propagated. When propagation is complete, the value of ‘Status` is `Deployed`.

[1]: docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html [2]: docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html [3]: docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistributionConfig.html [4]: docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistribution.html

Examples:

Request syntax with placeholder values


resp = client.update_distribution({
  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",
})

Response structure


resp.distribution.id #=> String
resp.distribution.arn #=> String
resp.distribution.status #=> String
resp.distribution.last_modified_time #=> Time
resp.distribution.in_progress_invalidation_batches #=> Integer
resp.distribution.domain_name #=> String
resp.distribution.active_trusted_signers.enabled #=> Boolean
resp.distribution.active_trusted_signers.quantity #=> Integer
resp.distribution.active_trusted_signers.items #=> Array
resp.distribution.active_trusted_signers.items[0]. #=> String
resp.distribution.active_trusted_signers.items[0].key_pair_ids.quantity #=> Integer
resp.distribution.active_trusted_signers.items[0].key_pair_ids.items #=> Array
resp.distribution.active_trusted_signers.items[0].key_pair_ids.items[0] #=> String
resp.distribution.distribution_config.caller_reference #=> String
resp.distribution.distribution_config.aliases.quantity #=> Integer
resp.distribution.distribution_config.aliases.items #=> Array
resp.distribution.distribution_config.aliases.items[0] #=> String
resp.distribution.distribution_config.default_root_object #=> String
resp.distribution.distribution_config.origins.quantity #=> Integer
resp.distribution.distribution_config.origins.items #=> Array
resp.distribution.distribution_config.origins.items[0].id #=> String
resp.distribution.distribution_config.origins.items[0].domain_name #=> String
resp.distribution.distribution_config.origins.items[0].origin_path #=> String
resp.distribution.distribution_config.origins.items[0].custom_headers.quantity #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_headers.items #=> Array
resp.distribution.distribution_config.origins.items[0].custom_headers.items[0].header_name #=> String
resp.distribution.distribution_config.origins.items[0].custom_headers.items[0].header_value #=> String
resp.distribution.distribution_config.origins.items[0].s3_origin_config.origin_access_identity #=> String
resp.distribution.distribution_config.origins.items[0].custom_origin_config.http_port #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.https_port #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_protocol_policy #=> String, one of "http-only", "match-viewer", "https-only"
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.quantity #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.items #=> Array
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_ssl_protocols.items[0] #=> String, one of "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_read_timeout #=> Integer
resp.distribution.distribution_config.origins.items[0].custom_origin_config.origin_keepalive_timeout #=> Integer
resp.distribution.distribution_config.origin_groups.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].id #=> String
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].failover_criteria.status_codes.items[0] #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].members.quantity #=> Integer
resp.distribution.distribution_config.origin_groups.items[0].members.items #=> Array
resp.distribution.distribution_config.origin_groups.items[0].members.items[0].origin_id #=> String
resp.distribution.distribution_config.default_cache_behavior.target_origin_id #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.headers.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.enabled #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.trusted_signers.items[0] #=> String
resp.distribution.distribution_config.default_cache_behavior.viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution.distribution_config.default_cache_behavior.min_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.default_cache_behavior.smooth_streaming #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.default_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.max_ttl #=> Integer
resp.distribution.distribution_config.default_cache_behavior.compress #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.quantity #=> Integer
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items #=> Array
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution.distribution_config.default_cache_behavior.lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution.distribution_config.default_cache_behavior.field_level_encryption_id #=> String
resp.distribution.distribution_config.cache_behaviors.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].path_pattern #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].target_origin_id #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.forward #=> String, one of "none", "whitelist", "all"
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.cookies.whitelisted_names.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.headers.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].forwarded_values.query_string_cache_keys.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.enabled #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].trusted_signers.items[0] #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].viewer_protocol_policy #=> String, one of "allow-all", "https-only", "redirect-to-https"
resp.distribution.distribution_config.cache_behaviors.items[0].min_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].allowed_methods.cached_methods.items[0] #=> String, one of "GET", "HEAD", "POST", "PUT", "PATCH", "OPTIONS", "DELETE"
resp.distribution.distribution_config.cache_behaviors.items[0].smooth_streaming #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].default_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].max_ttl #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].compress #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.quantity #=> Integer
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items #=> Array
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].lambda_function_arn #=> String
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].event_type #=> String, one of "viewer-request", "viewer-response", "origin-request", "origin-response"
resp.distribution.distribution_config.cache_behaviors.items[0].lambda_function_associations.items[0].include_body #=> Boolean
resp.distribution.distribution_config.cache_behaviors.items[0].field_level_encryption_id #=> String
resp.distribution.distribution_config.custom_error_responses.quantity #=> Integer
resp.distribution.distribution_config.custom_error_responses.items #=> Array
resp.distribution.distribution_config.custom_error_responses.items[0].error_code #=> Integer
resp.distribution.distribution_config.custom_error_responses.items[0].response_page_path #=> String
resp.distribution.distribution_config.custom_error_responses.items[0].response_code #=> String
resp.distribution.distribution_config.custom_error_responses.items[0].error_caching_min_ttl #=> Integer
resp.distribution.distribution_config.comment #=> String
resp.distribution.distribution_config.logging.enabled #=> Boolean
resp.distribution.distribution_config.logging.include_cookies #=> Boolean
resp.distribution.distribution_config.logging.bucket #=> String
resp.distribution.distribution_config.logging.prefix #=> String
resp.distribution.distribution_config.price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.distribution.distribution_config.enabled #=> Boolean
resp.distribution.distribution_config.viewer_certificate.cloud_front_default_certificate #=> Boolean
resp.distribution.distribution_config.viewer_certificate.iam_certificate_id #=> String
resp.distribution.distribution_config.viewer_certificate.acm_certificate_arn #=> String
resp.distribution.distribution_config.viewer_certificate.ssl_support_method #=> String, one of "sni-only", "vip"
resp.distribution.distribution_config.viewer_certificate.minimum_protocol_version #=> String, one of "SSLv3", "TLSv1", "TLSv1_2016", "TLSv1.1_2016", "TLSv1.2_2018"
resp.distribution.distribution_config.viewer_certificate.certificate #=> String
resp.distribution.distribution_config.viewer_certificate.certificate_source #=> String, one of "cloudfront", "iam", "acm"
resp.distribution.distribution_config.restrictions.geo_restriction.restriction_type #=> String, one of "blacklist", "whitelist", "none"
resp.distribution.distribution_config.restrictions.geo_restriction.quantity #=> Integer
resp.distribution.distribution_config.restrictions.geo_restriction.items #=> Array
resp.distribution.distribution_config.restrictions.geo_restriction.items[0] #=> String
resp.distribution.distribution_config.web_acl_id #=> String
resp.distribution.distribution_config.http_version #=> String, one of "http1.1", "http2"
resp.distribution.distribution_config.is_ipv6_enabled #=> Boolean
resp.distribution.alias_icp_recordals #=> Array
resp.distribution.alias_icp_recordals[0].cname #=> String
resp.distribution.alias_icp_recordals[0].icp_recordal_status #=> String, one of "APPROVED", "SUSPENDED", "PENDING"
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :distribution_config (required, Types::DistributionConfig)

    The distribution’s configuration information.

  • :id (required, String)

    The distribution’s id.

  • :if_match (String)

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

Returns:

See Also:



3829
3830
3831
3832
# File 'lib/aws-sdk-cloudfront/client.rb', line 3829

def update_distribution(params = {}, options = {})
  req = build_request(:update_distribution, params)
  req.send_request(options)
end

#update_field_level_encryption_config(params = {}) ⇒ Types::UpdateFieldLevelEncryptionConfigResult

Update a field-level encryption configuration.

Examples:

Request syntax with placeholder values


resp = client.update_field_level_encryption_config({
  field_level_encryption_config: { # required
    caller_reference: "string", # required
    comment: "string",
    query_arg_profile_config: {
      forward_when_query_arg_profile_is_unknown: false, # required
      query_arg_profiles: {
        quantity: 1, # required
        items: [
          {
            query_arg: "string", # required
            profile_id: "string", # required
          },
        ],
      },
    },
    content_type_profile_config: {
      forward_when_content_type_is_unknown: false, # required
      content_type_profiles: {
        quantity: 1, # required
        items: [
          {
            format: "URLEncoded", # required, accepts URLEncoded
            profile_id: "string",
            content_type: "string", # required
          },
        ],
      },
    },
  },
  id: "string", # required
  if_match: "string",
})

Response structure


resp.field_level_encryption.id #=> String
resp.field_level_encryption.last_modified_time #=> Time
resp.field_level_encryption.field_level_encryption_config.caller_reference #=> String
resp.field_level_encryption.field_level_encryption_config.comment #=> String
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.forward_when_query_arg_profile_is_unknown #=> Boolean
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.quantity #=> Integer
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items #=> Array
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items[0].query_arg #=> String
resp.field_level_encryption.field_level_encryption_config.query_arg_profile_config.query_arg_profiles.items[0].profile_id #=> String
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.forward_when_content_type_is_unknown #=> Boolean
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.quantity #=> Integer
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items #=> Array
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].format #=> String, one of "URLEncoded"
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].profile_id #=> String
resp.field_level_encryption.field_level_encryption_config.content_type_profile_config.content_type_profiles.items[0].content_type #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :field_level_encryption_config (required, Types::FieldLevelEncryptionConfig)

    Request to update a field-level encryption configuration.

  • :id (required, String)

    The ID of the configuration you want to update.

  • :if_match (String)

    The value of the ‘ETag` header that you received when retrieving the configuration identity to update. For example: `E2QWRUHAPOMQZL`.

Returns:

See Also:



3910
3911
3912
3913
# File 'lib/aws-sdk-cloudfront/client.rb', line 3910

def update_field_level_encryption_config(params = {}, options = {})
  req = build_request(:update_field_level_encryption_config, params)
  req.send_request(options)
end

#update_field_level_encryption_profile(params = {}) ⇒ Types::UpdateFieldLevelEncryptionProfileResult

Update a field-level encryption profile.

Examples:

Request syntax with placeholder values


resp = client.update_field_level_encryption_profile({
  field_level_encryption_profile_config: { # required
    name: "string", # required
    caller_reference: "string", # required
    comment: "string",
    encryption_entities: { # required
      quantity: 1, # required
      items: [
        {
          public_key_id: "string", # required
          provider_id: "string", # required
          field_patterns: { # required
            quantity: 1, # required
            items: ["string"],
          },
        },
      ],
    },
  },
  id: "string", # required
  if_match: "string",
})

Response structure


resp.field_level_encryption_profile.id #=> String
resp.field_level_encryption_profile.last_modified_time #=> Time
resp.field_level_encryption_profile.field_level_encryption_profile_config.name #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.caller_reference #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.comment #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.quantity #=> Integer
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items #=> Array
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].public_key_id #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].provider_id #=> String
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.quantity #=> Integer
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.items #=> Array
resp.field_level_encryption_profile.field_level_encryption_profile_config.encryption_entities.items[0].field_patterns.items[0] #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :field_level_encryption_profile_config (required, Types::FieldLevelEncryptionProfileConfig)

    Request to update a field-level encryption profile.

  • :id (required, String)

    The ID of the field-level encryption profile request.

  • :if_match (String)

    The value of the ‘ETag` header that you received when retrieving the profile identity to update. For example: `E2QWRUHAPOMQZL`.

Returns:

See Also:



3977
3978
3979
3980
# File 'lib/aws-sdk-cloudfront/client.rb', line 3977

def update_field_level_encryption_profile(params = {}, options = {})
  req = build_request(:update_field_level_encryption_profile, params)
  req.send_request(options)
end

#update_public_key(params = {}) ⇒ Types::UpdatePublicKeyResult

Update public key information. Note that the only value you can change is the comment.

Examples:

Request syntax with placeholder values


resp = client.update_public_key({
  public_key_config: { # required
    caller_reference: "string", # required
    name: "string", # required
    encoded_key: "string", # required
    comment: "string",
  },
  id: "string", # required
  if_match: "string",
})

Response structure


resp.public_key.id #=> String
resp.public_key.created_time #=> Time
resp.public_key.public_key_config.caller_reference #=> String
resp.public_key.public_key_config.name #=> String
resp.public_key.public_key_config.encoded_key #=> String
resp.public_key.public_key_config.comment #=> String
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :public_key_config (required, Types::PublicKeyConfig)

    Request to update public key information.

  • :id (required, String)

    ID of the public key to be updated.

  • :if_match (String)

    The value of the ‘ETag` header that you received when retrieving the public key to update. For example: `E2QWRUHAPOMQZL`.

Returns:

See Also:



4027
4028
4029
4030
# File 'lib/aws-sdk-cloudfront/client.rb', line 4027

def update_public_key(params = {}, options = {})
  req = build_request(:update_public_key, params)
  req.send_request(options)
end

#update_streaming_distribution(params = {}) ⇒ Types::UpdateStreamingDistributionResult

Update a streaming distribution.

Examples:

Request syntax with placeholder values


resp = client.update_streaming_distribution({
  streaming_distribution_config: { # required
    caller_reference: "string", # required
    s3_origin: { # required
      domain_name: "string", # required
      origin_access_identity: "string", # required
    },
    aliases: {
      quantity: 1, # required
      items: ["string"],
    },
    comment: "string", # required
    logging: {
      enabled: false, # required
      bucket: "string", # required
      prefix: "string", # required
    },
    trusted_signers: { # required
      enabled: false, # required
      quantity: 1, # required
      items: ["string"],
    },
    price_class: "PriceClass_100", # accepts PriceClass_100, PriceClass_200, PriceClass_All
    enabled: false, # required
  },
  id: "string", # required
  if_match: "string",
})

Response structure


resp.streaming_distribution.id #=> String
resp.streaming_distribution.arn #=> String
resp.streaming_distribution.status #=> String
resp.streaming_distribution.last_modified_time #=> Time
resp.streaming_distribution.domain_name #=> String
resp.streaming_distribution.active_trusted_signers.enabled #=> Boolean
resp.streaming_distribution.active_trusted_signers.quantity #=> Integer
resp.streaming_distribution.active_trusted_signers.items #=> Array
resp.streaming_distribution.active_trusted_signers.items[0]. #=> String
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.quantity #=> Integer
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.items #=> Array
resp.streaming_distribution.active_trusted_signers.items[0].key_pair_ids.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.caller_reference #=> String
resp.streaming_distribution.streaming_distribution_config.s3_origin.domain_name #=> String
resp.streaming_distribution.streaming_distribution_config.s3_origin.origin_access_identity #=> String
resp.streaming_distribution.streaming_distribution_config.aliases.quantity #=> Integer
resp.streaming_distribution.streaming_distribution_config.aliases.items #=> Array
resp.streaming_distribution.streaming_distribution_config.aliases.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.comment #=> String
resp.streaming_distribution.streaming_distribution_config.logging.enabled #=> Boolean
resp.streaming_distribution.streaming_distribution_config.logging.bucket #=> String
resp.streaming_distribution.streaming_distribution_config.logging.prefix #=> String
resp.streaming_distribution.streaming_distribution_config.trusted_signers.enabled #=> Boolean
resp.streaming_distribution.streaming_distribution_config.trusted_signers.quantity #=> Integer
resp.streaming_distribution.streaming_distribution_config.trusted_signers.items #=> Array
resp.streaming_distribution.streaming_distribution_config.trusted_signers.items[0] #=> String
resp.streaming_distribution.streaming_distribution_config.price_class #=> String, one of "PriceClass_100", "PriceClass_200", "PriceClass_All"
resp.streaming_distribution.streaming_distribution_config.enabled #=> Boolean
resp.etag #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :streaming_distribution_config (required, Types::StreamingDistributionConfig)

    The streaming distribution’s configuration information.

  • :id (required, String)

    The streaming distribution’s id.

  • :if_match (String)

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

Returns:

See Also:



4117
4118
4119
4120
# File 'lib/aws-sdk-cloudfront/client.rb', line 4117

def update_streaming_distribution(params = {}, options = {})
  req = build_request(:update_streaming_distribution, params)
  req.send_request(options)
end

#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean

Polls an API operation until a resource enters a desired state.

## Basic Usage

A waiter will call an API operation until:

  • It is successful

  • It enters a terminal state

  • It makes the maximum number of attempts

In between attempts, the waiter will sleep.

# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)

## Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

## Callbacks

You can be notified before each polling attempt and before each delay. If you throw ‘:success` or `:failure` from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

  # poll for 1 hour, instead of a number of attempts
  before_wait: -> (attempts, response) do
    throw :failure if Time.now - started_at > 3600
  end
})

## Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

## Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default ‘:delay` and `:max_attempts` values.

| waiter_name | params | :delay | :max_attempts | | ——————————- | —————————– | ——– | ————- | | distribution_deployed | #get_distribution | 60 | 35 | | invalidation_completed | #get_invalidation | 20 | 30 | | streaming_distribution_deployed | #get_streaming_distribution | 60 | 25 |

Parameters:

  • waiter_name (Symbol)
  • params (Hash) (defaults to: {})

    ({})

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

Returns:

  • (Boolean)

    Returns ‘true` if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.



4229
4230
4231
4232
4233
# File 'lib/aws-sdk-cloudfront/client.rb', line 4229

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end

#waiter_namesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated.


4237
4238
4239
# File 'lib/aws-sdk-cloudfront/client.rb', line 4237

def waiter_names
  waiters.keys
end