Skip to content
v2.278.0

CookieObjectProperty Struct ​

CookieObject is a property of the CacheSettings property. It describes whether an Amazon Lightsail content delivery network (CDN) distribution forwards cookies to the origin and, if so, which ones.

For the cookies that you specify, your distribution caches separate versions of the specified content based on the cookie values in viewer requests.

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 cookieObjectProperty: lightsail.CfnDistribution.CookieObjectProperty = {
  cookiesAllowList: ['cookiesAllowList'],
  option: 'option',
};
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_lightsail as lightsail

cookie_object_property = lightsail.CfnDistribution.CookieObjectProperty(
    cookies_allow_list=["cookiesAllowList"],
    option="option"
)
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.lightsail.*;

CookieObjectProperty cookieObjectProperty = CookieObjectProperty.builder()
        .cookiesAllowList(List.of("cookiesAllowList"))
        .option("option")
        .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.Lightsail;

var cookieObjectProperty = new CookieObjectProperty {
    CookiesAllowList = new [] { "cookiesAllowList" },
    Option = "option"
};
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"

cookieObjectProperty := &CookieObjectProperty{
	CookiesAllowList: []*string{
		jsii.String("cookiesAllowList"),
	},
	Option: jsii.String("option"),
}

Properties ​

cookiesAllowListoptionalstring[]cookies_allow_listoptionaltyping.List[str]cookiesAllowListoptionalList<String>CookiesAllowListoptionalstring[]CookiesAllowListoptional*[]*string #
The specific cookies to forward to your distribution's origin.
optionoptionalstringoptionoptionalstroptionoptionalStringOptionoptionalstringOptionoptional*string #
Specifies which cookies to forward to the distribution's origin for a cache behavior.
notes

Use one of the following configurations for your distribution:

  • all - Forwards all cookies to your origin.
  • none - Doesn’t forward cookies to your origin.
  • allow-list - Forwards only the cookies that you specify using the CookiesAllowList parameter.