

Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh [SDK AWS Doc](https://github.com/awsdocs/aws-doc-sdk-examples). GitHub 

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# CloudFront contoh menggunakan AWS CLI
<a name="cli_2_cloudfront_code_examples"></a>

Contoh kode berikut menunjukkan cara melakukan tindakan dan mengimplementasikan skenario umum dengan menggunakan AWS Command Line Interface with CloudFront.

*Tindakan* merupakan kutipan kode dari program yang lebih besar dan harus dijalankan dalam konteks. Sementara tindakan menunjukkan cara memanggil fungsi layanan individual, Anda dapat melihat tindakan dalam konteks dalam skenario terkait.

Setiap contoh menyertakan tautan ke kode sumber lengkap, di mana Anda dapat menemukan instruksi tentang cara mengatur dan menjalankan kode dalam konteks.

**Topics**
+ [Tindakan](#actions)

## Tindakan
<a name="actions"></a>

### `associate-distribution-tenant-web-acl`
<a name="cloudfront_AssociateDistributionTenantWebAcl_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`associate-distribution-tenant-web-acl`.

**AWS CLI**  
**Untuk mengaitkan ACL web dengan CloudFront penyewa distribusi**  
`associate-distribution-tenant-web-acl`Contoh berikut mengaitkan ACL web dengan CloudFront distribusi dengan. ETag `E13V1IB3VIYABC`  

```
aws cloudfront associate-distribution-tenant-web-acl \
    --id dt_2wjDZi3hD1ivOXf6rpZJO1AB \
    --if-match E13V1IB3VIYABC \
    --web-acl-arn arn:aws:wafv2:us-east-1:123456789012:global/webacl/web-global-example/626900da-5f64-418b-ba9b-743f37123ABC
```
Output:  

```
{
    "ETag": "E1VC38T7YXBABC",
    "Id": "dt_2wjDZi3hD1ivOXf6rpZJO1AB",
    "WebACLArn": "arn:aws:wafv2:us-east-1:123456789012:global/webacl/web-global-example/626900da-5f64-418b-ba9b-743f37123ABC"
}
```
Untuk informasi selengkapnya, lihat [Menggunakan perlindungan AWS WAF](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-awswaf.html) di Panduan * CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [AssociateDistributionTenantWebAcl](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/associate-distribution-tenant-web-acl.html)di *Referensi AWS CLI Perintah*. 

### `associate-distribution-web-acl`
<a name="cloudfront_AssociateDistributionWebAcl_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`associate-distribution-web-acl`.

**AWS CLI**  
**Untuk mengaitkan ACL web dengan distribusi CloudFront **  
`associate-distribution-web-acl`Contoh berikut mengaitkan ACL web dengan distribusi. CloudFront   

```
aws cloudfront associate-distribution-web-acl \
    --id E1XNX8R2GOAABC \
    --if-match E2YWS1C2J3OABC \
    --web-acl-arn arn:aws:wafv2:us-east-1:123456789012:global/webacl/web-global-example/626900da-5f64-418b-ba9b-743f3746cABC
```
Output:  

```
{
    "ETag": "E3QE7ED60U0ABC",
    "Id": "E1XNX8R2GOAABC",
    "WebACLArn": "arn:aws:wafv2:us-east-1:123456789012:global/webacl/web-global-example/626900da-5f64-418b-ba9b-743f3746cABC"
}
```
Untuk informasi selengkapnya, lihat [Menggunakan perlindungan AWS WAF](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-awswaf.html) di Panduan * CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [AssociateDistributionWebAcl](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/associate-distribution-web-acl.html)di *Referensi AWS CLI Perintah*. 

### `create-cloud-front-origin-access-identity`
<a name="cloudfront_CreateCloudFrontOriginAccessIdentity_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-cloud-front-origin-access-identity`.

**AWS CLI**  
**Untuk membuat identitas akses CloudFront asal**  
Contoh berikut membuat identitas akses CloudFront asal (OAI) dengan menyediakan konfigurasi OAI sebagai argumen baris perintah:  

```
aws cloudfront create-cloud-front-origin-access-identity \
    --cloud-front-origin-access-identity-config \
        CallerReference="cli-example",Comment="Example OAI"
```
Anda dapat mencapai hal yang sama dengan menyediakan konfigurasi OAI dalam file JSON, seperti yang ditunjukkan pada contoh berikut:  

```
aws cloudfront create-cloud-front-origin-access-identity \
    --cloud-front-origin-access-identity-config file://OAI-config.json
```
File tersebut `OAI-config.json` adalah dokumen JSON di direktori saat ini yang berisi berikut ini:  

```
{
    "CallerReference": "cli-example",
    "Comment": "Example OAI"
}
```
Apakah Anda memberikan konfigurasi OAI dengan argumen baris perintah atau file JSON, outputnya sama:  

```
{
    "Location": "https://cloudfront.amazonaws.com/2019-03-26/origin-access-identity/cloudfront/E74FTE3AEXAMPLE",
    "ETag": "E2QWRUHEXAMPLE",
    "CloudFrontOriginAccessIdentity": {
        "Id": "E74FTE3AEXAMPLE",
        "S3CanonicalUserId": "cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9aEXAMPLE",
        "CloudFrontOriginAccessIdentityConfig": {
            "CallerReference": "cli-example",
            "Comment": "Example OAI"
        }
    }
}
```
+  Untuk detail API, lihat [CreateCloudFrontOriginAccessIdentity](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/create-cloud-front-origin-access-identity.html)di *Referensi AWS CLI Perintah*. 

### `create-connection-group`
<a name="cloudfront_CreateConnectionGroup_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-connection-group`.

**AWS CLI**  
**Untuk membuat grup koneksi di CloudFront**  
`create-connection-group`Contoh berikut membuat grup koneksi diaktifkan, menentukan daftar IP statis Anycast, dan menonaktifkan. IPv6  

```
aws cloudfront create-connection-group \
    --name cg-with-anycast-ip-list \
    --no-ipv6-enabled \
    --enabled \
    --anycast-ip-list-id aip_CCkW6gKrDiBD4n78123ABC \
    --tags "Items=[{Key=abc,Value=123}]"
```
Output:  

```
{
    "ETag": "E23ZP02F085ABC",
    "ConnectionGroup": {
        "Id": "cg_2yb6uj74B4PCbfhT31WFdiSABC",
        "Name": "cg-with-anycast-ip-list",
        "Arn": "arn:aws:cloudfront::123456789012:connection-group/cg_2yb6uj74B4PCbfhT31WFdiSABC",
        "CreatedTime": "2025-06-16T16:25:50.061000+00:00",
        "LastModifiedTime": "2025-06-16T16:25:50.061000+00:00",
        "Tags": {
            "Items": [
                {
                    "Key": "abc",
                    "Value": "123"
                }
            ]
        },
        "Ipv6Enabled": false,
        "RoutingEndpoint": "dj6xusxq65abc.cloudfront.net",
        "AnycastIpListId": "aip_CCkW6gKrDiBD4n78123ABC",
        "Status": "InProgress",
        "Enabled": true,
        "IsDefault": false
    }
}
```
Untuk informasi selengkapnya, lihat [Membuat grup sambungan kustom (opsional)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-connection-group.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [CreateConnectionGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/create-connection-group.html)di *Referensi AWS CLI Perintah*. 

### `create-distribution-tenant`
<a name="cloudfront_CreateDistributionTenant_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-distribution-tenant`.

**AWS CLI**  
**Contoh 1: Untuk membuat penyewa CloudFront distribusi yang menggunakan sertifikat kustom**  
`create-distribution-tenant`Contoh berikut membuat penyewa CloudFront distribusi yang menentukan kustomisasi untuk menonaktifkan WAF, menambahkan pembatasan geografis, dan menggunakan sertifikat TLS lainnya.  

```
aws cloudfront create-distribution-tenant \
    --cli-input-json file://tenant.json
```
Isi dari `tenant.json`:  

```
{
    "DistributionId": "E1XNX8R2GOAABC",
    "Domains": [
        {
            "Domain": "example.com"
        }
    ],
    "Parameters": [
        {
            "Name": "testParam",
            "Value": "defaultValue"
        }
    ],
    "ConnectionGroupId": "cg_2whCJoXMYCjHcxaLGrkllvyABC",
    "Enabled": false,
    "Tags": {
        "Items": [
            {
                "Key": "tag",
                "Value": "tagValue"
            }
        ]
    },
    "Name": "new-tenant-customizations",
    "Customizations": {
        "GeoRestrictions": {
            "Locations": ["DE"],
            "RestrictionType": "whitelist"
        },
        "WebAcl": {
            "Action": "disable"
        },
        "Certificate": {
            "Arn": "arn:aws:acm:us-east-1:123456789012:certificate/ec53f564-ea5a-4e4a-a0a2-e3c989449abc"
        }
    }
}
```
Output:  

```
{
    "ETag": "E23ZP02F085ABC",
    "DistributionTenant": {
        "Id": "dt_2yN5tYwVbPKr7m2IB69M1yp1AB",
        "DistributionId": "E1XNX8R2GOAABC",
        "Name": "new-tenant-customizations",
        "Arn": "arn:aws:cloudfront::123456789012:distribution-tenant/dt_2yN5tYwVbPKr7m2IB69M1yp1AB",
        "Domains": [
            {
                "Domain": "example.com",
                "Status": "active"
            }
        ],
        "Tags": {
            "Items": [
                {
                    "Key": "tag",
                    "Value": "tagValue"
                }
            ]
        },
        "Customizations": {
            "WebAcl": {
                "Action": "disable"
            },
            "Certificate": {
                "Arn": "arn:aws:acm:us-east-1:123456789012:certificate/ec53f564-ea5a-4e4a-a0a2-e3c989449abc"
            },
            "GeoRestrictions": {
                "RestrictionType": "whitelist",
                "Locations": [
                    "DE"
                ]
            }
        },
        "Parameters": [
            {
                "Name": "testParam",
                "Value": "defaultValue"
            }
        ],
        "ConnectionGroupId": "cg_2whCJoXMYCjHcxaLGrkllvyABC",
        "CreatedTime": "2025-06-11T17:20:06.432000+00:00",
        "LastModifiedTime": "2025-06-11T17:20:06.432000+00:00",
        "Enabled": false,
        "Status": "InProgress"
    }
}
```
**Contoh 2: Untuk membuat penyewa distribusi dengan sertifikat yang diwariskan**  
`create-distribution-tenant`Contoh berikut membuat penyewa distribusi dan menentukan sertifikat TLS yang diwarisi dari distribusi multi-tenant.  

```
aws cloudfront create-distribution-tenant \
    --cli-input-json file://tenant.json
```
Isi dari `tenant.json`:  

```
{
    "DistributionId": "E1HVIAU7U12ABC",
    "Domains": [
        {
            "Domain": "example.com"
        }
    ],
    "Parameters": [
        {
            "Name": "tenantName",
            "Value": "first-tenant"
        }
    ],
    "Enabled": true,
    "Name": "new-tenant-no-cert"
}
```
Output:  

```
{
    "ETag": "E23ZP02F0ABC",
    "DistributionTenant": {
        "Id": "dt_2zhRB0vBe0B72LZCVy1mgzI1AB",
        "DistributionId": "E1HVIAU7U12ABC",
        "Name": "new-tenant-no-cert",
        "Arn": "arn:aws:cloudfront::123456789012:distribution-tenant/dt_2zhRB0vBe0B72LZCVy1mgzI1AB",
        "Domains": [
            {
                "Domain": "example.com",
                "Status": "active"
            }
        ],
        "Parameters": [
            {
                "Name": "tenantName",
                "Value": "first-tenant"
            }
        ],
        "ConnectionGroupId": "cg_2yQEwpipGFN0hhA0ZemPabOABC",
        "CreatedTime": "2025-07-10T20:59:38.414000+00:00",
        "LastModifiedTime": "2025-07-10T20:59:38.414000+00:00",
        "Enabled": true,
        "Status": "InProgress"
    }
}
```
**Contoh 3: Untuk membuat penyewa CloudFront distribusi menggunakan token validasi CloudFront -host**  
`create-distribution-tenant`Contoh berikut membuat penyewa distribusi dan menggunakan token validasi CloudFront -host untuk nama domain Anda.  

```
aws cloudfront create-distribution-tenant \
    --cli-input-json file://tenant.json
```
Isi dari `tenant.json`:  

```
{
    "DistributionId": "E2GJ5J9QN12ABC",
    "Domains": [
        {
            "Domain": "example.com"
        }
    ],
    "Parameters": [
        {
            "Name": "tenantName",
            "Value": "first-tenant"
        }
    ],
    "ConnectionGroupId": "cg_2yQEwpipGFN0hhA0ZemPabOABC",
    "Enabled": true,
    "Name": "new-tenant-cf-hosted",
    "ManagedCertificateRequest": {
        "ValidationTokenHost": "cloudfront"
    }
}
```
**Penting:** Agar berhasil menjalankan perintah ini, Anda harus mengonfigurasi data DNS CNAME yang mengarahkan domain baru Anda (example.com) ke titik akhir perutean grup koneksi yang terkait dengan penyewa distribusi. Catatan CNAME ini juga harus disebarkan sebelum CloudFront berhasil menyelesaikan permintaan ini.  
Output:  

```
{
    "ETag": "E23ZP02F0ABC",
    "DistributionTenant": {
        "Id": "dt_2zhStKrA524GvvTWJX92Ozl1AB",
        "DistributionId": "E2GJ5J9QN12ABC",
        "Name": "new-tenant-cf-hosted",
        "Arn": "arn:aws:cloudfront::123456789012:distribution-tenant/dt_2zhStKrA524GvvTWJX92Ozl1AB",
        "Domains": [
            {
                "Domain": "example.com",
                "Status": "inactive"
            }
        ],
        "Parameters": [
            {
                "Name": "tenantName",
                "Value": "first-tenant"
            }
        ],
        "ConnectionGroupId": "cg_2zhSaGatwwXjTjE42nneZzqABC",
        "CreatedTime": "2025-07-10T21:13:46.416000+00:00",
        "LastModifiedTime": "2025-07-10T21:13:46.416000+00:00",
        "Enabled": true,
        "Status": "InProgress"
    }
}
```
**Contoh 4: Untuk membuat penyewa CloudFront distribusi menggunakan token validasi yang dihosting sendiri**  
`create-distribution-tenant`Contoh berikut membuat penyewa CloudFront distribusi dan menggunakan token validasi yang dihosting sendiri.  

```
aws cloudfront create-distribution-tenant \
    --cli-input-json file://tenant.json
```
Isi dari `tenant.json`:  

```
{
    "DistributionId": "E2GJ5J9QN12ABC",
    "Domains": [
        {
            "Domain": "example.com"
        }
    ],
    "Parameters": [
        {
            "Name": "tenantName",
            "Value": "first-tenant"
        }
    ],
    "Enabled": true,
    "Name": "new-tenant-self-hosted",
    "ManagedCertificateRequest": {
        "ValidationTokenHost": "self-hosted"
    }
}
```
Output:  

```
{
    "ETag": "E23ZP02F0ABC",
    "DistributionTenant": {
        "Id": "dt_2zhTFBV93OfFJJ3YMdNM5BC1AB",
        "DistributionId": "E2GJ5J9QN12ABC",
        "Name": "new-tenant-self-hosted",
        "Arn": "arn:aws:cloudfront::123456789012:distribution-tenant/dt_2zhTFBV93OfFJJ3YMdNM5BC1AB",
        "Domains": [
            {
                "Domain": "example.com",
                "Status": "inactive"
            }
        ],
        "Parameters": [
            {
                "Name": "tenantName",
                "Value": "first-tenant"
            }
        ],
        "ConnectionGroupId": "cg_2yQEwpipGFN0hhA0ZemPabOABC",
        "CreatedTime": "2025-07-10T21:16:39.828000+00:00",
        "LastModifiedTime": "2025-07-10T21:16:39.828000+00:00",
        "Enabled": true,
        "Status": "InProgress"
    }
}
```
**Penting:** Setelah Anda menjalankan perintah ini, penyewa distribusi akan dibuat tanpa validasi. Untuk memvalidasi permintaan sertifikat terkelola dan mengonfigurasi DNS saat Anda siap untuk mulai menerima lalu lintas, lihat [Penyiapan domain lengkap](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/managed-cloudfront-certificates.html#complete-domain-ownership) di Panduan * CloudFront Pengembang Amazon*.  
Untuk informasi selengkapnya tentang membuat penyewa distribusi, lihat [Membuat distribusi](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [CreateDistributionTenant](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/create-distribution-tenant.html)di *Referensi AWS CLI Perintah*. 

### `create-distribution-with-tags`
<a name="cloudfront_CreateDistributionWithTags_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-distribution-with-tags`.

**AWS CLI**  
**Untuk membuat CloudFront distribusi dengan tag**  
`create-distribution-with-tags`Contoh berikut membuat distribusi dengan dua tag dengan menyediakan konfigurasi distribusi dan tag dalam file JSON bernama`dist-config-with-tags.json`.  

```
aws cloudfront create-distribution-with-tags \
    --distribution-config-with-tags file://dist-config-with-tags.json
```
File tersebut `dist-config-with-tags.json` adalah dokumen JSON di folder saat ini. Perhatikan `Tags` objek di bagian atas file, yang berisi dua tag:  
`Name = ExampleDistribution``Project = ExampleProject`  
Isi dari `dist-config-with-tags.json`:  

```
{
    "Tags": {
        "Items": [
            {
                "Key": "Name",
                "Value": "ExampleDistribution"
            },
            {
                "Key": "Project",
                "Value": "ExampleProject"
            }
        ]
    },
    "DistributionConfig": {
        "CallerReference": "cli-example",
        "Aliases": {
            "Quantity": 0
        },
        "DefaultRootObject": "index.html",
        "Origins": {
            "Quantity": 1,
            "Items": [
                {
                    "Id": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.com-cli-example",
                    "DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
                    "OriginPath": "",
                    "CustomHeaders": {
                        "Quantity": 0
                    },
                    "S3OriginConfig": {
                        "OriginAccessIdentity": ""
                    }
                }
            ]
        },
        "OriginGroups": {
            "Quantity": 0
        },
        "DefaultCacheBehavior": {
            "TargetOriginId": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.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
    }
}
```
Output:  

```
{
    "Location": "https://cloudfront.amazonaws.com/2019-03-26/distribution/EDFDVBD6EXAMPLE",
    "ETag": "E2QWRUHEXAMPLE",
    "Distribution": {
        "Id": "EDFDVBD6EXAMPLE",
        "ARN": "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
        "Status": "InProgress",
        "LastModifiedTime": "2019-12-04T23:35:41.433Z",
        "InProgressInvalidationBatches": 0,
        "DomainName": "d111111abcdef8.cloudfront.net",
        "ActiveTrustedSigners": {
            "Enabled": false,
            "Quantity": 0
        },
        "DistributionConfig": {
            "CallerReference": "cli-example",
            "Aliases": {
                "Quantity": 0
            },
            "DefaultRootObject": "index.html",
            "Origins": {
                "Quantity": 1,
                "Items": [
                    {
                        "Id": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.com-cli-example",
                        "DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
                        "OriginPath": "",
                        "CustomHeaders": {
                            "Quantity": 0
                        },
                        "S3OriginConfig": {
                            "OriginAccessIdentity": ""
                        }
                    }
                ]
            },
            "OriginGroups": {
                "Quantity": 0
            },
            "DefaultCacheBehavior": {
                "TargetOriginId": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.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
        }
    }
}
```
+  Untuk detail API, lihat [CreateDistributionWithTags](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/create-distribution-with-tags.html)di *Referensi AWS CLI Perintah*. 

### `create-distribution`
<a name="cloudfront_CreateDistribution_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-distribution`.

**AWS CLI**  
**Contoh 1: Untuk membuat CloudFront distribusi**  
`create-distribution`Contoh berikut membuat distribusi untuk bucket S3 bernama`amzn-s3-demo-bucket`, dan juga menentukan `index.html` sebagai objek root default, menggunakan argumen baris perintah.  

```
aws cloudfront create-distribution \
    --origin-domain-name amzn-s3-demo-bucket.s3.amazonaws.com \
    --default-root-object index.html
```
Output:  

```
{
    "Location": "https://cloudfront.amazonaws.com/2019-03-26/distribution/EMLARXS9EXAMPLE",
    "ETag": "E9LHASXEXAMPLE",
    "Distribution": {
        "Id": "EMLARXS9EXAMPLE",
        "ARN": "arn:aws:cloudfront::123456789012:distribution/EMLARXS9EXAMPLE",
        "Status": "InProgress",
        "LastModifiedTime": "2019-11-22T00:55:15.705Z",
        "InProgressInvalidationBatches": 0,
        "DomainName": "d111111abcdef8.cloudfront.net",
        "ActiveTrustedSigners": {
            "Enabled": false,
            "Quantity": 0
        },
        "DistributionConfig": {
            "CallerReference": "cli-example",
            "Aliases": {
                "Quantity": 0
            },
            "DefaultRootObject": "index.html",
            "Origins": {
                "Quantity": 1,
                "Items": [
                    {
                        "Id": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.com-cli-example",
                        "DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
                        "OriginPath": "",
                        "CustomHeaders": {
                            "Quantity": 0
                        },
                        "S3OriginConfig": {
                            "OriginAccessIdentity": ""
                        }
                    }
                ]
            },
            "OriginGroups": {
                "Quantity": 0
            },
            "DefaultCacheBehavior": {
                "TargetOriginId": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.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
        }
    }
}
```
**Contoh 2: Untuk membuat CloudFront distribusi menggunakan file JSON**  
`create-distribution`Contoh berikut membuat distribusi untuk bucket S3 bernama`amzn-s3-demo-bucket`, dan juga menentukan `index.html` sebagai objek root default, menggunakan file JSON.  

```
aws cloudfront create-distribution \
    --distribution-config file://dist-config.json
```
Isi dari `dist-config.json`:  

```
{
    "CallerReference": "cli-example",
    "Aliases": {
        "Quantity": 0
    },
    "DefaultRootObject": "index.html",
    "Origins": {
        "Quantity": 1,
        "Items": [
            {
                "Id": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.com-cli-example",
                "DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
                "OriginPath": "",
                "CustomHeaders": {
                    "Quantity": 0
                },
                "S3OriginConfig": {
                    "OriginAccessIdentity": ""
                }
            }
        ]
    },
    "OriginGroups": {
        "Quantity": 0
    },
    "DefaultCacheBehavior": {
        "TargetOriginId": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.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
}
```
Lihat Contoh 1 untuk keluaran sampel.  
**Contoh 3: Untuk membuat distribusi CloudFront multi-tenant dengan sertifikat**  
`create-distribution`Contoh berikut membuat CloudFront distribusi dengan dukungan multi-tenant dan menentukan sertifikat TLS.  

```
aws cloudfront create-distribution \
    --distribution-config file://dist-config.json
```
Isi dari `dist-config.json`:  

```
{
    "CallerReference": "cli-example-with-cert",
    "Comment": "CLI example distribution",
    "DefaultRootObject": "index.html",
    "Origins": {
        "Quantity": 1,
        "Items": [
            {
                "Id": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                "DomainName": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                "OriginPath": "/{{tenantName}}",
                "CustomHeaders": {
                    "Quantity": 0
                },
                "S3OriginConfig": {
                    "OriginAccessIdentity": ""
                }
            }
        ]
    },
    "DefaultCacheBehavior": {
        "TargetOriginId": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
        "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e5ABC",
        "ViewerProtocolPolicy": "allow-all",
        "AllowedMethods": {
            "Quantity": 2,
            "Items": ["HEAD", "GET"],
            "CachedMethods": {
                "Quantity": 2,
                "Items": ["HEAD", "GET"]
            }
        }
    },
    "Enabled": true,
    "ViewerCertificate": {
        "ACMCertificateArn": "arn:aws:acm:us-east-1:123456789012:certificate/191306a1-db01-49ca-90ef-fc414ee5dabc",
        "SSLSupportMethod": "sni-only"
    },
    "HttpVersion": "http2",
    "ConnectionMode": "tenant-only",
    "TenantConfig": {
        "ParameterDefinitions": [
            {
                "Name": "tenantName",
                "Definition": {
                    "StringSchema": {
                        "Comment": "tenantName parameter",
                        "DefaultValue": "root",
                        "Required": false
                    }
                }
            }
        ]
    }
}
```
Output:  

```
{
    "Location": "https://cloudfront.amazonaws.com/2020-05-31/distribution/E1HVIAU7UABC",
    "ETag": "E20LT7R1BABC",
    "Distribution": {
        "Id": "E1HVIAU7U12ABC",
        "ARN": "arn:aws:cloudfront::123456789012:distribution/E1HVIAU7U12ABC",
        "Status": "InProgress",
        "LastModifiedTime": "2025-07-10T20:33:31.117000+00:00",
        "InProgressInvalidationBatches": 0,
        "DomainName": "example.com",
        "ActiveTrustedSigners": {
            "Enabled": false,
            "Quantity": 0
        },
        "ActiveTrustedKeyGroups": {
            "Enabled": false,
            "Quantity": 0
        },
        "DistributionConfig": {
            "CallerReference": "cli-example-with-cert",
            "DefaultRootObject": "index.html",
            "Origins": {
                "Quantity": 1,
                "Items": [
                    {
                        "Id": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                        "DomainName": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                        "OriginPath": "/{{tenantName}}",
                        "CustomHeaders": {
                            "Quantity": 0
                        },
                        "S3OriginConfig": {
                            "OriginAccessIdentity": ""
                        },
                        "ConnectionAttempts": 3,
                        "ConnectionTimeout": 10,
                        "OriginShield": {
                            "Enabled": false
                        },
                        "OriginAccessControlId": ""
                    }
                ]
            },
            "OriginGroups": {
                "Quantity": 0
            },
            "DefaultCacheBehavior": {
                "TargetOriginId": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                "TrustedKeyGroups": {
                    "Enabled": false,
                    "Quantity": 0
                },
                "ViewerProtocolPolicy": "allow-all",
                "AllowedMethods": {
                    "Quantity": 2,
                    "Items": ["HEAD", "GET"],
                    "CachedMethods": {
                        "Quantity": 2,
                        "Items": ["HEAD", "GET"]
                    }
                },
                "Compress": false,
                "LambdaFunctionAssociations": {
                    "Quantity": 0
                },
                "FunctionAssociations": {
                    "Quantity": 0
                },
                "FieldLevelEncryptionId": "",
                "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e5ABC",
                "GrpcConfig": {
                    "Enabled": false
                }
            },
            "CacheBehaviors": {
                "Quantity": 0
            },
            "CustomErrorResponses": {
                "Quantity": 0
            },
            "Comment": "CLI example distribution",
            "Logging": {
                "Enabled": false,
                "IncludeCookies": false,
                "Bucket": "",
                "Prefix": ""
            },
            "Enabled": true,
            "ViewerCertificate": {
                "CloudFrontDefaultCertificate": false,
                "ACMCertificateArn": "arn:aws:acm:us-east-1:123456789012:certificate/1954f095-11b6-4daf-9952-0c308a00abc",
                "SSLSupportMethod": "sni-only",
                "MinimumProtocolVersion": "TLSv1.2_2021",
                "Certificate": "arn:aws:acm:us-east-1:123456789012:certificate/1954f095-11b6-4daf-9952-0c308a00abc",
                "CertificateSource": "acm"
            },
            "Restrictions": {
                "GeoRestriction": {
                    "RestrictionType": "none",
                    "Quantity": 0
                }
            },
            "WebACLId": "",
            "HttpVersion": "http2",
            "TenantConfig": {
                "ParameterDefinitions": [
                    {
                        "Name": "tenantName",
                        "Definition": {
                            "StringSchema": {
                                "Comment": "tenantName parameter",
                                "DefaultValue": "root",
                                "Required": false
                            }
                        }
                    }
                ]
            },
            "ConnectionMode": "tenant-only"
        }
    }
}
```
Untuk informasi selengkapnya, lihat [Bekerja dengan distribusi](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-working-with.html) di *Panduan CloudFront Pengembang Amazon*.  
**Contoh 4: Untuk membuat distribusi CloudFront multi-tenant tanpa sertifikat**  
`create-distribution`Contoh berikut membuat CloudFront distribusi dengan dukungan multi-tenant tetapi tanpa sertifikat TLS.  

```
aws cloudfront create-distribution \
    --distribution-config file://dist-config.json
```
Isi dari `dist-config.json`:  

```
{
    "CallerReference": "cli-example",
    "Comment": "CLI example distribution",
    "DefaultRootObject": "index.html",
    "Origins": {
        "Quantity": 1,
        "Items": [
            {
                "Id": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                "DomainName": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                "OriginPath": "/{{tenantName}}",
                "CustomHeaders": {
                    "Quantity": 0
                },
                "S3OriginConfig": {
                    "OriginAccessIdentity": ""
                }
            }
        ]
    },
    "DefaultCacheBehavior": {
        "TargetOriginId": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
        "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e5ABC",
        "ViewerProtocolPolicy": "allow-all",
        "AllowedMethods": {
            "Quantity": 2,
            "Items": [
                "HEAD",
                "GET"
            ],
            "CachedMethods": {
                "Quantity": 2,
                "Items": [
                    "HEAD",
                    "GET"
                ]
            }
        }
    },
    "Enabled": true,
    "HttpVersion": "http2",
    "ConnectionMode": "tenant-only",
    "TenantConfig": {
        "ParameterDefinitions": [
            {
                "Name": "tenantName",
                "Definition": {
                    "StringSchema": {
                        "Comment": "tenantName parameter",
                        "DefaultValue": "root",
                        "Required": false
                    }
                }
            }
        ]
    }
}
```
Output:  

```
{
    "Location": "https://cloudfront.amazonaws.com/2020-05-31/distribution/E2GJ5J9QN12ABC",
    "ETag": "E37YLVVQIABC",
    "Distribution": {
        "Id": "E2GJ5J9QNABC",
        "ARN": "arn:aws:cloudfront::123456789012:distribution/E2GJ5J9QN12ABC",
        "Status": "InProgress",
        "LastModifiedTime": "2025-07-10T20:35:20.565000+00:00",
        "InProgressInvalidationBatches": 0,
        "DomainName": "example.com",
        "ActiveTrustedSigners": {
            "Enabled": false,
            "Quantity": 0
        },
        "ActiveTrustedKeyGroups": {
            "Enabled": false,
            "Quantity": 0
        },
        "DistributionConfig": {
            "CallerReference": "cli-example-no-cert",
            "DefaultRootObject": "index.html",
            "Origins": {
                "Quantity": 1,
                "Items": [
                    {
                        "Id": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                        "DomainName": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                        "OriginPath": "/{{tenantName}}",
                        "CustomHeaders": {
                            "Quantity": 0
                        },
                        "S3OriginConfig": {
                            "OriginAccessIdentity": ""
                        },
                        "ConnectionAttempts": 3,
                        "ConnectionTimeout": 10,
                        "OriginShield": {
                            "Enabled": false
                        },
                        "OriginAccessControlId": ""
                    }
                ]
            },
            "OriginGroups": {
                "Quantity": 0
            },
            "DefaultCacheBehavior": {
                "TargetOriginId": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                "TrustedKeyGroups": {
                    "Enabled": false,
                    "Quantity": 0
                },
                "ViewerProtocolPolicy": "allow-all",
                "AllowedMethods": {
                    "Quantity": 2,
                    "Items": [
                        "HEAD",
                        "GET"
                    ],
                    "CachedMethods": {
                        "Quantity": 2,
                        "Items": [
                            "HEAD",
                            "GET"
                        ]
                    }
                },
                "Compress": false,
                "LambdaFunctionAssociations": {
                    "Quantity": 0
                },
                "FunctionAssociations": {
                    "Quantity": 0
                },
                "FieldLevelEncryptionId": "",
                "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e5ABC",
                "GrpcConfig": {
                    "Enabled": false
                }
            },
            "CacheBehaviors": {
                "Quantity": 0
            },
            "CustomErrorResponses": {
                "Quantity": 0
            },
            "Comment": "CLI example distribution",
            "Logging": {
                "Enabled": false,
                "IncludeCookies": false,
                "Bucket": "",
                "Prefix": ""
            },
            "Enabled": true,
            "ViewerCertificate": {
                "CloudFrontDefaultCertificate": true,
                "SSLSupportMethod": "sni-only",
                "MinimumProtocolVersion": "TLSv1",
                "CertificateSource": "cloudfront"
            },
            "Restrictions": {
                "GeoRestriction": {
                    "RestrictionType": "none",
                    "Quantity": 0
                }
            },
            "WebACLId": "",
            "HttpVersion": "http2",
            "TenantConfig": {
                "ParameterDefinitions": [
                    {
                        "Name": "tenantName",
                        "Definition": {
                            "StringSchema": {
                                "Comment": "tenantName parameter",
                                "DefaultValue": "root",
                                "Required": false
                            }
                        }
                    }
                ]
            },
            "ConnectionMode": "tenant-only"
        }
    }
}
```
Untuk informasi selengkapnya, lihat [Mengonfigurasi distribusi](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-working-with.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [CreateDistribution](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/create-distribution.html)di *Referensi AWS CLI Perintah*. 

### `create-field-level-encryption-config`
<a name="cloudfront_CreateFieldLevelEncryptionConfig_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-field-level-encryption-config`.

**AWS CLI**  
**Untuk membuat konfigurasi CloudFront enkripsi tingkat lapangan**  
Contoh berikut membuat konfigurasi enkripsi tingkat lapangan dengan menyediakan parameter konfigurasi dalam file JSON bernama. `fle-config.json` Sebelum Anda dapat membuat konfigurasi enkripsi tingkat lapangan, Anda harus memiliki profil enkripsi tingkat lapangan. Untuk membuat profil, lihat perintah create-field-level-encryption -profile.  
*Untuk informasi selengkapnya tentang enkripsi CloudFront tingkat lapangan, lihat [Menggunakan Enkripsi Tingkat Bidang untuk Membantu Melindungi Data Sensitif di](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html) Panduan Pengembang Amazon. CloudFront *  

```
aws cloudfront create-field-level-encryption-config \
    --field-level-encryption-config file://fle-config.json
```
File tersebut `fle-config.json` adalah dokumen JSON di folder saat ini yang berisi berikut ini:  

```
{
    "CallerReference": "cli-example",
    "Comment": "Example FLE configuration",
    "QueryArgProfileConfig": {
        "ForwardWhenQueryArgProfileIsUnknown": true,
        "QueryArgProfiles": {
            "Quantity": 0
        }
    },
    "ContentTypeProfileConfig": {
        "ForwardWhenContentTypeIsUnknown": true,
        "ContentTypeProfiles": {
            "Quantity": 1,
            "Items": [
                {
                    "Format": "URLEncoded",
                    "ProfileId": "P280MFCLSYOCVU",
                    "ContentType": "application/x-www-form-urlencoded"
                }
            ]
        }
    }
}
```
Output:  

```
{
    "Location": "https://cloudfront.amazonaws.com/2019-03-26/field-level-encryption/C3KM2WVD605UAY",
    "ETag": "E2P4Z4VU7TY5SG",
    "FieldLevelEncryption": {
        "Id": "C3KM2WVD605UAY",
        "LastModifiedTime": "2019-12-10T21:30:18.974Z",
        "FieldLevelEncryptionConfig": {
            "CallerReference": "cli-example",
            "Comment": "Example FLE configuration",
            "QueryArgProfileConfig": {
                "ForwardWhenQueryArgProfileIsUnknown": true,
                "QueryArgProfiles": {
                    "Quantity": 0,
                    "Items": []
                }
            },
            "ContentTypeProfileConfig": {
                "ForwardWhenContentTypeIsUnknown": true,
                "ContentTypeProfiles": {
                    "Quantity": 1,
                    "Items": [
                        {
                            "Format": "URLEncoded",
                            "ProfileId": "P280MFCLSYOCVU",
                            "ContentType": "application/x-www-form-urlencoded"
                        }
                    ]
                }
            }
        }
    }
}
```
+  Untuk detail API, lihat [CreateFieldLevelEncryptionConfig](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/create-field-level-encryption-config.html)di *Referensi AWS CLI Perintah*. 

### `create-field-level-encryption-profile`
<a name="cloudfront_CreateFieldLevelEncryptionProfile_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-field-level-encryption-profile`.

**AWS CLI**  
**Untuk membuat profil CloudFront enkripsi tingkat lapangan**  
Contoh berikut membuat profil enkripsi tingkat lapangan dengan menyediakan parameter dalam file JSON bernama. `fle-profile-config.json` Sebelum Anda dapat membuat profil enkripsi tingkat lapangan, Anda harus memiliki CloudFront kunci publik. Untuk membuat kunci CloudFront publik, lihat create-public-key perintah.  
*Untuk informasi selengkapnya tentang enkripsi CloudFront tingkat lapangan, lihat [Menggunakan Enkripsi Tingkat Bidang untuk Membantu Melindungi Data Sensitif di](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html) Panduan Pengembang Amazon. CloudFront *  

```
aws cloudfront create-field-level-encryption-profile \
    --field-level-encryption-profile-config file://fle-profile-config.json
```
File tersebut `fle-profile-config.json` adalah dokumen JSON di folder saat ini yang berisi berikut ini:  

```
{
    "Name": "ExampleFLEProfile",
    "CallerReference": "cli-example",
    "Comment": "FLE profile for AWS CLI example",
    "EncryptionEntities": {
        "Quantity": 1,
        "Items": [
            {
                "PublicKeyId": "K2K8NC4HVFE3M0",
                "ProviderId": "ExampleFLEProvider",
                "FieldPatterns": {
                    "Quantity": 1,
                    "Items": [
                        "ExampleSensitiveField"
                    ]
                }
            }
        ]
    }
}
```
Output:  

```
{
    "Location": "https://cloudfront.amazonaws.com/2019-03-26/field-level-encryption-profile/PPK0UOSIF5WSV",
    "ETag": "E2QWRUHEXAMPLE",
    "FieldLevelEncryptionProfile": {
        "Id": "PPK0UOSIF5WSV",
        "LastModifiedTime": "2019-12-10T01:03:16.537Z",
        "FieldLevelEncryptionProfileConfig": {
            "Name": "ExampleFLEProfile",
            "CallerReference": "cli-example",
            "Comment": "FLE profile for AWS CLI example",
            "EncryptionEntities": {
                "Quantity": 1,
                "Items": [
                    {
                        "PublicKeyId": "K2K8NC4HVFE3M0",
                        "ProviderId": "ExampleFLEProvider",
                        "FieldPatterns": {
                            "Quantity": 1,
                            "Items": [
                                "ExampleSensitiveField"
                            ]
                        }
                    }
                ]
            }
        }
    }
}
```
+  Untuk detail API, lihat [CreateFieldLevelEncryptionProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/create-field-level-encryption-profile.html)di *Referensi AWS CLI Perintah*. 

### `create-invalidation-for-distribution-tenant`
<a name="cloudfront_CreateInvalidationForDistributionTenant_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-invalidation-for-distribution-tenant`.

**AWS CLI**  
**Untuk membuat CloudFront pembatalan bagi penyewa distribusi**  
`create-invalidation-for-distribution-tenant`Contoh berikut membuat pembatalan untuk semua file dalam penyewa CloudFront distribusi.  

```
aws cloudfront create-invalidation-for-distribution-tenant \
    --id dt_2wjDZi3hD1ivOXf6rpZJO1AB \
    --invalidation-batch '{"Paths": {"Quantity": 1, "Items": ["/*"]}, "CallerReference": "invalidation-$(date +%s)"}'
```
Output:  

```
{
    "Location": "https://cloudfront.amazonaws.com/2020-05-31/distribution-tenant/dt_2wjDZi3hD1ivOXf6rpZJO1AB/invalidation/I2JGL2F1ZAA426PGG0YLLKABC",
    "Invalidation": {
        "Id": "I2JGL2F1ZAA426PGG0YLLKABC",
        "Status": "InProgress",
        "CreateTime": "2025-05-07T16:59:25.947000+00:00",
        "InvalidationBatch": {
            "Paths": {
                "Quantity": 1,
                "Items": [
                    "/*"
                ]
            },
            "CallerReference": "invalidation-$(date +%s)"
        }
    }
}
```
Untuk informasi selengkapnya, lihat [Membatalkan file untuk menghapus konten](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html) di Panduan * CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [CreateInvalidationForDistributionTenant](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/create-invalidation-for-distribution-tenant.html)di *Referensi AWS CLI Perintah*. 

### `create-invalidation`
<a name="cloudfront_CreateInvalidation_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-invalidation`.

**AWS CLI**  
**Untuk membuat pembatalan untuk distribusi CloudFront **  
`create-invalidation`Contoh berikut membuat pembatalan untuk file tertentu dalam distribusi yang ditentukan CloudFront :  

```
aws cloudfront create-invalidation \
    --distribution-id EDFDVBD6EXAMPLE \
    --paths "/example-path/example-file.jpg" "/example-path/example-file2.png"
```
Output:  

```
{
    "Location": "https://cloudfront.amazonaws.com/2019-03-26/distribution/EDFDVBD6EXAMPLE/invalidation/I1JLWSDAP8FU89",
    "Invalidation": {
        "Id": "I1JLWSDAP8FU89",
        "Status": "InProgress",
        "CreateTime": "2019-12-05T18:24:51.407Z",
        "InvalidationBatch": {
            "Paths": {
                "Quantity": 2,
                "Items": [
                    "/example-path/example-file2.png",
                    "/example-path/example-file.jpg"
                ]
            },
            "CallerReference": "cli-1575570291-670203"
        }
    }
}
```
Pada contoh sebelumnya, AWS CLI secara otomatis menghasilkan acak. `CallerReference` Untuk menentukan sendiri`CallerReference`, atau untuk menghindari meneruskan parameter pembatalan sebagai argumen baris perintah, Anda dapat menggunakan file JSON. Contoh berikut membuat pembatalan untuk dua file, dengan menyediakan parameter pembatalan dalam file JSON bernama: `inv-batch.json`  

```
aws cloudfront create-invalidation \
    --distribution-id EDFDVBD6EXAMPLE \
    --invalidation-batch file://inv-batch.json
```
Isi dari `inv-batch.json`:  

```
{
    "Paths": {
        "Quantity": 2,
        "Items": [
            "/example-path/example-file.jpg",
            "/example-path/example-file2.png"
        ]
    },
    "CallerReference": "cli-example"
}
```
Output:  

```
{
    "Location": "https://cloudfront.amazonaws.com/2019-03-26/distribution/EDFDVBD6EXAMPLE/invalidation/I2J0I21PCUYOIK",
    "Invalidation": {
        "Id": "I2J0I21PCUYOIK",
        "Status": "InProgress",
        "CreateTime": "2019-12-05T18:40:49.413Z",
        "InvalidationBatch": {
            "Paths": {
                "Quantity": 2,
                "Items": [
                    "/example-path/example-file.jpg",
                    "/example-path/example-file2.png"
                ]
            },
            "CallerReference": "cli-example"
        }
    }
}
```
+  Untuk detail API, lihat [CreateInvalidation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/create-invalidation.html)di *Referensi AWS CLI Perintah*. 

### `create-public-key`
<a name="cloudfront_CreatePublicKey_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`create-public-key`.

**AWS CLI**  
**Untuk membuat kunci CloudFront publik**  
Contoh berikut membuat kunci CloudFront publik dengan menyediakan parameter dalam file JSON bernama`pub-key-config.json`. Sebelum Anda dapat menggunakan perintah ini, Anda harus memiliki kunci publik yang dikodekan PEM. Untuk informasi selengkapnya, lihat [Membuat Pasangan Kunci RSA](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html#field-level-encryption-setting-up-step1) di *Panduan CloudFront Pengembang Amazon*.  

```
aws cloudfront create-public-key \
    --public-key-config file://pub-key-config.json
```
File tersebut `pub-key-config.json` adalah dokumen JSON di folder saat ini yang berisi berikut ini. Perhatikan bahwa kunci publik dikodekan dalam format PEM.  

```
{
    "CallerReference": "cli-example",
    "Name": "ExampleKey",
    "EncodedKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxPMbCA2Ks0lnd7IR+3pw\nwd3H/7jPGwj8bLUmore7bX+oeGpZ6QmLAe/1UOWcmZX2u70dYcSIzB1ofZtcn4cJ\nenHBAzO3ohBY/L1tQGJfS2A+omnN6H16VZE1JCK8XSJyfze7MDLcUyHZETdxuvRb\nA9X343/vMAuQPnhinFJ8Wdy8YBXSPpy7r95ylUQd9LfYTBzVZYG2tSesplcOkjM3\n2Uu+oMWxQAw1NINnSLPinMVsutJy6ZqlV3McWNWe4T+STGtWhrPNqJEn45sIcCx4\nq+kGZ2NQ0FyIyT2eiLKOX5Rgb/a36E/aMk4VoDsaenBQgG7WLTnstb9sr7MIhS6A\nrwIDAQAB\n-----END PUBLIC KEY-----\n",
    "Comment": "example public key"
}
```
Output:  

```
{
    "Location": "https://cloudfront.amazonaws.com/2019-03-26/public-key/KDFB19YGCR002",
    "ETag": "E2QWRUHEXAMPLE",
    "PublicKey": {
        "Id": "KDFB19YGCR002",
        "CreatedTime": "2019-12-05T18:51:43.781Z",
        "PublicKeyConfig": {
            "CallerReference": "cli-example",
            "Name": "ExampleKey",
            "EncodedKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxPMbCA2Ks0lnd7IR+3pw\nwd3H/7jPGwj8bLUmore7bX+oeGpZ6QmLAe/1UOWcmZX2u70dYcSIzB1ofZtcn4cJ\nenHBAzO3ohBY/L1tQGJfS2A+omnN6H16VZE1JCK8XSJyfze7MDLcUyHZETdxuvRb\nA9X343/vMAuQPnhinFJ8Wdy8YBXSPpy7r95ylUQd9LfYTBzVZYG2tSesplcOkjM3\n2Uu+oMWxQAw1NINnSLPinMVsutJy6ZqlV3McWNWe4T+STGtWhrPNqJEn45sIcCx4\nq+kGZ2NQ0FyIyT2eiLKOX5Rgb/a36E/aMk4VoDsaenBQgG7WLTnstb9sr7MIhS6A\nrwIDAQAB\n-----END PUBLIC KEY-----\n",
            "Comment": "example public key"
        }
    }
}
```
+  Untuk detail API, lihat [CreatePublicKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/create-public-key.html)di *Referensi AWS CLI Perintah*. 

### `delete-cloud-front-origin-access-identity`
<a name="cloudfront_DeleteCloudFrontOriginAccessIdentity_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-cloud-front-origin-access-identity`.

**AWS CLI**  
**Untuk menghapus identitas akses CloudFront asal**  
Contoh berikut menghapus identitas akses asal (OAI) dengan ID. `E74FTE3AEXAMPLE` Untuk menghapus OAI, Anda harus memiliki ID OAI dan. `ETag` ID OAI dikembalikan dalam output perintah -access-identity dan create-cloud-front-origin -access-identities. list-cloud-front-origin Untuk mendapatkan`ETag`, gunakan perintah get-cloud-front-origin -access-identity atau get-cloud-front-origin -. access-identity-config Gunakan `--if-match` opsi untuk menyediakan OAI. `ETag`  

```
aws cloudfront delete-cloud-front-origin-access-identity \
    --id E74FTE3AEXAMPLE \
    --if-match E2QWRUHEXAMPLE
```
Ketika berhasil, perintah ini tidak memiliki output.  
+  Untuk detail API, lihat [DeleteCloudFrontOriginAccessIdentity](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/delete-cloud-front-origin-access-identity.html)di *Referensi AWS CLI Perintah*. 

### `delete-connection-group`
<a name="cloudfront_DeleteConnectionGroup_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-connection-group`.

**AWS CLI**  
**Untuk menghapus grup koneksi**  
`delete-connection-group`Contoh berikut menghapus grup koneksi. Grup koneksi harus dinonaktifkan dan tidak dapat dikaitkan dengan CloudFront sumber daya apa pun.  

```
aws cloudfront delete-connection-group \
    --id cg_2wjLpjbHkLUdhWAjHllcOeABC \
    --if-match ETVPDKIKX0DABC
```
Ketika berhasil, perintah ini tidak memiliki output.  
Untuk informasi selengkapnya tentang mengelola grup sambungan, lihat [Membuat grup sambungan khusus (opsional)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-connection-group.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [DeleteConnectionGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/delete-connection-group.html)di *Referensi AWS CLI Perintah*. 

### `delete-distribution-tenant`
<a name="cloudfront_DeleteDistributionTenant_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-distribution-tenant`.

**AWS CLI**  
**Untuk menghapus penyewa distribusi**  
`delete-distribution-tenant`Contoh berikut menghapus penyewa distribusi dengan. ETag `ETVPDKIKX0DABC` Penyewa distribusi harus dinonaktifkan dan tidak dapat dikaitkan dengan CloudFront sumber daya apa pun.  

```
aws cloudfront delete-distribution-tenant \
    --id dt_2wjMUbg3NHZEQ7OfoalP5zi1AB \
    --if-match ETVPDKIKX0DABC
```
Ketika berhasil, perintah ini tidak memiliki output.  
Untuk informasi selengkapnya, lihat [Menghapus distribusi](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [DeleteDistributionTenant](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/delete-distribution-tenant.html)di *Referensi AWS CLI Perintah*. 

### `delete-distribution`
<a name="cloudfront_DeleteDistribution_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-distribution`.

**AWS CLI**  
**Untuk menghapus CloudFront distribusi**  
Contoh berikut menghapus CloudFront distribusi dengan ID`EDFDVBD6EXAMPLE`. Sebelum Anda dapat menghapus distribusi, Anda harus menonaktifkannya. Untuk menonaktifkan distribusi, gunakan perintah pembaruan-distribusi. Untuk informasi selengkapnya, lihat contoh distribusi pembaruan.  
Ketika distribusi dinonaktifkan, Anda dapat menghapusnya. Untuk menghapus distribusi, Anda harus menggunakan `--if-match` opsi untuk menyediakan distribusi`ETag`. Untuk mendapatkan`ETag`, gunakan get-distribusi atau get-distribution-config perintah.  

```
aws cloudfront delete-distribution \
    --id EDFDVBD6EXAMPLE \
    --if-match E2QWRUHEXAMPLE
```
Ketika berhasil, perintah ini tidak memiliki output.  
+  Untuk detail API, lihat [DeleteDistribution](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/delete-distribution.html)di *Referensi AWS CLI Perintah*. 

### `delete-field-level-encryption-config`
<a name="cloudfront_DeleteFieldLevelEncryptionConfig_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-field-level-encryption-config`.

**AWS CLI**  
**Untuk menghapus konfigurasi CloudFront enkripsi tingkat lapangan**  
Contoh berikut menghapus konfigurasi enkripsi CloudFront tingkat lapangan dengan ID. `C3KM2WVD605UAY` Untuk menghapus konfigurasi enkripsi tingkat lapangan, Anda harus memiliki ID dan. `ETag` ID dikembalikan dalam output perintah create-field-level-encryption -config dan list-field-level-encryption -configs. Untuk mendapatkan`ETag`, gunakan perintah get-field-level-encryption or get-field-level-encryption -config. Gunakan `--if-match` opsi untuk menyediakan konfigurasi`ETag`.  

```
aws cloudfront delete-field-level-encryption-config \
    --id C3KM2WVD605UAY \
    --if-match E26M4BIAV81ZF6
```
Ketika berhasil, perintah ini tidak memiliki output.  
+  Untuk detail API, lihat [DeleteFieldLevelEncryptionConfig](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/delete-field-level-encryption-config.html)di *Referensi AWS CLI Perintah*. 

### `delete-field-level-encryption-profile`
<a name="cloudfront_DeleteFieldLevelEncryptionProfile_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-field-level-encryption-profile`.

**AWS CLI**  
**Untuk menghapus profil CloudFront enkripsi tingkat lapangan**  
Contoh berikut menghapus profil enkripsi CloudFront tingkat lapangan dengan ID. `PPK0UOSIF5WSV` Untuk menghapus profil enkripsi tingkat lapangan, Anda harus memiliki ID dan. `ETag` ID dikembalikan dalam output perintah create-field-level-encryption -profile dan list-field-level-encryption -profiles. Untuk mendapatkan`ETag`, gunakan perintah get-field-level-encryption -profile atau get-field-level-encryption -profile-config. Gunakan `--if-match` opsi untuk menyediakan profil`ETag`.  

```
aws cloudfront delete-field-level-encryption-profile \
    --id PPK0UOSIF5WSV \
    --if-match EJETYFJ9CL66D
```
Ketika berhasil, perintah ini tidak memiliki output.  
+  Untuk detail API, lihat [DeleteFieldLevelEncryptionProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/delete-field-level-encryption-profile.html)di *Referensi AWS CLI Perintah*. 

### `delete-public-key`
<a name="cloudfront_DeletePublicKey_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`delete-public-key`.

**AWS CLI**  
**Untuk menghapus kunci CloudFront publik**  
Contoh berikut menghapus kunci CloudFront publik dengan ID`KDFB19YGCR002`. Untuk menghapus kunci publik, Anda harus memiliki ID dan`ETag`. ID dikembalikan dalam output list-public-keys perintah create-public-key dan. Untuk mendapatkan`ETag`, gunakan get-public-key-config perintah get-public-key or. Gunakan `--if-match` opsi untuk menyediakan kunci publik`ETag`.  

```
aws cloudfront delete-public-key \
    --id KDFB19YGCR002 \
    --if-match E2QWRUHEXAMPLE
```
Ketika berhasil, perintah ini tidak memiliki output.  
+  Untuk detail API, lihat [DeletePublicKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/delete-public-key.html)di *Referensi AWS CLI Perintah*. 

### `disassociate-distribution-tenant-web-acl`
<a name="cloudfront_DisassociateDistributionTenantWebAcl_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`disassociate-distribution-tenant-web-acl`.

**AWS CLI**  
**Untuk memisahkan ACL web dari penyewa distribusi**  
`disassociate-distribution-tenant-web-acl`Contoh berikut memisahkan ACL web dari penyewa distribusi dengan. ETag `E1PA6795UKMABC`  

```
aws cloudfront disassociate-distribution-tenant-web-acl \
    --id dt_2wjDZi3hD1ivOXf6rpZJOSNE1AB \
    --if-match E1PA6795UKMABC
```
Output:  

```
{
    "ETag": "E13V1IB3VIYABC",
    "Id": "dt_2wjDZi3hD1ivOXf6rpZJOSNE1AB"
}
```
Untuk informasi selengkapnya, lihat [Menonaktifkan perlindungan keamanan AWS WAF](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/disable-waf.html) di Panduan * CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [DisassociateDistributionTenantWebAcl](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/disassociate-distribution-tenant-web-acl.html)di *Referensi AWS CLI Perintah*. 

### `disassociate-distribution-web-acl`
<a name="cloudfront_DisassociateDistributionWebAcl_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`disassociate-distribution-web-acl`.

**AWS CLI**  
**Untuk memisahkan ACL web dari distribusi CloudFront **  
`disassociate-distribution-web-acl`Contoh berikut menghapus hubungan antara ACL web dan CloudFront distribusi dengan ETag `E13V1IB3VIYABC`.  

```
aws cloudfront disassociate-distribution-web-acl \
    --id E1XNX8R2GOAABC \
    --if-match EEZQ9Z24VM1ABC
```
Output:  

```
{
    "ETag": "E2YWS1C2J3OABC",
    "Id": "E1XNX8R2GOAABC"
}
```
Untuk informasi selengkapnya, lihat [Menonaktifkan perlindungan keamanan AWS WAF](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/disable-waf.html) di Panduan * CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [DisassociateDistributionWebAcl](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/disassociate-distribution-web-acl.html)di *Referensi AWS CLI Perintah*. 

### `get-cloud-front-origin-access-identity-config`
<a name="cloudfront_GetCloudFrontOriginAccessIdentityConfig_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-cloud-front-origin-access-identity-config`.

**AWS CLI**  
**Untuk mendapatkan konfigurasi identitas akses CloudFront asal**  
Contoh berikut mendapatkan metadata tentang identitas akses CloudFront asal (OAI) dengan ID`E74FTE3AEXAMPLE`, termasuk nya. `ETag` ID OAI dikembalikan dalam output perintah -access-identity dan create-cloud-front-origin -access-identities. list-cloud-front-origin  

```
aws cloudfront get-cloud-front-origin-access-identity-config --id E74FTE3AEXAMPLE
```
Output:  

```
{
    "ETag": "E2QWRUHEXAMPLE",
    "CloudFrontOriginAccessIdentityConfig": {
        "CallerReference": "cli-example",
        "Comment": "Example OAI"
    }
}
```
+  Untuk detail API, lihat [GetCloudFrontOriginAccessIdentityConfig](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-cloud-front-origin-access-identity-config.html)di *Referensi AWS CLI Perintah*. 

### `get-cloud-front-origin-access-identity`
<a name="cloudfront_GetCloudFrontOriginAccessIdentity_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-cloud-front-origin-access-identity`.

**AWS CLI**  
**Untuk mendapatkan identitas akses CloudFront asal**  
Contoh berikut mendapatkan identitas akses CloudFront asal (OAI) dengan ID`E74FTE3AEXAMPLE`, termasuk ID kanonik `ETag` dan S3 terkait. ID OAI dikembalikan dalam output perintah -access-identity dan create-cloud-front-origin -access-identities. list-cloud-front-origin  

```
aws cloudfront get-cloud-front-origin-access-identity --id E74FTE3AEXAMPLE
```
Output:  

```
{
    "ETag": "E2QWRUHEXAMPLE",
    "CloudFrontOriginAccessIdentity": {
        "Id": "E74FTE3AEXAMPLE",
        "S3CanonicalUserId": "cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9aEXAMPLE",
        "CloudFrontOriginAccessIdentityConfig": {
            "CallerReference": "cli-example",
            "Comment": "Example OAI"
        }
    }
}
```
+  Untuk detail API, lihat [GetCloudFrontOriginAccessIdentity](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-cloud-front-origin-access-identity.html)di *Referensi AWS CLI Perintah*. 

### `get-connection-group-by-routing-endpoint`
<a name="cloudfront_GetConnectionGroupByRoutingEndpoint_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-connection-group-by-routing-endpoint`.

**AWS CLI**  
**Untuk mendapatkan grup koneksi dengan merutekan titik akhir**  
`get-connection-group-by-routing-endpoint`Contoh berikut mengambil informasi tentang grup koneksi menggunakan endpoint routing nya.  

```
aws cloudfront get-connection-group-by-routing-endpoint \
    --routing-endpoint dvdg9gprgabc.cloudfront.net
```
Output:  

```
{
    "ETag": "E23ZP02F085ABC",
    "ConnectionGroup": {
        "Id": "cg_2wjDWTBKTlRB87cAaUQFaakABC",
        "Name": "connection-group-2",
        "Arn": "arn:aws:cloudfront::123456789012:connection-group/cg_2wjDWTBKTlRB87cAaUQFaakABC",
        "CreatedTime": "2025-05-06T15:42:00.790000+00:00",
        "LastModifiedTime": "2025-05-06T15:42:00.790000+00:00",
        "Ipv6Enabled": true,
        "RoutingEndpoint": "dvdg9gprgabc.cloudfront.net",
        "Status": "Deployed",
        "Enabled": true,
        "IsDefault": false
    }
}
```
Untuk informasi selengkapnya, lihat [Membuat grup sambungan kustom (opsional)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-connection-group.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [GetConnectionGroupByRoutingEndpoint](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-connection-group-by-routing-endpoint.html)di *Referensi AWS CLI Perintah*. 

### `get-connection-group`
<a name="cloudfront_GetConnectionGroup_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-connection-group`.

**AWS CLI**  
**Untuk mendapatkan grup CloudFront koneksi**  
`get-connection-group`Contoh berikut mengambil informasi tentang grup CloudFront koneksi.  

```
aws cloudfront get-connection-group \
    --identifier cg_2wjDWTBKTlRB87cAaUQFaakABC
```
Output:  

```
{
    "ETag": "E23ZP02F085ABC",
    "ConnectionGroup": {
        "Id": "cg_2wjDWTBKTlRB87cAaUQFaakABC",
        "Name": "connection-group-2",
        "Arn": "arn:aws:cloudfront::123456789012:connection-group/cg_2wjDWTBKTlRB87cAaUQFaakABC",
        "CreatedTime": "2025-05-06T15:42:00.790000+00:00",
        "LastModifiedTime": "2025-05-06T15:42:00.790000+00:00",
        "Ipv6Enabled": true,
        "RoutingEndpoint": "dvdg9gprgabc.cloudfront.net",
        "Status": "Deployed",
        "Enabled": true,
        "IsDefault": false
    }
}
```
Untuk informasi selengkapnya, lihat [Membuat grup sambungan kustom (opsional)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-connection-group.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [GetConnectionGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-connection-group.html)di *Referensi AWS CLI Perintah*. 

### `get-distribution-config`
<a name="cloudfront_GetDistributionConfig_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-distribution-config`.

**AWS CLI**  
**Untuk mendapatkan konfigurasi CloudFront distribusi**  
Contoh berikut mendapatkan metadata tentang CloudFront distribusi dengan ID`EDFDVBD6EXAMPLE`, termasuk nya. `ETag` ID distribusi dikembalikan dalam perintah create-distribution dan list-distributions.  

```
aws cloudfront get-distribution-config \
    --id EDFDVBD6EXAMPLE
```
Output:  

```
{
    "ETag": "E2QWRUHEXAMPLE",
    "DistributionConfig": {
        "CallerReference": "cli-example",
        "Aliases": {
            "Quantity": 0
        },
        "DefaultRootObject": "index.html",
        "Origins": {
            "Quantity": 1,
            "Items": [
                {
                    "Id": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.com-cli-example",
                    "DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
                    "OriginPath": "",
                    "CustomHeaders": {
                        "Quantity": 0
                    },
                    "S3OriginConfig": {
                        "OriginAccessIdentity": ""
                    }
                }
            ]
        },
        "OriginGroups": {
            "Quantity": 0
        },
        "DefaultCacheBehavior": {
            "TargetOriginId": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.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
    }
}
```
+  Untuk detail API, lihat [GetDistributionConfig](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-distribution-config.html)di *Referensi AWS CLI Perintah*. 

### `get-distribution-tenant-by-domain`
<a name="cloudfront_GetDistributionTenantByDomain_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-distribution-tenant-by-domain`.

**AWS CLI**  
**Untuk mendapatkan informasi penyewa distribusi berdasarkan domain**  
`get-distribution-tenant-by-domain`Contoh berikut mengambil informasi tentang penyewa distribusi menggunakan domain yang ditentukan.  

```
aws cloudfront get-distribution-tenant-by-domain \
    --domain example.com
```
Output:  

```
{
    "ETag": "E23ZP02F085ABC",
    "DistributionTenant": {
        "Id": "dt_2xVInRKCfUzQHgxosDs9hiLk1AB",
        "DistributionId": "E1XNX8R2GOAABC",
        "Name": "example-tenant-4",
        "Arn": "arn:aws:cloudfront::123456789012:distribution-tenant/dt_2xVInRKCfUzQHgxosDs9hiLk1AB",
        "Domains": [
            {
                "Domain": "example.com",
                "Status": "active"
            }
        ],
        "Parameters": [
            {
                "Name": "testParam",
                "Value": "defaultValue"
            }
        ],
        "ConnectionGroupId": "cg_2whCJoXMYCjHcxaLGrkllvyABC",
        "CreatedTime": "2025-05-23T16:16:20.871000+00:00",
        "LastModifiedTime": "2025-05-23T16:16:20.871000+00:00",
        "Enabled": false,
        "Status": "Deployed"
    }
}
```
Untuk informasi selengkapnya, lihat [Memahami cara kerja distribusi multi-penyewa di Panduan](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-config-options.html) Pengembang *Amazon CloudFront *.  
+  Untuk detail API, lihat [GetDistributionTenantByDomain](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-distribution-tenant-by-domain.html)di *Referensi AWS CLI Perintah*. 

### `get-distribution-tenant`
<a name="cloudfront_GetDistributionTenant_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-distribution-tenant`.

**AWS CLI**  
**Untuk mendapatkan detail tentang penyewa CloudFront distribusi**  
`get-distribution-tenant`Contoh berikut mengambil informasi tentang penyewa CloudFront distribusi.  

```
aws cloudfront get-distribution-tenant \
    --id dt_2wjDZi3hD1ivOXf6rpZJOSNE1AB
```
Output:  

```
{
    "ETag": "E23ZP02F085ABC",
    "DistributionTenant": {
        "Id": "dt_2wjDZi3hD1ivOXf6rpZJOSNE1AB",
        "DistributionId": "E1XNX8R2GOAABC",
        "Name": "example-tenant-2",
        "Arn": "arn:aws:cloudfront::123456789012:distribution-tenant/dt_2wjDZi3hD1ivOXf6rpZJOSNE1AB",
        "Domains": [
            {
                "Domain": "example.com",
                "Status": "inactive"
            }
        ],
        "ConnectionGroupId": "cg_2wjDWTBKTlRB87cAaUQFaakABC",
        "CreatedTime": "2025-05-06T15:42:28.542000+00:00",
        "LastModifiedTime": "2025-05-06T15:42:37.724000+00:00",
        "Enabled": true,
        "Status": "InProgress"
    }
}
```
Untuk informasi selengkapnya, lihat [Memahami cara kerja distribusi multi-penyewa di Panduan](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-config-options.html) Pengembang *Amazon CloudFront *.  
+  Untuk detail API, lihat [GetDistributionTenant](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-distribution-tenant.html)di *Referensi AWS CLI Perintah*. 

### `get-distribution`
<a name="cloudfront_GetDistribution_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-distribution`.

**AWS CLI**  
**Untuk mendapatkan CloudFront distribusi**  
`get-distribution`Contoh berikut mendapatkan CloudFront distribusi dengan ID`EDFDVBD6EXAMPLE`, termasuk nya`ETag`. ID distribusi dikembalikan dalam perintah create-distribution dan list-distributions.  

```
aws cloudfront get-distribution \
    --id EDFDVBD6EXAMPLE
```
Output:  

```
{
    "ETag": "E2QWRUHEXAMPLE",
    "Distribution": {
        "Id": "EDFDVBD6EXAMPLE",
        "ARN": "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
        "Status": "Deployed",
        "LastModifiedTime": "2019-12-04T23:35:41.433Z",
        "InProgressInvalidationBatches": 0,
        "DomainName": "d111111abcdef8.cloudfront.net",
        "ActiveTrustedSigners": {
            "Enabled": false,
            "Quantity": 0
        },
        "DistributionConfig": {
            "CallerReference": "cli-example",
            "Aliases": {
                "Quantity": 0
            },
            "DefaultRootObject": "index.html",
            "Origins": {
                "Quantity": 1,
                "Items": [
                    {
                        "Id": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.com-cli-example",
                        "DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
                        "OriginPath": "",
                        "CustomHeaders": {
                            "Quantity": 0
                        },
                        "S3OriginConfig": {
                            "OriginAccessIdentity": ""
                        }
                    }
                ]
            },
            "OriginGroups": {
                "Quantity": 0
            },
            "DefaultCacheBehavior": {
                "TargetOriginId": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.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
        }
    }
}
```
+  Untuk detail API, lihat [GetDistribution](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-distribution.html)di *Referensi AWS CLI Perintah*. 

### `get-field-level-encryption-config`
<a name="cloudfront_GetFieldLevelEncryptionConfig_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-field-level-encryption-config`.

**AWS CLI**  
**Untuk mendapatkan metadata tentang konfigurasi enkripsi tingkat CloudFront lapangan**  
Contoh berikut mendapatkan metadata tentang konfigurasi enkripsi CloudFront tingkat lapangan dengan ID, termasuk: `C3KM2WVD605UAY` `ETag`  

```
aws cloudfront get-field-level-encryption-config --id C3KM2WVD605UAY
```
Output:  

```
{
    "ETag": "E2P4Z4VU7TY5SG",
    "FieldLevelEncryptionConfig": {
        "CallerReference": "cli-example",
        "Comment": "Example FLE configuration",
        "QueryArgProfileConfig": {
            "ForwardWhenQueryArgProfileIsUnknown": true,
            "QueryArgProfiles": {
                "Quantity": 0,
                "Items": []
            }
        },
        "ContentTypeProfileConfig": {
            "ForwardWhenContentTypeIsUnknown": true,
            "ContentTypeProfiles": {
                "Quantity": 1,
                "Items": [
                    {
                        "Format": "URLEncoded",
                        "ProfileId": "P280MFCLSYOCVU",
                        "ContentType": "application/x-www-form-urlencoded"
                    }
                ]
            }
        }
    }
}
```
+  Untuk detail API, lihat [GetFieldLevelEncryptionConfig](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-field-level-encryption-config.html)di *Referensi AWS CLI Perintah*. 

### `get-field-level-encryption-profile-config`
<a name="cloudfront_GetFieldLevelEncryptionProfileConfig_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-field-level-encryption-profile-config`.

**AWS CLI**  
**Untuk mendapatkan konfigurasi CloudFront profil enkripsi tingkat lapangan**  
Contoh berikut mendapatkan metadata tentang profil enkripsi CloudFront tingkat lapangan dengan ID, termasuk: `PPK0UOSIF5WSV` `ETag`  

```
aws cloudfront get-field-level-encryption-profile-config --id PPK0UOSIF5WSV
```
Output:  

```
{
    "ETag": "E1QQG65FS2L2GC",
    "FieldLevelEncryptionProfileConfig": {
        "Name": "ExampleFLEProfile",
        "CallerReference": "cli-example",
        "Comment": "FLE profile for AWS CLI example",
        "EncryptionEntities": {
            "Quantity": 1,
            "Items": [
                {
                    "PublicKeyId": "K2K8NC4HVFE3M0",
                    "ProviderId": "ExampleFLEProvider",
                    "FieldPatterns": {
                        "Quantity": 1,
                        "Items": [
                            "ExampleSensitiveField"
                        ]
                    }
                }
            ]
        }
    }
}
```
+  Untuk detail API, lihat [GetFieldLevelEncryptionProfileConfig](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-field-level-encryption-profile-config.html)di *Referensi AWS CLI Perintah*. 

### `get-field-level-encryption-profile`
<a name="cloudfront_GetFieldLevelEncryptionProfile_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-field-level-encryption-profile`.

**AWS CLI**  
**Untuk mendapatkan profil CloudFront enkripsi tingkat lapangan**  
Contoh berikut mendapatkan profil enkripsi CloudFront tingkat lapangan dengan ID`PPK0UOSIF5WSV`, termasuk: `ETag`  

```
aws cloudfront get-field-level-encryption-profile --id PPK0UOSIF5WSV
```
Output:  

```
{
    "ETag": "E1QQG65FS2L2GC",
    "FieldLevelEncryptionProfile": {
        "Id": "PPK0UOSIF5WSV",
        "LastModifiedTime": "2019-12-10T01:03:16.537Z",
        "FieldLevelEncryptionProfileConfig": {
            "Name": "ExampleFLEProfile",
            "CallerReference": "cli-example",
            "Comment": "FLE profile for AWS CLI example",
            "EncryptionEntities": {
                "Quantity": 1,
                "Items": [
                    {
                        "PublicKeyId": "K2K8NC4HVFE3M0",
                        "ProviderId": "ExampleFLEProvider",
                        "FieldPatterns": {
                            "Quantity": 1,
                            "Items": [
                                "ExampleSensitiveField"
                            ]
                        }
                    }
                ]
            }
        }
    }
}
```
+  Untuk detail API, lihat [GetFieldLevelEncryptionProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-field-level-encryption-profile.html)di *Referensi AWS CLI Perintah*. 

### `get-field-level-encryption`
<a name="cloudfront_GetFieldLevelEncryption_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-field-level-encryption`.

**AWS CLI**  
**Untuk mendapatkan konfigurasi CloudFront enkripsi tingkat lapangan**  
Contoh berikut mendapatkan konfigurasi enkripsi CloudFront tingkat lapangan dengan ID`C3KM2WVD605UAY`, termasuk: `ETag`  

```
aws cloudfront get-field-level-encryption --id C3KM2WVD605UAY
```
Output:  

```
{
    "ETag": "E2P4Z4VU7TY5SG",
    "FieldLevelEncryption": {
        "Id": "C3KM2WVD605UAY",
        "LastModifiedTime": "2019-12-10T21:30:18.974Z",
        "FieldLevelEncryptionConfig": {
            "CallerReference": "cli-example",
            "Comment": "Example FLE configuration",
            "QueryArgProfileConfig": {
                "ForwardWhenQueryArgProfileIsUnknown": true,
                "QueryArgProfiles": {
                    "Quantity": 0,
                    "Items": []
                }
            },
            "ContentTypeProfileConfig": {
                "ForwardWhenContentTypeIsUnknown": true,
                "ContentTypeProfiles": {
                    "Quantity": 1,
                    "Items": [
                        {
                            "Format": "URLEncoded",
                            "ProfileId": "P280MFCLSYOCVU",
                            "ContentType": "application/x-www-form-urlencoded"
                        }
                    ]
                }
            }
        }
    }
}
```
+  Untuk detail API, lihat [GetFieldLevelEncryption](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-field-level-encryption.html)di *Referensi AWS CLI Perintah*. 

### `get-invalidation-for-distribution-tenant`
<a name="cloudfront_GetInvalidationForDistributionTenant_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-invalidation-for-distribution-tenant`.

**AWS CLI**  
**Untuk mendapatkan pembatalan bagi penyewa distribusi**  
`get-invalidation-for-distribution-tenant`Contoh berikut mendapatkan informasi tentang pembatalan untuk penyewa distribusi.  

```
aws cloudfront get-invalidation-for-distribution-tenant \
    --distribution-tenant-id dt_2wjDZi3hD1ivOXf6rpZJOSNE1AB \
    --id I4CU23QAPKMUDUU06F9OFGFABC
```
Output:  

```
{
    "Invalidation": {
        "Id": "I4CU23QAPKMUDUU06F9OFGFABC",
        "Status": "Completed",
        "CreateTime": "2025-05-06T15:46:12.824000+00:00",
        "InvalidationBatch": {
            "Paths": {
                "Quantity": 2,
                "Items": [
                    "/example/invalidation",
                    "/more/invalidations"
                ]
            },
            "CallerReference": "007ee5a6-d0a0-42be-bb61-e7b915969b48"
        }
    }
}
```
Untuk informasi selengkapnya, lihat [Membatalkan file untuk menghapus konten](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html) di Panduan * CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [GetInvalidationForDistributionTenant](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-invalidation-for-distribution-tenant.html)di *Referensi AWS CLI Perintah*. 

### `get-invalidation`
<a name="cloudfront_GetInvalidation_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-invalidation`.

**AWS CLI**  
**Untuk mendapatkan CloudFront pembatalan**  
Contoh berikut mendapatkan pembatalan dengan ID `I2J0I21PCUYOIK` untuk CloudFront distribusi dengan ID: `EDFDVBD6EXAMPLE`  

```
aws cloudfront get-invalidation --id I2J0I21PCUYOIK --distribution-id EDFDVBD6EXAMPLE
```
Output:  

```
{
    "Invalidation": {
        "Status": "Completed",
        "InvalidationBatch": {
            "Paths": {
                "Items": [
                    "/example-path/example-file.jpg",
                    "/example-path/example-file-2.jpg"
                ],
                "Quantity": 2
            },
            "CallerReference": "cli-example"
        },
        "Id": "I2J0I21PCUYOIK",
        "CreateTime": "2019-12-05T18:40:49.413Z"
    }
}
```
+  Untuk detail API, lihat [GetInvalidation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-invalidation.html)di *Referensi AWS CLI Perintah*. 

### `get-managed-certificate-details`
<a name="cloudfront_GetManagedCertificateDetails_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-managed-certificate-details`.

**AWS CLI**  
**Untuk mendapatkan detail sertifikat terkelola**  
`get-managed-certificate-details`Contoh berikut mengambil rincian sertifikat ACM CloudFront terkelola.  

```
aws cloudfront get-managed-certificate-details \
    --identifier dt_2wjDZi3hD1ivOXf6rpZJOSNE1AB
```
Output:  

```
{
    "ManagedCertificateDetails": {
        "CertificateArn": "arn:aws:acm:us-east-1:123456789012:certificate/655dc1fe-6d37-451d-a013-c2db3a034abc",
        "CertificateStatus": "pending-validation",
        "ValidationTokenHost": "self-hosted",
        "ValidationTokenDetails": [
            {
                "Domain": "example.com",
                "RedirectTo": "validation.us-east-1.acm-validations.aws/123456789012/.well-known/pki-validation/b315c9ae21284e7918bb9f3f422ab1c7.txt",
                "RedirectFrom": "example.com/.well-known/pki-validation/b315c9ae21284e7918bb9f3f422ac3c7.txt"
            }
        ]
    }
}
```
Untuk informasi selengkapnya, lihat [Meminta sertifikat untuk penyewa CloudFront distribusi Anda](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/managed-cloudfront-certificates.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [GetManagedCertificateDetails](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-managed-certificate-details.html)di *Referensi AWS CLI Perintah*. 

### `get-public-key-config`
<a name="cloudfront_GetPublicKeyConfig_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-public-key-config`.

**AWS CLI**  
**Untuk mendapatkan konfigurasi kunci CloudFront publik**  
Contoh berikut mendapatkan metadata tentang kunci CloudFront publik dengan ID`KDFB19YGCR002`, termasuk nya. `ETag` ID kunci publik dikembalikan dalam list-public-keys perintah create-public-key and.  

```
aws cloudfront get-public-key-config --id KDFB19YGCR002
```
Output:  

```
{
    "ETag": "E2QWRUHEXAMPLE",
    "PublicKeyConfig": {
        "CallerReference": "cli-example",
        "Name": "ExampleKey",
        "EncodedKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxPMbCA2Ks0lnd7IR+3pw\nwd3H/7jPGwj8bLUmore7bX+oeGpZ6QmLAe/1UOWcmZX2u70dYcSIzB1ofZtcn4cJ\nenHBAzO3ohBY/L1tQGJfS2A+omnN6H16VZE1JCK8XSJyfze7MDLcUyHZETdxuvRb\nA9X343/vMAuQPnhinFJ8Wdy8YBXSPpy7r95ylUQd9LfYTBzVZYG2tSesplcOkjM3\n2Uu+oMWxQAw1NINnSLPinMVsutJy6ZqlV3McWNWe4T+STGtWhrPNqJEn45sIcCx4\nq+kGZ2NQ0FyIyT2eiLKOX5Rgb/a36E/aMk4VoDsaenBQgG7WLTnstb9sr7MIhS6A\nrwIDAQAB\n-----END PUBLIC KEY-----\n",
        "Comment": "example public key"
    }
}
```
+  Untuk detail API, lihat [GetPublicKeyConfig](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-public-key-config.html)di *Referensi AWS CLI Perintah*. 

### `get-public-key`
<a name="cloudfront_GetPublicKey_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`get-public-key`.

**AWS CLI**  
**Untuk mendapatkan kunci CloudFront publik**  
Contoh berikut mendapatkan kunci CloudFront publik dengan ID`KDFB19YGCR002`, termasuk nya`ETag`. ID kunci publik dikembalikan dalam list-public-keys perintah create-public-key and.  

```
aws cloudfront get-public-key --id KDFB19YGCR002
```
Output:  

```
{
    "ETag": "E2QWRUHEXAMPLE",
    "PublicKey": {
        "Id": "KDFB19YGCR002",
        "CreatedTime": "2019-12-05T18:51:43.781Z",
        "PublicKeyConfig": {
            "CallerReference": "cli-example",
            "Name": "ExampleKey",
            "EncodedKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxPMbCA2Ks0lnd7IR+3pw\nwd3H/7jPGwj8bLUmore7bX+oeGpZ6QmLAe/1UOWcmZX2u70dYcSIzB1ofZtcn4cJ\nenHBAzO3ohBY/L1tQGJfS2A+omnN6H16VZE1JCK8XSJyfze7MDLcUyHZETdxuvRb\nA9X343/vMAuQPnhinFJ8Wdy8YBXSPpy7r95ylUQd9LfYTBzVZYG2tSesplcOkjM3\n2Uu+oMWxQAw1NINnSLPinMVsutJy6ZqlV3McWNWe4T+STGtWhrPNqJEn45sIcCx4\nq+kGZ2NQ0FyIyT2eiLKOX5Rgb/a36E/aMk4VoDsaenBQgG7WLTnstb9sr7MIhS6A\nrwIDAQAB\n-----END PUBLIC KEY-----\n",
            "Comment": "example public key"
        }
    }
}
```
+  Untuk detail API, lihat [GetPublicKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/get-public-key.html)di *Referensi AWS CLI Perintah*. 

### `list-cloud-front-origin-access-identities`
<a name="cloudfront_ListCloudFrontOriginAccessIdentities_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-cloud-front-origin-access-identities`.

**AWS CLI**  
**Untuk mencantumkan identitas akses CloudFront asal**  
Contoh berikut mendapatkan daftar identitas akses CloudFront asal (OAIs) di AWS akun Anda:  

```
aws cloudfront list-cloud-front-origin-access-identities
```
Output:  

```
{
    "CloudFrontOriginAccessIdentityList": {
        "Items": [
            {
                "Id": "E74FTE3AEXAMPLE",
                "S3CanonicalUserId": "cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9aEXAMPLE",
                "Comment": "Example OAI"
            },
            {
                "Id": "EH1HDMBEXAMPLE",
                "S3CanonicalUserId": "1489f6f2e6faacaae7ff64c4c3e6956c24f78788abfc1718c3527c263bf7a17EXAMPLE",
                "Comment": "Test OAI"
            },
            {
                "Id": "E2X2C9TEXAMPLE",
                "S3CanonicalUserId": "cbfeebb915a64749f9be546a45b3fcfd3a31c779673c13c4dd460911ae402c2EXAMPLE",
                "Comment": "Example OAI #2"
            }
        ]
    }
}
```
+  Untuk detail API, lihat [ListCloudFrontOriginAccessIdentities](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-cloud-front-origin-access-identities.html)di *Referensi AWS CLI Perintah*. 

### `list-connection-groups`
<a name="cloudfront_ListConnectionGroups_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-connection-groups`.

**AWS CLI**  
**Untuk daftar grup koneksi**  
`list-connection-groups`Contoh berikut mencantumkan grup koneksi yang tersedia di AWS akun Anda.  

```
aws cloudfront list-connection-groups
```
Output:  

```
{
    "ConnectionGroups": [
        {
            "Id": "cg_2whCJoXMYCjHcxaLGrkllvyABC",
            "Name": "CreatedByCloudFront-cg_2whCJoXMYCjHcxaLGrkllvyABC",
            "Arn": "arn:aws:cloudfront::123456789012:connection-group/cg_2whCJoXMYCjHcxaLGrkllvyABC",
            "RoutingEndpoint": "d3sx0pso7m5abc.cloudfront.net",
            "CreatedTime": "2025-05-05T22:32:29.630000+00:00",
            "LastModifiedTime": "2025-05-05T22:32:29.630000+00:00",
            "ETag": "E23ZP02F085ABC",
            "Enabled": true,
            "Status": "Deployed",
            "IsDefault": true
        },
        {
            "Id": "cg_2wjDWTBKTlRB87cAaUQFaakABC",
            "Name": "connection-group-2",
            "Arn": "arn:aws:cloudfront::123456789012:connection-group/cg_2wjDWTBKTlRB87cAaUQFaakABC",
            "RoutingEndpoint": "dvdg9gprgabc.cloudfront.net",
            "CreatedTime": "2025-05-06T15:42:00.790000+00:00",
            "LastModifiedTime": "2025-05-06T15:42:00.790000+00:00",
            "ETag": "E23ZP02F085ABC",
            "Enabled": true,
            "Status": "Deployed",
            "IsDefault": false
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Membuat grup sambungan kustom (opsional)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-connection-group.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [ListConnectionGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-connection-groups.html)di *Referensi AWS CLI Perintah*. 

### `list-distribution-tenants-by-customization`
<a name="cloudfront_ListDistributionTenantsByCustomization_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-distribution-tenants-by-customization`.

**AWS CLI**  
**Untuk daftar penyewa distribusi dengan kustomisasi**  
`list-distribution-tenants-by-customization`Contoh berikut mencantumkan penyewa distribusi yang menggunakan ACL web yang ditentukan.  

```
aws cloudfront list-distribution-tenants-by-customization \
    --web-acl-arn arn:aws:wafv2:us-east-1:123456789012:global/webacl/CreatedByCloudFront-0273cd2f/a3c19bce-42b5-48a1-a8d4-b2bb2f28eabc
```
Output:  

```
{
    "DistributionTenantList": [
        {
            "Id": "dt_2wjDZi3hD1ivOXf6rpZJOSNE1AB",
            "DistributionId": "E1XNX8R2GOAABC",
            "Name": "example-tenant-2",
            "Arn": "arn:aws:cloudfront::123456789012:distribution-tenant/dt_2wjDZi3hD1ivOXf6rpZJOSNE1AB",
            "Domains": [
                {
                    "Domain": "example.com",
                    "Status": "inactive"
                }
            ],
            "ConnectionGroupId": "cg_2wjDWTBKTlRB87cAaUQFaakABC",
            "Customizations": {
                "WebAcl": {
                    "Action": "override",
                    "Arn": "arn:aws:wafv2:us-east-1:123456789012:global/webacl/CreatedByCloudFront-0273cd2f/a3c19bce-42b5-48a1-a8d4-b2bb2f28eabc"
                },
                "GeoRestrictions": {
                    "RestrictionType": "whitelist",
                    "Locations": [
                        "AL"
                    ]
                }
            },
            "CreatedTime": "2025-05-06T15:42:28.542000+00:00",
            "LastModifiedTime": "2025-05-06T16:14:08.710000+00:00",
            "ETag": "E1F83G8C2ARABC",
            "Enabled": true,
            "Status": "Deployed"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Kustomisasi penyewa distribusi di Panduan](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/tenant-customization.html) Pengembang *Amazon CloudFront *.  
+  Untuk detail API, lihat [ListDistributionTenantsByCustomization](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-distribution-tenants-by-customization.html)di *Referensi AWS CLI Perintah*. 

### `list-distribution-tenants`
<a name="cloudfront_ListDistributionTenants_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-distribution-tenants`.

**AWS CLI**  
**Untuk daftar penyewa CloudFront distribusi**  
`list-distribution-tenants`Contoh berikut mencantumkan 3 penyewa CloudFront distribusi di AWS akun Anda oleh grup koneksi terkait.  

```
aws cloudfront list-distribution-tenants \
    --association-filter ConnectionGroupId=cg_2whCJoXMYCjHcxaLGrkllvyABC \
    --max-items 3
```
Output:  

```
{
    "DistributionTenantList": [
        {
            "Id": "dt_2yMvQgam3QkJo2z54FDl91dk1AB",
            "DistributionId": "E1XNX8R2GOAABC",
            "Name": "new-tenant-customizations",
            "Arn": "arn:aws:cloudfront::123456789012:distribution-tenant/dt_2yMvQgam3QkJo2z54FDl91dk1AB",
            "Domains": [
                {
                    "Domain": "example.com",
                    "Status": "active"
                }
            ],
            "ConnectionGroupId": "cg_2whCJoXMYCjHcxaLGrkllvyABC",
            "Customizations": {
                "WebAcl": {
                    "Action": "disable"
                },
                "GeoRestrictions": {
                    "RestrictionType": "whitelist",
                    "Locations": [
                        "DE"
                    ]
                }
            },
            "CreatedTime": "2025-06-11T15:54:02.142000+00:00",
            "LastModifiedTime": "2025-06-11T15:54:02.142000+00:00",
            "ETag": "E23ZP02F085ABC",
            "Enabled": false,
            "Status": "Deployed"
        },
        {
            "Id": "dt_2yMuV7NJuBcAB0cwwxMCBZQ1AB",
            "DistributionId": "E1XNX8R2GOAABC",
            "Name": "new-tenant",
            "Arn": "arn:aws:cloudfront::123456789012:distribution-tenant/dt_2yMuV7NJuBcAB0cwwxMCBZQ1AB",
            "Domains": [
                {
                    "Domain": "1.example.com",
                    "Status": "active"
                }
            ],
            "ConnectionGroupId": "cg_2whCJoXMYCjHcxaLGrkllvyABC",
            "Customizations": {
                "GeoRestrictions": {
                    "RestrictionType": "whitelist",
                    "Locations": [
                        "DE"
                    ]
                }
            },
            "CreatedTime": "2025-06-11T15:46:23.466000+00:00",
            "LastModifiedTime": "2025-06-11T15:46:23.466000+00:00",
            "ETag": "E23ZP02F085ABC",
            "Enabled": false,
            "Status": "Deployed"
        },
        {
            "Id": "dt_2xVInRKCfUzQHgxosDs9hiLk1AB",
            "DistributionId": "E1XNX8R2GOAABC",
            "Name": "new-tenant-2",
            "Arn": "arn:aws:cloudfront::123456789012:distribution-tenant/dt_2xVInRKCfUzQHgxosDs9hiLk1AB",
            "Domains": [
                {
                    "Domain": "2.example.com",
                    "Status": "active"
                }
            ],
            "ConnectionGroupId": "cg_2whCJoXMYCjHcxaLGrkllvyABC",
            "CreatedTime": "2025-05-23T16:16:20.871000+00:00",
            "LastModifiedTime": "2025-05-23T16:16:20.871000+00:00",
            "ETag": "E23ZP02F085ABC",
            "Enabled": false,
            "Status": "Deployed"
        }
    ],
    "NextToken": "eyJNYXJrZXIiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAzfQ=="
}
```
Untuk informasi selengkapnya, lihat [Memahami cara kerja distribusi multi-penyewa di Panduan](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-config-options.html) Pengembang *Amazon CloudFront *.  
+  Untuk detail API, lihat [ListDistributionTenants](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-distribution-tenants.html)di *Referensi AWS CLI Perintah*. 

### `list-distributions-by-connection-mode`
<a name="cloudfront_ListDistributionsByConnectionMode_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-distributions-by-connection-mode`.

**AWS CLI**  
**Untuk daftar CloudFront distribusi dengan mode koneksi**  
`list-distributions-by-connection-mode`Contoh berikut mencantumkan CloudFront distribusi dengan mode koneksi yang ditentukan.  

```
aws cloudfront list-distributions-by-connection-mode \
    --connection-mode tenant-only
```
Output:  

```
{
    "DistributionList": {
        "Items": [
            {
                "Id": "E1XNX8R2GOAABC",
                "ARN": "arn:aws:cloudfront::123456789012:distribution/E1XNX8R2GOAABC",
                "ETag": "EPT4JPJQDY1ABC",
                "Status": "Deployed",
                "LastModifiedTime": "2025-05-23T16:16:15.691000+00:00",
                "DomainName": "-",
                "Aliases": {
                    "Quantity": 0
                },
                "Origins": {
                    "Quantity": 1,
                    "Items": [
                        {
                            "Id": "example-cfn-simple-distribution123",
                            "DomainName": "example.com",
                            "OriginPath": "",
                            "CustomHeaders": {
                                "Quantity": 0
                            },
                            "S3OriginConfig": {
                                "OriginAccessIdentity": ""
                            },
                            "ConnectionAttempts": 3,
                            "ConnectionTimeout": 10,
                            "OriginShield": {
                                "Enabled": false
                            },
                            "OriginAccessControlId": "E2CJRMB5LKEABC"
                        }
                    ]
                },
                "OriginGroups": {
                    "Quantity": 0
                },
                "DefaultCacheBehavior": {
                    "TargetOriginId": "example-cfn-simple-distribution123",
                    "TrustedKeyGroups": {
                        "Enabled": false,
                        "Quantity": 0
                    },
                    "ViewerProtocolPolicy": "allow-all",
                    "AllowedMethods": {
                        "Quantity": 2,
                        "Items": [
                            "HEAD",
                            "GET"
                        ],
                        "CachedMethods": {
                            "Quantity": 2,
                            "Items": [
                                "HEAD",
                                "GET"
                            ]
                        }
                    },
                    "Compress": true,
                    "LambdaFunctionAssociations": {
                        "Quantity": 0
                    },
                    "FunctionAssociations": {
                        "Quantity": 0
                    },
                    "FieldLevelEncryptionId": "",
                    "CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e5abc",
                    "GrpcConfig": {
                        "Enabled": false
                    }
                },
                "CacheBehaviors": {
                    "Quantity": 0
                },
                "CustomErrorResponses": {
                    "Quantity": 0
                },
                "Comment": "",
                "PriceClass": "PriceClass_All",
                "Enabled": true,
                "ViewerCertificate": {
                    "CloudFrontDefaultCertificate": false,
                    "ACMCertificateArn": "arn:aws:acm:us-east-1:123456789012:certificate/ec53f564-ea5a-4e4a-a0a2-e3c989449abc",
                    "SSLSupportMethod": "sni-only",
                    "MinimumProtocolVersion": "TLSv1.2_2021",
                    "Certificate": "arn:aws:acm:us-east-1:123456789012:certificate/ec53f564-ea5a-4e4a-a0a2-e3c989449abc",
                    "CertificateSource": "acm"
                },
                "Restrictions": {
                    "GeoRestriction": {
                        "RestrictionType": "none",
                        "Quantity": 0
                    }
                },
                "WebACLId": "arn:aws:wafv2:us-east-1:123456789012:global/webacl/web-global-example/626900da-5f64-418b-ba9b-743f3746cabc",
                "HttpVersion": "http2",
                "IsIPV6Enabled": false,
                "Staging": false,
                "ConnectionMode": "tenant-only"
            }
        ]
    }
}
```
Untuk informasi selengkapnya, lihat [Membuat grup sambungan kustom (opsional)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-connection-group.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [ListDistributionsByConnectionMode](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-distributions-by-connection-mode.html)di *Referensi AWS CLI Perintah*. 

### `list-distributions`
<a name="cloudfront_ListDistributions_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-distributions`.

**AWS CLI**  
**Untuk daftar CloudFront distribusi**  
Contoh berikut mendapatkan daftar CloudFront distribusi di AWS akun Anda.  

```
aws cloudfront list-distributions
```
Output:  

```
{
    "DistributionList": {
        "Items": [
            {
                "Id": "E23YS8OEXAMPLE",
                "ARN": "arn:aws:cloudfront::123456789012:distribution/E23YS8OEXAMPLE",
                "Status": "Deployed",
                "LastModifiedTime": "2024-08-05T18:23:40.375000+00:00",
                "DomainName": "abcdefgh12ijk.cloudfront.net",
                "Aliases": {
                    "Quantity": 0
                },
                "Origins": {
                    "Quantity": 1,
                    "Items": [
                        {
                            "Id": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                            "DomainName": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                            "OriginPath": "",
                            "CustomHeaders": {
                                "Quantity": 0
                            },
                            "S3OriginConfig": {
                                "OriginAccessIdentity": ""
                            },
                            "ConnectionAttempts": 3,
                            "ConnectionTimeout": 10,
                            "OriginShield": {
                                "Enabled": false
                            },
                            "OriginAccessControlId": "EIAP8PEXAMPLE"
                        }
                    ]
                },
                "OriginGroups": {
                    "Quantity": 0
                },
                "DefaultCacheBehavior": {
                    "TargetOriginId": "amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com",
                    "TrustedSigners": {
                        "Enabled": false,
                        "Quantity": 0
                    },
                    "TrustedKeyGroups": {
                        "Enabled": false,
                        "Quantity": 0
                    },
                    "ViewerProtocolPolicy": "allow-all",
                    "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-7e886EXAMPLE"
                },
                "CacheBehaviors": {
                    "Quantity": 0
                },
                "CustomErrorResponses": {
                    "Quantity": 0
                },
                "Comment": "",
                "PriceClass": "PriceClass_All",
                "Enabled": true,
                "ViewerCertificate": {
                    "CloudFrontDefaultCertificate": true,
                    "SSLSupportMethod": "vip",
                    "MinimumProtocolVersion": "TLSv1",
                    "CertificateSource": "cloudfront"
                },
                "Restrictions": {
                    "GeoRestriction": {
                        "RestrictionType": "none",
                        "Quantity": 0
                    }
                },
                "WebACLId": "",
                "HttpVersion": "HTTP2",
                "IsIPV6Enabled": true,
                "Staging": false
            }
        ]
    }
}
```
+  Untuk detail API, lihat [ListDistributions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-distributions.html)di *Referensi AWS CLI Perintah*. 

### `list-domain-conflicts`
<a name="cloudfront_ListDomainConflicts_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-domain-conflicts`.

**AWS CLI**  
**Untuk mencantumkan konflik domain untuk CloudFront distribusi**  
`list-domain-conflicts`Contoh berikut mencantumkan konflik domain untuk CloudFront distribusi.  

```
aws cloudfront list-domain-conflicts \
    --domain example.com \
    --domain-control-validation-resource "DistributionTenantId=dt_2x9GhoK0TZRsohWzv1b9It8J1AB"
```
Output:  

```
{
    "DomainConflicts": [
        {
            "Domain": "example.com",
            "ResourceType": "distribution-tenant",
            "ResourceId": "***************ohWzv1b9It8J1AB",
            "AccountId": "123456789012"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Memindahkan nama domain alternatif ke distribusi lain](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/alternate-domain-names-move.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [ListDomainConflicts](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-domain-conflicts.html)di *Referensi AWS CLI Perintah*. 

### `list-field-level-encryption-configs`
<a name="cloudfront_ListFieldLevelEncryptionConfigs_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-field-level-encryption-configs`.

**AWS CLI**  
**Untuk membuat daftar konfigurasi CloudFront enkripsi tingkat lapangan**  
Contoh berikut mendapatkan daftar konfigurasi enkripsi CloudFront tingkat bidang di akun Anda: AWS   

```
aws cloudfront list-field-level-encryption-configs
```
Output:  

```
{
    "FieldLevelEncryptionList": {
        "MaxItems": 100,
        "Quantity": 1,
        "Items": [
            {
                "Id": "C3KM2WVD605UAY",
                "LastModifiedTime": "2019-12-10T21:30:18.974Z",
                "Comment": "Example FLE configuration",
                "QueryArgProfileConfig": {
                    "ForwardWhenQueryArgProfileIsUnknown": true,
                    "QueryArgProfiles": {
                        "Quantity": 0,
                        "Items": []
                    }
                },
                "ContentTypeProfileConfig": {
                    "ForwardWhenContentTypeIsUnknown": true,
                    "ContentTypeProfiles": {
                        "Quantity": 1,
                        "Items": [
                            {
                                "Format": "URLEncoded",
                                "ProfileId": "P280MFCLSYOCVU",
                                "ContentType": "application/x-www-form-urlencoded"
                            }
                        ]
                    }
                }
            }
        ]
    }
}
```
+  Untuk detail API, lihat [ListFieldLevelEncryptionConfigs](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-field-level-encryption-configs.html)di *Referensi AWS CLI Perintah*. 

### `list-field-level-encryption-profiles`
<a name="cloudfront_ListFieldLevelEncryptionProfiles_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-field-level-encryption-profiles`.

**AWS CLI**  
**Untuk membuat daftar profil CloudFront enkripsi tingkat lapangan**  
Contoh berikut mendapatkan daftar profil enkripsi CloudFront tingkat bidang di akun Anda: AWS   

```
aws cloudfront list-field-level-encryption-profiles
```
Output:  

```
{
    "FieldLevelEncryptionProfileList": {
        "MaxItems": 100,
        "Quantity": 2,
        "Items": [
            {
                "Id": "P280MFCLSYOCVU",
                "LastModifiedTime": "2019-12-05T01:05:39.896Z",
                "Name": "ExampleFLEProfile",
                "EncryptionEntities": {
                    "Quantity": 1,
                    "Items": [
                        {
                            "PublicKeyId": "K2K8NC4HVFE3M0",
                            "ProviderId": "ExampleFLEProvider",
                            "FieldPatterns": {
                                "Quantity": 1,
                                "Items": [
                                    "ExampleSensitiveField"
                                ]
                            }
                        }
                    ]
                },
                "Comment": "FLE profile for AWS CLI example"
            },
            {
                "Id": "PPK0UOSIF5WSV",
                "LastModifiedTime": "2019-12-10T01:03:16.537Z",
                "Name": "ExampleFLEProfile2",
                "EncryptionEntities": {
                    "Quantity": 1,
                    "Items": [
                        {
                            "PublicKeyId": "K2ABC10EXAMPLE",
                            "ProviderId": "ExampleFLEProvider2",
                            "FieldPatterns": {
                                "Quantity": 1,
                                "Items": [
                                    "ExampleSensitiveField2"
                                ]
                            }
                        }
                    ]
                },
                "Comment": "FLE profile #2 for AWS CLI example"
            }
        ]
    }
}
```
+  Untuk detail API, lihat [ListFieldLevelEncryptionProfiles](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-field-level-encryption-profiles.html)di *Referensi AWS CLI Perintah*. 

### `list-invalidations-for-distribution-tenant`
<a name="cloudfront_ListInvalidationsForDistributionTenant_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-invalidations-for-distribution-tenant`.

**AWS CLI**  
**Untuk daftar pembatalan untuk penyewa distribusi CloudFront **  
`list-invalidations-for-distribution-tenant`Contoh berikut mencantumkan pembatalan untuk penyewa distribusi. CloudFront   

```
aws cloudfront list-invalidations-for-distribution-tenant \
    --id dt_2wjDZi3hD1ivOXf6rpZJOSNE1AB
```
Output:  

```
{
    "InvalidationList": {
        "Items": [
            {
                "Id": "I4CU23QAPKMUDUU06F9OFGFABC",
                "CreateTime": "2025-05-06T15:46:12.824000+00:00",
                "Status": "Completed"
            }
        ]
    }
}
```
Untuk informasi selengkapnya, lihat [Membatalkan file untuk menghapus konten](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html) di Panduan * CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [ListInvalidationsForDistributionTenant](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-invalidations-for-distribution-tenant.html)di *Referensi AWS CLI Perintah*. 

### `list-invalidations`
<a name="cloudfront_ListInvalidations_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-invalidations`.

**AWS CLI**  
**Untuk daftar CloudFront pembatalan**  
Contoh berikut mendapatkan daftar pembatalan untuk CloudFront distribusi dengan ID: `EDFDVBD6EXAMPLE`  

```
aws cloudfront list-invalidations --distribution-id EDFDVBD6EXAMPLE
```
Output:  

```
{
    "InvalidationList": {
        "Marker": "",
        "Items": [
            {
                "Status": "Completed",
                "Id": "YNY2LI2BVJ4NJU",
                "CreateTime": "2019-08-31T21:15:52.042Z"
            }
        ],
        "IsTruncated": false,
        "MaxItems": 100,
        "Quantity": 1
    }
}
```
+  Untuk detail API, lihat [ListInvalidations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-invalidations.html)di *Referensi AWS CLI Perintah*. 

### `list-public-keys`
<a name="cloudfront_ListPublicKeys_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-public-keys`.

**AWS CLI**  
**Untuk daftar kunci CloudFront publik**  
Contoh berikut mendapatkan daftar kunci CloudFront publik di AWS akun Anda:  

```
aws cloudfront list-public-keys
```
Output:  

```
{
    "PublicKeyList": {
        "MaxItems": 100,
        "Quantity": 2,
        "Items": [
            {
                "Id": "K2K8NC4HVFE3M0",
                "Name": "ExampleKey",
                "CreatedTime": "2019-12-05T01:04:28.818Z",
                "EncodedKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxPMbCA2Ks0lnd7IR+3pw\nwd3H/7jPGwj8bLUmore7bX+oeGpZ6QmLAe/1UOWcmZX2u70dYcSIzB1ofZtcn4cJ\nenHBAzO3ohBY/L1tQGJfS2A+omnN6H16VZE1JCK8XSJyfze7MDLcUyHZETdxuvRb\nA9X343/vMAuQPnhinFJ8Wdy8YBXSPpy7r95ylUQd9LfYTBzVZYG2tSesplcOkjM3\n2Uu+oMWxQAw1NINnSLPinMVsutJy6ZqlV3McWNWe4T+STGtWhrPNqJEn45sIcCx4\nq+kGZ2NQ0FyIyT2eiLKOX5Rgb/a36E/aMk4VoDsaenBQgG7WLTnstb9sr7MIhS6A\nrwIDAQAB\n-----END PUBLIC KEY-----\n",
                "Comment": "example public key"
            },
            {
                "Id": "K1S0LWQ2L5HTBU",
                "Name": "ExampleKey2",
                "CreatedTime": "2019-12-09T23:28:11.110Z",
                "EncodedKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApOCAg88A8+f4dujn9Izt\n26LxtgAkn2opGgo/NKpMiaisyw5qlg3f1gol7FV6pYNl78iJg3EO8JBbwtlH+cR9\nLGSf60NDeVhm76Oc39Np/vWgOdsGQcRbi9WmKZeSODqjQGzVZWqPmito3FzWVk6b\nfVY5N36U/RdbVAJm95Km+qaMYlbIdF40t72bi3IkKYV5hlB2XoDjlQ9F6ajQKyTB\nMHa3SN8q+3ZjQ4sJJ7D1V6r4wR8jDcFVD5NckWJmmgIVnkOQM37NYeoDnkaOuTpu\nha/+3b8tOb2z3LBVHPkp85zJRAOXacSwf5rZtPYKBNFsixTa2n55k2r218mOkMC4\nUwIDAQAB\n-----END PUBLIC KEY-----",
                "Comment": "example public key #2"
            }
        ]
    }
}
```
+  Untuk detail API, lihat [ListPublicKeys](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-public-keys.html)di *Referensi AWS CLI Perintah*. 

### `list-tags-for-resource`
<a name="cloudfront_ListTagsForResource_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`list-tags-for-resource`.

**AWS CLI**  
**Untuk daftar tag untuk CloudFront distribusi**  
Contoh berikut mendapat daftar tag untuk CloudFront distribusi:  

```
aws cloudfront list-tags-for-resource \
    --resource arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE
```
Output:  

```
{
    "Tags": {
        "Items": [
            {
                "Key": "DateCreated",
                "Value": "2019-12-04"
            },
            {
                "Key": "Name",
                "Value": "Example name"
            },
            {
                "Key": "Project",
                "Value": "Example project"
            }
        ]
    }
}
```
+  Untuk detail API, lihat [ListTagsForResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/list-tags-for-resource.html)di *Referensi AWS CLI Perintah*. 

### `sign`
<a name="cloudfront_Sign_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`sign`.

**AWS CLI**  
**Untuk menandatangani CloudFront URL**  
Contoh berikut menandatangani CloudFront URL. Untuk menandatangani URL, Anda memerlukan ID key pair (disebut **ID Kunci Akses** di Konsol AWS Manajemen) dan kunci pribadi dari CloudFront key pair penandatangan tepercaya. Untuk informasi selengkapnya tentang ditandatangani URLs, lihat [Menyajikan Konten Pribadi dengan Cookie yang Ditandatangani URLs dan Ditandatangani](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) di *Panduan CloudFront Pengembang Amazon*.  

```
aws cloudfront sign \
    --url https://d111111abcdef8.cloudfront.net/private-content/private-file.html \
    --key-pair-id APKAEIBAERJR2EXAMPLE \
    --private-key file://cf-signer-priv-key.pem \
    --date-less-than 2020-01-01
```
Output:  

```
https://d111111abcdef8.cloudfront.net/private-content/private-file.html?Expires=1577836800&Signature=nEXK7Kby47XKeZQKVc6pwkif6oZc-JWSpDkH0UH7EBGGqvgurkecCbgL5VfUAXyLQuJxFwRQWscz-owcq9KpmewCXrXQbPaJZNi9XSNwf4YKurPDQYaRQawKoeenH0GFteRf9ELK-Bs3nljTLjtbgzIUt7QJNKXcWr8AuUYikzGdJ4-qzx6WnxXfH~fxg4-GGl6l2kgCpXUB6Jx6K~Y3kpVOdzUPOIqFLHAnJojbhxqrVejomZZ2XrquDvNUCCIbePGnR3d24UPaLXG4FKOqNEaWDIBXu7jUUPwOyQCvpt-GNvjRJxqWf93uMobeMOiVYahb-e0KItiQewGcm0eLZQ__&Key-Pair-Id=APKAEIBAERJR2EXAMPLE
```
+  Untuk detail API, lihat *Referensi AWS CLI Perintah* [Masuk](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/sign.html). 

### `tag-resource`
<a name="cloudfront_TagResource_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`tag-resource`.

**AWS CLI**  
**Untuk menandai CloudFront distribusi**  
`tag-resource`Contoh berikut menambahkan dua tag ke CloudFront distribusi yang ditentukan.  

```
aws cloudfront tag-resource \
    --resource arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE \
    --tags 'Items=[{Key=Name,Value="Example name"},{Key=Project,Value="Example project"}]'
```
Alih-alih menggunakan argumen baris perintah, Anda dapat memberikan tag dalam file JSON, seperti yang ditunjukkan pada contoh berikut:  

```
aws cloudfront tag-resource \
    --resource arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE \
    --tags file://tags.json
```
Isi dari `tags.json`:  

```
{
    "Items": [
        {
            "Key": "Name",
            "Value": "Example name"
        },
        {
            "Key": "Project",
            "Value": "Example project"
        }
    ]
}
```
Perintah ini tidak menghasilkan output.  
+  Untuk detail API, lihat [TagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/tag-resource.html)di *Referensi AWS CLI Perintah*. 

### `untag-resource`
<a name="cloudfront_UntagResource_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`untag-resource`.

**AWS CLI**  
**Untuk menghapus tag dari CloudFront distribusi**  
Contoh berikut menghapus dua tag dari CloudFront distribusi dengan menggunakan argumen baris perintah:  

```
aws cloudfront untag-resource \
    --resource arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE \
    --tag-keys Items=Name,Project
```
Alih-alih menggunakan argumen baris perintah, Anda dapat memberikan kunci tag dalam file JSON, seperti yang ditunjukkan pada contoh berikut:  

```
aws cloudfront untag-resource \
    --resource arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE \
    --tag-keys file://tag-keys.json
```
File tersebut `tag-keys.json` adalah dokumen JSON di folder saat ini yang berisi berikut ini:  

```
{
    "Items": [
        "Name",
        "Project"
    ]
}
```
Ketika berhasil, perintah ini tidak memiliki output.  
+  Untuk detail API, lihat [UntagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/untag-resource.html)di *Referensi AWS CLI Perintah*. 

### `update-cloud-front-origin-access-identity`
<a name="cloudfront_UpdateCloudFrontOriginAccessIdentity_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-cloud-front-origin-access-identity`.

**AWS CLI**  
**Untuk memperbarui identitas akses CloudFront asal**  
Contoh berikut memperbarui identitas akses asal (OAI) dengan ID`E74FTE3AEXAMPLE`. Satu-satunya bidang yang dapat Anda perbarui adalah OAI. `Comment`  
Untuk memperbarui OAI, Anda harus memiliki ID OAI dan. `ETag` ID OAI dikembalikan dalam output perintah -access-identity dan create-cloud-front-origin -access-identities. list-cloud-front-origin Untuk mendapatkan`ETag`, gunakan perintah get-cloud-front-origin -access-identity atau get-cloud-front-origin -. access-identity-config Gunakan `--if-match` opsi untuk menyediakan OAI. `ETag`  

```
aws cloudfront update-cloud-front-origin-access-identity \
    --id E74FTE3AEXAMPLE \
    --if-match E2QWRUHEXAMPLE \
    --cloud-front-origin-access-identity-config \
        CallerReference=cli-example,Comment="Example OAI Updated"
```
Anda dapat mencapai hal yang sama dengan menyediakan konfigurasi OAI dalam file JSON, seperti yang ditunjukkan pada contoh berikut:  

```
aws cloudfront update-cloud-front-origin-access-identity \
    --id E74FTE3AEXAMPLE \
    --if-match E2QWRUHEXAMPLE \
    --cloud-front-origin-access-identity-config file://OAI-config.json
```
File tersebut `OAI-config.json` adalah dokumen JSON di direktori saat ini yang berisi berikut ini:  

```
{
    "CallerReference": "cli-example",
    "Comment": "Example OAI Updated"
}
```
Apakah Anda memberikan konfigurasi OAI dengan argumen baris perintah atau file JSON, outputnya sama:  

```
{
    "ETag": "E9LHASXEXAMPLE",
    "CloudFrontOriginAccessIdentity": {
        "Id": "E74FTE3AEXAMPLE",
        "S3CanonicalUserId": "cd13868f797c227fbea2830611a26fe0a21ba1b826ab4bed9b7771c9aEXAMPLE",
        "CloudFrontOriginAccessIdentityConfig": {
            "CallerReference": "cli-example",
            "Comment": "Example OAI Updated"
        }
    }
}
```
+  Untuk detail API, lihat [UpdateCloudFrontOriginAccessIdentity](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/update-cloud-front-origin-access-identity.html)di *Referensi AWS CLI Perintah*. 

### `update-connection-group`
<a name="cloudfront_UpdateConnectionGroup_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-connection-group`.

**AWS CLI**  
**Untuk memperbarui grup CloudFront koneksi**  
`update-connection-group`Contoh berikut menonaktifkan grup CloudFront koneksi dan menonaktifkan IPv6.  

```
aws cloudfront update-connection-group \
    --id cg_2yHsDkcPKeUlVkk3aEgLKcjABC \
    --no-ipv6-enabled \
    --no-enabled \
    --if-match E3UN6WX5RRO2ABC
```
Output:  

```
{
    "ETag": "E1F83G8C2ARABC",
    "ConnectionGroup": {
        "Id": "cg_2yHsDkcPKeUlVkk3aEgLKcjABC",
        "Name": "cg-example",
        "Arn": "arn:aws:cloudfront::123456789012:connection-group/cg_2yHsDkcPKeUlVkk3aEgLKcjABC",
        "CreatedTime": "2025-06-09T20:58:35.481000+00:00",
        "LastModifiedTime": "2025-06-11T16:25:54.280000+00:00",
        "Ipv6Enabled": false,
        "RoutingEndpoint": "du9xp1elo1abc.cloudfront.net",
        "Status": "InProgress",
        "Enabled": false,
        "IsDefault": false
    }
}
```
Untuk informasi selengkapnya, lihat [Membuat grup sambungan kustom (opsional)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-connection-group.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [UpdateConnectionGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/update-connection-group.html)di *Referensi AWS CLI Perintah*. 

### `update-distribution-tenant`
<a name="cloudfront_UpdateDistributionTenant_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-distribution-tenant`.

**AWS CLI**  
**Untuk memperbarui penyewa CloudFront distribusi**  
`update-distribution-tenant`Contoh berikut memperbarui penyewa CloudFront distribusi dengan nilai parameter baru dan menambahkan negara ke pembatasan geografis.  

```
aws cloudfront update-distribution-tenant \
    --cli-input-json file://update-tenant.json
```
Isi dari `update-tenant.json`:  

```
{
    "Id": "dt_2yMvQgam3QkJo2z54FDl91dk1AB",
    "IfMatch": "E1F83G8C2ARABC",
    "Parameters": [
        {
            "Name": "testParam",
            "Value": "newParameterValue"
        }
    ],
    "Customizations": {
        "WebAcl": {
            "Action": "disable"
        },
        "GeoRestrictions": {
            "RestrictionType": "whitelist",
            "Locations": [
                "DE",
                "GB",
                "ES"
            ]
        }
    }
}
```
Output:  

```
{
    "ETag": "E1PA6795UKMABC",
    "DistributionTenant": {
        "Id": "dt_2yMvQgam3QkJo2z54FDl91dk1AB",
        "DistributionId": "E1XNX8R2GOAABC",
        "Name": "new-tenant-customizations",
        "Arn": "arn:aws:cloudfront::123456789012:distribution-tenant/dt_2yMvQgam3QkJo2z54FDl91dk1AB",
        "Domains": [
            {
                "Domain": "example.com",
                "Status": "active"
            }
        ],
        "Customizations": {
            "WebAcl": {
                "Action": "disable"
            },
            "GeoRestrictions": {
                "RestrictionType": "whitelist",
                "Locations": [
                    "DE",
                    "ES",
                    "GB"
                ]
            }
        },
        "Parameters": [
            {
                "Name": "testParam",
                "Value": "newParameterValue"
            }
        ],
        "ConnectionGroupId": "cg_2whCJoXMYCjHcxaLGrkllvyABC",
        "CreatedTime": "2025-06-11T15:54:02.142000+00:00",
        "LastModifiedTime": "2025-06-11T16:42:45.531000+00:00",
        "Enabled": false,
        "Status": "InProgress"
    }
}
```
Untuk informasi selengkapnya, lihat [Kustomisasi penyewa distribusi di Panduan](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/tenant-customization.html) Pengembang *Amazon CloudFront *.  
+  Untuk detail API, lihat [UpdateDistributionTenant](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/update-distribution-tenant.html)di *Referensi AWS CLI Perintah*. 

### `update-distribution`
<a name="cloudfront_UpdateDistribution_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-distribution`.

**AWS CLI**  
**Contoh 1: Untuk memperbarui objek root default CloudFront distribusi**  
Contoh berikut memperbarui objek root default `index.html` untuk CloudFront distribusi dengan 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
        }
    }
}
```
**Contoh 2: Untuk memperbarui CloudFront distribusi**  
Contoh berikut menonaktifkan CloudFront distribusi dengan ID `EMLARXS9EXAMPLE` dengan menyediakan konfigurasi distribusi dalam file JSON bernama. `dist-config-disable.json` Untuk memperbarui distribusi, Anda harus menggunakan `--if-match` opsi untuk menyediakan distribusi`ETag`. Untuk mendapatkan`ETag`, gunakan get-distribusi atau get-distribution-config perintah. Perhatikan bahwa `Enabled` bidang diatur ke `false` dalam file JSON.  
Setelah Anda menggunakan contoh berikut untuk menonaktifkan distribusi, Anda dapat menggunakan perintah hapus-distribusi untuk menghapusnya.  

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

```
{
    "CallerReference": "cli-1574382155-496510",
    "Aliases": {
        "Quantity": 0
    },
    "DefaultRootObject": "index.html",
    "Origins": {
        "Quantity": 1,
        "Items": [
            {
                "Id": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.com-1574382155-273939",
                "DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
                "OriginPath": "",
                "CustomHeaders": {
                    "Quantity": 0
                },
                "S3OriginConfig": {
                    "OriginAccessIdentity": ""
                }
            }
        ]
    },
    "OriginGroups": {
        "Quantity": 0
    },
    "DefaultCacheBehavior": {
        "TargetOriginId": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.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": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.com-1574382155-273939",
                        "DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
                        "OriginPath": "",
                        "CustomHeaders": {
                            "Quantity": 0
                        },
                        "S3OriginConfig": {
                            "OriginAccessIdentity": ""
                        }
                    }
                ]
            },
            "OriginGroups": {
                "Quantity": 0
            },
            "DefaultCacheBehavior": {
                "TargetOriginId": "amzn-s3-demo-bucket---s3.amazonaws.com.rproxy.goskope.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
        }
    }
}
```
+  Untuk detail API, lihat [UpdateDistribution](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/update-distribution.html)di *Referensi AWS CLI Perintah*. 

### `update-domain-association`
<a name="cloudfront_UpdateDomainAssociation_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-domain-association`.

**AWS CLI**  
**Untuk memperbarui asosiasi domain**  
`update-domain-association`Contoh berikut memperbarui asosiasi domain untuk penyewa distribusi dengan ETag `E23ZP02F085ABC`.  

```
aws cloudfront update-domain-association \
    --domain example.com \
    --target-resource DistributionTenantId=dt_2x9GhoK0TZRsohWzv1b9It8J1AB \
    --if-match E23ZP02F085ABC
```
Output:  

```
{
    "ETag": "ETVPDKIKX0ABC",
    "Domain": "example.com",
    "ResourceId": "dt_2x9GhoK0TZRsohWzv1b9It8J1AB"
}
```
Untuk informasi selengkapnya, lihat [Memindahkan nama domain alternatif ke distribusi lain](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/alternate-domain-names-move.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [UpdateDomainAssociation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/update-domain-association.html)di *Referensi AWS CLI Perintah*. 

### `update-field-level-encryption-config`
<a name="cloudfront_UpdateFieldLevelEncryptionConfig_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-field-level-encryption-config`.

**AWS CLI**  
**Untuk memperbarui konfigurasi CloudFront enkripsi tingkat lapangan**  
Contoh berikut memperbarui `Comment` bidang konfigurasi enkripsi tingkat lapangan dengan ID `C3KM2WVD605UAY` dengan menyediakan parameter dalam file JSON.  
Untuk memperbarui konfigurasi enkripsi tingkat lapangan, Anda harus memiliki ID konfigurasi dan. `ETag` ID dikembalikan dalam output perintah create-field-level-encryption -config dan list-field-level-encryption -configs. Untuk mendapatkan`ETag`, gunakan perintah get-field-level-encryption or get-field-level-encryption -config. Gunakan `--if-match` opsi untuk menyediakan konfigurasi`ETag`.  

```
aws cloudfront update-field-level-encryption-config \
    --id C3KM2WVD605UAY \
    --if-match E2P4Z4VU7TY5SG \
    --field-level-encryption-config file://fle-config.json
```
File tersebut `fle-config.json` adalah dokumen JSON di direktori saat ini yang berisi berikut ini:  

```
{
    "CallerReference": "cli-example",
    "Comment": "Updated example FLE configuration",
    "QueryArgProfileConfig": {
        "ForwardWhenQueryArgProfileIsUnknown": true,
        "QueryArgProfiles": {
            "Quantity": 0
        }
    },
    "ContentTypeProfileConfig": {
        "ForwardWhenContentTypeIsUnknown": true,
        "ContentTypeProfiles": {
            "Quantity": 1,
            "Items": [
                {
                    "Format": "URLEncoded",
                    "ProfileId": "P280MFCLSYOCVU",
                    "ContentType": "application/x-www-form-urlencoded"
                }
            ]
        }
    }
}
```
Output:  

```
{
    "ETag": "E26M4BIAV81ZF6",
    "FieldLevelEncryption": {
        "Id": "C3KM2WVD605UAY",
        "LastModifiedTime": "2019-12-10T22:26:26.170Z",
        "FieldLevelEncryptionConfig": {
            "CallerReference": "cli-example",
            "Comment": "Updated example FLE configuration",
            "QueryArgProfileConfig": {
                "ForwardWhenQueryArgProfileIsUnknown": true,
                "QueryArgProfiles": {
                    "Quantity": 0,
                    "Items": []
                }
            },
            "ContentTypeProfileConfig": {
                "ForwardWhenContentTypeIsUnknown": true,
                "ContentTypeProfiles": {
                    "Quantity": 1,
                    "Items": [
                        {
                            "Format": "URLEncoded",
                            "ProfileId": "P280MFCLSYOCVU",
                            "ContentType": "application/x-www-form-urlencoded"
                        }
                    ]
                }
            }
        }
    }
}
```
+  Untuk detail API, lihat [UpdateFieldLevelEncryptionConfig](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/update-field-level-encryption-config.html)di *Referensi AWS CLI Perintah*. 

### `update-field-level-encryption-profile`
<a name="cloudfront_UpdateFieldLevelEncryptionProfile_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`update-field-level-encryption-profile`.

**AWS CLI**  
**Untuk memperbarui profil CloudFront enkripsi tingkat lapangan**  
Contoh berikut memperbarui profil enkripsi tingkat lapangan dengan ID. `PPK0UOSIF5WSV` Contoh ini memperbarui profil `Name` dan`Comment`, dan menambahkan `FieldPatterns` item kedua, dengan menyediakan parameter dalam file JSON.  
Untuk memperbarui profil enkripsi tingkat lapangan, Anda harus memiliki ID profil dan. `ETag` ID dikembalikan dalam output perintah create-field-level-encryption -profile dan list-field-level-encryption -profiles. Untuk mendapatkan`ETag`, gunakan perintah get-field-level-encryption -profile atau get-field-level-encryption -profile-config. Gunakan `--if-match` opsi untuk menyediakan profil`ETag`.  

```
aws cloudfront update-field-level-encryption-profile \
    --id PPK0UOSIF5WSV \
    --if-match E1QQG65FS2L2GC \
    --field-level-encryption-profile-config file://fle-profile-config.json
```
File tersebut `fle-profile-config.json` adalah dokumen JSON di direktori saat ini yang berisi berikut ini:  

```
{
    "Name": "ExampleFLEProfileUpdated",
    "CallerReference": "cli-example",
    "Comment": "Updated FLE profile for AWS CLI example",
    "EncryptionEntities": {
        "Quantity": 1,
        "Items": [
            {
                "PublicKeyId": "K2K8NC4HVFE3M0",
                "ProviderId": "ExampleFLEProvider",
                "FieldPatterns": {
                    "Quantity": 2,
                    "Items": [
                        "ExampleSensitiveField",
                        "SecondExampleSensitiveField"
                    ]
                }
            }
        ]
    }
}
```
Output:  

```
{
    "ETag": "EJETYFJ9CL66D",
    "FieldLevelEncryptionProfile": {
        "Id": "PPK0UOSIF5WSV",
        "LastModifiedTime": "2019-12-10T19:05:58.296Z",
        "FieldLevelEncryptionProfileConfig": {
            "Name": "ExampleFLEProfileUpdated",
            "CallerReference": "cli-example",
            "Comment": "Updated FLE profile for AWS CLI example",
            "EncryptionEntities": {
                "Quantity": 1,
                "Items": [
                    {
                        "PublicKeyId": "K2K8NC4HVFE3M0",
                        "ProviderId": "ExampleFLEProvider",
                        "FieldPatterns": {
                            "Quantity": 2,
                            "Items": [
                                "ExampleSensitiveField",
                                "SecondExampleSensitiveField"
                            ]
                        }
                    }
                ]
            }
        }
    }
}
```
+  Untuk detail API, lihat [UpdateFieldLevelEncryptionProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/update-field-level-encryption-profile.html)di *Referensi AWS CLI Perintah*. 

### `verify-dns-configuration`
<a name="cloudfront_VerifyDnsConfiguration_cli_2_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`verify-dns-configuration`.

**AWS CLI**  
**Untuk memverifikasi konfigurasi DNS untuk domain**  
`verify-dns-configuration`Contoh berikut memverifikasi konfigurasi DNS untuk domain.  

```
aws cloudfront verify-dns-configuration \
    --domain example.com \
    --identifier dt_2x9GhoK0TZRsohWzv1b9It8J1AB
```
Output:  

```
{
    "DnsConfigurationList": [
        {
            "Domain": "example.com",
            "Status": "valid-configuration"
        }
    ]
}
```
Untuk informasi selengkapnya, lihat [Memindahkan nama domain alternatif ke distribusi lain](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/alternate-domain-names-move.html) di *Panduan CloudFront Pengembang Amazon*.  
+  Untuk detail API, lihat [VerifyDnsConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudfront/verify-dns-configuration.html)di *Referensi AWS CLI Perintah*. 