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
Path Parameters
Body ()
Body parameters
Root Schema : schema
Type: object
Show Source
Nested Schema : placement
Type: object
Show Source
Nested Schema : quantities
Type: object
Show Source
Nested Schema : stack
Type: object
Show Source
Nested Schema : services
Type: object
Show Source
Security
Back to Top

Response

Supported Media Types

200 Response

200 Response
Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : deployment
Type: object
Show Source
Nested Schema : placement
Type: object
Show Source
Nested Schema : quantities
Type: object
Show Source
Nested Schema : stack
Type: object
Show Source

Default Response

Error Payload
Body ()
Root Schema : schema
Type: array
Show Source
Back to Top

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
	}
}
Back to Top