404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.217.203.133: ~ $
**To update a CloudFront distribution's default root object**

The following example updates the default root object to ``index.html`` for the
CloudFront distribution with the ID ``EDFDVBD6EXAMPLE``::

    aws cloudfront update-distribution --id EDFDVBD6EXAMPLE \
        --default-root-object index.html

Output::

    {
        "ETag": "E2QWRUHEXAMPLE",
        "Distribution": {
            "Id": "EDFDVBD6EXAMPLE",
            "ARN": "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
            "Status": "InProgress",
            "LastModifiedTime": "2019-12-06T18:55:39.870Z",
            "InProgressInvalidationBatches": 0,
            "DomainName": "d111111abcdef8.cloudfront.net",
            "ActiveTrustedSigners": {
                "Enabled": false,
                "Quantity": 0
            },
            "DistributionConfig": {
                "CallerReference": "6b10378d-49be-4c4b-a642-419ccaf8f3b5",
                "Aliases": {
                    "Quantity": 0
                },
                "DefaultRootObject": "index.html",
                "Origins": {
                    "Quantity": 1,
                    "Items": [
                        {
                            "Id": "example-website",
                            "DomainName": "www.example.com",
                            "OriginPath": "",
                            "CustomHeaders": {
                                "Quantity": 0
                            },
                            "CustomOriginConfig": {
                                "HTTPPort": 80,
                                "HTTPSPort": 443,
                                "OriginProtocolPolicy": "match-viewer",
                                "OriginSslProtocols": {
                                    "Quantity": 2,
                                    "Items": [
                                        "SSLv3",
                                        "TLSv1"
                                    ]
                                },
                                "OriginReadTimeout": 30,
                                "OriginKeepaliveTimeout": 5
                            }
                        }
                    ]
                },
                "OriginGroups": {
                    "Quantity": 0
                },
                "DefaultCacheBehavior": {
                    "TargetOriginId": "example-website",
                    "ForwardedValues": {
                        "QueryString": false,
                        "Cookies": {
                            "Forward": "none"
                        },
                        "Headers": {
                            "Quantity": 1,
                            "Items": [
                                "*"
                            ]
                        },
                        "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": "http1.1",
                "IsIPV6Enabled": true
            }
        }
    }

**To update a CloudFront distribution**

The following example disables the CloudFront distribution with the ID
``EMLARXS9EXAMPLE`` by providing the distribution configuration in a JSON file
named ``dist-config-disable.json``. To update a distribution, you must use the
``--if-match`` option to provide the distribution's ``ETag``. To get the
``ETag``, use the `get-distribution <get-distribution.html>`_ or
`get-distribution-config <get-distribution-config.html>`_ command.

After you use the following example to disable a distribution, you can use the
`delete-distribution <delete-distribution.html>`_ command to delete it.

::

    aws cloudfront update-distribution \
        --id EMLARXS9EXAMPLE \
        --if-match E2QWRUHEXAMPLE \
        --distribution-config file://dist-config-disable.json

The file ``dist-config-disable.json`` is a JSON document in the current folder
that contains the following. Note that the ``Enabled`` field is set to
``false``::

    {
        "CallerReference": "cli-1574382155-496510",
        "Aliases": {
            "Quantity": 0
        },
        "DefaultRootObject": "index.html",
        "Origins": {
            "Quantity": 1,
            "Items": [
                {
                    "Id": "awsexamplebucket.s3.amazonaws.com-1574382155-273939",
                    "DomainName": "awsexamplebucket.s3.amazonaws.com",
                    "OriginPath": "",
                    "CustomHeaders": {
                        "Quantity": 0
                    },
                    "S3OriginConfig": {
                        "OriginAccessIdentity": ""
                    }
                }
            ]
        },
        "OriginGroups": {
            "Quantity": 0
        },
        "DefaultCacheBehavior": {
            "TargetOriginId": "awsexamplebucket.s3.amazonaws.com-1574382155-273939",
            "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": false,
        "ViewerCertificate": {
            "CloudFrontDefaultCertificate": true,
            "MinimumProtocolVersion": "TLSv1",
            "CertificateSource": "cloudfront"
        },
        "Restrictions": {
            "GeoRestriction": {
                "RestrictionType": "none",
                "Quantity": 0
            }
        },
        "WebACLId": "",
        "HttpVersion": "http2",
        "IsIPV6Enabled": true
    }

Output::

    {
        "ETag": "E9LHASXEXAMPLE",
        "Distribution": {
            "Id": "EMLARXS9EXAMPLE",
            "ARN": "arn:aws:cloudfront::123456789012:distribution/EMLARXS9EXAMPLE",
            "Status": "InProgress",
            "LastModifiedTime": "2019-12-06T18:32:35.553Z",
            "InProgressInvalidationBatches": 0,
            "DomainName": "d111111abcdef8.cloudfront.net",
            "ActiveTrustedSigners": {
                "Enabled": false,
                "Quantity": 0
            },
            "DistributionConfig": {
                "CallerReference": "cli-1574382155-496510",
                "Aliases": {
                    "Quantity": 0
                },
                "DefaultRootObject": "index.html",
                "Origins": {
                    "Quantity": 1,
                    "Items": [
                        {
                            "Id": "awsexamplebucket.s3.amazonaws.com-1574382155-273939",
                            "DomainName": "awsexamplebucket.s3.amazonaws.com",
                            "OriginPath": "",
                            "CustomHeaders": {
                                "Quantity": 0
                            },
                            "S3OriginConfig": {
                                "OriginAccessIdentity": ""
                            }
                        }
                    ]
                },
                "OriginGroups": {
                    "Quantity": 0
                },
                "DefaultCacheBehavior": {
                    "TargetOriginId": "awsexamplebucket.s3.amazonaws.com-1574382155-273939",
                    "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": false,
                "ViewerCertificate": {
                    "CloudFrontDefaultCertificate": true,
                    "MinimumProtocolVersion": "TLSv1",
                    "CertificateSource": "cloudfront"
                },
                "Restrictions": {
                    "GeoRestriction": {
                        "RestrictionType": "none",
                        "Quantity": 0
                    }
                },
                "WebACLId": "",
                "HttpVersion": "http2",
                "IsIPV6Enabled": true
            }
        }
    }

Filemanager

Name Type Size Permission Actions
create-cloud-front-origin-access-identity.rst File 1.42 KB 0644
create-distribution-with-tags.rst File 8.27 KB 0644
create-distribution.rst File 7.77 KB 0644
create-field-level-encryption-config.rst File 2.9 KB 0644
create-field-level-encryption-profile.rst File 2.58 KB 0644
create-invalidation.rst File 2.43 KB 0644
create-public-key.rst File 2.24 KB 0644
delete-cloud-front-origin-access-identity.rst File 923 B 0644
delete-distribution.rst File 842 B 0644
delete-field-level-encryption-config.rst File 911 B 0644
delete-field-level-encryption-profile.rst File 921 B 0644
delete-public-key.rst File 685 B 0644
get-cloud-front-origin-access-identity-config.rst File 742 B 0644
get-cloud-front-origin-access-identity.rst File 949 B 0644
get-distribution-config.rst File 3.63 KB 0644
get-distribution.rst File 4.44 KB 0644
get-field-level-encryption-config.rst File 1.22 KB 0644
get-field-level-encryption-profile-config.rst File 1.05 KB 0644
get-field-level-encryption-profile.rst File 1.24 KB 0644
get-field-level-encryption.rst File 1.41 KB 0644
get-invalidation.rst File 803 B 0644
get-public-key-config.rst File 1.06 KB 0644
get-public-key.rst File 1.17 KB 0644
list-cloud-front-origin-access-identities.rst File 1.03 KB 0644
list-distributions.rst File 13.89 KB 0644
list-field-level-encryption-configs.rst File 1.47 KB 0644
list-field-level-encryption-profiles.rst File 2.16 KB 0644
list-invalidations.rst File 632 B 0644
list-public-keys.rst File 1.74 KB 0644
list-tags-for-resource.rst File 698 B 0644
sign.rst File 1.2 KB 0644
tag-resource.rst File 928 B 0644
untag-resource.rst File 825 B 0644
update-cloud-front-origin-access-identity.rst File 2.06 KB 0644
update-distribution.rst File 12.85 KB 0644
update-field-level-encryption-config.rst File 2.97 KB 0644
update-field-level-encryption-profile.rst File 2.92 KB 0644