Class: Aws::Lightsail::Types::CreateDistributionRequest

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

Overview

Note:

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

{
  distribution_name: "ResourceName", # required
  origin: { # required
    name: "ResourceName",
    region_name: "us-east-1", # accepts us-east-1, us-east-2, us-west-1, us-west-2, eu-west-1, eu-west-2, eu-west-3, eu-central-1, ca-central-1, ap-south-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, ap-northeast-2
    protocol_policy: "http-only", # accepts http-only, https-only
  },
  default_cache_behavior: { # required
    behavior: "dont-cache", # accepts dont-cache, cache
  },
  cache_behavior_settings: {
    default_ttl: 1,
    minimum_ttl: 1,
    maximum_ttl: 1,
    allowed_http_methods: "NonEmptyString",
    cached_http_methods: "NonEmptyString",
    forwarded_cookies: {
      option: "none", # accepts none, allow-list, all
      cookies_allow_list: ["string"],
    },
    forwarded_headers: {
      option: "none", # accepts none, allow-list, all
      headers_allow_list: ["Accept"], # accepts Accept, Accept-Charset, Accept-Datetime, Accept-Encoding, Accept-Language, Authorization, CloudFront-Forwarded-Proto, CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer, CloudFront-Is-SmartTV-Viewer, CloudFront-Is-Tablet-Viewer, CloudFront-Viewer-Country, Host, Origin, Referer
    },
    forwarded_query_strings: {
      option: false,
      query_strings_allow_list: ["string"],
    },
  },
  cache_behaviors: [
    {
      path: "string",
      behavior: "dont-cache", # accepts dont-cache, cache
    },
  ],
  bundle_id: "string", # required
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#bundle_idString

The bundle ID to use for the distribution.

A distribution bundle describes the specifications of your distribution, such as the monthly cost and monthly network transfer quota.

Use the GetDistributionBundles action to get a list of distribution bundle IDs that you can specify.

Returns:

  • (String)


2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 2312

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end

#cache_behavior_settingsTypes::CacheSettings

An object that describes the cache behavior settings for the distribution.



2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 2312

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end

#cache_behaviorsArray<Types::CacheBehaviorPerPath>

An array of objects that describe the per-path cache behavior for the distribution.

Returns:



2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 2312

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end

#default_cache_behaviorTypes::CacheBehavior

An object that describes the default cache behavior for the distribution.



2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 2312

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end

#distribution_nameString

The name for the distribution.

Returns:

  • (String)


2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 2312

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end

#originTypes::InputOrigin

An object that describes the origin resource for the distribution, such as a Lightsail instance or load balancer.

The distribution pulls, caches, and serves content from the origin.

Returns:



2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 2312

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end

#tagsArray<Types::Tag>

The tag keys and optional values to add to the distribution during create.

Use the TagResource action to tag a resource after it's created.

Returns:



2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 2312

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :tags)
  SENSITIVE = []
  include Aws::Structure
end