@aws-sdk/client-health 3.39.0 → 3.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +19 -19
  3. package/dist-cjs/endpoints.js +75 -15
  4. package/dist-cjs/runtimeConfig.browser.js +6 -3
  5. package/dist-cjs/runtimeConfig.js +5 -3
  6. package/dist-es/endpoints.js +75 -15
  7. package/dist-es/runtimeConfig.browser.js +3 -2
  8. package/dist-es/runtimeConfig.js +3 -3
  9. package/dist-types/Health.d.ts +71 -76
  10. package/dist-types/HealthClient.d.ts +27 -19
  11. package/dist-types/commands/DescribeAffectedAccountsForOrganizationCommand.d.ts +5 -5
  12. package/dist-types/commands/DescribeAffectedEntitiesCommand.d.ts +5 -6
  13. package/dist-types/commands/DescribeAffectedEntitiesForOrganizationCommand.d.ts +8 -10
  14. package/dist-types/commands/DescribeEntityAggregatesCommand.d.ts +2 -3
  15. package/dist-types/commands/DescribeEventAggregatesCommand.d.ts +1 -1
  16. package/dist-types/commands/DescribeEventDetailsCommand.d.ts +4 -4
  17. package/dist-types/commands/DescribeEventDetailsForOrganizationCommand.d.ts +11 -11
  18. package/dist-types/commands/DescribeEventTypesCommand.d.ts +2 -2
  19. package/dist-types/commands/DescribeEventsCommand.d.ts +3 -3
  20. package/dist-types/commands/DescribeEventsForOrganizationCommand.d.ts +5 -5
  21. package/dist-types/commands/DescribeHealthServiceStatusForOrganizationCommand.d.ts +2 -2
  22. package/dist-types/commands/DisableHealthServiceAccessForOrganizationCommand.d.ts +9 -10
  23. package/dist-types/commands/EnableHealthServiceAccessForOrganizationCommand.d.ts +8 -8
  24. package/dist-types/models/models_0.d.ts +67 -61
  25. package/dist-types/runtimeConfig.browser.d.ts +2 -0
  26. package/dist-types/runtimeConfig.d.ts +2 -0
  27. package/dist-types/runtimeConfig.native.d.ts +2 -0
  28. package/dist-types/ts3.4/HealthClient.d.ts +4 -0
  29. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  30. package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  31. package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  32. package/package.json +23 -23
package/CHANGELOG.md CHANGED
@@ -3,6 +3,44 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.43.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.42.0...v3.43.0) (2021-11-29)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-health
9
+
10
+
11
+
12
+
13
+
14
+ # [3.42.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.41.0...v3.42.0) (2021-11-19)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-health
17
+
18
+
19
+
20
+
21
+
22
+ # [3.41.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.40.1...v3.41.0) (2021-11-11)
23
+
24
+
25
+ ### Features
26
+
27
+ * **clients:** update clients as of 2021/11/11 ([#3015](https://github.com/aws/aws-sdk-js-v3/issues/3015)) ([3d82c4e](https://github.com/aws/aws-sdk-js-v3/commit/3d82c4e3c4d174533f46ce35495cf5cffabdb35a))
28
+
29
+
30
+
31
+
32
+
33
+ # [3.40.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.39.0...v3.40.0) (2021-11-05)
34
+
35
+
36
+ ### Features
37
+
38
+ * **clients:** populate variants in endpoints hashes ([#2974](https://github.com/aws/aws-sdk-js-v3/issues/2974)) ([0dd68ef](https://github.com/aws/aws-sdk-js-v3/commit/0dd68ef8b04ea0e96e43b05a9a10221e433fdf86))
39
+
40
+
41
+
42
+
43
+
6
44
  # [3.39.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.38.0...v3.39.0) (2021-10-29)
7
45
 
8
46
  **Note:** Version bump only for package @aws-sdk/client-health
package/README.md CHANGED
@@ -7,46 +7,46 @@
7
7
 
8
8
  AWS SDK for JavaScript Health Client for Node.js, Browser and React Native.
9
9
 
10
- <fullname>AWS Health</fullname>
10
+ <fullname>Health</fullname>
11
11
 
12
- <p>The AWS Health API provides programmatic access to the AWS Health information that
13
- appears in the <a href="https://phd.aws.amazon.com/phd/home#/">AWS Personal Health Dashboard</a>. You
14
- can use the API operations to get information about AWS Health events that affect your
15
- AWS services and resources.</p>
12
+ <p>The Health API provides programmatic access to the Health information that
13
+ appears in the <a href="https://phd.aws.amazon.com/phd/home#/">Personal Health Dashboard</a>. You
14
+ can use the API operations to get information about events that might affect your Amazon Web Services
15
+ services and resources.</p>
16
16
  <note>
17
17
  <ul>
18
18
  <li>
19
- <p>You must have a Business or Enterprise Support plan from <a href="http://aws.amazon.com/premiumsupport/">AWS Support</a> to use the
20
- AWS Health API. If you call the AWS Health API from an AWS account that
19
+ <p>You must have a Business or Enterprise Support plan from <a href="http://aws.amazon.com/premiumsupport/">Amazon Web Services Support</a> to use the
20
+ Health API. If you call the Health API from an Amazon Web Services account that
21
21
  doesn't have a Business or Enterprise Support plan, you receive a
22
22
  <code>SubscriptionRequiredException</code> error.</p>
23
23
  </li>
24
24
  <li>
25
- <p>You can use the AWS Health endpoint health.us-east-1.amazonaws.com (HTTPS) to
26
- call the AWS Health API operations. AWS Health supports a multi-Region
25
+ <p>You can use the Health endpoint health.us-east-1.amazonaws.com (HTTPS) to
26
+ call the Health API operations. Health supports a multi-Region
27
27
  application architecture and has two regional endpoints in an active-passive
28
28
  configuration. You can use the high availability endpoint example to determine
29
- which AWS Region is active, so that you can get the latest information from the
30
- API. For more information, see <a href="https://docs.aws.amazon.com/health/latest/ug/health-api.html">Accessing the AWS Health API</a> in the
31
- <i>AWS Health User Guide</i>.</p>
29
+ which Amazon Web Services Region is active, so that you can get the latest information from the
30
+ API. For more information, see <a href="https://docs.aws.amazon.com/health/latest/ug/health-api.html">Accessing the Health API</a> in the
31
+ <i>Health User Guide</i>.</p>
32
32
  </li>
33
33
  </ul>
34
34
  </note>
35
- <p>For authentication of requests, AWS Health uses the <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version 4 Signing
35
+ <p>For authentication of requests, Health uses the <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version 4 Signing
36
36
  Process</a>.</p>
37
- <p>If your AWS account is part of AWS Organizations, you can use the AWS Health organizational
38
- view feature. This feature provides a centralized view of AWS Health events across all
39
- accounts in your organization. You can aggregate AWS Health events in real time to
37
+ <p>If your Amazon Web Services account is part of Organizations, you can use the Health organizational
38
+ view feature. This feature provides a centralized view of Health events across all
39
+ accounts in your organization. You can aggregate Health events in real time to
40
40
  identify accounts in your organization that are affected by an operational event or get
41
41
  notified of security vulnerabilities. Use the organizational view API operations to enable
42
42
  this feature and return event information. For more information, see <a href="https://docs.aws.amazon.com/health/latest/ug/aggregate-events.html">Aggregating
43
- AWS Health events</a> in the <i>AWS Health User Guide</i>.</p>
43
+ Health events</a> in the <i>Health User Guide</i>.</p>
44
44
  <note>
45
- <p>When you use the AWS Health API operations to return AWS Health events, see the
45
+ <p>When you use the Health API operations to return Health events, see the
46
46
  following recommendations:</p>
47
47
  <ul>
48
48
  <li>
49
- <p>Use the <a href="https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html#AWSHealth-Type-Event-eventScopeCode">eventScopeCode</a> parameter to specify whether to return AWS Health
49
+ <p>Use the <a href="https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html#AWSHealth-Type-Event-eventScopeCode">eventScopeCode</a> parameter to specify whether to return Health
50
50
  events that are public or account-specific.</p>
51
51
  </li>
52
52
  <li>
@@ -2,16 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultRegionInfoProvider = void 0;
4
4
  const config_resolver_1 = require("@aws-sdk/config-resolver");
5
- const regionHash = {
6
- "fips-us-east-2": {
7
- hostname: "health-fips.us-east-2.amazonaws.com",
8
- signingRegion: "us-east-2",
9
- },
10
- "fips-us-gov-west-1": {
11
- hostname: "health-fips.us-gov-west-1.amazonaws.com",
12
- signingRegion: "us-gov-west-1",
13
- },
14
- };
5
+ const regionHash = {};
15
6
  const partitionHash = {
16
7
  aws: {
17
8
  regions: [
@@ -39,27 +30,96 @@ const partitionHash = {
39
30
  "us-west-2",
40
31
  ],
41
32
  regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
42
- hostname: "health.{region}.amazonaws.com",
33
+ variants: [
34
+ {
35
+ hostname: "health.{region}.amazonaws.com",
36
+ tags: [],
37
+ },
38
+ {
39
+ hostname: "health-fips.{region}.amazonaws.com",
40
+ tags: ["fips"],
41
+ },
42
+ {
43
+ hostname: "health-fips.{region}.api.aws",
44
+ tags: ["dualstack", "fips"],
45
+ },
46
+ {
47
+ hostname: "health.{region}.api.aws",
48
+ tags: ["dualstack"],
49
+ },
50
+ ],
43
51
  },
44
52
  "aws-cn": {
45
53
  regions: ["cn-north-1", "cn-northwest-1"],
46
54
  regionRegex: "^cn\\-\\w+\\-\\d+$",
47
- hostname: "health.{region}.amazonaws.com.cn",
55
+ variants: [
56
+ {
57
+ hostname: "health.{region}.amazonaws.com.cn",
58
+ tags: [],
59
+ },
60
+ {
61
+ hostname: "health-fips.{region}.amazonaws.com.cn",
62
+ tags: ["fips"],
63
+ },
64
+ {
65
+ hostname: "health-fips.{region}.api.amazonwebservices.com.cn",
66
+ tags: ["dualstack", "fips"],
67
+ },
68
+ {
69
+ hostname: "health.{region}.api.amazonwebservices.com.cn",
70
+ tags: ["dualstack"],
71
+ },
72
+ ],
48
73
  },
49
74
  "aws-iso": {
50
75
  regions: ["us-iso-east-1", "us-iso-west-1"],
51
76
  regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
52
- hostname: "health.{region}.c2s.ic.gov",
77
+ variants: [
78
+ {
79
+ hostname: "health.{region}.c2s.ic.gov",
80
+ tags: [],
81
+ },
82
+ {
83
+ hostname: "health-fips.{region}.c2s.ic.gov",
84
+ tags: ["fips"],
85
+ },
86
+ ],
53
87
  },
54
88
  "aws-iso-b": {
55
89
  regions: ["us-isob-east-1"],
56
90
  regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
57
- hostname: "health.{region}.sc2s.sgov.gov",
91
+ variants: [
92
+ {
93
+ hostname: "health.{region}.sc2s.sgov.gov",
94
+ tags: [],
95
+ },
96
+ {
97
+ hostname: "health-fips.{region}.sc2s.sgov.gov",
98
+ tags: ["fips"],
99
+ },
100
+ ],
58
101
  },
59
102
  "aws-us-gov": {
60
103
  regions: ["fips-us-gov-west-1", "us-gov-east-1", "us-gov-west-1"],
61
104
  regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
62
- hostname: "health.{region}.amazonaws.com",
105
+ variants: [
106
+ {
107
+ hostname: "health.{region}.amazonaws.com",
108
+ tags: [],
109
+ },
110
+ {
111
+ hostname: "health-fips.{region}.amazonaws.com",
112
+ tags: ["fips"],
113
+ },
114
+ {
115
+ hostname: "health-fips.{region}.api.aws",
116
+ tags: ["dualstack", "fips"],
117
+ },
118
+ {
119
+ hostname: "health.{region}.api.aws",
120
+ tags: ["dualstack"],
121
+ },
122
+ ],
63
123
  },
64
124
  };
65
125
  const defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, {
@@ -4,6 +4,7 @@ exports.getRuntimeConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
6
  const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const config_resolver_1 = require("@aws-sdk/config-resolver");
7
8
  const fetch_http_handler_1 = require("@aws-sdk/fetch-http-handler");
8
9
  const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
9
10
  const middleware_retry_1 = require("@aws-sdk/middleware-retry");
@@ -13,7 +14,7 @@ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
13
14
  const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
14
15
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
15
16
  const getRuntimeConfig = (config) => {
16
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
17
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
18
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
18
19
  return {
19
20
  ...clientSharedValues,
@@ -30,8 +31,10 @@ const getRuntimeConfig = (config) => {
30
31
  retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (() => Promise.resolve(middleware_retry_1.DEFAULT_RETRY_MODE)),
31
32
  sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
32
33
  streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
33
- utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : util_utf8_browser_1.fromUtf8,
34
- utf8Encoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _o !== void 0 ? _o : util_utf8_browser_1.toUtf8,
34
+ useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
35
+ useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
36
+ utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_browser_1.fromUtf8,
37
+ utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_browser_1.toUtf8,
35
38
  };
36
39
  };
37
40
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -17,7 +17,7 @@ const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
17
17
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
18
18
  const smithy_client_1 = require("@aws-sdk/smithy-client");
19
19
  const getRuntimeConfig = (config) => {
20
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
20
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
21
21
  smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
22
22
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
23
23
  return {
@@ -35,8 +35,10 @@ const getRuntimeConfig = (config) => {
35
35
  retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
36
36
  sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
37
37
  streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
38
- utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : util_utf8_node_1.fromUtf8,
39
- utf8Encoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _o !== void 0 ? _o : util_utf8_node_1.toUtf8,
38
+ useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
39
+ useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
40
+ utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8,
41
+ utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8,
40
42
  };
41
43
  };
42
44
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,15 +1,6 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
- var regionHash = {
4
- "fips-us-east-2": {
5
- hostname: "health-fips.us-east-2.amazonaws.com",
6
- signingRegion: "us-east-2",
7
- },
8
- "fips-us-gov-west-1": {
9
- hostname: "health-fips.us-gov-west-1.amazonaws.com",
10
- signingRegion: "us-gov-west-1",
11
- },
12
- };
3
+ var regionHash = {};
13
4
  var partitionHash = {
14
5
  aws: {
15
6
  regions: [
@@ -37,27 +28,96 @@ var partitionHash = {
37
28
  "us-west-2",
38
29
  ],
39
30
  regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
40
- hostname: "health.{region}.amazonaws.com",
31
+ variants: [
32
+ {
33
+ hostname: "health.{region}.amazonaws.com",
34
+ tags: [],
35
+ },
36
+ {
37
+ hostname: "health-fips.{region}.amazonaws.com",
38
+ tags: ["fips"],
39
+ },
40
+ {
41
+ hostname: "health-fips.{region}.api.aws",
42
+ tags: ["dualstack", "fips"],
43
+ },
44
+ {
45
+ hostname: "health.{region}.api.aws",
46
+ tags: ["dualstack"],
47
+ },
48
+ ],
41
49
  },
42
50
  "aws-cn": {
43
51
  regions: ["cn-north-1", "cn-northwest-1"],
44
52
  regionRegex: "^cn\\-\\w+\\-\\d+$",
45
- hostname: "health.{region}.amazonaws.com.cn",
53
+ variants: [
54
+ {
55
+ hostname: "health.{region}.amazonaws.com.cn",
56
+ tags: [],
57
+ },
58
+ {
59
+ hostname: "health-fips.{region}.amazonaws.com.cn",
60
+ tags: ["fips"],
61
+ },
62
+ {
63
+ hostname: "health-fips.{region}.api.amazonwebservices.com.cn",
64
+ tags: ["dualstack", "fips"],
65
+ },
66
+ {
67
+ hostname: "health.{region}.api.amazonwebservices.com.cn",
68
+ tags: ["dualstack"],
69
+ },
70
+ ],
46
71
  },
47
72
  "aws-iso": {
48
73
  regions: ["us-iso-east-1", "us-iso-west-1"],
49
74
  regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
50
- hostname: "health.{region}.c2s.ic.gov",
75
+ variants: [
76
+ {
77
+ hostname: "health.{region}.c2s.ic.gov",
78
+ tags: [],
79
+ },
80
+ {
81
+ hostname: "health-fips.{region}.c2s.ic.gov",
82
+ tags: ["fips"],
83
+ },
84
+ ],
51
85
  },
52
86
  "aws-iso-b": {
53
87
  regions: ["us-isob-east-1"],
54
88
  regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
55
- hostname: "health.{region}.sc2s.sgov.gov",
89
+ variants: [
90
+ {
91
+ hostname: "health.{region}.sc2s.sgov.gov",
92
+ tags: [],
93
+ },
94
+ {
95
+ hostname: "health-fips.{region}.sc2s.sgov.gov",
96
+ tags: ["fips"],
97
+ },
98
+ ],
56
99
  },
57
100
  "aws-us-gov": {
58
101
  regions: ["fips-us-gov-west-1", "us-gov-east-1", "us-gov-west-1"],
59
102
  regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
60
- hostname: "health.{region}.amazonaws.com",
103
+ variants: [
104
+ {
105
+ hostname: "health.{region}.amazonaws.com",
106
+ tags: [],
107
+ },
108
+ {
109
+ hostname: "health-fips.{region}.amazonaws.com",
110
+ tags: ["fips"],
111
+ },
112
+ {
113
+ hostname: "health-fips.{region}.api.aws",
114
+ tags: ["dualstack", "fips"],
115
+ },
116
+ {
117
+ hostname: "health.{region}.api.aws",
118
+ tags: ["dualstack"],
119
+ },
120
+ ],
61
121
  },
62
122
  };
63
123
  export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
@@ -1,6 +1,7 @@
1
1
  import { __assign } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
4
5
  import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
6
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
@@ -10,7 +11,7 @@ import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
10
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
11
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
12
13
  export var getRuntimeConfig = function (config) {
13
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
14
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
14
15
  var clientSharedValues = getSharedRuntimeConfig(config);
15
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : fromUtf8, utf8Encoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _o !== void 0 ? _o : toUtf8 });
16
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
16
17
  };
@@ -1,7 +1,7 @@
1
1
  import { __assign } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
- import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
4
+ import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
5
5
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
6
6
  import { Hash } from "@aws-sdk/hash-node";
7
7
  import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
@@ -14,8 +14,8 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
14
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
15
  import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
16
16
  export var getRuntimeConfig = function (config) {
17
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
17
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
18
  emitWarningIfUnsupportedVersion(process.version);
19
19
  var clientSharedValues = getSharedRuntimeConfig(config);
20
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, utf8Decoder: (_m = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _m !== void 0 ? _m : fromUtf8, utf8Encoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _o !== void 0 ? _o : toUtf8 });
20
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
21
21
  };