Available in Classic and VPC
Get details of a deployment scenario.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
GET | /api/v1/project/{projectId}/stage/{stageId}/scenario/{scenarioId} |
Request headers
For information about the headers common to all SourceDeploy APIs, see SourceDeploy request headers.
Request path parameters
You can use the following path parameters with your request:
Field | Type | Required | Description |
---|---|---|---|
projectId |
String | Required | Project ID
|
stageId |
String | Required | Deployment stage ID
|
scenarioId |
String | Required | Deployment scenario ID
|
Request example
The request example is as follows:
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}'
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
result |
Object | - | Response result |
result.project |
Object | - | Project information |
result.project.id |
Number | - | Project ID |
result.project.name |
String | - | Project name |
result.stage |
Object | - | Deployment stage information |
result.stage.id |
Number | - | Deployment stage ID |
result.stage.name |
String | - | Deployment stage name |
result.id |
Number | - | Deployment scenario ID |
result.name |
String | - | Deployment scenario name |
result.description |
String | - | Deployment scenario description |
result.type |
String | - | Deployment target
|
result.config |
Object | - | Deployment target settings
|
TScenarioServer
The following describes TScenarioServer
.
Field | Type | Required | Description |
---|---|---|---|
strategy |
String | - | Deployment strategy
|
sequence |
Boolean | - | Sequential deployment
|
file |
Object | - | Deployment file information |
file.type |
String | - | Deployment file location
|
file.ObjectStorage |
Object | - | Object Storage information
|
file.ObjectStorage.bucket |
String | - | Bucket name |
file.ObjectStorage.object |
String | - | File name |
file.SourceBuild |
Object | - | SourceBuild information
|
file.SourceBuild.id |
Number | - | Build project ID |
file.SourceBuild.name |
String | - | Build project name |
rollback |
Boolean | - | Whether to use rollback upon deployment failure
|
cmd.pre |
Array | - | List of pre-deployment execution commands |
cmd.deploy |
Array | - | List of file deployment paths |
cmd.post |
Array | - | List of post-deployment execution commands |
pre
The following describes pre
.
Field | Type | Required | Description |
---|---|---|---|
user |
String | - | Account |
cmd |
String | - | Execution command |
deploy
The following describes deploy
.
Field | Type | Required | Description |
---|---|---|---|
sourcePath |
String | - | Source file path |
deployPath |
String | - | Deployment path |
post
The following describes post
.
Field | Type | Required | Description |
---|---|---|---|
user |
String | - | Account |
cmd |
String | - | Execution command |
TScenarioAutoScalingGroup
The following describes TScenarioAutoScalingGroup
.
Field | Type | Required | Description |
---|---|---|---|
strategy |
String | - | Deployment strategy
|
sequence |
Boolean | - | Sequential deployment
|
file |
Object | - | Deployment file information |
file.type |
String | - | Deployment file location
|
file.ObjectStorage |
Object | - | Object Storage information
|
file.ObjectStorage.bucket |
String | - | Bucket name |
file.ObjectStorage.object |
String | - | File name |
file.SourceBuild |
Object | - | SourceBuild information
|
file.SourceBuild.id |
Number | - | Build project ID |
file.SourceBuild.name |
String | - | Build project name |
rollback |
Boolean | - | Whether to use rollback upon deployment failure
|
cmd.pre |
Array | - | List of pre-deployment execution commands |
cmd.deploy |
Array | - | List of file deployment paths |
cmd.post |
Array | - | List of post-deployment execution commands |
loadBalancer |
Object | - | Load balancer information
|
loadBalancer.loadBalancerTargetGroupNo |
Number | - | Load balancer target group ID |
loadBalancer.loadBalancerTargetGroupName |
String | - | Load balancer target group name |
loadBalancer.deleteAsg |
Boolean | - | Whether to delete existing Auto Scaling group
|
loadBalancer.deleteServer |
Boolean | - | Whether to terminate servers in the existing Auto Scaling group
|
pre
The following describes pre
.
Field | Type | Required | Description |
---|---|---|---|
user |
String | - | Account |
cmd |
String | - | Execution command |
deploy
The following describes deploy
.
Field | Type | Required | Description |
---|---|---|---|
sourcePath |
String | - | Source file path |
deployPath |
String | - | Deployment path |
post
The following describes post
.
Field | Type | Required | Description |
---|---|---|---|
user |
String | - | Account |
cmd |
String | - | Execution command |
TScenarioKubernetesService
The following describes TScenarioKubernetesService
.
Field | Type | Required | Description |
---|---|---|---|
strategy |
String | - | Deployment strategy
|
manifest |
Object | - | Manifest information |
manifest.type |
String | - | Manifest file repository
|
manifest.url |
String | - | Git repository URL
|
manifest.serverUrl |
String | - | Server URL
|
result.env |
Object | - | Build environment information |
manifest.owner |
String | - | Github Enterprise Server owner
|
manifest.repository |
String | - | Repository name
|
manifest.branch |
String | - | Branch name
|
manifest.path |
Array | - | File location list |
canaryConfig |
Object | - | Canary analysis settings
|
canaryConfig.analysisType |
String | - | Canary analysis method
|
canaryConfig.canaryCount |
Number | - | Number of baseline and canary pods |
canaryConfig.timeout |
Number | - | Timeout (minute)
|
canaryConfig.prometheus |
String | - | Prometheus URL
|
canaryConfig.env |
Object | - | Analysis environment variable
|
canaryConfig.env.baseline |
String | - | Analysis environment variable: baseline name |
canaryConfig.env.canary |
String | - | Analysis environment variable: canary name |
canaryConfig.metrics |
Array | - | Metric settings list
|
canaryConfig.analysisConfig |
Object | - | Analysis settings
|
canaryConfig.analysisConfig.duration |
Number | - | Analysis time (minute) |
canaryConfig.analysisConfig.delay |
Number | - | Analysis delay time (minute) |
canaryConfig.analysisConfig.interval |
Number | - | Analysis cycle (minute) |
canaryConfig.analysisConfig.step |
Number | - | Metric collection cycle (second) |
canaryConfig.passScore |
Number | - | Analysis success score |
metrics
The following describes metrics
.
Field | Type | Required | Description |
---|---|---|---|
name |
String | - | Metric name |
successCriteria |
String | - | Success criteria
|
queryType |
String | - | Query type
|
weight |
Number | - | Metric weight |
metric |
String | - | Metric value
|
filter |
String | - | Filter valuequeryType is default . |
query |
String | - | Query
|
TScenarioObjectStorage
The following describes result.config
if the deployment target is ObjectStorage
.
Field | Type | Required | Description |
---|---|---|---|
file |
Object | - | Deployment file information |
file.type |
String | - | Deployment file location
|
file.ObjectStorage |
Object | - | Object Storage information
|
file.ObjectStorage.bucket |
String | - | Bucket name |
file.ObjectStorage.object |
String | - | File name |
file.SourceBuild |
Object | - | SourceBuild information
|
file.SourceBuild.id |
Number | - | Build project ID |
file.SourceBuild.name |
String | - | Build project name |
path |
Array | - | List of file deployment paths |
path
The following describes path
.
Field | Type | Required | Description |
---|---|---|---|
sourcePath |
String | - | Source file path |
deployPath |
String | - | Deployment path |
Response status codes
For information about the HTTP status codes common to all SourceDeploy APIs, see SourceDeploy response status codes.
Response example
The response example is as follows:
{
"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"
}
]
}
}
}
}