Skip to content
v2.278.0

AccessControlAllowMethodsProperty Struct ​

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 in the MDN Web Docs.

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';
const accessControlAllowMethodsProperty: cloudfront.CfnResponseHeadersPolicy.AccessControlAllowMethodsProperty = {
  items: ['items'],
};
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
// 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();
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" }
};
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 ​

itemsstring[]itemstyping.List[str]itemsList<String>Itemsstring[]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.