

# AWS SDK を使用した CloudFront のコードの例
<a name="service_code_examples"></a>

次のコード例は、AWS Software Development Kit (SDK) で CloudFront を使用する方法を示しています。

*アクション*はより大きなプログラムからのコードの抜粋であり、コンテキスト内で実行する必要があります。アクションは個々のサービス機能を呼び出す方法を示していますが、コンテキスト内のアクションは、関連するシナリオで確認できます。

*シナリオ*は、1 つのサービス内から、または他の AWS のサービスと組み合わせて複数の関数を呼び出し、特定のタスクを実行する方法を示すコード例です。

AWS SDK デベロッパーガイドとコード例の詳細なリストについては、「[AWS SDK での CloudFront の使用](sdk-general-information-section.md)」を参照してください。このトピックには、使用開始方法に関する情報と、以前の SDK バージョンの詳細も含まれています。

**Contents**
+ [基本](service_code_examples_basics.md)
  + [アクション](service_code_examples_actions.md)
    + [`CreateDistribution`](example_cloudfront_CreateDistribution_section.md)
    + [`CreateFunction`](example_cloudfront_CreateFunction_section.md)
    + [`CreateInvalidation`](example_cloudfront_CreateInvalidation_section.md)
    + [`CreateKeyGroup`](example_cloudfront_CreateKeyGroup_section.md)
    + [`CreatePublicKey`](example_cloudfront_CreatePublicKey_section.md)
    + [`DeleteDistribution`](example_cloudfront_DeleteDistribution_section.md)
    + [`GetCloudFrontOriginAccessIdentity`](example_cloudfront_GetCloudFrontOriginAccessIdentity_section.md)
    + [`GetCloudFrontOriginAccessIdentityConfig`](example_cloudfront_GetCloudFrontOriginAccessIdentityConfig_section.md)
    + [`GetDistribution`](example_cloudfront_GetDistribution_section.md)
    + [`GetDistributionConfig`](example_cloudfront_GetDistributionConfig_section.md)
    + [`ListCloudFrontOriginAccessIdentities`](example_cloudfront_ListCloudFrontOriginAccessIdentities_section.md)
    + [`ListDistributions`](example_cloudfront_ListDistributions_section.md)
    + [`UpdateDistribution`](example_cloudfront_UpdateDistribution_section.md)
+ [シナリオ](service_code_examples_scenarios.md)
  + [マルチテナントディストリビューションおよびディストリビューションテナントを作成する](example_cloudfront_CreateSaasResources_section.md)
  + [署名リソースを削除する](example_cloudfront_DeleteSigningResources_section.md)
  + [CloudFront の開始方法](example_cloudfront_GettingStarted_section.md)
  + [URL および cookies に署名する](example_cloudfront_CloudFrontUtilities_section.md)
+ [CloudFront Functions の例](service_code_examples_cloudfront_functions_examples.md)
  + [HTTP セキュリティヘッダーを追加する](example_cloudfront_functions_add_security_headers_section.md)
  + [CORS ヘッダーを追加する](example_cloudfront_functions_add_cors_header_section.md)
  + [キャッシュコントロールヘッダーを追加する](example_cloudfront_functions_add_cache_control_header_section.md)
  + [実際のクライアント IP ヘッダーを追加する](example_cloudfront_functions_add_true_client_ip_header_section.md)
  + [オリジンヘッダーを追加する](example_cloudfront_functions_add_origin_header_section.md)
  + [index.html をリクエスト URL に追加する](example_cloudfront_functions_url_rewrite_single_page_apps_section.md)
  + [クエリ文字列パラメータの正規化](example_cloudfront_functions_normalize_query_string_parameters_section.md)
  + [新しい URL にリダイレクトする](example_cloudfront_functions_redirect_based_on_country_section.md)
  + [リクエスト URI を書き換える](example_cloudfront_functions_kvs_conditional_read_section.md)
  + [ビューワーにより近いオリジンを選択する](example_cloudfront_functions_select_origin_based_on_country_section.md)
  + [キーと値のペアを使用する](example_cloudfront_functions_kvs_key_value_pairs_section.md)
  + [シンプルなトークンを検証する](example_cloudfront_functions_kvs_jwt_verify_section.md)