Unity Gaming Services CLI
Create and manage schedule configurations from the command line using the Unity Gaming Services command-line interface.
読み終わるまでの所要時間 1 分最終更新 23日前
Unity Gaming Services CLI を使用して、スケジュールを操作できます。CLI により、コマンドラインからスケジュール設定を管理できます。
前提条件
CLI の詳細情報については、Unity Gaming Services CLI の使用の準備ガイド のステップに従います。 このガイドに従うには、最初に以下のアクションを実行する必要があります。- UGS CLI をインストール します。
-
以下を使用して、プロジェクト ID と環境を設定します。
ugs config set project-id <your-project-id>
ugs config set environment-name <your-environment-name> - Scheduler と 環境管理 に必要なロールでサービスアカウントを設定します。詳細については、認証の取得 を参照してください。
CLI の使用
すべてのコマンドとオプションの完全なリファレンスについては、Schedules コマンドラインのドキュメント を参照してください。スケジュールのデプロイ
new-file設定ファイルのコンテンツは以下のようになります。ugs scheduler new-file <file-name>
必要に応じて、スケジュール設定を複数のファイルに分割することもできます。{ "$schema": "https://ugs-config-schemas.unity3d.com/v1/schedules.schema.json", "Configs": { "Schedule1": { "EventName": "EventType1", "Type": "recurring", "Schedule": "0 * * * *", "PayloadVersion": 1, "Payload": "{}" }, "Schedule2": { "EventName": "EventType2", "Type": "one-time", "Schedule": "2024-03-08T13:06:32.311+00:00", "PayloadVersion": 1, "Payload": "{ \"message\": \"Hello, world!\"}" } }}
{ "$schema": "https://ugs-config-schemas.unity3d.com/v1/schedules.schema.json", "Configs": { "Schedule1": { "EventName": "EventType1", "Type": "recurring", "Schedule": "0 * * * *", "PayloadVersion": 1, "Payload": "{}" } }}
{ "$schema": "https://ugs-config-schemas.unity3d.com/v1/schedules.schema.json", "Configs": { "Schedule2": { "EventName": "EventType2", "Type": "one-time", "Schedule": "2024-03-08T13:06:32.311+00:00", "PayloadVersion": 1, "Payload": "{ \"message\": \"Hello, world!\"}" } }}
Deployugs deploy <path-to-schedules-file> <path-to-schedules-file>
ugs deploy <path-to-directory>
スケジュールの取得
現在アクティブなすべてのスケジュールを一覧表示するには、以下のコマンドを実行します。ugs scheduler list
Fetchugs fetch <path>
スケジュールの削除
スケジュールを削除するには、--reconciledeployugs deploy --services scheduler <path-to-config-file> --reconcile