CreateDeploymentCommand

Creates and starts a deployment to deploy an application into a runtime environment.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { M2Client, CreateDeploymentCommand } from "@aws-sdk/client-m2"; // ES Modules import
// const { M2Client, CreateDeploymentCommand } = require("@aws-sdk/client-m2"); // CommonJS import
const client = new M2Client(config);
const input = { // CreateDeploymentRequest
  environmentId: "STRING_VALUE", // required
  applicationId: "STRING_VALUE", // required
  applicationVersion: Number("int"), // required
  clientToken: "STRING_VALUE",
};
const command = new CreateDeploymentCommand(input);
const response = await client.send(command);
// { // CreateDeploymentResponse
//   deploymentId: "STRING_VALUE", // required
// };

CreateDeploymentCommand Input

See CreateDeploymentCommandInput for more details

Parameter
Type
Description
applicationId
Required
string | undefined

The application identifier.

applicationVersion
Required
number | undefined

The version of the application to deploy.

environmentId
Required
string | undefined

The identifier of the runtime environment where you want to deploy this application.

clientToken
string | undefined

Unique, case-sensitive identifier you provide to ensure the idempotency of the request to create a deployment. The service generates the clientToken when the API call is triggered. The token expires after one hour, so if you retry the API within this timeframe with the same clientToken, you will get the same response. The service also handles deleting the clientToken after it expires.

CreateDeploymentCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
deploymentId
Required
string | undefined

The unique identifier of the deployment.

Throws

Name
Fault
Details
AccessDeniedException
client

The account or role doesn't have the right permissions to make the request.

ConflictException
client

The parameters provided in the request conflict with existing resources.

InternalServerException
server

An unexpected error occurred during the processing of the request.

ResourceNotFoundException
client

The specified resource was not found.

ServiceQuotaExceededException
client

One or more quotas for Amazon Web Services Mainframe Modernization exceeds the limit.

ThrottlingException
client

The number of requests made exceeds the limit.

ValidationException
client

One or more parameters provided in the request is not valid.

M2ServiceException
Base exception class for all service exceptions from M2 service.