Class: Aws::CloudFront::Client

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

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`.

  • :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_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.

  • :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.

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

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

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function.

  • :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.

    @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 and auth errors from expired credentials.

  • :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.

  • :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.



202
203
204
# File 'lib/aws-sdk-cloudfront/client.rb', line 202

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.



4146
4147
4148
# File 'lib/aws-sdk-cloudfront/client.rb', line 4146

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.



4149
4150
4151
# File 'lib/aws-sdk-cloudfront/client.rb', line 4149

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: {})


4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
# File 'lib/aws-sdk-cloudfront/client.rb', line 4007

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.11.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:



250
251
252
253
# File 'lib/aws-sdk-cloudfront/client.rb', line 250

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*.

If you are using Adobe Flash Media Server’s RTMP protocol, you set up a different kind of CloudFront distribution. For more information, see CreateStreamingDistribution.

[1]: 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: "string", # 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.location #=> String
resp.etag #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



654
655
656
657
# File 'lib/aws-sdk-cloudfront/client.rb', line 654

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: "string", # 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.location #=> String
resp.etag #=> String

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



1047
1048
1049
1050
# File 'lib/aws-sdk-cloudfront/client.rb', line 1047

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:



1121
1122
1123
1124
# File 'lib/aws-sdk-cloudfront/client.rb', line 1121

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:



1181
1182
1183
1184
# File 'lib/aws-sdk-cloudfront/client.rb', line 1181

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:



1227
1228
1229
1230
# File 'lib/aws-sdk-cloudfront/client.rb', line 1227

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:



1271
1272
1273
1274
# File 'lib/aws-sdk-cloudfront/client.rb', line 1271

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 RMTP 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 web 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:



1386
1387
1388
1389
# File 'lib/aws-sdk-cloudfront/client.rb', line 1386

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:



1478
1479
1480
1481
# File 'lib/aws-sdk-cloudfront/client.rb', line 1478

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:



1505
1506
1507
1508
# File 'lib/aws-sdk-cloudfront/client.rb', line 1505

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:



1532
1533
1534
1535
# File 'lib/aws-sdk-cloudfront/client.rb', line 1532

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:



1559
1560
1561
1562
# File 'lib/aws-sdk-cloudfront/client.rb', line 1559

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:



1586
1587
1588
1589
# File 'lib/aws-sdk-cloudfront/client.rb', line 1586

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:



1613
1614
1615
1616
# File 'lib/aws-sdk-cloudfront/client.rb', line 1613

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:



1683
1684
1685
1686
# File 'lib/aws-sdk-cloudfront/client.rb', line 1683

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:



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

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:



1747
1748
1749
1750
# File 'lib/aws-sdk-cloudfront/client.rb', line 1747

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.etag #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The distribution’s ID.

Returns:

See Also:



1919
1920
1921
1922
# File 'lib/aws-sdk-cloudfront/client.rb', line 1919

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.

Returns:

See Also:



2078
2079
2080
2081
# File 'lib/aws-sdk-cloudfront/client.rb', line 2078

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:



2123
2124
2125
2126
# File 'lib/aws-sdk-cloudfront/client.rb', line 2123

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:



2166
2167
2168
2169
# File 'lib/aws-sdk-cloudfront/client.rb', line 2166

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:



2207
2208
2209
2210
# File 'lib/aws-sdk-cloudfront/client.rb', line 2207

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:



2247
2248
2249
2250
# File 'lib/aws-sdk-cloudfront/client.rb', line 2247

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:



2286
2287
2288
2289
# File 'lib/aws-sdk-cloudfront/client.rb', line 2286

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:



2321
2322
2323
2324
# File 'lib/aws-sdk-cloudfront/client.rb', line 2321

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:



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

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:



2412
2413
2414
2415
# File 'lib/aws-sdk-cloudfront/client.rb', line 2412

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:



2457
2458
2459
2460
# File 'lib/aws-sdk-cloudfront/client.rb', line 2457

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:



2503
2504
2505
2506
# File 'lib/aws-sdk-cloudfront/client.rb', line 2503

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 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

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:



2673
2674
2675
2676
# File 'lib/aws-sdk-cloudfront/client.rb', line 2673

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

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:



2852
2853
2854
2855
# File 'lib/aws-sdk-cloudfront/client.rb', line 2852

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:



2908
2909
2910
2911
# File 'lib/aws-sdk-cloudfront/client.rb', line 2908

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:



2960
2961
2962
2963
# File 'lib/aws-sdk-cloudfront/client.rb', line 2960

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:



3012
3013
3014
3015
# File 'lib/aws-sdk-cloudfront/client.rb', line 3012

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:



3057
3058
3059
3060
# File 'lib/aws-sdk-cloudfront/client.rb', line 3057

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:



3111
3112
3113
3114
# File 'lib/aws-sdk-cloudfront/client.rb', line 3111

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:



3141
3142
3143
3144
# File 'lib/aws-sdk-cloudfront/client.rb', line 3141

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:



3174
3175
3176
3177
# File 'lib/aws-sdk-cloudfront/client.rb', line 3174

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:



3202
3203
3204
3205
# File 'lib/aws-sdk-cloudfront/client.rb', line 3202

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:



3247
3248
3249
3250
# File 'lib/aws-sdk-cloudfront/client.rb', line 3247

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

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: "string", # 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.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:



3710
3711
3712
3713
# File 'lib/aws-sdk-cloudfront/client.rb', line 3710

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:



3791
3792
3793
3794
# File 'lib/aws-sdk-cloudfront/client.rb', line 3791

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:



3858
3859
3860
3861
# File 'lib/aws-sdk-cloudfront/client.rb', line 3858

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:



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

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:



3998
3999
4000
4001
# File 'lib/aws-sdk-cloudfront/client.rb', line 3998

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.waiter_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 | 25 | | 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.



4110
4111
4112
4113
4114
# File 'lib/aws-sdk-cloudfront/client.rb', line 4110

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.


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

def waiter_names
  waiters.keys
end