@aws-sdk/client-codepipeline 3.556.0 → 3.564.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -660,6 +660,14 @@ RetryStageExecution
660
660
 
661
661
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codepipeline/command/RetryStageExecutionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codepipeline/Interface/RetryStageExecutionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codepipeline/Interface/RetryStageExecutionCommandOutput/)
662
662
 
663
+ </details>
664
+ <details>
665
+ <summary>
666
+ RollbackStage
667
+ </summary>
668
+
669
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/codepipeline/command/RollbackStageCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codepipeline/Interface/RollbackStageCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-codepipeline/Interface/RollbackStageCommandOutput/)
670
+
663
671
  </details>
664
672
  <details>
665
673
  <summary>
package/dist-cjs/index.js CHANGED
@@ -52,6 +52,7 @@ __export(src_exports, {
52
52
  EnableStageTransitionCommand: () => EnableStageTransitionCommand,
53
53
  EncryptionKeyType: () => EncryptionKeyType,
54
54
  ExecutionMode: () => ExecutionMode,
55
+ ExecutionType: () => ExecutionType,
55
56
  ExecutorType: () => ExecutorType,
56
57
  FailureType: () => FailureType,
57
58
  GetActionTypeCommand: () => GetActionTypeCommand,
@@ -93,6 +94,7 @@ __export(src_exports, {
93
94
  OutputVariablesSizeExceededException: () => OutputVariablesSizeExceededException,
94
95
  PipelineExecutionNotFoundException: () => PipelineExecutionNotFoundException,
95
96
  PipelineExecutionNotStoppableException: () => PipelineExecutionNotStoppableException,
97
+ PipelineExecutionOutdatedException: () => PipelineExecutionOutdatedException,
96
98
  PipelineExecutionStatus: () => PipelineExecutionStatus,
97
99
  PipelineNameInUseException: () => PipelineNameInUseException,
98
100
  PipelineNotFoundException: () => PipelineNotFoundException,
@@ -112,7 +114,9 @@ __export(src_exports, {
112
114
  RegisterWebhookWithThirdPartyCommand: () => RegisterWebhookWithThirdPartyCommand,
113
115
  RequestFailedException: () => RequestFailedException,
114
116
  ResourceNotFoundException: () => ResourceNotFoundException,
117
+ Result: () => Result,
115
118
  RetryStageExecutionCommand: () => RetryStageExecutionCommand,
119
+ RollbackStageCommand: () => RollbackStageCommand,
116
120
  SourceRevisionType: () => SourceRevisionType,
117
121
  StageExecutionStatus: () => StageExecutionStatus,
118
122
  StageNotFoundException: () => StageNotFoundException,
@@ -127,6 +131,7 @@ __export(src_exports, {
127
131
  ThirdPartyJobDetailsFilterSensitiveLog: () => ThirdPartyJobDetailsFilterSensitiveLog,
128
132
  TooManyTagsException: () => TooManyTagsException,
129
133
  TriggerType: () => TriggerType,
134
+ UnableToRollbackStageException: () => UnableToRollbackStageException,
130
135
  UntagResourceCommand: () => UntagResourceCommand,
131
136
  UpdateActionTypeCommand: () => UpdateActionTypeCommand,
132
137
  UpdatePipelineCommand: () => UpdatePipelineCommand,
@@ -570,6 +575,9 @@ var PipelineType = {
570
575
  V1: "V1",
571
576
  V2: "V2"
572
577
  };
578
+ var Result = {
579
+ ROLLBACK: "ROLLBACK"
580
+ };
573
581
  var GitPullRequestEventType = {
574
582
  CLOSED: "CLOSED",
575
583
  OPEN: "OPEN",
@@ -735,6 +743,10 @@ var _PipelineVersionNotFoundException = class _PipelineVersionNotFoundException
735
743
  };
736
744
  __name(_PipelineVersionNotFoundException, "PipelineVersionNotFoundException");
737
745
  var PipelineVersionNotFoundException = _PipelineVersionNotFoundException;
746
+ var ExecutionType = {
747
+ ROLLBACK: "ROLLBACK",
748
+ STANDARD: "STANDARD"
749
+ };
738
750
  var PipelineExecutionStatus = {
739
751
  Cancelled: "Cancelled",
740
752
  Failed: "Failed",
@@ -745,8 +757,10 @@ var PipelineExecutionStatus = {
745
757
  Superseded: "Superseded"
746
758
  };
747
759
  var TriggerType = {
760
+ AutomatedRollback: "AutomatedRollback",
748
761
  CloudWatchEvent: "CloudWatchEvent",
749
762
  CreatePipeline: "CreatePipeline",
763
+ ManualRollback: "ManualRollback",
750
764
  PollForSourceChanges: "PollForSourceChanges",
751
765
  PutActionRevision: "PutActionRevision",
752
766
  StartPipelineExecution: "StartPipelineExecution",
@@ -999,6 +1013,40 @@ var _StageNotRetryableException = class _StageNotRetryableException extends Code
999
1013
  };
1000
1014
  __name(_StageNotRetryableException, "StageNotRetryableException");
1001
1015
  var StageNotRetryableException = _StageNotRetryableException;
1016
+ var _PipelineExecutionOutdatedException = class _PipelineExecutionOutdatedException extends CodePipelineServiceException {
1017
+ /**
1018
+ * @internal
1019
+ */
1020
+ constructor(opts) {
1021
+ super({
1022
+ name: "PipelineExecutionOutdatedException",
1023
+ $fault: "client",
1024
+ ...opts
1025
+ });
1026
+ this.name = "PipelineExecutionOutdatedException";
1027
+ this.$fault = "client";
1028
+ Object.setPrototypeOf(this, _PipelineExecutionOutdatedException.prototype);
1029
+ }
1030
+ };
1031
+ __name(_PipelineExecutionOutdatedException, "PipelineExecutionOutdatedException");
1032
+ var PipelineExecutionOutdatedException = _PipelineExecutionOutdatedException;
1033
+ var _UnableToRollbackStageException = class _UnableToRollbackStageException extends CodePipelineServiceException {
1034
+ /**
1035
+ * @internal
1036
+ */
1037
+ constructor(opts) {
1038
+ super({
1039
+ name: "UnableToRollbackStageException",
1040
+ $fault: "client",
1041
+ ...opts
1042
+ });
1043
+ this.name = "UnableToRollbackStageException";
1044
+ this.$fault = "client";
1045
+ Object.setPrototypeOf(this, _UnableToRollbackStageException.prototype);
1046
+ }
1047
+ };
1048
+ __name(_UnableToRollbackStageException, "UnableToRollbackStageException");
1049
+ var UnableToRollbackStageException = _UnableToRollbackStageException;
1002
1050
  var _ConcurrentPipelineExecutionsLimitExceededException = class _ConcurrentPipelineExecutionsLimitExceededException extends CodePipelineServiceException {
1003
1051
  /**
1004
1052
  * @internal
@@ -1310,6 +1358,12 @@ var se_RetryStageExecutionCommand = /* @__PURE__ */ __name(async (input, context
1310
1358
  body = JSON.stringify((0, import_smithy_client._json)(input));
1311
1359
  return buildHttpRpcRequest(context, headers, "/", void 0, body);
1312
1360
  }, "se_RetryStageExecutionCommand");
1361
+ var se_RollbackStageCommand = /* @__PURE__ */ __name(async (input, context) => {
1362
+ const headers = sharedHeaders("RollbackStage");
1363
+ let body;
1364
+ body = JSON.stringify((0, import_smithy_client._json)(input));
1365
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
1366
+ }, "se_RollbackStageCommand");
1313
1367
  var se_StartPipelineExecutionCommand = /* @__PURE__ */ __name(async (input, context) => {
1314
1368
  const headers = sharedHeaders("StartPipelineExecution");
1315
1369
  let body;
@@ -1751,6 +1805,19 @@ var de_RetryStageExecutionCommand = /* @__PURE__ */ __name(async (output, contex
1751
1805
  };
1752
1806
  return response;
1753
1807
  }, "de_RetryStageExecutionCommand");
1808
+ var de_RollbackStageCommand = /* @__PURE__ */ __name(async (output, context) => {
1809
+ if (output.statusCode >= 300) {
1810
+ return de_CommandError(output, context);
1811
+ }
1812
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
1813
+ let contents = {};
1814
+ contents = (0, import_smithy_client._json)(data);
1815
+ const response = {
1816
+ $metadata: deserializeMetadata(output),
1817
+ ...contents
1818
+ };
1819
+ return response;
1820
+ }, "de_RollbackStageCommand");
1754
1821
  var de_StartPipelineExecutionCommand = /* @__PURE__ */ __name(async (output, context) => {
1755
1822
  if (output.statusCode >= 300) {
1756
1823
  return de_CommandError(output, context);
@@ -1932,6 +1999,12 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1932
1999
  case "StageNotRetryableException":
1933
2000
  case "com.amazonaws.codepipeline#StageNotRetryableException":
1934
2001
  throw await de_StageNotRetryableExceptionRes(parsedOutput, context);
2002
+ case "PipelineExecutionOutdatedException":
2003
+ case "com.amazonaws.codepipeline#PipelineExecutionOutdatedException":
2004
+ throw await de_PipelineExecutionOutdatedExceptionRes(parsedOutput, context);
2005
+ case "UnableToRollbackStageException":
2006
+ case "com.amazonaws.codepipeline#UnableToRollbackStageException":
2007
+ throw await de_UnableToRollbackStageExceptionRes(parsedOutput, context);
1935
2008
  case "ConcurrentPipelineExecutionsLimitExceededException":
1936
2009
  case "com.amazonaws.codepipeline#ConcurrentPipelineExecutionsLimitExceededException":
1937
2010
  throw await de_ConcurrentPipelineExecutionsLimitExceededExceptionRes(parsedOutput, context);
@@ -2196,6 +2269,15 @@ var de_PipelineExecutionNotStoppableExceptionRes = /* @__PURE__ */ __name(async
2196
2269
  });
2197
2270
  return (0, import_smithy_client.decorateServiceException)(exception, body);
2198
2271
  }, "de_PipelineExecutionNotStoppableExceptionRes");
2272
+ var de_PipelineExecutionOutdatedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2273
+ const body = parsedOutput.body;
2274
+ const deserialized = (0, import_smithy_client._json)(body);
2275
+ const exception = new PipelineExecutionOutdatedException({
2276
+ $metadata: deserializeMetadata(parsedOutput),
2277
+ ...deserialized
2278
+ });
2279
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2280
+ }, "de_PipelineExecutionOutdatedExceptionRes");
2199
2281
  var de_PipelineNameInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2200
2282
  const body = parsedOutput.body;
2201
2283
  const deserialized = (0, import_smithy_client._json)(body);
@@ -2268,6 +2350,15 @@ var de_TooManyTagsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, con
2268
2350
  });
2269
2351
  return (0, import_smithy_client.decorateServiceException)(exception, body);
2270
2352
  }, "de_TooManyTagsExceptionRes");
2353
+ var de_UnableToRollbackStageExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2354
+ const body = parsedOutput.body;
2355
+ const deserialized = (0, import_smithy_client._json)(body);
2356
+ const exception = new UnableToRollbackStageException({
2357
+ $metadata: deserializeMetadata(parsedOutput),
2358
+ ...deserialized
2359
+ });
2360
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2361
+ }, "de_UnableToRollbackStageExceptionRes");
2271
2362
  var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2272
2363
  const body = parsedOutput.body;
2273
2364
  const deserialized = (0, import_smithy_client._json)(body);
@@ -2467,9 +2558,11 @@ var de_PipelineExecution = /* @__PURE__ */ __name((output, context) => {
2467
2558
  return (0, import_smithy_client.take)(output, {
2468
2559
  artifactRevisions: (_) => de_ArtifactRevisionList(_, context),
2469
2560
  executionMode: import_smithy_client.expectString,
2561
+ executionType: import_smithy_client.expectString,
2470
2562
  pipelineExecutionId: import_smithy_client.expectString,
2471
2563
  pipelineName: import_smithy_client.expectString,
2472
2564
  pipelineVersion: import_smithy_client.expectInt32,
2565
+ rollbackMetadata: import_smithy_client._json,
2473
2566
  status: import_smithy_client.expectString,
2474
2567
  statusSummary: import_smithy_client.expectString,
2475
2568
  trigger: import_smithy_client._json,
@@ -2479,11 +2572,14 @@ var de_PipelineExecution = /* @__PURE__ */ __name((output, context) => {
2479
2572
  var de_PipelineExecutionSummary = /* @__PURE__ */ __name((output, context) => {
2480
2573
  return (0, import_smithy_client.take)(output, {
2481
2574
  executionMode: import_smithy_client.expectString,
2575
+ executionType: import_smithy_client.expectString,
2482
2576
  lastUpdateTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2483
2577
  pipelineExecutionId: import_smithy_client.expectString,
2578
+ rollbackMetadata: import_smithy_client._json,
2484
2579
  sourceRevisions: import_smithy_client._json,
2485
2580
  startTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
2486
2581
  status: import_smithy_client.expectString,
2582
+ statusSummary: import_smithy_client.expectString,
2487
2583
  stopTrigger: import_smithy_client._json,
2488
2584
  trigger: import_smithy_client._json
2489
2585
  });
@@ -3148,6 +3244,23 @@ var _RetryStageExecutionCommand = class _RetryStageExecutionCommand extends impo
3148
3244
  __name(_RetryStageExecutionCommand, "RetryStageExecutionCommand");
3149
3245
  var RetryStageExecutionCommand = _RetryStageExecutionCommand;
3150
3246
 
3247
+ // src/commands/RollbackStageCommand.ts
3248
+
3249
+
3250
+
3251
+
3252
+ var _RollbackStageCommand = class _RollbackStageCommand extends import_smithy_client.Command.classBuilder().ep({
3253
+ ...commonParams
3254
+ }).m(function(Command, cs, config, o) {
3255
+ return [
3256
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
3257
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
3258
+ ];
3259
+ }).s("CodePipeline_20150709", "RollbackStage", {}).n("CodePipelineClient", "RollbackStageCommand").f(void 0, void 0).ser(se_RollbackStageCommand).de(de_RollbackStageCommand).build() {
3260
+ };
3261
+ __name(_RollbackStageCommand, "RollbackStageCommand");
3262
+ var RollbackStageCommand = _RollbackStageCommand;
3263
+
3151
3264
  // src/commands/StartPipelineExecutionCommand.ts
3152
3265
 
3153
3266
 
@@ -3285,6 +3398,7 @@ var commands = {
3285
3398
  PutWebhookCommand,
3286
3399
  RegisterWebhookWithThirdPartyCommand,
3287
3400
  RetryStageExecutionCommand,
3401
+ RollbackStageCommand,
3288
3402
  StartPipelineExecutionCommand,
3289
3403
  StopPipelineExecutionCommand,
3290
3404
  TagResourceCommand,
@@ -3362,6 +3476,7 @@ var paginateListWebhooks = (0, import_core.createPaginator)(CodePipelineClient,
3362
3476
  PutWebhookCommand,
3363
3477
  RegisterWebhookWithThirdPartyCommand,
3364
3478
  RetryStageExecutionCommand,
3479
+ RollbackStageCommand,
3365
3480
  StartPipelineExecutionCommand,
3366
3481
  StopPipelineExecutionCommand,
3367
3482
  TagResourceCommand,
@@ -3399,6 +3514,7 @@ var paginateListWebhooks = (0, import_core.createPaginator)(CodePipelineClient,
3399
3514
  TooManyTagsException,
3400
3515
  ExecutionMode,
3401
3516
  PipelineType,
3517
+ Result,
3402
3518
  GitPullRequestEventType,
3403
3519
  PipelineTriggerProviderType,
3404
3520
  InvalidActionDeclarationException,
@@ -3411,6 +3527,7 @@ var paginateListWebhooks = (0, import_core.createPaginator)(CodePipelineClient,
3411
3527
  PipelineNotFoundException,
3412
3528
  StageNotFoundException,
3413
3529
  PipelineVersionNotFoundException,
3530
+ ExecutionType,
3414
3531
  PipelineExecutionStatus,
3415
3532
  TriggerType,
3416
3533
  PipelineExecutionNotFoundException,
@@ -3430,6 +3547,8 @@ var paginateListWebhooks = (0, import_core.createPaginator)(CodePipelineClient,
3430
3547
  NotLatestPipelineExecutionException,
3431
3548
  StageRetryMode,
3432
3549
  StageNotRetryableException,
3550
+ PipelineExecutionOutdatedException,
3551
+ UnableToRollbackStageException,
3433
3552
  ConcurrentPipelineExecutionsLimitExceededException,
3434
3553
  SourceRevisionType,
3435
3554
  DuplicatedStopRequestException,
@@ -33,6 +33,7 @@ import { PutThirdPartyJobSuccessResultCommand, } from "./commands/PutThirdPartyJ
33
33
  import { PutWebhookCommand } from "./commands/PutWebhookCommand";
34
34
  import { RegisterWebhookWithThirdPartyCommand, } from "./commands/RegisterWebhookWithThirdPartyCommand";
35
35
  import { RetryStageExecutionCommand, } from "./commands/RetryStageExecutionCommand";
36
+ import { RollbackStageCommand, } from "./commands/RollbackStageCommand";
36
37
  import { StartPipelineExecutionCommand, } from "./commands/StartPipelineExecutionCommand";
37
38
  import { StopPipelineExecutionCommand, } from "./commands/StopPipelineExecutionCommand";
38
39
  import { TagResourceCommand } from "./commands/TagResourceCommand";
@@ -73,6 +74,7 @@ const commands = {
73
74
  PutWebhookCommand,
74
75
  RegisterWebhookWithThirdPartyCommand,
75
76
  RetryStageExecutionCommand,
77
+ RollbackStageCommand,
76
78
  StartPipelineExecutionCommand,
77
79
  StopPipelineExecutionCommand,
78
80
  TagResourceCommand,
@@ -0,0 +1,24 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_RollbackStageCommand, se_RollbackStageCommand } from "../protocols/Aws_json1_1";
6
+ export { $Command };
7
+ export class RollbackStageCommand extends $Command
8
+ .classBuilder()
9
+ .ep({
10
+ ...commonParams,
11
+ })
12
+ .m(function (Command, cs, config, o) {
13
+ return [
14
+ getSerdePlugin(config, this.serialize, this.deserialize),
15
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
16
+ ];
17
+ })
18
+ .s("CodePipeline_20150709", "RollbackStage", {})
19
+ .n("CodePipelineClient", "RollbackStageCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_RollbackStageCommand)
22
+ .de(de_RollbackStageCommand)
23
+ .build() {
24
+ }
@@ -31,6 +31,7 @@ export * from "./PutThirdPartyJobSuccessResultCommand";
31
31
  export * from "./PutWebhookCommand";
32
32
  export * from "./RegisterWebhookWithThirdPartyCommand";
33
33
  export * from "./RetryStageExecutionCommand";
34
+ export * from "./RollbackStageCommand";
34
35
  export * from "./StartPipelineExecutionCommand";
35
36
  export * from "./StopPipelineExecutionCommand";
36
37
  export * from "./TagResourceCommand";
@@ -198,6 +198,9 @@ export const PipelineType = {
198
198
  V1: "V1",
199
199
  V2: "V2",
200
200
  };
201
+ export const Result = {
202
+ ROLLBACK: "ROLLBACK",
203
+ };
201
204
  export const GitPullRequestEventType = {
202
205
  CLOSED: "CLOSED",
203
206
  OPEN: "OPEN",
@@ -318,6 +321,10 @@ export class PipelineVersionNotFoundException extends __BaseException {
318
321
  Object.setPrototypeOf(this, PipelineVersionNotFoundException.prototype);
319
322
  }
320
323
  }
324
+ export const ExecutionType = {
325
+ ROLLBACK: "ROLLBACK",
326
+ STANDARD: "STANDARD",
327
+ };
321
328
  export const PipelineExecutionStatus = {
322
329
  Cancelled: "Cancelled",
323
330
  Failed: "Failed",
@@ -328,8 +335,10 @@ export const PipelineExecutionStatus = {
328
335
  Superseded: "Superseded",
329
336
  };
330
337
  export const TriggerType = {
338
+ AutomatedRollback: "AutomatedRollback",
331
339
  CloudWatchEvent: "CloudWatchEvent",
332
340
  CreatePipeline: "CreatePipeline",
341
+ ManualRollback: "ManualRollback",
333
342
  PollForSourceChanges: "PollForSourceChanges",
334
343
  PutActionRevision: "PutActionRevision",
335
344
  StartPipelineExecution: "StartPipelineExecution",
@@ -517,6 +526,30 @@ export class StageNotRetryableException extends __BaseException {
517
526
  Object.setPrototypeOf(this, StageNotRetryableException.prototype);
518
527
  }
519
528
  }
529
+ export class PipelineExecutionOutdatedException extends __BaseException {
530
+ constructor(opts) {
531
+ super({
532
+ name: "PipelineExecutionOutdatedException",
533
+ $fault: "client",
534
+ ...opts,
535
+ });
536
+ this.name = "PipelineExecutionOutdatedException";
537
+ this.$fault = "client";
538
+ Object.setPrototypeOf(this, PipelineExecutionOutdatedException.prototype);
539
+ }
540
+ }
541
+ export class UnableToRollbackStageException extends __BaseException {
542
+ constructor(opts) {
543
+ super({
544
+ name: "UnableToRollbackStageException",
545
+ $fault: "client",
546
+ ...opts,
547
+ });
548
+ this.name = "UnableToRollbackStageException";
549
+ this.$fault = "client";
550
+ Object.setPrototypeOf(this, UnableToRollbackStageException.prototype);
551
+ }
552
+ }
520
553
  export class ConcurrentPipelineExecutionsLimitExceededException extends __BaseException {
521
554
  constructor(opts) {
522
555
  super({
@@ -3,7 +3,7 @@ import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { CodePipelineServiceException as __BaseException } from "../models/CodePipelineServiceException";
6
- import { ActionNotFoundException, ActionTypeNotFoundException, ApprovalAlreadyCompletedException, ConcurrentModificationException, ConcurrentPipelineExecutionsLimitExceededException, ConflictException, DuplicatedStopRequestException, InvalidActionDeclarationException, InvalidApprovalTokenException, InvalidArnException, InvalidBlockerDeclarationException, InvalidClientTokenException, InvalidJobException, InvalidJobStateException, InvalidNextTokenException, InvalidNonceException, InvalidStageDeclarationException, InvalidStructureException, InvalidTagsException, InvalidWebhookAuthenticationParametersException, InvalidWebhookFilterPatternException, JobNotFoundException, LimitExceededException, NotLatestPipelineExecutionException, OutputVariablesSizeExceededException, PipelineExecutionNotFoundException, PipelineExecutionNotStoppableException, PipelineNameInUseException, PipelineNotFoundException, PipelineVersionNotFoundException, RequestFailedException, ResourceNotFoundException, StageNotFoundException, StageNotRetryableException, TooManyTagsException, ValidationException, WebhookNotFoundException, } from "../models/models_0";
6
+ import { ActionNotFoundException, ActionTypeNotFoundException, ApprovalAlreadyCompletedException, ConcurrentModificationException, ConcurrentPipelineExecutionsLimitExceededException, ConflictException, DuplicatedStopRequestException, InvalidActionDeclarationException, InvalidApprovalTokenException, InvalidArnException, InvalidBlockerDeclarationException, InvalidClientTokenException, InvalidJobException, InvalidJobStateException, InvalidNextTokenException, InvalidNonceException, InvalidStageDeclarationException, InvalidStructureException, InvalidTagsException, InvalidWebhookAuthenticationParametersException, InvalidWebhookFilterPatternException, JobNotFoundException, LimitExceededException, NotLatestPipelineExecutionException, OutputVariablesSizeExceededException, PipelineExecutionNotFoundException, PipelineExecutionNotStoppableException, PipelineExecutionOutdatedException, PipelineNameInUseException, PipelineNotFoundException, PipelineVersionNotFoundException, RequestFailedException, ResourceNotFoundException, StageNotFoundException, StageNotRetryableException, TooManyTagsException, UnableToRollbackStageException, ValidationException, WebhookNotFoundException, } from "../models/models_0";
7
7
  export const se_AcknowledgeJobCommand = async (input, context) => {
8
8
  const headers = sharedHeaders("AcknowledgeJob");
9
9
  let body;
@@ -202,6 +202,12 @@ export const se_RetryStageExecutionCommand = async (input, context) => {
202
202
  body = JSON.stringify(_json(input));
203
203
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
204
204
  };
205
+ export const se_RollbackStageCommand = async (input, context) => {
206
+ const headers = sharedHeaders("RollbackStage");
207
+ let body;
208
+ body = JSON.stringify(_json(input));
209
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
+ };
205
211
  export const se_StartPipelineExecutionCommand = async (input, context) => {
206
212
  const headers = sharedHeaders("StartPipelineExecution");
207
213
  let body;
@@ -643,6 +649,19 @@ export const de_RetryStageExecutionCommand = async (output, context) => {
643
649
  };
644
650
  return response;
645
651
  };
652
+ export const de_RollbackStageCommand = async (output, context) => {
653
+ if (output.statusCode >= 300) {
654
+ return de_CommandError(output, context);
655
+ }
656
+ const data = await parseBody(output.body, context);
657
+ let contents = {};
658
+ contents = _json(data);
659
+ const response = {
660
+ $metadata: deserializeMetadata(output),
661
+ ...contents,
662
+ };
663
+ return response;
664
+ };
646
665
  export const de_StartPipelineExecutionCommand = async (output, context) => {
647
666
  if (output.statusCode >= 300) {
648
667
  return de_CommandError(output, context);
@@ -824,6 +843,12 @@ const de_CommandError = async (output, context) => {
824
843
  case "StageNotRetryableException":
825
844
  case "com.amazonaws.codepipeline#StageNotRetryableException":
826
845
  throw await de_StageNotRetryableExceptionRes(parsedOutput, context);
846
+ case "PipelineExecutionOutdatedException":
847
+ case "com.amazonaws.codepipeline#PipelineExecutionOutdatedException":
848
+ throw await de_PipelineExecutionOutdatedExceptionRes(parsedOutput, context);
849
+ case "UnableToRollbackStageException":
850
+ case "com.amazonaws.codepipeline#UnableToRollbackStageException":
851
+ throw await de_UnableToRollbackStageExceptionRes(parsedOutput, context);
827
852
  case "ConcurrentPipelineExecutionsLimitExceededException":
828
853
  case "com.amazonaws.codepipeline#ConcurrentPipelineExecutionsLimitExceededException":
829
854
  throw await de_ConcurrentPipelineExecutionsLimitExceededExceptionRes(parsedOutput, context);
@@ -1088,6 +1113,15 @@ const de_PipelineExecutionNotStoppableExceptionRes = async (parsedOutput, contex
1088
1113
  });
1089
1114
  return __decorateServiceException(exception, body);
1090
1115
  };
1116
+ const de_PipelineExecutionOutdatedExceptionRes = async (parsedOutput, context) => {
1117
+ const body = parsedOutput.body;
1118
+ const deserialized = _json(body);
1119
+ const exception = new PipelineExecutionOutdatedException({
1120
+ $metadata: deserializeMetadata(parsedOutput),
1121
+ ...deserialized,
1122
+ });
1123
+ return __decorateServiceException(exception, body);
1124
+ };
1091
1125
  const de_PipelineNameInUseExceptionRes = async (parsedOutput, context) => {
1092
1126
  const body = parsedOutput.body;
1093
1127
  const deserialized = _json(body);
@@ -1160,6 +1194,15 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1160
1194
  });
1161
1195
  return __decorateServiceException(exception, body);
1162
1196
  };
1197
+ const de_UnableToRollbackStageExceptionRes = async (parsedOutput, context) => {
1198
+ const body = parsedOutput.body;
1199
+ const deserialized = _json(body);
1200
+ const exception = new UnableToRollbackStageException({
1201
+ $metadata: deserializeMetadata(parsedOutput),
1202
+ ...deserialized,
1203
+ });
1204
+ return __decorateServiceException(exception, body);
1205
+ };
1163
1206
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1164
1207
  const body = parsedOutput.body;
1165
1208
  const deserialized = _json(body);
@@ -1365,9 +1408,11 @@ const de_PipelineExecution = (output, context) => {
1365
1408
  return take(output, {
1366
1409
  artifactRevisions: (_) => de_ArtifactRevisionList(_, context),
1367
1410
  executionMode: __expectString,
1411
+ executionType: __expectString,
1368
1412
  pipelineExecutionId: __expectString,
1369
1413
  pipelineName: __expectString,
1370
1414
  pipelineVersion: __expectInt32,
1415
+ rollbackMetadata: _json,
1371
1416
  status: __expectString,
1372
1417
  statusSummary: __expectString,
1373
1418
  trigger: _json,
@@ -1377,11 +1422,14 @@ const de_PipelineExecution = (output, context) => {
1377
1422
  const de_PipelineExecutionSummary = (output, context) => {
1378
1423
  return take(output, {
1379
1424
  executionMode: __expectString,
1425
+ executionType: __expectString,
1380
1426
  lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1381
1427
  pipelineExecutionId: __expectString,
1428
+ rollbackMetadata: _json,
1382
1429
  sourceRevisions: _json,
1383
1430
  startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1384
1431
  status: __expectString,
1432
+ statusSummary: __expectString,
1385
1433
  stopTrigger: _json,
1386
1434
  trigger: _json,
1387
1435
  });
@@ -33,6 +33,7 @@ import { PutThirdPartyJobSuccessResultCommandInput, PutThirdPartyJobSuccessResul
33
33
  import { PutWebhookCommandInput, PutWebhookCommandOutput } from "./commands/PutWebhookCommand";
34
34
  import { RegisterWebhookWithThirdPartyCommandInput, RegisterWebhookWithThirdPartyCommandOutput } from "./commands/RegisterWebhookWithThirdPartyCommand";
35
35
  import { RetryStageExecutionCommandInput, RetryStageExecutionCommandOutput } from "./commands/RetryStageExecutionCommand";
36
+ import { RollbackStageCommandInput, RollbackStageCommandOutput } from "./commands/RollbackStageCommand";
36
37
  import { StartPipelineExecutionCommandInput, StartPipelineExecutionCommandOutput } from "./commands/StartPipelineExecutionCommand";
37
38
  import { StopPipelineExecutionCommandInput, StopPipelineExecutionCommandOutput } from "./commands/StopPipelineExecutionCommand";
38
39
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
@@ -243,6 +244,12 @@ export interface CodePipeline {
243
244
  retryStageExecution(args: RetryStageExecutionCommandInput, options?: __HttpHandlerOptions): Promise<RetryStageExecutionCommandOutput>;
244
245
  retryStageExecution(args: RetryStageExecutionCommandInput, cb: (err: any, data?: RetryStageExecutionCommandOutput) => void): void;
245
246
  retryStageExecution(args: RetryStageExecutionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RetryStageExecutionCommandOutput) => void): void;
247
+ /**
248
+ * @see {@link RollbackStageCommand}
249
+ */
250
+ rollbackStage(args: RollbackStageCommandInput, options?: __HttpHandlerOptions): Promise<RollbackStageCommandOutput>;
251
+ rollbackStage(args: RollbackStageCommandInput, cb: (err: any, data?: RollbackStageCommandOutput) => void): void;
252
+ rollbackStage(args: RollbackStageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RollbackStageCommandOutput) => void): void;
246
253
  /**
247
254
  * @see {@link StartPipelineExecutionCommand}
248
255
  */
@@ -40,6 +40,7 @@ import { PutThirdPartyJobSuccessResultCommandInput, PutThirdPartyJobSuccessResul
40
40
  import { PutWebhookCommandInput, PutWebhookCommandOutput } from "./commands/PutWebhookCommand";
41
41
  import { RegisterWebhookWithThirdPartyCommandInput, RegisterWebhookWithThirdPartyCommandOutput } from "./commands/RegisterWebhookWithThirdPartyCommand";
42
42
  import { RetryStageExecutionCommandInput, RetryStageExecutionCommandOutput } from "./commands/RetryStageExecutionCommand";
43
+ import { RollbackStageCommandInput, RollbackStageCommandOutput } from "./commands/RollbackStageCommand";
43
44
  import { StartPipelineExecutionCommandInput, StartPipelineExecutionCommandOutput } from "./commands/StartPipelineExecutionCommand";
44
45
  import { StopPipelineExecutionCommandInput, StopPipelineExecutionCommandOutput } from "./commands/StopPipelineExecutionCommand";
45
46
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
@@ -52,11 +53,11 @@ export { __Client };
52
53
  /**
53
54
  * @public
54
55
  */
55
- export type ServiceInputTypes = AcknowledgeJobCommandInput | AcknowledgeThirdPartyJobCommandInput | CreateCustomActionTypeCommandInput | CreatePipelineCommandInput | DeleteCustomActionTypeCommandInput | DeletePipelineCommandInput | DeleteWebhookCommandInput | DeregisterWebhookWithThirdPartyCommandInput | DisableStageTransitionCommandInput | EnableStageTransitionCommandInput | GetActionTypeCommandInput | GetJobDetailsCommandInput | GetPipelineCommandInput | GetPipelineExecutionCommandInput | GetPipelineStateCommandInput | GetThirdPartyJobDetailsCommandInput | ListActionExecutionsCommandInput | ListActionTypesCommandInput | ListPipelineExecutionsCommandInput | ListPipelinesCommandInput | ListTagsForResourceCommandInput | ListWebhooksCommandInput | PollForJobsCommandInput | PollForThirdPartyJobsCommandInput | PutActionRevisionCommandInput | PutApprovalResultCommandInput | PutJobFailureResultCommandInput | PutJobSuccessResultCommandInput | PutThirdPartyJobFailureResultCommandInput | PutThirdPartyJobSuccessResultCommandInput | PutWebhookCommandInput | RegisterWebhookWithThirdPartyCommandInput | RetryStageExecutionCommandInput | StartPipelineExecutionCommandInput | StopPipelineExecutionCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateActionTypeCommandInput | UpdatePipelineCommandInput;
56
+ export type ServiceInputTypes = AcknowledgeJobCommandInput | AcknowledgeThirdPartyJobCommandInput | CreateCustomActionTypeCommandInput | CreatePipelineCommandInput | DeleteCustomActionTypeCommandInput | DeletePipelineCommandInput | DeleteWebhookCommandInput | DeregisterWebhookWithThirdPartyCommandInput | DisableStageTransitionCommandInput | EnableStageTransitionCommandInput | GetActionTypeCommandInput | GetJobDetailsCommandInput | GetPipelineCommandInput | GetPipelineExecutionCommandInput | GetPipelineStateCommandInput | GetThirdPartyJobDetailsCommandInput | ListActionExecutionsCommandInput | ListActionTypesCommandInput | ListPipelineExecutionsCommandInput | ListPipelinesCommandInput | ListTagsForResourceCommandInput | ListWebhooksCommandInput | PollForJobsCommandInput | PollForThirdPartyJobsCommandInput | PutActionRevisionCommandInput | PutApprovalResultCommandInput | PutJobFailureResultCommandInput | PutJobSuccessResultCommandInput | PutThirdPartyJobFailureResultCommandInput | PutThirdPartyJobSuccessResultCommandInput | PutWebhookCommandInput | RegisterWebhookWithThirdPartyCommandInput | RetryStageExecutionCommandInput | RollbackStageCommandInput | StartPipelineExecutionCommandInput | StopPipelineExecutionCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateActionTypeCommandInput | UpdatePipelineCommandInput;
56
57
  /**
57
58
  * @public
58
59
  */
59
- export type ServiceOutputTypes = AcknowledgeJobCommandOutput | AcknowledgeThirdPartyJobCommandOutput | CreateCustomActionTypeCommandOutput | CreatePipelineCommandOutput | DeleteCustomActionTypeCommandOutput | DeletePipelineCommandOutput | DeleteWebhookCommandOutput | DeregisterWebhookWithThirdPartyCommandOutput | DisableStageTransitionCommandOutput | EnableStageTransitionCommandOutput | GetActionTypeCommandOutput | GetJobDetailsCommandOutput | GetPipelineCommandOutput | GetPipelineExecutionCommandOutput | GetPipelineStateCommandOutput | GetThirdPartyJobDetailsCommandOutput | ListActionExecutionsCommandOutput | ListActionTypesCommandOutput | ListPipelineExecutionsCommandOutput | ListPipelinesCommandOutput | ListTagsForResourceCommandOutput | ListWebhooksCommandOutput | PollForJobsCommandOutput | PollForThirdPartyJobsCommandOutput | PutActionRevisionCommandOutput | PutApprovalResultCommandOutput | PutJobFailureResultCommandOutput | PutJobSuccessResultCommandOutput | PutThirdPartyJobFailureResultCommandOutput | PutThirdPartyJobSuccessResultCommandOutput | PutWebhookCommandOutput | RegisterWebhookWithThirdPartyCommandOutput | RetryStageExecutionCommandOutput | StartPipelineExecutionCommandOutput | StopPipelineExecutionCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateActionTypeCommandOutput | UpdatePipelineCommandOutput;
60
+ export type ServiceOutputTypes = AcknowledgeJobCommandOutput | AcknowledgeThirdPartyJobCommandOutput | CreateCustomActionTypeCommandOutput | CreatePipelineCommandOutput | DeleteCustomActionTypeCommandOutput | DeletePipelineCommandOutput | DeleteWebhookCommandOutput | DeregisterWebhookWithThirdPartyCommandOutput | DisableStageTransitionCommandOutput | EnableStageTransitionCommandOutput | GetActionTypeCommandOutput | GetJobDetailsCommandOutput | GetPipelineCommandOutput | GetPipelineExecutionCommandOutput | GetPipelineStateCommandOutput | GetThirdPartyJobDetailsCommandOutput | ListActionExecutionsCommandOutput | ListActionTypesCommandOutput | ListPipelineExecutionsCommandOutput | ListPipelinesCommandOutput | ListTagsForResourceCommandOutput | ListWebhooksCommandOutput | PollForJobsCommandOutput | PollForThirdPartyJobsCommandOutput | PutActionRevisionCommandOutput | PutApprovalResultCommandOutput | PutJobFailureResultCommandOutput | PutJobSuccessResultCommandOutput | PutThirdPartyJobFailureResultCommandOutput | PutThirdPartyJobSuccessResultCommandOutput | PutWebhookCommandOutput | RegisterWebhookWithThirdPartyCommandOutput | RetryStageExecutionCommandOutput | RollbackStageCommandOutput | StartPipelineExecutionCommandOutput | StopPipelineExecutionCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateActionTypeCommandOutput | UpdatePipelineCommandOutput;
60
61
  /**
61
62
  * @public
62
63
  */
@@ -99,6 +99,9 @@ declare const CreatePipelineCommand_base: {
99
99
  * timeoutInMinutes: Number("int"),
100
100
  * },
101
101
  * ],
102
+ * onFailure: { // FailureConditions
103
+ * result: "ROLLBACK",
104
+ * },
102
105
  * },
103
106
  * ],
104
107
  * version: Number("int"),
@@ -240,6 +243,9 @@ declare const CreatePipelineCommand_base: {
240
243
  * // timeoutInMinutes: Number("int"),
241
244
  * // },
242
245
  * // ],
246
+ * // onFailure: { // FailureConditions
247
+ * // result: "ROLLBACK",
248
+ * // },
243
249
  * // },
244
250
  * // ],
245
251
  * // version: Number("int"),
@@ -101,6 +101,9 @@ declare const GetPipelineCommand_base: {
101
101
  * // timeoutInMinutes: Number("int"),
102
102
  * // },
103
103
  * // ],
104
+ * // onFailure: { // FailureConditions
105
+ * // result: "ROLLBACK",
106
+ * // },
104
107
  * // },
105
108
  * // ],
106
109
  * // version: Number("int"),
@@ -65,10 +65,14 @@ declare const GetPipelineExecutionCommand_base: {
65
65
  * // },
66
66
  * // ],
67
67
  * // trigger: { // ExecutionTrigger
68
- * // triggerType: "CreatePipeline" || "StartPipelineExecution" || "PollForSourceChanges" || "Webhook" || "CloudWatchEvent" || "PutActionRevision" || "WebhookV2",
68
+ * // triggerType: "CreatePipeline" || "StartPipelineExecution" || "PollForSourceChanges" || "Webhook" || "CloudWatchEvent" || "PutActionRevision" || "WebhookV2" || "ManualRollback" || "AutomatedRollback",
69
69
  * // triggerDetail: "STRING_VALUE",
70
70
  * // },
71
71
  * // executionMode: "QUEUED" || "SUPERSEDED" || "PARALLEL",
72
+ * // executionType: "STANDARD" || "ROLLBACK",
73
+ * // rollbackMetadata: { // PipelineRollbackMetadata
74
+ * // rollbackTargetPipelineExecutionId: "STRING_VALUE",
75
+ * // },
72
76
  * // },
73
77
  * // };
74
78
  *
@@ -53,11 +53,13 @@ declare const GetPipelineStateCommand_base: {
53
53
  * // inboundExecution: { // StageExecution
54
54
  * // pipelineExecutionId: "STRING_VALUE", // required
55
55
  * // status: "Cancelled" || "InProgress" || "Failed" || "Stopped" || "Stopping" || "Succeeded", // required
56
+ * // type: "STANDARD" || "ROLLBACK",
56
57
  * // },
57
58
  * // inboundExecutions: [ // StageExecutionList
58
59
  * // {
59
60
  * // pipelineExecutionId: "STRING_VALUE", // required
60
61
  * // status: "Cancelled" || "InProgress" || "Failed" || "Stopped" || "Stopping" || "Succeeded", // required
62
+ * // type: "STANDARD" || "ROLLBACK",
61
63
  * // },
62
64
  * // ],
63
65
  * // inboundTransitionState: { // TransitionState
@@ -96,6 +98,7 @@ declare const GetPipelineStateCommand_base: {
96
98
  * // latestExecution: {
97
99
  * // pipelineExecutionId: "STRING_VALUE", // required
98
100
  * // status: "Cancelled" || "InProgress" || "Failed" || "Stopped" || "Stopping" || "Succeeded", // required
101
+ * // type: "STANDARD" || "ROLLBACK",
99
102
  * // },
100
103
  * // },
101
104
  * // ],