CreateDeployment - OpsWorks

CreateDeployment

Runs deployment or stack commands. For more information, see Deploying Apps and Run Stack Commands.

Required Permissions: To use this action, an IAM user must have a Deploy or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Request Syntax

{ "AppId": "string", "Command": { "Args": { "string" : [ "string" ] }, "Name": "string" }, "Comment": "string", "CustomJson": "string", "InstanceIds": [ "string" ], "LayerIds": [ "string" ], "StackId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

AppId

The app ID. This parameter is required for app deployments, but not for other deployment commands.

Type: String

Required: No

Command

A DeploymentCommand object that specifies the deployment command and any associated arguments.

Type: DeploymentCommand object

Required: Yes

Comment

A user-defined comment.

Type: String

Required: No

CustomJson

A string that contains user-defined, custom JSON. You can use this parameter to override some corresponding default stack configuration JSON values. The string should be in the following format:

"{\"key1\": \"value1\", \"key2\": \"value2\",...}"

For more information about custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes and Overriding Attributes With Custom JSON.

Type: String

Required: No

InstanceIds

The instance IDs for the deployment targets.

Type: Array of strings

Required: No

LayerIds

The layer IDs for the deployment targets.

Type: Array of strings

Required: No

StackId

The stack ID.

Type: String

Required: Yes

Response Syntax

{ "DeploymentId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

DeploymentId

The deployment ID, which can be used with other requests to identify the deployment.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

ResourceNotFoundException

Indicates that a resource was not found.

HTTP Status Code: 400

ValidationException

Indicates that a request was not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: