|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { CodePipelineClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodePipelineClient"; |
| 8 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 9 | +import { RollbackStageInput, RollbackStageOutput } from "../models/models_0"; |
| 10 | +import { de_RollbackStageCommand, se_RollbackStageCommand } from "../protocols/Aws_json1_1"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export { __MetadataBearer, $Command }; |
| 16 | +/** |
| 17 | + * @public |
| 18 | + * |
| 19 | + * The input for {@link RollbackStageCommand}. |
| 20 | + */ |
| 21 | +export interface RollbackStageCommandInput extends RollbackStageInput {} |
| 22 | +/** |
| 23 | + * @public |
| 24 | + * |
| 25 | + * The output of {@link RollbackStageCommand}. |
| 26 | + */ |
| 27 | +export interface RollbackStageCommandOutput extends RollbackStageOutput, __MetadataBearer {} |
| 28 | + |
| 29 | +/** |
| 30 | + * <p>Rolls back a stage execution.</p> |
| 31 | + * @example |
| 32 | + * Use a bare-bones client and the command you need to make an API call. |
| 33 | + * ```javascript |
| 34 | + * import { CodePipelineClient, RollbackStageCommand } from "@aws-sdk/client-codepipeline"; // ES Modules import |
| 35 | + * // const { CodePipelineClient, RollbackStageCommand } = require("@aws-sdk/client-codepipeline"); // CommonJS import |
| 36 | + * const client = new CodePipelineClient(config); |
| 37 | + * const input = { // RollbackStageInput |
| 38 | + * pipelineName: "STRING_VALUE", // required |
| 39 | + * stageName: "STRING_VALUE", // required |
| 40 | + * targetPipelineExecutionId: "STRING_VALUE", // required |
| 41 | + * }; |
| 42 | + * const command = new RollbackStageCommand(input); |
| 43 | + * const response = await client.send(command); |
| 44 | + * // { // RollbackStageOutput |
| 45 | + * // pipelineExecutionId: "STRING_VALUE", // required |
| 46 | + * // }; |
| 47 | + * |
| 48 | + * ``` |
| 49 | + * |
| 50 | + * @param RollbackStageCommandInput - {@link RollbackStageCommandInput} |
| 51 | + * @returns {@link RollbackStageCommandOutput} |
| 52 | + * @see {@link RollbackStageCommandInput} for command's `input` shape. |
| 53 | + * @see {@link RollbackStageCommandOutput} for command's `response` shape. |
| 54 | + * @see {@link CodePipelineClientResolvedConfig | config} for CodePipelineClient's `config` shape. |
| 55 | + * |
| 56 | + * @throws {@link ConflictException} (client fault) |
| 57 | + * <p>Your request cannot be handled because the pipeline is busy handling ongoing |
| 58 | + * activities. Try again later.</p> |
| 59 | + * |
| 60 | + * @throws {@link PipelineExecutionNotFoundException} (client fault) |
| 61 | + * <p>The pipeline execution was specified in an invalid format or cannot be found, or an |
| 62 | + * execution ID does not belong to the specified pipeline. </p> |
| 63 | + * |
| 64 | + * @throws {@link PipelineExecutionOutdatedException} (client fault) |
| 65 | + * <p>The specified pipeline execution is outdated and cannot be used as a target pipeline execution for rollback.</p> |
| 66 | + * |
| 67 | + * @throws {@link PipelineNotFoundException} (client fault) |
| 68 | + * <p>The pipeline was specified in an invalid format or cannot be found.</p> |
| 69 | + * |
| 70 | + * @throws {@link StageNotFoundException} (client fault) |
| 71 | + * <p>The stage was specified in an invalid format or cannot be found.</p> |
| 72 | + * |
| 73 | + * @throws {@link UnableToRollbackStageException} (client fault) |
| 74 | + * <p>Unable to roll back the stage. The cause might be if the pipeline version has changed |
| 75 | + * since the target pipeline execution was deployed, the stage is currently running, or an |
| 76 | + * incorrect target pipeline execution ID was provided.</p> |
| 77 | + * |
| 78 | + * @throws {@link ValidationException} (client fault) |
| 79 | + * <p>The validation was specified in an invalid format.</p> |
| 80 | + * |
| 81 | + * @throws {@link CodePipelineServiceException} |
| 82 | + * <p>Base exception class for all service exceptions from CodePipeline service.</p> |
| 83 | + * |
| 84 | + * @public |
| 85 | + */ |
| 86 | +export class RollbackStageCommand extends $Command |
| 87 | + .classBuilder< |
| 88 | + RollbackStageCommandInput, |
| 89 | + RollbackStageCommandOutput, |
| 90 | + CodePipelineClientResolvedConfig, |
| 91 | + ServiceInputTypes, |
| 92 | + ServiceOutputTypes |
| 93 | + >() |
| 94 | + .ep({ |
| 95 | + ...commonParams, |
| 96 | + }) |
| 97 | + .m(function (this: any, Command: any, cs: any, config: CodePipelineClientResolvedConfig, o: any) { |
| 98 | + return [ |
| 99 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 100 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 101 | + ]; |
| 102 | + }) |
| 103 | + .s("CodePipeline_20150709", "RollbackStage", {}) |
| 104 | + .n("CodePipelineClient", "RollbackStageCommand") |
| 105 | + .f(void 0, void 0) |
| 106 | + .ser(se_RollbackStageCommand) |
| 107 | + .de(de_RollbackStageCommand) |
| 108 | + .build() {} |
0 commit comments