Class CfnDistributionProps.Builder
java.lang.Object
software.amazon.awscdk.services.lightsail.CfnDistributionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDistributionProps>
- Enclosing interface:
CfnDistributionProps
@Stability(Stable)
public static final class CfnDistributionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnDistributionProps>
A builder for
CfnDistributionProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnDistributionProps.getBundleId()
cacheBehaviors
(List<? extends Object> cacheBehaviors) Sets the value ofCfnDistributionProps.getCacheBehaviors()
cacheBehaviors
(IResolvable cacheBehaviors) Sets the value ofCfnDistributionProps.getCacheBehaviors()
cacheBehaviorSettings
(IResolvable cacheBehaviorSettings) Sets the value ofCfnDistributionProps.getCacheBehaviorSettings()
cacheBehaviorSettings
(CfnDistribution.CacheSettingsProperty cacheBehaviorSettings) Sets the value ofCfnDistributionProps.getCacheBehaviorSettings()
certificateName
(String certificateName) Sets the value ofCfnDistributionProps.getCertificateName()
defaultCacheBehavior
(IResolvable defaultCacheBehavior) Sets the value ofCfnDistributionProps.getDefaultCacheBehavior()
defaultCacheBehavior
(CfnDistribution.CacheBehaviorProperty defaultCacheBehavior) Sets the value ofCfnDistributionProps.getDefaultCacheBehavior()
distributionName
(String distributionName) Sets the value ofCfnDistributionProps.getDistributionName()
ipAddressType
(String ipAddressType) Sets the value ofCfnDistributionProps.getIpAddressType()
Sets the value ofCfnDistributionProps.getIsEnabled()
isEnabled
(IResolvable isEnabled) Sets the value ofCfnDistributionProps.getIsEnabled()
origin
(IResolvable origin) Sets the value ofCfnDistributionProps.getOrigin()
Sets the value ofCfnDistributionProps.getOrigin()
Sets the value ofCfnDistributionProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bundleId
Sets the value ofCfnDistributionProps.getBundleId()
- Parameters:
bundleId
- The ID of the bundle applied to the distribution. This parameter is required.- Returns:
this
-
defaultCacheBehavior
@Stability(Stable) public CfnDistributionProps.Builder defaultCacheBehavior(IResolvable defaultCacheBehavior) Sets the value ofCfnDistributionProps.getDefaultCacheBehavior()
- Parameters:
defaultCacheBehavior
- An object that describes the default cache behavior of the distribution. This parameter is required.- Returns:
this
-
defaultCacheBehavior
@Stability(Stable) public CfnDistributionProps.Builder defaultCacheBehavior(CfnDistribution.CacheBehaviorProperty defaultCacheBehavior) Sets the value ofCfnDistributionProps.getDefaultCacheBehavior()
- Parameters:
defaultCacheBehavior
- An object that describes the default cache behavior of the distribution. This parameter is required.- Returns:
this
-
distributionName
Sets the value ofCfnDistributionProps.getDistributionName()
- Parameters:
distributionName
- The name of the distribution. This parameter is required.- Returns:
this
-
origin
Sets the value ofCfnDistributionProps.getOrigin()
- Parameters:
origin
- An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. This parameter is required. The distribution pulls, caches, and serves content from the origin.- Returns:
this
-
origin
@Stability(Stable) public CfnDistributionProps.Builder origin(CfnDistribution.InputOriginProperty origin) Sets the value ofCfnDistributionProps.getOrigin()
- Parameters:
origin
- An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. This parameter is required. The distribution pulls, caches, and serves content from the origin.- Returns:
this
-
cacheBehaviors
Sets the value ofCfnDistributionProps.getCacheBehaviors()
- Parameters:
cacheBehaviors
- An array of objects that describe the per-path cache behavior of the distribution.- Returns:
this
-
cacheBehaviors
@Stability(Stable) public CfnDistributionProps.Builder cacheBehaviors(List<? extends Object> cacheBehaviors) Sets the value ofCfnDistributionProps.getCacheBehaviors()
- Parameters:
cacheBehaviors
- An array of objects that describe the per-path cache behavior of the distribution.- Returns:
this
-
cacheBehaviorSettings
@Stability(Stable) public CfnDistributionProps.Builder cacheBehaviorSettings(IResolvable cacheBehaviorSettings) Sets the value ofCfnDistributionProps.getCacheBehaviorSettings()
- Parameters:
cacheBehaviorSettings
- An object that describes the cache behavior settings of the distribution.- Returns:
this
-
cacheBehaviorSettings
@Stability(Stable) public CfnDistributionProps.Builder cacheBehaviorSettings(CfnDistribution.CacheSettingsProperty cacheBehaviorSettings) Sets the value ofCfnDistributionProps.getCacheBehaviorSettings()
- Parameters:
cacheBehaviorSettings
- An object that describes the cache behavior settings of the distribution.- Returns:
this
-
certificateName
Sets the value ofCfnDistributionProps.getCertificateName()
- Parameters:
certificateName
- The name of the SSL/TLS certificate attached to the distribution.- Returns:
this
-
ipAddressType
Sets the value ofCfnDistributionProps.getIpAddressType()
- Parameters:
ipAddressType
- The IP address type of the distribution. The possible values areipv4
for IPv4 only, anddualstack
for IPv4 and IPv6.- Returns:
this
-
isEnabled
Sets the value ofCfnDistributionProps.getIsEnabled()
- Parameters:
isEnabled
- A Boolean value indicating whether the distribution is enabled.- Returns:
this
-
isEnabled
Sets the value ofCfnDistributionProps.getIsEnabled()
- Parameters:
isEnabled
- A Boolean value indicating whether the distribution is enabled.- Returns:
this
-
tags
Sets the value ofCfnDistributionProps.getTags()
- Parameters:
tags
- An array of key-value pairs to apply to this resource. For more information, see Tag in the AWS CloudFormation User Guide .The
Value
ofTags
is optional for Lightsail resources.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnDistributionProps>
- Returns:
- a new instance of
CfnDistributionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-