Skip to content
v2.278.0

GeoRestrictionCustomizationProperty Struct ​

The customizations that you specified for the distribution tenant for geographic restrictions.

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 geoRestrictionCustomizationProperty: cloudfront.CfnDistributionTenant.GeoRestrictionCustomizationProperty = {
  locations: ['locations'],
  restrictionType: 'restrictionType',
};
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

geo_restriction_customization_property = cloudfront.CfnDistributionTenant.GeoRestrictionCustomizationProperty(
    locations=["locations"],
    restriction_type="restrictionType"
)
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.*;

GeoRestrictionCustomizationProperty geoRestrictionCustomizationProperty = GeoRestrictionCustomizationProperty.builder()
        .locations(List.of("locations"))
        .restrictionType("restrictionType")
        .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 geoRestrictionCustomizationProperty = new GeoRestrictionCustomizationProperty {
    Locations = new [] { "locations" },
    RestrictionType = "restrictionType"
};
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"

geoRestrictionCustomizationProperty := &GeoRestrictionCustomizationProperty{
	Locations: []*string{
		jsii.String("locations"),
	},
	RestrictionType: jsii.String("restrictionType"),
}

Properties ​

locationsoptionalstring[]locationsoptionaltyping.List[str]locationsoptionalList<String>Locationsoptionalstring[]Locationsoptional*[]*string #
The locations for geographic restrictions.
restrictionTypeoptionalstringrestriction_typeoptionalstrrestrictionTypeoptionalStringRestrictionTypeoptionalstringRestrictionTypeoptional*string #
The method that you want to use to restrict distribution of your content by country:.
notes
  • none : No geographic restriction is enabled, meaning access to content is not restricted by client geo location.
  • blacklist : The Location elements specify the countries in which you don't want CloudFront to distribute your content.
  • whitelist : The Location elements specify the countries in which you want CloudFront to distribute your content.