@aws-sdk/client-organizations 3.526.0 → 3.529.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.
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
4
  const C = "required", D = "fn", E = "argv", F = "ref", G = "authSchemes", H = "signingName", I = "signingRegion";
5
5
  const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = "sigv4", j = "organizations", k = { [C]: false, "type": "String" }, l = { [C]: true, "default": false, "type": "Boolean" }, m = { [F]: "Endpoint" }, n = { [D]: c, [E]: [{ [F]: "UseFIPS" }, true] }, o = { [D]: c, [E]: [{ [F]: "UseDualStack" }, true] }, p = {}, q = { [D]: h, [E]: [{ [D]: "getAttr", [E]: [{ [F]: g }, "name"] }, "aws"] }, r = { [D]: "getAttr", [E]: [{ [F]: g }, "name"] }, s = { [D]: c, [E]: [{ [F]: "UseFIPS" }, false] }, t = { [D]: c, [E]: [{ [F]: "UseDualStack" }, false] }, u = { [G]: [{ "name": i, [H]: j, [I]: "us-east-1" }] }, v = { [D]: h, [E]: [r, "aws-us-gov"] }, w = { "url": "https://organizations.us-gov-west-1.amazonaws.com", "properties": { [G]: [{ "name": i, [H]: j, [I]: "us-gov-west-1" }] }, "headers": {} }, x = { [D]: "getAttr", [E]: [{ [F]: g }, "supportsFIPS"] }, y = { [D]: c, [E]: [true, { [D]: "getAttr", [E]: [{ [F]: g }, "supportsDualStack"] }] }, z = [n], A = [o], B = [{ [F]: "Region" }];
6
- const _data = { version: "1.0", parameters: { Region: k, UseDualStack: l, UseFIPS: l, Endpoint: k }, rules: [{ conditions: [{ [D]: b, [E]: [m] }], rules: [{ conditions: z, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: A, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: m, properties: p, headers: p }, type: e }], type: f }, { conditions: [{ [D]: b, [E]: B }], rules: [{ conditions: [{ [D]: "aws.partition", [E]: B, assign: g }], rules: [{ conditions: [q, s, t], endpoint: { url: "https://organizations.us-east-1.amazonaws.com", properties: u, headers: p }, type: e }, { conditions: [q, n, t], endpoint: { url: "https://organizations-fips.us-east-1.amazonaws.com", properties: u, headers: p }, type: e }, { conditions: [{ [D]: h, [E]: [r, "aws-cn"] }, s, t], endpoint: { url: "https://organizations.cn-northwest-1.amazonaws.com.cn", properties: { [G]: [{ name: i, [H]: j, [I]: "cn-northwest-1" }] }, headers: p }, type: e }, { conditions: [v, s, t], endpoint: w, type: e }, { conditions: [v, n, t], endpoint: w, type: e }, { conditions: [n, o], rules: [{ conditions: [{ [D]: c, [E]: [a, x] }, y], rules: [{ endpoint: { url: "https://organizations-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: z, rules: [{ conditions: [{ [D]: c, [E]: [x, a] }], rules: [{ endpoint: { url: "https://organizations-fips.{Region}.{PartitionResult#dnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: A, rules: [{ conditions: [y], rules: [{ endpoint: { url: "https://organizations.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://organizations.{Region}.{PartitionResult#dnsSuffix}", properties: p, headers: p }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
6
+ const _data = { version: "1.0", parameters: { Region: k, UseDualStack: l, UseFIPS: l, Endpoint: k }, rules: [{ conditions: [{ [D]: b, [E]: [m] }], rules: [{ conditions: z, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: A, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: m, properties: p, headers: p }, type: e }], type: f }, { conditions: [{ [D]: b, [E]: B }], rules: [{ conditions: [{ [D]: "aws.partition", [E]: B, assign: g }], rules: [{ conditions: [q, s, t], endpoint: { url: "https://organizations.us-east-1.amazonaws.com", properties: u, headers: p }, type: e }, { conditions: [q, n, t], endpoint: { url: "https://organizations-fips.us-east-1.amazonaws.com", properties: u, headers: p }, type: e }, { conditions: [{ [D]: h, [E]: [r, "aws-cn"] }, s, t], endpoint: { url: "https://organizations.cn-northwest-1.amazonaws.com.cn", properties: { [G]: [{ name: i, [H]: j, [I]: "cn-northwest-1" }] }, headers: p }, type: e }, { conditions: [v, s, t], endpoint: w, type: e }, { conditions: [v, n, t], endpoint: w, type: e }, { conditions: [{ [D]: h, [E]: [r, "aws-iso"] }, s, t], endpoint: { url: "https://organizations.us-iso-east-1.c2s.ic.gov", properties: { [G]: [{ name: i, [H]: j, [I]: "us-iso-east-1" }] }, headers: p }, type: e }, { conditions: [n, o], rules: [{ conditions: [{ [D]: c, [E]: [a, x] }, y], rules: [{ endpoint: { url: "https://organizations-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: z, rules: [{ conditions: [{ [D]: c, [E]: [x, a] }], rules: [{ endpoint: { url: "https://organizations-fips.{Region}.{PartitionResult#dnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: A, rules: [{ conditions: [y], rules: [{ endpoint: { url: "https://organizations.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://organizations.{Region}.{PartitionResult#dnsSuffix}", properties: p, headers: p }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
7
7
  exports.ruleSet = _data;
package/dist-cjs/index.js CHANGED
@@ -1522,6 +1522,7 @@ var ListHandshakesForOrganizationResponseFilterSensitiveLog = /* @__PURE__ */ __
1522
1522
  }), "ListHandshakesForOrganizationResponseFilterSensitiveLog");
1523
1523
 
1524
1524
  // src/protocols/Aws_json1_1.ts
1525
+ var import_core2 = require("@aws-sdk/core");
1525
1526
 
1526
1527
 
1527
1528
  var se_AcceptHandshakeCommand = /* @__PURE__ */ __name(async (input, context) => {
@@ -1853,7 +1854,7 @@ var de_AcceptHandshakeCommand = /* @__PURE__ */ __name(async (output, context) =
1853
1854
  if (output.statusCode >= 300) {
1854
1855
  return de_CommandError(output, context);
1855
1856
  }
1856
- const data = await parseBody(output.body, context);
1857
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
1857
1858
  let contents = {};
1858
1859
  contents = de_AcceptHandshakeResponse(data, context);
1859
1860
  const response = {
@@ -1876,7 +1877,7 @@ var de_CancelHandshakeCommand = /* @__PURE__ */ __name(async (output, context) =
1876
1877
  if (output.statusCode >= 300) {
1877
1878
  return de_CommandError(output, context);
1878
1879
  }
1879
- const data = await parseBody(output.body, context);
1880
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
1880
1881
  let contents = {};
1881
1882
  contents = de_CancelHandshakeResponse(data, context);
1882
1883
  const response = {
@@ -1899,7 +1900,7 @@ var de_CreateAccountCommand = /* @__PURE__ */ __name(async (output, context) =>
1899
1900
  if (output.statusCode >= 300) {
1900
1901
  return de_CommandError(output, context);
1901
1902
  }
1902
- const data = await parseBody(output.body, context);
1903
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
1903
1904
  let contents = {};
1904
1905
  contents = de_CreateAccountResponse(data, context);
1905
1906
  const response = {
@@ -1912,7 +1913,7 @@ var de_CreateGovCloudAccountCommand = /* @__PURE__ */ __name(async (output, cont
1912
1913
  if (output.statusCode >= 300) {
1913
1914
  return de_CommandError(output, context);
1914
1915
  }
1915
- const data = await parseBody(output.body, context);
1916
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
1916
1917
  let contents = {};
1917
1918
  contents = de_CreateGovCloudAccountResponse(data, context);
1918
1919
  const response = {
@@ -1925,7 +1926,7 @@ var de_CreateOrganizationCommand = /* @__PURE__ */ __name(async (output, context
1925
1926
  if (output.statusCode >= 300) {
1926
1927
  return de_CommandError(output, context);
1927
1928
  }
1928
- const data = await parseBody(output.body, context);
1929
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
1929
1930
  let contents = {};
1930
1931
  contents = (0, import_smithy_client._json)(data);
1931
1932
  const response = {
@@ -1938,7 +1939,7 @@ var de_CreateOrganizationalUnitCommand = /* @__PURE__ */ __name(async (output, c
1938
1939
  if (output.statusCode >= 300) {
1939
1940
  return de_CommandError(output, context);
1940
1941
  }
1941
- const data = await parseBody(output.body, context);
1942
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
1942
1943
  let contents = {};
1943
1944
  contents = (0, import_smithy_client._json)(data);
1944
1945
  const response = {
@@ -1951,7 +1952,7 @@ var de_CreatePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
1951
1952
  if (output.statusCode >= 300) {
1952
1953
  return de_CommandError(output, context);
1953
1954
  }
1954
- const data = await parseBody(output.body, context);
1955
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
1955
1956
  let contents = {};
1956
1957
  contents = (0, import_smithy_client._json)(data);
1957
1958
  const response = {
@@ -1964,7 +1965,7 @@ var de_DeclineHandshakeCommand = /* @__PURE__ */ __name(async (output, context)
1964
1965
  if (output.statusCode >= 300) {
1965
1966
  return de_CommandError(output, context);
1966
1967
  }
1967
- const data = await parseBody(output.body, context);
1968
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
1968
1969
  let contents = {};
1969
1970
  contents = de_DeclineHandshakeResponse(data, context);
1970
1971
  const response = {
@@ -2027,7 +2028,7 @@ var de_DescribeAccountCommand = /* @__PURE__ */ __name(async (output, context) =
2027
2028
  if (output.statusCode >= 300) {
2028
2029
  return de_CommandError(output, context);
2029
2030
  }
2030
- const data = await parseBody(output.body, context);
2031
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2031
2032
  let contents = {};
2032
2033
  contents = de_DescribeAccountResponse(data, context);
2033
2034
  const response = {
@@ -2040,7 +2041,7 @@ var de_DescribeCreateAccountStatusCommand = /* @__PURE__ */ __name(async (output
2040
2041
  if (output.statusCode >= 300) {
2041
2042
  return de_CommandError(output, context);
2042
2043
  }
2043
- const data = await parseBody(output.body, context);
2044
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2044
2045
  let contents = {};
2045
2046
  contents = de_DescribeCreateAccountStatusResponse(data, context);
2046
2047
  const response = {
@@ -2053,7 +2054,7 @@ var de_DescribeEffectivePolicyCommand = /* @__PURE__ */ __name(async (output, co
2053
2054
  if (output.statusCode >= 300) {
2054
2055
  return de_CommandError(output, context);
2055
2056
  }
2056
- const data = await parseBody(output.body, context);
2057
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2057
2058
  let contents = {};
2058
2059
  contents = de_DescribeEffectivePolicyResponse(data, context);
2059
2060
  const response = {
@@ -2066,7 +2067,7 @@ var de_DescribeHandshakeCommand = /* @__PURE__ */ __name(async (output, context)
2066
2067
  if (output.statusCode >= 300) {
2067
2068
  return de_CommandError(output, context);
2068
2069
  }
2069
- const data = await parseBody(output.body, context);
2070
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2070
2071
  let contents = {};
2071
2072
  contents = de_DescribeHandshakeResponse(data, context);
2072
2073
  const response = {
@@ -2079,7 +2080,7 @@ var de_DescribeOrganizationCommand = /* @__PURE__ */ __name(async (output, conte
2079
2080
  if (output.statusCode >= 300) {
2080
2081
  return de_CommandError(output, context);
2081
2082
  }
2082
- const data = await parseBody(output.body, context);
2083
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2083
2084
  let contents = {};
2084
2085
  contents = (0, import_smithy_client._json)(data);
2085
2086
  const response = {
@@ -2092,7 +2093,7 @@ var de_DescribeOrganizationalUnitCommand = /* @__PURE__ */ __name(async (output,
2092
2093
  if (output.statusCode >= 300) {
2093
2094
  return de_CommandError(output, context);
2094
2095
  }
2095
- const data = await parseBody(output.body, context);
2096
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2096
2097
  let contents = {};
2097
2098
  contents = (0, import_smithy_client._json)(data);
2098
2099
  const response = {
@@ -2105,7 +2106,7 @@ var de_DescribePolicyCommand = /* @__PURE__ */ __name(async (output, context) =>
2105
2106
  if (output.statusCode >= 300) {
2106
2107
  return de_CommandError(output, context);
2107
2108
  }
2108
- const data = await parseBody(output.body, context);
2109
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2109
2110
  let contents = {};
2110
2111
  contents = (0, import_smithy_client._json)(data);
2111
2112
  const response = {
@@ -2118,7 +2119,7 @@ var de_DescribeResourcePolicyCommand = /* @__PURE__ */ __name(async (output, con
2118
2119
  if (output.statusCode >= 300) {
2119
2120
  return de_CommandError(output, context);
2120
2121
  }
2121
- const data = await parseBody(output.body, context);
2122
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2122
2123
  let contents = {};
2123
2124
  contents = (0, import_smithy_client._json)(data);
2124
2125
  const response = {
@@ -2151,7 +2152,7 @@ var de_DisablePolicyTypeCommand = /* @__PURE__ */ __name(async (output, context)
2151
2152
  if (output.statusCode >= 300) {
2152
2153
  return de_CommandError(output, context);
2153
2154
  }
2154
- const data = await parseBody(output.body, context);
2155
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2155
2156
  let contents = {};
2156
2157
  contents = (0, import_smithy_client._json)(data);
2157
2158
  const response = {
@@ -2164,7 +2165,7 @@ var de_EnableAllFeaturesCommand = /* @__PURE__ */ __name(async (output, context)
2164
2165
  if (output.statusCode >= 300) {
2165
2166
  return de_CommandError(output, context);
2166
2167
  }
2167
- const data = await parseBody(output.body, context);
2168
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2168
2169
  let contents = {};
2169
2170
  contents = de_EnableAllFeaturesResponse(data, context);
2170
2171
  const response = {
@@ -2187,7 +2188,7 @@ var de_EnablePolicyTypeCommand = /* @__PURE__ */ __name(async (output, context)
2187
2188
  if (output.statusCode >= 300) {
2188
2189
  return de_CommandError(output, context);
2189
2190
  }
2190
- const data = await parseBody(output.body, context);
2191
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2191
2192
  let contents = {};
2192
2193
  contents = (0, import_smithy_client._json)(data);
2193
2194
  const response = {
@@ -2200,7 +2201,7 @@ var de_InviteAccountToOrganizationCommand = /* @__PURE__ */ __name(async (output
2200
2201
  if (output.statusCode >= 300) {
2201
2202
  return de_CommandError(output, context);
2202
2203
  }
2203
- const data = await parseBody(output.body, context);
2204
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2204
2205
  let contents = {};
2205
2206
  contents = de_InviteAccountToOrganizationResponse(data, context);
2206
2207
  const response = {
@@ -2223,7 +2224,7 @@ var de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => {
2223
2224
  if (output.statusCode >= 300) {
2224
2225
  return de_CommandError(output, context);
2225
2226
  }
2226
- const data = await parseBody(output.body, context);
2227
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2227
2228
  let contents = {};
2228
2229
  contents = de_ListAccountsResponse(data, context);
2229
2230
  const response = {
@@ -2236,7 +2237,7 @@ var de_ListAccountsForParentCommand = /* @__PURE__ */ __name(async (output, cont
2236
2237
  if (output.statusCode >= 300) {
2237
2238
  return de_CommandError(output, context);
2238
2239
  }
2239
- const data = await parseBody(output.body, context);
2240
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2240
2241
  let contents = {};
2241
2242
  contents = de_ListAccountsForParentResponse(data, context);
2242
2243
  const response = {
@@ -2249,7 +2250,7 @@ var de_ListAWSServiceAccessForOrganizationCommand = /* @__PURE__ */ __name(async
2249
2250
  if (output.statusCode >= 300) {
2250
2251
  return de_CommandError(output, context);
2251
2252
  }
2252
- const data = await parseBody(output.body, context);
2253
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2253
2254
  let contents = {};
2254
2255
  contents = de_ListAWSServiceAccessForOrganizationResponse(data, context);
2255
2256
  const response = {
@@ -2262,7 +2263,7 @@ var de_ListChildrenCommand = /* @__PURE__ */ __name(async (output, context) => {
2262
2263
  if (output.statusCode >= 300) {
2263
2264
  return de_CommandError(output, context);
2264
2265
  }
2265
- const data = await parseBody(output.body, context);
2266
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2266
2267
  let contents = {};
2267
2268
  contents = (0, import_smithy_client._json)(data);
2268
2269
  const response = {
@@ -2275,7 +2276,7 @@ var de_ListCreateAccountStatusCommand = /* @__PURE__ */ __name(async (output, co
2275
2276
  if (output.statusCode >= 300) {
2276
2277
  return de_CommandError(output, context);
2277
2278
  }
2278
- const data = await parseBody(output.body, context);
2279
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2279
2280
  let contents = {};
2280
2281
  contents = de_ListCreateAccountStatusResponse(data, context);
2281
2282
  const response = {
@@ -2288,7 +2289,7 @@ var de_ListDelegatedAdministratorsCommand = /* @__PURE__ */ __name(async (output
2288
2289
  if (output.statusCode >= 300) {
2289
2290
  return de_CommandError(output, context);
2290
2291
  }
2291
- const data = await parseBody(output.body, context);
2292
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2292
2293
  let contents = {};
2293
2294
  contents = de_ListDelegatedAdministratorsResponse(data, context);
2294
2295
  const response = {
@@ -2301,7 +2302,7 @@ var de_ListDelegatedServicesForAccountCommand = /* @__PURE__ */ __name(async (ou
2301
2302
  if (output.statusCode >= 300) {
2302
2303
  return de_CommandError(output, context);
2303
2304
  }
2304
- const data = await parseBody(output.body, context);
2305
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2305
2306
  let contents = {};
2306
2307
  contents = de_ListDelegatedServicesForAccountResponse(data, context);
2307
2308
  const response = {
@@ -2314,7 +2315,7 @@ var de_ListHandshakesForAccountCommand = /* @__PURE__ */ __name(async (output, c
2314
2315
  if (output.statusCode >= 300) {
2315
2316
  return de_CommandError(output, context);
2316
2317
  }
2317
- const data = await parseBody(output.body, context);
2318
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2318
2319
  let contents = {};
2319
2320
  contents = de_ListHandshakesForAccountResponse(data, context);
2320
2321
  const response = {
@@ -2327,7 +2328,7 @@ var de_ListHandshakesForOrganizationCommand = /* @__PURE__ */ __name(async (outp
2327
2328
  if (output.statusCode >= 300) {
2328
2329
  return de_CommandError(output, context);
2329
2330
  }
2330
- const data = await parseBody(output.body, context);
2331
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2331
2332
  let contents = {};
2332
2333
  contents = de_ListHandshakesForOrganizationResponse(data, context);
2333
2334
  const response = {
@@ -2340,7 +2341,7 @@ var de_ListOrganizationalUnitsForParentCommand = /* @__PURE__ */ __name(async (o
2340
2341
  if (output.statusCode >= 300) {
2341
2342
  return de_CommandError(output, context);
2342
2343
  }
2343
- const data = await parseBody(output.body, context);
2344
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2344
2345
  let contents = {};
2345
2346
  contents = (0, import_smithy_client._json)(data);
2346
2347
  const response = {
@@ -2353,7 +2354,7 @@ var de_ListParentsCommand = /* @__PURE__ */ __name(async (output, context) => {
2353
2354
  if (output.statusCode >= 300) {
2354
2355
  return de_CommandError(output, context);
2355
2356
  }
2356
- const data = await parseBody(output.body, context);
2357
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2357
2358
  let contents = {};
2358
2359
  contents = (0, import_smithy_client._json)(data);
2359
2360
  const response = {
@@ -2366,7 +2367,7 @@ var de_ListPoliciesCommand = /* @__PURE__ */ __name(async (output, context) => {
2366
2367
  if (output.statusCode >= 300) {
2367
2368
  return de_CommandError(output, context);
2368
2369
  }
2369
- const data = await parseBody(output.body, context);
2370
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2370
2371
  let contents = {};
2371
2372
  contents = (0, import_smithy_client._json)(data);
2372
2373
  const response = {
@@ -2379,7 +2380,7 @@ var de_ListPoliciesForTargetCommand = /* @__PURE__ */ __name(async (output, cont
2379
2380
  if (output.statusCode >= 300) {
2380
2381
  return de_CommandError(output, context);
2381
2382
  }
2382
- const data = await parseBody(output.body, context);
2383
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2383
2384
  let contents = {};
2384
2385
  contents = (0, import_smithy_client._json)(data);
2385
2386
  const response = {
@@ -2392,7 +2393,7 @@ var de_ListRootsCommand = /* @__PURE__ */ __name(async (output, context) => {
2392
2393
  if (output.statusCode >= 300) {
2393
2394
  return de_CommandError(output, context);
2394
2395
  }
2395
- const data = await parseBody(output.body, context);
2396
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2396
2397
  let contents = {};
2397
2398
  contents = (0, import_smithy_client._json)(data);
2398
2399
  const response = {
@@ -2405,7 +2406,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
2405
2406
  if (output.statusCode >= 300) {
2406
2407
  return de_CommandError(output, context);
2407
2408
  }
2408
- const data = await parseBody(output.body, context);
2409
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2409
2410
  let contents = {};
2410
2411
  contents = (0, import_smithy_client._json)(data);
2411
2412
  const response = {
@@ -2418,7 +2419,7 @@ var de_ListTargetsForPolicyCommand = /* @__PURE__ */ __name(async (output, conte
2418
2419
  if (output.statusCode >= 300) {
2419
2420
  return de_CommandError(output, context);
2420
2421
  }
2421
- const data = await parseBody(output.body, context);
2422
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2422
2423
  let contents = {};
2423
2424
  contents = (0, import_smithy_client._json)(data);
2424
2425
  const response = {
@@ -2441,7 +2442,7 @@ var de_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context)
2441
2442
  if (output.statusCode >= 300) {
2442
2443
  return de_CommandError(output, context);
2443
2444
  }
2444
- const data = await parseBody(output.body, context);
2445
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2445
2446
  let contents = {};
2446
2447
  contents = (0, import_smithy_client._json)(data);
2447
2448
  const response = {
@@ -2494,7 +2495,7 @@ var de_UpdateOrganizationalUnitCommand = /* @__PURE__ */ __name(async (output, c
2494
2495
  if (output.statusCode >= 300) {
2495
2496
  return de_CommandError(output, context);
2496
2497
  }
2497
- const data = await parseBody(output.body, context);
2498
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2498
2499
  let contents = {};
2499
2500
  contents = (0, import_smithy_client._json)(data);
2500
2501
  const response = {
@@ -2507,7 +2508,7 @@ var de_UpdatePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
2507
2508
  if (output.statusCode >= 300) {
2508
2509
  return de_CommandError(output, context);
2509
2510
  }
2510
- const data = await parseBody(output.body, context);
2511
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
2511
2512
  let contents = {};
2512
2513
  contents = (0, import_smithy_client._json)(data);
2513
2514
  const response = {
@@ -2519,9 +2520,9 @@ var de_UpdatePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
2519
2520
  var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
2520
2521
  const parsedOutput = {
2521
2522
  ...output,
2522
- body: await parseErrorBody(output.body, context)
2523
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
2523
2524
  };
2524
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2525
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
2525
2526
  switch (errorCode) {
2526
2527
  case "AWSOrganizationsNotInUseException":
2527
2528
  case "com.amazonaws.organizations#AWSOrganizationsNotInUseException":
@@ -3321,7 +3322,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
3321
3322
  extendedRequestId: output.headers["x-amz-id-2"],
3322
3323
  cfId: output.headers["x-amz-cf-id"]
3323
3324
  }), "deserializeMetadata");
3324
- var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
3325
3325
  var throwDefaultError = (0, import_smithy_client.withBaseException)(OrganizationsServiceException);
3326
3326
  var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
3327
3327
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -3348,46 +3348,6 @@ function sharedHeaders(operation) {
3348
3348
  };
3349
3349
  }
3350
3350
  __name(sharedHeaders, "sharedHeaders");
3351
- var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3352
- if (encoded.length) {
3353
- return JSON.parse(encoded);
3354
- }
3355
- return {};
3356
- }), "parseBody");
3357
- var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
3358
- const value = await parseBody(errorBody, context);
3359
- value.message = value.message ?? value.Message;
3360
- return value;
3361
- }, "parseErrorBody");
3362
- var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
3363
- const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
3364
- const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
3365
- let cleanValue = rawValue;
3366
- if (typeof cleanValue === "number") {
3367
- cleanValue = cleanValue.toString();
3368
- }
3369
- if (cleanValue.indexOf(",") >= 0) {
3370
- cleanValue = cleanValue.split(",")[0];
3371
- }
3372
- if (cleanValue.indexOf(":") >= 0) {
3373
- cleanValue = cleanValue.split(":")[0];
3374
- }
3375
- if (cleanValue.indexOf("#") >= 0) {
3376
- cleanValue = cleanValue.split("#")[1];
3377
- }
3378
- return cleanValue;
3379
- }, "sanitizeErrorCode");
3380
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3381
- if (headerKey !== void 0) {
3382
- return sanitizeErrorCode(output.headers[headerKey]);
3383
- }
3384
- if (data.code !== void 0) {
3385
- return sanitizeErrorCode(data.code);
3386
- }
3387
- if (data["__type"] !== void 0) {
3388
- return sanitizeErrorCode(data["__type"]);
3389
- }
3390
- }, "loadRestJsonErrorCode");
3391
3351
 
3392
3352
  // src/commands/AcceptHandshakeCommand.ts
3393
3353
  var _AcceptHandshakeCommand = class _AcceptHandshakeCommand extends import_smithy_client.Command.classBuilder().ep({
@@ -1,4 +1,4 @@
1
1
  const C = "required", D = "fn", E = "argv", F = "ref", G = "authSchemes", H = "signingName", I = "signingRegion";
2
2
  const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = "sigv4", j = "organizations", k = { [C]: false, "type": "String" }, l = { [C]: true, "default": false, "type": "Boolean" }, m = { [F]: "Endpoint" }, n = { [D]: c, [E]: [{ [F]: "UseFIPS" }, true] }, o = { [D]: c, [E]: [{ [F]: "UseDualStack" }, true] }, p = {}, q = { [D]: h, [E]: [{ [D]: "getAttr", [E]: [{ [F]: g }, "name"] }, "aws"] }, r = { [D]: "getAttr", [E]: [{ [F]: g }, "name"] }, s = { [D]: c, [E]: [{ [F]: "UseFIPS" }, false] }, t = { [D]: c, [E]: [{ [F]: "UseDualStack" }, false] }, u = { [G]: [{ "name": i, [H]: j, [I]: "us-east-1" }] }, v = { [D]: h, [E]: [r, "aws-us-gov"] }, w = { "url": "https://organizations.us-gov-west-1.amazonaws.com", "properties": { [G]: [{ "name": i, [H]: j, [I]: "us-gov-west-1" }] }, "headers": {} }, x = { [D]: "getAttr", [E]: [{ [F]: g }, "supportsFIPS"] }, y = { [D]: c, [E]: [true, { [D]: "getAttr", [E]: [{ [F]: g }, "supportsDualStack"] }] }, z = [n], A = [o], B = [{ [F]: "Region" }];
3
- const _data = { version: "1.0", parameters: { Region: k, UseDualStack: l, UseFIPS: l, Endpoint: k }, rules: [{ conditions: [{ [D]: b, [E]: [m] }], rules: [{ conditions: z, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: A, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: m, properties: p, headers: p }, type: e }], type: f }, { conditions: [{ [D]: b, [E]: B }], rules: [{ conditions: [{ [D]: "aws.partition", [E]: B, assign: g }], rules: [{ conditions: [q, s, t], endpoint: { url: "https://organizations.us-east-1.amazonaws.com", properties: u, headers: p }, type: e }, { conditions: [q, n, t], endpoint: { url: "https://organizations-fips.us-east-1.amazonaws.com", properties: u, headers: p }, type: e }, { conditions: [{ [D]: h, [E]: [r, "aws-cn"] }, s, t], endpoint: { url: "https://organizations.cn-northwest-1.amazonaws.com.cn", properties: { [G]: [{ name: i, [H]: j, [I]: "cn-northwest-1" }] }, headers: p }, type: e }, { conditions: [v, s, t], endpoint: w, type: e }, { conditions: [v, n, t], endpoint: w, type: e }, { conditions: [n, o], rules: [{ conditions: [{ [D]: c, [E]: [a, x] }, y], rules: [{ endpoint: { url: "https://organizations-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: z, rules: [{ conditions: [{ [D]: c, [E]: [x, a] }], rules: [{ endpoint: { url: "https://organizations-fips.{Region}.{PartitionResult#dnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: A, rules: [{ conditions: [y], rules: [{ endpoint: { url: "https://organizations.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://organizations.{Region}.{PartitionResult#dnsSuffix}", properties: p, headers: p }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
3
+ const _data = { version: "1.0", parameters: { Region: k, UseDualStack: l, UseFIPS: l, Endpoint: k }, rules: [{ conditions: [{ [D]: b, [E]: [m] }], rules: [{ conditions: z, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: A, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: m, properties: p, headers: p }, type: e }], type: f }, { conditions: [{ [D]: b, [E]: B }], rules: [{ conditions: [{ [D]: "aws.partition", [E]: B, assign: g }], rules: [{ conditions: [q, s, t], endpoint: { url: "https://organizations.us-east-1.amazonaws.com", properties: u, headers: p }, type: e }, { conditions: [q, n, t], endpoint: { url: "https://organizations-fips.us-east-1.amazonaws.com", properties: u, headers: p }, type: e }, { conditions: [{ [D]: h, [E]: [r, "aws-cn"] }, s, t], endpoint: { url: "https://organizations.cn-northwest-1.amazonaws.com.cn", properties: { [G]: [{ name: i, [H]: j, [I]: "cn-northwest-1" }] }, headers: p }, type: e }, { conditions: [v, s, t], endpoint: w, type: e }, { conditions: [v, n, t], endpoint: w, type: e }, { conditions: [{ [D]: h, [E]: [r, "aws-iso"] }, s, t], endpoint: { url: "https://organizations.us-iso-east-1.c2s.ic.gov", properties: { [G]: [{ name: i, [H]: j, [I]: "us-iso-east-1" }] }, headers: p }, type: e }, { conditions: [n, o], rules: [{ conditions: [{ [D]: c, [E]: [a, x] }, y], rules: [{ endpoint: { url: "https://organizations-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: z, rules: [{ conditions: [{ [D]: c, [E]: [x, a] }], rules: [{ endpoint: { url: "https://organizations-fips.{Region}.{PartitionResult#dnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: A, rules: [{ conditions: [y], rules: [{ endpoint: { url: "https://organizations.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: p, headers: p }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://organizations.{Region}.{PartitionResult#dnsSuffix}", properties: p, headers: p }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
4
4
  export const ruleSet = _data;
@@ -1,3 +1,4 @@
1
+ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
1
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
4
  import { AccessDeniedException, AccessDeniedForDependencyException, AccountAlreadyClosedException, AccountAlreadyRegisteredException, AccountNotFoundException, AccountNotRegisteredException, AccountOwnerNotVerifiedException, AlreadyInOrganizationException, AWSOrganizationsNotInUseException, ChildNotFoundException, ConcurrentModificationException, ConflictException, ConstraintViolationException, CreateAccountStatusNotFoundException, DestinationParentNotFoundException, DuplicateAccountException, DuplicateHandshakeException, DuplicateOrganizationalUnitException, DuplicatePolicyAttachmentException, DuplicatePolicyException, EffectivePolicyNotFoundException, FinalizingOrganizationException, HandshakeAlreadyInStateException, HandshakeConstraintViolationException, HandshakeNotFoundException, InvalidHandshakeTransitionException, InvalidInputException, MalformedPolicyDocumentException, MasterCannotLeaveOrganizationException, OrganizationalUnitNotEmptyException, OrganizationalUnitNotFoundException, OrganizationNotEmptyException, ParentNotFoundException, PolicyChangesInProgressException, PolicyInUseException, PolicyNotAttachedException, PolicyNotFoundException, PolicyTypeAlreadyEnabledException, PolicyTypeNotAvailableForOrganizationException, PolicyTypeNotEnabledException, ResourcePolicyNotFoundException, RootNotFoundException, ServiceException, SourceParentNotFoundException, TargetNotFoundException, TooManyRequestsException, UnsupportedAPIEndpointException, } from "../models/models_0";
@@ -1839,43 +1840,3 @@ function sharedHeaders(operation) {
1839
1840
  "x-amz-target": `AWSOrganizationsV20161128.${operation}`,
1840
1841
  };
1841
1842
  }
1842
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1843
- if (encoded.length) {
1844
- return JSON.parse(encoded);
1845
- }
1846
- return {};
1847
- });
1848
- const parseErrorBody = async (errorBody, context) => {
1849
- const value = await parseBody(errorBody, context);
1850
- value.message = value.message ?? value.Message;
1851
- return value;
1852
- };
1853
- const loadRestJsonErrorCode = (output, data) => {
1854
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1855
- const sanitizeErrorCode = (rawValue) => {
1856
- let cleanValue = rawValue;
1857
- if (typeof cleanValue === "number") {
1858
- cleanValue = cleanValue.toString();
1859
- }
1860
- if (cleanValue.indexOf(",") >= 0) {
1861
- cleanValue = cleanValue.split(",")[0];
1862
- }
1863
- if (cleanValue.indexOf(":") >= 0) {
1864
- cleanValue = cleanValue.split(":")[0];
1865
- }
1866
- if (cleanValue.indexOf("#") >= 0) {
1867
- cleanValue = cleanValue.split("#")[1];
1868
- }
1869
- return cleanValue;
1870
- };
1871
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1872
- if (headerKey !== undefined) {
1873
- return sanitizeErrorCode(output.headers[headerKey]);
1874
- }
1875
- if (data.code !== undefined) {
1876
- return sanitizeErrorCode(data.code);
1877
- }
1878
- if (data["__type"] !== undefined) {
1879
- return sanitizeErrorCode(data["__type"]);
1880
- }
1881
- };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-organizations",
3
3
  "description": "AWS SDK for JavaScript Organizations Client for Node.js, Browser and React Native",
4
- "version": "3.526.0",
4
+ "version": "3.529.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-organizations",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.525.0",
24
- "@aws-sdk/core": "3.525.0",
25
- "@aws-sdk/credential-provider-node": "3.525.0",
23
+ "@aws-sdk/client-sts": "3.529.0",
24
+ "@aws-sdk/core": "3.529.0",
25
+ "@aws-sdk/credential-provider-node": "3.529.0",
26
26
  "@aws-sdk/middleware-host-header": "3.523.0",
27
27
  "@aws-sdk/middleware-logger": "3.523.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.523.0",