

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.

# Contoh kode untuk CloudFront menggunakan AWS SDKs
<a name="cloudfront_code_examples"></a>

Contoh kode berikut menunjukkan cara menggunakan Amazon CloudFront dengan kit pengembangan AWS perangkat lunak (SDK).

*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.

*Skenario* adalah contoh kode yang menunjukkan kepada Anda bagaimana menyelesaikan tugas tertentu dengan memanggil beberapa fungsi dalam layanan atau dikombinasikan dengan yang lain Layanan AWS.

**Sumber daya lainnya**
+  **[ CloudFront Panduan Pengembang](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html)** - Informasi lebih lanjut tentang CloudFront.
+ **[CloudFront Referensi API](https://docs.aws.amazon.com/cloudfront/latest/APIReference/Welcome.html)** — Detail tentang semua CloudFront tindakan yang tersedia.
+ **[AWS Pusat Pengembang](https://aws.amazon.com/developer/code-examples/?awsf.sdk-code-examples-product=product%23cloudfront)** - Contoh kode yang dapat Anda filter berdasarkan kategori atau pencarian teks lengkap.
+ **[AWS Contoh SDK](https://github.com/awsdocs/aws-doc-sdk-examples)** — GitHub repo dengan kode lengkap dalam bahasa pilihan. Termasuk instruksi untuk mengatur dan menjalankan kode.

**Contents**
+ [Hal-hal mendasar](cloudfront_code_examples_basics.md)
  + [Tindakan](cloudfront_code_examples_actions.md)
    + [`CreateDistribution`](cloudfront_example_cloudfront_CreateDistribution_section.md)
    + [`CreateFunction`](cloudfront_example_cloudfront_CreateFunction_section.md)
    + [`CreateInvalidation`](cloudfront_example_cloudfront_CreateInvalidation_section.md)
    + [`CreateKeyGroup`](cloudfront_example_cloudfront_CreateKeyGroup_section.md)
    + [`CreatePublicKey`](cloudfront_example_cloudfront_CreatePublicKey_section.md)
    + [`DeleteDistribution`](cloudfront_example_cloudfront_DeleteDistribution_section.md)
    + [`GetCloudFrontOriginAccessIdentity`](cloudfront_example_cloudfront_GetCloudFrontOriginAccessIdentity_section.md)
    + [`GetCloudFrontOriginAccessIdentityConfig`](cloudfront_example_cloudfront_GetCloudFrontOriginAccessIdentityConfig_section.md)
    + [`GetDistribution`](cloudfront_example_cloudfront_GetDistribution_section.md)
    + [`GetDistributionConfig`](cloudfront_example_cloudfront_GetDistributionConfig_section.md)
    + [`ListCloudFrontOriginAccessIdentities`](cloudfront_example_cloudfront_ListCloudFrontOriginAccessIdentities_section.md)
    + [`ListDistributions`](cloudfront_example_cloudfront_ListDistributions_section.md)
    + [`UpdateDistribution`](cloudfront_example_cloudfront_UpdateDistribution_section.md)
+ [Skenario](cloudfront_code_examples_scenarios.md)
  + [Buat penyewa distribusi dan distribusi multi-tenant](cloudfront_example_cloudfront_CreateSaasResources_section.md)
  + [Hapus sumber penandatanganan](cloudfront_example_cloudfront_DeleteSigningResources_section.md)
  + [Memulai dengan CloudFront](cloudfront_example_cloudfront_GettingStarted_section.md)
  + [Tanda tangan URLs dan cookie](cloudfront_example_cloudfront_CloudFrontUtilities_section.md)
+ [CloudFront Contoh fungsi](cloudfront_code_examples_cloudfront_functions_examples.md)
  + [Tambahkan header keamanan HTTP](cloudfront_example_cloudfront_functions_add_security_headers_section.md)
  + [Tambahkan header CORS](cloudfront_example_cloudfront_functions_add_cors_header_section.md)
  + [Tambahkan header kontrol cache](cloudfront_example_cloudfront_functions_add_cache_control_header_section.md)
  + [Tambahkan header IP klien yang benar](cloudfront_example_cloudfront_functions_add_true_client_ip_header_section.md)
  + [Tambahkan header asal](cloudfront_example_cloudfront_functions_add_origin_header_section.md)
  + [Tambahkan index.html untuk meminta URLs](cloudfront_example_cloudfront_functions_url_rewrite_single_page_apps_section.md)
  + [Menormalkan parameter string kueri](cloudfront_example_cloudfront_functions_normalize_query_string_parameters_section.md)
  + [Redirect ke URL baru](cloudfront_example_cloudfront_functions_redirect_based_on_country_section.md)
  + [Menulis ulang URI permintaan](cloudfront_example_cloudfront_functions_kvs_conditional_read_section.md)
  + [Pilih asal yang lebih dekat ke penampil](cloudfront_example_cloudfront_functions_select_origin_based_on_country_section.md)
  + [Gunakan pasangan kunci-nilai](cloudfront_example_cloudfront_functions_kvs_key_value_pairs_section.md)
  + [Validasi token sederhana](cloudfront_example_cloudfront_functions_kvs_jwt_verify_section.md)