Start a Deployment
post
/api/v2/deployments/{deployment_id}/start
Starts a specific deployment. You identify the deployment using the deployment_id parameter. Note this endpoing applies only to stopped deployments.
Request
Supported Media Types
- application/json
Path Parameters
-
deployment_id: string
deployment_id
Body parameters
Security
-
Authorization: apiKey
Type:
apiKey
Response
Supported Media Types
- application/json
200 Response
200 Response
Nested Schema : deployment
Type:
Show Source
object
-
created_by:
string
-
created_on:
string
-
creation_info_generation:
integer
-
current_state:
integer
-
deployment_id:
string
-
deployment_name:
string
-
desired_state:
integer
-
desired_state_changed_at:
string
-
generation:
integer
-
pending_state:
integer
-
placement:
object placement
-
quantities:
object quantities
-
stack:
object stack
Default Response
Error Payload
Examples
The following example shows how to start a specific Oracle Container Cloud Service deployment. You perform this task by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the manager node for the Oracle Cloud Container instance. See Send Requests for the appropriate URL structure to use for Oracle Public Cloud.
cURL Command
curl -sk
-X "POST"
-H "Authorization: Bearer b39f09c71c297f1d"
"https://rest_server_url/api/v2/deployments/Redis-20161026-165916/start"
In this example, Redis-20161026-165916
is the ID of the deployment.
Example of Response Body
{
"deployment": {
"deployment_id": "Redis-20161026-165916",
"placement": {
"pool_id": "default"
},
"created_by": "admin",
"created_on": "2016-10-26T21:59:03Z",
"stack": {
"service_id": "redis",
"service_name": "Redis",
"subtype": "service",
"content": "version: 2\nservices:\n redis:\n image: \"redis:3.2.1-alpine\"\n environment:\n - \"occs:availability=per-pool\"\n - \"occs:scheduler=random\"\n - \"occs:description=The official Redis image. This example is provided as-is for educational purposes and should not be used in production.\"\n"
},
"creation_info_generation": 1,
"deployment_name": "Redis",
"quantities": {
"redis": 1
},
"desired_state": 1,
"desired_state_changed_at": "2016-10-26T17:59:03.657917841-04:00",
"generation": 1,
"current_state": 1,
"pending_state": 1
}
}