@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-06-22T23:27:51.598Z") 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.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnDistribution(Construct scope,
java.lang.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.
|
java.lang.String |
getAttrDistributionArn()
The Amazon Resource Name (ARN) of the distribution.
|
java.lang.String |
getAttrStatus()
The status of the distribution.
|
java.lang.String |
getBundleId()
The ID of the bundle applied to the distribution.
|
java.lang.Object |
getCacheBehaviors()
An array of objects that describe the per-path cache behavior of the distribution.
|
java.lang.Object |
getCacheBehaviorSettings()
An object that describes the cache behavior settings of the distribution.
|
java.lang.String |
getCertificateName()
The name of the SSL/TLS certificate attached to the distribution.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getDefaultCacheBehavior()
An object that describes the default cache behavior of the distribution.
|
java.lang.String |
getDistributionName()
The name of the distribution.
|
java.lang.String |
getIpAddressType()
The IP address type of the distribution.
|
java.lang.Object |
getIsEnabled()
A Boolean value indicating whether the distribution is enabled.
|
java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setBundleId(java.lang.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(java.util.List<java.lang.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(java.lang.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(java.lang.String value)
The name of the distribution.
|
void |
setIpAddressType(java.lang.String value)
The IP address type of the distribution.
|
void |
setIsEnabled(java.lang.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, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnDistribution(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDistribution(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnDistribution(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public IResolvable getAttrAbleToUpdateBundle()
public java.lang.String getAttrDistributionArn()
public java.lang.String getAttrStatus()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
For more information, see Tag in the AWS CloudFormation User Guide .
The
Value
ofTags
is optional for Lightsail resources.
public java.lang.String getBundleId()
public void setBundleId(java.lang.String value)
public java.lang.Object getDefaultCacheBehavior()
public void setDefaultCacheBehavior(IResolvable value)
public void setDefaultCacheBehavior(CfnDistribution.CacheBehaviorProperty value)
public java.lang.String getDistributionName()
public void setDistributionName(java.lang.String value)
public java.lang.Object getOrigin()
The distribution pulls, caches, and serves content from the origin.
public void setOrigin(IResolvable value)
The distribution pulls, caches, and serves content from the origin.
public void setOrigin(CfnDistribution.InputOriginProperty value)
The distribution pulls, caches, and serves content from the origin.
public java.lang.Object getCacheBehaviors()
public void setCacheBehaviors(IResolvable value)
public void setCacheBehaviors(java.util.List<java.lang.Object> value)
public java.lang.Object getCacheBehaviorSettings()
public void setCacheBehaviorSettings(IResolvable value)
public void setCacheBehaviorSettings(CfnDistribution.CacheSettingsProperty value)
public java.lang.String getCertificateName()
public void setCertificateName(java.lang.String value)
public java.lang.String getIpAddressType()
The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
public void setIpAddressType(java.lang.String value)
The possible values are ipv4
for IPv4 only, and dualstack
for IPv4 and IPv6.
public java.lang.Object getIsEnabled()
public void setIsEnabled(java.lang.Boolean value)
public void setIsEnabled(IResolvable value)