Interface CfnDistributionProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnDistributionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:41.593Z")
@Stability(Stable)
public interface CfnDistributionProps
extends software.amazon.jsii.JsiiSerializable
Properties for defining a
CfnDistribution.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lightsail.*;
CfnDistributionProps cfnDistributionProps = CfnDistributionProps.builder()
.bundleId("bundleId")
.defaultCacheBehavior(CacheBehaviorProperty.builder()
.behavior("behavior")
.build())
.distributionName("distributionName")
.origin(InputOriginProperty.builder()
.name("name")
.protocolPolicy("protocolPolicy")
.regionName("regionName")
.build())
// the properties below are optional
.cacheBehaviors(List.of(CacheBehaviorPerPathProperty.builder()
.behavior("behavior")
.path("path")
.build()))
.cacheBehaviorSettings(CacheSettingsProperty.builder()
.allowedHttpMethods("allowedHttpMethods")
.cachedHttpMethods("cachedHttpMethods")
.defaultTtl(123)
.forwardedCookies(CookieObjectProperty.builder()
.cookiesAllowList(List.of("cookiesAllowList"))
.option("option")
.build())
.forwardedHeaders(HeaderObjectProperty.builder()
.headersAllowList(List.of("headersAllowList"))
.option("option")
.build())
.forwardedQueryStrings(QueryStringObjectProperty.builder()
.option(false)
.queryStringsAllowList(List.of("queryStringsAllowList"))
.build())
.maximumTtl(123)
.minimumTtl(123)
.build())
.certificateName("certificateName")
.ipAddressType("ipAddressType")
.isEnabled(false)
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnDistributionPropsstatic final classAn implementation forCfnDistributionProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnDistributionProps.Builderbuilder()The ID of the bundle applied to the distribution.default ObjectAn array of objects that describe the per-path cache behavior of the distribution.default ObjectAn object that describes the cache behavior settings of the distribution.default StringThe name of the SSL/TLS certificate attached to the distribution.An object that describes the default cache behavior of the distribution.The name of the distribution.default StringThe IP address type of the distribution.default ObjectA Boolean value indicating whether the distribution is enabled.An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.getTags()An array of key-value pairs to apply to this resource.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBundleId
The ID of the bundle applied to the distribution.- See Also:
-
getDefaultCacheBehavior
An object that describes the default cache behavior of the distribution.Returns union: either
IResolvableorCfnDistribution.CacheBehaviorProperty- See Also:
-
getDistributionName
The name of the distribution.- See Also:
-
getOrigin
An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.The distribution pulls, caches, and serves content from the origin.
Returns union: either
IResolvableorCfnDistribution.InputOriginProperty- See Also:
-
getCacheBehaviors
An array of objects that describe the per-path cache behavior of the distribution.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnDistribution.CacheBehaviorPerPathProperty>- See Also:
-
getCacheBehaviorSettings
An object that describes the cache behavior settings of the distribution.Returns union: either
IResolvableorCfnDistribution.CacheSettingsProperty- See Also:
-
getCertificateName
The name of the SSL/TLS certificate attached to the distribution.- See Also:
-
getIpAddressType
The IP address type of the distribution.The possible values are
ipv4for IPv4 only, anddualstackfor IPv4 and IPv6.- See Also:
-
getIsEnabled
A Boolean value indicating whether the distribution is enabled.Returns union: either
BooleanorIResolvable- See Also:
-
getTags
An array of key-value pairs to apply to this resource.For more information, see Tag in the AWS CloudFormation User Guide .
The
ValueofTagsis optional for Lightsail resources.- See Also:
-
builder
- Returns:
- a
CfnDistributionProps.BuilderofCfnDistributionProps
-