@aws-sdk/client-iam 3.39.0 → 3.40.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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.40.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.39.0...v3.40.0) (2021-11-05)
7
+
8
+
9
+ ### Features
10
+
11
+ * **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))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.39.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.38.0...v3.39.0) (2021-10-29)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-iam
@@ -4,31 +4,56 @@ exports.defaultRegionInfoProvider = void 0;
4
4
  const config_resolver_1 = require("@aws-sdk/config-resolver");
5
5
  const regionHash = {
6
6
  "aws-cn-global": {
7
- hostname: "iam.cn-north-1.amazonaws.com.cn",
7
+ variants: [
8
+ {
9
+ hostname: "iam.cn-north-1.amazonaws.com.cn",
10
+ tags: [],
11
+ },
12
+ ],
8
13
  signingRegion: "cn-north-1",
9
14
  },
10
15
  "aws-global": {
11
- hostname: "iam.amazonaws.com",
16
+ variants: [
17
+ {
18
+ hostname: "iam.amazonaws.com",
19
+ tags: [],
20
+ },
21
+ {
22
+ hostname: "iam-fips.amazonaws.com",
23
+ tags: ["fips"],
24
+ },
25
+ ],
12
26
  signingRegion: "us-east-1",
13
27
  },
14
28
  "aws-iso-b-global": {
15
- hostname: "iam.us-isob-east-1.sc2s.sgov.gov",
29
+ variants: [
30
+ {
31
+ hostname: "iam.us-isob-east-1.sc2s.sgov.gov",
32
+ tags: [],
33
+ },
34
+ ],
16
35
  signingRegion: "us-isob-east-1",
17
36
  },
18
37
  "aws-iso-global": {
19
- hostname: "iam.us-iso-east-1.c2s.ic.gov",
38
+ variants: [
39
+ {
40
+ hostname: "iam.us-iso-east-1.c2s.ic.gov",
41
+ tags: [],
42
+ },
43
+ ],
20
44
  signingRegion: "us-iso-east-1",
21
45
  },
22
46
  "aws-us-gov-global": {
23
- hostname: "iam.us-gov.amazonaws.com",
24
- signingRegion: "us-gov-west-1",
25
- },
26
- "iam-fips": {
27
- hostname: "iam-fips.amazonaws.com",
28
- signingRegion: "us-east-1",
29
- },
30
- "iam-govcloud-fips": {
31
- hostname: "iam.us-gov.amazonaws.com",
47
+ variants: [
48
+ {
49
+ hostname: "iam.us-gov.amazonaws.com",
50
+ tags: [],
51
+ },
52
+ {
53
+ hostname: "iam.us-gov.amazonaws.com",
54
+ tags: ["fips"],
55
+ },
56
+ ],
32
57
  signingRegion: "us-gov-west-1",
33
58
  },
34
59
  };
@@ -44,6 +69,7 @@ const partitionHash = {
44
69
  "ap-southeast-1",
45
70
  "ap-southeast-2",
46
71
  "aws-global",
72
+ "aws-global-fips",
47
73
  "ca-central-1",
48
74
  "eu-central-1",
49
75
  "eu-north-1",
@@ -51,6 +77,7 @@ const partitionHash = {
51
77
  "eu-west-1",
52
78
  "eu-west-2",
53
79
  "eu-west-3",
80
+ "iam",
54
81
  "iam-fips",
55
82
  "me-south-1",
56
83
  "sa-east-1",
@@ -60,26 +87,99 @@ const partitionHash = {
60
87
  "us-west-2",
61
88
  ],
62
89
  regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
90
+ variants: [
91
+ {
92
+ hostname: "iam.{region}.amazonaws.com",
93
+ tags: [],
94
+ },
95
+ {
96
+ hostname: "iam-fips.{region}.amazonaws.com",
97
+ tags: ["fips"],
98
+ },
99
+ {
100
+ hostname: "iam-fips.{region}.api.aws",
101
+ tags: ["dualstack", "fips"],
102
+ },
103
+ {
104
+ hostname: "iam.{region}.api.aws",
105
+ tags: ["dualstack"],
106
+ },
107
+ ],
63
108
  endpoint: "aws-global",
64
109
  },
65
110
  "aws-cn": {
66
111
  regions: ["aws-cn-global", "cn-north-1", "cn-northwest-1"],
67
112
  regionRegex: "^cn\\-\\w+\\-\\d+$",
113
+ variants: [
114
+ {
115
+ hostname: "iam.{region}.amazonaws.com.cn",
116
+ tags: [],
117
+ },
118
+ {
119
+ hostname: "iam-fips.{region}.amazonaws.com.cn",
120
+ tags: ["fips"],
121
+ },
122
+ {
123
+ hostname: "iam-fips.{region}.api.amazonwebservices.com.cn",
124
+ tags: ["dualstack", "fips"],
125
+ },
126
+ {
127
+ hostname: "iam.{region}.api.amazonwebservices.com.cn",
128
+ tags: ["dualstack"],
129
+ },
130
+ ],
68
131
  endpoint: "aws-cn-global",
69
132
  },
70
133
  "aws-iso": {
71
134
  regions: ["aws-iso-global", "us-iso-east-1", "us-iso-west-1"],
72
135
  regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
136
+ variants: [
137
+ {
138
+ hostname: "iam.{region}.c2s.ic.gov",
139
+ tags: [],
140
+ },
141
+ ],
73
142
  endpoint: "aws-iso-global",
74
143
  },
75
144
  "aws-iso-b": {
76
145
  regions: ["aws-iso-b-global", "us-isob-east-1"],
77
146
  regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
147
+ variants: [
148
+ {
149
+ hostname: "iam.{region}.sc2s.sgov.gov",
150
+ tags: [],
151
+ },
152
+ ],
78
153
  endpoint: "aws-iso-b-global",
79
154
  },
80
155
  "aws-us-gov": {
81
- regions: ["aws-us-gov-global", "iam-govcloud-fips", "us-gov-east-1", "us-gov-west-1"],
156
+ regions: [
157
+ "aws-us-gov-global",
158
+ "aws-us-gov-global-fips",
159
+ "iam-govcloud",
160
+ "iam-govcloud-fips",
161
+ "us-gov-east-1",
162
+ "us-gov-west-1",
163
+ ],
82
164
  regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
165
+ variants: [
166
+ {
167
+ hostname: "iam.{region}.amazonaws.com",
168
+ tags: [],
169
+ },
170
+ {
171
+ hostname: "iam-fips.{region}.amazonaws.com",
172
+ tags: ["fips"],
173
+ },
174
+ {
175
+ hostname: "iam-fips.{region}.api.aws",
176
+ tags: ["dualstack", "fips"],
177
+ },
178
+ {
179
+ hostname: "iam.{region}.api.aws",
180
+ tags: ["dualstack"],
181
+ },
182
+ ],
83
183
  endpoint: "aws-us-gov-global",
84
184
  },
85
185
  };
@@ -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;
@@ -2,31 +2,56 @@ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
3
  var regionHash = {
4
4
  "aws-cn-global": {
5
- hostname: "iam.cn-north-1.amazonaws.com.cn",
5
+ variants: [
6
+ {
7
+ hostname: "iam.cn-north-1.amazonaws.com.cn",
8
+ tags: [],
9
+ },
10
+ ],
6
11
  signingRegion: "cn-north-1",
7
12
  },
8
13
  "aws-global": {
9
- hostname: "iam.amazonaws.com",
14
+ variants: [
15
+ {
16
+ hostname: "iam.amazonaws.com",
17
+ tags: [],
18
+ },
19
+ {
20
+ hostname: "iam-fips.amazonaws.com",
21
+ tags: ["fips"],
22
+ },
23
+ ],
10
24
  signingRegion: "us-east-1",
11
25
  },
12
26
  "aws-iso-b-global": {
13
- hostname: "iam.us-isob-east-1.sc2s.sgov.gov",
27
+ variants: [
28
+ {
29
+ hostname: "iam.us-isob-east-1.sc2s.sgov.gov",
30
+ tags: [],
31
+ },
32
+ ],
14
33
  signingRegion: "us-isob-east-1",
15
34
  },
16
35
  "aws-iso-global": {
17
- hostname: "iam.us-iso-east-1.c2s.ic.gov",
36
+ variants: [
37
+ {
38
+ hostname: "iam.us-iso-east-1.c2s.ic.gov",
39
+ tags: [],
40
+ },
41
+ ],
18
42
  signingRegion: "us-iso-east-1",
19
43
  },
20
44
  "aws-us-gov-global": {
21
- hostname: "iam.us-gov.amazonaws.com",
22
- signingRegion: "us-gov-west-1",
23
- },
24
- "iam-fips": {
25
- hostname: "iam-fips.amazonaws.com",
26
- signingRegion: "us-east-1",
27
- },
28
- "iam-govcloud-fips": {
29
- hostname: "iam.us-gov.amazonaws.com",
45
+ variants: [
46
+ {
47
+ hostname: "iam.us-gov.amazonaws.com",
48
+ tags: [],
49
+ },
50
+ {
51
+ hostname: "iam.us-gov.amazonaws.com",
52
+ tags: ["fips"],
53
+ },
54
+ ],
30
55
  signingRegion: "us-gov-west-1",
31
56
  },
32
57
  };
@@ -42,6 +67,7 @@ var partitionHash = {
42
67
  "ap-southeast-1",
43
68
  "ap-southeast-2",
44
69
  "aws-global",
70
+ "aws-global-fips",
45
71
  "ca-central-1",
46
72
  "eu-central-1",
47
73
  "eu-north-1",
@@ -49,6 +75,7 @@ var partitionHash = {
49
75
  "eu-west-1",
50
76
  "eu-west-2",
51
77
  "eu-west-3",
78
+ "iam",
52
79
  "iam-fips",
53
80
  "me-south-1",
54
81
  "sa-east-1",
@@ -58,26 +85,99 @@ var partitionHash = {
58
85
  "us-west-2",
59
86
  ],
60
87
  regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
88
+ variants: [
89
+ {
90
+ hostname: "iam.{region}.amazonaws.com",
91
+ tags: [],
92
+ },
93
+ {
94
+ hostname: "iam-fips.{region}.amazonaws.com",
95
+ tags: ["fips"],
96
+ },
97
+ {
98
+ hostname: "iam-fips.{region}.api.aws",
99
+ tags: ["dualstack", "fips"],
100
+ },
101
+ {
102
+ hostname: "iam.{region}.api.aws",
103
+ tags: ["dualstack"],
104
+ },
105
+ ],
61
106
  endpoint: "aws-global",
62
107
  },
63
108
  "aws-cn": {
64
109
  regions: ["aws-cn-global", "cn-north-1", "cn-northwest-1"],
65
110
  regionRegex: "^cn\\-\\w+\\-\\d+$",
111
+ variants: [
112
+ {
113
+ hostname: "iam.{region}.amazonaws.com.cn",
114
+ tags: [],
115
+ },
116
+ {
117
+ hostname: "iam-fips.{region}.amazonaws.com.cn",
118
+ tags: ["fips"],
119
+ },
120
+ {
121
+ hostname: "iam-fips.{region}.api.amazonwebservices.com.cn",
122
+ tags: ["dualstack", "fips"],
123
+ },
124
+ {
125
+ hostname: "iam.{region}.api.amazonwebservices.com.cn",
126
+ tags: ["dualstack"],
127
+ },
128
+ ],
66
129
  endpoint: "aws-cn-global",
67
130
  },
68
131
  "aws-iso": {
69
132
  regions: ["aws-iso-global", "us-iso-east-1", "us-iso-west-1"],
70
133
  regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
134
+ variants: [
135
+ {
136
+ hostname: "iam.{region}.c2s.ic.gov",
137
+ tags: [],
138
+ },
139
+ ],
71
140
  endpoint: "aws-iso-global",
72
141
  },
73
142
  "aws-iso-b": {
74
143
  regions: ["aws-iso-b-global", "us-isob-east-1"],
75
144
  regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
145
+ variants: [
146
+ {
147
+ hostname: "iam.{region}.sc2s.sgov.gov",
148
+ tags: [],
149
+ },
150
+ ],
76
151
  endpoint: "aws-iso-b-global",
77
152
  },
78
153
  "aws-us-gov": {
79
- regions: ["aws-us-gov-global", "iam-govcloud-fips", "us-gov-east-1", "us-gov-west-1"],
154
+ regions: [
155
+ "aws-us-gov-global",
156
+ "aws-us-gov-global-fips",
157
+ "iam-govcloud",
158
+ "iam-govcloud-fips",
159
+ "us-gov-east-1",
160
+ "us-gov-west-1",
161
+ ],
80
162
  regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
163
+ variants: [
164
+ {
165
+ hostname: "iam.{region}.amazonaws.com",
166
+ tags: [],
167
+ },
168
+ {
169
+ hostname: "iam-fips.{region}.amazonaws.com",
170
+ tags: ["fips"],
171
+ },
172
+ {
173
+ hostname: "iam-fips.{region}.api.aws",
174
+ tags: ["dualstack", "fips"],
175
+ },
176
+ {
177
+ hostname: "iam.{region}.api.aws",
178
+ tags: ["dualstack"],
179
+ },
180
+ ],
81
181
  endpoint: "aws-us-gov-global",
82
182
  },
83
183
  };
@@ -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
  };
@@ -234,6 +234,14 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
234
234
  * Optional logger for logging debug/info/warn/error.
235
235
  */
236
236
  logger?: __Logger;
237
+ /**
238
+ * Enables IPv6/IPv4 dualstack endpoint.
239
+ */
240
+ useDualstackEndpoint?: boolean | __Provider<boolean>;
241
+ /**
242
+ * Enables FIPS compatible endpoints.
243
+ */
244
+ useFipsEndpoint?: boolean | __Provider<boolean>;
237
245
  /**
238
246
  * Unique service identifier.
239
247
  * @internal
@@ -16,6 +16,8 @@ export declare const getRuntimeConfig: (config: IAMClientConfig) => {
16
16
  retryMode: string | import("@aws-sdk/types").Provider<string>;
17
17
  sha256: import("@aws-sdk/types").HashConstructor;
18
18
  streamCollector: import("@aws-sdk/types").StreamCollector;
19
+ useDualstackEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
20
+ useFipsEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
19
21
  utf8Decoder: import("@aws-sdk/types").Decoder;
20
22
  utf8Encoder: import("@aws-sdk/types").Encoder;
21
23
  apiVersion: string;
@@ -16,6 +16,8 @@ export declare const getRuntimeConfig: (config: IAMClientConfig) => {
16
16
  retryMode: string | import("@aws-sdk/types").Provider<string>;
17
17
  sha256: import("@aws-sdk/types").HashConstructor;
18
18
  streamCollector: import("@aws-sdk/types").StreamCollector;
19
+ useDualstackEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
20
+ useFipsEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
19
21
  utf8Decoder: import("@aws-sdk/types").Decoder;
20
22
  utf8Encoder: import("@aws-sdk/types").Encoder;
21
23
  apiVersion: string;
@@ -18,6 +18,8 @@ export declare const getRuntimeConfig: (config: IAMClientConfig) => {
18
18
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
19
19
  retryMode: string | import("@aws-sdk/types").Provider<string>;
20
20
  logger: import("@aws-sdk/types").Logger;
21
+ useDualstackEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
22
+ useFipsEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
21
23
  serviceId: string;
22
24
  region: string | import("@aws-sdk/types").Provider<string> | import("@aws-sdk/types").Provider<any>;
23
25
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
@@ -196,6 +196,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
196
196
 
197
197
  logger?: __Logger;
198
198
 
199
+ useDualstackEndpoint?: boolean | __Provider<boolean>;
200
+
201
+ useFipsEndpoint?: boolean | __Provider<boolean>;
202
+
199
203
  serviceId?: string;
200
204
 
201
205
  region?: string | __Provider<string>;
@@ -14,6 +14,8 @@ export declare const getRuntimeConfig: (config: IAMClientConfig) => {
14
14
  retryMode: string | import("@aws-sdk/types").Provider<string>;
15
15
  sha256: import("@aws-sdk/types").HashConstructor;
16
16
  streamCollector: import("@aws-sdk/types").StreamCollector;
17
+ useDualstackEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
18
+ useFipsEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
17
19
  utf8Decoder: import("@aws-sdk/types").Decoder;
18
20
  utf8Encoder: import("@aws-sdk/types").Encoder;
19
21
  apiVersion: string;
@@ -14,6 +14,8 @@ export declare const getRuntimeConfig: (config: IAMClientConfig) => {
14
14
  retryMode: string | import("@aws-sdk/types").Provider<string>;
15
15
  sha256: import("@aws-sdk/types").HashConstructor;
16
16
  streamCollector: import("@aws-sdk/types").StreamCollector;
17
+ useDualstackEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
18
+ useFipsEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
17
19
  utf8Decoder: import("@aws-sdk/types").Decoder;
18
20
  utf8Encoder: import("@aws-sdk/types").Encoder;
19
21
  apiVersion: string;
@@ -16,6 +16,8 @@ export declare const getRuntimeConfig: (config: IAMClientConfig) => {
16
16
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
17
17
  retryMode: string | import("@aws-sdk/types").Provider<string>;
18
18
  logger: import("@aws-sdk/types").Logger;
19
+ useDualstackEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
20
+ useFipsEndpoint: boolean | import("@aws-sdk/types").Provider<boolean>;
19
21
  serviceId: string;
20
22
  region: string | import("@aws-sdk/types").Provider<string> | import("@aws-sdk/types").Provider<any>;
21
23
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-iam",
3
3
  "description": "AWS SDK for JavaScript Iam Client for Node.js, Browser and React Native",
4
- "version": "3.39.0",
4
+ "version": "3.40.0",
5
5
  "scripts": {
6
6
  "build": "yarn build:cjs && yarn build:es && yarn build:types",
7
7
  "build:cjs": "tsc -p tsconfig.json",
@@ -21,35 +21,35 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "2.0.0",
23
23
  "@aws-crypto/sha256-js": "2.0.0",
24
- "@aws-sdk/client-sts": "3.39.0",
25
- "@aws-sdk/config-resolver": "3.39.0",
26
- "@aws-sdk/credential-provider-node": "3.39.0",
27
- "@aws-sdk/fetch-http-handler": "3.38.0",
28
- "@aws-sdk/hash-node": "3.38.0",
29
- "@aws-sdk/invalid-dependency": "3.38.0",
30
- "@aws-sdk/middleware-content-length": "3.38.0",
31
- "@aws-sdk/middleware-host-header": "3.38.0",
32
- "@aws-sdk/middleware-logger": "3.38.0",
33
- "@aws-sdk/middleware-retry": "3.39.0",
34
- "@aws-sdk/middleware-serde": "3.38.0",
35
- "@aws-sdk/middleware-signing": "3.39.0",
36
- "@aws-sdk/middleware-stack": "3.38.0",
37
- "@aws-sdk/middleware-user-agent": "3.38.0",
38
- "@aws-sdk/node-config-provider": "3.39.0",
39
- "@aws-sdk/node-http-handler": "3.38.0",
40
- "@aws-sdk/protocol-http": "3.38.0",
41
- "@aws-sdk/smithy-client": "3.38.0",
42
- "@aws-sdk/types": "3.38.0",
43
- "@aws-sdk/url-parser": "3.38.0",
24
+ "@aws-sdk/client-sts": "3.40.0",
25
+ "@aws-sdk/config-resolver": "3.40.0",
26
+ "@aws-sdk/credential-provider-node": "3.40.0",
27
+ "@aws-sdk/fetch-http-handler": "3.40.0",
28
+ "@aws-sdk/hash-node": "3.40.0",
29
+ "@aws-sdk/invalid-dependency": "3.40.0",
30
+ "@aws-sdk/middleware-content-length": "3.40.0",
31
+ "@aws-sdk/middleware-host-header": "3.40.0",
32
+ "@aws-sdk/middleware-logger": "3.40.0",
33
+ "@aws-sdk/middleware-retry": "3.40.0",
34
+ "@aws-sdk/middleware-serde": "3.40.0",
35
+ "@aws-sdk/middleware-signing": "3.40.0",
36
+ "@aws-sdk/middleware-stack": "3.40.0",
37
+ "@aws-sdk/middleware-user-agent": "3.40.0",
38
+ "@aws-sdk/node-config-provider": "3.40.0",
39
+ "@aws-sdk/node-http-handler": "3.40.0",
40
+ "@aws-sdk/protocol-http": "3.40.0",
41
+ "@aws-sdk/smithy-client": "3.40.0",
42
+ "@aws-sdk/types": "3.40.0",
43
+ "@aws-sdk/url-parser": "3.40.0",
44
44
  "@aws-sdk/util-base64-browser": "3.37.0",
45
45
  "@aws-sdk/util-base64-node": "3.37.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.37.0",
47
47
  "@aws-sdk/util-body-length-node": "3.37.0",
48
- "@aws-sdk/util-user-agent-browser": "3.38.0",
49
- "@aws-sdk/util-user-agent-node": "3.39.0",
48
+ "@aws-sdk/util-user-agent-browser": "3.40.0",
49
+ "@aws-sdk/util-user-agent-node": "3.40.0",
50
50
  "@aws-sdk/util-utf8-browser": "3.37.0",
51
51
  "@aws-sdk/util-utf8-node": "3.37.0",
52
- "@aws-sdk/util-waiter": "3.38.0",
52
+ "@aws-sdk/util-waiter": "3.40.0",
53
53
  "entities": "2.2.0",
54
54
  "fast-xml-parser": "3.19.0",
55
55
  "tslib": "^2.3.0"