@aws-sdk/client-account 3.476.0 → 3.477.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.
@@ -1,147 +1,105 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_PutContactInformationCommand = exports.de_PutAlternateContactCommand = exports.de_ListRegionsCommand = exports.de_GetRegionOptStatusCommand = exports.de_GetContactInformationCommand = exports.de_GetAlternateContactCommand = exports.de_EnableRegionCommand = exports.de_DisableRegionCommand = exports.de_DeleteAlternateContactCommand = exports.se_PutContactInformationCommand = exports.se_PutAlternateContactCommand = exports.se_ListRegionsCommand = exports.se_GetRegionOptStatusCommand = exports.se_GetContactInformationCommand = exports.se_GetAlternateContactCommand = exports.se_EnableRegionCommand = exports.se_DisableRegionCommand = exports.se_DeleteAlternateContactCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const AccountServiceException_1 = require("../models/AccountServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_DeleteAlternateContactCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  "content-type": "application/json",
12
12
  };
13
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteAlternateContact";
13
+ b.bp("/deleteAlternateContact");
14
14
  let body;
15
15
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
16
  AccountId: [],
17
17
  AlternateContactType: [],
18
18
  }));
19
- return new protocol_http_1.HttpRequest({
20
- protocol,
21
- hostname,
22
- port,
23
- method: "POST",
24
- headers,
25
- path: resolvedPath,
26
- body,
27
- });
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
28
21
  };
29
22
  exports.se_DeleteAlternateContactCommand = se_DeleteAlternateContactCommand;
30
23
  const se_DisableRegionCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = (0, core_1.requestBuilder)(input, context);
32
25
  const headers = {
33
26
  "content-type": "application/json",
34
27
  };
35
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disableRegion";
28
+ b.bp("/disableRegion");
36
29
  let body;
37
30
  body = JSON.stringify((0, smithy_client_1.take)(input, {
38
31
  AccountId: [],
39
32
  RegionName: [],
40
33
  }));
41
- return new protocol_http_1.HttpRequest({
42
- protocol,
43
- hostname,
44
- port,
45
- method: "POST",
46
- headers,
47
- path: resolvedPath,
48
- body,
49
- });
34
+ b.m("POST").h(headers).b(body);
35
+ return b.build();
50
36
  };
51
37
  exports.se_DisableRegionCommand = se_DisableRegionCommand;
52
38
  const se_EnableRegionCommand = async (input, context) => {
53
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
+ const b = (0, core_1.requestBuilder)(input, context);
54
40
  const headers = {
55
41
  "content-type": "application/json",
56
42
  };
57
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enableRegion";
43
+ b.bp("/enableRegion");
58
44
  let body;
59
45
  body = JSON.stringify((0, smithy_client_1.take)(input, {
60
46
  AccountId: [],
61
47
  RegionName: [],
62
48
  }));
63
- return new protocol_http_1.HttpRequest({
64
- protocol,
65
- hostname,
66
- port,
67
- method: "POST",
68
- headers,
69
- path: resolvedPath,
70
- body,
71
- });
49
+ b.m("POST").h(headers).b(body);
50
+ return b.build();
72
51
  };
73
52
  exports.se_EnableRegionCommand = se_EnableRegionCommand;
74
53
  const se_GetAlternateContactCommand = async (input, context) => {
75
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
54
+ const b = (0, core_1.requestBuilder)(input, context);
76
55
  const headers = {
77
56
  "content-type": "application/json",
78
57
  };
79
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getAlternateContact";
58
+ b.bp("/getAlternateContact");
80
59
  let body;
81
60
  body = JSON.stringify((0, smithy_client_1.take)(input, {
82
61
  AccountId: [],
83
62
  AlternateContactType: [],
84
63
  }));
85
- return new protocol_http_1.HttpRequest({
86
- protocol,
87
- hostname,
88
- port,
89
- method: "POST",
90
- headers,
91
- path: resolvedPath,
92
- body,
93
- });
64
+ b.m("POST").h(headers).b(body);
65
+ return b.build();
94
66
  };
95
67
  exports.se_GetAlternateContactCommand = se_GetAlternateContactCommand;
96
68
  const se_GetContactInformationCommand = async (input, context) => {
97
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
69
+ const b = (0, core_1.requestBuilder)(input, context);
98
70
  const headers = {
99
71
  "content-type": "application/json",
100
72
  };
101
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getContactInformation";
73
+ b.bp("/getContactInformation");
102
74
  let body;
103
75
  body = JSON.stringify((0, smithy_client_1.take)(input, {
104
76
  AccountId: [],
105
77
  }));
106
- return new protocol_http_1.HttpRequest({
107
- protocol,
108
- hostname,
109
- port,
110
- method: "POST",
111
- headers,
112
- path: resolvedPath,
113
- body,
114
- });
78
+ b.m("POST").h(headers).b(body);
79
+ return b.build();
115
80
  };
116
81
  exports.se_GetContactInformationCommand = se_GetContactInformationCommand;
117
82
  const se_GetRegionOptStatusCommand = async (input, context) => {
118
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
83
+ const b = (0, core_1.requestBuilder)(input, context);
119
84
  const headers = {
120
85
  "content-type": "application/json",
121
86
  };
122
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getRegionOptStatus";
87
+ b.bp("/getRegionOptStatus");
123
88
  let body;
124
89
  body = JSON.stringify((0, smithy_client_1.take)(input, {
125
90
  AccountId: [],
126
91
  RegionName: [],
127
92
  }));
128
- return new protocol_http_1.HttpRequest({
129
- protocol,
130
- hostname,
131
- port,
132
- method: "POST",
133
- headers,
134
- path: resolvedPath,
135
- body,
136
- });
93
+ b.m("POST").h(headers).b(body);
94
+ return b.build();
137
95
  };
138
96
  exports.se_GetRegionOptStatusCommand = se_GetRegionOptStatusCommand;
139
97
  const se_ListRegionsCommand = async (input, context) => {
140
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
98
+ const b = (0, core_1.requestBuilder)(input, context);
141
99
  const headers = {
142
100
  "content-type": "application/json",
143
101
  };
144
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listRegions";
102
+ b.bp("/listRegions");
145
103
  let body;
146
104
  body = JSON.stringify((0, smithy_client_1.take)(input, {
147
105
  AccountId: [],
@@ -149,23 +107,16 @@ const se_ListRegionsCommand = async (input, context) => {
149
107
  NextToken: [],
150
108
  RegionOptStatusContains: (_) => (0, smithy_client_1._json)(_),
151
109
  }));
152
- return new protocol_http_1.HttpRequest({
153
- protocol,
154
- hostname,
155
- port,
156
- method: "POST",
157
- headers,
158
- path: resolvedPath,
159
- body,
160
- });
110
+ b.m("POST").h(headers).b(body);
111
+ return b.build();
161
112
  };
162
113
  exports.se_ListRegionsCommand = se_ListRegionsCommand;
163
114
  const se_PutAlternateContactCommand = async (input, context) => {
164
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
115
+ const b = (0, core_1.requestBuilder)(input, context);
165
116
  const headers = {
166
117
  "content-type": "application/json",
167
118
  };
168
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/putAlternateContact";
119
+ b.bp("/putAlternateContact");
169
120
  let body;
170
121
  body = JSON.stringify((0, smithy_client_1.take)(input, {
171
122
  AccountId: [],
@@ -175,37 +126,23 @@ const se_PutAlternateContactCommand = async (input, context) => {
175
126
  PhoneNumber: [],
176
127
  Title: [],
177
128
  }));
178
- return new protocol_http_1.HttpRequest({
179
- protocol,
180
- hostname,
181
- port,
182
- method: "POST",
183
- headers,
184
- path: resolvedPath,
185
- body,
186
- });
129
+ b.m("POST").h(headers).b(body);
130
+ return b.build();
187
131
  };
188
132
  exports.se_PutAlternateContactCommand = se_PutAlternateContactCommand;
189
133
  const se_PutContactInformationCommand = async (input, context) => {
190
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
134
+ const b = (0, core_1.requestBuilder)(input, context);
191
135
  const headers = {
192
136
  "content-type": "application/json",
193
137
  };
194
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/putContactInformation";
138
+ b.bp("/putContactInformation");
195
139
  let body;
196
140
  body = JSON.stringify((0, smithy_client_1.take)(input, {
197
141
  AccountId: [],
198
142
  ContactInformation: (_) => (0, smithy_client_1._json)(_),
199
143
  }));
200
- return new protocol_http_1.HttpRequest({
201
- protocol,
202
- hostname,
203
- port,
204
- method: "POST",
205
- headers,
206
- path: resolvedPath,
207
- body,
208
- });
144
+ b.m("POST").h(headers).b(body);
145
+ return b.build();
209
146
  };
210
147
  exports.se_PutContactInformationCommand = se_PutContactInformationCommand;
211
148
  const de_DeleteAlternateContactCommand = async (output, context) => {
@@ -1,138 +1,96 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
2
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { AccountServiceException as __BaseException } from "../models/AccountServiceException";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, TooManyRequestsException, ValidationException, } from "../models/models_0";
5
5
  export const se_DeleteAlternateContactCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  "content-type": "application/json",
9
9
  };
10
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteAlternateContact";
10
+ b.bp("/deleteAlternateContact");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  AccountId: [],
14
14
  AlternateContactType: [],
15
15
  }));
16
- return new __HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "POST",
21
- headers,
22
- path: resolvedPath,
23
- body,
24
- });
16
+ b.m("POST").h(headers).b(body);
17
+ return b.build();
25
18
  };
26
19
  export const se_DisableRegionCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = rb(input, context);
28
21
  const headers = {
29
22
  "content-type": "application/json",
30
23
  };
31
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disableRegion";
24
+ b.bp("/disableRegion");
32
25
  let body;
33
26
  body = JSON.stringify(take(input, {
34
27
  AccountId: [],
35
28
  RegionName: [],
36
29
  }));
37
- return new __HttpRequest({
38
- protocol,
39
- hostname,
40
- port,
41
- method: "POST",
42
- headers,
43
- path: resolvedPath,
44
- body,
45
- });
30
+ b.m("POST").h(headers).b(body);
31
+ return b.build();
46
32
  };
47
33
  export const se_EnableRegionCommand = async (input, context) => {
48
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
34
+ const b = rb(input, context);
49
35
  const headers = {
50
36
  "content-type": "application/json",
51
37
  };
52
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enableRegion";
38
+ b.bp("/enableRegion");
53
39
  let body;
54
40
  body = JSON.stringify(take(input, {
55
41
  AccountId: [],
56
42
  RegionName: [],
57
43
  }));
58
- return new __HttpRequest({
59
- protocol,
60
- hostname,
61
- port,
62
- method: "POST",
63
- headers,
64
- path: resolvedPath,
65
- body,
66
- });
44
+ b.m("POST").h(headers).b(body);
45
+ return b.build();
67
46
  };
68
47
  export const se_GetAlternateContactCommand = async (input, context) => {
69
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
48
+ const b = rb(input, context);
70
49
  const headers = {
71
50
  "content-type": "application/json",
72
51
  };
73
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getAlternateContact";
52
+ b.bp("/getAlternateContact");
74
53
  let body;
75
54
  body = JSON.stringify(take(input, {
76
55
  AccountId: [],
77
56
  AlternateContactType: [],
78
57
  }));
79
- return new __HttpRequest({
80
- protocol,
81
- hostname,
82
- port,
83
- method: "POST",
84
- headers,
85
- path: resolvedPath,
86
- body,
87
- });
58
+ b.m("POST").h(headers).b(body);
59
+ return b.build();
88
60
  };
89
61
  export const se_GetContactInformationCommand = async (input, context) => {
90
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
62
+ const b = rb(input, context);
91
63
  const headers = {
92
64
  "content-type": "application/json",
93
65
  };
94
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getContactInformation";
66
+ b.bp("/getContactInformation");
95
67
  let body;
96
68
  body = JSON.stringify(take(input, {
97
69
  AccountId: [],
98
70
  }));
99
- return new __HttpRequest({
100
- protocol,
101
- hostname,
102
- port,
103
- method: "POST",
104
- headers,
105
- path: resolvedPath,
106
- body,
107
- });
71
+ b.m("POST").h(headers).b(body);
72
+ return b.build();
108
73
  };
109
74
  export const se_GetRegionOptStatusCommand = async (input, context) => {
110
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
75
+ const b = rb(input, context);
111
76
  const headers = {
112
77
  "content-type": "application/json",
113
78
  };
114
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getRegionOptStatus";
79
+ b.bp("/getRegionOptStatus");
115
80
  let body;
116
81
  body = JSON.stringify(take(input, {
117
82
  AccountId: [],
118
83
  RegionName: [],
119
84
  }));
120
- return new __HttpRequest({
121
- protocol,
122
- hostname,
123
- port,
124
- method: "POST",
125
- headers,
126
- path: resolvedPath,
127
- body,
128
- });
85
+ b.m("POST").h(headers).b(body);
86
+ return b.build();
129
87
  };
130
88
  export const se_ListRegionsCommand = async (input, context) => {
131
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = rb(input, context);
132
90
  const headers = {
133
91
  "content-type": "application/json",
134
92
  };
135
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listRegions";
93
+ b.bp("/listRegions");
136
94
  let body;
137
95
  body = JSON.stringify(take(input, {
138
96
  AccountId: [],
@@ -140,22 +98,15 @@ export const se_ListRegionsCommand = async (input, context) => {
140
98
  NextToken: [],
141
99
  RegionOptStatusContains: (_) => _json(_),
142
100
  }));
143
- return new __HttpRequest({
144
- protocol,
145
- hostname,
146
- port,
147
- method: "POST",
148
- headers,
149
- path: resolvedPath,
150
- body,
151
- });
101
+ b.m("POST").h(headers).b(body);
102
+ return b.build();
152
103
  };
153
104
  export const se_PutAlternateContactCommand = async (input, context) => {
154
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
105
+ const b = rb(input, context);
155
106
  const headers = {
156
107
  "content-type": "application/json",
157
108
  };
158
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/putAlternateContact";
109
+ b.bp("/putAlternateContact");
159
110
  let body;
160
111
  body = JSON.stringify(take(input, {
161
112
  AccountId: [],
@@ -165,36 +116,22 @@ export const se_PutAlternateContactCommand = async (input, context) => {
165
116
  PhoneNumber: [],
166
117
  Title: [],
167
118
  }));
168
- return new __HttpRequest({
169
- protocol,
170
- hostname,
171
- port,
172
- method: "POST",
173
- headers,
174
- path: resolvedPath,
175
- body,
176
- });
119
+ b.m("POST").h(headers).b(body);
120
+ return b.build();
177
121
  };
178
122
  export const se_PutContactInformationCommand = async (input, context) => {
179
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
123
+ const b = rb(input, context);
180
124
  const headers = {
181
125
  "content-type": "application/json",
182
126
  };
183
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/putContactInformation";
127
+ b.bp("/putContactInformation");
184
128
  let body;
185
129
  body = JSON.stringify(take(input, {
186
130
  AccountId: [],
187
131
  ContactInformation: (_) => _json(_),
188
132
  }));
189
- return new __HttpRequest({
190
- protocol,
191
- hostname,
192
- port,
193
- method: "POST",
194
- headers,
195
- path: resolvedPath,
196
- body,
197
- });
133
+ b.m("POST").h(headers).b(body);
134
+ return b.build();
198
135
  };
199
136
  export const de_DeleteAlternateContactCommand = async (output, context) => {
200
137
  if (output.statusCode !== 200 && output.statusCode >= 300) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-account",
3
3
  "description": "AWS SDK for JavaScript Account Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -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.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",