@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.655Z") @Stability(value=Stable) public class CfnDistribution extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnDistribution.Builder
A fluent builder for
CfnDistribution. |
static interface |
CfnDistribution.CacheBehaviorPerPathProperty
`CacheBehaviorPerPath` is a property of the [AWS::Lightsail::Distribution](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html) resource.
|
static interface |
CfnDistribution.CacheBehaviorProperty
`CacheBehavior` is a property of the [AWS::Lightsail::Distribution](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html) resource.
|
static interface |
CfnDistribution.CacheSettingsProperty
`CacheSettings` is a property of the [AWS::Lightsail::Distribution](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html) resource.
|
static interface |
CfnDistribution.CookieObjectProperty
`CookieObject` is a property of the [CacheSettings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html) property.
|
static interface |
CfnDistribution.HeaderObjectProperty
`HeaderObject` is a property of the [CacheSettings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html) property.
|
static interface |
CfnDistribution.InputOriginProperty
`InputOrigin` is a property of the [AWS::Lightsail::Distribution](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-distribution.html) resource.
|
static interface |
CfnDistribution.QueryStringObjectProperty
`QueryStringObject` is a property of the [CacheSettings](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-distribution-cachesettings.html) property.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnDistribution(software.constructs.Construct scope,
String id,
CfnDistributionProps props)
Create a new `AWS::Lightsail::Distribution`.
|
protected |
CfnDistribution(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDistribution(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
IResolvable |
getAttrAbleToUpdateBundle()
Indicates whether you can update the distribution’s current bundle to another bundle.
|
String |
getAttrDistributionArn()
The Amazon Resource Name (ARN) of the distribution.
|
String |
getAttrStatus()
The status of the distribution.
|
String |
getBundleId()
The ID of the bundle applied to the distribution.
|
Object |
getCacheBehaviors()
An array of objects that describe the per-path cache behavior of the distribution.
|
Object |
getCacheBehaviorSettings()
An object that describes the cache behavior settings of the distribution.
|
String |
getCertificateName()
The name of the SSL/TLS certificate attached to the distribution.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getDefaultCacheBehavior()
An object that describes the default cache behavior of the distribution.
|
String |
getDistributionName()
The name of the distribution.
|
String |
getIpAddressType()
The IP address type of the distribution.
|
Object |
getIsEnabled()
A Boolean value indicating whether the distribution is enabled.
|
Object |
getOrigin()
An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.
|
TagManager |
getTags()
An array of key-value pairs to apply to this resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setBundleId(String value)
The ID of the bundle applied to the distribution.
|
void |
setCacheBehaviors(IResolvable value)
An array of objects that describe the per-path cache behavior of the distribution.
|
void |
setCacheBehaviors(List<Object> value)
An array of objects that describe the per-path cache behavior of the distribution.
|
void |
setCacheBehaviorSettings(CfnDistribution.CacheSettingsProperty value)
An object that describes the cache behavior settings of the distribution.
|
void |
setCacheBehaviorSettings(IResolvable value)
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 |
setDefaultCacheBehavior(CfnDistribution.CacheBehaviorProperty value)
An object that describes the default cache behavior of the distribution.
|
void |
setDefaultCacheBehavior(IResolvable value)
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(CfnDistribution.InputOriginProperty value)
An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.
|
void |
setOrigin(IResolvable value)
An object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnDistribution(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDistribution(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnDistribution(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnDistributionProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public IResolvable getAttrAbleToUpdateBundle()
@Stability(value=Stable) @NotNull public String getAttrDistributionArn()
@Stability(value=Stable) @NotNull public String getAttrStatus()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
For more information, see Tag in the AWS CloudFormation User Guide .
The
ValueofTagsis optional for Lightsail resources.
@Stability(value=Stable) @NotNull public String getBundleId()
@Stability(value=Stable)
public void setBundleId(@NotNull
String value)
@Stability(value=Stable) @NotNull public Object getDefaultCacheBehavior()
@Stability(value=Stable)
public void setDefaultCacheBehavior(@NotNull
CfnDistribution.CacheBehaviorProperty value)
@Stability(value=Stable)
public void setDefaultCacheBehavior(@NotNull
IResolvable value)
@Stability(value=Stable) @NotNull public String getDistributionName()
@Stability(value=Stable)
public void setDistributionName(@NotNull
String value)
@Stability(value=Stable) @NotNull public Object getOrigin()
The distribution pulls, caches, and serves content from the origin.
@Stability(value=Stable)
public void setOrigin(@NotNull
CfnDistribution.InputOriginProperty value)
The distribution pulls, caches, and serves content from the origin.
@Stability(value=Stable)
public void setOrigin(@NotNull
IResolvable value)
The distribution pulls, caches, and serves content from the origin.
@Stability(value=Stable) @Nullable public Object getCacheBehaviors()
@Stability(value=Stable)
public void setCacheBehaviors(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setCacheBehaviors(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public Object getCacheBehaviorSettings()
@Stability(value=Stable)
public void setCacheBehaviorSettings(@Nullable
CfnDistribution.CacheSettingsProperty value)
@Stability(value=Stable)
public void setCacheBehaviorSettings(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getCertificateName()
@Stability(value=Stable)
public void setCertificateName(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getIpAddressType()
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
@Stability(value=Stable)
public void setIpAddressType(@Nullable
String value)
The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.
@Stability(value=Stable) @Nullable public Object getIsEnabled()
@Stability(value=Stable)
public void setIsEnabled(@Nullable
Boolean value)
@Stability(value=Stable)
public void setIsEnabled(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.