# AccessControlAllowMethodsProperty

A list of HTTP methods that CloudFront includes as values for the `Access-Control-Allow-Methods` HTTP response header.

For more information about the `Access-Control-Allow-Methods` HTTP response header, see [Access-Control-Allow-Methods](https://docs.aws.amazon.com/https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods) in the MDN Web Docs.

- 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 accessControlAllowMethodsProperty: cloudfront.CfnResponseHeadersPolicy.AccessControlAllowMethodsProperty = {
  items: ['items'],
};
```

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

access_control_allow_methods_property = cloudfront.CfnResponseHeadersPolicy.AccessControlAllowMethodsProperty(
    items=["items"]
)
```

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.*;

AccessControlAllowMethodsProperty accessControlAllowMethodsProperty = AccessControlAllowMethodsProperty.builder()
        .items(List.of("items"))
        .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 accessControlAllowMethodsProperty = new AccessControlAllowMethodsProperty {
    Items = new [] { "items" }
};
```

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"

accessControlAllowMethodsProperty := &AccessControlAllowMethodsProperty{
	Items: []*string{
		jsii.String("items"),
	},
}
```

## Properties

- `items`: string[] (required) — The list of HTTP methods. Valid values are:.

  - `GET`
  - `DELETE`
  - `HEAD`
  - `OPTIONS`
  - `PATCH`
  - `POST`
  - `PUT`
  - `ALL`

  `ALL` is a special value that includes all of the listed HTTP methods.
