@aws-sdk/client-migrationhub-config 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.
- package/dist-cjs/index.js +495 -624
- package/package.json +6 -6
package/dist-cjs/index.js
CHANGED
|
@@ -1,661 +1,532 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
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
|
+
|
|
20
|
+
const resolveClientEndpointParameters = (options) => {
|
|
21
|
+
return Object.assign(options, {
|
|
22
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
23
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
24
|
+
defaultSigningName: "mgh",
|
|
25
|
+
});
|
|
10
26
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
27
|
+
const commonParams = {
|
|
28
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
29
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
30
|
+
Region: { type: "builtInParams", name: "region" },
|
|
31
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
18
32
|
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/index.ts
|
|
22
|
-
var index_exports = {};
|
|
23
|
-
__export(index_exports, {
|
|
24
|
-
AccessDeniedException: () => AccessDeniedException,
|
|
25
|
-
CreateHomeRegionControlCommand: () => CreateHomeRegionControlCommand,
|
|
26
|
-
DeleteHomeRegionControlCommand: () => DeleteHomeRegionControlCommand,
|
|
27
|
-
DescribeHomeRegionControlsCommand: () => DescribeHomeRegionControlsCommand,
|
|
28
|
-
DryRunOperation: () => DryRunOperation,
|
|
29
|
-
GetHomeRegionCommand: () => GetHomeRegionCommand,
|
|
30
|
-
InternalServerError: () => InternalServerError,
|
|
31
|
-
InvalidInputException: () => InvalidInputException,
|
|
32
|
-
MigrationHubConfig: () => MigrationHubConfig,
|
|
33
|
-
MigrationHubConfigClient: () => MigrationHubConfigClient,
|
|
34
|
-
MigrationHubConfigServiceException: () => MigrationHubConfigServiceException,
|
|
35
|
-
ServiceUnavailableException: () => ServiceUnavailableException,
|
|
36
|
-
TargetType: () => TargetType,
|
|
37
|
-
ThrottlingException: () => ThrottlingException,
|
|
38
|
-
__Client: () => import_smithy_client.Client,
|
|
39
|
-
paginateDescribeHomeRegionControls: () => paginateDescribeHomeRegionControls
|
|
40
|
-
});
|
|
41
|
-
module.exports = __toCommonJS(index_exports);
|
|
42
|
-
|
|
43
|
-
// src/MigrationHubConfigClient.ts
|
|
44
|
-
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
45
|
-
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
46
|
-
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
47
|
-
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
48
|
-
var import_config_resolver = require("@smithy/config-resolver");
|
|
49
|
-
var import_core = require("@smithy/core");
|
|
50
|
-
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
51
|
-
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
52
|
-
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
53
|
-
|
|
54
|
-
var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
|
|
55
33
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
34
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
35
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
36
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
37
|
+
let _credentials = runtimeConfig.credentials;
|
|
38
|
+
return {
|
|
39
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
40
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
41
|
+
if (index === -1) {
|
|
42
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
httpAuthSchemes() {
|
|
49
|
+
return _httpAuthSchemes;
|
|
50
|
+
},
|
|
51
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
52
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
53
|
+
},
|
|
54
|
+
httpAuthSchemeProvider() {
|
|
55
|
+
return _httpAuthSchemeProvider;
|
|
56
|
+
},
|
|
57
|
+
setCredentials(credentials) {
|
|
58
|
+
_credentials = credentials;
|
|
59
|
+
},
|
|
60
|
+
credentials() {
|
|
61
|
+
return _credentials;
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
66
|
+
return {
|
|
67
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
68
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
69
|
+
credentials: config.credentials(),
|
|
70
|
+
};
|
|
69
71
|
};
|
|
70
72
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
var import_protocol_http = require("@smithy/protocol-http");
|
|
77
|
-
var import_smithy_client = require("@smithy/smithy-client");
|
|
73
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
74
|
+
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
75
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
76
|
+
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
77
|
+
};
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
79
|
+
class MigrationHubConfigClient extends smithyClient.Client {
|
|
80
|
+
config;
|
|
81
|
+
constructor(...[configuration]) {
|
|
82
|
+
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
|
83
|
+
super(_config_0);
|
|
84
|
+
this.initConfig = _config_0;
|
|
85
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
86
|
+
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
87
|
+
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
|
|
88
|
+
const _config_4 = configResolver.resolveRegionConfig(_config_3);
|
|
89
|
+
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
90
|
+
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
|
|
91
|
+
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
92
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
93
|
+
this.config = _config_8;
|
|
94
|
+
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
95
|
+
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
96
|
+
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
97
|
+
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
98
|
+
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
100
|
+
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
101
|
+
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultMigrationHubConfigHttpAuthSchemeParametersProvider,
|
|
102
|
+
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
103
|
+
"aws.auth#sigv4": config.credentials,
|
|
104
|
+
}),
|
|
105
|
+
}));
|
|
106
|
+
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
113
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
114
|
-
credentials: config.credentials()
|
|
115
|
-
};
|
|
116
|
-
}, "resolveHttpAuthRuntimeConfig");
|
|
108
|
+
destroy() {
|
|
109
|
+
super.destroy();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
117
112
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
getHttpAuthExtensionConfiguration(runtimeConfig)
|
|
125
|
-
);
|
|
126
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
127
|
-
return Object.assign(
|
|
128
|
-
runtimeConfig,
|
|
129
|
-
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
130
|
-
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
131
|
-
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
132
|
-
resolveHttpAuthRuntimeConfig(extensionConfiguration)
|
|
133
|
-
);
|
|
134
|
-
}, "resolveRuntimeExtensions");
|
|
113
|
+
class MigrationHubConfigServiceException extends smithyClient.ServiceException {
|
|
114
|
+
constructor(options) {
|
|
115
|
+
super(options);
|
|
116
|
+
Object.setPrototypeOf(this, MigrationHubConfigServiceException.prototype);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
135
119
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
|
|
153
|
-
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
154
|
-
const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
|
|
155
|
-
const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
|
|
156
|
-
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
157
|
-
this.config = _config_8;
|
|
158
|
-
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
159
|
-
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
160
|
-
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
161
|
-
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
162
|
-
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
163
|
-
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
164
|
-
this.middlewareStack.use(
|
|
165
|
-
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
166
|
-
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultMigrationHubConfigHttpAuthSchemeParametersProvider,
|
|
167
|
-
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
|
|
168
|
-
"aws.auth#sigv4": config.credentials
|
|
169
|
-
}), "identityProviderConfigProvider")
|
|
170
|
-
})
|
|
171
|
-
);
|
|
172
|
-
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
176
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
177
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
178
|
-
*/
|
|
179
|
-
destroy() {
|
|
180
|
-
super.destroy();
|
|
181
|
-
}
|
|
120
|
+
class AccessDeniedException extends MigrationHubConfigServiceException {
|
|
121
|
+
name = "AccessDeniedException";
|
|
122
|
+
$fault = "client";
|
|
123
|
+
Message;
|
|
124
|
+
constructor(opts) {
|
|
125
|
+
super({
|
|
126
|
+
name: "AccessDeniedException",
|
|
127
|
+
$fault: "client",
|
|
128
|
+
...opts,
|
|
129
|
+
});
|
|
130
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
131
|
+
this.Message = opts.Message;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const TargetType = {
|
|
135
|
+
ACCOUNT: "ACCOUNT",
|
|
182
136
|
};
|
|
137
|
+
class DryRunOperation extends MigrationHubConfigServiceException {
|
|
138
|
+
name = "DryRunOperation";
|
|
139
|
+
$fault = "client";
|
|
140
|
+
Message;
|
|
141
|
+
constructor(opts) {
|
|
142
|
+
super({
|
|
143
|
+
name: "DryRunOperation",
|
|
144
|
+
$fault: "client",
|
|
145
|
+
...opts,
|
|
146
|
+
});
|
|
147
|
+
Object.setPrototypeOf(this, DryRunOperation.prototype);
|
|
148
|
+
this.Message = opts.Message;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
class InternalServerError extends MigrationHubConfigServiceException {
|
|
152
|
+
name = "InternalServerError";
|
|
153
|
+
$fault = "server";
|
|
154
|
+
Message;
|
|
155
|
+
constructor(opts) {
|
|
156
|
+
super({
|
|
157
|
+
name: "InternalServerError",
|
|
158
|
+
$fault: "server",
|
|
159
|
+
...opts,
|
|
160
|
+
});
|
|
161
|
+
Object.setPrototypeOf(this, InternalServerError.prototype);
|
|
162
|
+
this.Message = opts.Message;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
class InvalidInputException extends MigrationHubConfigServiceException {
|
|
166
|
+
name = "InvalidInputException";
|
|
167
|
+
$fault = "client";
|
|
168
|
+
Message;
|
|
169
|
+
constructor(opts) {
|
|
170
|
+
super({
|
|
171
|
+
name: "InvalidInputException",
|
|
172
|
+
$fault: "client",
|
|
173
|
+
...opts,
|
|
174
|
+
});
|
|
175
|
+
Object.setPrototypeOf(this, InvalidInputException.prototype);
|
|
176
|
+
this.Message = opts.Message;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
class ServiceUnavailableException extends MigrationHubConfigServiceException {
|
|
180
|
+
name = "ServiceUnavailableException";
|
|
181
|
+
$fault = "server";
|
|
182
|
+
Message;
|
|
183
|
+
constructor(opts) {
|
|
184
|
+
super({
|
|
185
|
+
name: "ServiceUnavailableException",
|
|
186
|
+
$fault: "server",
|
|
187
|
+
...opts,
|
|
188
|
+
});
|
|
189
|
+
Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
|
|
190
|
+
this.Message = opts.Message;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
class ThrottlingException extends MigrationHubConfigServiceException {
|
|
194
|
+
name = "ThrottlingException";
|
|
195
|
+
$fault = "client";
|
|
196
|
+
Message;
|
|
197
|
+
RetryAfterSeconds;
|
|
198
|
+
constructor(opts) {
|
|
199
|
+
super({
|
|
200
|
+
name: "ThrottlingException",
|
|
201
|
+
$fault: "client",
|
|
202
|
+
...opts,
|
|
203
|
+
});
|
|
204
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
205
|
+
this.Message = opts.Message;
|
|
206
|
+
this.RetryAfterSeconds = opts.RetryAfterSeconds;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
183
209
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
var import_middleware_serde = require("@smithy/middleware-serde");
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
// src/protocols/Aws_json1_1.ts
|
|
193
|
-
var import_core2 = require("@aws-sdk/core");
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
// src/models/MigrationHubConfigServiceException.ts
|
|
198
|
-
|
|
199
|
-
var MigrationHubConfigServiceException = class _MigrationHubConfigServiceException extends import_smithy_client.ServiceException {
|
|
200
|
-
static {
|
|
201
|
-
__name(this, "MigrationHubConfigServiceException");
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* @internal
|
|
205
|
-
*/
|
|
206
|
-
constructor(options) {
|
|
207
|
-
super(options);
|
|
208
|
-
Object.setPrototypeOf(this, _MigrationHubConfigServiceException.prototype);
|
|
209
|
-
}
|
|
210
|
+
const se_CreateHomeRegionControlCommand = async (input, context) => {
|
|
211
|
+
const headers = sharedHeaders("CreateHomeRegionControl");
|
|
212
|
+
let body;
|
|
213
|
+
body = JSON.stringify(smithyClient._json(input));
|
|
214
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
210
215
|
};
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
216
|
+
const se_DeleteHomeRegionControlCommand = async (input, context) => {
|
|
217
|
+
const headers = sharedHeaders("DeleteHomeRegionControl");
|
|
218
|
+
let body;
|
|
219
|
+
body = JSON.stringify(smithyClient._json(input));
|
|
220
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
221
|
+
};
|
|
222
|
+
const se_DescribeHomeRegionControlsCommand = async (input, context) => {
|
|
223
|
+
const headers = sharedHeaders("DescribeHomeRegionControls");
|
|
224
|
+
let body;
|
|
225
|
+
body = JSON.stringify(smithyClient._json(input));
|
|
226
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
227
|
+
};
|
|
228
|
+
const se_GetHomeRegionCommand = async (input, context) => {
|
|
229
|
+
const headers = sharedHeaders("GetHomeRegion");
|
|
230
|
+
let body;
|
|
231
|
+
body = JSON.stringify(smithyClient._json(input));
|
|
232
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
233
|
+
};
|
|
234
|
+
const de_CreateHomeRegionControlCommand = async (output, context) => {
|
|
235
|
+
if (output.statusCode >= 300) {
|
|
236
|
+
return de_CommandError(output, context);
|
|
237
|
+
}
|
|
238
|
+
const data = await core$1.parseJsonBody(output.body, context);
|
|
239
|
+
let contents = {};
|
|
240
|
+
contents = de_CreateHomeRegionControlResult(data);
|
|
241
|
+
const response = {
|
|
242
|
+
$metadata: deserializeMetadata(output),
|
|
243
|
+
...contents,
|
|
244
|
+
};
|
|
245
|
+
return response;
|
|
246
|
+
};
|
|
247
|
+
const de_DeleteHomeRegionControlCommand = async (output, context) => {
|
|
248
|
+
if (output.statusCode >= 300) {
|
|
249
|
+
return de_CommandError(output, context);
|
|
250
|
+
}
|
|
251
|
+
const data = await core$1.parseJsonBody(output.body, context);
|
|
252
|
+
let contents = {};
|
|
253
|
+
contents = smithyClient._json(data);
|
|
254
|
+
const response = {
|
|
255
|
+
$metadata: deserializeMetadata(output),
|
|
256
|
+
...contents,
|
|
257
|
+
};
|
|
258
|
+
return response;
|
|
259
|
+
};
|
|
260
|
+
const de_DescribeHomeRegionControlsCommand = async (output, context) => {
|
|
261
|
+
if (output.statusCode >= 300) {
|
|
262
|
+
return de_CommandError(output, context);
|
|
263
|
+
}
|
|
264
|
+
const data = await core$1.parseJsonBody(output.body, context);
|
|
265
|
+
let contents = {};
|
|
266
|
+
contents = de_DescribeHomeRegionControlsResult(data);
|
|
267
|
+
const response = {
|
|
268
|
+
$metadata: deserializeMetadata(output),
|
|
269
|
+
...contents,
|
|
270
|
+
};
|
|
271
|
+
return response;
|
|
272
|
+
};
|
|
273
|
+
const de_GetHomeRegionCommand = async (output, context) => {
|
|
274
|
+
if (output.statusCode >= 300) {
|
|
275
|
+
return de_CommandError(output, context);
|
|
276
|
+
}
|
|
277
|
+
const data = await core$1.parseJsonBody(output.body, context);
|
|
278
|
+
let contents = {};
|
|
279
|
+
contents = smithyClient._json(data);
|
|
280
|
+
const response = {
|
|
281
|
+
$metadata: deserializeMetadata(output),
|
|
282
|
+
...contents,
|
|
283
|
+
};
|
|
284
|
+
return response;
|
|
285
|
+
};
|
|
286
|
+
const de_CommandError = async (output, context) => {
|
|
287
|
+
const parsedOutput = {
|
|
288
|
+
...output,
|
|
289
|
+
body: await core$1.parseJsonErrorBody(output.body, context),
|
|
290
|
+
};
|
|
291
|
+
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
292
|
+
switch (errorCode) {
|
|
293
|
+
case "AccessDeniedException":
|
|
294
|
+
case "com.amazonaws.migrationhubconfig#AccessDeniedException":
|
|
295
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput);
|
|
296
|
+
case "DryRunOperation":
|
|
297
|
+
case "com.amazonaws.migrationhubconfig#DryRunOperation":
|
|
298
|
+
throw await de_DryRunOperationRes(parsedOutput);
|
|
299
|
+
case "InternalServerError":
|
|
300
|
+
case "com.amazonaws.migrationhubconfig#InternalServerError":
|
|
301
|
+
throw await de_InternalServerErrorRes(parsedOutput);
|
|
302
|
+
case "InvalidInputException":
|
|
303
|
+
case "com.amazonaws.migrationhubconfig#InvalidInputException":
|
|
304
|
+
throw await de_InvalidInputExceptionRes(parsedOutput);
|
|
305
|
+
case "ServiceUnavailableException":
|
|
306
|
+
case "com.amazonaws.migrationhubconfig#ServiceUnavailableException":
|
|
307
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput);
|
|
308
|
+
case "ThrottlingException":
|
|
309
|
+
case "com.amazonaws.migrationhubconfig#ThrottlingException":
|
|
310
|
+
throw await de_ThrottlingExceptionRes(parsedOutput);
|
|
311
|
+
default:
|
|
312
|
+
const parsedBody = parsedOutput.body;
|
|
313
|
+
return throwDefaultError({
|
|
314
|
+
output,
|
|
315
|
+
parsedBody,
|
|
316
|
+
errorCode,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
321
|
+
const body = parsedOutput.body;
|
|
322
|
+
const deserialized = smithyClient._json(body);
|
|
323
|
+
const exception = new AccessDeniedException({
|
|
324
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
325
|
+
...deserialized,
|
|
228
326
|
});
|
|
229
|
-
|
|
230
|
-
this.Message = opts.Message;
|
|
231
|
-
}
|
|
327
|
+
return smithyClient.decorateServiceException(exception, body);
|
|
232
328
|
};
|
|
233
|
-
|
|
234
|
-
|
|
329
|
+
const de_DryRunOperationRes = async (parsedOutput, context) => {
|
|
330
|
+
const body = parsedOutput.body;
|
|
331
|
+
const deserialized = smithyClient._json(body);
|
|
332
|
+
const exception = new DryRunOperation({
|
|
333
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
334
|
+
...deserialized,
|
|
335
|
+
});
|
|
336
|
+
return smithyClient.decorateServiceException(exception, body);
|
|
235
337
|
};
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
Message;
|
|
243
|
-
/**
|
|
244
|
-
* @internal
|
|
245
|
-
*/
|
|
246
|
-
constructor(opts) {
|
|
247
|
-
super({
|
|
248
|
-
name: "DryRunOperation",
|
|
249
|
-
$fault: "client",
|
|
250
|
-
...opts
|
|
338
|
+
const de_InternalServerErrorRes = async (parsedOutput, context) => {
|
|
339
|
+
const body = parsedOutput.body;
|
|
340
|
+
const deserialized = smithyClient._json(body);
|
|
341
|
+
const exception = new InternalServerError({
|
|
342
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
343
|
+
...deserialized,
|
|
251
344
|
});
|
|
252
|
-
|
|
253
|
-
this.Message = opts.Message;
|
|
254
|
-
}
|
|
345
|
+
return smithyClient.decorateServiceException(exception, body);
|
|
255
346
|
};
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
Message;
|
|
263
|
-
/**
|
|
264
|
-
* @internal
|
|
265
|
-
*/
|
|
266
|
-
constructor(opts) {
|
|
267
|
-
super({
|
|
268
|
-
name: "InternalServerError",
|
|
269
|
-
$fault: "server",
|
|
270
|
-
...opts
|
|
347
|
+
const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
|
|
348
|
+
const body = parsedOutput.body;
|
|
349
|
+
const deserialized = smithyClient._json(body);
|
|
350
|
+
const exception = new InvalidInputException({
|
|
351
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
352
|
+
...deserialized,
|
|
271
353
|
});
|
|
272
|
-
|
|
273
|
-
this.Message = opts.Message;
|
|
274
|
-
}
|
|
354
|
+
return smithyClient.decorateServiceException(exception, body);
|
|
275
355
|
};
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
Message;
|
|
283
|
-
/**
|
|
284
|
-
* @internal
|
|
285
|
-
*/
|
|
286
|
-
constructor(opts) {
|
|
287
|
-
super({
|
|
288
|
-
name: "InvalidInputException",
|
|
289
|
-
$fault: "client",
|
|
290
|
-
...opts
|
|
356
|
+
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
357
|
+
const body = parsedOutput.body;
|
|
358
|
+
const deserialized = smithyClient._json(body);
|
|
359
|
+
const exception = new ServiceUnavailableException({
|
|
360
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
361
|
+
...deserialized,
|
|
291
362
|
});
|
|
292
|
-
|
|
293
|
-
this.Message = opts.Message;
|
|
294
|
-
}
|
|
363
|
+
return smithyClient.decorateServiceException(exception, body);
|
|
295
364
|
};
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
Message;
|
|
303
|
-
/**
|
|
304
|
-
* @internal
|
|
305
|
-
*/
|
|
306
|
-
constructor(opts) {
|
|
307
|
-
super({
|
|
308
|
-
name: "ServiceUnavailableException",
|
|
309
|
-
$fault: "server",
|
|
310
|
-
...opts
|
|
365
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
366
|
+
const body = parsedOutput.body;
|
|
367
|
+
const deserialized = smithyClient._json(body);
|
|
368
|
+
const exception = new ThrottlingException({
|
|
369
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
370
|
+
...deserialized,
|
|
311
371
|
});
|
|
312
|
-
|
|
313
|
-
this.Message = opts.Message;
|
|
314
|
-
}
|
|
372
|
+
return smithyClient.decorateServiceException(exception, body);
|
|
315
373
|
};
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
name = "ThrottlingException";
|
|
321
|
-
$fault = "client";
|
|
322
|
-
Message;
|
|
323
|
-
/**
|
|
324
|
-
* <p>The number of seconds the caller should wait before retrying.</p>
|
|
325
|
-
* @public
|
|
326
|
-
*/
|
|
327
|
-
RetryAfterSeconds;
|
|
328
|
-
/**
|
|
329
|
-
* @internal
|
|
330
|
-
*/
|
|
331
|
-
constructor(opts) {
|
|
332
|
-
super({
|
|
333
|
-
name: "ThrottlingException",
|
|
334
|
-
$fault: "client",
|
|
335
|
-
...opts
|
|
374
|
+
const de_CreateHomeRegionControlResult = (output, context) => {
|
|
375
|
+
return smithyClient.take(output, {
|
|
376
|
+
HomeRegionControl: (_) => de_HomeRegionControl(_),
|
|
336
377
|
});
|
|
337
|
-
Object.setPrototypeOf(this, _ThrottlingException.prototype);
|
|
338
|
-
this.Message = opts.Message;
|
|
339
|
-
this.RetryAfterSeconds = opts.RetryAfterSeconds;
|
|
340
|
-
}
|
|
341
378
|
};
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
348
|
-
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
349
|
-
}, "se_CreateHomeRegionControlCommand");
|
|
350
|
-
var se_DeleteHomeRegionControlCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
351
|
-
const headers = sharedHeaders("DeleteHomeRegionControl");
|
|
352
|
-
let body;
|
|
353
|
-
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
354
|
-
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
355
|
-
}, "se_DeleteHomeRegionControlCommand");
|
|
356
|
-
var se_DescribeHomeRegionControlsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
357
|
-
const headers = sharedHeaders("DescribeHomeRegionControls");
|
|
358
|
-
let body;
|
|
359
|
-
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
360
|
-
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
361
|
-
}, "se_DescribeHomeRegionControlsCommand");
|
|
362
|
-
var se_GetHomeRegionCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
363
|
-
const headers = sharedHeaders("GetHomeRegion");
|
|
364
|
-
let body;
|
|
365
|
-
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
366
|
-
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
367
|
-
}, "se_GetHomeRegionCommand");
|
|
368
|
-
var de_CreateHomeRegionControlCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
369
|
-
if (output.statusCode >= 300) {
|
|
370
|
-
return de_CommandError(output, context);
|
|
371
|
-
}
|
|
372
|
-
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
373
|
-
let contents = {};
|
|
374
|
-
contents = de_CreateHomeRegionControlResult(data, context);
|
|
375
|
-
const response = {
|
|
376
|
-
$metadata: deserializeMetadata(output),
|
|
377
|
-
...contents
|
|
378
|
-
};
|
|
379
|
-
return response;
|
|
380
|
-
}, "de_CreateHomeRegionControlCommand");
|
|
381
|
-
var de_DeleteHomeRegionControlCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
382
|
-
if (output.statusCode >= 300) {
|
|
383
|
-
return de_CommandError(output, context);
|
|
384
|
-
}
|
|
385
|
-
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
386
|
-
let contents = {};
|
|
387
|
-
contents = (0, import_smithy_client._json)(data);
|
|
388
|
-
const response = {
|
|
389
|
-
$metadata: deserializeMetadata(output),
|
|
390
|
-
...contents
|
|
391
|
-
};
|
|
392
|
-
return response;
|
|
393
|
-
}, "de_DeleteHomeRegionControlCommand");
|
|
394
|
-
var de_DescribeHomeRegionControlsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
395
|
-
if (output.statusCode >= 300) {
|
|
396
|
-
return de_CommandError(output, context);
|
|
397
|
-
}
|
|
398
|
-
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
399
|
-
let contents = {};
|
|
400
|
-
contents = de_DescribeHomeRegionControlsResult(data, context);
|
|
401
|
-
const response = {
|
|
402
|
-
$metadata: deserializeMetadata(output),
|
|
403
|
-
...contents
|
|
404
|
-
};
|
|
405
|
-
return response;
|
|
406
|
-
}, "de_DescribeHomeRegionControlsCommand");
|
|
407
|
-
var de_GetHomeRegionCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
408
|
-
if (output.statusCode >= 300) {
|
|
409
|
-
return de_CommandError(output, context);
|
|
410
|
-
}
|
|
411
|
-
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
412
|
-
let contents = {};
|
|
413
|
-
contents = (0, import_smithy_client._json)(data);
|
|
414
|
-
const response = {
|
|
415
|
-
$metadata: deserializeMetadata(output),
|
|
416
|
-
...contents
|
|
417
|
-
};
|
|
418
|
-
return response;
|
|
419
|
-
}, "de_GetHomeRegionCommand");
|
|
420
|
-
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
421
|
-
const parsedOutput = {
|
|
422
|
-
...output,
|
|
423
|
-
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
424
|
-
};
|
|
425
|
-
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
426
|
-
switch (errorCode) {
|
|
427
|
-
case "AccessDeniedException":
|
|
428
|
-
case "com.amazonaws.migrationhubconfig#AccessDeniedException":
|
|
429
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
430
|
-
case "DryRunOperation":
|
|
431
|
-
case "com.amazonaws.migrationhubconfig#DryRunOperation":
|
|
432
|
-
throw await de_DryRunOperationRes(parsedOutput, context);
|
|
433
|
-
case "InternalServerError":
|
|
434
|
-
case "com.amazonaws.migrationhubconfig#InternalServerError":
|
|
435
|
-
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
436
|
-
case "InvalidInputException":
|
|
437
|
-
case "com.amazonaws.migrationhubconfig#InvalidInputException":
|
|
438
|
-
throw await de_InvalidInputExceptionRes(parsedOutput, context);
|
|
439
|
-
case "ServiceUnavailableException":
|
|
440
|
-
case "com.amazonaws.migrationhubconfig#ServiceUnavailableException":
|
|
441
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
442
|
-
case "ThrottlingException":
|
|
443
|
-
case "com.amazonaws.migrationhubconfig#ThrottlingException":
|
|
444
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
445
|
-
default:
|
|
446
|
-
const parsedBody = parsedOutput.body;
|
|
447
|
-
return throwDefaultError({
|
|
448
|
-
output,
|
|
449
|
-
parsedBody,
|
|
450
|
-
errorCode
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
}, "de_CommandError");
|
|
454
|
-
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
455
|
-
const body = parsedOutput.body;
|
|
456
|
-
const deserialized = (0, import_smithy_client._json)(body);
|
|
457
|
-
const exception = new AccessDeniedException({
|
|
458
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
459
|
-
...deserialized
|
|
460
|
-
});
|
|
461
|
-
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
462
|
-
}, "de_AccessDeniedExceptionRes");
|
|
463
|
-
var de_DryRunOperationRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
464
|
-
const body = parsedOutput.body;
|
|
465
|
-
const deserialized = (0, import_smithy_client._json)(body);
|
|
466
|
-
const exception = new DryRunOperation({
|
|
467
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
468
|
-
...deserialized
|
|
469
|
-
});
|
|
470
|
-
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
471
|
-
}, "de_DryRunOperationRes");
|
|
472
|
-
var de_InternalServerErrorRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
473
|
-
const body = parsedOutput.body;
|
|
474
|
-
const deserialized = (0, import_smithy_client._json)(body);
|
|
475
|
-
const exception = new InternalServerError({
|
|
476
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
477
|
-
...deserialized
|
|
478
|
-
});
|
|
479
|
-
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
480
|
-
}, "de_InternalServerErrorRes");
|
|
481
|
-
var de_InvalidInputExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
482
|
-
const body = parsedOutput.body;
|
|
483
|
-
const deserialized = (0, import_smithy_client._json)(body);
|
|
484
|
-
const exception = new InvalidInputException({
|
|
485
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
486
|
-
...deserialized
|
|
487
|
-
});
|
|
488
|
-
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
489
|
-
}, "de_InvalidInputExceptionRes");
|
|
490
|
-
var de_ServiceUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
491
|
-
const body = parsedOutput.body;
|
|
492
|
-
const deserialized = (0, import_smithy_client._json)(body);
|
|
493
|
-
const exception = new ServiceUnavailableException({
|
|
494
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
495
|
-
...deserialized
|
|
496
|
-
});
|
|
497
|
-
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
498
|
-
}, "de_ServiceUnavailableExceptionRes");
|
|
499
|
-
var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
500
|
-
const body = parsedOutput.body;
|
|
501
|
-
const deserialized = (0, import_smithy_client._json)(body);
|
|
502
|
-
const exception = new ThrottlingException({
|
|
503
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
504
|
-
...deserialized
|
|
505
|
-
});
|
|
506
|
-
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
507
|
-
}, "de_ThrottlingExceptionRes");
|
|
508
|
-
var de_CreateHomeRegionControlResult = /* @__PURE__ */ __name((output, context) => {
|
|
509
|
-
return (0, import_smithy_client.take)(output, {
|
|
510
|
-
HomeRegionControl: /* @__PURE__ */ __name((_) => de_HomeRegionControl(_, context), "HomeRegionControl")
|
|
511
|
-
});
|
|
512
|
-
}, "de_CreateHomeRegionControlResult");
|
|
513
|
-
var de_DescribeHomeRegionControlsResult = /* @__PURE__ */ __name((output, context) => {
|
|
514
|
-
return (0, import_smithy_client.take)(output, {
|
|
515
|
-
HomeRegionControls: /* @__PURE__ */ __name((_) => de_HomeRegionControls(_, context), "HomeRegionControls"),
|
|
516
|
-
NextToken: import_smithy_client.expectString
|
|
517
|
-
});
|
|
518
|
-
}, "de_DescribeHomeRegionControlsResult");
|
|
519
|
-
var de_HomeRegionControl = /* @__PURE__ */ __name((output, context) => {
|
|
520
|
-
return (0, import_smithy_client.take)(output, {
|
|
521
|
-
ControlId: import_smithy_client.expectString,
|
|
522
|
-
HomeRegion: import_smithy_client.expectString,
|
|
523
|
-
RequestedTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "RequestedTime"),
|
|
524
|
-
Target: import_smithy_client._json
|
|
525
|
-
});
|
|
526
|
-
}, "de_HomeRegionControl");
|
|
527
|
-
var de_HomeRegionControls = /* @__PURE__ */ __name((output, context) => {
|
|
528
|
-
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
529
|
-
return de_HomeRegionControl(entry, context);
|
|
530
|
-
});
|
|
531
|
-
return retVal;
|
|
532
|
-
}, "de_HomeRegionControls");
|
|
533
|
-
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
534
|
-
httpStatusCode: output.statusCode,
|
|
535
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
536
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
537
|
-
cfId: output.headers["x-amz-cf-id"]
|
|
538
|
-
}), "deserializeMetadata");
|
|
539
|
-
var throwDefaultError = (0, import_smithy_client.withBaseException)(MigrationHubConfigServiceException);
|
|
540
|
-
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
541
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
542
|
-
const contents = {
|
|
543
|
-
protocol,
|
|
544
|
-
hostname,
|
|
545
|
-
port,
|
|
546
|
-
method: "POST",
|
|
547
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
548
|
-
headers
|
|
549
|
-
};
|
|
550
|
-
if (resolvedHostname !== void 0) {
|
|
551
|
-
contents.hostname = resolvedHostname;
|
|
552
|
-
}
|
|
553
|
-
if (body !== void 0) {
|
|
554
|
-
contents.body = body;
|
|
555
|
-
}
|
|
556
|
-
return new import_protocol_http.HttpRequest(contents);
|
|
557
|
-
}, "buildHttpRpcRequest");
|
|
558
|
-
function sharedHeaders(operation) {
|
|
559
|
-
return {
|
|
560
|
-
"content-type": "application/x-amz-json-1.1",
|
|
561
|
-
"x-amz-target": `AWSMigrationHubMultiAccountService.${operation}`
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
__name(sharedHeaders, "sharedHeaders");
|
|
565
|
-
|
|
566
|
-
// src/commands/CreateHomeRegionControlCommand.ts
|
|
567
|
-
var CreateHomeRegionControlCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
568
|
-
return [
|
|
569
|
-
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
570
|
-
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
571
|
-
];
|
|
572
|
-
}).s("AWSMigrationHubMultiAccountService", "CreateHomeRegionControl", {}).n("MigrationHubConfigClient", "CreateHomeRegionControlCommand").f(void 0, void 0).ser(se_CreateHomeRegionControlCommand).de(de_CreateHomeRegionControlCommand).build() {
|
|
573
|
-
static {
|
|
574
|
-
__name(this, "CreateHomeRegionControlCommand");
|
|
575
|
-
}
|
|
379
|
+
const de_DescribeHomeRegionControlsResult = (output, context) => {
|
|
380
|
+
return smithyClient.take(output, {
|
|
381
|
+
HomeRegionControls: (_) => de_HomeRegionControls(_),
|
|
382
|
+
NextToken: smithyClient.expectString,
|
|
383
|
+
});
|
|
576
384
|
};
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
585
|
-
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
586
|
-
];
|
|
587
|
-
}).s("AWSMigrationHubMultiAccountService", "DeleteHomeRegionControl", {}).n("MigrationHubConfigClient", "DeleteHomeRegionControlCommand").f(void 0, void 0).ser(se_DeleteHomeRegionControlCommand).de(de_DeleteHomeRegionControlCommand).build() {
|
|
588
|
-
static {
|
|
589
|
-
__name(this, "DeleteHomeRegionControlCommand");
|
|
590
|
-
}
|
|
385
|
+
const de_HomeRegionControl = (output, context) => {
|
|
386
|
+
return smithyClient.take(output, {
|
|
387
|
+
ControlId: smithyClient.expectString,
|
|
388
|
+
HomeRegion: smithyClient.expectString,
|
|
389
|
+
RequestedTime: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
390
|
+
Target: smithyClient._json,
|
|
391
|
+
});
|
|
591
392
|
};
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
393
|
+
const de_HomeRegionControls = (output, context) => {
|
|
394
|
+
const retVal = (output || [])
|
|
395
|
+
.filter((e) => e != null)
|
|
396
|
+
.map((entry) => {
|
|
397
|
+
return de_HomeRegionControl(entry);
|
|
398
|
+
});
|
|
399
|
+
return retVal;
|
|
400
|
+
};
|
|
401
|
+
const deserializeMetadata = (output) => ({
|
|
402
|
+
httpStatusCode: output.statusCode,
|
|
403
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
404
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
405
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
406
|
+
});
|
|
407
|
+
const throwDefaultError = smithyClient.withBaseException(MigrationHubConfigServiceException);
|
|
408
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
409
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
410
|
+
const contents = {
|
|
411
|
+
protocol,
|
|
412
|
+
hostname,
|
|
413
|
+
port,
|
|
414
|
+
method: "POST",
|
|
415
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
416
|
+
headers,
|
|
417
|
+
};
|
|
418
|
+
if (body !== undefined) {
|
|
419
|
+
contents.body = body;
|
|
420
|
+
}
|
|
421
|
+
return new protocolHttp.HttpRequest(contents);
|
|
606
422
|
};
|
|
423
|
+
function sharedHeaders(operation) {
|
|
424
|
+
return {
|
|
425
|
+
"content-type": "application/x-amz-json-1.1",
|
|
426
|
+
"x-amz-target": `AWSMigrationHubMultiAccountService.${operation}`,
|
|
427
|
+
};
|
|
428
|
+
}
|
|
607
429
|
|
|
608
|
-
|
|
430
|
+
class CreateHomeRegionControlCommand extends smithyClient.Command
|
|
431
|
+
.classBuilder()
|
|
432
|
+
.ep(commonParams)
|
|
433
|
+
.m(function (Command, cs, config, o) {
|
|
434
|
+
return [
|
|
435
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
436
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
437
|
+
];
|
|
438
|
+
})
|
|
439
|
+
.s("AWSMigrationHubMultiAccountService", "CreateHomeRegionControl", {})
|
|
440
|
+
.n("MigrationHubConfigClient", "CreateHomeRegionControlCommand")
|
|
441
|
+
.f(void 0, void 0)
|
|
442
|
+
.ser(se_CreateHomeRegionControlCommand)
|
|
443
|
+
.de(de_CreateHomeRegionControlCommand)
|
|
444
|
+
.build() {
|
|
445
|
+
}
|
|
609
446
|
|
|
447
|
+
class DeleteHomeRegionControlCommand extends smithyClient.Command
|
|
448
|
+
.classBuilder()
|
|
449
|
+
.ep(commonParams)
|
|
450
|
+
.m(function (Command, cs, config, o) {
|
|
451
|
+
return [
|
|
452
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
453
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
454
|
+
];
|
|
455
|
+
})
|
|
456
|
+
.s("AWSMigrationHubMultiAccountService", "DeleteHomeRegionControl", {})
|
|
457
|
+
.n("MigrationHubConfigClient", "DeleteHomeRegionControlCommand")
|
|
458
|
+
.f(void 0, void 0)
|
|
459
|
+
.ser(se_DeleteHomeRegionControlCommand)
|
|
460
|
+
.de(de_DeleteHomeRegionControlCommand)
|
|
461
|
+
.build() {
|
|
462
|
+
}
|
|
610
463
|
|
|
464
|
+
class DescribeHomeRegionControlsCommand extends smithyClient.Command
|
|
465
|
+
.classBuilder()
|
|
466
|
+
.ep(commonParams)
|
|
467
|
+
.m(function (Command, cs, config, o) {
|
|
468
|
+
return [
|
|
469
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
470
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
471
|
+
];
|
|
472
|
+
})
|
|
473
|
+
.s("AWSMigrationHubMultiAccountService", "DescribeHomeRegionControls", {})
|
|
474
|
+
.n("MigrationHubConfigClient", "DescribeHomeRegionControlsCommand")
|
|
475
|
+
.f(void 0, void 0)
|
|
476
|
+
.ser(se_DescribeHomeRegionControlsCommand)
|
|
477
|
+
.de(de_DescribeHomeRegionControlsCommand)
|
|
478
|
+
.build() {
|
|
479
|
+
}
|
|
611
480
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
(
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}
|
|
481
|
+
class GetHomeRegionCommand extends smithyClient.Command
|
|
482
|
+
.classBuilder()
|
|
483
|
+
.ep(commonParams)
|
|
484
|
+
.m(function (Command, cs, config, o) {
|
|
485
|
+
return [
|
|
486
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
487
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
488
|
+
];
|
|
489
|
+
})
|
|
490
|
+
.s("AWSMigrationHubMultiAccountService", "GetHomeRegion", {})
|
|
491
|
+
.n("MigrationHubConfigClient", "GetHomeRegionCommand")
|
|
492
|
+
.f(void 0, void 0)
|
|
493
|
+
.ser(se_GetHomeRegionCommand)
|
|
494
|
+
.de(de_GetHomeRegionCommand)
|
|
495
|
+
.build() {
|
|
496
|
+
}
|
|
622
497
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
GetHomeRegionCommand
|
|
629
|
-
};
|
|
630
|
-
var MigrationHubConfig = class extends MigrationHubConfigClient {
|
|
631
|
-
static {
|
|
632
|
-
__name(this, "MigrationHubConfig");
|
|
633
|
-
}
|
|
498
|
+
const commands = {
|
|
499
|
+
CreateHomeRegionControlCommand,
|
|
500
|
+
DeleteHomeRegionControlCommand,
|
|
501
|
+
DescribeHomeRegionControlsCommand,
|
|
502
|
+
GetHomeRegionCommand,
|
|
634
503
|
};
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
504
|
+
class MigrationHubConfig extends MigrationHubConfigClient {
|
|
505
|
+
}
|
|
506
|
+
smithyClient.createAggregatedClient(commands, MigrationHubConfig);
|
|
638
507
|
|
|
639
|
-
|
|
640
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
508
|
+
const paginateDescribeHomeRegionControls = core.createPaginator(MigrationHubConfigClient, DescribeHomeRegionControlsCommand, "NextToken", "NextToken", "MaxResults");
|
|
641
509
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
MigrationHubConfigClient,
|
|
646
|
-
MigrationHubConfig,
|
|
647
|
-
$Command,
|
|
648
|
-
CreateHomeRegionControlCommand,
|
|
649
|
-
DeleteHomeRegionControlCommand,
|
|
650
|
-
DescribeHomeRegionControlsCommand,
|
|
651
|
-
GetHomeRegionCommand,
|
|
652
|
-
paginateDescribeHomeRegionControls,
|
|
653
|
-
AccessDeniedException,
|
|
654
|
-
TargetType,
|
|
655
|
-
DryRunOperation,
|
|
656
|
-
InternalServerError,
|
|
657
|
-
InvalidInputException,
|
|
658
|
-
ServiceUnavailableException,
|
|
659
|
-
ThrottlingException
|
|
510
|
+
Object.defineProperty(exports, "$Command", {
|
|
511
|
+
enumerable: true,
|
|
512
|
+
get: function () { return smithyClient.Command; }
|
|
660
513
|
});
|
|
661
|
-
|
|
514
|
+
Object.defineProperty(exports, "__Client", {
|
|
515
|
+
enumerable: true,
|
|
516
|
+
get: function () { return smithyClient.Client; }
|
|
517
|
+
});
|
|
518
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
519
|
+
exports.CreateHomeRegionControlCommand = CreateHomeRegionControlCommand;
|
|
520
|
+
exports.DeleteHomeRegionControlCommand = DeleteHomeRegionControlCommand;
|
|
521
|
+
exports.DescribeHomeRegionControlsCommand = DescribeHomeRegionControlsCommand;
|
|
522
|
+
exports.DryRunOperation = DryRunOperation;
|
|
523
|
+
exports.GetHomeRegionCommand = GetHomeRegionCommand;
|
|
524
|
+
exports.InternalServerError = InternalServerError;
|
|
525
|
+
exports.InvalidInputException = InvalidInputException;
|
|
526
|
+
exports.MigrationHubConfig = MigrationHubConfig;
|
|
527
|
+
exports.MigrationHubConfigClient = MigrationHubConfigClient;
|
|
528
|
+
exports.MigrationHubConfigServiceException = MigrationHubConfigServiceException;
|
|
529
|
+
exports.ServiceUnavailableException = ServiceUnavailableException;
|
|
530
|
+
exports.TargetType = TargetType;
|
|
531
|
+
exports.ThrottlingException = ThrottlingException;
|
|
532
|
+
exports.paginateDescribeHomeRegionControls = paginateDescribeHomeRegionControls;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-migrationhub-config",
|
|
3
3
|
"description": "AWS SDK for JavaScript Migrationhub Config Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.907.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-migrationhub-config",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/core": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/core": "3.907.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.907.0",
|
|
25
25
|
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
26
26
|
"@aws-sdk/middleware-logger": "3.901.0",
|
|
27
27
|
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
28
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.907.0",
|
|
29
29
|
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
30
30
|
"@aws-sdk/types": "3.901.0",
|
|
31
31
|
"@aws-sdk/util-endpoints": "3.901.0",
|
|
32
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
33
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
32
|
+
"@aws-sdk/util-user-agent-browser": "3.907.0",
|
|
33
|
+
"@aws-sdk/util-user-agent-node": "3.907.0",
|
|
34
34
|
"@smithy/config-resolver": "^4.3.0",
|
|
35
35
|
"@smithy/core": "^3.14.0",
|
|
36
36
|
"@smithy/fetch-http-handler": "^5.3.0",
|