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 @@ -10,7 +10,7 @@ type awsCloudfront implements awsBaseService @key(fields: "id") {
1010 ipv6Enabled : String @search (by : [hash ])
1111 defaultRootObject : String @search (by : [hash ])
1212 webAclId : String @search (by : [hash ])
13- geoRestrictions : String @search ( by : [ hash , regexp ])
13+ geoRestriction : awsCloudfrontGeoRestriction
1414 customErrorResponses : [awsCloudfrontCustomErrorResponse ]
1515 defaultCacheBehavior : awsCloudfrontCacheBehavior
1616 orderedCacheBehaviors : [awsCloudfrontCacheBehavior ]
@@ -94,3 +94,8 @@ type awsCloudfrontLoggingConfig {
9494 bucket : String @search (by : [hash , regexp ])
9595 prefix : String @search (by : [hash , regexp ])
9696}
97+
98+ type awsCloudfrontGeoRestriction {
99+ restrictionType : String @search (by : [hash , regexp ])
100+ locations : [String ] @search (by : [hash , regexp ])
101+ }
Original file line number Diff line number Diff line change @@ -749,7 +749,7 @@ export type AwsCloudfront = AwsBaseService & {
749749 elb ?: Maybe < Array < Maybe < AwsElb > > > ;
750750 enabled ?: Maybe < Scalars [ 'String' ] > ;
751751 etag ?: Maybe < Scalars [ 'String' ] > ;
752- geoRestrictions ?: Maybe < Scalars [ 'String' ] > ;
752+ geoRestriction ?: Maybe < AwsCloudfrontGeoRestriction > ;
753753 httpVersion ?: Maybe < Scalars [ 'String' ] > ;
754754 ipv6Enabled ?: Maybe < Scalars [ 'String' ] > ;
755755 lastModified ?: Maybe < Scalars [ 'String' ] > ;
@@ -797,6 +797,11 @@ export type AwsCloudfrontCustomOriginConfig = {
797797 originSslProtocols ?: Maybe < AwsCloudfrontOriginSslProtocols > ;
798798} ;
799799
800+ export type AwsCloudfrontGeoRestriction = {
801+ locations ?: Maybe < Array < Maybe < Scalars [ 'String' ] > > > ;
802+ restrictionType ?: Maybe < Scalars [ 'String' ] > ;
803+ } ;
804+
800805export type AwsCloudfrontLoggingConfig = {
801806 bucket ?: Maybe < Scalars [ 'String' ] > ;
802807 enabled ?: Maybe < Scalars [ 'Boolean' ] > ;
You can’t perform that action at this time.
0 commit comments