> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure Functions を使用した PlayFab CloudScript

> Azure Functions 上で動作する PlayFab CloudScript の概要。C# や JavaScript によるサーバーレス バックエンド コード、Visual Studio によるデバッグ、キューを利用した長時間実行関数を紹介します。

Azure Functions を使用した PlayFab CloudScript は、お好みの言語でオンデマンドのサーバーレス コンピューティングを実現する新機能です。この機能では Azure Functions を活用し、Visual Studio Code との緊密な統合を提供します。

PlayFab タイトルにひも付いたクラウド コードを Azure Functions で実行することで、C# や強く型付けされたコードのパワーを活用できます。さらに、CosmosDB のようなさまざまな Azure 機能も活用できます。

CloudScript の基盤を Azure Functions に置くことで、次のようないくつかの重要な改善がもたらされます。

1. [Azure Functions がサポートするその他の言語](https://learn.microsoft.com/en-us/azure/azure-functions/supported-languages) に加えて、C# や JavaScript で CloudScript を記述できます。
2. [Visual Studio](https://visualstudio.microsoft.com/) または [Visual Studio Code](https://code.visualstudio.com/) を使用して CloudScript をローカルでデバッグできます。加えて、Azure Functions を使った CloudScript の作成をより簡単にする、オープン ソースの [PlayFab 用 Visual Studio Code 拡張機能](https://github.com/PlayFab/vscode-playfab-explorer) もリリースされています。
3. 完了を非同期的に待機するため、長時間実行可能なキュー型 CloudScript 関数を記述できます。
4. Azure Function コード内での API 呼び出し回数に制限がありません。

> **注:** Azure Functions の詳細については、[Azure Functions ドキュメント](https://learn.microsoft.com/en-us/azure/azure-functions/) をご覧ください。

### Azure Functions を使用した CloudScript の種類

CloudScript の大きな新機能の 1 つは、長時間実行できる CloudScript です。これは、Azure Functions のキュー ストレージ トリガーに基づいた新しいタイプの CloudScript によって実現されます。この新しいタイプの CloudScript の登場により、CloudScript を作成するたびに使用するタイプを決定する必要があります。

各タイプの関数の利点と制限について詳しく知りたい場合は、それぞれに関する Azure ドキュメントをご覧ください。

* [HTTP トリガー型 CloudScript](https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook?tabs=csharp)

* [キュー トリガー型 CloudScript](https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue)

### 料金

この機能を使用するには、**独自の** Azure サブスクリプションを用意する **必要があります**。つまり、PlayFab との統合なしで Azure Functions を使用する場合と同様に、Azure サブスクリプションに対して利用料金が発生します。料金の詳細については、Azure のサイトの [Azure Functions の料金](https://azure.microsoft.com/pricing/details/functions/) をご覧ください。

### はじめに

Azure Functions を使用した CloudScript を始めるには、[クイックスタート ガイド](/services/playfab/live-service-management/service-gateway/automation/cloudscript-af/quickstart) を読み、[入門動画](https://youtu.be/apQbkDn1lNo) をご覧ください。


## Related topics

- [Azure Functions を使用した PlayFab CloudScript](/ja-jp/services/playfab/live-service-management/service-gateway/automation/cloudscript-af/index.md)
- [Azure Functions を利用した PlayFab CloudScript のクイックスタート ガイド](/ja-jp/services/playfab/live-service-management/service-gateway/automation/cloudscript-af/quickstart.md)
- [PlayStream および Telemetry を使用したリーダーボード](/ja-jp/services/playfab/community/leaderboards/leaderboards-with-playstream-and-telemetry.md)
- [Visual Studio Code での Azure Functions を使用した CloudScript のデバッグ](/ja-jp/services/playfab/live-service-management/service-gateway/automation/cloudscript-af/debugging-with-CloudScript-AF-VSCode.md)
- [Azure Functions を使用した CloudScript のローカル デバッグ](/ja-jp/services/playfab/live-service-management/service-gateway/automation/cloudscript-af/local-debugging-for-cloudscript-using-azure-functions.md)
