--- title: "シナリオの照会" slug: "devtools-sourcedeploy-scenariodetail" tags: ["SourceDeploy"] updated: 2026-09-17T09:57:53Z published: 2026-09-17T09:57:53Z canonical: "api.ncloud-docs.com/devtools-sourcedeploy-scenariodetail" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # シナリオの照会 Classic/VPC環境で利用できます。 デプロイシナリオの詳細情報を照会します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | GET | /api/v1/project/{projectId}/stage/{stageId}/scenario/{scenarioId} | ### リクエストヘッダ SourceDeploy APIで共通して使用されるヘッダの詳細は、[SourceDeployのリクエストヘッダ](/docs/ja/devtools-sourcedeploy#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)をご参照ください。 ### リクエストパスパラメータ リクエストパスパラメータの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `projectId` | String | Required | プロジェクト ID - [プロジェクトリストの照会](/docs/ja/devtools-sourcedeploy-projectlist)を参照 | | `stageId` | String | Required | デプロイステージ ID - [ステージリストの照会](/docs/ja/devtools-sourcedeploy-stagelist)を参照 | | `scenarioId` | String | Required | デプロイシナリオ ID - [シナリオリストの照会](/docs/ja/devtools-sourcedeploy-scenariolist)を参照 | ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl --location --request GET 'https://vpcsourcedeploy.apigw.ntruss.com/api/v1/project/2***/stage/3***/scenario/2***' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' ``` ## レスポンス レスポンス形式を説明します。 ### レスポンスボディ レスポンスボディの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `result` | Object | - | レスポンス結果 | | `result.project` | Object | - | プロジェクト情報 | | `result.project.id` | Number | - | プロジェクト ID | | `result.project.name` | String | - | プロジェクト名 | | `result.stage` | Object | - | デプロイステージ情報 | | `result.stage.id` | Number | - | デプロイステージ ID | | `result.stage.name` | String | - | デプロイステージ名 | | `result.id` | Number | - | デプロイシナリオ ID | | `result.name` | String | - | デプロイシナリオ名 | | `result.description` | String | - | デプロイシナリオの説明 | | `result.type` | String | - | デプロイターゲット - `Server` \| `AutoScalingGroup` \| `KubernetesService` \| `ObjectStorage` | | `result.config` | Object | - | デプロイターゲットの設定 - Server: [TScenarioServer](/docs/ja/devtools-sourcedeploy-scenariodetail#TScenarioServer)を参照 - AutoScalingGroup: [TScenarioAutoScalingGroup](/docs/ja/devtools-sourcedeploy-scenariodetail#TScenarioAutoScalingGroup)を参照 - KubernetesService: [TScenarioKubernetesService](/docs/ja/devtools-sourcedeploy-scenariodetail#TScenarioKubernetesService)を参照 - ObjectStorage: [TScenarioObjectStorage](/docs/ja/devtools-sourcedeploy-scenariodetail#TScenarioObjectStorage)を参照 | #### TScenarioServer `TScenarioServer`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `strategy` | String | - | デプロイ戦略 - `normal`: 基本 (有効値) | | `sequence` | Boolean | - | 順次デプロイかどうか - `true` \| `false` - `true`: 順次デプロイ - `false`: 同時デプロイ | | `file` | Object | - | デプロイファイル情報 | | `file.type` | String | - | デプロイファイルの保存場所 - `ObjectStorage` \| `SourceBuild` \| `later` - `ObjectStorage`: Object Storage - `SourceBuild`: SourceBuild - `later`: 後で設定 | | `file.ObjectStorage` | Object | - | Object Storage情報 - `file.type`が`ObjectStorage`の場合、下位情報を含めて表示 | | `file.ObjectStorage.bucket` | String | - | バケット名 | | `file.ObjectStorage.object` | String | - | ファイル名 | | `file.SourceBuild` | Object | - | SourceBuild情報 - `file.type`が`SourceBuild`の場合、下位情報を含めて表示 | | `file.SourceBuild.id` | Number | - | ビルドプロジェクト ID | | `file.SourceBuild.name` | String | - | ビルドプロジェクト名 | | `rollback` | Boolean | - | デプロイ失敗時、ロールバックは使用するか - `true` \| `false` - `true`: 使用 - `false`: 使用しない | | `cmd.pre` | Array | Optional | デプロイ前の実行コマンドリスト: [pre](/docs/ja/devtools-sourcedeploy-scenariodetail#pre1) | | `cmd.deploy` | Array | Optional | ファイルデプロイパスリスト: [deploy](/docs/ja/devtools-sourcedeploy-scenariodetail#deploy1) | | `cmd.post` | Array | Optional | デプロイ後の実行コマンドリスト: [post](/docs/ja/devtools-sourcedeploy-scenariodetail#post1) | #### `pre` `pre`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `user` | String | - | 実行アカウント | | `cmd` | String | - | 実行コマンド | #### `deploy` `deploy`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `sourcePath` | String | - | ソースファイルのパス | | `deployPath` | String | - | デプロイのパス | #### `post` `post`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `user` | String | - | 実行アカウント | | `cmd` | String | - | 実行コマンド | #### TScenarioAutoScalingGroup `TScenarioAutoScalingGroup`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `strategy` | String | - | デプロイ戦略 - `normal` \| `blueGreen` - `normal`: 基本 - `blueGreen`: ブルー/グリーン | | `sequence` | Boolean | - | 順次デプロイかどうか - `true` \| `false` - `true`: 順次デプロイ - `false`: 同時デプロイ | | `file` | Object | - | デプロイファイル情報 | | `file.type` | String | - | デプロイファイルの保存場所 - `ObjectStorage` \| `SourceBuild` \| `later` - `ObjectStorage`: Object Storage - `SourceBuild`: SourceBuild - `later`: 後で設定 | | `file.ObjectStorage` | Object | - | Object Storage情報 - `file.type`が`ObjectStorage`の場合、下位情報を含めて表示 | | `file.ObjectStorage.bucket` | String | - | バケット名 | | `file.ObjectStorage.object` | String | - | ファイル名 | | `file.SourceBuild` | Object | - | SourceBuild情報 - `file.type`が`SourceBuild`の場合、下位情報を含めて表示 | | `file.SourceBuild.id` | Number | - | ビルドプロジェクト ID | | `file.SourceBuild.name` | String | - | ビルドプロジェクト名 | | `rollback` | Boolean | - | デプロイ失敗時、ロールバックは使用するか - `true` \| `false` - `true`: 使用 - `false`: 使用しない | | `cmd.pre` | Array | Optional | デプロイ前の実行コマンドリスト: [pre](/docs/ja/devtools-sourcedeploy-scenariodetail#pre2) | | `cmd.deploy` | Array | Optional | ファイルデプロイパスリスト: [deploy](/docs/ja/devtools-sourcedeploy-scenariodetail#deploy2) | | `cmd.post` | Array | Optional | デプロイ後の実行コマンドリスト: [post](/docs/ja/devtools-sourcedeploy-scenariodetail#post2) | | `loadBalancer` | Object | - | ロードバランサ情報 - `strategy`が`blueGreen`の場合、下位情報を含めて表示 | | `loadBalancer.loadBalancerTargetGroupNo` | Number | - | ロードバランサ Target Group ID | | `loadBalancer.loadBalancerTargetGroupName` | String | - | ロードバランサ Target Group名 | | `loadBalancer.deleteAsg` | Boolean | - | 既存の Auto Scalingグループを削除するかどうか - `true` \| `false` - `true`: 削除・返却 - `false`: 維持 | | `loadBalancer.deleteServer` | Boolean | - | 既存の Auto Scalingグループ所属サーバを返却するかどうか - `true` \| `false` - `true`: 返却 - `false`: 維持 | #### `pre` `pre`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `user` | String | - | 実行アカウント | | `cmd` | String | - | 実行コマンド | #### `deploy` `deploy`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `sourcePath` | String | - | ソースファイルのパス | | `deployPath` | String | - | デプロイのパス | #### `post` `post`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `user` | String | - | 実行アカウント | | `cmd` | String | - | 実行コマンド | #### TScenarioKubernetesService `TScenarioKubernetesService`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `strategy` | String | - | デプロイ戦略 - `rolling` \| `blueGreen` \| `canary` - `rolling`: Rolling - `blueGreen`: ブルー/グリーン - `canary`: カナリア | | `manifest` | Object | - | マニフェスト情報 | | `manifest.type` | String | - | マニフェストファイルの保存場所 - `SourceCommit` \| `Github Enterprise Server` | | `manifest.url` | String | - | Gitリポジトリ URL - `manifest.type`が`Github Enterprise Server`で、SSH Key方式でログインした場合、表示 | | `manifest.serverUrl` | String | - | サーバ URL - `manifest.type`が`Github Enterprise Server`で、OAuthまたは Personal Access Token、Username/Password方式でログインした場合、表示 | | `result.env` | Object | - | ビルド環境情報 | | `manifest.owner` | String | - | Github Enterprise Serverの所有者 - `manifest.type`が`Github Enterprise Server`の場合、表示 | | `manifest.repository` | String | - | リポジトリ名 - `manifest.type`が`SourceCommit`の場合、表示 | | `manifest.branch` | String | - | ブランチ名 - `manifest.type`が`SourceCommit`の場合、表示 | | `manifest.path` | Array | - | ファイルの保存場所リスト | | `canaryConfig` | Object | - | カナリア分析設定 - `strategy`が`canary`の場合、下位情報を含めて表示 | | `canaryConfig.analysisType` | String | - | カナリア分析方法 - `manual` \| `auto` - `manual`: 手動 - `auto`: 自動 | | `canaryConfig.canaryCount` | Number | - | ベースライン、カナリア Pod数 | | `canaryConfig.timeout` | Number | - | タイムアウト(分) - カナリアデプロイ/キャンセル決定の最大時間 - `canaryConfig.analysisType`が`manual`の場合、表示 | | `canaryConfig.prometheus` | String | - | Prometheus Url - `canaryConfig.analysisType`が`auto`の場合、表示 | | `canaryConfig.env` | Object | - | 分析環境変数 - `canaryConfig.analysisType`が`auto`の場合、下位情報を含めて表示 | | `canaryConfig.env.baseline` | String | - | 分析環境変数: ベースライン名 | | `canaryConfig.env.canary` | String | - | 分析環境変数: カナリア名 | | `canaryConfig.metrics` | Array | - | Metric設定リスト: [metrics](/docs/ja/devtools-sourcedeploy-scenariodetail#metrics) - `canaryConfig.analysisType`が`auto`の場合、表示 | | `canaryConfig.analysisConfig` | Object | - | 分析設定 - `canaryConfig.analysisType`が`auto`の場合、下位情報を含めて表示 | | `canaryConfig.analysisConfig.duration` | Number | - | 分析時間(分) | | `canaryConfig.analysisConfig.delay` | Number | - | 分析遅延時間(分) | | `canaryConfig.analysisConfig.interval` | Number | - | 分析周期(分) | | `canaryConfig.analysisConfig.step` | Number | - | Metric収集周期(秒) | | `canaryConfig.passScore` | Number | - | 分析の成功スコア | #### `metrics` `metrics`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `name` | String | - | Metricの名前 | | `successCriteria` | String | - | 成功の基準 - `base` \| `canary` - `base`: ベースライン > カナリア - `canary`: ベースライン < Canary | | `queryType` | String | - | クエリタイプ - `default` \| `promQL` | | `weight` | Number | - | Metricの重み | | `metric` | String | - | Metricの値 - `queryType`が`default`の場合、表示 | | `filter` | String | - | Filterの値 - `queryType`が`default`の場合、表示 | | `query` | String | - | クエリ - `queryType`が`promQL`の場合、表示 | #### TScenarioObjectStorage デプロイターゲットが`ObjectStorage`の場合、`result.config`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `file` | Object | - | デプロイファイル情報 | | `file.type` | String | - | デプロイファイルの保存場所 - `ObjectStorage` \| `SourceBuild` \| `later` - `ObjectStorage`: Object Storage - `SourceBuild`: SourceBuild - `later`: 後で設定 | | `file.ObjectStorage` | Object | - | Object Storage情報 - `file.type`が`ObjectStorage`の場合、下位情報を含めて表示 | | `file.ObjectStorage.bucket` | String | - | バケット名 | | `file.ObjectStorage.object` | String | - | ファイル名 | | `file.SourceBuild` | Object | - | SourceBuild情報 - `file.type`が`SourceBuild`の場合、下位情報を含めて表示 | | `file.SourceBuild.id` | Number | - | ビルドプロジェクト ID | | `file.SourceBuild.name` | String | - | ビルドプロジェクト名 | | `path` | Array | - | ファイルデプロイパスリスト: [path](/docs/ja/devtools-sourcedeploy-scenariodetail#path) | #### `path` `path`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `sourcePath` | String | - | ソースファイルのパス | | `deployPath` | String | - | デプロイのパス | ### レスポンスステータスコード SourceDeploy APIで共通して使用されるレスポンスステータスコードの詳細は、[SourceDeployのレスポンスステータスコード](/docs/ja/devtools-sourcedeploy#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 ``` { "result": { "project": { "id": 2***, "name": "deploy3" }, "stage": { "id": 3***, "name": "dev-sv" }, "id": 2***, "name": "testscenario", "description": "", "type": "Server", "config": { "strategy": "normal", "sequence": true, "file": { "type": "ObjectStorage", "ObjectStorage": { "bucket": "data2", "object": "sample_build_output.zip" } }, "rollback": true, "cmd": { "pre": [ { "user": "root", "cmd": "rm -f /home/root/hello-deploy/hello.py" } ], "deploy": [ { "sourcePath": "hello.py", "deployPath": "/home/root/hello-deploy/" } ], "post": [ { "user": "root", "cmd": "cd /home/root/hello-deploy/ && python3 hello.py" } ] } } } } ```