File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 Origin ,
55} from 'aws-sdk/clients/cloudfront'
66import cuid from 'cuid'
7- import isEmpty from 'lodash/isEmpty'
87
98import t from '../../properties/translations'
109import { formatTagsFromMap } from '../../utils/format'
@@ -118,7 +117,7 @@ export default ({
118117 CallerReference : callerReference ,
119118 DefaultRootObject : defaultRootObject ,
120119 HttpVersion : httpVersion ,
121- Restrictions : { GeoRestriction : { Items : geoRestrictions = [ ] } } = {
120+ Restrictions : { GeoRestriction : { Items : locations = [ ] , RestrictionType : restrictionType = '' } } = {
122121 GeoRestriction : { RestrictionType : '' , Items : [ ] , Quantity : 0 } ,
123122 } ,
124123 Logging : logging ,
@@ -237,9 +236,10 @@ export default ({
237236 domainName,
238237 enabled : enabled ? t . yes : t . no ,
239238 etag,
240- geoRestrictions : ! isEmpty ( geoRestrictions )
241- ? geoRestrictions . join ( ',' )
242- : 'none' ,
239+ geoRestriction : {
240+ restrictionType,
241+ locations,
242+ } ,
243243 httpVersion,
244244 ipv6Enabled : isIpv6Enabled ? t . yes : t . no ,
245245 lastModified : lastModified . toISOString ( ) ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ type awsCloudfront @key(fields: "id") {
1313 ipv6Enabled : String @search (by : [hash ])
1414 defaultRootObject : String @search (by : [hash ])
1515 webAclId : String @search (by : [hash ])
16- geoRestrictions : String @search ( by : [ hash , regexp ])
16+ geoRestriction : awsCloudfrontGeoRestriction
1717 customErrorResponses : [awsCloudfrontCustomErrorResponse ]
1818 defaultCacheBehavior : awsCloudfrontCacheBehavior
1919 orderedCacheBehaviors : [awsCloudfrontCacheBehavior ]
@@ -96,4 +96,9 @@ type awsCloudfrontLoggingConfig {
9696 includeCookies : Boolean @search
9797 bucket : String @search (by : [hash , regexp ])
9898 prefix : String @search (by : [hash , regexp ])
99+ }
100+
101+ type awsCloudfrontGeoRestriction {
102+ restrictionType : String @search (by : [hash , regexp ])
103+ locations : [String ] @search (by : [hash , regexp ])
99104}
Original file line number Diff line number Diff line change @@ -780,7 +780,7 @@ export type AwsCloudfront = {
780780 elb ?: Maybe < Array < Maybe < AwsElb > > > ;
781781 enabled ?: Maybe < Scalars [ 'String' ] > ;
782782 etag ?: Maybe < Scalars [ 'String' ] > ;
783- geoRestrictions ?: Maybe < Scalars [ 'String' ] > ;
783+ geoRestriction ?: Maybe < AwsCloudfrontGeoRestriction > ;
784784 httpVersion ?: Maybe < Scalars [ 'String' ] > ;
785785 id : Scalars [ 'String' ] ;
786786 ipv6Enabled ?: Maybe < Scalars [ 'String' ] > ;
@@ -829,6 +829,11 @@ export type AwsCloudfrontCustomOriginConfig = {
829829 originSslProtocols ?: Maybe < AwsCloudfrontOriginSslProtocols > ;
830830} ;
831831
832+ export type AwsCloudfrontGeoRestriction = {
833+ locations ?: Maybe < Array < Maybe < Scalars [ 'String' ] > > > ;
834+ restrictionType ?: Maybe < Scalars [ 'String' ] > ;
835+ } ;
836+
832837export type AwsCloudfrontLoggingConfig = {
833838 bucket ?: Maybe < Scalars [ 'String' ] > ;
834839 enabled ?: Maybe < Scalars [ 'Boolean' ] > ;
You can’t perform that action at this time.
0 commit comments