Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class StopDeploymentCommandProtected

Stops a deployment. This API action works only on deployments that have a status of DEPLOYING. This action moves the deployment to a status of ROLLED_BACK.

Example

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

import { AppConfigClient, StopDeploymentCommand } from "@aws-sdk/client-appconfig"; // ES Modules import
// const { AppConfigClient, StopDeploymentCommand } = require("@aws-sdk/client-appconfig"); // CommonJS import
const client = new AppConfigClient(config);
const input = { // StopDeploymentRequest
ApplicationId: "STRING_VALUE", // required
EnvironmentId: "STRING_VALUE", // required
DeploymentNumber: Number("int"), // required
};
const command = new StopDeploymentCommand(input);
const response = await client.send(command);
// { // Deployment
// ApplicationId: "STRING_VALUE",
// EnvironmentId: "STRING_VALUE",
// DeploymentStrategyId: "STRING_VALUE",
// ConfigurationProfileId: "STRING_VALUE",
// DeploymentNumber: Number("int"),
// ConfigurationName: "STRING_VALUE",
// ConfigurationLocationUri: "STRING_VALUE",
// ConfigurationVersion: "STRING_VALUE",
// Description: "STRING_VALUE",
// DeploymentDurationInMinutes: Number("int"),
// GrowthType: "LINEAR" || "EXPONENTIAL",
// GrowthFactor: Number("float"),
// FinalBakeTimeInMinutes: Number("int"),
// State: "BAKING" || "VALIDATING" || "DEPLOYING" || "COMPLETE" || "ROLLING_BACK" || "ROLLED_BACK",
// EventLog: [ // DeploymentEvents
// { // DeploymentEvent
// EventType: "PERCENTAGE_UPDATED" || "ROLLBACK_STARTED" || "ROLLBACK_COMPLETED" || "BAKE_TIME_STARTED" || "DEPLOYMENT_STARTED" || "DEPLOYMENT_COMPLETED",
// TriggeredBy: "USER" || "APPCONFIG" || "CLOUDWATCH_ALARM" || "INTERNAL_ERROR",
// Description: "STRING_VALUE",
// ActionInvocations: [ // ActionInvocations
// { // ActionInvocation
// ExtensionIdentifier: "STRING_VALUE",
// ActionName: "STRING_VALUE",
// Uri: "STRING_VALUE",
// RoleArn: "STRING_VALUE",
// ErrorMessage: "STRING_VALUE",
// ErrorCode: "STRING_VALUE",
// InvocationId: "STRING_VALUE",
// },
// ],
// OccurredAt: new Date("TIMESTAMP"),
// },
// ],
// PercentageComplete: Number("float"),
// StartedAt: new Date("TIMESTAMP"),
// CompletedAt: new Date("TIMESTAMP"),
// AppliedExtensions: [ // AppliedExtensions
// { // AppliedExtension
// ExtensionId: "STRING_VALUE",
// ExtensionAssociationId: "STRING_VALUE",
// VersionNumber: Number("int"),
// Parameters: { // ParameterValueMap
// "<keys>": "STRING_VALUE",
// },
// },
// ],
// KmsKeyArn: "STRING_VALUE",
// KmsKeyIdentifier: "STRING_VALUE",
// };

Param

StopDeploymentCommandInput

Returns

StopDeploymentCommandOutput

See

Throws

BadRequestException (client fault)

The input fails to satisfy the constraints specified by an Amazon Web Services service.

Throws

InternalServerException (server fault)

There was an internal failure in the AppConfig service.

Throws

ResourceNotFoundException (client fault)

The requested resource could not be found.

Throws

AppConfigServiceException

Base exception class for all service exceptions from AppConfig service.

Example

To stop configuration deployment

// The following stop-deployment example stops the deployment of an application configuration to the specified environment.
const input = {
"ApplicationId": "339ohji",
"DeploymentNumber": 2,
"EnvironmentId": "54j1r29"
};
const command = new StopDeploymentCommand(input);
const response = await client.send(command);
/* response ==
{
"DeploymentDurationInMinutes": 15,
"DeploymentNumber": 2,
"FinalBakeTimeInMinutes": 0,
"GrowthFactor": 25,
"PercentageComplete": 1
}
*/
// example id: to-stop-configuration-deployment-1632329139126

Hierarchy

Constructors

Properties

middlewareStack: MiddlewareStack<StopDeploymentCommandInput, StopDeploymentCommandOutput>

Methods