v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1474216311.3 KB

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.

post/#X-Amz-Target=OpsWorks_20130218.CreateDeployment

Headers

X-Amz-Target'OpsWorks_20130218.CreateDeployment' required

Request body

StackIdstring required

The stack ID.

AppIdstring

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

InstanceIdsString[]

The instance IDs for the deployment targets.

LayerIdsString[]

The layer IDs for the deployment targets.

Commentstring

A user-defined comment.

CustomJsonstring
<p>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:</p> <p> <code>"{\"key1\": \"value1\", \"key2\": \"value2\",...}"</code> </p> <p>For more information about custom JSON, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html">Use Custom JSON to Modify the Stack Configuration Attributes</a> and <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-json-override.html">Overriding Attributes With Custom JSON</a>.</p>

Response

Success

DeploymentIdstring

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