@aws-sdk/client-arc-region-switch 3.901.0 → 3.907.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.
Files changed (2) hide show
  1. package/dist-cjs/index.js +1728 -1858
  2. package/package.json +6 -6
package/dist-cjs/index.js CHANGED
@@ -1,1932 +1,1802 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- ARCRegionSwitch: () => ARCRegionSwitch,
25
- ARCRegionSwitchClient: () => ARCRegionSwitchClient,
26
- ARCRegionSwitchServiceException: () => ARCRegionSwitchServiceException,
27
- AccessDeniedException: () => AccessDeniedException,
28
- AlarmCondition: () => AlarmCondition,
29
- AlarmType: () => AlarmType,
30
- Approval: () => Approval,
31
- ApprovePlanExecutionStepCommand: () => ApprovePlanExecutionStepCommand,
32
- CancelPlanExecutionCommand: () => CancelPlanExecutionCommand,
33
- CreatePlanCommand: () => CreatePlanCommand,
34
- DeletePlanCommand: () => DeletePlanCommand,
35
- Ec2AsgCapacityMonitoringApproach: () => Ec2AsgCapacityMonitoringApproach,
36
- EcsCapacityMonitoringApproach: () => EcsCapacityMonitoringApproach,
37
- EksCapacityMonitoringApproach: () => EksCapacityMonitoringApproach,
38
- EvaluationStatus: () => EvaluationStatus,
39
- ExecutionAction: () => ExecutionAction,
40
- ExecutionBlockConfiguration: () => ExecutionBlockConfiguration,
41
- ExecutionBlockType: () => ExecutionBlockType,
42
- ExecutionEventType: () => ExecutionEventType,
43
- ExecutionMode: () => ExecutionMode,
44
- ExecutionState: () => ExecutionState,
45
- GetPlanCommand: () => GetPlanCommand,
46
- GetPlanEvaluationStatusCommand: () => GetPlanEvaluationStatusCommand,
47
- GetPlanExecutionCommand: () => GetPlanExecutionCommand,
48
- GetPlanInRegionCommand: () => GetPlanInRegionCommand,
49
- GlobalAuroraDefaultBehavior: () => GlobalAuroraDefaultBehavior,
50
- GlobalAuroraUngracefulBehavior: () => GlobalAuroraUngracefulBehavior,
51
- IllegalArgumentException: () => IllegalArgumentException,
52
- IllegalStateException: () => IllegalStateException,
53
- InternalServerException: () => InternalServerException,
54
- LambdaUngracefulBehavior: () => LambdaUngracefulBehavior,
55
- ListPlanExecutionEventsCommand: () => ListPlanExecutionEventsCommand,
56
- ListPlanExecutionsCommand: () => ListPlanExecutionsCommand,
57
- ListPlansCommand: () => ListPlansCommand,
58
- ListPlansInRegionCommand: () => ListPlansInRegionCommand,
59
- ListRoute53HealthChecksCommand: () => ListRoute53HealthChecksCommand,
60
- ListTagsForResourceCommand: () => ListTagsForResourceCommand,
61
- RecoveryApproach: () => RecoveryApproach,
62
- RegionToRunIn: () => RegionToRunIn,
63
- ResourceNotFoundException: () => ResourceNotFoundException,
64
- ResourceWarningStatus: () => ResourceWarningStatus,
65
- RoutingControlStateChange: () => RoutingControlStateChange,
66
- StartPlanExecutionCommand: () => StartPlanExecutionCommand,
67
- StepStatus: () => StepStatus,
68
- TagResourceCommand: () => TagResourceCommand,
69
- UntagResourceCommand: () => UntagResourceCommand,
70
- UpdatePlanCommand: () => UpdatePlanCommand,
71
- UpdatePlanExecutionAction: () => UpdatePlanExecutionAction,
72
- UpdatePlanExecutionCommand: () => UpdatePlanExecutionCommand,
73
- UpdatePlanExecutionStepAction: () => UpdatePlanExecutionStepAction,
74
- UpdatePlanExecutionStepCommand: () => UpdatePlanExecutionStepCommand,
75
- WorkflowTargetAction: () => WorkflowTargetAction,
76
- __Client: () => import_smithy_client.Client,
77
- paginateGetPlanEvaluationStatus: () => paginateGetPlanEvaluationStatus,
78
- paginateGetPlanExecution: () => paginateGetPlanExecution,
79
- paginateListPlanExecutionEvents: () => paginateListPlanExecutionEvents,
80
- paginateListPlanExecutions: () => paginateListPlanExecutions,
81
- paginateListPlans: () => paginateListPlans,
82
- paginateListPlansInRegion: () => paginateListPlansInRegion,
83
- paginateListRoute53HealthChecks: () => paginateListRoute53HealthChecks,
84
- waitForPlanEvaluationStatusPassed: () => waitForPlanEvaluationStatusPassed,
85
- waitForPlanExecutionCompleted: () => waitForPlanExecutionCompleted,
86
- waitUntilPlanEvaluationStatusPassed: () => waitUntilPlanEvaluationStatusPassed,
87
- waitUntilPlanExecutionCompleted: () => waitUntilPlanExecutionCompleted
88
- });
89
- module.exports = __toCommonJS(index_exports);
90
-
91
- // src/ARCRegionSwitchClient.ts
92
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
93
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
94
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
95
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
96
- var import_config_resolver = require("@smithy/config-resolver");
97
- var import_core = require("@smithy/core");
98
- var import_middleware_content_length = require("@smithy/middleware-content-length");
99
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
100
- var import_middleware_retry = require("@smithy/middleware-retry");
101
-
102
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
103
-
104
- // src/endpoint/EndpointParameters.ts
105
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
106
- return Object.assign(options, {
107
- useFipsEndpoint: options.useFipsEndpoint ?? false,
108
- defaultSigningName: "arc-region-switch"
109
- });
110
- }, "resolveClientEndpointParameters");
111
- var commonParams = {
112
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
113
- Endpoint: { type: "builtInParams", name: "endpoint" },
114
- Region: { type: "builtInParams", name: "region" }
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
19
+ var utilWaiter = require('@smithy/util-waiter');
20
+
21
+ const resolveClientEndpointParameters = (options) => {
22
+ return Object.assign(options, {
23
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
24
+ defaultSigningName: "arc-region-switch",
25
+ });
26
+ };
27
+ const commonParams = {
28
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
29
+ Endpoint: { type: "builtInParams", name: "endpoint" },
30
+ Region: { type: "builtInParams", name: "region" },
115
31
  };
116
32
 
117
- // src/ARCRegionSwitchClient.ts
118
- var import_runtimeConfig = require("././runtimeConfig");
33
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
34
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
35
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
36
+ let _credentials = runtimeConfig.credentials;
37
+ return {
38
+ setHttpAuthScheme(httpAuthScheme) {
39
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
40
+ if (index === -1) {
41
+ _httpAuthSchemes.push(httpAuthScheme);
42
+ }
43
+ else {
44
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
45
+ }
46
+ },
47
+ httpAuthSchemes() {
48
+ return _httpAuthSchemes;
49
+ },
50
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
51
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
52
+ },
53
+ httpAuthSchemeProvider() {
54
+ return _httpAuthSchemeProvider;
55
+ },
56
+ setCredentials(credentials) {
57
+ _credentials = credentials;
58
+ },
59
+ credentials() {
60
+ return _credentials;
61
+ },
62
+ };
63
+ };
64
+ const resolveHttpAuthRuntimeConfig = (config) => {
65
+ return {
66
+ httpAuthSchemes: config.httpAuthSchemes(),
67
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
68
+ credentials: config.credentials(),
69
+ };
70
+ };
119
71
 
120
- // src/runtimeExtensions.ts
121
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
122
- var import_protocol_http = require("@smithy/protocol-http");
123
- var import_smithy_client = require("@smithy/smithy-client");
72
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
73
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
74
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
75
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
76
+ };
124
77
 
125
- // src/auth/httpAuthExtensionConfiguration.ts
126
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
127
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
128
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
129
- let _credentials = runtimeConfig.credentials;
130
- return {
131
- setHttpAuthScheme(httpAuthScheme) {
132
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
133
- if (index === -1) {
134
- _httpAuthSchemes.push(httpAuthScheme);
135
- } else {
136
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
137
- }
138
- },
139
- httpAuthSchemes() {
140
- return _httpAuthSchemes;
141
- },
142
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
143
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
144
- },
145
- httpAuthSchemeProvider() {
146
- return _httpAuthSchemeProvider;
147
- },
148
- setCredentials(credentials) {
149
- _credentials = credentials;
150
- },
151
- credentials() {
152
- return _credentials;
78
+ class ARCRegionSwitchClient extends smithyClient.Client {
79
+ config;
80
+ constructor(...[configuration]) {
81
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
82
+ super(_config_0);
83
+ this.initConfig = _config_0;
84
+ const _config_1 = resolveClientEndpointParameters(_config_0);
85
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
86
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
87
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
88
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
89
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
90
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
91
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
92
+ this.config = _config_8;
93
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
94
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
95
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
96
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
97
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
98
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
99
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
100
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultARCRegionSwitchHttpAuthSchemeParametersProvider,
101
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
102
+ "aws.auth#sigv4": config.credentials,
103
+ }),
104
+ }));
105
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
153
106
  }
154
- };
155
- }, "getHttpAuthExtensionConfiguration");
156
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
157
- return {
158
- httpAuthSchemes: config.httpAuthSchemes(),
159
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
160
- credentials: config.credentials()
161
- };
162
- }, "resolveHttpAuthRuntimeConfig");
107
+ destroy() {
108
+ super.destroy();
109
+ }
110
+ }
163
111
 
164
- // src/runtimeExtensions.ts
165
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
166
- const extensionConfiguration = Object.assign(
167
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
168
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
169
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
170
- getHttpAuthExtensionConfiguration(runtimeConfig)
171
- );
172
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
173
- return Object.assign(
174
- runtimeConfig,
175
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
176
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
177
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
178
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
179
- );
180
- }, "resolveRuntimeExtensions");
112
+ class ARCRegionSwitchServiceException extends smithyClient.ServiceException {
113
+ constructor(options) {
114
+ super(options);
115
+ Object.setPrototypeOf(this, ARCRegionSwitchServiceException.prototype);
116
+ }
117
+ }
181
118
 
182
- // src/ARCRegionSwitchClient.ts
183
- var ARCRegionSwitchClient = class extends import_smithy_client.Client {
184
- static {
185
- __name(this, "ARCRegionSwitchClient");
186
- }
187
- /**
188
- * The resolved configuration of ARCRegionSwitchClient class. This is resolved and normalized from the {@link ARCRegionSwitchClientConfig | constructor configuration interface}.
189
- */
190
- config;
191
- constructor(...[configuration]) {
192
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
193
- super(_config_0);
194
- this.initConfig = _config_0;
195
- const _config_1 = resolveClientEndpointParameters(_config_0);
196
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
197
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
198
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
199
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
200
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
201
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
202
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
203
- this.config = _config_8;
204
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
205
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
206
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
207
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
208
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
209
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
210
- this.middlewareStack.use(
211
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
212
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultARCRegionSwitchHttpAuthSchemeParametersProvider,
213
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
214
- "aws.auth#sigv4": config.credentials
215
- }), "identityProviderConfigProvider")
216
- })
217
- );
218
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
219
- }
220
- /**
221
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
222
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
223
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
224
- */
225
- destroy() {
226
- super.destroy();
227
- }
119
+ const ExecutionAction = {
120
+ ACTIVATE: "activate",
121
+ DEACTIVATE: "deactivate",
228
122
  };
229
-
230
- // src/ARCRegionSwitch.ts
231
-
232
-
233
- // src/commands/ApprovePlanExecutionStepCommand.ts
234
-
235
- var import_middleware_serde = require("@smithy/middleware-serde");
236
-
237
-
238
- // src/protocols/Aws_json1_0.ts
239
- var import_core2 = require("@aws-sdk/core");
240
-
241
-
242
-
243
- // src/models/ARCRegionSwitchServiceException.ts
244
-
245
- var ARCRegionSwitchServiceException = class _ARCRegionSwitchServiceException extends import_smithy_client.ServiceException {
246
- static {
247
- __name(this, "ARCRegionSwitchServiceException");
248
- }
249
- /**
250
- * @internal
251
- */
252
- constructor(options) {
253
- super(options);
254
- Object.setPrototypeOf(this, _ARCRegionSwitchServiceException.prototype);
255
- }
123
+ const ExecutionState = {
124
+ CANCELLED: "canceled",
125
+ COMPLETED: "completed",
126
+ COMPLETED_MONITORING_APPLICATION_HEALTH: "completedMonitoringApplicationHealth",
127
+ COMPLETED_WITH_EXCEPTIONS: "completedWithExceptions",
128
+ FAILED: "failed",
129
+ IN_PROGRESS: "inProgress",
130
+ PAUSED_BY_FAILED_STEP: "pausedByFailedStep",
131
+ PAUSED_BY_OPERATOR: "pausedByOperator",
132
+ PENDING: "pending",
133
+ PENDING_MANUAL_APPROVAL: "pendingManualApproval",
134
+ PLAN_EXECUTION_TIMED_OUT: "planExecutionTimedOut",
256
135
  };
136
+ const ExecutionMode = {
137
+ GRACEFUL: "graceful",
138
+ UNGRACEFUL: "ungraceful",
139
+ };
140
+ const RecoveryApproach = {
141
+ ACTIVE_ACTIVE: "activeActive",
142
+ ACTIVE_PASSIVE: "activePassive",
143
+ };
144
+ class AccessDeniedException extends ARCRegionSwitchServiceException {
145
+ name = "AccessDeniedException";
146
+ $fault = "client";
147
+ constructor(opts) {
148
+ super({
149
+ name: "AccessDeniedException",
150
+ $fault: "client",
151
+ ...opts,
152
+ });
153
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
154
+ }
155
+ }
156
+ const AlarmCondition = {
157
+ GREEN: "green",
158
+ RED: "red",
159
+ };
160
+ const AlarmType = {
161
+ APPLICATION_HEALTH: "applicationHealth",
162
+ TRIGGER: "trigger",
163
+ };
164
+ const Approval = {
165
+ APPROVE: "approve",
166
+ DECLINE: "decline",
167
+ };
168
+ class ResourceNotFoundException extends ARCRegionSwitchServiceException {
169
+ name = "ResourceNotFoundException";
170
+ $fault = "client";
171
+ constructor(opts) {
172
+ super({
173
+ name: "ResourceNotFoundException",
174
+ $fault: "client",
175
+ ...opts,
176
+ });
177
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
178
+ }
179
+ }
180
+ const EvaluationStatus = {
181
+ ACTION_REQUIRED: "actionRequired",
182
+ PASSED: "passed",
183
+ PENDING_EVALUATION: "pendingEvaluation",
184
+ UNKNOWN: "unknown",
185
+ };
186
+ const ResourceWarningStatus = {
187
+ ACTIVE: "active",
188
+ RESOLVED: "resolved",
189
+ };
190
+ const WorkflowTargetAction = {
191
+ ACTIVATE: "activate",
192
+ DEACTIVATE: "deactivate",
193
+ };
194
+ const RoutingControlStateChange = {
195
+ OFF: "Off",
196
+ ON: "On",
197
+ };
198
+ const RegionToRunIn = {
199
+ ACTIVATING_REGION: "activatingRegion",
200
+ DEACTIVATING_REGION: "deactivatingRegion",
201
+ };
202
+ const LambdaUngracefulBehavior = {
203
+ SKIP: "skip",
204
+ };
205
+ const Ec2AsgCapacityMonitoringApproach = {
206
+ AUTOSCALING_MAX_IN_LAST_24_HOURS: "autoscalingMaxInLast24Hours",
207
+ SAMPLED_MAX_IN_LAST_24_HOURS: "sampledMaxInLast24Hours",
208
+ };
209
+ const EcsCapacityMonitoringApproach = {
210
+ CONTAINER_INSIGHTS_MAX_IN_LAST_24_HOURS: "containerInsightsMaxInLast24Hours",
211
+ SAMPLED_MAX_IN_LAST_24_HOURS: "sampledMaxInLast24Hours",
212
+ };
213
+ const EksCapacityMonitoringApproach = {
214
+ SAMPLED_MAX_IN_LAST_24_HOURS: "sampledMaxInLast24Hours",
215
+ };
216
+ const GlobalAuroraDefaultBehavior = {
217
+ FAILOVER: "failover",
218
+ SWITCHOVER_ONLY: "switchoverOnly",
219
+ };
220
+ const GlobalAuroraUngracefulBehavior = {
221
+ FAILOVER: "failover",
222
+ };
223
+ const ExecutionBlockType = {
224
+ AURORA: "AuroraGlobalDatabase",
225
+ CUSTOM_ACTION_LAMBDA: "CustomActionLambda",
226
+ EC2_ASG: "EC2AutoScaling",
227
+ ECS: "ECSServiceScaling",
228
+ EKS_RESOURCE_SCALING: "EKSResourceScaling",
229
+ EXECUTION_APPROVAL: "ManualApproval",
230
+ PARALLEL: "Parallel",
231
+ REGION_SWITCH: "ARCRegionSwitchPlan",
232
+ ROUTE53_HEALTH_CHECK: "Route53HealthCheck",
233
+ ROUTING_CONTROL: "ARCRoutingControl",
234
+ };
235
+ const StepStatus = {
236
+ CANCELLED: "canceled",
237
+ COMPLETED: "completed",
238
+ FAILED: "failed",
239
+ NOT_STARTED: "notStarted",
240
+ PENDING_APPROVAL: "pendingApproval",
241
+ RUNNING: "running",
242
+ SKIPPED: "skipped",
243
+ };
244
+ const ExecutionEventType = {
245
+ EXECUTION_BEHAVIOR_CHANGED_TO_GRACEFUL: "executionBehaviorChangedToGraceful",
246
+ EXECUTION_BEHAVIOR_CHANGED_TO_UNGRACEFUL: "executionBehaviorChangedToUngraceful",
247
+ EXECUTION_CANCELED: "executionCanceled",
248
+ EXECUTION_CANCELING: "executionCanceling",
249
+ EXECUTION_FAILED: "executionFailed",
250
+ EXECUTION_PAUSED: "executionPaused",
251
+ EXECUTION_PAUSING: "executionPausing",
252
+ EXECUTION_PENDING: "executionPending",
253
+ EXECUTION_PENDING_APPROVAL: "executionPendingApproval",
254
+ EXECUTION_PENDING_CHILD_PLAN_MANUAL_APPROVAL: "executionPendingChildPlanManualApproval",
255
+ EXECUTION_STARTED: "executionStarted",
256
+ EXECUTION_SUCCEEDED: "executionSucceeded",
257
+ EXECUTION_SUCCESS_MONITORING_APPLICATION_HEALTH: "executionSuccessMonitoringApplicationHealth",
258
+ STEP_CANCELED: "stepCanceled",
259
+ STEP_EXECUTION_BEHAVIOR_CHANGED_TO_UNGRACEFUL: "stepExecutionBehaviorChangedToUngraceful",
260
+ STEP_FAILED: "stepFailed",
261
+ STEP_PAUSED_BY_ERROR: "stepPausedByError",
262
+ STEP_PAUSED_BY_OPERATOR: "stepPausedByOperator",
263
+ STEP_PENDING_APPLICATION_HEALTH_MONITOR: "stepPendingApplicationHealthMonitor",
264
+ STEP_PENDING_APPROVAL: "stepPendingApproval",
265
+ STEP_SKIPPED: "stepSkipped",
266
+ STEP_STARTED: "stepStarted",
267
+ STEP_SUCCEEDED: "stepSucceeded",
268
+ STEP_UPDATE: "stepUpdate",
269
+ UNKNOWN: "unknown",
270
+ };
271
+ class InternalServerException extends ARCRegionSwitchServiceException {
272
+ name = "InternalServerException";
273
+ $fault = "server";
274
+ constructor(opts) {
275
+ super({
276
+ name: "InternalServerException",
277
+ $fault: "server",
278
+ ...opts,
279
+ });
280
+ Object.setPrototypeOf(this, InternalServerException.prototype);
281
+ }
282
+ }
283
+ class IllegalStateException extends ARCRegionSwitchServiceException {
284
+ name = "IllegalStateException";
285
+ $fault = "client";
286
+ constructor(opts) {
287
+ super({
288
+ name: "IllegalStateException",
289
+ $fault: "client",
290
+ ...opts,
291
+ });
292
+ Object.setPrototypeOf(this, IllegalStateException.prototype);
293
+ }
294
+ }
295
+ class IllegalArgumentException extends ARCRegionSwitchServiceException {
296
+ name = "IllegalArgumentException";
297
+ $fault = "client";
298
+ constructor(opts) {
299
+ super({
300
+ name: "IllegalArgumentException",
301
+ $fault: "client",
302
+ ...opts,
303
+ });
304
+ Object.setPrototypeOf(this, IllegalArgumentException.prototype);
305
+ }
306
+ }
307
+ const UpdatePlanExecutionAction = {
308
+ PAUSE: "pause",
309
+ RESUME: "resume",
310
+ SWITCH_TO_GRACEFUL: "switchToGraceful",
311
+ SWITCH_TO_UNGRACEFUL: "switchToUngraceful",
312
+ };
313
+ const UpdatePlanExecutionStepAction = {
314
+ SKIP: "skip",
315
+ SWITCH_TO_UNGRACEFUL: "switchToUngraceful",
316
+ };
317
+ exports.ExecutionBlockConfiguration = void 0;
318
+ (function (ExecutionBlockConfiguration) {
319
+ ExecutionBlockConfiguration.visit = (value, visitor) => {
320
+ if (value.customActionLambdaConfig !== undefined)
321
+ return visitor.customActionLambdaConfig(value.customActionLambdaConfig);
322
+ if (value.ec2AsgCapacityIncreaseConfig !== undefined)
323
+ return visitor.ec2AsgCapacityIncreaseConfig(value.ec2AsgCapacityIncreaseConfig);
324
+ if (value.executionApprovalConfig !== undefined)
325
+ return visitor.executionApprovalConfig(value.executionApprovalConfig);
326
+ if (value.arcRoutingControlConfig !== undefined)
327
+ return visitor.arcRoutingControlConfig(value.arcRoutingControlConfig);
328
+ if (value.globalAuroraConfig !== undefined)
329
+ return visitor.globalAuroraConfig(value.globalAuroraConfig);
330
+ if (value.parallelConfig !== undefined)
331
+ return visitor.parallelConfig(value.parallelConfig);
332
+ if (value.regionSwitchPlanConfig !== undefined)
333
+ return visitor.regionSwitchPlanConfig(value.regionSwitchPlanConfig);
334
+ if (value.ecsCapacityIncreaseConfig !== undefined)
335
+ return visitor.ecsCapacityIncreaseConfig(value.ecsCapacityIncreaseConfig);
336
+ if (value.eksResourceScalingConfig !== undefined)
337
+ return visitor.eksResourceScalingConfig(value.eksResourceScalingConfig);
338
+ if (value.route53HealthCheckConfig !== undefined)
339
+ return visitor.route53HealthCheckConfig(value.route53HealthCheckConfig);
340
+ return visitor._(value.$unknown[0], value.$unknown[1]);
341
+ };
342
+ })(exports.ExecutionBlockConfiguration || (exports.ExecutionBlockConfiguration = {}));
257
343
 
258
- // src/models/models_0.ts
259
- var ExecutionAction = {
260
- ACTIVATE: "activate",
261
- DEACTIVATE: "deactivate"
262
- };
263
- var ExecutionState = {
264
- CANCELLED: "canceled",
265
- COMPLETED: "completed",
266
- COMPLETED_MONITORING_APPLICATION_HEALTH: "completedMonitoringApplicationHealth",
267
- COMPLETED_WITH_EXCEPTIONS: "completedWithExceptions",
268
- FAILED: "failed",
269
- IN_PROGRESS: "inProgress",
270
- PAUSED_BY_FAILED_STEP: "pausedByFailedStep",
271
- PAUSED_BY_OPERATOR: "pausedByOperator",
272
- PENDING: "pending",
273
- PENDING_MANUAL_APPROVAL: "pendingManualApproval",
274
- PLAN_EXECUTION_TIMED_OUT: "planExecutionTimedOut"
275
- };
276
- var ExecutionMode = {
277
- GRACEFUL: "graceful",
278
- UNGRACEFUL: "ungraceful"
279
- };
280
- var RecoveryApproach = {
281
- ACTIVE_ACTIVE: "activeActive",
282
- ACTIVE_PASSIVE: "activePassive"
283
- };
284
- var AccessDeniedException = class _AccessDeniedException extends ARCRegionSwitchServiceException {
285
- static {
286
- __name(this, "AccessDeniedException");
287
- }
288
- name = "AccessDeniedException";
289
- $fault = "client";
290
- /**
291
- * @internal
292
- */
293
- constructor(opts) {
294
- super({
295
- name: "AccessDeniedException",
296
- $fault: "client",
297
- ...opts
298
- });
299
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
300
- }
301
- };
302
- var AlarmCondition = {
303
- GREEN: "green",
304
- RED: "red"
305
- };
306
- var AlarmType = {
307
- APPLICATION_HEALTH: "applicationHealth",
308
- TRIGGER: "trigger"
309
- };
310
- var Approval = {
311
- APPROVE: "approve",
312
- DECLINE: "decline"
313
- };
314
- var ResourceNotFoundException = class _ResourceNotFoundException extends ARCRegionSwitchServiceException {
315
- static {
316
- __name(this, "ResourceNotFoundException");
317
- }
318
- name = "ResourceNotFoundException";
319
- $fault = "client";
320
- /**
321
- * @internal
322
- */
323
- constructor(opts) {
324
- super({
325
- name: "ResourceNotFoundException",
326
- $fault: "client",
327
- ...opts
328
- });
329
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
330
- }
331
- };
332
- var EvaluationStatus = {
333
- ACTION_REQUIRED: "actionRequired",
334
- PASSED: "passed",
335
- PENDING_EVALUATION: "pendingEvaluation",
336
- UNKNOWN: "unknown"
337
- };
338
- var ResourceWarningStatus = {
339
- ACTIVE: "active",
340
- RESOLVED: "resolved"
341
- };
342
- var WorkflowTargetAction = {
343
- ACTIVATE: "activate",
344
- DEACTIVATE: "deactivate"
345
- };
346
- var RoutingControlStateChange = {
347
- OFF: "Off",
348
- ON: "On"
349
- };
350
- var RegionToRunIn = {
351
- ACTIVATING_REGION: "activatingRegion",
352
- DEACTIVATING_REGION: "deactivatingRegion"
353
- };
354
- var LambdaUngracefulBehavior = {
355
- SKIP: "skip"
356
- };
357
- var Ec2AsgCapacityMonitoringApproach = {
358
- AUTOSCALING_MAX_IN_LAST_24_HOURS: "autoscalingMaxInLast24Hours",
359
- SAMPLED_MAX_IN_LAST_24_HOURS: "sampledMaxInLast24Hours"
360
- };
361
- var EcsCapacityMonitoringApproach = {
362
- CONTAINER_INSIGHTS_MAX_IN_LAST_24_HOURS: "containerInsightsMaxInLast24Hours",
363
- SAMPLED_MAX_IN_LAST_24_HOURS: "sampledMaxInLast24Hours"
364
- };
365
- var EksCapacityMonitoringApproach = {
366
- SAMPLED_MAX_IN_LAST_24_HOURS: "sampledMaxInLast24Hours"
367
- };
368
- var GlobalAuroraDefaultBehavior = {
369
- FAILOVER: "failover",
370
- SWITCHOVER_ONLY: "switchoverOnly"
371
- };
372
- var GlobalAuroraUngracefulBehavior = {
373
- FAILOVER: "failover"
374
- };
375
- var ExecutionBlockType = {
376
- AURORA: "AuroraGlobalDatabase",
377
- CUSTOM_ACTION_LAMBDA: "CustomActionLambda",
378
- EC2_ASG: "EC2AutoScaling",
379
- ECS: "ECSServiceScaling",
380
- EKS_RESOURCE_SCALING: "EKSResourceScaling",
381
- EXECUTION_APPROVAL: "ManualApproval",
382
- PARALLEL: "Parallel",
383
- REGION_SWITCH: "ARCRegionSwitchPlan",
384
- ROUTE53_HEALTH_CHECK: "Route53HealthCheck",
385
- ROUTING_CONTROL: "ARCRoutingControl"
386
- };
387
- var StepStatus = {
388
- CANCELLED: "canceled",
389
- COMPLETED: "completed",
390
- FAILED: "failed",
391
- NOT_STARTED: "notStarted",
392
- PENDING_APPROVAL: "pendingApproval",
393
- RUNNING: "running",
394
- SKIPPED: "skipped"
395
- };
396
- var ExecutionEventType = {
397
- EXECUTION_BEHAVIOR_CHANGED_TO_GRACEFUL: "executionBehaviorChangedToGraceful",
398
- EXECUTION_BEHAVIOR_CHANGED_TO_UNGRACEFUL: "executionBehaviorChangedToUngraceful",
399
- EXECUTION_CANCELED: "executionCanceled",
400
- EXECUTION_CANCELING: "executionCanceling",
401
- EXECUTION_FAILED: "executionFailed",
402
- EXECUTION_PAUSED: "executionPaused",
403
- EXECUTION_PAUSING: "executionPausing",
404
- EXECUTION_PENDING: "executionPending",
405
- EXECUTION_PENDING_APPROVAL: "executionPendingApproval",
406
- EXECUTION_PENDING_CHILD_PLAN_MANUAL_APPROVAL: "executionPendingChildPlanManualApproval",
407
- EXECUTION_STARTED: "executionStarted",
408
- EXECUTION_SUCCEEDED: "executionSucceeded",
409
- EXECUTION_SUCCESS_MONITORING_APPLICATION_HEALTH: "executionSuccessMonitoringApplicationHealth",
410
- STEP_CANCELED: "stepCanceled",
411
- STEP_EXECUTION_BEHAVIOR_CHANGED_TO_UNGRACEFUL: "stepExecutionBehaviorChangedToUngraceful",
412
- STEP_FAILED: "stepFailed",
413
- STEP_PAUSED_BY_ERROR: "stepPausedByError",
414
- STEP_PAUSED_BY_OPERATOR: "stepPausedByOperator",
415
- STEP_PENDING_APPLICATION_HEALTH_MONITOR: "stepPendingApplicationHealthMonitor",
416
- STEP_PENDING_APPROVAL: "stepPendingApproval",
417
- STEP_SKIPPED: "stepSkipped",
418
- STEP_STARTED: "stepStarted",
419
- STEP_SUCCEEDED: "stepSucceeded",
420
- STEP_UPDATE: "stepUpdate",
421
- UNKNOWN: "unknown"
422
- };
423
- var InternalServerException = class _InternalServerException extends ARCRegionSwitchServiceException {
424
- static {
425
- __name(this, "InternalServerException");
426
- }
427
- name = "InternalServerException";
428
- $fault = "server";
429
- /**
430
- * @internal
431
- */
432
- constructor(opts) {
433
- super({
434
- name: "InternalServerException",
435
- $fault: "server",
436
- ...opts
437
- });
438
- Object.setPrototypeOf(this, _InternalServerException.prototype);
439
- }
440
- };
441
- var IllegalStateException = class _IllegalStateException extends ARCRegionSwitchServiceException {
442
- static {
443
- __name(this, "IllegalStateException");
444
- }
445
- name = "IllegalStateException";
446
- $fault = "client";
447
- /**
448
- * @internal
449
- */
450
- constructor(opts) {
451
- super({
452
- name: "IllegalStateException",
453
- $fault: "client",
454
- ...opts
455
- });
456
- Object.setPrototypeOf(this, _IllegalStateException.prototype);
457
- }
458
- };
459
- var IllegalArgumentException = class _IllegalArgumentException extends ARCRegionSwitchServiceException {
460
- static {
461
- __name(this, "IllegalArgumentException");
462
- }
463
- name = "IllegalArgumentException";
464
- $fault = "client";
465
- /**
466
- * @internal
467
- */
468
- constructor(opts) {
469
- super({
470
- name: "IllegalArgumentException",
471
- $fault: "client",
472
- ...opts
473
- });
474
- Object.setPrototypeOf(this, _IllegalArgumentException.prototype);
475
- }
476
- };
477
- var UpdatePlanExecutionAction = {
478
- PAUSE: "pause",
479
- RESUME: "resume",
480
- SWITCH_TO_GRACEFUL: "switchToGraceful",
481
- SWITCH_TO_UNGRACEFUL: "switchToUngraceful"
482
- };
483
- var UpdatePlanExecutionStepAction = {
484
- SKIP: "skip",
485
- SWITCH_TO_UNGRACEFUL: "switchToUngraceful"
486
- };
487
- var ExecutionBlockConfiguration;
488
- ((ExecutionBlockConfiguration2) => {
489
- ExecutionBlockConfiguration2.visit = /* @__PURE__ */ __name((value, visitor) => {
490
- if (value.customActionLambdaConfig !== void 0)
491
- return visitor.customActionLambdaConfig(value.customActionLambdaConfig);
492
- if (value.ec2AsgCapacityIncreaseConfig !== void 0)
493
- return visitor.ec2AsgCapacityIncreaseConfig(value.ec2AsgCapacityIncreaseConfig);
494
- if (value.executionApprovalConfig !== void 0)
495
- return visitor.executionApprovalConfig(value.executionApprovalConfig);
496
- if (value.arcRoutingControlConfig !== void 0)
497
- return visitor.arcRoutingControlConfig(value.arcRoutingControlConfig);
498
- if (value.globalAuroraConfig !== void 0) return visitor.globalAuroraConfig(value.globalAuroraConfig);
499
- if (value.parallelConfig !== void 0) return visitor.parallelConfig(value.parallelConfig);
500
- if (value.regionSwitchPlanConfig !== void 0) return visitor.regionSwitchPlanConfig(value.regionSwitchPlanConfig);
501
- if (value.ecsCapacityIncreaseConfig !== void 0)
502
- return visitor.ecsCapacityIncreaseConfig(value.ecsCapacityIncreaseConfig);
503
- if (value.eksResourceScalingConfig !== void 0)
504
- return visitor.eksResourceScalingConfig(value.eksResourceScalingConfig);
505
- if (value.route53HealthCheckConfig !== void 0)
506
- return visitor.route53HealthCheckConfig(value.route53HealthCheckConfig);
507
- return visitor._(value.$unknown[0], value.$unknown[1]);
508
- }, "visit");
509
- })(ExecutionBlockConfiguration || (ExecutionBlockConfiguration = {}));
510
-
511
- // src/protocols/Aws_json1_0.ts
512
- var se_ApprovePlanExecutionStepCommand = /* @__PURE__ */ __name(async (input, context) => {
513
- const headers = sharedHeaders("ApprovePlanExecutionStep");
514
- let body;
515
- body = JSON.stringify((0, import_smithy_client._json)(input));
516
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
517
- }, "se_ApprovePlanExecutionStepCommand");
518
- var se_CancelPlanExecutionCommand = /* @__PURE__ */ __name(async (input, context) => {
519
- const headers = sharedHeaders("CancelPlanExecution");
520
- let body;
521
- body = JSON.stringify((0, import_smithy_client._json)(input));
522
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
523
- }, "se_CancelPlanExecutionCommand");
524
- var se_CreatePlanCommand = /* @__PURE__ */ __name(async (input, context) => {
525
- const headers = sharedHeaders("CreatePlan");
526
- let body;
527
- body = JSON.stringify(se_CreatePlanRequest(input, context));
528
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
529
- }, "se_CreatePlanCommand");
530
- var se_DeletePlanCommand = /* @__PURE__ */ __name(async (input, context) => {
531
- const headers = sharedHeaders("DeletePlan");
532
- let body;
533
- body = JSON.stringify((0, import_smithy_client._json)(input));
534
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
535
- }, "se_DeletePlanCommand");
536
- var se_GetPlanCommand = /* @__PURE__ */ __name(async (input, context) => {
537
- const headers = sharedHeaders("GetPlan");
538
- let body;
539
- body = JSON.stringify((0, import_smithy_client._json)(input));
540
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
541
- }, "se_GetPlanCommand");
542
- var se_GetPlanEvaluationStatusCommand = /* @__PURE__ */ __name(async (input, context) => {
543
- const headers = sharedHeaders("GetPlanEvaluationStatus");
544
- let body;
545
- body = JSON.stringify((0, import_smithy_client._json)(input));
546
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
547
- }, "se_GetPlanEvaluationStatusCommand");
548
- var se_GetPlanExecutionCommand = /* @__PURE__ */ __name(async (input, context) => {
549
- const headers = sharedHeaders("GetPlanExecution");
550
- let body;
551
- body = JSON.stringify((0, import_smithy_client._json)(input));
552
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
553
- }, "se_GetPlanExecutionCommand");
554
- var se_GetPlanInRegionCommand = /* @__PURE__ */ __name(async (input, context) => {
555
- const headers = sharedHeaders("GetPlanInRegion");
556
- let body;
557
- body = JSON.stringify((0, import_smithy_client._json)(input));
558
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
559
- }, "se_GetPlanInRegionCommand");
560
- var se_ListPlanExecutionEventsCommand = /* @__PURE__ */ __name(async (input, context) => {
561
- const headers = sharedHeaders("ListPlanExecutionEvents");
562
- let body;
563
- body = JSON.stringify((0, import_smithy_client._json)(input));
564
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
565
- }, "se_ListPlanExecutionEventsCommand");
566
- var se_ListPlanExecutionsCommand = /* @__PURE__ */ __name(async (input, context) => {
567
- const headers = sharedHeaders("ListPlanExecutions");
568
- let body;
569
- body = JSON.stringify((0, import_smithy_client._json)(input));
570
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
571
- }, "se_ListPlanExecutionsCommand");
572
- var se_ListPlansCommand = /* @__PURE__ */ __name(async (input, context) => {
573
- const headers = sharedHeaders("ListPlans");
574
- let body;
575
- body = JSON.stringify((0, import_smithy_client._json)(input));
576
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
577
- }, "se_ListPlansCommand");
578
- var se_ListPlansInRegionCommand = /* @__PURE__ */ __name(async (input, context) => {
579
- const headers = sharedHeaders("ListPlansInRegion");
580
- let body;
581
- body = JSON.stringify((0, import_smithy_client._json)(input));
582
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
583
- }, "se_ListPlansInRegionCommand");
584
- var se_ListRoute53HealthChecksCommand = /* @__PURE__ */ __name(async (input, context) => {
585
- const headers = sharedHeaders("ListRoute53HealthChecks");
586
- let body;
587
- body = JSON.stringify((0, import_smithy_client._json)(input));
588
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
589
- }, "se_ListRoute53HealthChecksCommand");
590
- var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
591
- const headers = sharedHeaders("ListTagsForResource");
592
- let body;
593
- body = JSON.stringify((0, import_smithy_client._json)(input));
594
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
595
- }, "se_ListTagsForResourceCommand");
596
- var se_StartPlanExecutionCommand = /* @__PURE__ */ __name(async (input, context) => {
597
- const headers = sharedHeaders("StartPlanExecution");
598
- let body;
599
- body = JSON.stringify((0, import_smithy_client._json)(input));
600
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
601
- }, "se_StartPlanExecutionCommand");
602
- var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
603
- const headers = sharedHeaders("TagResource");
604
- let body;
605
- body = JSON.stringify((0, import_smithy_client._json)(input));
606
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
607
- }, "se_TagResourceCommand");
608
- var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
609
- const headers = sharedHeaders("UntagResource");
610
- let body;
611
- body = JSON.stringify((0, import_smithy_client._json)(input));
612
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
613
- }, "se_UntagResourceCommand");
614
- var se_UpdatePlanCommand = /* @__PURE__ */ __name(async (input, context) => {
615
- const headers = sharedHeaders("UpdatePlan");
616
- let body;
617
- body = JSON.stringify(se_UpdatePlanRequest(input, context));
618
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
619
- }, "se_UpdatePlanCommand");
620
- var se_UpdatePlanExecutionCommand = /* @__PURE__ */ __name(async (input, context) => {
621
- const headers = sharedHeaders("UpdatePlanExecution");
622
- let body;
623
- body = JSON.stringify((0, import_smithy_client._json)(input));
624
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
625
- }, "se_UpdatePlanExecutionCommand");
626
- var se_UpdatePlanExecutionStepCommand = /* @__PURE__ */ __name(async (input, context) => {
627
- const headers = sharedHeaders("UpdatePlanExecutionStep");
628
- let body;
629
- body = JSON.stringify((0, import_smithy_client._json)(input));
630
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
631
- }, "se_UpdatePlanExecutionStepCommand");
632
- var de_ApprovePlanExecutionStepCommand = /* @__PURE__ */ __name(async (output, context) => {
633
- if (output.statusCode >= 300) {
634
- return de_CommandError(output, context);
635
- }
636
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
637
- let contents = {};
638
- contents = (0, import_smithy_client._json)(data);
639
- const response = {
640
- $metadata: deserializeMetadata(output),
641
- ...contents
642
- };
643
- return response;
644
- }, "de_ApprovePlanExecutionStepCommand");
645
- var de_CancelPlanExecutionCommand = /* @__PURE__ */ __name(async (output, context) => {
646
- if (output.statusCode >= 300) {
647
- return de_CommandError(output, context);
648
- }
649
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
650
- let contents = {};
651
- contents = (0, import_smithy_client._json)(data);
652
- const response = {
653
- $metadata: deserializeMetadata(output),
654
- ...contents
655
- };
656
- return response;
657
- }, "de_CancelPlanExecutionCommand");
658
- var de_CreatePlanCommand = /* @__PURE__ */ __name(async (output, context) => {
659
- if (output.statusCode >= 300) {
660
- return de_CommandError(output, context);
661
- }
662
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
663
- let contents = {};
664
- contents = de_CreatePlanResponse(data, context);
665
- const response = {
666
- $metadata: deserializeMetadata(output),
667
- ...contents
668
- };
669
- return response;
670
- }, "de_CreatePlanCommand");
671
- var de_DeletePlanCommand = /* @__PURE__ */ __name(async (output, context) => {
672
- if (output.statusCode >= 300) {
673
- return de_CommandError(output, context);
674
- }
675
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
676
- let contents = {};
677
- contents = (0, import_smithy_client._json)(data);
678
- const response = {
679
- $metadata: deserializeMetadata(output),
680
- ...contents
681
- };
682
- return response;
683
- }, "de_DeletePlanCommand");
684
- var de_GetPlanCommand = /* @__PURE__ */ __name(async (output, context) => {
685
- if (output.statusCode >= 300) {
686
- return de_CommandError(output, context);
687
- }
688
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
689
- let contents = {};
690
- contents = de_GetPlanResponse(data, context);
691
- const response = {
692
- $metadata: deserializeMetadata(output),
693
- ...contents
694
- };
695
- return response;
696
- }, "de_GetPlanCommand");
697
- var de_GetPlanEvaluationStatusCommand = /* @__PURE__ */ __name(async (output, context) => {
698
- if (output.statusCode >= 300) {
699
- return de_CommandError(output, context);
700
- }
701
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
702
- let contents = {};
703
- contents = de_GetPlanEvaluationStatusResponse(data, context);
704
- const response = {
705
- $metadata: deserializeMetadata(output),
706
- ...contents
707
- };
708
- return response;
709
- }, "de_GetPlanEvaluationStatusCommand");
710
- var de_GetPlanExecutionCommand = /* @__PURE__ */ __name(async (output, context) => {
711
- if (output.statusCode >= 300) {
712
- return de_CommandError(output, context);
713
- }
714
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
715
- let contents = {};
716
- contents = de_GetPlanExecutionResponse(data, context);
717
- const response = {
718
- $metadata: deserializeMetadata(output),
719
- ...contents
720
- };
721
- return response;
722
- }, "de_GetPlanExecutionCommand");
723
- var de_GetPlanInRegionCommand = /* @__PURE__ */ __name(async (output, context) => {
724
- if (output.statusCode >= 300) {
725
- return de_CommandError(output, context);
726
- }
727
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
728
- let contents = {};
729
- contents = de_GetPlanInRegionResponse(data, context);
730
- const response = {
731
- $metadata: deserializeMetadata(output),
732
- ...contents
733
- };
734
- return response;
735
- }, "de_GetPlanInRegionCommand");
736
- var de_ListPlanExecutionEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
737
- if (output.statusCode >= 300) {
738
- return de_CommandError(output, context);
739
- }
740
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
741
- let contents = {};
742
- contents = de_ListPlanExecutionEventsResponse(data, context);
743
- const response = {
744
- $metadata: deserializeMetadata(output),
745
- ...contents
746
- };
747
- return response;
748
- }, "de_ListPlanExecutionEventsCommand");
749
- var de_ListPlanExecutionsCommand = /* @__PURE__ */ __name(async (output, context) => {
750
- if (output.statusCode >= 300) {
751
- return de_CommandError(output, context);
752
- }
753
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
754
- let contents = {};
755
- contents = de_ListPlanExecutionsResponse(data, context);
756
- const response = {
757
- $metadata: deserializeMetadata(output),
758
- ...contents
759
- };
760
- return response;
761
- }, "de_ListPlanExecutionsCommand");
762
- var de_ListPlansCommand = /* @__PURE__ */ __name(async (output, context) => {
763
- if (output.statusCode >= 300) {
764
- return de_CommandError(output, context);
765
- }
766
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
767
- let contents = {};
768
- contents = de_ListPlansResponse(data, context);
769
- const response = {
770
- $metadata: deserializeMetadata(output),
771
- ...contents
772
- };
773
- return response;
774
- }, "de_ListPlansCommand");
775
- var de_ListPlansInRegionCommand = /* @__PURE__ */ __name(async (output, context) => {
776
- if (output.statusCode >= 300) {
777
- return de_CommandError(output, context);
778
- }
779
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
780
- let contents = {};
781
- contents = de_ListPlansInRegionResponse(data, context);
782
- const response = {
783
- $metadata: deserializeMetadata(output),
784
- ...contents
785
- };
786
- return response;
787
- }, "de_ListPlansInRegionCommand");
788
- var de_ListRoute53HealthChecksCommand = /* @__PURE__ */ __name(async (output, context) => {
789
- if (output.statusCode >= 300) {
790
- return de_CommandError(output, context);
791
- }
792
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
793
- let contents = {};
794
- contents = (0, import_smithy_client._json)(data);
795
- const response = {
796
- $metadata: deserializeMetadata(output),
797
- ...contents
798
- };
799
- return response;
800
- }, "de_ListRoute53HealthChecksCommand");
801
- var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
802
- if (output.statusCode >= 300) {
803
- return de_CommandError(output, context);
804
- }
805
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
806
- let contents = {};
807
- contents = (0, import_smithy_client._json)(data);
808
- const response = {
809
- $metadata: deserializeMetadata(output),
810
- ...contents
811
- };
812
- return response;
813
- }, "de_ListTagsForResourceCommand");
814
- var de_StartPlanExecutionCommand = /* @__PURE__ */ __name(async (output, context) => {
815
- if (output.statusCode >= 300) {
816
- return de_CommandError(output, context);
817
- }
818
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
819
- let contents = {};
820
- contents = (0, import_smithy_client._json)(data);
821
- const response = {
822
- $metadata: deserializeMetadata(output),
823
- ...contents
824
- };
825
- return response;
826
- }, "de_StartPlanExecutionCommand");
827
- var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
828
- if (output.statusCode >= 300) {
829
- return de_CommandError(output, context);
830
- }
831
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
832
- let contents = {};
833
- contents = (0, import_smithy_client._json)(data);
834
- const response = {
835
- $metadata: deserializeMetadata(output),
836
- ...contents
837
- };
838
- return response;
839
- }, "de_TagResourceCommand");
840
- var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
841
- if (output.statusCode >= 300) {
842
- return de_CommandError(output, context);
843
- }
844
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
845
- let contents = {};
846
- contents = (0, import_smithy_client._json)(data);
847
- const response = {
848
- $metadata: deserializeMetadata(output),
849
- ...contents
850
- };
851
- return response;
852
- }, "de_UntagResourceCommand");
853
- var de_UpdatePlanCommand = /* @__PURE__ */ __name(async (output, context) => {
854
- if (output.statusCode >= 300) {
855
- return de_CommandError(output, context);
856
- }
857
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
858
- let contents = {};
859
- contents = de_UpdatePlanResponse(data, context);
860
- const response = {
861
- $metadata: deserializeMetadata(output),
862
- ...contents
863
- };
864
- return response;
865
- }, "de_UpdatePlanCommand");
866
- var de_UpdatePlanExecutionCommand = /* @__PURE__ */ __name(async (output, context) => {
867
- if (output.statusCode >= 300) {
868
- return de_CommandError(output, context);
869
- }
870
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
871
- let contents = {};
872
- contents = (0, import_smithy_client._json)(data);
873
- const response = {
874
- $metadata: deserializeMetadata(output),
875
- ...contents
876
- };
877
- return response;
878
- }, "de_UpdatePlanExecutionCommand");
879
- var de_UpdatePlanExecutionStepCommand = /* @__PURE__ */ __name(async (output, context) => {
880
- if (output.statusCode >= 300) {
881
- return de_CommandError(output, context);
882
- }
883
- const data = await (0, import_core2.parseJsonBody)(output.body, context);
884
- let contents = {};
885
- contents = (0, import_smithy_client._json)(data);
886
- const response = {
887
- $metadata: deserializeMetadata(output),
888
- ...contents
889
- };
890
- return response;
891
- }, "de_UpdatePlanExecutionStepCommand");
892
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
893
- const parsedOutput = {
894
- ...output,
895
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
896
- };
897
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
898
- switch (errorCode) {
899
- case "AccessDeniedException":
900
- case "com.amazonaws.arcregionswitch#AccessDeniedException":
901
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
902
- case "ResourceNotFoundException":
903
- case "com.amazonaws.arcregionswitch#ResourceNotFoundException":
904
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
905
- case "IllegalStateException":
906
- case "com.amazonaws.arcregionswitch#IllegalStateException":
907
- throw await de_IllegalStateExceptionRes(parsedOutput, context);
908
- case "InternalServerException":
909
- case "com.amazonaws.arcregionswitch#InternalServerException":
910
- throw await de_InternalServerExceptionRes(parsedOutput, context);
911
- case "IllegalArgumentException":
912
- case "com.amazonaws.arcregionswitch#IllegalArgumentException":
913
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
914
- default:
915
- const parsedBody = parsedOutput.body;
916
- return throwDefaultError({
917
- output,
918
- parsedBody,
919
- errorCode
920
- });
921
- }
922
- }, "de_CommandError");
923
- var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
924
- const body = parsedOutput.body;
925
- const deserialized = (0, import_smithy_client._json)(body);
926
- const exception = new AccessDeniedException({
927
- $metadata: deserializeMetadata(parsedOutput),
928
- ...deserialized
929
- });
930
- return (0, import_smithy_client.decorateServiceException)(exception, body);
931
- }, "de_AccessDeniedExceptionRes");
932
- var de_IllegalArgumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
933
- const body = parsedOutput.body;
934
- const deserialized = (0, import_smithy_client._json)(body);
935
- const exception = new IllegalArgumentException({
936
- $metadata: deserializeMetadata(parsedOutput),
937
- ...deserialized
938
- });
939
- return (0, import_smithy_client.decorateServiceException)(exception, body);
940
- }, "de_IllegalArgumentExceptionRes");
941
- var de_IllegalStateExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
942
- const body = parsedOutput.body;
943
- const deserialized = (0, import_smithy_client._json)(body);
944
- const exception = new IllegalStateException({
945
- $metadata: deserializeMetadata(parsedOutput),
946
- ...deserialized
947
- });
948
- return (0, import_smithy_client.decorateServiceException)(exception, body);
949
- }, "de_IllegalStateExceptionRes");
950
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
951
- const body = parsedOutput.body;
952
- const deserialized = (0, import_smithy_client._json)(body);
953
- const exception = new InternalServerException({
954
- $metadata: deserializeMetadata(parsedOutput),
955
- ...deserialized
956
- });
957
- return (0, import_smithy_client.decorateServiceException)(exception, body);
958
- }, "de_InternalServerExceptionRes");
959
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
960
- const body = parsedOutput.body;
961
- const deserialized = (0, import_smithy_client._json)(body);
962
- const exception = new ResourceNotFoundException({
963
- $metadata: deserializeMetadata(parsedOutput),
964
- ...deserialized
965
- });
966
- return (0, import_smithy_client.decorateServiceException)(exception, body);
967
- }, "de_ResourceNotFoundExceptionRes");
968
- var se_CreatePlanRequest = /* @__PURE__ */ __name((input, context) => {
969
- return (0, import_smithy_client.take)(input, {
970
- associatedAlarms: import_smithy_client._json,
971
- description: [],
972
- executionRole: [],
973
- name: [],
974
- primaryRegion: [],
975
- recoveryApproach: [],
976
- recoveryTimeObjectiveMinutes: [],
977
- regions: import_smithy_client._json,
978
- tags: import_smithy_client._json,
979
- triggers: import_smithy_client._json,
980
- workflows: /* @__PURE__ */ __name((_) => se_WorkflowList(_, context), "workflows")
981
- });
982
- }, "se_CreatePlanRequest");
983
- var se_CustomActionLambdaConfiguration = /* @__PURE__ */ __name((input, context) => {
984
- return (0, import_smithy_client.take)(input, {
985
- lambdas: import_smithy_client._json,
986
- regionToRun: [],
987
- retryIntervalMinutes: import_smithy_client.serializeFloat,
988
- timeoutMinutes: [],
989
- ungraceful: import_smithy_client._json
990
- });
991
- }, "se_CustomActionLambdaConfiguration");
992
- var se_ExecutionBlockConfiguration = /* @__PURE__ */ __name((input, context) => {
993
- return ExecutionBlockConfiguration.visit(input, {
994
- arcRoutingControlConfig: /* @__PURE__ */ __name((value) => ({ arcRoutingControlConfig: (0, import_smithy_client._json)(value) }), "arcRoutingControlConfig"),
995
- customActionLambdaConfig: /* @__PURE__ */ __name((value) => ({
996
- customActionLambdaConfig: se_CustomActionLambdaConfiguration(value, context)
997
- }), "customActionLambdaConfig"),
998
- ec2AsgCapacityIncreaseConfig: /* @__PURE__ */ __name((value) => ({ ec2AsgCapacityIncreaseConfig: (0, import_smithy_client._json)(value) }), "ec2AsgCapacityIncreaseConfig"),
999
- ecsCapacityIncreaseConfig: /* @__PURE__ */ __name((value) => ({ ecsCapacityIncreaseConfig: (0, import_smithy_client._json)(value) }), "ecsCapacityIncreaseConfig"),
1000
- eksResourceScalingConfig: /* @__PURE__ */ __name((value) => ({ eksResourceScalingConfig: (0, import_smithy_client._json)(value) }), "eksResourceScalingConfig"),
1001
- executionApprovalConfig: /* @__PURE__ */ __name((value) => ({ executionApprovalConfig: (0, import_smithy_client._json)(value) }), "executionApprovalConfig"),
1002
- globalAuroraConfig: /* @__PURE__ */ __name((value) => ({ globalAuroraConfig: (0, import_smithy_client._json)(value) }), "globalAuroraConfig"),
1003
- parallelConfig: /* @__PURE__ */ __name((value) => ({ parallelConfig: se_ParallelExecutionBlockConfiguration(value, context) }), "parallelConfig"),
1004
- regionSwitchPlanConfig: /* @__PURE__ */ __name((value) => ({ regionSwitchPlanConfig: (0, import_smithy_client._json)(value) }), "regionSwitchPlanConfig"),
1005
- route53HealthCheckConfig: /* @__PURE__ */ __name((value) => ({ route53HealthCheckConfig: (0, import_smithy_client._json)(value) }), "route53HealthCheckConfig"),
1006
- _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_")
1007
- });
1008
- }, "se_ExecutionBlockConfiguration");
1009
- var se_ParallelExecutionBlockConfiguration = /* @__PURE__ */ __name((input, context) => {
1010
- return (0, import_smithy_client.take)(input, {
1011
- steps: /* @__PURE__ */ __name((_) => se_Steps(_, context), "steps")
1012
- });
1013
- }, "se_ParallelExecutionBlockConfiguration");
1014
- var se_Step = /* @__PURE__ */ __name((input, context) => {
1015
- return (0, import_smithy_client.take)(input, {
1016
- description: [],
1017
- executionBlockConfiguration: /* @__PURE__ */ __name((_) => se_ExecutionBlockConfiguration(_, context), "executionBlockConfiguration"),
1018
- executionBlockType: [],
1019
- name: []
1020
- });
1021
- }, "se_Step");
1022
- var se_Steps = /* @__PURE__ */ __name((input, context) => {
1023
- return input.filter((e) => e != null).map((entry) => {
1024
- return se_Step(entry, context);
1025
- });
1026
- }, "se_Steps");
1027
- var se_UpdatePlanRequest = /* @__PURE__ */ __name((input, context) => {
1028
- return (0, import_smithy_client.take)(input, {
1029
- arn: [],
1030
- associatedAlarms: import_smithy_client._json,
1031
- description: [],
1032
- executionRole: [],
1033
- recoveryTimeObjectiveMinutes: [],
1034
- triggers: import_smithy_client._json,
1035
- workflows: /* @__PURE__ */ __name((_) => se_WorkflowList(_, context), "workflows")
1036
- });
1037
- }, "se_UpdatePlanRequest");
1038
- var se_Workflow = /* @__PURE__ */ __name((input, context) => {
1039
- return (0, import_smithy_client.take)(input, {
1040
- steps: /* @__PURE__ */ __name((_) => se_Steps(_, context), "steps"),
1041
- workflowDescription: [],
1042
- workflowTargetAction: [],
1043
- workflowTargetRegion: []
1044
- });
1045
- }, "se_Workflow");
1046
- var se_WorkflowList = /* @__PURE__ */ __name((input, context) => {
1047
- return input.filter((e) => e != null).map((entry) => {
1048
- return se_Workflow(entry, context);
1049
- });
1050
- }, "se_WorkflowList");
1051
- var de_AbbreviatedExecution = /* @__PURE__ */ __name((output, context) => {
1052
- return (0, import_smithy_client.take)(output, {
1053
- actualRecoveryTime: import_smithy_client.expectString,
1054
- comment: import_smithy_client.expectString,
1055
- endTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "endTime"),
1056
- executionAction: import_smithy_client.expectString,
1057
- executionId: import_smithy_client.expectString,
1058
- executionRegion: import_smithy_client.expectString,
1059
- executionState: import_smithy_client.expectString,
1060
- mode: import_smithy_client.expectString,
1061
- planArn: import_smithy_client.expectString,
1062
- startTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startTime"),
1063
- updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt"),
1064
- version: import_smithy_client.expectString
1065
- });
1066
- }, "de_AbbreviatedExecution");
1067
- var de_AbbreviatedExecutionsList = /* @__PURE__ */ __name((output, context) => {
1068
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1069
- return de_AbbreviatedExecution(entry, context);
1070
- });
1071
- return retVal;
1072
- }, "de_AbbreviatedExecutionsList");
1073
- var de_AbbreviatedPlan = /* @__PURE__ */ __name((output, context) => {
1074
- return (0, import_smithy_client.take)(output, {
1075
- activePlanExecution: import_smithy_client.expectString,
1076
- arn: import_smithy_client.expectString,
1077
- description: import_smithy_client.expectString,
1078
- executionRole: import_smithy_client.expectString,
1079
- name: import_smithy_client.expectString,
1080
- owner: import_smithy_client.expectString,
1081
- primaryRegion: import_smithy_client.expectString,
1082
- recoveryApproach: import_smithy_client.expectString,
1083
- recoveryTimeObjectiveMinutes: import_smithy_client.expectInt32,
1084
- regions: import_smithy_client._json,
1085
- updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt"),
1086
- version: import_smithy_client.expectString
1087
- });
1088
- }, "de_AbbreviatedPlan");
1089
- var de_CreatePlanResponse = /* @__PURE__ */ __name((output, context) => {
1090
- return (0, import_smithy_client.take)(output, {
1091
- plan: /* @__PURE__ */ __name((_) => de_Plan(_, context), "plan")
1092
- });
1093
- }, "de_CreatePlanResponse");
1094
- var de_CustomActionLambdaConfiguration = /* @__PURE__ */ __name((output, context) => {
1095
- return (0, import_smithy_client.take)(output, {
1096
- lambdas: import_smithy_client._json,
1097
- regionToRun: import_smithy_client.expectString,
1098
- retryIntervalMinutes: import_smithy_client.limitedParseFloat32,
1099
- timeoutMinutes: import_smithy_client.expectInt32,
1100
- ungraceful: import_smithy_client._json
1101
- });
1102
- }, "de_CustomActionLambdaConfiguration");
1103
- var de_ExecutionBlockConfiguration = /* @__PURE__ */ __name((output, context) => {
1104
- if (output.arcRoutingControlConfig != null) {
1105
- return {
1106
- arcRoutingControlConfig: (0, import_smithy_client._json)(output.arcRoutingControlConfig)
344
+ const se_ApprovePlanExecutionStepCommand = async (input, context) => {
345
+ const headers = sharedHeaders("ApprovePlanExecutionStep");
346
+ let body;
347
+ body = JSON.stringify(smithyClient._json(input));
348
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
349
+ };
350
+ const se_CancelPlanExecutionCommand = async (input, context) => {
351
+ const headers = sharedHeaders("CancelPlanExecution");
352
+ let body;
353
+ body = JSON.stringify(smithyClient._json(input));
354
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
355
+ };
356
+ const se_CreatePlanCommand = async (input, context) => {
357
+ const headers = sharedHeaders("CreatePlan");
358
+ let body;
359
+ body = JSON.stringify(se_CreatePlanRequest(input));
360
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
361
+ };
362
+ const se_DeletePlanCommand = async (input, context) => {
363
+ const headers = sharedHeaders("DeletePlan");
364
+ let body;
365
+ body = JSON.stringify(smithyClient._json(input));
366
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
367
+ };
368
+ const se_GetPlanCommand = async (input, context) => {
369
+ const headers = sharedHeaders("GetPlan");
370
+ let body;
371
+ body = JSON.stringify(smithyClient._json(input));
372
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
373
+ };
374
+ const se_GetPlanEvaluationStatusCommand = async (input, context) => {
375
+ const headers = sharedHeaders("GetPlanEvaluationStatus");
376
+ let body;
377
+ body = JSON.stringify(smithyClient._json(input));
378
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
379
+ };
380
+ const se_GetPlanExecutionCommand = async (input, context) => {
381
+ const headers = sharedHeaders("GetPlanExecution");
382
+ let body;
383
+ body = JSON.stringify(smithyClient._json(input));
384
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
385
+ };
386
+ const se_GetPlanInRegionCommand = async (input, context) => {
387
+ const headers = sharedHeaders("GetPlanInRegion");
388
+ let body;
389
+ body = JSON.stringify(smithyClient._json(input));
390
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
391
+ };
392
+ const se_ListPlanExecutionEventsCommand = async (input, context) => {
393
+ const headers = sharedHeaders("ListPlanExecutionEvents");
394
+ let body;
395
+ body = JSON.stringify(smithyClient._json(input));
396
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
397
+ };
398
+ const se_ListPlanExecutionsCommand = async (input, context) => {
399
+ const headers = sharedHeaders("ListPlanExecutions");
400
+ let body;
401
+ body = JSON.stringify(smithyClient._json(input));
402
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
403
+ };
404
+ const se_ListPlansCommand = async (input, context) => {
405
+ const headers = sharedHeaders("ListPlans");
406
+ let body;
407
+ body = JSON.stringify(smithyClient._json(input));
408
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
409
+ };
410
+ const se_ListPlansInRegionCommand = async (input, context) => {
411
+ const headers = sharedHeaders("ListPlansInRegion");
412
+ let body;
413
+ body = JSON.stringify(smithyClient._json(input));
414
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
415
+ };
416
+ const se_ListRoute53HealthChecksCommand = async (input, context) => {
417
+ const headers = sharedHeaders("ListRoute53HealthChecks");
418
+ let body;
419
+ body = JSON.stringify(smithyClient._json(input));
420
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
421
+ };
422
+ const se_ListTagsForResourceCommand = async (input, context) => {
423
+ const headers = sharedHeaders("ListTagsForResource");
424
+ let body;
425
+ body = JSON.stringify(smithyClient._json(input));
426
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
427
+ };
428
+ const se_StartPlanExecutionCommand = async (input, context) => {
429
+ const headers = sharedHeaders("StartPlanExecution");
430
+ let body;
431
+ body = JSON.stringify(smithyClient._json(input));
432
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
433
+ };
434
+ const se_TagResourceCommand = async (input, context) => {
435
+ const headers = sharedHeaders("TagResource");
436
+ let body;
437
+ body = JSON.stringify(smithyClient._json(input));
438
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
439
+ };
440
+ const se_UntagResourceCommand = async (input, context) => {
441
+ const headers = sharedHeaders("UntagResource");
442
+ let body;
443
+ body = JSON.stringify(smithyClient._json(input));
444
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
445
+ };
446
+ const se_UpdatePlanCommand = async (input, context) => {
447
+ const headers = sharedHeaders("UpdatePlan");
448
+ let body;
449
+ body = JSON.stringify(se_UpdatePlanRequest(input));
450
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
451
+ };
452
+ const se_UpdatePlanExecutionCommand = async (input, context) => {
453
+ const headers = sharedHeaders("UpdatePlanExecution");
454
+ let body;
455
+ body = JSON.stringify(smithyClient._json(input));
456
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
457
+ };
458
+ const se_UpdatePlanExecutionStepCommand = async (input, context) => {
459
+ const headers = sharedHeaders("UpdatePlanExecutionStep");
460
+ let body;
461
+ body = JSON.stringify(smithyClient._json(input));
462
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
463
+ };
464
+ const de_ApprovePlanExecutionStepCommand = async (output, context) => {
465
+ if (output.statusCode >= 300) {
466
+ return de_CommandError(output, context);
467
+ }
468
+ const data = await core$1.parseJsonBody(output.body, context);
469
+ let contents = {};
470
+ contents = smithyClient._json(data);
471
+ const response = {
472
+ $metadata: deserializeMetadata(output),
473
+ ...contents,
1107
474
  };
1108
- }
1109
- if (output.customActionLambdaConfig != null) {
1110
- return {
1111
- customActionLambdaConfig: de_CustomActionLambdaConfiguration(output.customActionLambdaConfig, context)
475
+ return response;
476
+ };
477
+ const de_CancelPlanExecutionCommand = async (output, context) => {
478
+ if (output.statusCode >= 300) {
479
+ return de_CommandError(output, context);
480
+ }
481
+ const data = await core$1.parseJsonBody(output.body, context);
482
+ let contents = {};
483
+ contents = smithyClient._json(data);
484
+ const response = {
485
+ $metadata: deserializeMetadata(output),
486
+ ...contents,
1112
487
  };
1113
- }
1114
- if (output.ec2AsgCapacityIncreaseConfig != null) {
1115
- return {
1116
- ec2AsgCapacityIncreaseConfig: (0, import_smithy_client._json)(output.ec2AsgCapacityIncreaseConfig)
488
+ return response;
489
+ };
490
+ const de_CreatePlanCommand = async (output, context) => {
491
+ if (output.statusCode >= 300) {
492
+ return de_CommandError(output, context);
493
+ }
494
+ const data = await core$1.parseJsonBody(output.body, context);
495
+ let contents = {};
496
+ contents = de_CreatePlanResponse(data);
497
+ const response = {
498
+ $metadata: deserializeMetadata(output),
499
+ ...contents,
1117
500
  };
1118
- }
1119
- if (output.ecsCapacityIncreaseConfig != null) {
1120
- return {
1121
- ecsCapacityIncreaseConfig: (0, import_smithy_client._json)(output.ecsCapacityIncreaseConfig)
501
+ return response;
502
+ };
503
+ const de_DeletePlanCommand = async (output, context) => {
504
+ if (output.statusCode >= 300) {
505
+ return de_CommandError(output, context);
506
+ }
507
+ const data = await core$1.parseJsonBody(output.body, context);
508
+ let contents = {};
509
+ contents = smithyClient._json(data);
510
+ const response = {
511
+ $metadata: deserializeMetadata(output),
512
+ ...contents,
1122
513
  };
1123
- }
1124
- if (output.eksResourceScalingConfig != null) {
1125
- return {
1126
- eksResourceScalingConfig: (0, import_smithy_client._json)(output.eksResourceScalingConfig)
514
+ return response;
515
+ };
516
+ const de_GetPlanCommand = async (output, context) => {
517
+ if (output.statusCode >= 300) {
518
+ return de_CommandError(output, context);
519
+ }
520
+ const data = await core$1.parseJsonBody(output.body, context);
521
+ let contents = {};
522
+ contents = de_GetPlanResponse(data);
523
+ const response = {
524
+ $metadata: deserializeMetadata(output),
525
+ ...contents,
1127
526
  };
1128
- }
1129
- if (output.executionApprovalConfig != null) {
1130
- return {
1131
- executionApprovalConfig: (0, import_smithy_client._json)(output.executionApprovalConfig)
527
+ return response;
528
+ };
529
+ const de_GetPlanEvaluationStatusCommand = async (output, context) => {
530
+ if (output.statusCode >= 300) {
531
+ return de_CommandError(output, context);
532
+ }
533
+ const data = await core$1.parseJsonBody(output.body, context);
534
+ let contents = {};
535
+ contents = de_GetPlanEvaluationStatusResponse(data);
536
+ const response = {
537
+ $metadata: deserializeMetadata(output),
538
+ ...contents,
1132
539
  };
1133
- }
1134
- if (output.globalAuroraConfig != null) {
1135
- return {
1136
- globalAuroraConfig: (0, import_smithy_client._json)(output.globalAuroraConfig)
540
+ return response;
541
+ };
542
+ const de_GetPlanExecutionCommand = async (output, context) => {
543
+ if (output.statusCode >= 300) {
544
+ return de_CommandError(output, context);
545
+ }
546
+ const data = await core$1.parseJsonBody(output.body, context);
547
+ let contents = {};
548
+ contents = de_GetPlanExecutionResponse(data);
549
+ const response = {
550
+ $metadata: deserializeMetadata(output),
551
+ ...contents,
1137
552
  };
1138
- }
1139
- if (output.parallelConfig != null) {
1140
- return {
1141
- parallelConfig: de_ParallelExecutionBlockConfiguration(output.parallelConfig, context)
553
+ return response;
554
+ };
555
+ const de_GetPlanInRegionCommand = async (output, context) => {
556
+ if (output.statusCode >= 300) {
557
+ return de_CommandError(output, context);
558
+ }
559
+ const data = await core$1.parseJsonBody(output.body, context);
560
+ let contents = {};
561
+ contents = de_GetPlanInRegionResponse(data);
562
+ const response = {
563
+ $metadata: deserializeMetadata(output),
564
+ ...contents,
1142
565
  };
1143
- }
1144
- if (output.regionSwitchPlanConfig != null) {
1145
- return {
1146
- regionSwitchPlanConfig: (0, import_smithy_client._json)(output.regionSwitchPlanConfig)
566
+ return response;
567
+ };
568
+ const de_ListPlanExecutionEventsCommand = async (output, context) => {
569
+ if (output.statusCode >= 300) {
570
+ return de_CommandError(output, context);
571
+ }
572
+ const data = await core$1.parseJsonBody(output.body, context);
573
+ let contents = {};
574
+ contents = de_ListPlanExecutionEventsResponse(data);
575
+ const response = {
576
+ $metadata: deserializeMetadata(output),
577
+ ...contents,
1147
578
  };
1148
- }
1149
- if (output.route53HealthCheckConfig != null) {
1150
- return {
1151
- route53HealthCheckConfig: (0, import_smithy_client._json)(output.route53HealthCheckConfig)
579
+ return response;
580
+ };
581
+ const de_ListPlanExecutionsCommand = async (output, context) => {
582
+ if (output.statusCode >= 300) {
583
+ return de_CommandError(output, context);
584
+ }
585
+ const data = await core$1.parseJsonBody(output.body, context);
586
+ let contents = {};
587
+ contents = de_ListPlanExecutionsResponse(data);
588
+ const response = {
589
+ $metadata: deserializeMetadata(output),
590
+ ...contents,
1152
591
  };
1153
- }
1154
- return { $unknown: Object.entries(output)[0] };
1155
- }, "de_ExecutionBlockConfiguration");
1156
- var de_ExecutionEvent = /* @__PURE__ */ __name((output, context) => {
1157
- return (0, import_smithy_client.take)(output, {
1158
- description: import_smithy_client.expectString,
1159
- error: import_smithy_client.expectString,
1160
- eventId: import_smithy_client.expectString,
1161
- executionBlockType: import_smithy_client.expectString,
1162
- previousEventId: import_smithy_client.expectString,
1163
- resources: import_smithy_client._json,
1164
- stepName: import_smithy_client.expectString,
1165
- timestamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "timestamp"),
1166
- type: import_smithy_client.expectString
1167
- });
1168
- }, "de_ExecutionEvent");
1169
- var de_ExecutionEventList = /* @__PURE__ */ __name((output, context) => {
1170
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1171
- return de_ExecutionEvent(entry, context);
1172
- });
1173
- return retVal;
1174
- }, "de_ExecutionEventList");
1175
- var de_GetPlanEvaluationStatusResponse = /* @__PURE__ */ __name((output, context) => {
1176
- return (0, import_smithy_client.take)(output, {
1177
- evaluationState: import_smithy_client.expectString,
1178
- lastEvaluatedVersion: import_smithy_client.expectString,
1179
- lastEvaluationTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "lastEvaluationTime"),
1180
- nextToken: import_smithy_client.expectString,
1181
- planArn: import_smithy_client.expectString,
1182
- region: import_smithy_client.expectString,
1183
- warnings: /* @__PURE__ */ __name((_) => de_PlanWarnings(_, context), "warnings")
1184
- });
1185
- }, "de_GetPlanEvaluationStatusResponse");
1186
- var de_GetPlanExecutionResponse = /* @__PURE__ */ __name((output, context) => {
1187
- return (0, import_smithy_client.take)(output, {
1188
- actualRecoveryTime: import_smithy_client.expectString,
1189
- comment: import_smithy_client.expectString,
1190
- endTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "endTime"),
1191
- executionAction: import_smithy_client.expectString,
1192
- executionId: import_smithy_client.expectString,
1193
- executionRegion: import_smithy_client.expectString,
1194
- executionState: import_smithy_client.expectString,
1195
- mode: import_smithy_client.expectString,
1196
- nextToken: import_smithy_client.expectString,
1197
- plan: /* @__PURE__ */ __name((_) => de_Plan(_, context), "plan"),
1198
- planArn: import_smithy_client.expectString,
1199
- startTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startTime"),
1200
- stepStates: /* @__PURE__ */ __name((_) => de_StepStates(_, context), "stepStates"),
1201
- updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt"),
1202
- version: import_smithy_client.expectString
1203
- });
1204
- }, "de_GetPlanExecutionResponse");
1205
- var de_GetPlanInRegionResponse = /* @__PURE__ */ __name((output, context) => {
1206
- return (0, import_smithy_client.take)(output, {
1207
- plan: /* @__PURE__ */ __name((_) => de_Plan(_, context), "plan")
1208
- });
1209
- }, "de_GetPlanInRegionResponse");
1210
- var de_GetPlanResponse = /* @__PURE__ */ __name((output, context) => {
1211
- return (0, import_smithy_client.take)(output, {
1212
- plan: /* @__PURE__ */ __name((_) => de_Plan(_, context), "plan")
1213
- });
1214
- }, "de_GetPlanResponse");
1215
- var de_ListPlanExecutionEventsResponse = /* @__PURE__ */ __name((output, context) => {
1216
- return (0, import_smithy_client.take)(output, {
1217
- items: /* @__PURE__ */ __name((_) => de_ExecutionEventList(_, context), "items"),
1218
- nextToken: import_smithy_client.expectString
1219
- });
1220
- }, "de_ListPlanExecutionEventsResponse");
1221
- var de_ListPlanExecutionsResponse = /* @__PURE__ */ __name((output, context) => {
1222
- return (0, import_smithy_client.take)(output, {
1223
- items: /* @__PURE__ */ __name((_) => de_AbbreviatedExecutionsList(_, context), "items"),
1224
- nextToken: import_smithy_client.expectString
1225
- });
1226
- }, "de_ListPlanExecutionsResponse");
1227
- var de_ListPlansInRegionResponse = /* @__PURE__ */ __name((output, context) => {
1228
- return (0, import_smithy_client.take)(output, {
1229
- nextToken: import_smithy_client.expectString,
1230
- plans: /* @__PURE__ */ __name((_) => de_PlanList(_, context), "plans")
1231
- });
1232
- }, "de_ListPlansInRegionResponse");
1233
- var de_ListPlansResponse = /* @__PURE__ */ __name((output, context) => {
1234
- return (0, import_smithy_client.take)(output, {
1235
- nextToken: import_smithy_client.expectString,
1236
- plans: /* @__PURE__ */ __name((_) => de_PlanList(_, context), "plans")
1237
- });
1238
- }, "de_ListPlansResponse");
1239
- var de_ParallelExecutionBlockConfiguration = /* @__PURE__ */ __name((output, context) => {
1240
- return (0, import_smithy_client.take)(output, {
1241
- steps: /* @__PURE__ */ __name((_) => de_Steps(_, context), "steps")
1242
- });
1243
- }, "de_ParallelExecutionBlockConfiguration");
1244
- var de_Plan = /* @__PURE__ */ __name((output, context) => {
1245
- return (0, import_smithy_client.take)(output, {
1246
- arn: import_smithy_client.expectString,
1247
- associatedAlarms: import_smithy_client._json,
1248
- description: import_smithy_client.expectString,
1249
- executionRole: import_smithy_client.expectString,
1250
- name: import_smithy_client.expectString,
1251
- owner: import_smithy_client.expectString,
1252
- primaryRegion: import_smithy_client.expectString,
1253
- recoveryApproach: import_smithy_client.expectString,
1254
- recoveryTimeObjectiveMinutes: import_smithy_client.expectInt32,
1255
- regions: import_smithy_client._json,
1256
- triggers: import_smithy_client._json,
1257
- updatedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "updatedAt"),
1258
- version: import_smithy_client.expectString,
1259
- workflows: /* @__PURE__ */ __name((_) => de_WorkflowList(_, context), "workflows")
1260
- });
1261
- }, "de_Plan");
1262
- var de_PlanList = /* @__PURE__ */ __name((output, context) => {
1263
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1264
- return de_AbbreviatedPlan(entry, context);
1265
- });
1266
- return retVal;
1267
- }, "de_PlanList");
1268
- var de_PlanWarnings = /* @__PURE__ */ __name((output, context) => {
1269
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1270
- return de_ResourceWarning(entry, context);
1271
- });
1272
- return retVal;
1273
- }, "de_PlanWarnings");
1274
- var de_ResourceWarning = /* @__PURE__ */ __name((output, context) => {
1275
- return (0, import_smithy_client.take)(output, {
1276
- resourceArn: import_smithy_client.expectString,
1277
- stepName: import_smithy_client.expectString,
1278
- version: import_smithy_client.expectString,
1279
- warningMessage: import_smithy_client.expectString,
1280
- warningStatus: import_smithy_client.expectString,
1281
- warningUpdatedTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "warningUpdatedTime"),
1282
- workflow: import_smithy_client._json
1283
- });
1284
- }, "de_ResourceWarning");
1285
- var de_Step = /* @__PURE__ */ __name((output, context) => {
1286
- return (0, import_smithy_client.take)(output, {
1287
- description: import_smithy_client.expectString,
1288
- executionBlockConfiguration: /* @__PURE__ */ __name((_) => de_ExecutionBlockConfiguration((0, import_core2.awsExpectUnion)(_), context), "executionBlockConfiguration"),
1289
- executionBlockType: import_smithy_client.expectString,
1290
- name: import_smithy_client.expectString
1291
- });
1292
- }, "de_Step");
1293
- var de_Steps = /* @__PURE__ */ __name((output, context) => {
1294
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1295
- return de_Step(entry, context);
1296
- });
1297
- return retVal;
1298
- }, "de_Steps");
1299
- var de_StepState = /* @__PURE__ */ __name((output, context) => {
1300
- return (0, import_smithy_client.take)(output, {
1301
- endTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "endTime"),
1302
- name: import_smithy_client.expectString,
1303
- startTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "startTime"),
1304
- status: import_smithy_client.expectString,
1305
- stepMode: import_smithy_client.expectString
1306
- });
1307
- }, "de_StepState");
1308
- var de_StepStates = /* @__PURE__ */ __name((output, context) => {
1309
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1310
- return de_StepState(entry, context);
1311
- });
1312
- return retVal;
1313
- }, "de_StepStates");
1314
- var de_UpdatePlanResponse = /* @__PURE__ */ __name((output, context) => {
1315
- return (0, import_smithy_client.take)(output, {
1316
- plan: /* @__PURE__ */ __name((_) => de_Plan(_, context), "plan")
1317
- });
1318
- }, "de_UpdatePlanResponse");
1319
- var de_Workflow = /* @__PURE__ */ __name((output, context) => {
1320
- return (0, import_smithy_client.take)(output, {
1321
- steps: /* @__PURE__ */ __name((_) => de_Steps(_, context), "steps"),
1322
- workflowDescription: import_smithy_client.expectString,
1323
- workflowTargetAction: import_smithy_client.expectString,
1324
- workflowTargetRegion: import_smithy_client.expectString
1325
- });
1326
- }, "de_Workflow");
1327
- var de_WorkflowList = /* @__PURE__ */ __name((output, context) => {
1328
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1329
- return de_Workflow(entry, context);
1330
- });
1331
- return retVal;
1332
- }, "de_WorkflowList");
1333
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1334
- httpStatusCode: output.statusCode,
1335
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1336
- extendedRequestId: output.headers["x-amz-id-2"],
1337
- cfId: output.headers["x-amz-cf-id"]
1338
- }), "deserializeMetadata");
1339
- var throwDefaultError = (0, import_smithy_client.withBaseException)(ARCRegionSwitchServiceException);
1340
- var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
1341
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1342
- const contents = {
1343
- protocol,
1344
- hostname,
1345
- port,
1346
- method: "POST",
1347
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1348
- headers
1349
- };
1350
- if (resolvedHostname !== void 0) {
1351
- contents.hostname = resolvedHostname;
1352
- }
1353
- if (body !== void 0) {
1354
- contents.body = body;
1355
- }
1356
- return new import_protocol_http.HttpRequest(contents);
1357
- }, "buildHttpRpcRequest");
1358
- function sharedHeaders(operation) {
1359
- return {
1360
- "content-type": "application/x-amz-json-1.0",
1361
- "x-amz-target": `ArcRegionSwitch.${operation}`
1362
- };
1363
- }
1364
- __name(sharedHeaders, "sharedHeaders");
1365
-
1366
- // src/commands/ApprovePlanExecutionStepCommand.ts
1367
- var ApprovePlanExecutionStepCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1368
- return [
1369
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1370
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1371
- ];
1372
- }).s("ArcRegionSwitch", "ApprovePlanExecutionStep", {}).n("ARCRegionSwitchClient", "ApprovePlanExecutionStepCommand").f(void 0, void 0).ser(se_ApprovePlanExecutionStepCommand).de(de_ApprovePlanExecutionStepCommand).build() {
1373
- static {
1374
- __name(this, "ApprovePlanExecutionStepCommand");
1375
- }
592
+ return response;
1376
593
  };
1377
-
1378
- // src/commands/CancelPlanExecutionCommand.ts
1379
-
1380
-
1381
-
1382
- var CancelPlanExecutionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1383
- return [
1384
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1385
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1386
- ];
1387
- }).s("ArcRegionSwitch", "CancelPlanExecution", {}).n("ARCRegionSwitchClient", "CancelPlanExecutionCommand").f(void 0, void 0).ser(se_CancelPlanExecutionCommand).de(de_CancelPlanExecutionCommand).build() {
1388
- static {
1389
- __name(this, "CancelPlanExecutionCommand");
1390
- }
594
+ const de_ListPlansCommand = async (output, context) => {
595
+ if (output.statusCode >= 300) {
596
+ return de_CommandError(output, context);
597
+ }
598
+ const data = await core$1.parseJsonBody(output.body, context);
599
+ let contents = {};
600
+ contents = de_ListPlansResponse(data);
601
+ const response = {
602
+ $metadata: deserializeMetadata(output),
603
+ ...contents,
604
+ };
605
+ return response;
1391
606
  };
1392
-
1393
- // src/commands/CreatePlanCommand.ts
1394
-
1395
-
1396
-
1397
- var CreatePlanCommand = class extends import_smithy_client.Command.classBuilder().ep({
1398
- ...commonParams,
1399
- UseControlPlaneEndpoint: { type: "staticContextParams", value: true }
1400
- }).m(function(Command, cs, config, o) {
1401
- return [
1402
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1403
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1404
- ];
1405
- }).s("ArcRegionSwitch", "CreatePlan", {}).n("ARCRegionSwitchClient", "CreatePlanCommand").f(void 0, void 0).ser(se_CreatePlanCommand).de(de_CreatePlanCommand).build() {
1406
- static {
1407
- __name(this, "CreatePlanCommand");
1408
- }
607
+ const de_ListPlansInRegionCommand = async (output, context) => {
608
+ if (output.statusCode >= 300) {
609
+ return de_CommandError(output, context);
610
+ }
611
+ const data = await core$1.parseJsonBody(output.body, context);
612
+ let contents = {};
613
+ contents = de_ListPlansInRegionResponse(data);
614
+ const response = {
615
+ $metadata: deserializeMetadata(output),
616
+ ...contents,
617
+ };
618
+ return response;
1409
619
  };
1410
-
1411
- // src/commands/DeletePlanCommand.ts
1412
-
1413
-
1414
-
1415
- var DeletePlanCommand = class extends import_smithy_client.Command.classBuilder().ep({
1416
- ...commonParams,
1417
- UseControlPlaneEndpoint: { type: "staticContextParams", value: true }
1418
- }).m(function(Command, cs, config, o) {
1419
- return [
1420
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1421
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1422
- ];
1423
- }).s("ArcRegionSwitch", "DeletePlan", {}).n("ARCRegionSwitchClient", "DeletePlanCommand").f(void 0, void 0).ser(se_DeletePlanCommand).de(de_DeletePlanCommand).build() {
1424
- static {
1425
- __name(this, "DeletePlanCommand");
1426
- }
620
+ const de_ListRoute53HealthChecksCommand = async (output, context) => {
621
+ if (output.statusCode >= 300) {
622
+ return de_CommandError(output, context);
623
+ }
624
+ const data = await core$1.parseJsonBody(output.body, context);
625
+ let contents = {};
626
+ contents = smithyClient._json(data);
627
+ const response = {
628
+ $metadata: deserializeMetadata(output),
629
+ ...contents,
630
+ };
631
+ return response;
1427
632
  };
1428
-
1429
- // src/commands/GetPlanCommand.ts
1430
-
1431
-
1432
-
1433
- var GetPlanCommand = class extends import_smithy_client.Command.classBuilder().ep({
1434
- ...commonParams,
1435
- UseControlPlaneEndpoint: { type: "staticContextParams", value: true }
1436
- }).m(function(Command, cs, config, o) {
1437
- return [
1438
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1439
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1440
- ];
1441
- }).s("ArcRegionSwitch", "GetPlan", {}).n("ARCRegionSwitchClient", "GetPlanCommand").f(void 0, void 0).ser(se_GetPlanCommand).de(de_GetPlanCommand).build() {
1442
- static {
1443
- __name(this, "GetPlanCommand");
1444
- }
633
+ const de_ListTagsForResourceCommand = async (output, context) => {
634
+ if (output.statusCode >= 300) {
635
+ return de_CommandError(output, context);
636
+ }
637
+ const data = await core$1.parseJsonBody(output.body, context);
638
+ let contents = {};
639
+ contents = smithyClient._json(data);
640
+ const response = {
641
+ $metadata: deserializeMetadata(output),
642
+ ...contents,
643
+ };
644
+ return response;
1445
645
  };
1446
-
1447
- // src/commands/GetPlanEvaluationStatusCommand.ts
1448
-
1449
-
1450
-
1451
- var GetPlanEvaluationStatusCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1452
- return [
1453
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1454
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1455
- ];
1456
- }).s("ArcRegionSwitch", "GetPlanEvaluationStatus", {}).n("ARCRegionSwitchClient", "GetPlanEvaluationStatusCommand").f(void 0, void 0).ser(se_GetPlanEvaluationStatusCommand).de(de_GetPlanEvaluationStatusCommand).build() {
1457
- static {
1458
- __name(this, "GetPlanEvaluationStatusCommand");
1459
- }
646
+ const de_StartPlanExecutionCommand = async (output, context) => {
647
+ if (output.statusCode >= 300) {
648
+ return de_CommandError(output, context);
649
+ }
650
+ const data = await core$1.parseJsonBody(output.body, context);
651
+ let contents = {};
652
+ contents = smithyClient._json(data);
653
+ const response = {
654
+ $metadata: deserializeMetadata(output),
655
+ ...contents,
656
+ };
657
+ return response;
1460
658
  };
1461
-
1462
- // src/commands/GetPlanExecutionCommand.ts
1463
-
1464
-
1465
-
1466
- var GetPlanExecutionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1467
- return [
1468
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1469
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1470
- ];
1471
- }).s("ArcRegionSwitch", "GetPlanExecution", {}).n("ARCRegionSwitchClient", "GetPlanExecutionCommand").f(void 0, void 0).ser(se_GetPlanExecutionCommand).de(de_GetPlanExecutionCommand).build() {
1472
- static {
1473
- __name(this, "GetPlanExecutionCommand");
1474
- }
659
+ const de_TagResourceCommand = async (output, context) => {
660
+ if (output.statusCode >= 300) {
661
+ return de_CommandError(output, context);
662
+ }
663
+ const data = await core$1.parseJsonBody(output.body, context);
664
+ let contents = {};
665
+ contents = smithyClient._json(data);
666
+ const response = {
667
+ $metadata: deserializeMetadata(output),
668
+ ...contents,
669
+ };
670
+ return response;
1475
671
  };
1476
-
1477
- // src/commands/GetPlanInRegionCommand.ts
1478
-
1479
-
1480
-
1481
- var GetPlanInRegionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1482
- return [
1483
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1484
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1485
- ];
1486
- }).s("ArcRegionSwitch", "GetPlanInRegion", {}).n("ARCRegionSwitchClient", "GetPlanInRegionCommand").f(void 0, void 0).ser(se_GetPlanInRegionCommand).de(de_GetPlanInRegionCommand).build() {
1487
- static {
1488
- __name(this, "GetPlanInRegionCommand");
1489
- }
672
+ const de_UntagResourceCommand = async (output, context) => {
673
+ if (output.statusCode >= 300) {
674
+ return de_CommandError(output, context);
675
+ }
676
+ const data = await core$1.parseJsonBody(output.body, context);
677
+ let contents = {};
678
+ contents = smithyClient._json(data);
679
+ const response = {
680
+ $metadata: deserializeMetadata(output),
681
+ ...contents,
682
+ };
683
+ return response;
1490
684
  };
1491
-
1492
- // src/commands/ListPlanExecutionEventsCommand.ts
1493
-
1494
-
1495
-
1496
- var ListPlanExecutionEventsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1497
- return [
1498
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1499
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1500
- ];
1501
- }).s("ArcRegionSwitch", "ListPlanExecutionEvents", {}).n("ARCRegionSwitchClient", "ListPlanExecutionEventsCommand").f(void 0, void 0).ser(se_ListPlanExecutionEventsCommand).de(de_ListPlanExecutionEventsCommand).build() {
1502
- static {
1503
- __name(this, "ListPlanExecutionEventsCommand");
1504
- }
685
+ const de_UpdatePlanCommand = async (output, context) => {
686
+ if (output.statusCode >= 300) {
687
+ return de_CommandError(output, context);
688
+ }
689
+ const data = await core$1.parseJsonBody(output.body, context);
690
+ let contents = {};
691
+ contents = de_UpdatePlanResponse(data);
692
+ const response = {
693
+ $metadata: deserializeMetadata(output),
694
+ ...contents,
695
+ };
696
+ return response;
1505
697
  };
1506
-
1507
- // src/commands/ListPlanExecutionsCommand.ts
1508
-
1509
-
1510
-
1511
- var ListPlanExecutionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1512
- return [
1513
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1514
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1515
- ];
1516
- }).s("ArcRegionSwitch", "ListPlanExecutions", {}).n("ARCRegionSwitchClient", "ListPlanExecutionsCommand").f(void 0, void 0).ser(se_ListPlanExecutionsCommand).de(de_ListPlanExecutionsCommand).build() {
1517
- static {
1518
- __name(this, "ListPlanExecutionsCommand");
1519
- }
698
+ const de_UpdatePlanExecutionCommand = async (output, context) => {
699
+ if (output.statusCode >= 300) {
700
+ return de_CommandError(output, context);
701
+ }
702
+ const data = await core$1.parseJsonBody(output.body, context);
703
+ let contents = {};
704
+ contents = smithyClient._json(data);
705
+ const response = {
706
+ $metadata: deserializeMetadata(output),
707
+ ...contents,
708
+ };
709
+ return response;
1520
710
  };
1521
-
1522
- // src/commands/ListPlansCommand.ts
1523
-
1524
-
1525
-
1526
- var ListPlansCommand = class extends import_smithy_client.Command.classBuilder().ep({
1527
- ...commonParams,
1528
- UseControlPlaneEndpoint: { type: "staticContextParams", value: true }
1529
- }).m(function(Command, cs, config, o) {
1530
- return [
1531
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1532
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1533
- ];
1534
- }).s("ArcRegionSwitch", "ListPlans", {}).n("ARCRegionSwitchClient", "ListPlansCommand").f(void 0, void 0).ser(se_ListPlansCommand).de(de_ListPlansCommand).build() {
1535
- static {
1536
- __name(this, "ListPlansCommand");
1537
- }
711
+ const de_UpdatePlanExecutionStepCommand = async (output, context) => {
712
+ if (output.statusCode >= 300) {
713
+ return de_CommandError(output, context);
714
+ }
715
+ const data = await core$1.parseJsonBody(output.body, context);
716
+ let contents = {};
717
+ contents = smithyClient._json(data);
718
+ const response = {
719
+ $metadata: deserializeMetadata(output),
720
+ ...contents,
721
+ };
722
+ return response;
1538
723
  };
1539
-
1540
- // src/commands/ListPlansInRegionCommand.ts
1541
-
1542
-
1543
-
1544
- var ListPlansInRegionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1545
- return [
1546
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1547
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1548
- ];
1549
- }).s("ArcRegionSwitch", "ListPlansInRegion", {}).n("ARCRegionSwitchClient", "ListPlansInRegionCommand").f(void 0, void 0).ser(se_ListPlansInRegionCommand).de(de_ListPlansInRegionCommand).build() {
1550
- static {
1551
- __name(this, "ListPlansInRegionCommand");
1552
- }
724
+ const de_CommandError = async (output, context) => {
725
+ const parsedOutput = {
726
+ ...output,
727
+ body: await core$1.parseJsonErrorBody(output.body, context),
728
+ };
729
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
730
+ switch (errorCode) {
731
+ case "AccessDeniedException":
732
+ case "com.amazonaws.arcregionswitch#AccessDeniedException":
733
+ throw await de_AccessDeniedExceptionRes(parsedOutput);
734
+ case "ResourceNotFoundException":
735
+ case "com.amazonaws.arcregionswitch#ResourceNotFoundException":
736
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
737
+ case "IllegalStateException":
738
+ case "com.amazonaws.arcregionswitch#IllegalStateException":
739
+ throw await de_IllegalStateExceptionRes(parsedOutput);
740
+ case "InternalServerException":
741
+ case "com.amazonaws.arcregionswitch#InternalServerException":
742
+ throw await de_InternalServerExceptionRes(parsedOutput);
743
+ case "IllegalArgumentException":
744
+ case "com.amazonaws.arcregionswitch#IllegalArgumentException":
745
+ throw await de_IllegalArgumentExceptionRes(parsedOutput);
746
+ default:
747
+ const parsedBody = parsedOutput.body;
748
+ return throwDefaultError({
749
+ output,
750
+ parsedBody,
751
+ errorCode,
752
+ });
753
+ }
1553
754
  };
1554
-
1555
- // src/commands/ListRoute53HealthChecksCommand.ts
1556
-
1557
-
1558
-
1559
- var ListRoute53HealthChecksCommand = class extends import_smithy_client.Command.classBuilder().ep({
1560
- ...commonParams,
1561
- UseControlPlaneEndpoint: { type: "staticContextParams", value: true }
1562
- }).m(function(Command, cs, config, o) {
1563
- return [
1564
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1565
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1566
- ];
1567
- }).s("ArcRegionSwitch", "ListRoute53HealthChecks", {}).n("ARCRegionSwitchClient", "ListRoute53HealthChecksCommand").f(void 0, void 0).ser(se_ListRoute53HealthChecksCommand).de(de_ListRoute53HealthChecksCommand).build() {
1568
- static {
1569
- __name(this, "ListRoute53HealthChecksCommand");
1570
- }
755
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
756
+ const body = parsedOutput.body;
757
+ const deserialized = smithyClient._json(body);
758
+ const exception = new AccessDeniedException({
759
+ $metadata: deserializeMetadata(parsedOutput),
760
+ ...deserialized,
761
+ });
762
+ return smithyClient.decorateServiceException(exception, body);
1571
763
  };
1572
-
1573
- // src/commands/ListTagsForResourceCommand.ts
1574
-
1575
-
1576
-
1577
- var ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep({
1578
- ...commonParams,
1579
- UseControlPlaneEndpoint: { type: "staticContextParams", value: true }
1580
- }).m(function(Command, cs, config, o) {
1581
- return [
1582
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1583
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1584
- ];
1585
- }).s("ArcRegionSwitch", "ListTagsForResource", {}).n("ARCRegionSwitchClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
1586
- static {
1587
- __name(this, "ListTagsForResourceCommand");
1588
- }
764
+ const de_IllegalArgumentExceptionRes = async (parsedOutput, context) => {
765
+ const body = parsedOutput.body;
766
+ const deserialized = smithyClient._json(body);
767
+ const exception = new IllegalArgumentException({
768
+ $metadata: deserializeMetadata(parsedOutput),
769
+ ...deserialized,
770
+ });
771
+ return smithyClient.decorateServiceException(exception, body);
1589
772
  };
1590
-
1591
- // src/commands/StartPlanExecutionCommand.ts
1592
-
1593
-
1594
-
1595
- var StartPlanExecutionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1596
- return [
1597
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1598
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1599
- ];
1600
- }).s("ArcRegionSwitch", "StartPlanExecution", {}).n("ARCRegionSwitchClient", "StartPlanExecutionCommand").f(void 0, void 0).ser(se_StartPlanExecutionCommand).de(de_StartPlanExecutionCommand).build() {
1601
- static {
1602
- __name(this, "StartPlanExecutionCommand");
1603
- }
773
+ const de_IllegalStateExceptionRes = async (parsedOutput, context) => {
774
+ const body = parsedOutput.body;
775
+ const deserialized = smithyClient._json(body);
776
+ const exception = new IllegalStateException({
777
+ $metadata: deserializeMetadata(parsedOutput),
778
+ ...deserialized,
779
+ });
780
+ return smithyClient.decorateServiceException(exception, body);
1604
781
  };
1605
-
1606
- // src/commands/TagResourceCommand.ts
1607
-
1608
-
1609
-
1610
- var TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep({
1611
- ...commonParams,
1612
- UseControlPlaneEndpoint: { type: "staticContextParams", value: true }
1613
- }).m(function(Command, cs, config, o) {
1614
- return [
1615
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1616
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1617
- ];
1618
- }).s("ArcRegionSwitch", "TagResource", {}).n("ARCRegionSwitchClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
1619
- static {
1620
- __name(this, "TagResourceCommand");
1621
- }
782
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
783
+ const body = parsedOutput.body;
784
+ const deserialized = smithyClient._json(body);
785
+ const exception = new InternalServerException({
786
+ $metadata: deserializeMetadata(parsedOutput),
787
+ ...deserialized,
788
+ });
789
+ return smithyClient.decorateServiceException(exception, body);
1622
790
  };
1623
-
1624
- // src/commands/UntagResourceCommand.ts
1625
-
1626
-
1627
-
1628
- var UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep({
1629
- ...commonParams,
1630
- UseControlPlaneEndpoint: { type: "staticContextParams", value: true }
1631
- }).m(function(Command, cs, config, o) {
1632
- return [
1633
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1634
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1635
- ];
1636
- }).s("ArcRegionSwitch", "UntagResource", {}).n("ARCRegionSwitchClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
1637
- static {
1638
- __name(this, "UntagResourceCommand");
1639
- }
791
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
792
+ const body = parsedOutput.body;
793
+ const deserialized = smithyClient._json(body);
794
+ const exception = new ResourceNotFoundException({
795
+ $metadata: deserializeMetadata(parsedOutput),
796
+ ...deserialized,
797
+ });
798
+ return smithyClient.decorateServiceException(exception, body);
1640
799
  };
800
+ const se_CreatePlanRequest = (input, context) => {
801
+ return smithyClient.take(input, {
802
+ associatedAlarms: smithyClient._json,
803
+ description: [],
804
+ executionRole: [],
805
+ name: [],
806
+ primaryRegion: [],
807
+ recoveryApproach: [],
808
+ recoveryTimeObjectiveMinutes: [],
809
+ regions: smithyClient._json,
810
+ tags: smithyClient._json,
811
+ triggers: smithyClient._json,
812
+ workflows: (_) => se_WorkflowList(_),
813
+ });
814
+ };
815
+ const se_CustomActionLambdaConfiguration = (input, context) => {
816
+ return smithyClient.take(input, {
817
+ lambdas: smithyClient._json,
818
+ regionToRun: [],
819
+ retryIntervalMinutes: smithyClient.serializeFloat,
820
+ timeoutMinutes: [],
821
+ ungraceful: smithyClient._json,
822
+ });
823
+ };
824
+ const se_ExecutionBlockConfiguration = (input, context) => {
825
+ return exports.ExecutionBlockConfiguration.visit(input, {
826
+ arcRoutingControlConfig: (value) => ({ arcRoutingControlConfig: smithyClient._json(value) }),
827
+ customActionLambdaConfig: (value) => ({
828
+ customActionLambdaConfig: se_CustomActionLambdaConfiguration(value),
829
+ }),
830
+ ec2AsgCapacityIncreaseConfig: (value) => ({ ec2AsgCapacityIncreaseConfig: smithyClient._json(value) }),
831
+ ecsCapacityIncreaseConfig: (value) => ({ ecsCapacityIncreaseConfig: smithyClient._json(value) }),
832
+ eksResourceScalingConfig: (value) => ({ eksResourceScalingConfig: smithyClient._json(value) }),
833
+ executionApprovalConfig: (value) => ({ executionApprovalConfig: smithyClient._json(value) }),
834
+ globalAuroraConfig: (value) => ({ globalAuroraConfig: smithyClient._json(value) }),
835
+ parallelConfig: (value) => ({ parallelConfig: se_ParallelExecutionBlockConfiguration(value) }),
836
+ regionSwitchPlanConfig: (value) => ({ regionSwitchPlanConfig: smithyClient._json(value) }),
837
+ route53HealthCheckConfig: (value) => ({ route53HealthCheckConfig: smithyClient._json(value) }),
838
+ _: (name, value) => ({ [name]: value }),
839
+ });
840
+ };
841
+ const se_ParallelExecutionBlockConfiguration = (input, context) => {
842
+ return smithyClient.take(input, {
843
+ steps: (_) => se_Steps(_),
844
+ });
845
+ };
846
+ const se_Step = (input, context) => {
847
+ return smithyClient.take(input, {
848
+ description: [],
849
+ executionBlockConfiguration: (_) => se_ExecutionBlockConfiguration(_),
850
+ executionBlockType: [],
851
+ name: [],
852
+ });
853
+ };
854
+ const se_Steps = (input, context) => {
855
+ return input
856
+ .filter((e) => e != null)
857
+ .map((entry) => {
858
+ return se_Step(entry);
859
+ });
860
+ };
861
+ const se_UpdatePlanRequest = (input, context) => {
862
+ return smithyClient.take(input, {
863
+ arn: [],
864
+ associatedAlarms: smithyClient._json,
865
+ description: [],
866
+ executionRole: [],
867
+ recoveryTimeObjectiveMinutes: [],
868
+ triggers: smithyClient._json,
869
+ workflows: (_) => se_WorkflowList(_),
870
+ });
871
+ };
872
+ const se_Workflow = (input, context) => {
873
+ return smithyClient.take(input, {
874
+ steps: (_) => se_Steps(_),
875
+ workflowDescription: [],
876
+ workflowTargetAction: [],
877
+ workflowTargetRegion: [],
878
+ });
879
+ };
880
+ const se_WorkflowList = (input, context) => {
881
+ return input
882
+ .filter((e) => e != null)
883
+ .map((entry) => {
884
+ return se_Workflow(entry);
885
+ });
886
+ };
887
+ const de_AbbreviatedExecution = (output, context) => {
888
+ return smithyClient.take(output, {
889
+ actualRecoveryTime: smithyClient.expectString,
890
+ comment: smithyClient.expectString,
891
+ endTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
892
+ executionAction: smithyClient.expectString,
893
+ executionId: smithyClient.expectString,
894
+ executionRegion: smithyClient.expectString,
895
+ executionState: smithyClient.expectString,
896
+ mode: smithyClient.expectString,
897
+ planArn: smithyClient.expectString,
898
+ startTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
899
+ updatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
900
+ version: smithyClient.expectString,
901
+ });
902
+ };
903
+ const de_AbbreviatedExecutionsList = (output, context) => {
904
+ const retVal = (output || [])
905
+ .filter((e) => e != null)
906
+ .map((entry) => {
907
+ return de_AbbreviatedExecution(entry);
908
+ });
909
+ return retVal;
910
+ };
911
+ const de_AbbreviatedPlan = (output, context) => {
912
+ return smithyClient.take(output, {
913
+ activePlanExecution: smithyClient.expectString,
914
+ arn: smithyClient.expectString,
915
+ description: smithyClient.expectString,
916
+ executionRole: smithyClient.expectString,
917
+ name: smithyClient.expectString,
918
+ owner: smithyClient.expectString,
919
+ primaryRegion: smithyClient.expectString,
920
+ recoveryApproach: smithyClient.expectString,
921
+ recoveryTimeObjectiveMinutes: smithyClient.expectInt32,
922
+ regions: smithyClient._json,
923
+ updatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
924
+ version: smithyClient.expectString,
925
+ });
926
+ };
927
+ const de_CreatePlanResponse = (output, context) => {
928
+ return smithyClient.take(output, {
929
+ plan: (_) => de_Plan(_),
930
+ });
931
+ };
932
+ const de_CustomActionLambdaConfiguration = (output, context) => {
933
+ return smithyClient.take(output, {
934
+ lambdas: smithyClient._json,
935
+ regionToRun: smithyClient.expectString,
936
+ retryIntervalMinutes: smithyClient.limitedParseFloat32,
937
+ timeoutMinutes: smithyClient.expectInt32,
938
+ ungraceful: smithyClient._json,
939
+ });
940
+ };
941
+ const de_ExecutionBlockConfiguration = (output, context) => {
942
+ if (output.arcRoutingControlConfig != null) {
943
+ return {
944
+ arcRoutingControlConfig: smithyClient._json(output.arcRoutingControlConfig),
945
+ };
946
+ }
947
+ if (output.customActionLambdaConfig != null) {
948
+ return {
949
+ customActionLambdaConfig: de_CustomActionLambdaConfiguration(output.customActionLambdaConfig),
950
+ };
951
+ }
952
+ if (output.ec2AsgCapacityIncreaseConfig != null) {
953
+ return {
954
+ ec2AsgCapacityIncreaseConfig: smithyClient._json(output.ec2AsgCapacityIncreaseConfig),
955
+ };
956
+ }
957
+ if (output.ecsCapacityIncreaseConfig != null) {
958
+ return {
959
+ ecsCapacityIncreaseConfig: smithyClient._json(output.ecsCapacityIncreaseConfig),
960
+ };
961
+ }
962
+ if (output.eksResourceScalingConfig != null) {
963
+ return {
964
+ eksResourceScalingConfig: smithyClient._json(output.eksResourceScalingConfig),
965
+ };
966
+ }
967
+ if (output.executionApprovalConfig != null) {
968
+ return {
969
+ executionApprovalConfig: smithyClient._json(output.executionApprovalConfig),
970
+ };
971
+ }
972
+ if (output.globalAuroraConfig != null) {
973
+ return {
974
+ globalAuroraConfig: smithyClient._json(output.globalAuroraConfig),
975
+ };
976
+ }
977
+ if (output.parallelConfig != null) {
978
+ return {
979
+ parallelConfig: de_ParallelExecutionBlockConfiguration(output.parallelConfig),
980
+ };
981
+ }
982
+ if (output.regionSwitchPlanConfig != null) {
983
+ return {
984
+ regionSwitchPlanConfig: smithyClient._json(output.regionSwitchPlanConfig),
985
+ };
986
+ }
987
+ if (output.route53HealthCheckConfig != null) {
988
+ return {
989
+ route53HealthCheckConfig: smithyClient._json(output.route53HealthCheckConfig),
990
+ };
991
+ }
992
+ return { $unknown: Object.entries(output)[0] };
993
+ };
994
+ const de_ExecutionEvent = (output, context) => {
995
+ return smithyClient.take(output, {
996
+ description: smithyClient.expectString,
997
+ error: smithyClient.expectString,
998
+ eventId: smithyClient.expectString,
999
+ executionBlockType: smithyClient.expectString,
1000
+ previousEventId: smithyClient.expectString,
1001
+ resources: smithyClient._json,
1002
+ stepName: smithyClient.expectString,
1003
+ timestamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1004
+ type: smithyClient.expectString,
1005
+ });
1006
+ };
1007
+ const de_ExecutionEventList = (output, context) => {
1008
+ const retVal = (output || [])
1009
+ .filter((e) => e != null)
1010
+ .map((entry) => {
1011
+ return de_ExecutionEvent(entry);
1012
+ });
1013
+ return retVal;
1014
+ };
1015
+ const de_GetPlanEvaluationStatusResponse = (output, context) => {
1016
+ return smithyClient.take(output, {
1017
+ evaluationState: smithyClient.expectString,
1018
+ lastEvaluatedVersion: smithyClient.expectString,
1019
+ lastEvaluationTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1020
+ nextToken: smithyClient.expectString,
1021
+ planArn: smithyClient.expectString,
1022
+ region: smithyClient.expectString,
1023
+ warnings: (_) => de_PlanWarnings(_),
1024
+ });
1025
+ };
1026
+ const de_GetPlanExecutionResponse = (output, context) => {
1027
+ return smithyClient.take(output, {
1028
+ actualRecoveryTime: smithyClient.expectString,
1029
+ comment: smithyClient.expectString,
1030
+ endTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1031
+ executionAction: smithyClient.expectString,
1032
+ executionId: smithyClient.expectString,
1033
+ executionRegion: smithyClient.expectString,
1034
+ executionState: smithyClient.expectString,
1035
+ mode: smithyClient.expectString,
1036
+ nextToken: smithyClient.expectString,
1037
+ plan: (_) => de_Plan(_),
1038
+ planArn: smithyClient.expectString,
1039
+ startTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1040
+ stepStates: (_) => de_StepStates(_),
1041
+ updatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1042
+ version: smithyClient.expectString,
1043
+ });
1044
+ };
1045
+ const de_GetPlanInRegionResponse = (output, context) => {
1046
+ return smithyClient.take(output, {
1047
+ plan: (_) => de_Plan(_),
1048
+ });
1049
+ };
1050
+ const de_GetPlanResponse = (output, context) => {
1051
+ return smithyClient.take(output, {
1052
+ plan: (_) => de_Plan(_),
1053
+ });
1054
+ };
1055
+ const de_ListPlanExecutionEventsResponse = (output, context) => {
1056
+ return smithyClient.take(output, {
1057
+ items: (_) => de_ExecutionEventList(_),
1058
+ nextToken: smithyClient.expectString,
1059
+ });
1060
+ };
1061
+ const de_ListPlanExecutionsResponse = (output, context) => {
1062
+ return smithyClient.take(output, {
1063
+ items: (_) => de_AbbreviatedExecutionsList(_),
1064
+ nextToken: smithyClient.expectString,
1065
+ });
1066
+ };
1067
+ const de_ListPlansInRegionResponse = (output, context) => {
1068
+ return smithyClient.take(output, {
1069
+ nextToken: smithyClient.expectString,
1070
+ plans: (_) => de_PlanList(_),
1071
+ });
1072
+ };
1073
+ const de_ListPlansResponse = (output, context) => {
1074
+ return smithyClient.take(output, {
1075
+ nextToken: smithyClient.expectString,
1076
+ plans: (_) => de_PlanList(_),
1077
+ });
1078
+ };
1079
+ const de_ParallelExecutionBlockConfiguration = (output, context) => {
1080
+ return smithyClient.take(output, {
1081
+ steps: (_) => de_Steps(_),
1082
+ });
1083
+ };
1084
+ const de_Plan = (output, context) => {
1085
+ return smithyClient.take(output, {
1086
+ arn: smithyClient.expectString,
1087
+ associatedAlarms: smithyClient._json,
1088
+ description: smithyClient.expectString,
1089
+ executionRole: smithyClient.expectString,
1090
+ name: smithyClient.expectString,
1091
+ owner: smithyClient.expectString,
1092
+ primaryRegion: smithyClient.expectString,
1093
+ recoveryApproach: smithyClient.expectString,
1094
+ recoveryTimeObjectiveMinutes: smithyClient.expectInt32,
1095
+ regions: smithyClient._json,
1096
+ triggers: smithyClient._json,
1097
+ updatedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1098
+ version: smithyClient.expectString,
1099
+ workflows: (_) => de_WorkflowList(_),
1100
+ });
1101
+ };
1102
+ const de_PlanList = (output, context) => {
1103
+ const retVal = (output || [])
1104
+ .filter((e) => e != null)
1105
+ .map((entry) => {
1106
+ return de_AbbreviatedPlan(entry);
1107
+ });
1108
+ return retVal;
1109
+ };
1110
+ const de_PlanWarnings = (output, context) => {
1111
+ const retVal = (output || [])
1112
+ .filter((e) => e != null)
1113
+ .map((entry) => {
1114
+ return de_ResourceWarning(entry);
1115
+ });
1116
+ return retVal;
1117
+ };
1118
+ const de_ResourceWarning = (output, context) => {
1119
+ return smithyClient.take(output, {
1120
+ resourceArn: smithyClient.expectString,
1121
+ stepName: smithyClient.expectString,
1122
+ version: smithyClient.expectString,
1123
+ warningMessage: smithyClient.expectString,
1124
+ warningStatus: smithyClient.expectString,
1125
+ warningUpdatedTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1126
+ workflow: smithyClient._json,
1127
+ });
1128
+ };
1129
+ const de_Step = (output, context) => {
1130
+ return smithyClient.take(output, {
1131
+ description: smithyClient.expectString,
1132
+ executionBlockConfiguration: (_) => de_ExecutionBlockConfiguration(core$1.awsExpectUnion(_)),
1133
+ executionBlockType: smithyClient.expectString,
1134
+ name: smithyClient.expectString,
1135
+ });
1136
+ };
1137
+ const de_Steps = (output, context) => {
1138
+ const retVal = (output || [])
1139
+ .filter((e) => e != null)
1140
+ .map((entry) => {
1141
+ return de_Step(entry);
1142
+ });
1143
+ return retVal;
1144
+ };
1145
+ const de_StepState = (output, context) => {
1146
+ return smithyClient.take(output, {
1147
+ endTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1148
+ name: smithyClient.expectString,
1149
+ startTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
1150
+ status: smithyClient.expectString,
1151
+ stepMode: smithyClient.expectString,
1152
+ });
1153
+ };
1154
+ const de_StepStates = (output, context) => {
1155
+ const retVal = (output || [])
1156
+ .filter((e) => e != null)
1157
+ .map((entry) => {
1158
+ return de_StepState(entry);
1159
+ });
1160
+ return retVal;
1161
+ };
1162
+ const de_UpdatePlanResponse = (output, context) => {
1163
+ return smithyClient.take(output, {
1164
+ plan: (_) => de_Plan(_),
1165
+ });
1166
+ };
1167
+ const de_Workflow = (output, context) => {
1168
+ return smithyClient.take(output, {
1169
+ steps: (_) => de_Steps(_),
1170
+ workflowDescription: smithyClient.expectString,
1171
+ workflowTargetAction: smithyClient.expectString,
1172
+ workflowTargetRegion: smithyClient.expectString,
1173
+ });
1174
+ };
1175
+ const de_WorkflowList = (output, context) => {
1176
+ const retVal = (output || [])
1177
+ .filter((e) => e != null)
1178
+ .map((entry) => {
1179
+ return de_Workflow(entry);
1180
+ });
1181
+ return retVal;
1182
+ };
1183
+ const deserializeMetadata = (output) => ({
1184
+ httpStatusCode: output.statusCode,
1185
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1186
+ extendedRequestId: output.headers["x-amz-id-2"],
1187
+ cfId: output.headers["x-amz-cf-id"],
1188
+ });
1189
+ const throwDefaultError = smithyClient.withBaseException(ARCRegionSwitchServiceException);
1190
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1191
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1192
+ const contents = {
1193
+ protocol,
1194
+ hostname,
1195
+ port,
1196
+ method: "POST",
1197
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1198
+ headers,
1199
+ };
1200
+ if (body !== undefined) {
1201
+ contents.body = body;
1202
+ }
1203
+ return new protocolHttp.HttpRequest(contents);
1204
+ };
1205
+ function sharedHeaders(operation) {
1206
+ return {
1207
+ "content-type": "application/x-amz-json-1.0",
1208
+ "x-amz-target": `ArcRegionSwitch.${operation}`,
1209
+ };
1210
+ }
1641
1211
 
1642
- // src/commands/UpdatePlanCommand.ts
1643
-
1212
+ class ApprovePlanExecutionStepCommand extends smithyClient.Command
1213
+ .classBuilder()
1214
+ .ep(commonParams)
1215
+ .m(function (Command, cs, config, o) {
1216
+ return [
1217
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1218
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1219
+ ];
1220
+ })
1221
+ .s("ArcRegionSwitch", "ApprovePlanExecutionStep", {})
1222
+ .n("ARCRegionSwitchClient", "ApprovePlanExecutionStepCommand")
1223
+ .f(void 0, void 0)
1224
+ .ser(se_ApprovePlanExecutionStepCommand)
1225
+ .de(de_ApprovePlanExecutionStepCommand)
1226
+ .build() {
1227
+ }
1644
1228
 
1229
+ class CancelPlanExecutionCommand extends smithyClient.Command
1230
+ .classBuilder()
1231
+ .ep(commonParams)
1232
+ .m(function (Command, cs, config, o) {
1233
+ return [
1234
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1235
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1236
+ ];
1237
+ })
1238
+ .s("ArcRegionSwitch", "CancelPlanExecution", {})
1239
+ .n("ARCRegionSwitchClient", "CancelPlanExecutionCommand")
1240
+ .f(void 0, void 0)
1241
+ .ser(se_CancelPlanExecutionCommand)
1242
+ .de(de_CancelPlanExecutionCommand)
1243
+ .build() {
1244
+ }
1645
1245
 
1646
- var UpdatePlanCommand = class extends import_smithy_client.Command.classBuilder().ep({
1647
- ...commonParams,
1648
- UseControlPlaneEndpoint: { type: "staticContextParams", value: true }
1649
- }).m(function(Command, cs, config, o) {
1650
- return [
1651
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1652
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1653
- ];
1654
- }).s("ArcRegionSwitch", "UpdatePlan", {}).n("ARCRegionSwitchClient", "UpdatePlanCommand").f(void 0, void 0).ser(se_UpdatePlanCommand).de(de_UpdatePlanCommand).build() {
1655
- static {
1656
- __name(this, "UpdatePlanCommand");
1657
- }
1658
- };
1246
+ class CreatePlanCommand extends smithyClient.Command
1247
+ .classBuilder()
1248
+ .ep({
1249
+ ...commonParams,
1250
+ UseControlPlaneEndpoint: { type: "staticContextParams", value: true },
1251
+ })
1252
+ .m(function (Command, cs, config, o) {
1253
+ return [
1254
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1255
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1256
+ ];
1257
+ })
1258
+ .s("ArcRegionSwitch", "CreatePlan", {})
1259
+ .n("ARCRegionSwitchClient", "CreatePlanCommand")
1260
+ .f(void 0, void 0)
1261
+ .ser(se_CreatePlanCommand)
1262
+ .de(de_CreatePlanCommand)
1263
+ .build() {
1264
+ }
1659
1265
 
1660
- // src/commands/UpdatePlanExecutionCommand.ts
1266
+ class DeletePlanCommand extends smithyClient.Command
1267
+ .classBuilder()
1268
+ .ep({
1269
+ ...commonParams,
1270
+ UseControlPlaneEndpoint: { type: "staticContextParams", value: true },
1271
+ })
1272
+ .m(function (Command, cs, config, o) {
1273
+ return [
1274
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1275
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1276
+ ];
1277
+ })
1278
+ .s("ArcRegionSwitch", "DeletePlan", {})
1279
+ .n("ARCRegionSwitchClient", "DeletePlanCommand")
1280
+ .f(void 0, void 0)
1281
+ .ser(se_DeletePlanCommand)
1282
+ .de(de_DeletePlanCommand)
1283
+ .build() {
1284
+ }
1661
1285
 
1286
+ class GetPlanCommand extends smithyClient.Command
1287
+ .classBuilder()
1288
+ .ep({
1289
+ ...commonParams,
1290
+ UseControlPlaneEndpoint: { type: "staticContextParams", value: true },
1291
+ })
1292
+ .m(function (Command, cs, config, o) {
1293
+ return [
1294
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1295
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1296
+ ];
1297
+ })
1298
+ .s("ArcRegionSwitch", "GetPlan", {})
1299
+ .n("ARCRegionSwitchClient", "GetPlanCommand")
1300
+ .f(void 0, void 0)
1301
+ .ser(se_GetPlanCommand)
1302
+ .de(de_GetPlanCommand)
1303
+ .build() {
1304
+ }
1662
1305
 
1306
+ class GetPlanEvaluationStatusCommand extends smithyClient.Command
1307
+ .classBuilder()
1308
+ .ep(commonParams)
1309
+ .m(function (Command, cs, config, o) {
1310
+ return [
1311
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1312
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1313
+ ];
1314
+ })
1315
+ .s("ArcRegionSwitch", "GetPlanEvaluationStatus", {})
1316
+ .n("ARCRegionSwitchClient", "GetPlanEvaluationStatusCommand")
1317
+ .f(void 0, void 0)
1318
+ .ser(se_GetPlanEvaluationStatusCommand)
1319
+ .de(de_GetPlanEvaluationStatusCommand)
1320
+ .build() {
1321
+ }
1663
1322
 
1664
- var UpdatePlanExecutionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1665
- return [
1666
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1667
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1668
- ];
1669
- }).s("ArcRegionSwitch", "UpdatePlanExecution", {}).n("ARCRegionSwitchClient", "UpdatePlanExecutionCommand").f(void 0, void 0).ser(se_UpdatePlanExecutionCommand).de(de_UpdatePlanExecutionCommand).build() {
1670
- static {
1671
- __name(this, "UpdatePlanExecutionCommand");
1672
- }
1673
- };
1323
+ class GetPlanExecutionCommand extends smithyClient.Command
1324
+ .classBuilder()
1325
+ .ep(commonParams)
1326
+ .m(function (Command, cs, config, o) {
1327
+ return [
1328
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1329
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1330
+ ];
1331
+ })
1332
+ .s("ArcRegionSwitch", "GetPlanExecution", {})
1333
+ .n("ARCRegionSwitchClient", "GetPlanExecutionCommand")
1334
+ .f(void 0, void 0)
1335
+ .ser(se_GetPlanExecutionCommand)
1336
+ .de(de_GetPlanExecutionCommand)
1337
+ .build() {
1338
+ }
1674
1339
 
1675
- // src/commands/UpdatePlanExecutionStepCommand.ts
1340
+ class GetPlanInRegionCommand extends smithyClient.Command
1341
+ .classBuilder()
1342
+ .ep(commonParams)
1343
+ .m(function (Command, cs, config, o) {
1344
+ return [
1345
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1346
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1347
+ ];
1348
+ })
1349
+ .s("ArcRegionSwitch", "GetPlanInRegion", {})
1350
+ .n("ARCRegionSwitchClient", "GetPlanInRegionCommand")
1351
+ .f(void 0, void 0)
1352
+ .ser(se_GetPlanInRegionCommand)
1353
+ .de(de_GetPlanInRegionCommand)
1354
+ .build() {
1355
+ }
1676
1356
 
1357
+ class ListPlanExecutionEventsCommand extends smithyClient.Command
1358
+ .classBuilder()
1359
+ .ep(commonParams)
1360
+ .m(function (Command, cs, config, o) {
1361
+ return [
1362
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1363
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1364
+ ];
1365
+ })
1366
+ .s("ArcRegionSwitch", "ListPlanExecutionEvents", {})
1367
+ .n("ARCRegionSwitchClient", "ListPlanExecutionEventsCommand")
1368
+ .f(void 0, void 0)
1369
+ .ser(se_ListPlanExecutionEventsCommand)
1370
+ .de(de_ListPlanExecutionEventsCommand)
1371
+ .build() {
1372
+ }
1677
1373
 
1374
+ class ListPlanExecutionsCommand extends smithyClient.Command
1375
+ .classBuilder()
1376
+ .ep(commonParams)
1377
+ .m(function (Command, cs, config, o) {
1378
+ return [
1379
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1380
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1381
+ ];
1382
+ })
1383
+ .s("ArcRegionSwitch", "ListPlanExecutions", {})
1384
+ .n("ARCRegionSwitchClient", "ListPlanExecutionsCommand")
1385
+ .f(void 0, void 0)
1386
+ .ser(se_ListPlanExecutionsCommand)
1387
+ .de(de_ListPlanExecutionsCommand)
1388
+ .build() {
1389
+ }
1678
1390
 
1679
- var UpdatePlanExecutionStepCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1680
- return [
1681
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1682
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1683
- ];
1684
- }).s("ArcRegionSwitch", "UpdatePlanExecutionStep", {}).n("ARCRegionSwitchClient", "UpdatePlanExecutionStepCommand").f(void 0, void 0).ser(se_UpdatePlanExecutionStepCommand).de(de_UpdatePlanExecutionStepCommand).build() {
1685
- static {
1686
- __name(this, "UpdatePlanExecutionStepCommand");
1687
- }
1688
- };
1391
+ class ListPlansCommand extends smithyClient.Command
1392
+ .classBuilder()
1393
+ .ep({
1394
+ ...commonParams,
1395
+ UseControlPlaneEndpoint: { type: "staticContextParams", value: true },
1396
+ })
1397
+ .m(function (Command, cs, config, o) {
1398
+ return [
1399
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1400
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1401
+ ];
1402
+ })
1403
+ .s("ArcRegionSwitch", "ListPlans", {})
1404
+ .n("ARCRegionSwitchClient", "ListPlansCommand")
1405
+ .f(void 0, void 0)
1406
+ .ser(se_ListPlansCommand)
1407
+ .de(de_ListPlansCommand)
1408
+ .build() {
1409
+ }
1689
1410
 
1690
- // src/ARCRegionSwitch.ts
1691
- var commands = {
1692
- ApprovePlanExecutionStepCommand,
1693
- CancelPlanExecutionCommand,
1694
- CreatePlanCommand,
1695
- DeletePlanCommand,
1696
- GetPlanCommand,
1697
- GetPlanEvaluationStatusCommand,
1698
- GetPlanExecutionCommand,
1699
- GetPlanInRegionCommand,
1700
- ListPlanExecutionEventsCommand,
1701
- ListPlanExecutionsCommand,
1702
- ListPlansCommand,
1703
- ListPlansInRegionCommand,
1704
- ListRoute53HealthChecksCommand,
1705
- ListTagsForResourceCommand,
1706
- StartPlanExecutionCommand,
1707
- TagResourceCommand,
1708
- UntagResourceCommand,
1709
- UpdatePlanCommand,
1710
- UpdatePlanExecutionCommand,
1711
- UpdatePlanExecutionStepCommand
1712
- };
1713
- var ARCRegionSwitch = class extends ARCRegionSwitchClient {
1714
- static {
1715
- __name(this, "ARCRegionSwitch");
1716
- }
1717
- };
1718
- (0, import_smithy_client.createAggregatedClient)(commands, ARCRegionSwitch);
1411
+ class ListPlansInRegionCommand extends smithyClient.Command
1412
+ .classBuilder()
1413
+ .ep(commonParams)
1414
+ .m(function (Command, cs, config, o) {
1415
+ return [
1416
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1417
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1418
+ ];
1419
+ })
1420
+ .s("ArcRegionSwitch", "ListPlansInRegion", {})
1421
+ .n("ARCRegionSwitchClient", "ListPlansInRegionCommand")
1422
+ .f(void 0, void 0)
1423
+ .ser(se_ListPlansInRegionCommand)
1424
+ .de(de_ListPlansInRegionCommand)
1425
+ .build() {
1426
+ }
1719
1427
 
1720
- // src/pagination/GetPlanEvaluationStatusPaginator.ts
1428
+ class ListRoute53HealthChecksCommand extends smithyClient.Command
1429
+ .classBuilder()
1430
+ .ep({
1431
+ ...commonParams,
1432
+ UseControlPlaneEndpoint: { type: "staticContextParams", value: true },
1433
+ })
1434
+ .m(function (Command, cs, config, o) {
1435
+ return [
1436
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1437
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1438
+ ];
1439
+ })
1440
+ .s("ArcRegionSwitch", "ListRoute53HealthChecks", {})
1441
+ .n("ARCRegionSwitchClient", "ListRoute53HealthChecksCommand")
1442
+ .f(void 0, void 0)
1443
+ .ser(se_ListRoute53HealthChecksCommand)
1444
+ .de(de_ListRoute53HealthChecksCommand)
1445
+ .build() {
1446
+ }
1721
1447
 
1722
- var paginateGetPlanEvaluationStatus = (0, import_core.createPaginator)(ARCRegionSwitchClient, GetPlanEvaluationStatusCommand, "nextToken", "nextToken", "maxResults");
1448
+ class ListTagsForResourceCommand extends smithyClient.Command
1449
+ .classBuilder()
1450
+ .ep({
1451
+ ...commonParams,
1452
+ UseControlPlaneEndpoint: { type: "staticContextParams", value: true },
1453
+ })
1454
+ .m(function (Command, cs, config, o) {
1455
+ return [
1456
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1457
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1458
+ ];
1459
+ })
1460
+ .s("ArcRegionSwitch", "ListTagsForResource", {})
1461
+ .n("ARCRegionSwitchClient", "ListTagsForResourceCommand")
1462
+ .f(void 0, void 0)
1463
+ .ser(se_ListTagsForResourceCommand)
1464
+ .de(de_ListTagsForResourceCommand)
1465
+ .build() {
1466
+ }
1723
1467
 
1724
- // src/pagination/GetPlanExecutionPaginator.ts
1468
+ class StartPlanExecutionCommand extends smithyClient.Command
1469
+ .classBuilder()
1470
+ .ep(commonParams)
1471
+ .m(function (Command, cs, config, o) {
1472
+ return [
1473
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1474
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1475
+ ];
1476
+ })
1477
+ .s("ArcRegionSwitch", "StartPlanExecution", {})
1478
+ .n("ARCRegionSwitchClient", "StartPlanExecutionCommand")
1479
+ .f(void 0, void 0)
1480
+ .ser(se_StartPlanExecutionCommand)
1481
+ .de(de_StartPlanExecutionCommand)
1482
+ .build() {
1483
+ }
1725
1484
 
1726
- var paginateGetPlanExecution = (0, import_core.createPaginator)(ARCRegionSwitchClient, GetPlanExecutionCommand, "nextToken", "nextToken", "maxResults");
1485
+ class TagResourceCommand extends smithyClient.Command
1486
+ .classBuilder()
1487
+ .ep({
1488
+ ...commonParams,
1489
+ UseControlPlaneEndpoint: { type: "staticContextParams", value: true },
1490
+ })
1491
+ .m(function (Command, cs, config, o) {
1492
+ return [
1493
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1494
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1495
+ ];
1496
+ })
1497
+ .s("ArcRegionSwitch", "TagResource", {})
1498
+ .n("ARCRegionSwitchClient", "TagResourceCommand")
1499
+ .f(void 0, void 0)
1500
+ .ser(se_TagResourceCommand)
1501
+ .de(de_TagResourceCommand)
1502
+ .build() {
1503
+ }
1727
1504
 
1728
- // src/pagination/ListPlanExecutionEventsPaginator.ts
1505
+ class UntagResourceCommand extends smithyClient.Command
1506
+ .classBuilder()
1507
+ .ep({
1508
+ ...commonParams,
1509
+ UseControlPlaneEndpoint: { type: "staticContextParams", value: true },
1510
+ })
1511
+ .m(function (Command, cs, config, o) {
1512
+ return [
1513
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1514
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1515
+ ];
1516
+ })
1517
+ .s("ArcRegionSwitch", "UntagResource", {})
1518
+ .n("ARCRegionSwitchClient", "UntagResourceCommand")
1519
+ .f(void 0, void 0)
1520
+ .ser(se_UntagResourceCommand)
1521
+ .de(de_UntagResourceCommand)
1522
+ .build() {
1523
+ }
1729
1524
 
1730
- var paginateListPlanExecutionEvents = (0, import_core.createPaginator)(ARCRegionSwitchClient, ListPlanExecutionEventsCommand, "nextToken", "nextToken", "maxResults");
1525
+ class UpdatePlanCommand extends smithyClient.Command
1526
+ .classBuilder()
1527
+ .ep({
1528
+ ...commonParams,
1529
+ UseControlPlaneEndpoint: { type: "staticContextParams", value: true },
1530
+ })
1531
+ .m(function (Command, cs, config, o) {
1532
+ return [
1533
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1534
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1535
+ ];
1536
+ })
1537
+ .s("ArcRegionSwitch", "UpdatePlan", {})
1538
+ .n("ARCRegionSwitchClient", "UpdatePlanCommand")
1539
+ .f(void 0, void 0)
1540
+ .ser(se_UpdatePlanCommand)
1541
+ .de(de_UpdatePlanCommand)
1542
+ .build() {
1543
+ }
1731
1544
 
1732
- // src/pagination/ListPlanExecutionsPaginator.ts
1545
+ class UpdatePlanExecutionCommand extends smithyClient.Command
1546
+ .classBuilder()
1547
+ .ep(commonParams)
1548
+ .m(function (Command, cs, config, o) {
1549
+ return [
1550
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1551
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1552
+ ];
1553
+ })
1554
+ .s("ArcRegionSwitch", "UpdatePlanExecution", {})
1555
+ .n("ARCRegionSwitchClient", "UpdatePlanExecutionCommand")
1556
+ .f(void 0, void 0)
1557
+ .ser(se_UpdatePlanExecutionCommand)
1558
+ .de(de_UpdatePlanExecutionCommand)
1559
+ .build() {
1560
+ }
1733
1561
 
1734
- var paginateListPlanExecutions = (0, import_core.createPaginator)(ARCRegionSwitchClient, ListPlanExecutionsCommand, "nextToken", "nextToken", "maxResults");
1562
+ class UpdatePlanExecutionStepCommand extends smithyClient.Command
1563
+ .classBuilder()
1564
+ .ep(commonParams)
1565
+ .m(function (Command, cs, config, o) {
1566
+ return [
1567
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1568
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1569
+ ];
1570
+ })
1571
+ .s("ArcRegionSwitch", "UpdatePlanExecutionStep", {})
1572
+ .n("ARCRegionSwitchClient", "UpdatePlanExecutionStepCommand")
1573
+ .f(void 0, void 0)
1574
+ .ser(se_UpdatePlanExecutionStepCommand)
1575
+ .de(de_UpdatePlanExecutionStepCommand)
1576
+ .build() {
1577
+ }
1735
1578
 
1736
- // src/pagination/ListPlansInRegionPaginator.ts
1579
+ const commands = {
1580
+ ApprovePlanExecutionStepCommand,
1581
+ CancelPlanExecutionCommand,
1582
+ CreatePlanCommand,
1583
+ DeletePlanCommand,
1584
+ GetPlanCommand,
1585
+ GetPlanEvaluationStatusCommand,
1586
+ GetPlanExecutionCommand,
1587
+ GetPlanInRegionCommand,
1588
+ ListPlanExecutionEventsCommand,
1589
+ ListPlanExecutionsCommand,
1590
+ ListPlansCommand,
1591
+ ListPlansInRegionCommand,
1592
+ ListRoute53HealthChecksCommand,
1593
+ ListTagsForResourceCommand,
1594
+ StartPlanExecutionCommand,
1595
+ TagResourceCommand,
1596
+ UntagResourceCommand,
1597
+ UpdatePlanCommand,
1598
+ UpdatePlanExecutionCommand,
1599
+ UpdatePlanExecutionStepCommand,
1600
+ };
1601
+ class ARCRegionSwitch extends ARCRegionSwitchClient {
1602
+ }
1603
+ smithyClient.createAggregatedClient(commands, ARCRegionSwitch);
1737
1604
 
1738
- var paginateListPlansInRegion = (0, import_core.createPaginator)(ARCRegionSwitchClient, ListPlansInRegionCommand, "nextToken", "nextToken", "maxResults");
1605
+ const paginateGetPlanEvaluationStatus = core.createPaginator(ARCRegionSwitchClient, GetPlanEvaluationStatusCommand, "nextToken", "nextToken", "maxResults");
1739
1606
 
1740
- // src/pagination/ListPlansPaginator.ts
1607
+ const paginateGetPlanExecution = core.createPaginator(ARCRegionSwitchClient, GetPlanExecutionCommand, "nextToken", "nextToken", "maxResults");
1741
1608
 
1742
- var paginateListPlans = (0, import_core.createPaginator)(ARCRegionSwitchClient, ListPlansCommand, "nextToken", "nextToken", "maxResults");
1609
+ const paginateListPlanExecutionEvents = core.createPaginator(ARCRegionSwitchClient, ListPlanExecutionEventsCommand, "nextToken", "nextToken", "maxResults");
1743
1610
 
1744
- // src/pagination/ListRoute53HealthChecksPaginator.ts
1611
+ const paginateListPlanExecutions = core.createPaginator(ARCRegionSwitchClient, ListPlanExecutionsCommand, "nextToken", "nextToken", "maxResults");
1745
1612
 
1746
- var paginateListRoute53HealthChecks = (0, import_core.createPaginator)(ARCRegionSwitchClient, ListRoute53HealthChecksCommand, "nextToken", "nextToken", "maxResults");
1613
+ const paginateListPlansInRegion = core.createPaginator(ARCRegionSwitchClient, ListPlansInRegionCommand, "nextToken", "nextToken", "maxResults");
1747
1614
 
1748
- // src/waiters/waitForPlanEvaluationStatusPassed.ts
1749
- var import_util_waiter = require("@smithy/util-waiter");
1750
- var checkState = /* @__PURE__ */ __name(async (client, input) => {
1751
- let reason;
1752
- try {
1753
- const result = await client.send(new GetPlanEvaluationStatusCommand(input));
1754
- reason = result;
1755
- try {
1756
- const returnComparator = /* @__PURE__ */ __name(() => {
1757
- return result.evaluationState;
1758
- }, "returnComparator");
1759
- if (returnComparator() === "passed") {
1760
- return { state: import_util_waiter.WaiterState.SUCCESS, reason };
1761
- }
1762
- } catch (e) {
1763
- }
1764
- try {
1765
- const returnComparator = /* @__PURE__ */ __name(() => {
1766
- return result.evaluationState;
1767
- }, "returnComparator");
1768
- if (returnComparator() === "actionRequired") {
1769
- return { state: import_util_waiter.WaiterState.FAILURE, reason };
1770
- }
1771
- } catch (e) {
1772
- }
1773
- try {
1774
- const returnComparator = /* @__PURE__ */ __name(() => {
1775
- return result.evaluationState;
1776
- }, "returnComparator");
1777
- if (returnComparator() === "pendingEvaluation") {
1778
- return { state: import_util_waiter.WaiterState.RETRY, reason };
1779
- }
1780
- } catch (e) {
1781
- }
1782
- } catch (exception) {
1783
- reason = exception;
1784
- }
1785
- return { state: import_util_waiter.WaiterState.RETRY, reason };
1786
- }, "checkState");
1787
- var waitForPlanEvaluationStatusPassed = /* @__PURE__ */ __name(async (params, input) => {
1788
- const serviceDefaults = { minDelay: 30, maxDelay: 120 };
1789
- return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
1790
- }, "waitForPlanEvaluationStatusPassed");
1791
- var waitUntilPlanEvaluationStatusPassed = /* @__PURE__ */ __name(async (params, input) => {
1792
- const serviceDefaults = { minDelay: 30, maxDelay: 120 };
1793
- const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
1794
- return (0, import_util_waiter.checkExceptions)(result);
1795
- }, "waitUntilPlanEvaluationStatusPassed");
1615
+ const paginateListPlans = core.createPaginator(ARCRegionSwitchClient, ListPlansCommand, "nextToken", "nextToken", "maxResults");
1796
1616
 
1797
- // src/waiters/waitForPlanExecutionCompleted.ts
1617
+ const paginateListRoute53HealthChecks = core.createPaginator(ARCRegionSwitchClient, ListRoute53HealthChecksCommand, "nextToken", "nextToken", "maxResults");
1798
1618
 
1799
- var checkState2 = /* @__PURE__ */ __name(async (client, input) => {
1800
- let reason;
1801
- try {
1802
- const result = await client.send(new GetPlanExecutionCommand(input));
1803
- reason = result;
1619
+ const checkState$1 = async (client, input) => {
1620
+ let reason;
1804
1621
  try {
1805
- const returnComparator = /* @__PURE__ */ __name(() => {
1806
- return result.executionState;
1807
- }, "returnComparator");
1808
- if (returnComparator() === "completed") {
1809
- return { state: import_util_waiter.WaiterState.SUCCESS, reason };
1810
- }
1811
- } catch (e) {
1622
+ const result = await client.send(new GetPlanEvaluationStatusCommand(input));
1623
+ reason = result;
1624
+ try {
1625
+ const returnComparator = () => {
1626
+ return result.evaluationState;
1627
+ };
1628
+ if (returnComparator() === "passed") {
1629
+ return { state: utilWaiter.WaiterState.SUCCESS, reason };
1630
+ }
1631
+ }
1632
+ catch (e) { }
1633
+ try {
1634
+ const returnComparator = () => {
1635
+ return result.evaluationState;
1636
+ };
1637
+ if (returnComparator() === "actionRequired") {
1638
+ return { state: utilWaiter.WaiterState.FAILURE, reason };
1639
+ }
1640
+ }
1641
+ catch (e) { }
1642
+ try {
1643
+ const returnComparator = () => {
1644
+ return result.evaluationState;
1645
+ };
1646
+ if (returnComparator() === "pendingEvaluation") {
1647
+ return { state: utilWaiter.WaiterState.RETRY, reason };
1648
+ }
1649
+ }
1650
+ catch (e) { }
1812
1651
  }
1813
- try {
1814
- const returnComparator = /* @__PURE__ */ __name(() => {
1815
- return result.executionState;
1816
- }, "returnComparator");
1817
- if (returnComparator() === "completedWithExceptions") {
1818
- return { state: import_util_waiter.WaiterState.SUCCESS, reason };
1819
- }
1820
- } catch (e) {
1821
- }
1822
- try {
1823
- const returnComparator = /* @__PURE__ */ __name(() => {
1824
- return result.executionState;
1825
- }, "returnComparator");
1826
- if (returnComparator() === "failed") {
1827
- return { state: import_util_waiter.WaiterState.FAILURE, reason };
1828
- }
1829
- } catch (e) {
1652
+ catch (exception) {
1653
+ reason = exception;
1830
1654
  }
1655
+ return { state: utilWaiter.WaiterState.RETRY, reason };
1656
+ };
1657
+ const waitForPlanEvaluationStatusPassed = async (params, input) => {
1658
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
1659
+ return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
1660
+ };
1661
+ const waitUntilPlanEvaluationStatusPassed = async (params, input) => {
1662
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
1663
+ const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
1664
+ return utilWaiter.checkExceptions(result);
1665
+ };
1666
+
1667
+ const checkState = async (client, input) => {
1668
+ let reason;
1831
1669
  try {
1832
- const returnComparator = /* @__PURE__ */ __name(() => {
1833
- return result.executionState;
1834
- }, "returnComparator");
1835
- if (returnComparator() === "canceled") {
1836
- return { state: import_util_waiter.WaiterState.FAILURE, reason };
1837
- }
1838
- } catch (e) {
1670
+ const result = await client.send(new GetPlanExecutionCommand(input));
1671
+ reason = result;
1672
+ try {
1673
+ const returnComparator = () => {
1674
+ return result.executionState;
1675
+ };
1676
+ if (returnComparator() === "completed") {
1677
+ return { state: utilWaiter.WaiterState.SUCCESS, reason };
1678
+ }
1679
+ }
1680
+ catch (e) { }
1681
+ try {
1682
+ const returnComparator = () => {
1683
+ return result.executionState;
1684
+ };
1685
+ if (returnComparator() === "completedWithExceptions") {
1686
+ return { state: utilWaiter.WaiterState.SUCCESS, reason };
1687
+ }
1688
+ }
1689
+ catch (e) { }
1690
+ try {
1691
+ const returnComparator = () => {
1692
+ return result.executionState;
1693
+ };
1694
+ if (returnComparator() === "failed") {
1695
+ return { state: utilWaiter.WaiterState.FAILURE, reason };
1696
+ }
1697
+ }
1698
+ catch (e) { }
1699
+ try {
1700
+ const returnComparator = () => {
1701
+ return result.executionState;
1702
+ };
1703
+ if (returnComparator() === "canceled") {
1704
+ return { state: utilWaiter.WaiterState.FAILURE, reason };
1705
+ }
1706
+ }
1707
+ catch (e) { }
1708
+ try {
1709
+ const returnComparator = () => {
1710
+ return result.executionState;
1711
+ };
1712
+ if (returnComparator() === "planExecutionTimedOut") {
1713
+ return { state: utilWaiter.WaiterState.FAILURE, reason };
1714
+ }
1715
+ }
1716
+ catch (e) { }
1839
1717
  }
1840
- try {
1841
- const returnComparator = /* @__PURE__ */ __name(() => {
1842
- return result.executionState;
1843
- }, "returnComparator");
1844
- if (returnComparator() === "planExecutionTimedOut") {
1845
- return { state: import_util_waiter.WaiterState.FAILURE, reason };
1846
- }
1847
- } catch (e) {
1718
+ catch (exception) {
1719
+ reason = exception;
1848
1720
  }
1849
- } catch (exception) {
1850
- reason = exception;
1851
- }
1852
- return { state: import_util_waiter.WaiterState.RETRY, reason };
1853
- }, "checkState");
1854
- var waitForPlanExecutionCompleted = /* @__PURE__ */ __name(async (params, input) => {
1855
- const serviceDefaults = { minDelay: 30, maxDelay: 120 };
1856
- return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
1857
- }, "waitForPlanExecutionCompleted");
1858
- var waitUntilPlanExecutionCompleted = /* @__PURE__ */ __name(async (params, input) => {
1859
- const serviceDefaults = { minDelay: 30, maxDelay: 120 };
1860
- const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
1861
- return (0, import_util_waiter.checkExceptions)(result);
1862
- }, "waitUntilPlanExecutionCompleted");
1863
- // Annotate the CommonJS export names for ESM import in node:
1721
+ return { state: utilWaiter.WaiterState.RETRY, reason };
1722
+ };
1723
+ const waitForPlanExecutionCompleted = async (params, input) => {
1724
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
1725
+ return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
1726
+ };
1727
+ const waitUntilPlanExecutionCompleted = async (params, input) => {
1728
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
1729
+ const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
1730
+ return utilWaiter.checkExceptions(result);
1731
+ };
1864
1732
 
1865
- 0 && (module.exports = {
1866
- ARCRegionSwitchServiceException,
1867
- __Client,
1868
- ARCRegionSwitchClient,
1869
- ARCRegionSwitch,
1870
- $Command,
1871
- ApprovePlanExecutionStepCommand,
1872
- CancelPlanExecutionCommand,
1873
- CreatePlanCommand,
1874
- DeletePlanCommand,
1875
- GetPlanCommand,
1876
- GetPlanEvaluationStatusCommand,
1877
- GetPlanExecutionCommand,
1878
- GetPlanInRegionCommand,
1879
- ListPlanExecutionEventsCommand,
1880
- ListPlanExecutionsCommand,
1881
- ListPlansCommand,
1882
- ListPlansInRegionCommand,
1883
- ListRoute53HealthChecksCommand,
1884
- ListTagsForResourceCommand,
1885
- StartPlanExecutionCommand,
1886
- TagResourceCommand,
1887
- UntagResourceCommand,
1888
- UpdatePlanCommand,
1889
- UpdatePlanExecutionCommand,
1890
- UpdatePlanExecutionStepCommand,
1891
- paginateGetPlanEvaluationStatus,
1892
- paginateGetPlanExecution,
1893
- paginateListPlanExecutionEvents,
1894
- paginateListPlanExecutions,
1895
- paginateListPlansInRegion,
1896
- paginateListPlans,
1897
- paginateListRoute53HealthChecks,
1898
- waitForPlanEvaluationStatusPassed,
1899
- waitUntilPlanEvaluationStatusPassed,
1900
- waitForPlanExecutionCompleted,
1901
- waitUntilPlanExecutionCompleted,
1902
- ExecutionAction,
1903
- ExecutionState,
1904
- ExecutionMode,
1905
- RecoveryApproach,
1906
- AccessDeniedException,
1907
- AlarmCondition,
1908
- AlarmType,
1909
- Approval,
1910
- ResourceNotFoundException,
1911
- EvaluationStatus,
1912
- ResourceWarningStatus,
1913
- WorkflowTargetAction,
1914
- RoutingControlStateChange,
1915
- RegionToRunIn,
1916
- LambdaUngracefulBehavior,
1917
- Ec2AsgCapacityMonitoringApproach,
1918
- EcsCapacityMonitoringApproach,
1919
- EksCapacityMonitoringApproach,
1920
- GlobalAuroraDefaultBehavior,
1921
- GlobalAuroraUngracefulBehavior,
1922
- ExecutionBlockType,
1923
- StepStatus,
1924
- ExecutionEventType,
1925
- InternalServerException,
1926
- IllegalStateException,
1927
- IllegalArgumentException,
1928
- UpdatePlanExecutionAction,
1929
- UpdatePlanExecutionStepAction,
1930
- ExecutionBlockConfiguration
1733
+ Object.defineProperty(exports, "$Command", {
1734
+ enumerable: true,
1735
+ get: function () { return smithyClient.Command; }
1931
1736
  });
1932
-
1737
+ Object.defineProperty(exports, "__Client", {
1738
+ enumerable: true,
1739
+ get: function () { return smithyClient.Client; }
1740
+ });
1741
+ exports.ARCRegionSwitch = ARCRegionSwitch;
1742
+ exports.ARCRegionSwitchClient = ARCRegionSwitchClient;
1743
+ exports.ARCRegionSwitchServiceException = ARCRegionSwitchServiceException;
1744
+ exports.AccessDeniedException = AccessDeniedException;
1745
+ exports.AlarmCondition = AlarmCondition;
1746
+ exports.AlarmType = AlarmType;
1747
+ exports.Approval = Approval;
1748
+ exports.ApprovePlanExecutionStepCommand = ApprovePlanExecutionStepCommand;
1749
+ exports.CancelPlanExecutionCommand = CancelPlanExecutionCommand;
1750
+ exports.CreatePlanCommand = CreatePlanCommand;
1751
+ exports.DeletePlanCommand = DeletePlanCommand;
1752
+ exports.Ec2AsgCapacityMonitoringApproach = Ec2AsgCapacityMonitoringApproach;
1753
+ exports.EcsCapacityMonitoringApproach = EcsCapacityMonitoringApproach;
1754
+ exports.EksCapacityMonitoringApproach = EksCapacityMonitoringApproach;
1755
+ exports.EvaluationStatus = EvaluationStatus;
1756
+ exports.ExecutionAction = ExecutionAction;
1757
+ exports.ExecutionBlockType = ExecutionBlockType;
1758
+ exports.ExecutionEventType = ExecutionEventType;
1759
+ exports.ExecutionMode = ExecutionMode;
1760
+ exports.ExecutionState = ExecutionState;
1761
+ exports.GetPlanCommand = GetPlanCommand;
1762
+ exports.GetPlanEvaluationStatusCommand = GetPlanEvaluationStatusCommand;
1763
+ exports.GetPlanExecutionCommand = GetPlanExecutionCommand;
1764
+ exports.GetPlanInRegionCommand = GetPlanInRegionCommand;
1765
+ exports.GlobalAuroraDefaultBehavior = GlobalAuroraDefaultBehavior;
1766
+ exports.GlobalAuroraUngracefulBehavior = GlobalAuroraUngracefulBehavior;
1767
+ exports.IllegalArgumentException = IllegalArgumentException;
1768
+ exports.IllegalStateException = IllegalStateException;
1769
+ exports.InternalServerException = InternalServerException;
1770
+ exports.LambdaUngracefulBehavior = LambdaUngracefulBehavior;
1771
+ exports.ListPlanExecutionEventsCommand = ListPlanExecutionEventsCommand;
1772
+ exports.ListPlanExecutionsCommand = ListPlanExecutionsCommand;
1773
+ exports.ListPlansCommand = ListPlansCommand;
1774
+ exports.ListPlansInRegionCommand = ListPlansInRegionCommand;
1775
+ exports.ListRoute53HealthChecksCommand = ListRoute53HealthChecksCommand;
1776
+ exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
1777
+ exports.RecoveryApproach = RecoveryApproach;
1778
+ exports.RegionToRunIn = RegionToRunIn;
1779
+ exports.ResourceNotFoundException = ResourceNotFoundException;
1780
+ exports.ResourceWarningStatus = ResourceWarningStatus;
1781
+ exports.RoutingControlStateChange = RoutingControlStateChange;
1782
+ exports.StartPlanExecutionCommand = StartPlanExecutionCommand;
1783
+ exports.StepStatus = StepStatus;
1784
+ exports.TagResourceCommand = TagResourceCommand;
1785
+ exports.UntagResourceCommand = UntagResourceCommand;
1786
+ exports.UpdatePlanCommand = UpdatePlanCommand;
1787
+ exports.UpdatePlanExecutionAction = UpdatePlanExecutionAction;
1788
+ exports.UpdatePlanExecutionCommand = UpdatePlanExecutionCommand;
1789
+ exports.UpdatePlanExecutionStepAction = UpdatePlanExecutionStepAction;
1790
+ exports.UpdatePlanExecutionStepCommand = UpdatePlanExecutionStepCommand;
1791
+ exports.WorkflowTargetAction = WorkflowTargetAction;
1792
+ exports.paginateGetPlanEvaluationStatus = paginateGetPlanEvaluationStatus;
1793
+ exports.paginateGetPlanExecution = paginateGetPlanExecution;
1794
+ exports.paginateListPlanExecutionEvents = paginateListPlanExecutionEvents;
1795
+ exports.paginateListPlanExecutions = paginateListPlanExecutions;
1796
+ exports.paginateListPlans = paginateListPlans;
1797
+ exports.paginateListPlansInRegion = paginateListPlansInRegion;
1798
+ exports.paginateListRoute53HealthChecks = paginateListRoute53HealthChecks;
1799
+ exports.waitForPlanEvaluationStatusPassed = waitForPlanEvaluationStatusPassed;
1800
+ exports.waitForPlanExecutionCompleted = waitForPlanExecutionCompleted;
1801
+ exports.waitUntilPlanEvaluationStatusPassed = waitUntilPlanEvaluationStatusPassed;
1802
+ exports.waitUntilPlanExecutionCompleted = waitUntilPlanExecutionCompleted;