aws-cdk-lib.aws_lightsail.CfnDistributionProps

interface CfnDistributionProps

LanguageType name
.NETAmazon.CDK.AWS.Lightsail.CfnDistributionProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslightsail#CfnDistributionProps
Javasoftware.amazon.awscdk.services.lightsail.CfnDistributionProps
Pythonaws_cdk.aws_lightsail.CfnDistributionProps
TypeScript aws-cdk-lib » aws_lightsail » CfnDistributionProps

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 { aws_lightsail as lightsail } from 'aws-cdk-lib';
const cfnDistributionProps: lightsail.CfnDistributionProps = {
  bundleId: 'bundleId',
  defaultCacheBehavior: {
    behavior: 'behavior',
  },
  distributionName: 'distributionName',
  origin: {
    name: 'name',
    protocolPolicy: 'protocolPolicy',
    regionName: 'regionName',
  },

  // the properties below are optional
  cacheBehaviors: [{
    behavior: 'behavior',
    path: 'path',
  }],
  cacheBehaviorSettings: {
    allowedHttpMethods: 'allowedHttpMethods',
    cachedHttpMethods: 'cachedHttpMethods',
    defaultTtl: 123,
    forwardedCookies: {
      cookiesAllowList: ['cookiesAllowList'],
      option: 'option',
    },
    forwardedHeaders: {
      headersAllowList: ['headersAllowList'],
      option: 'option',
    },
    forwardedQueryStrings: {
      option: false,
      queryStringsAllowList: ['queryStringsAllowList'],
    },
    maximumTtl: 123,
    minimumTtl: 123,
  },
  certificateName: 'certificateName',
  ipAddressType: 'ipAddressType',
  isEnabled: false,
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties

NameTypeDescription
bundleIdstringThe ID of the bundle applied to the distribution.
defaultCacheBehaviorIResolvable | CacheBehaviorPropertyAn object that describes the default cache behavior of the distribution.
distributionNamestringThe name of the distribution.
originIResolvable | InputOriginPropertyAn object that describes the origin resource of the distribution, such as a Lightsail instance, bucket, or load balancer.
cacheBehaviorSettings?IResolvable | CacheSettingsPropertyAn object that describes the cache behavior settings of the distribution.
cacheBehaviors?IResolvable | IResolvable | CacheBehaviorPerPathProperty[]An array of objects that describe the per-path cache behavior of the distribution.
certificateName?stringThe name of the SSL/TLS certificate attached to the distribution.
ipAddressType?stringThe IP address type of the distribution.
isEnabled?boolean | IResolvableA Boolean value indicating whether the distribution is enabled.
tags?CfnTag[]An array of key-value pairs to apply to this resource.

bundleId

Type: string

The ID of the bundle applied to the distribution.


defaultCacheBehavior

Type: IResolvable | CacheBehaviorProperty

An object that describes the default cache behavior of the distribution.


distributionName

Type: string

The name of the distribution.


origin

Type: IResolvable | InputOriginProperty

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.


cacheBehaviorSettings?

Type: IResolvable | CacheSettingsProperty (optional)

An object that describes the cache behavior settings of the distribution.


cacheBehaviors?

Type: IResolvable | IResolvable | CacheBehaviorPerPathProperty[] (optional)

An array of objects that describe the per-path cache behavior of the distribution.


certificateName?

Type: string (optional)

The name of the SSL/TLS certificate attached to the distribution.


ipAddressType?

Type: string (optional)

The IP address type of the distribution.

The possible values are ipv4 for IPv4 only, and dualstack for IPv4 and IPv6.


isEnabled?

Type: boolean | IResolvable (optional)

A Boolean value indicating whether the distribution is enabled.


tags?

Type: CfnTag[] (optional)

An array of key-value pairs to apply to this resource.

For more information, see Tag in the AWS CloudFormation User Guide .

The Value of Tags is optional for Lightsail resources.