Difference between revisions of "Aws cloudfront get-distribution-config"

From wikieduonline
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
  [[aws cloudfront]] get-distribution-config --id
 
  [[aws cloudfront]] get-distribution-config --id
 
  [[aws cloudfront get-distribution-config]] --id E1IIT4N613WY75 --output=text
 
  [[aws cloudfront get-distribution-config]] --id E1IIT4N613WY75 --output=text
 +
 +
 +
* ViewerProtocolPolicy: <code>allow-all, redirect-to-https or https-only</code>.
  
  
Line 233: Line 236:
  
 
== Related ==
 
== Related ==
[[aws cloudfront list-distributions]]
+
* [[aws cloudfront list-distributions]]
[[Terraform resource: aws cloudfront distribution]]
+
* [[Terraform resource: aws_cloudfront_distribution]]
  
 
== See also ==
 
== See also ==

Latest revision as of 09:58, 21 June 2023

https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-distribution-config.html

aws cloudfront get-distribution-config --id
aws cloudfront get-distribution-config --id E1IIT4N613WY75 --output=text


  • ViewerProtocolPolicy: allow-all, redirect-to-https or https-only.


Examples[edit]

Official example[edit]

{
   "ETag": "E2QWRUHEXAMPLE",
   "DistributionConfig": {
       "CallerReference": "cli-example",
       "Aliases": {
           "Quantity": 0
       },
       "DefaultRootObject": "index.html",
       "Origins": {
           "Quantity": 1,
           "Items": [
               {
                   "Id": "awsexamplebucket.s3.amazonaws.com-cli-example",
                   "DomainName": "awsexamplebucket.s3.amazonaws.com",
                   "OriginPath": "",
                   "CustomHeaders": {
                       "Quantity": 0
                   },
                   "S3OriginConfig": {
                       "OriginAccessIdentity": ""
                   }
               }
           ]
       },
       "OriginGroups": {
           "Quantity": 0
       },
       "DefaultCacheBehavior": {
           "TargetOriginId": "awsexamplebucket.s3.amazonaws.com-cli-example",
           "ForwardedValues": {
               "QueryString": false,
               "Cookies": {
                   "Forward": "none"
               },
               "Headers": {
                   "Quantity": 0
               },
               "QueryStringCacheKeys": {
                   "Quantity": 0
               }
           },
           "TrustedSigners": {
               "Enabled": false,
               "Quantity": 0
           },
           "ViewerProtocolPolicy": "allow-all",
           "MinTTL": 0,
           "AllowedMethods": {
               "Quantity": 2,
               "Items": [
                   "HEAD",
                   "GET"
               ],
               "CachedMethods": {
                   "Quantity": 2,
                   "Items": [
                       "HEAD",
                       "GET"
                   ]
               }
           },
           "SmoothStreaming": false,
           "DefaultTTL": 86400,
           "MaxTTL": 31536000,
           "Compress": false,
           "LambdaFunctionAssociations": {
               "Quantity": 0
           },
           "FieldLevelEncryptionId": ""
       },
       "CacheBehaviors": {
           "Quantity": 0
       },
       "CustomErrorResponses": {
           "Quantity": 0
       },
       "Comment": "",
       "Logging": {
           "Enabled": false,
           "IncludeCookies": false,
           "Bucket": "",
           "Prefix": ""
       },
       "PriceClass": "PriceClass_All",
       "Enabled": true,
       "ViewerCertificate": {
           "CloudFrontDefaultCertificate": true,
           "MinimumProtocolVersion": "TLSv1",
           "CertificateSource": "cloudfront"
       },
       "Restrictions": {
           "GeoRestriction": {
               "RestrictionType": "none",
               "Quantity": 0
           }
       },
       "WebACLId": "",
       "HttpVersion": "http2",
       "IsIPV6Enabled": true
   }
}


Non official example[edit]

{
   "ETag": "E1IIT4N613WY75",
   "DistributionConfig": {
       "CallerReference": "84e662ba-24c5-4156-bc23-123124234235",
       "Aliases": {
           "Quantity": 1,
           "Items": [
               "yoursubdomain.example.com"
           ]
       },
       "DefaultRootObject": "",
       "Origins": {
           "Quantity": 1,
           "Items": [
               {
                   "Id": "yoursubdomain.example.com.s3-website-eu-west-1.amazonaws.com",
                   "DomainName": "yoursubdomain.example.com.s3-website-eu-west-1.amazonaws.com",
                   "OriginPath": "",
                   "CustomHeaders": {
                       "Quantity": 0
                   },
                   "CustomOriginConfig": {
                       "HTTPPort": 80,
                       "HTTPSPort": 443,
                       "OriginProtocolPolicy": "http-only",
                       "OriginSslProtocols": {
                           "Quantity": 1,
                           "Items": [
                               "TLSv1.2"
                           ]
                       },
                       "OriginReadTimeout": 30,
                       "OriginKeepaliveTimeout": 5
                   },
                   "ConnectionAttempts": 3,
                   "ConnectionTimeout": 10,
                   "OriginShield": {
                       "Enabled": false
                   },
                   "OriginAccessControlId": ""
               }
           ]
       },
       "OriginGroups": {
           "Quantity": 0
       },
       "DefaultCacheBehavior": {
           "TargetOriginId": "yoursubdomain.example.com.s3-website-eu-west-1.amazonaws.com",
           "TrustedSigners": {
               "Enabled": false,
               "Quantity": 0
           },
           "TrustedKeyGroups": {
               "Enabled": false,
               "Quantity": 0
           },
           "ViewerProtocolPolicy": "redirect-to-https",
           "AllowedMethods": {
               "Quantity": 2,
               "Items": [
                   "HEAD",
                   "GET"
               ],
               "CachedMethods": {
                   "Quantity": 2,
                   "Items": [
                       "HEAD",
                       "GET"
                   ]
               }
           },
           "SmoothStreaming": false,
           "Compress": true,
           "LambdaFunctionAssociations": {
               "Quantity": 0
           },
           "FunctionAssociations": {
               "Quantity": 0
           },
           "FieldLevelEncryptionId": "",
           "CachePolicyId": "658327ea-f89d-4fab-a63d-123214234"
       },
       "CacheBehaviors": {
           "Quantity": 0
       },
       "CustomErrorResponses": {
           "Quantity": 0
       },
       "Comment": "yoursubdomain.example.com",
       "Logging": {
           "Enabled": false,
           "IncludeCookies": false,
           "Bucket": "",
           "Prefix": ""
       },
       "PriceClass": "PriceClass_100",
       "Enabled": true,
       "ViewerCertificate": {
           "CloudFrontDefaultCertificate": false,
           "ACMCertificateArn": "arn:aws:acm:us-east-1:1234567890:certificate/1357xx23-c621-45db-89d7-123124324234",
           "SSLSupportMethod": "sni-only",
           "MinimumProtocolVersion": "TLSv1.2_2021",
           "Certificate": "arn:aws:acm:us-east-1:1234567890:certificate/1357xx23-c621-45db-89d7-123124324234",
           "CertificateSource": "acm"
       },
       "Restrictions": {
           "GeoRestriction": {
               "RestrictionType": "none",
               "Quantity": 0
           }
       },
       "WebACLId": "",
       "HttpVersion": "http2and3",
       "IsIPV6Enabled": true,
       "ContinuousDeploymentPolicyId": "",
       "Staging": false
   }
}

Related[edit]

See also[edit]

Advertising: