@aws-sdk/client-controlcatalog 3.551.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/LICENSE +201 -0
- package/README.md +256 -0
- package/dist-cjs/ControlCatalog.js +17 -0
- package/dist-cjs/ControlCatalogClient.js +56 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/commands/ListCommonControlsCommand.js +28 -0
- package/dist-cjs/commands/ListDomainsCommand.js +28 -0
- package/dist-cjs/commands/ListObjectivesCommand.js +28 -0
- package/dist-cjs/commands/index.js +6 -0
- package/dist-cjs/endpoint/EndpointParameters.js +18 -0
- package/dist-cjs/endpoint/endpointResolver.js +14 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/ControlCatalogServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +64 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListCommonControlsPaginator.js +7 -0
- package/dist-cjs/pagination/ListDomainsPaginator.js +7 -0
- package/dist-cjs/pagination/ListObjectivesPaginator.js +7 -0
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_restJson1.js +256 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +49 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +34 -0
- package/dist-cjs/runtimeExtensions.js +25 -0
- package/dist-es/ControlCatalog.js +13 -0
- package/dist-es/ControlCatalogClient.js +52 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/ListCommonControlsCommand.js +24 -0
- package/dist-es/commands/ListDomainsCommand.js +24 -0
- package/dist-es/commands/ListObjectivesCommand.js +24 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/endpoint/EndpointParameters.js +14 -0
- package/dist-es/endpoint/endpointResolver.js +10 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/ControlCatalogServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +57 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListCommonControlsPaginator.js +4 -0
- package/dist-es/pagination/ListDomainsPaginator.js +4 -0
- package/dist-es/pagination/ListObjectivesPaginator.js +4 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_restJson1.js +247 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +44 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +30 -0
- package/dist-es/runtimeExtensions.js +21 -0
- package/dist-types/ControlCatalog.d.ts +61 -0
- package/dist-types/ControlCatalogClient.d.ts +201 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/dist-types/commands/ListCommonControlsCommand.d.ts +99 -0
- package/dist-types/commands/ListDomainsCommand.d.ts +81 -0
- package/dist-types/commands/ListObjectivesCommand.d.ts +94 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +40 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +41 -0
- package/dist-types/models/ControlCatalogServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +350 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListCommonControlsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListDomainsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListObjectivesPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +29 -0
- package/dist-types/runtimeConfig.browser.d.ts +45 -0
- package/dist-types/runtimeConfig.d.ts +45 -0
- package/dist-types/runtimeConfig.native.d.ts +44 -0
- package/dist-types/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/ControlCatalog.d.ts +61 -0
- package/dist-types/ts3.4/ControlCatalogClient.d.ts +139 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
- package/dist-types/ts3.4/commands/ListCommonControlsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListDomainsCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListObjectivesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +9 -0
- package/dist-types/ts3.4/models/ControlCatalogServiceException.d.ts +8 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +108 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListCommonControlsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListDomainsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListObjectivesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +41 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +85 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +89 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +79 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/package.json +101 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListDomainsCommand = exports.$Command = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const EndpointParameters_1 = require("../endpoint/EndpointParameters");
|
|
9
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
10
|
+
class ListDomainsCommand extends smithy_client_1.Command
|
|
11
|
+
.classBuilder()
|
|
12
|
+
.ep({
|
|
13
|
+
...EndpointParameters_1.commonParams,
|
|
14
|
+
})
|
|
15
|
+
.m(function (Command, cs, config, o) {
|
|
16
|
+
return [
|
|
17
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
18
|
+
(0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
|
|
19
|
+
];
|
|
20
|
+
})
|
|
21
|
+
.s("ControlCatalog", "ListDomains", {})
|
|
22
|
+
.n("ControlCatalogClient", "ListDomainsCommand")
|
|
23
|
+
.f(void 0, void 0)
|
|
24
|
+
.ser(Aws_restJson1_1.se_ListDomainsCommand)
|
|
25
|
+
.de(Aws_restJson1_1.de_ListDomainsCommand)
|
|
26
|
+
.build() {
|
|
27
|
+
}
|
|
28
|
+
exports.ListDomainsCommand = ListDomainsCommand;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListObjectivesCommand = exports.$Command = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const EndpointParameters_1 = require("../endpoint/EndpointParameters");
|
|
9
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
10
|
+
class ListObjectivesCommand extends smithy_client_1.Command
|
|
11
|
+
.classBuilder()
|
|
12
|
+
.ep({
|
|
13
|
+
...EndpointParameters_1.commonParams,
|
|
14
|
+
})
|
|
15
|
+
.m(function (Command, cs, config, o) {
|
|
16
|
+
return [
|
|
17
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
18
|
+
(0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
|
|
19
|
+
];
|
|
20
|
+
})
|
|
21
|
+
.s("ControlCatalog", "ListObjectives", {})
|
|
22
|
+
.n("ControlCatalogClient", "ListObjectivesCommand")
|
|
23
|
+
.f(void 0, void 0)
|
|
24
|
+
.ser(Aws_restJson1_1.se_ListObjectivesCommand)
|
|
25
|
+
.de(Aws_restJson1_1.de_ListObjectivesCommand)
|
|
26
|
+
.build() {
|
|
27
|
+
}
|
|
28
|
+
exports.ListObjectivesCommand = ListObjectivesCommand;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./ListCommonControlsCommand"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./ListDomainsCommand"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./ListObjectivesCommand"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commonParams = exports.resolveClientEndpointParameters = void 0;
|
|
4
|
+
const resolveClientEndpointParameters = (options) => {
|
|
5
|
+
return {
|
|
6
|
+
...options,
|
|
7
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
8
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
9
|
+
defaultSigningName: "controlcatalog",
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
|
|
13
|
+
exports.commonParams = {
|
|
14
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
15
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
16
|
+
Region: { type: "builtInParams", name: "region" },
|
|
17
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultEndpointResolver = void 0;
|
|
4
|
+
const util_endpoints_1 = require("@aws-sdk/util-endpoints");
|
|
5
|
+
const util_endpoints_2 = require("@smithy/util-endpoints");
|
|
6
|
+
const ruleset_1 = require("./ruleset");
|
|
7
|
+
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
8
|
+
return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
|
9
|
+
endpointParams: endpointParams,
|
|
10
|
+
logger: context.logger,
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
exports.defaultEndpointResolver = defaultEndpointResolver;
|
|
14
|
+
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ruleSet = void 0;
|
|
4
|
+
const s = "required", t = "fn", u = "argv", v = "ref";
|
|
5
|
+
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "String" }, i = { [s]: true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }];
|
|
6
|
+
const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ rules: [{ endpoint: { url: "https://controlcatalog-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ rules: [{ endpoint: { url: "https://controlcatalog-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ rules: [{ endpoint: { url: "https://controlcatalog.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { rules: [{ endpoint: { url: "https://controlcatalog.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
|
|
7
|
+
exports.ruleSet = _data;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ControlCatalogServiceException = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./ControlCatalogClient"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./ControlCatalog"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./commands"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./pagination"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./models"), exports);
|
|
10
|
+
var ControlCatalogServiceException_1 = require("./models/ControlCatalogServiceException");
|
|
11
|
+
Object.defineProperty(exports, "ControlCatalogServiceException", { enumerable: true, get: function () { return ControlCatalogServiceException_1.ControlCatalogServiceException; } });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ControlCatalogServiceException = exports.__ServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
+
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
+
class ControlCatalogServiceException extends smithy_client_1.ServiceException {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
Object.setPrototypeOf(this, ControlCatalogServiceException.prototype);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.ControlCatalogServiceException = ControlCatalogServiceException;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationException = exports.ThrottlingException = exports.InternalServerException = exports.AccessDeniedException = void 0;
|
|
4
|
+
const ControlCatalogServiceException_1 = require("./ControlCatalogServiceException");
|
|
5
|
+
class AccessDeniedException extends ControlCatalogServiceException_1.ControlCatalogServiceException {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
super({
|
|
8
|
+
name: "AccessDeniedException",
|
|
9
|
+
$fault: "client",
|
|
10
|
+
...opts,
|
|
11
|
+
});
|
|
12
|
+
this.name = "AccessDeniedException";
|
|
13
|
+
this.$fault = "client";
|
|
14
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
15
|
+
this.Message = opts.Message;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
19
|
+
class InternalServerException extends ControlCatalogServiceException_1.ControlCatalogServiceException {
|
|
20
|
+
constructor(opts) {
|
|
21
|
+
super({
|
|
22
|
+
name: "InternalServerException",
|
|
23
|
+
$fault: "server",
|
|
24
|
+
...opts,
|
|
25
|
+
});
|
|
26
|
+
this.name = "InternalServerException";
|
|
27
|
+
this.$fault = "server";
|
|
28
|
+
this.$retryable = {};
|
|
29
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
30
|
+
this.Message = opts.Message;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.InternalServerException = InternalServerException;
|
|
34
|
+
class ThrottlingException extends ControlCatalogServiceException_1.ControlCatalogServiceException {
|
|
35
|
+
constructor(opts) {
|
|
36
|
+
super({
|
|
37
|
+
name: "ThrottlingException",
|
|
38
|
+
$fault: "client",
|
|
39
|
+
...opts,
|
|
40
|
+
});
|
|
41
|
+
this.name = "ThrottlingException";
|
|
42
|
+
this.$fault = "client";
|
|
43
|
+
this.$retryable = {
|
|
44
|
+
throttling: true,
|
|
45
|
+
};
|
|
46
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
47
|
+
this.Message = opts.Message;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.ThrottlingException = ThrottlingException;
|
|
51
|
+
class ValidationException extends ControlCatalogServiceException_1.ControlCatalogServiceException {
|
|
52
|
+
constructor(opts) {
|
|
53
|
+
super({
|
|
54
|
+
name: "ValidationException",
|
|
55
|
+
$fault: "client",
|
|
56
|
+
...opts,
|
|
57
|
+
});
|
|
58
|
+
this.name = "ValidationException";
|
|
59
|
+
this.$fault = "client";
|
|
60
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
61
|
+
this.Message = opts.Message;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.ValidationException = ValidationException;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateListCommonControls = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
5
|
+
const ListCommonControlsCommand_1 = require("../commands/ListCommonControlsCommand");
|
|
6
|
+
const ControlCatalogClient_1 = require("../ControlCatalogClient");
|
|
7
|
+
exports.paginateListCommonControls = (0, core_1.createPaginator)(ControlCatalogClient_1.ControlCatalogClient, ListCommonControlsCommand_1.ListCommonControlsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateListDomains = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
5
|
+
const ListDomainsCommand_1 = require("../commands/ListDomainsCommand");
|
|
6
|
+
const ControlCatalogClient_1 = require("../ControlCatalogClient");
|
|
7
|
+
exports.paginateListDomains = (0, core_1.createPaginator)(ControlCatalogClient_1.ControlCatalogClient, ListDomainsCommand_1.ListDomainsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateListObjectives = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
5
|
+
const ListObjectivesCommand_1 = require("../commands/ListObjectivesCommand");
|
|
6
|
+
const ControlCatalogClient_1 = require("../ControlCatalogClient");
|
|
7
|
+
exports.paginateListObjectives = (0, core_1.createPaginator)(ControlCatalogClient_1.ControlCatalogClient, ListObjectivesCommand_1.ListObjectivesCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./ListCommonControlsPaginator"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./ListDomainsPaginator"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./ListObjectivesPaginator"), exports);
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.de_ListObjectivesCommand = exports.de_ListDomainsCommand = exports.de_ListCommonControlsCommand = exports.se_ListObjectivesCommand = exports.se_ListDomainsCommand = exports.se_ListCommonControlsCommand = void 0;
|
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const core_2 = require("@smithy/core");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
const ControlCatalogServiceException_1 = require("../models/ControlCatalogServiceException");
|
|
8
|
+
const models_0_1 = require("../models/models_0");
|
|
9
|
+
const se_ListCommonControlsCommand = async (input, context) => {
|
|
10
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
11
|
+
const headers = {
|
|
12
|
+
"content-type": "application/json",
|
|
13
|
+
};
|
|
14
|
+
b.bp("/common-controls");
|
|
15
|
+
const query = (0, smithy_client_1.map)({
|
|
16
|
+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
17
|
+
[_nT]: [, input[_NT]],
|
|
18
|
+
});
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
21
|
+
CommonControlFilter: (_) => (0, smithy_client_1._json)(_),
|
|
22
|
+
}));
|
|
23
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
24
|
+
return b.build();
|
|
25
|
+
};
|
|
26
|
+
exports.se_ListCommonControlsCommand = se_ListCommonControlsCommand;
|
|
27
|
+
const se_ListDomainsCommand = async (input, context) => {
|
|
28
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
29
|
+
const headers = {};
|
|
30
|
+
b.bp("/domains");
|
|
31
|
+
const query = (0, smithy_client_1.map)({
|
|
32
|
+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
33
|
+
[_nT]: [, input[_NT]],
|
|
34
|
+
});
|
|
35
|
+
let body;
|
|
36
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
37
|
+
return b.build();
|
|
38
|
+
};
|
|
39
|
+
exports.se_ListDomainsCommand = se_ListDomainsCommand;
|
|
40
|
+
const se_ListObjectivesCommand = async (input, context) => {
|
|
41
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
42
|
+
const headers = {
|
|
43
|
+
"content-type": "application/json",
|
|
44
|
+
};
|
|
45
|
+
b.bp("/objectives");
|
|
46
|
+
const query = (0, smithy_client_1.map)({
|
|
47
|
+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
48
|
+
[_nT]: [, input[_NT]],
|
|
49
|
+
});
|
|
50
|
+
let body;
|
|
51
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
52
|
+
ObjectiveFilter: (_) => (0, smithy_client_1._json)(_),
|
|
53
|
+
}));
|
|
54
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
55
|
+
return b.build();
|
|
56
|
+
};
|
|
57
|
+
exports.se_ListObjectivesCommand = se_ListObjectivesCommand;
|
|
58
|
+
const de_ListCommonControlsCommand = async (output, context) => {
|
|
59
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
60
|
+
return de_CommandError(output, context);
|
|
61
|
+
}
|
|
62
|
+
const contents = (0, smithy_client_1.map)({
|
|
63
|
+
$metadata: deserializeMetadata(output),
|
|
64
|
+
});
|
|
65
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
66
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
67
|
+
CommonControls: (_) => de_CommonControlSummaryList(_, context),
|
|
68
|
+
NextToken: smithy_client_1.expectString,
|
|
69
|
+
});
|
|
70
|
+
Object.assign(contents, doc);
|
|
71
|
+
return contents;
|
|
72
|
+
};
|
|
73
|
+
exports.de_ListCommonControlsCommand = de_ListCommonControlsCommand;
|
|
74
|
+
const de_ListDomainsCommand = async (output, context) => {
|
|
75
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
76
|
+
return de_CommandError(output, context);
|
|
77
|
+
}
|
|
78
|
+
const contents = (0, smithy_client_1.map)({
|
|
79
|
+
$metadata: deserializeMetadata(output),
|
|
80
|
+
});
|
|
81
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
82
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
83
|
+
Domains: (_) => de_DomainSummaryList(_, context),
|
|
84
|
+
NextToken: smithy_client_1.expectString,
|
|
85
|
+
});
|
|
86
|
+
Object.assign(contents, doc);
|
|
87
|
+
return contents;
|
|
88
|
+
};
|
|
89
|
+
exports.de_ListDomainsCommand = de_ListDomainsCommand;
|
|
90
|
+
const de_ListObjectivesCommand = async (output, context) => {
|
|
91
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
92
|
+
return de_CommandError(output, context);
|
|
93
|
+
}
|
|
94
|
+
const contents = (0, smithy_client_1.map)({
|
|
95
|
+
$metadata: deserializeMetadata(output),
|
|
96
|
+
});
|
|
97
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
98
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
99
|
+
NextToken: smithy_client_1.expectString,
|
|
100
|
+
Objectives: (_) => de_ObjectiveSummaryList(_, context),
|
|
101
|
+
});
|
|
102
|
+
Object.assign(contents, doc);
|
|
103
|
+
return contents;
|
|
104
|
+
};
|
|
105
|
+
exports.de_ListObjectivesCommand = de_ListObjectivesCommand;
|
|
106
|
+
const de_CommandError = async (output, context) => {
|
|
107
|
+
const parsedOutput = {
|
|
108
|
+
...output,
|
|
109
|
+
body: await (0, core_1.parseJsonErrorBody)(output.body, context),
|
|
110
|
+
};
|
|
111
|
+
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
112
|
+
switch (errorCode) {
|
|
113
|
+
case "AccessDeniedException":
|
|
114
|
+
case "com.amazonaws.controlcatalog#AccessDeniedException":
|
|
115
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
116
|
+
case "InternalServerException":
|
|
117
|
+
case "com.amazonaws.controlcatalog#InternalServerException":
|
|
118
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
119
|
+
case "ThrottlingException":
|
|
120
|
+
case "com.amazonaws.controlcatalog#ThrottlingException":
|
|
121
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
122
|
+
case "ValidationException":
|
|
123
|
+
case "com.amazonaws.controlcatalog#ValidationException":
|
|
124
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
125
|
+
default:
|
|
126
|
+
const parsedBody = parsedOutput.body;
|
|
127
|
+
return throwDefaultError({
|
|
128
|
+
output,
|
|
129
|
+
parsedBody,
|
|
130
|
+
errorCode,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(ControlCatalogServiceException_1.ControlCatalogServiceException);
|
|
135
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
136
|
+
const contents = (0, smithy_client_1.map)({});
|
|
137
|
+
const data = parsedOutput.body;
|
|
138
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
139
|
+
Message: smithy_client_1.expectString,
|
|
140
|
+
});
|
|
141
|
+
Object.assign(contents, doc);
|
|
142
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
143
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
144
|
+
...contents,
|
|
145
|
+
});
|
|
146
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
147
|
+
};
|
|
148
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
149
|
+
const contents = (0, smithy_client_1.map)({});
|
|
150
|
+
const data = parsedOutput.body;
|
|
151
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
152
|
+
Message: smithy_client_1.expectString,
|
|
153
|
+
});
|
|
154
|
+
Object.assign(contents, doc);
|
|
155
|
+
const exception = new models_0_1.InternalServerException({
|
|
156
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
157
|
+
...contents,
|
|
158
|
+
});
|
|
159
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
160
|
+
};
|
|
161
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
162
|
+
const contents = (0, smithy_client_1.map)({});
|
|
163
|
+
const data = parsedOutput.body;
|
|
164
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
165
|
+
Message: smithy_client_1.expectString,
|
|
166
|
+
});
|
|
167
|
+
Object.assign(contents, doc);
|
|
168
|
+
const exception = new models_0_1.ThrottlingException({
|
|
169
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
170
|
+
...contents,
|
|
171
|
+
});
|
|
172
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
173
|
+
};
|
|
174
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
175
|
+
const contents = (0, smithy_client_1.map)({});
|
|
176
|
+
const data = parsedOutput.body;
|
|
177
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
178
|
+
Message: smithy_client_1.expectString,
|
|
179
|
+
});
|
|
180
|
+
Object.assign(contents, doc);
|
|
181
|
+
const exception = new models_0_1.ValidationException({
|
|
182
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
183
|
+
...contents,
|
|
184
|
+
});
|
|
185
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
186
|
+
};
|
|
187
|
+
const de_CommonControlSummary = (output, context) => {
|
|
188
|
+
return (0, smithy_client_1.take)(output, {
|
|
189
|
+
Arn: smithy_client_1.expectString,
|
|
190
|
+
CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
191
|
+
Description: smithy_client_1.expectString,
|
|
192
|
+
Domain: smithy_client_1._json,
|
|
193
|
+
LastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
194
|
+
Name: smithy_client_1.expectString,
|
|
195
|
+
Objective: smithy_client_1._json,
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
const de_CommonControlSummaryList = (output, context) => {
|
|
199
|
+
const retVal = (output || [])
|
|
200
|
+
.filter((e) => e != null)
|
|
201
|
+
.map((entry) => {
|
|
202
|
+
return de_CommonControlSummary(entry, context);
|
|
203
|
+
});
|
|
204
|
+
return retVal;
|
|
205
|
+
};
|
|
206
|
+
const de_DomainSummary = (output, context) => {
|
|
207
|
+
return (0, smithy_client_1.take)(output, {
|
|
208
|
+
Arn: smithy_client_1.expectString,
|
|
209
|
+
CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
210
|
+
Description: smithy_client_1.expectString,
|
|
211
|
+
LastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
212
|
+
Name: smithy_client_1.expectString,
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
const de_DomainSummaryList = (output, context) => {
|
|
216
|
+
const retVal = (output || [])
|
|
217
|
+
.filter((e) => e != null)
|
|
218
|
+
.map((entry) => {
|
|
219
|
+
return de_DomainSummary(entry, context);
|
|
220
|
+
});
|
|
221
|
+
return retVal;
|
|
222
|
+
};
|
|
223
|
+
const de_ObjectiveSummary = (output, context) => {
|
|
224
|
+
return (0, smithy_client_1.take)(output, {
|
|
225
|
+
Arn: smithy_client_1.expectString,
|
|
226
|
+
CreateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
227
|
+
Description: smithy_client_1.expectString,
|
|
228
|
+
Domain: smithy_client_1._json,
|
|
229
|
+
LastUpdateTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
230
|
+
Name: smithy_client_1.expectString,
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
const de_ObjectiveSummaryList = (output, context) => {
|
|
234
|
+
const retVal = (output || [])
|
|
235
|
+
.filter((e) => e != null)
|
|
236
|
+
.map((entry) => {
|
|
237
|
+
return de_ObjectiveSummary(entry, context);
|
|
238
|
+
});
|
|
239
|
+
return retVal;
|
|
240
|
+
};
|
|
241
|
+
const deserializeMetadata = (output) => ({
|
|
242
|
+
httpStatusCode: output.statusCode,
|
|
243
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
244
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
245
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
246
|
+
});
|
|
247
|
+
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
248
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
249
|
+
value !== null &&
|
|
250
|
+
value !== "" &&
|
|
251
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
252
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
253
|
+
const _MR = "MaxResults";
|
|
254
|
+
const _NT = "NextToken";
|
|
255
|
+
const _mR = "maxResults";
|
|
256
|
+
const _nT = "nextToken";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
+
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
7
|
+
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
8
|
+
const config_resolver_1 = require("@smithy/config-resolver");
|
|
9
|
+
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
10
|
+
const invalid_dependency_1 = require("@smithy/invalid-dependency");
|
|
11
|
+
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
|
12
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
13
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
14
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
15
|
+
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
|
|
16
|
+
const getRuntimeConfig = (config) => {
|
|
17
|
+
const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
|
|
18
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
19
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
20
|
+
return {
|
|
21
|
+
...clientSharedValues,
|
|
22
|
+
...config,
|
|
23
|
+
runtime: "browser",
|
|
24
|
+
defaultsMode,
|
|
25
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
|
|
26
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
27
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
28
|
+
(0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
29
|
+
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
30
|
+
region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
|
|
31
|
+
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
32
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
|
|
33
|
+
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
34
|
+
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
35
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
36
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
+
const core_1 = require("@aws-sdk/core");
|
|
7
|
+
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
8
|
+
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
9
|
+
const config_resolver_1 = require("@smithy/config-resolver");
|
|
10
|
+
const hash_node_1 = require("@smithy/hash-node");
|
|
11
|
+
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
12
|
+
const node_config_provider_1 = require("@smithy/node-config-provider");
|
|
13
|
+
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
14
|
+
const util_body_length_node_1 = require("@smithy/util-body-length-node");
|
|
15
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
16
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
17
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
18
|
+
const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
|
|
19
|
+
const smithy_client_2 = require("@smithy/smithy-client");
|
|
20
|
+
const getRuntimeConfig = (config) => {
|
|
21
|
+
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
|
22
|
+
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
|
23
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
24
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
25
|
+
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
|
|
26
|
+
return {
|
|
27
|
+
...clientSharedValues,
|
|
28
|
+
...config,
|
|
29
|
+
runtime: "node",
|
|
30
|
+
defaultsMode,
|
|
31
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
32
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
|
|
33
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
34
|
+
(0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
35
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
36
|
+
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
37
|
+
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
38
|
+
retryMode: config?.retryMode ??
|
|
39
|
+
(0, node_config_provider_1.loadConfig)({
|
|
40
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
41
|
+
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
|
|
42
|
+
}),
|
|
43
|
+
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
44
|
+
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
45
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
46
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
+
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
6
|
+
const getRuntimeConfig = (config) => {
|
|
7
|
+
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
|
|
8
|
+
return {
|
|
9
|
+
...browserDefaults,
|
|
10
|
+
...config,
|
|
11
|
+
runtime: "react-native",
|
|
12
|
+
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
+
const url_parser_1 = require("@smithy/url-parser");
|
|
7
|
+
const util_base64_1 = require("@smithy/util-base64");
|
|
8
|
+
const util_utf8_1 = require("@smithy/util-utf8");
|
|
9
|
+
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
|
|
10
|
+
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
11
|
+
const getRuntimeConfig = (config) => {
|
|
12
|
+
return {
|
|
13
|
+
apiVersion: "2018-05-10",
|
|
14
|
+
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
|
|
15
|
+
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
|
|
16
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
17
|
+
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
18
|
+
extensions: config?.extensions ?? [],
|
|
19
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultControlCatalogHttpAuthSchemeProvider,
|
|
20
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
21
|
+
{
|
|
22
|
+
schemeId: "aws.auth#sigv4",
|
|
23
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
24
|
+
signer: new core_1.AwsSdkSigV4Signer(),
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
28
|
+
serviceId: config?.serviceId ?? "ControlCatalog",
|
|
29
|
+
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
30
|
+
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
31
|
+
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|