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

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

Overview

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#bundle_id ⇒ String

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)


3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#cache_behavior_settings ⇒ Types::CacheSettings

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



3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#cache_behaviors ⇒ Array<Types::CacheBehaviorPerPath>

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

Returns:



3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#certificate_name ⇒ String

The name of the SSL/TLS certificate that you want to attach to the distribution.

Use the GetCertificates action to get a list of certificate names that you can specify.

Returns:

  • (String)


3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#custom_error_responses ⇒ Array<Types::DistributionCustomErrorResponse>

An array of objects that describe the custom error responses for the distribution. With a custom error response, you can specify the page to return when the origin responds with a given HTTP error code. You can also specify the HTTP status code to send to the viewer.



3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#default_cache_behavior ⇒ Types::CacheBehavior

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



3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#default_root_object ⇒ String

The object (for example, index.html) that the distribution returns when a viewer requests the root URL of the distribution (/) instead of a specific object. The object that you specify must be available from the origin.

Returns:

  • (String)


3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#distribution_name ⇒ String

The name for the distribution.

Returns:

  • (String)


3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#enable_private_origin_access ⇒ Boolean

Specifies whether to enable private origin access for the distribution. With private origin access, the distribution can serve objects that aren't publicly accessible from a Lightsail bucket.

Lightsail grants the distribution permission to read the bucket's objects. Enabling private origin access doesn't change the bucket's access settings, and you can still retrieve publicly accessible objects directly from the bucket's endpoint.

You can enable private origin access only when the distribution's origin is a Lightsail bucket. If the origin is another resource type, the request fails.

Returns:

  • (Boolean)


3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#enable_waf ⇒ Boolean

Specifies whether to enable Web Application Firewall (WAF) for the distribution. WAF inspects viewer requests and blocks requests that match the WAF rule groups that you enable.

When you enable WAF without specifying the wafRules parameter, the distribution has no WAF rule groups enabled and doesn't block any requests.

WAF is available only for distributions that use the medium_1_0 or large_1_0 bundle.

Returns:

  • (Boolean)


3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#ip_address_type ⇒ String

The IP address type for the distribution.

The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.

The default value is dualstack.

Returns:

  • (String)


3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#origin ⇒ Types::InputOrigin

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

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

Returns:



3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#subdomain_name ⇒ String

The Lightsail subdomain to create and associate with the distribution (for example, mysite, for the web address mysite.amazonlightsail.com).

After the distribution is deployed, Lightsail creates the subdomain and associates it with the distribution. If Lightsail can't create or associate the subdomain, it still creates the distribution, but the CreateDistribution operation fails and the state of the distribution's subdomain is Error. To check the status, use the subdomain parameter of the distribution.

Returns:

  • (String)


3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#tags ⇒ Array<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:



3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#viewer_minimum_tls_protocol_version ⇒ String

The minimum TLS protocol version for the SSL/TLS certificate.

Returns:

  • (String)


3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end

#waf_rules ⇒ Array<Types::WafRule>

An array of objects that describe the WAF rule groups to enable for the distribution.

The WAF rule groups that you can specify depend on the bundle of the distribution:

  • medium_1_0 – Supports the AWSManagedRulesCommonRuleSet, AWSManagedRulesKnownBadInputsRuleSet, and AWSManagedRulesAnonymousIpList rule groups.

  • large_1_0 – Supports the rule groups for medium_1_0, plus AWSManagedRulesAdminProtectionRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesLinuxRuleSet, AWSManagedRulesUnixRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesPHPRuleSet, AWSManagedRulesWordPressRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesATPRuleSet, AWSManagedRulesACFPRuleSet, and AWSManagedRulesBotControlRuleSet rule groups.

Returns:



3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 3910

class CreateDistributionRequest < Struct.new(
  :distribution_name,
  :origin,
  :default_cache_behavior,
  :cache_behavior_settings,
  :cache_behaviors,
  :bundle_id,
  :ip_address_type,
  :tags,
  :certificate_name,
  :viewer_minimum_tls_protocol_version,
  :enable_private_origin_access,
  :default_root_object,
  :custom_error_responses,
  :enable_waf,
  :waf_rules,
  :subdomain_name)
  SENSITIVE = []
  include Aws::Structure
end