# OriginBindConfig

The struct returned from `IOrigin.bind`.

- Source: [`aws-cloudfront/lib/origin.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-cloudfront/lib/origin.ts#L62)
- Type last changed: v2.178.0 · 6 Feb 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';

declare const origin: cloudfront.IOrigin;
const originBindConfig: cloudfront.OriginBindConfig = {
  failoverConfig: {
    failoverOrigin: origin,

    // the properties below are optional
    statusCodes: [123],
  },
  originProperty: {
    domainName: 'domainName',
    id: 'id',

    // the properties below are optional
    connectionAttempts: 123,
    connectionTimeout: 123,
    customOriginConfig: {
      originProtocolPolicy: 'originProtocolPolicy',

      // the properties below are optional
      httpPort: 123,
      httpsPort: 123,
      ipAddressType: 'ipAddressType',
      originKeepaliveTimeout: 123,
      originMtlsConfig: {
        clientCertificateArn: 'clientCertificateArn',
      },
      originReadTimeout: 123,
      originSslProtocols: ['originSslProtocols'],
    },
    originAccessControlId: 'originAccessControlId',
    originCustomHeaders: [{
      headerName: 'headerName',
      headerValue: 'headerValue',
    }],
    originPath: 'originPath',
    originShield: {
      enabled: false,
      originShieldRegion: 'originShieldRegion',
    },
    responseCompletionTimeout: 123,
    s3OriginConfig: {
      originAccessIdentity: 'originAccessIdentity',
      originReadTimeout: 123,
    },
    vpcOriginConfig: {
      vpcOriginId: 'vpcOriginId',

      // the properties below are optional
      originKeepaliveTimeout: 123,
      originReadTimeout: 123,
      ownerAccountId: 'ownerAccountId',
    },
  },
  selectionCriteria: cloudfront.OriginSelectionCriteria.DEFAULT,
};
```

## Properties

- `failoverConfig`: [OriginFailoverConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginFailoverConfig.html) — The failover configuration for this Origin.

  **Default:** nothing is returned

- `originProperty`: [CfnDistribution.OriginProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.CfnDistribution.OriginProperty.html) — The CloudFormation OriginProperty configuration for this Origin.

  **Default:** nothing is returned

- `selectionCriteria`: [OriginSelectionCriteria](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.OriginSelectionCriteria.html) = OriginSelectionCriteria.DEFAULT — The selection criteria for how your origins are selected.
