# CfnDistributionProps

Properties for defining a `CfnDistribution`.

Extends: CfnDistributionProps
Used as props by: CfnDistribution

- Source: Generated code
- Type last changed: v2.10.0 · 29 Jan 2022

## Example

```ts
// 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

- `bundleId`: string (required) — The ID of the bundle applied to the distribution.

- `cacheBehaviors`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDistribution.CacheBehaviorPerPathProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution.CacheBehaviorPerPathProperty.html)[] — An array of objects that describe the per-path cache behavior of the distribution.

- `cacheBehaviorSettings`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDistribution.CacheSettingsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution.CacheSettingsProperty.html) — An object that describes the cache behavior settings of the distribution.

- `certificateName`: string — The name of the SSL/TLS certificate attached to the distribution.

- `defaultCacheBehavior`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDistribution.CacheBehaviorProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution.CacheBehaviorProperty.html) (required) — An object that describes the default cache behavior of the distribution.

- `distributionName`: string (required) — The name of the distribution.

- `ipAddressType`: string — The IP address type of the distribution.

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

- `isEnabled`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — A Boolean value indicating whether the distribution is enabled.

- `origin`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDistribution.InputOriginProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lightsail.CfnDistribution.InputOriginProperty.html) (required) — 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.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.

  For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *AWS CloudFormation User Guide* .

  > The `Value` of `Tags` is optional for Lightsail resources.
