Class CfnDistribution
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.lightsail.CfnDistribution
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-06T14:43:21.545Z")
@Stability(Stable)
public class CfnDistribution
extends CfnResource
implements IInspectable, ITaggable
The
AWS::Lightsail::Distribution
resource specifies a content delivery network (CDN) distribution.
You can create distributions only in the us-east-1
AWS Region.
A distribution is a globally distributed network of caching servers that improve the performance of your website or web application hosted on a Lightsail instance, static content hosted on a Lightsail bucket, or through a Lightsail load balancer.
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.*; CfnDistribution cfnDistribution = CfnDistribution.Builder.create(this, "MyCfnDistribution") .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
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnDistribution
.static interface
CacheBehaviorPerPath
is a property of the AWS::Lightsail::Distribution resource.static interface
CacheBehavior
is a property of the AWS::Lightsail::Distribution resource.static interface
CacheSettings
is a property of the AWS::Lightsail::Distribution resource.static interface
CookieObject
is a property of the CacheSettings property.static interface
HeaderObject
is a property of the CacheSettings property.static interface
InputOrigin
is a property of the AWS::Lightsail::Distribution resource.static interface
QueryStringObject
is a property of the CacheSettings property.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnDistribution
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnDistribution
(software.amazon.jsii.JsiiObjectRef objRef) CfnDistribution
(software.constructs.Construct scope, String id, CfnDistributionProps props) -
Method Summary
Modifier and TypeMethodDescriptionIndicates whether you can update the distribution’s current bundle to another bundle.The Amazon Resource Name (ARN) of the distribution.The status of the distribution.The ID of the bundle applied to the distribution.An array of objects that describe the per-path cache behavior of the distribution.An object that describes the cache behavior settings of the distribution.The 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.The IP address type of the distribution.A 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()
Tag Manager which manages the tags for this resource.An array of key-value pairs to apply to this resource.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setBundleId
(String value) The ID of the bundle applied to the distribution.void
setCacheBehaviors
(List<Object> value) An array of objects that describe the per-path cache behavior of the distribution.void
setCacheBehaviors
(IResolvable value) An array of objects that describe the per-path cache behavior of the distribution.void
An object that describes the cache behavior settings of the distribution.void
An object that describes the cache behavior settings of the distribution.void
setCertificateName
(String value) The name of the SSL/TLS certificate attached to the distribution.void
An object that describes the default cache behavior of the distribution.void
An object that describes the default cache behavior of the distribution.void
setDistributionName
(String value) The name of the distribution.void
setIpAddressType
(String value) The IP address type of the distribution.void
setIsEnabled
(Boolean value) A Boolean value indicating whether the distribution is enabled.void
setIsEnabled
(IResolvable value) A Boolean value indicating whether the distribution is enabled.void
setOrigin
(IResolvable value) An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.void
An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.void
setTagsRaw
(List<CfnTag> value) An array of key-value pairs to apply to this resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnDistribution
protected CfnDistribution(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDistribution
protected CfnDistribution(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDistribution
@Stability(Stable) public CfnDistribution(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDistributionProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrAbleToUpdateBundle
Indicates whether you can update the distribution’s current bundle to another bundle. -
getAttrDistributionArn
The Amazon Resource Name (ARN) of the distribution. -
getAttrStatus
The status of the distribution. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getBundleId
The ID of the bundle applied to the distribution. -
setBundleId
The ID of the bundle applied to the distribution. -
getDefaultCacheBehavior
An object that describes the default cache behavior of the distribution. -
setDefaultCacheBehavior
An object that describes the default cache behavior of the distribution. -
setDefaultCacheBehavior
@Stability(Stable) public void setDefaultCacheBehavior(@NotNull CfnDistribution.CacheBehaviorProperty value) An object that describes the default cache behavior of the distribution. -
getDistributionName
The name of the distribution. -
setDistributionName
The name of the distribution. -
getOrigin
An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. -
setOrigin
An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. -
setOrigin
An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer. -
getCacheBehaviors
An array of objects that describe the per-path cache behavior of the distribution. -
setCacheBehaviors
An array of objects that describe the per-path cache behavior of the distribution. -
setCacheBehaviors
An array of objects that describe the per-path cache behavior of the distribution. -
getCacheBehaviorSettings
An object that describes the cache behavior settings of the distribution. -
setCacheBehaviorSettings
An object that describes the cache behavior settings of the distribution. -
setCacheBehaviorSettings
@Stability(Stable) public void setCacheBehaviorSettings(@Nullable CfnDistribution.CacheSettingsProperty value) An object that describes the cache behavior settings of the distribution. -
getCertificateName
The name of the SSL/TLS certificate attached to the distribution. -
setCertificateName
The name of the SSL/TLS certificate attached to the distribution. -
getIpAddressType
The IP address type of the distribution. -
setIpAddressType
The IP address type of the distribution. -
getIsEnabled
A Boolean value indicating whether the distribution is enabled. -
setIsEnabled
A Boolean value indicating whether the distribution is enabled. -
setIsEnabled
A Boolean value indicating whether the distribution is enabled. -
getTagsRaw
An array of key-value pairs to apply to this resource. -
setTagsRaw
An array of key-value pairs to apply to this resource.
-