@aws-sdk/client-network-security-manager 3.1139.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 +503 -0
- package/dist-cjs/index.js +2327 -0
- package/dist-es/NetworkSecurityManager.js +129 -0
- package/dist-es/NetworkSecurityManagerClient.js +47 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commandBuilder.js +6 -0
- package/dist-es/commands/CreateDeploymentCommand.js +4 -0
- package/dist-es/commands/CreateDeploymentSnapshotCommand.js +4 -0
- package/dist-es/commands/CreatePolicyCommand.js +4 -0
- package/dist-es/commands/CreatePolicySnapshotCommand.js +4 -0
- package/dist-es/commands/CreateRuleCommand.js +4 -0
- package/dist-es/commands/CreateRuleSnapshotCommand.js +4 -0
- package/dist-es/commands/CreateScopeCommand.js +4 -0
- package/dist-es/commands/CreateScopeSnapshotCommand.js +4 -0
- package/dist-es/commands/CreateTemplateCommand.js +4 -0
- package/dist-es/commands/CreateTemplateSnapshotCommand.js +4 -0
- package/dist-es/commands/DeleteAdminAccountCommand.js +4 -0
- package/dist-es/commands/DeleteDeploymentCommand.js +4 -0
- package/dist-es/commands/DeletePolicyCommand.js +4 -0
- package/dist-es/commands/DeleteRuleCommand.js +4 -0
- package/dist-es/commands/DeleteScopeCommand.js +4 -0
- package/dist-es/commands/DeleteTemplateCommand.js +4 -0
- package/dist-es/commands/GenerateRuleConfigurationCommand.js +4 -0
- package/dist-es/commands/GetAdminAccountCommand.js +4 -0
- package/dist-es/commands/GetDeploymentCommand.js +4 -0
- package/dist-es/commands/GetPolicyCommand.js +4 -0
- package/dist-es/commands/GetRuleCommand.js +4 -0
- package/dist-es/commands/GetScopeCommand.js +4 -0
- package/dist-es/commands/GetTemplateCommand.js +4 -0
- package/dist-es/commands/ListAdminAccountsCommand.js +4 -0
- package/dist-es/commands/ListAggregateResourceSynchronizationStatusesCommand.js +4 -0
- package/dist-es/commands/ListDeploymentSnapshotsCommand.js +4 -0
- package/dist-es/commands/ListDeploymentsCommand.js +4 -0
- package/dist-es/commands/ListPoliciesCommand.js +4 -0
- package/dist-es/commands/ListPolicySnapshotsCommand.js +4 -0
- package/dist-es/commands/ListResourceAssociationsCommand.js +4 -0
- package/dist-es/commands/ListResourceSynchronizationStatusesCommand.js +4 -0
- package/dist-es/commands/ListRuleSnapshotsCommand.js +4 -0
- package/dist-es/commands/ListRulesCommand.js +4 -0
- package/dist-es/commands/ListScopeSnapshotsCommand.js +4 -0
- package/dist-es/commands/ListScopesCommand.js +4 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +4 -0
- package/dist-es/commands/ListTemplateSnapshotsCommand.js +4 -0
- package/dist-es/commands/ListTemplatesCommand.js +4 -0
- package/dist-es/commands/PutAdminAccountCommand.js +4 -0
- package/dist-es/commands/TagResourceCommand.js +4 -0
- package/dist-es/commands/UntagResourceCommand.js +4 -0
- package/dist-es/commands/UpdateDeploymentCommand.js +4 -0
- package/dist-es/commands/UpdatePolicyCommand.js +4 -0
- package/dist-es/commands/UpdateRuleCommand.js +4 -0
- package/dist-es/commands/UpdateScopeCommand.js +4 -0
- package/dist-es/commands/UpdateTemplateCommand.js +4 -0
- package/dist-es/commands/index.js +46 -0
- package/dist-es/endpoint/EndpointParameters.js +11 -0
- package/dist-es/endpoint/bdd.js +29 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +10 -0
- package/dist-es/models/NetworkSecurityManagerServiceException.js +8 -0
- package/dist-es/models/enums.js +91 -0
- package/dist-es/models/errors.js +138 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListAdminAccountsPaginator.js +4 -0
- package/dist-es/pagination/ListAggregateResourceSynchronizationStatusesPaginator.js +4 -0
- package/dist-es/pagination/ListDeploymentSnapshotsPaginator.js +4 -0
- package/dist-es/pagination/ListDeploymentsPaginator.js +4 -0
- package/dist-es/pagination/ListPoliciesPaginator.js +4 -0
- package/dist-es/pagination/ListPolicySnapshotsPaginator.js +4 -0
- package/dist-es/pagination/ListResourceAssociationsPaginator.js +4 -0
- package/dist-es/pagination/ListResourceSynchronizationStatusesPaginator.js +4 -0
- package/dist-es/pagination/ListRuleSnapshotsPaginator.js +4 -0
- package/dist-es/pagination/ListRulesPaginator.js +4 -0
- package/dist-es/pagination/ListScopeSnapshotsPaginator.js +4 -0
- package/dist-es/pagination/ListScopesPaginator.js +4 -0
- package/dist-es/pagination/ListTemplateSnapshotsPaginator.js +4 -0
- package/dist-es/pagination/ListTemplatesPaginator.js +4 -0
- package/dist-es/pagination/index.js +15 -0
- package/dist-es/runtimeConfig.browser.js +29 -0
- package/dist-es/runtimeConfig.js +43 -0
- package/dist-es/runtimeConfig.native.js +9 -0
- package/dist-es/runtimeConfig.shared.js +40 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +1326 -0
- package/dist-types/NetworkSecurityManager.d.ts +443 -0
- package/dist-types/NetworkSecurityManagerClient.d.ts +232 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commandBuilder.d.ts +18 -0
- package/dist-types/commands/CreateDeploymentCommand.d.ts +206 -0
- package/dist-types/commands/CreateDeploymentSnapshotCommand.d.ts +153 -0
- package/dist-types/commands/CreatePolicyCommand.d.ts +198 -0
- package/dist-types/commands/CreatePolicySnapshotCommand.d.ts +158 -0
- package/dist-types/commands/CreateRuleCommand.d.ts +148 -0
- package/dist-types/commands/CreateRuleSnapshotCommand.d.ts +133 -0
- package/dist-types/commands/CreateScopeCommand.d.ts +292 -0
- package/dist-types/commands/CreateScopeSnapshotCommand.d.ts +205 -0
- package/dist-types/commands/CreateTemplateCommand.d.ts +160 -0
- package/dist-types/commands/CreateTemplateSnapshotCommand.d.ts +139 -0
- package/dist-types/commands/DeleteAdminAccountCommand.d.ts +94 -0
- package/dist-types/commands/DeleteDeploymentCommand.d.ts +97 -0
- package/dist-types/commands/DeletePolicyCommand.d.ts +97 -0
- package/dist-types/commands/DeleteRuleCommand.d.ts +97 -0
- package/dist-types/commands/DeleteScopeCommand.d.ts +97 -0
- package/dist-types/commands/DeleteTemplateCommand.d.ts +97 -0
- package/dist-types/commands/GenerateRuleConfigurationCommand.d.ts +107 -0
- package/dist-types/commands/GetAdminAccountCommand.d.ts +168 -0
- package/dist-types/commands/GetDeploymentCommand.d.ts +174 -0
- package/dist-types/commands/GetPolicyCommand.d.ts +149 -0
- package/dist-types/commands/GetRuleCommand.d.ts +148 -0
- package/dist-types/commands/GetScopeCommand.d.ts +196 -0
- package/dist-types/commands/GetTemplateCommand.d.ts +130 -0
- package/dist-types/commands/ListAdminAccountsCommand.d.ts +112 -0
- package/dist-types/commands/ListAggregateResourceSynchronizationStatusesCommand.d.ts +181 -0
- package/dist-types/commands/ListDeploymentSnapshotsCommand.d.ts +124 -0
- package/dist-types/commands/ListDeploymentsCommand.d.ts +122 -0
- package/dist-types/commands/ListPoliciesCommand.d.ts +126 -0
- package/dist-types/commands/ListPolicySnapshotsCommand.d.ts +128 -0
- package/dist-types/commands/ListResourceAssociationsCommand.d.ts +116 -0
- package/dist-types/commands/ListResourceSynchronizationStatusesCommand.d.ts +194 -0
- package/dist-types/commands/ListRuleSnapshotsCommand.d.ts +138 -0
- package/dist-types/commands/ListRulesCommand.d.ts +126 -0
- package/dist-types/commands/ListScopeSnapshotsCommand.d.ts +124 -0
- package/dist-types/commands/ListScopesCommand.d.ts +123 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +106 -0
- package/dist-types/commands/ListTemplateSnapshotsCommand.d.ts +126 -0
- package/dist-types/commands/ListTemplatesCommand.d.ts +124 -0
- package/dist-types/commands/PutAdminAccountCommand.d.ts +218 -0
- package/dist-types/commands/TagResourceCommand.d.ts +107 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +106 -0
- package/dist-types/commands/UpdateDeploymentCommand.d.ts +214 -0
- package/dist-types/commands/UpdatePolicyCommand.d.ts +192 -0
- package/dist-types/commands/UpdateRuleCommand.d.ts +142 -0
- package/dist-types/commands/UpdateScopeCommand.d.ts +288 -0
- package/dist-types/commands/UpdateTemplateCommand.d.ts +154 -0
- package/dist-types/commands/index.d.ts +46 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +44 -0
- package/dist-types/endpoint/bdd.d.ts +2 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +18 -0
- package/dist-types/models/NetworkSecurityManagerServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +227 -0
- package/dist-types/models/errors.d.ts +177 -0
- package/dist-types/models/models_0.d.ts +4006 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListAdminAccountsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListAggregateResourceSynchronizationStatusesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListDeploymentSnapshotsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListDeploymentsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListPoliciesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListPolicySnapshotsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListResourceAssociationsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListResourceSynchronizationStatusesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListRuleSnapshotsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListRulesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListScopeSnapshotsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListScopesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListTemplateSnapshotsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListTemplatesPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +15 -0
- package/dist-types/runtimeConfig.browser.d.ts +57 -0
- package/dist-types/runtimeConfig.d.ts +57 -0
- package/dist-types/runtimeConfig.native.d.ts +56 -0
- package/dist-types/runtimeConfig.shared.d.ts +28 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +197 -0
- package/dist-types/ts3.4/NetworkSecurityManager.d.ts +857 -0
- package/dist-types/ts3.4/NetworkSecurityManagerClient.d.ts +340 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +27 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +43 -0
- package/dist-types/ts3.4/commandBuilder.d.ts +40 -0
- package/dist-types/ts3.4/commands/CreateDeploymentCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateDeploymentSnapshotCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/CreatePolicyCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreatePolicySnapshotCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/CreateRuleCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateRuleSnapshotCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/CreateScopeCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateScopeSnapshotCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/CreateTemplateCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateTemplateSnapshotCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/DeleteAdminAccountCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteDeploymentCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeletePolicyCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteRuleCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteScopeCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteTemplateCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GenerateRuleConfigurationCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetAdminAccountCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetDeploymentCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetPolicyCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetRuleCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetScopeCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetTemplateCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListAdminAccountsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListAggregateResourceSynchronizationStatusesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListDeploymentSnapshotsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListDeploymentsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListPoliciesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListPolicySnapshotsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListResourceAssociationsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListResourceSynchronizationStatusesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListRuleSnapshotsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListRulesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListScopeSnapshotsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListScopesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListTemplateSnapshotsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListTemplatesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/PutAdminAccountCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateDeploymentCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdatePolicyCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateRuleCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateScopeCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateTemplateCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +46 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
- package/dist-types/ts3.4/endpoint/bdd.d.ts +2 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +10 -0
- package/dist-types/ts3.4/index.d.ts +13 -0
- package/dist-types/ts3.4/models/NetworkSecurityManagerServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/enums.d.ts +112 -0
- package/dist-types/ts3.4/models/errors.d.ts +66 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1146 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
- package/dist-types/ts3.4/pagination/ListAdminAccountsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListAggregateResourceSynchronizationStatusesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListDeploymentSnapshotsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListDeploymentsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListPoliciesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListPolicySnapshotsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListResourceAssociationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListResourceSynchronizationStatusesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRuleSnapshotsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRulesPaginator.d.ts +8 -0
- package/dist-types/ts3.4/pagination/ListScopeSnapshotsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListScopesPaginator.d.ts +8 -0
- package/dist-types/ts3.4/pagination/ListTemplateSnapshotsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListTemplatesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +15 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +31 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +197 -0
- package/package.json +69 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BinaryDecisionDiagram } from "@smithy/core/endpoints";
|
|
2
|
+
const a = "isSet", b = { "ref": "Endpoint" }, c = [{ "ref": "Region" }];
|
|
3
|
+
const _data = {
|
|
4
|
+
conditions: [
|
|
5
|
+
[a, [b]],
|
|
6
|
+
[a, c],
|
|
7
|
+
["aws.partition", c, "PartitionResult"],
|
|
8
|
+
["booleanEquals", [{ ref: "UseFIPS" }, true]]
|
|
9
|
+
],
|
|
10
|
+
results: [
|
|
11
|
+
[-1],
|
|
12
|
+
[-1, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
13
|
+
[b, {}],
|
|
14
|
+
["https://network-security-manager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", {}],
|
|
15
|
+
["https://network-security-manager.{Region}.{PartitionResult#dualStackDnsSuffix}", {}],
|
|
16
|
+
[-1, "Invalid Configuration: Missing Region"]
|
|
17
|
+
]
|
|
18
|
+
};
|
|
19
|
+
const root = 2;
|
|
20
|
+
const r = 100_000_000;
|
|
21
|
+
const nodes = new Int32Array([
|
|
22
|
+
-1, 1, -1,
|
|
23
|
+
0, 6, 3,
|
|
24
|
+
1, 4, r + 5,
|
|
25
|
+
2, 5, r + 5,
|
|
26
|
+
3, r + 3, r + 4,
|
|
27
|
+
3, r + 1, r + 2,
|
|
28
|
+
]);
|
|
29
|
+
export const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { awsEndpointFunctions } from "@aws-sdk/core/client";
|
|
2
|
+
import { customEndpointFunctions, decideEndpoint, EndpointCache } from "@smithy/core/endpoints";
|
|
3
|
+
import { bdd } from "./bdd";
|
|
4
|
+
const cache = new EndpointCache({
|
|
5
|
+
size: 50,
|
|
6
|
+
params: ["Endpoint", "Region", "UseFIPS"],
|
|
7
|
+
});
|
|
8
|
+
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
10
|
+
endpointParams: endpointParams,
|
|
11
|
+
logger: context.logger,
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./NetworkSecurityManagerClient";
|
|
2
|
+
export * from "./NetworkSecurityManager";
|
|
3
|
+
export * from "./commands";
|
|
4
|
+
export { Command as $Command } from "@smithy/core/client";
|
|
5
|
+
export * from "./pagination";
|
|
6
|
+
export * from "./schemas/schemas_0";
|
|
7
|
+
export * from "./models/enums";
|
|
8
|
+
export * from "./models/errors";
|
|
9
|
+
export * from "./models/models_0";
|
|
10
|
+
export { NetworkSecurityManagerServiceException } from "./models/NetworkSecurityManagerServiceException";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/core/client";
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class NetworkSecurityManagerServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, NetworkSecurityManagerServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export const PolicyFirewallType = {
|
|
2
|
+
SHIELD_ADVANCED: "SHIELD_ADVANCED",
|
|
3
|
+
WAF: "WAF",
|
|
4
|
+
};
|
|
5
|
+
export const AdminAccountStatus = {
|
|
6
|
+
OFFBOARDED: "OFFBOARDED",
|
|
7
|
+
ONBOARDED: "ONBOARDED",
|
|
8
|
+
};
|
|
9
|
+
export const IpAddressType = {
|
|
10
|
+
DUALSTACK: "dualstack",
|
|
11
|
+
DUALSTACK_WITHOUT_PUBLIC_IPV4: "dualstack-without-public-ipv4",
|
|
12
|
+
IPV4: "ipv4",
|
|
13
|
+
};
|
|
14
|
+
export const Scheme = {
|
|
15
|
+
INTERNAL: "internal",
|
|
16
|
+
INTERNET_FACING: "internet-facing",
|
|
17
|
+
};
|
|
18
|
+
export const ScopeResourceType = {
|
|
19
|
+
ALB: "AWS::ElasticLoadBalancingV2::LoadBalancer::application",
|
|
20
|
+
APIGW: "AWS::ApiGateway::Stage",
|
|
21
|
+
CFD: "AWS::CloudFront::Distribution",
|
|
22
|
+
CLB: "AWS::ElasticLoadBalancing::LoadBalancer",
|
|
23
|
+
EIP: "AWS::EC2::EIP",
|
|
24
|
+
};
|
|
25
|
+
export const EntityStatus = {
|
|
26
|
+
ACTIVE: "ACTIVE",
|
|
27
|
+
DISABLED: "DISABLED",
|
|
28
|
+
DRAFT: "DRAFT",
|
|
29
|
+
};
|
|
30
|
+
export const ValidationExceptionReason = {
|
|
31
|
+
ACCOUNT_NOT_ONBOARDED: "ACCOUNT_NOT_ONBOARDED",
|
|
32
|
+
FIELD_VALIDATION_FAILED: "FIELD_VALIDATION_FAILED",
|
|
33
|
+
OTHER: "OTHER",
|
|
34
|
+
};
|
|
35
|
+
export const WAFConflictResolutionOptions = {
|
|
36
|
+
MERGE_WHERE_APPLICABLE: "MERGE_WHERE_APPLICABLE",
|
|
37
|
+
};
|
|
38
|
+
export const ExistingCustomerWebACLResolution = {
|
|
39
|
+
NO_REMEDIATION: "NO_REMEDIATION",
|
|
40
|
+
OVERRIDE_ASSOCIATION: "OVERRIDE_ASSOCIATION",
|
|
41
|
+
RETROFIT: "RETROFIT",
|
|
42
|
+
};
|
|
43
|
+
export const RuleFirewallType = {
|
|
44
|
+
WAF: "WAF",
|
|
45
|
+
};
|
|
46
|
+
export const RuleType = {
|
|
47
|
+
CONFIGURATION: "CONFIGURATION",
|
|
48
|
+
INSPECTION: "INSPECTION",
|
|
49
|
+
};
|
|
50
|
+
export const TemplateFirewallType = {
|
|
51
|
+
WAF: "WAF",
|
|
52
|
+
};
|
|
53
|
+
export const EntityStatusFilter = {
|
|
54
|
+
ACTIVE: "ACTIVE",
|
|
55
|
+
DISABLED: "DISABLED",
|
|
56
|
+
DRAFT: "DRAFT",
|
|
57
|
+
};
|
|
58
|
+
export const SynchronizationStatus = {
|
|
59
|
+
IN_SYNC: "IN_SYNC",
|
|
60
|
+
NOT_APPLICABLE: "NOT_APPLICABLE",
|
|
61
|
+
OUT_OF_SYNC: "OUT_OF_SYNC",
|
|
62
|
+
};
|
|
63
|
+
export const ResourceType = {
|
|
64
|
+
ALB: "AWS::ElasticLoadBalancingV2::LoadBalancer::application",
|
|
65
|
+
APIGW: "AWS::ApiGateway::Stage",
|
|
66
|
+
CFD: "AWS::CloudFront::Distribution",
|
|
67
|
+
CLB: "AWS::ElasticLoadBalancing::LoadBalancer",
|
|
68
|
+
EIP: "AWS::EC2::EIP",
|
|
69
|
+
SHIELDREGIONAL_PROTECTION: "AWS::ShieldRegional::Protection",
|
|
70
|
+
SHIELD_PROTECTION: "AWS::Shield::Protection",
|
|
71
|
+
WAF_V2_WEBACL: "AWS::WAFv2::WebACL",
|
|
72
|
+
};
|
|
73
|
+
export const WAFConfigDataType = {
|
|
74
|
+
ASSOCIATION_CONFIG: "AssociationConfig",
|
|
75
|
+
CAPTCHA_CONFIG: "CaptchaConfig",
|
|
76
|
+
CHALLENGE_CONFIG: "ChallengeConfig",
|
|
77
|
+
CUSTOM_RESPONSE_BODIES: "CustomResponseBodies",
|
|
78
|
+
DATA_PROTECTION_CONFIG: "DataProtectionConfig",
|
|
79
|
+
DEFAULT_ACTION: "DefaultAction",
|
|
80
|
+
LOGGING_CONFIGURATION: "LoggingConfiguration",
|
|
81
|
+
ON_SOURCE_DDOS_PROTECTION_CONFIG: "OnSourceDDoSProtectionConfig",
|
|
82
|
+
TOKEN_DOMAINS: "TokenDomains",
|
|
83
|
+
VISIBILITY_CONFIG: "VisibilityConfig",
|
|
84
|
+
};
|
|
85
|
+
export const ServiceResourceType = {
|
|
86
|
+
DEPLOYMENT: "Deployment",
|
|
87
|
+
POLICY: "Policy",
|
|
88
|
+
RULE: "Rule",
|
|
89
|
+
SCOPE: "Scope",
|
|
90
|
+
TEMPLATE: "Template",
|
|
91
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { NetworkSecurityManagerServiceException as __BaseException } from "./NetworkSecurityManagerServiceException";
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
name = "AccessDeniedException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "AccessDeniedException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class ConflictException extends __BaseException {
|
|
15
|
+
name = "ConflictException";
|
|
16
|
+
$fault = "client";
|
|
17
|
+
resourceId;
|
|
18
|
+
resourceType;
|
|
19
|
+
constructor(opts) {
|
|
20
|
+
super({
|
|
21
|
+
name: "ConflictException",
|
|
22
|
+
$fault: "client",
|
|
23
|
+
...opts,
|
|
24
|
+
});
|
|
25
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
26
|
+
this.resourceId = opts.resourceId;
|
|
27
|
+
this.resourceType = opts.resourceType;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export class InternalServerException extends __BaseException {
|
|
31
|
+
name = "InternalServerException";
|
|
32
|
+
$fault = "server";
|
|
33
|
+
$retryable = {};
|
|
34
|
+
constructor(opts) {
|
|
35
|
+
super({
|
|
36
|
+
name: "InternalServerException",
|
|
37
|
+
$fault: "server",
|
|
38
|
+
...opts,
|
|
39
|
+
});
|
|
40
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
44
|
+
name = "ServiceQuotaExceededException";
|
|
45
|
+
$fault = "client";
|
|
46
|
+
quotaCode;
|
|
47
|
+
serviceCode;
|
|
48
|
+
resourceId;
|
|
49
|
+
resourceType;
|
|
50
|
+
constructor(opts) {
|
|
51
|
+
super({
|
|
52
|
+
name: "ServiceQuotaExceededException",
|
|
53
|
+
$fault: "client",
|
|
54
|
+
...opts,
|
|
55
|
+
});
|
|
56
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
57
|
+
this.quotaCode = opts.quotaCode;
|
|
58
|
+
this.serviceCode = opts.serviceCode;
|
|
59
|
+
this.resourceId = opts.resourceId;
|
|
60
|
+
this.resourceType = opts.resourceType;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export class ServiceUnavailableException extends __BaseException {
|
|
64
|
+
name = "ServiceUnavailableException";
|
|
65
|
+
$fault = "server";
|
|
66
|
+
$retryable = {};
|
|
67
|
+
retryAfterSeconds;
|
|
68
|
+
constructor(opts) {
|
|
69
|
+
super({
|
|
70
|
+
name: "ServiceUnavailableException",
|
|
71
|
+
$fault: "server",
|
|
72
|
+
...opts,
|
|
73
|
+
});
|
|
74
|
+
Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
|
|
75
|
+
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export class TagPolicyViolationException extends __BaseException {
|
|
79
|
+
name = "TagPolicyViolationException";
|
|
80
|
+
$fault = "client";
|
|
81
|
+
constructor(opts) {
|
|
82
|
+
super({
|
|
83
|
+
name: "TagPolicyViolationException",
|
|
84
|
+
$fault: "client",
|
|
85
|
+
...opts,
|
|
86
|
+
});
|
|
87
|
+
Object.setPrototypeOf(this, TagPolicyViolationException.prototype);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
export class ThrottlingException extends __BaseException {
|
|
91
|
+
name = "ThrottlingException";
|
|
92
|
+
$fault = "client";
|
|
93
|
+
$retryable = {
|
|
94
|
+
throttling: true,
|
|
95
|
+
};
|
|
96
|
+
retryAfterSeconds;
|
|
97
|
+
constructor(opts) {
|
|
98
|
+
super({
|
|
99
|
+
name: "ThrottlingException",
|
|
100
|
+
$fault: "client",
|
|
101
|
+
...opts,
|
|
102
|
+
});
|
|
103
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
104
|
+
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export class ValidationException extends __BaseException {
|
|
108
|
+
name = "ValidationException";
|
|
109
|
+
$fault = "client";
|
|
110
|
+
reason;
|
|
111
|
+
fieldList;
|
|
112
|
+
constructor(opts) {
|
|
113
|
+
super({
|
|
114
|
+
name: "ValidationException",
|
|
115
|
+
$fault: "client",
|
|
116
|
+
...opts,
|
|
117
|
+
});
|
|
118
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
119
|
+
this.reason = opts.reason;
|
|
120
|
+
this.fieldList = opts.fieldList;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
124
|
+
name = "ResourceNotFoundException";
|
|
125
|
+
$fault = "client";
|
|
126
|
+
resourceId;
|
|
127
|
+
resourceType;
|
|
128
|
+
constructor(opts) {
|
|
129
|
+
super({
|
|
130
|
+
name: "ResourceNotFoundException",
|
|
131
|
+
$fault: "client",
|
|
132
|
+
...opts,
|
|
133
|
+
});
|
|
134
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
135
|
+
this.resourceId = opts.resourceId;
|
|
136
|
+
this.resourceType = opts.resourceType;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListAdminAccountsCommand, } from "../commands/ListAdminAccountsCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListAdminAccounts = createPaginator(NetworkSecurityManagerClient, ListAdminAccountsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListAggregateResourceSynchronizationStatusesCommand, } from "../commands/ListAggregateResourceSynchronizationStatusesCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListAggregateResourceSynchronizationStatuses = createPaginator(NetworkSecurityManagerClient, ListAggregateResourceSynchronizationStatusesCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListDeploymentSnapshotsCommand, } from "../commands/ListDeploymentSnapshotsCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListDeploymentSnapshots = createPaginator(NetworkSecurityManagerClient, ListDeploymentSnapshotsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListDeploymentsCommand, } from "../commands/ListDeploymentsCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListDeployments = createPaginator(NetworkSecurityManagerClient, ListDeploymentsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListPoliciesCommand, } from "../commands/ListPoliciesCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListPolicies = createPaginator(NetworkSecurityManagerClient, ListPoliciesCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListPolicySnapshotsCommand, } from "../commands/ListPolicySnapshotsCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListPolicySnapshots = createPaginator(NetworkSecurityManagerClient, ListPolicySnapshotsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListResourceAssociationsCommand, } from "../commands/ListResourceAssociationsCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListResourceAssociations = createPaginator(NetworkSecurityManagerClient, ListResourceAssociationsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListResourceSynchronizationStatusesCommand, } from "../commands/ListResourceSynchronizationStatusesCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListResourceSynchronizationStatuses = createPaginator(NetworkSecurityManagerClient, ListResourceSynchronizationStatusesCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListRuleSnapshotsCommand, } from "../commands/ListRuleSnapshotsCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListRuleSnapshots = createPaginator(NetworkSecurityManagerClient, ListRuleSnapshotsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListRulesCommand } from "../commands/ListRulesCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListRules = createPaginator(NetworkSecurityManagerClient, ListRulesCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListScopeSnapshotsCommand, } from "../commands/ListScopeSnapshotsCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListScopeSnapshots = createPaginator(NetworkSecurityManagerClient, ListScopeSnapshotsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListScopesCommand } from "../commands/ListScopesCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListScopes = createPaginator(NetworkSecurityManagerClient, ListScopesCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListTemplateSnapshotsCommand, } from "../commands/ListTemplateSnapshotsCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListTemplateSnapshots = createPaginator(NetworkSecurityManagerClient, ListTemplateSnapshotsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListTemplatesCommand, } from "../commands/ListTemplatesCommand";
|
|
3
|
+
import { NetworkSecurityManagerClient } from "../NetworkSecurityManagerClient";
|
|
4
|
+
export const paginateListTemplates = createPaginator(NetworkSecurityManagerClient, ListTemplatesCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./Interfaces";
|
|
2
|
+
export * from "./ListAdminAccountsPaginator";
|
|
3
|
+
export * from "./ListAggregateResourceSynchronizationStatusesPaginator";
|
|
4
|
+
export * from "./ListDeploymentsPaginator";
|
|
5
|
+
export * from "./ListDeploymentSnapshotsPaginator";
|
|
6
|
+
export * from "./ListPoliciesPaginator";
|
|
7
|
+
export * from "./ListPolicySnapshotsPaginator";
|
|
8
|
+
export * from "./ListResourceAssociationsPaginator";
|
|
9
|
+
export * from "./ListResourceSynchronizationStatusesPaginator";
|
|
10
|
+
export * from "./ListRulesPaginator";
|
|
11
|
+
export * from "./ListRuleSnapshotsPaginator";
|
|
12
|
+
export * from "./ListScopesPaginator";
|
|
13
|
+
export * from "./ListScopeSnapshotsPaginator";
|
|
14
|
+
export * from "./ListTemplatesPaginator";
|
|
15
|
+
export * from "./ListTemplateSnapshotsPaginator";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
|
|
3
|
+
import { invalidProvider, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig, } from "@smithy/core/config";
|
|
5
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/core/retry";
|
|
6
|
+
import { calculateBodyLength } from "@smithy/core/serde";
|
|
7
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
8
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
9
|
+
export const getRuntimeConfig = (config) => {
|
|
10
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
11
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
12
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
13
|
+
return {
|
|
14
|
+
...clientSharedValues,
|
|
15
|
+
...config,
|
|
16
|
+
runtime: "browser",
|
|
17
|
+
defaultsMode,
|
|
18
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
19
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
20
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
21
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
22
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
23
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
24
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
25
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
26
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
27
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS, } from "@aws-sdk/core/client";
|
|
3
|
+
import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core/httpAuthSchemes";
|
|
4
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
5
|
+
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
6
|
+
import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
|
|
7
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
|
|
8
|
+
import { calculateBodyLength } from "@smithy/core/serde";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
10
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
11
|
+
export const getRuntimeConfig = (config) => {
|
|
12
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
awsCheckVersion(process.version);
|
|
17
|
+
const loaderConfig = {
|
|
18
|
+
profile: config?.profile,
|
|
19
|
+
logger: clientSharedValues.logger,
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
...clientSharedValues,
|
|
23
|
+
...config,
|
|
24
|
+
runtime: "node",
|
|
25
|
+
defaultsMode,
|
|
26
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
27
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
28
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
29
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
30
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
31
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
32
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
33
|
+
retryMode: config?.retryMode ??
|
|
34
|
+
loadNodeConfig({
|
|
35
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
36
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
37
|
+
}, config),
|
|
38
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
39
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
40
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
41
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
2
|
+
export const getRuntimeConfig = (config) => {
|
|
3
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
4
|
+
return {
|
|
5
|
+
...browserDefaults,
|
|
6
|
+
...config,
|
|
7
|
+
runtime: "react-native",
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
|
|
2
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
3
|
+
import { Sha256 } from "@smithy/core/checksum";
|
|
4
|
+
import { NoOpLogger } from "@smithy/core/client";
|
|
5
|
+
import { parseUrl } from "@smithy/core/protocols";
|
|
6
|
+
import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
|
|
7
|
+
import { defaultNetworkSecurityManagerHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
8
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
9
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
10
|
+
export const getRuntimeConfig = (config) => {
|
|
11
|
+
return {
|
|
12
|
+
apiVersion: "2025-10-30",
|
|
13
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
14
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
15
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
16
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
17
|
+
extensions: config?.extensions ?? [],
|
|
18
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultNetworkSecurityManagerHttpAuthSchemeProvider,
|
|
19
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
20
|
+
{
|
|
21
|
+
schemeId: "aws.auth#sigv4",
|
|
22
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
23
|
+
signer: new AwsSdkSigV4Signer(),
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
27
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
28
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
29
|
+
defaultNamespace: "com.amazonaws.networksecuritymanager",
|
|
30
|
+
errorTypeRegistries,
|
|
31
|
+
version: "2025-10-30",
|
|
32
|
+
serviceTarget: "PiccoloCustomerAPIService",
|
|
33
|
+
},
|
|
34
|
+
serviceId: config?.serviceId ?? "Network Security Manager",
|
|
35
|
+
sha256: config?.sha256 ?? Sha256,
|
|
36
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
37
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
38
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration } from "@aws-sdk/core/client";
|
|
2
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/core/client";
|
|
3
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/core/protocols";
|
|
4
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
7
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
8
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
9
|
+
};
|