# StatusCodesProperty

A complex data type for the status codes that you specify that, when returned by a primary origin, trigger CloudFront to failover to a second origin.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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';
const statusCodesProperty: cloudfront.CfnDistribution.StatusCodesProperty = {
  items: [123],
  quantity: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudfront as cloudfront

status_codes_property = cloudfront.CfnDistribution.StatusCodesProperty(
    items=[123],
    quantity=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudfront.*;

StatusCodesProperty statusCodesProperty = StatusCodesProperty.builder()
        .items(List.of(123))
        .quantity(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudFront;

var statusCodesProperty = new StatusCodesProperty {
    Items = new [] { 123 },
    Quantity = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

statusCodesProperty := &StatusCodesProperty{
	Items: []interface{}{
		jsii.Number(123),
	},
	Quantity: jsii.Number(123),
}
```

## Properties

- `items`: number[] | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) (required) — The items (status codes) for an origin group.

- `quantity`: number (required) — The number of status codes.
