@aws-sdk/client-snowball 3.310.0 → 3.312.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.
@@ -7,260 +7,182 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const SnowballServiceException_1 = require("../models/SnowballServiceException");
9
9
  const se_CancelClusterCommand = async (input, context) => {
10
- const headers = {
11
- "content-type": "application/x-amz-json-1.1",
12
- "x-amz-target": "AWSIESnowballJobManagementService.CancelCluster",
13
- };
10
+ const headers = sharedHeaders("CancelCluster");
14
11
  let body;
15
12
  body = JSON.stringify(se_CancelClusterRequest(input, context));
16
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
14
  };
18
15
  exports.se_CancelClusterCommand = se_CancelClusterCommand;
19
16
  const se_CancelJobCommand = async (input, context) => {
20
- const headers = {
21
- "content-type": "application/x-amz-json-1.1",
22
- "x-amz-target": "AWSIESnowballJobManagementService.CancelJob",
23
- };
17
+ const headers = sharedHeaders("CancelJob");
24
18
  let body;
25
19
  body = JSON.stringify(se_CancelJobRequest(input, context));
26
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
21
  };
28
22
  exports.se_CancelJobCommand = se_CancelJobCommand;
29
23
  const se_CreateAddressCommand = async (input, context) => {
30
- const headers = {
31
- "content-type": "application/x-amz-json-1.1",
32
- "x-amz-target": "AWSIESnowballJobManagementService.CreateAddress",
33
- };
24
+ const headers = sharedHeaders("CreateAddress");
34
25
  let body;
35
26
  body = JSON.stringify(se_CreateAddressRequest(input, context));
36
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
37
28
  };
38
29
  exports.se_CreateAddressCommand = se_CreateAddressCommand;
39
30
  const se_CreateClusterCommand = async (input, context) => {
40
- const headers = {
41
- "content-type": "application/x-amz-json-1.1",
42
- "x-amz-target": "AWSIESnowballJobManagementService.CreateCluster",
43
- };
31
+ const headers = sharedHeaders("CreateCluster");
44
32
  let body;
45
33
  body = JSON.stringify(se_CreateClusterRequest(input, context));
46
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
35
  };
48
36
  exports.se_CreateClusterCommand = se_CreateClusterCommand;
49
37
  const se_CreateJobCommand = async (input, context) => {
50
- const headers = {
51
- "content-type": "application/x-amz-json-1.1",
52
- "x-amz-target": "AWSIESnowballJobManagementService.CreateJob",
53
- };
38
+ const headers = sharedHeaders("CreateJob");
54
39
  let body;
55
40
  body = JSON.stringify(se_CreateJobRequest(input, context));
56
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
42
  };
58
43
  exports.se_CreateJobCommand = se_CreateJobCommand;
59
44
  const se_CreateLongTermPricingCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "AWSIESnowballJobManagementService.CreateLongTermPricing",
63
- };
45
+ const headers = sharedHeaders("CreateLongTermPricing");
64
46
  let body;
65
47
  body = JSON.stringify(se_CreateLongTermPricingRequest(input, context));
66
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
49
  };
68
50
  exports.se_CreateLongTermPricingCommand = se_CreateLongTermPricingCommand;
69
51
  const se_CreateReturnShippingLabelCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.1",
72
- "x-amz-target": "AWSIESnowballJobManagementService.CreateReturnShippingLabel",
73
- };
52
+ const headers = sharedHeaders("CreateReturnShippingLabel");
74
53
  let body;
75
54
  body = JSON.stringify(se_CreateReturnShippingLabelRequest(input, context));
76
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
56
  };
78
57
  exports.se_CreateReturnShippingLabelCommand = se_CreateReturnShippingLabelCommand;
79
58
  const se_DescribeAddressCommand = async (input, context) => {
80
- const headers = {
81
- "content-type": "application/x-amz-json-1.1",
82
- "x-amz-target": "AWSIESnowballJobManagementService.DescribeAddress",
83
- };
59
+ const headers = sharedHeaders("DescribeAddress");
84
60
  let body;
85
61
  body = JSON.stringify(se_DescribeAddressRequest(input, context));
86
62
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
87
63
  };
88
64
  exports.se_DescribeAddressCommand = se_DescribeAddressCommand;
89
65
  const se_DescribeAddressesCommand = async (input, context) => {
90
- const headers = {
91
- "content-type": "application/x-amz-json-1.1",
92
- "x-amz-target": "AWSIESnowballJobManagementService.DescribeAddresses",
93
- };
66
+ const headers = sharedHeaders("DescribeAddresses");
94
67
  let body;
95
68
  body = JSON.stringify(se_DescribeAddressesRequest(input, context));
96
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
97
70
  };
98
71
  exports.se_DescribeAddressesCommand = se_DescribeAddressesCommand;
99
72
  const se_DescribeClusterCommand = async (input, context) => {
100
- const headers = {
101
- "content-type": "application/x-amz-json-1.1",
102
- "x-amz-target": "AWSIESnowballJobManagementService.DescribeCluster",
103
- };
73
+ const headers = sharedHeaders("DescribeCluster");
104
74
  let body;
105
75
  body = JSON.stringify(se_DescribeClusterRequest(input, context));
106
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
77
  };
108
78
  exports.se_DescribeClusterCommand = se_DescribeClusterCommand;
109
79
  const se_DescribeJobCommand = async (input, context) => {
110
- const headers = {
111
- "content-type": "application/x-amz-json-1.1",
112
- "x-amz-target": "AWSIESnowballJobManagementService.DescribeJob",
113
- };
80
+ const headers = sharedHeaders("DescribeJob");
114
81
  let body;
115
82
  body = JSON.stringify(se_DescribeJobRequest(input, context));
116
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
117
84
  };
118
85
  exports.se_DescribeJobCommand = se_DescribeJobCommand;
119
86
  const se_DescribeReturnShippingLabelCommand = async (input, context) => {
120
- const headers = {
121
- "content-type": "application/x-amz-json-1.1",
122
- "x-amz-target": "AWSIESnowballJobManagementService.DescribeReturnShippingLabel",
123
- };
87
+ const headers = sharedHeaders("DescribeReturnShippingLabel");
124
88
  let body;
125
89
  body = JSON.stringify(se_DescribeReturnShippingLabelRequest(input, context));
126
90
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
127
91
  };
128
92
  exports.se_DescribeReturnShippingLabelCommand = se_DescribeReturnShippingLabelCommand;
129
93
  const se_GetJobManifestCommand = async (input, context) => {
130
- const headers = {
131
- "content-type": "application/x-amz-json-1.1",
132
- "x-amz-target": "AWSIESnowballJobManagementService.GetJobManifest",
133
- };
94
+ const headers = sharedHeaders("GetJobManifest");
134
95
  let body;
135
96
  body = JSON.stringify(se_GetJobManifestRequest(input, context));
136
97
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
98
  };
138
99
  exports.se_GetJobManifestCommand = se_GetJobManifestCommand;
139
100
  const se_GetJobUnlockCodeCommand = async (input, context) => {
140
- const headers = {
141
- "content-type": "application/x-amz-json-1.1",
142
- "x-amz-target": "AWSIESnowballJobManagementService.GetJobUnlockCode",
143
- };
101
+ const headers = sharedHeaders("GetJobUnlockCode");
144
102
  let body;
145
103
  body = JSON.stringify(se_GetJobUnlockCodeRequest(input, context));
146
104
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
105
  };
148
106
  exports.se_GetJobUnlockCodeCommand = se_GetJobUnlockCodeCommand;
149
107
  const se_GetSnowballUsageCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "AWSIESnowballJobManagementService.GetSnowballUsage",
153
- };
108
+ const headers = sharedHeaders("GetSnowballUsage");
154
109
  let body;
155
110
  body = JSON.stringify(se_GetSnowballUsageRequest(input, context));
156
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
112
  };
158
113
  exports.se_GetSnowballUsageCommand = se_GetSnowballUsageCommand;
159
114
  const se_GetSoftwareUpdatesCommand = async (input, context) => {
160
- const headers = {
161
- "content-type": "application/x-amz-json-1.1",
162
- "x-amz-target": "AWSIESnowballJobManagementService.GetSoftwareUpdates",
163
- };
115
+ const headers = sharedHeaders("GetSoftwareUpdates");
164
116
  let body;
165
117
  body = JSON.stringify(se_GetSoftwareUpdatesRequest(input, context));
166
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
119
  };
168
120
  exports.se_GetSoftwareUpdatesCommand = se_GetSoftwareUpdatesCommand;
169
121
  const se_ListClusterJobsCommand = async (input, context) => {
170
- const headers = {
171
- "content-type": "application/x-amz-json-1.1",
172
- "x-amz-target": "AWSIESnowballJobManagementService.ListClusterJobs",
173
- };
122
+ const headers = sharedHeaders("ListClusterJobs");
174
123
  let body;
175
124
  body = JSON.stringify(se_ListClusterJobsRequest(input, context));
176
125
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
177
126
  };
178
127
  exports.se_ListClusterJobsCommand = se_ListClusterJobsCommand;
179
128
  const se_ListClustersCommand = async (input, context) => {
180
- const headers = {
181
- "content-type": "application/x-amz-json-1.1",
182
- "x-amz-target": "AWSIESnowballJobManagementService.ListClusters",
183
- };
129
+ const headers = sharedHeaders("ListClusters");
184
130
  let body;
185
131
  body = JSON.stringify(se_ListClustersRequest(input, context));
186
132
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
187
133
  };
188
134
  exports.se_ListClustersCommand = se_ListClustersCommand;
189
135
  const se_ListCompatibleImagesCommand = async (input, context) => {
190
- const headers = {
191
- "content-type": "application/x-amz-json-1.1",
192
- "x-amz-target": "AWSIESnowballJobManagementService.ListCompatibleImages",
193
- };
136
+ const headers = sharedHeaders("ListCompatibleImages");
194
137
  let body;
195
138
  body = JSON.stringify(se_ListCompatibleImagesRequest(input, context));
196
139
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
140
  };
198
141
  exports.se_ListCompatibleImagesCommand = se_ListCompatibleImagesCommand;
199
142
  const se_ListJobsCommand = async (input, context) => {
200
- const headers = {
201
- "content-type": "application/x-amz-json-1.1",
202
- "x-amz-target": "AWSIESnowballJobManagementService.ListJobs",
203
- };
143
+ const headers = sharedHeaders("ListJobs");
204
144
  let body;
205
145
  body = JSON.stringify(se_ListJobsRequest(input, context));
206
146
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
207
147
  };
208
148
  exports.se_ListJobsCommand = se_ListJobsCommand;
209
149
  const se_ListLongTermPricingCommand = async (input, context) => {
210
- const headers = {
211
- "content-type": "application/x-amz-json-1.1",
212
- "x-amz-target": "AWSIESnowballJobManagementService.ListLongTermPricing",
213
- };
150
+ const headers = sharedHeaders("ListLongTermPricing");
214
151
  let body;
215
152
  body = JSON.stringify(se_ListLongTermPricingRequest(input, context));
216
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
217
154
  };
218
155
  exports.se_ListLongTermPricingCommand = se_ListLongTermPricingCommand;
219
156
  const se_ListServiceVersionsCommand = async (input, context) => {
220
- const headers = {
221
- "content-type": "application/x-amz-json-1.1",
222
- "x-amz-target": "AWSIESnowballJobManagementService.ListServiceVersions",
223
- };
157
+ const headers = sharedHeaders("ListServiceVersions");
224
158
  let body;
225
159
  body = JSON.stringify(se_ListServiceVersionsRequest(input, context));
226
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
227
161
  };
228
162
  exports.se_ListServiceVersionsCommand = se_ListServiceVersionsCommand;
229
163
  const se_UpdateClusterCommand = async (input, context) => {
230
- const headers = {
231
- "content-type": "application/x-amz-json-1.1",
232
- "x-amz-target": "AWSIESnowballJobManagementService.UpdateCluster",
233
- };
164
+ const headers = sharedHeaders("UpdateCluster");
234
165
  let body;
235
166
  body = JSON.stringify(se_UpdateClusterRequest(input, context));
236
167
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
237
168
  };
238
169
  exports.se_UpdateClusterCommand = se_UpdateClusterCommand;
239
170
  const se_UpdateJobCommand = async (input, context) => {
240
- const headers = {
241
- "content-type": "application/x-amz-json-1.1",
242
- "x-amz-target": "AWSIESnowballJobManagementService.UpdateJob",
243
- };
171
+ const headers = sharedHeaders("UpdateJob");
244
172
  let body;
245
173
  body = JSON.stringify(se_UpdateJobRequest(input, context));
246
174
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
247
175
  };
248
176
  exports.se_UpdateJobCommand = se_UpdateJobCommand;
249
177
  const se_UpdateJobShipmentStateCommand = async (input, context) => {
250
- const headers = {
251
- "content-type": "application/x-amz-json-1.1",
252
- "x-amz-target": "AWSIESnowballJobManagementService.UpdateJobShipmentState",
253
- };
178
+ const headers = sharedHeaders("UpdateJobShipmentState");
254
179
  let body;
255
180
  body = JSON.stringify(se_UpdateJobShipmentStateRequest(input, context));
256
181
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
257
182
  };
258
183
  exports.se_UpdateJobShipmentStateCommand = se_UpdateJobShipmentStateCommand;
259
184
  const se_UpdateLongTermPricingCommand = async (input, context) => {
260
- const headers = {
261
- "content-type": "application/x-amz-json-1.1",
262
- "x-amz-target": "AWSIESnowballJobManagementService.UpdateLongTermPricing",
263
- };
185
+ const headers = sharedHeaders("UpdateLongTermPricing");
264
186
  let body;
265
187
  body = JSON.stringify(se_UpdateLongTermPricingRequest(input, context));
266
188
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -2397,6 +2319,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
2397
2319
  }
2398
2320
  return new protocol_http_1.HttpRequest(contents);
2399
2321
  };
2322
+ function sharedHeaders(operation) {
2323
+ return {
2324
+ "content-type": "application/x-amz-json-1.1",
2325
+ "x-amz-target": `AWSIESnowballJobManagementService.${operation}`,
2326
+ };
2327
+ }
2400
2328
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2401
2329
  if (encoded.length) {
2402
2330
  return JSON.parse(encoded);
@@ -3,235 +3,157 @@ import { decorateServiceException as __decorateServiceException, expectBoolean a
3
3
  import { ClusterLimitExceededException, ConflictException, Ec2RequestFailedException, InvalidAddressException, InvalidInputCombinationException, InvalidJobStateException, InvalidNextTokenException, InvalidResourceException, KMSRequestFailedException, ReturnShippingLabelAlreadyExistsException, UnsupportedAddressException, } from "../models/models_0";
4
4
  import { SnowballServiceException as __BaseException } from "../models/SnowballServiceException";
5
5
  export const se_CancelClusterCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.1",
8
- "x-amz-target": "AWSIESnowballJobManagementService.CancelCluster",
9
- };
6
+ const headers = sharedHeaders("CancelCluster");
10
7
  let body;
11
8
  body = JSON.stringify(se_CancelClusterRequest(input, context));
12
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
10
  };
14
11
  export const se_CancelJobCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.1",
17
- "x-amz-target": "AWSIESnowballJobManagementService.CancelJob",
18
- };
12
+ const headers = sharedHeaders("CancelJob");
19
13
  let body;
20
14
  body = JSON.stringify(se_CancelJobRequest(input, context));
21
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
16
  };
23
17
  export const se_CreateAddressCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.1",
26
- "x-amz-target": "AWSIESnowballJobManagementService.CreateAddress",
27
- };
18
+ const headers = sharedHeaders("CreateAddress");
28
19
  let body;
29
20
  body = JSON.stringify(se_CreateAddressRequest(input, context));
30
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
22
  };
32
23
  export const se_CreateClusterCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.1",
35
- "x-amz-target": "AWSIESnowballJobManagementService.CreateCluster",
36
- };
24
+ const headers = sharedHeaders("CreateCluster");
37
25
  let body;
38
26
  body = JSON.stringify(se_CreateClusterRequest(input, context));
39
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
28
  };
41
29
  export const se_CreateJobCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "AWSIESnowballJobManagementService.CreateJob",
45
- };
30
+ const headers = sharedHeaders("CreateJob");
46
31
  let body;
47
32
  body = JSON.stringify(se_CreateJobRequest(input, context));
48
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
34
  };
50
35
  export const se_CreateLongTermPricingCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "AWSIESnowballJobManagementService.CreateLongTermPricing",
54
- };
36
+ const headers = sharedHeaders("CreateLongTermPricing");
55
37
  let body;
56
38
  body = JSON.stringify(se_CreateLongTermPricingRequest(input, context));
57
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
40
  };
59
41
  export const se_CreateReturnShippingLabelCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.1",
62
- "x-amz-target": "AWSIESnowballJobManagementService.CreateReturnShippingLabel",
63
- };
42
+ const headers = sharedHeaders("CreateReturnShippingLabel");
64
43
  let body;
65
44
  body = JSON.stringify(se_CreateReturnShippingLabelRequest(input, context));
66
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
46
  };
68
47
  export const se_DescribeAddressCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.1",
71
- "x-amz-target": "AWSIESnowballJobManagementService.DescribeAddress",
72
- };
48
+ const headers = sharedHeaders("DescribeAddress");
73
49
  let body;
74
50
  body = JSON.stringify(se_DescribeAddressRequest(input, context));
75
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
52
  };
77
53
  export const se_DescribeAddressesCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.1",
80
- "x-amz-target": "AWSIESnowballJobManagementService.DescribeAddresses",
81
- };
54
+ const headers = sharedHeaders("DescribeAddresses");
82
55
  let body;
83
56
  body = JSON.stringify(se_DescribeAddressesRequest(input, context));
84
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
58
  };
86
59
  export const se_DescribeClusterCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.1",
89
- "x-amz-target": "AWSIESnowballJobManagementService.DescribeCluster",
90
- };
60
+ const headers = sharedHeaders("DescribeCluster");
91
61
  let body;
92
62
  body = JSON.stringify(se_DescribeClusterRequest(input, context));
93
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
64
  };
95
65
  export const se_DescribeJobCommand = async (input, context) => {
96
- const headers = {
97
- "content-type": "application/x-amz-json-1.1",
98
- "x-amz-target": "AWSIESnowballJobManagementService.DescribeJob",
99
- };
66
+ const headers = sharedHeaders("DescribeJob");
100
67
  let body;
101
68
  body = JSON.stringify(se_DescribeJobRequest(input, context));
102
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
70
  };
104
71
  export const se_DescribeReturnShippingLabelCommand = async (input, context) => {
105
- const headers = {
106
- "content-type": "application/x-amz-json-1.1",
107
- "x-amz-target": "AWSIESnowballJobManagementService.DescribeReturnShippingLabel",
108
- };
72
+ const headers = sharedHeaders("DescribeReturnShippingLabel");
109
73
  let body;
110
74
  body = JSON.stringify(se_DescribeReturnShippingLabelRequest(input, context));
111
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
76
  };
113
77
  export const se_GetJobManifestCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.1",
116
- "x-amz-target": "AWSIESnowballJobManagementService.GetJobManifest",
117
- };
78
+ const headers = sharedHeaders("GetJobManifest");
118
79
  let body;
119
80
  body = JSON.stringify(se_GetJobManifestRequest(input, context));
120
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
82
  };
122
83
  export const se_GetJobUnlockCodeCommand = async (input, context) => {
123
- const headers = {
124
- "content-type": "application/x-amz-json-1.1",
125
- "x-amz-target": "AWSIESnowballJobManagementService.GetJobUnlockCode",
126
- };
84
+ const headers = sharedHeaders("GetJobUnlockCode");
127
85
  let body;
128
86
  body = JSON.stringify(se_GetJobUnlockCodeRequest(input, context));
129
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
88
  };
131
89
  export const se_GetSnowballUsageCommand = async (input, context) => {
132
- const headers = {
133
- "content-type": "application/x-amz-json-1.1",
134
- "x-amz-target": "AWSIESnowballJobManagementService.GetSnowballUsage",
135
- };
90
+ const headers = sharedHeaders("GetSnowballUsage");
136
91
  let body;
137
92
  body = JSON.stringify(se_GetSnowballUsageRequest(input, context));
138
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
94
  };
140
95
  export const se_GetSoftwareUpdatesCommand = async (input, context) => {
141
- const headers = {
142
- "content-type": "application/x-amz-json-1.1",
143
- "x-amz-target": "AWSIESnowballJobManagementService.GetSoftwareUpdates",
144
- };
96
+ const headers = sharedHeaders("GetSoftwareUpdates");
145
97
  let body;
146
98
  body = JSON.stringify(se_GetSoftwareUpdatesRequest(input, context));
147
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
100
  };
149
101
  export const se_ListClusterJobsCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.1",
152
- "x-amz-target": "AWSIESnowballJobManagementService.ListClusterJobs",
153
- };
102
+ const headers = sharedHeaders("ListClusterJobs");
154
103
  let body;
155
104
  body = JSON.stringify(se_ListClusterJobsRequest(input, context));
156
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
106
  };
158
107
  export const se_ListClustersCommand = async (input, context) => {
159
- const headers = {
160
- "content-type": "application/x-amz-json-1.1",
161
- "x-amz-target": "AWSIESnowballJobManagementService.ListClusters",
162
- };
108
+ const headers = sharedHeaders("ListClusters");
163
109
  let body;
164
110
  body = JSON.stringify(se_ListClustersRequest(input, context));
165
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
166
112
  };
167
113
  export const se_ListCompatibleImagesCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "AWSIESnowballJobManagementService.ListCompatibleImages",
171
- };
114
+ const headers = sharedHeaders("ListCompatibleImages");
172
115
  let body;
173
116
  body = JSON.stringify(se_ListCompatibleImagesRequest(input, context));
174
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
118
  };
176
119
  export const se_ListJobsCommand = async (input, context) => {
177
- const headers = {
178
- "content-type": "application/x-amz-json-1.1",
179
- "x-amz-target": "AWSIESnowballJobManagementService.ListJobs",
180
- };
120
+ const headers = sharedHeaders("ListJobs");
181
121
  let body;
182
122
  body = JSON.stringify(se_ListJobsRequest(input, context));
183
123
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
124
  };
185
125
  export const se_ListLongTermPricingCommand = async (input, context) => {
186
- const headers = {
187
- "content-type": "application/x-amz-json-1.1",
188
- "x-amz-target": "AWSIESnowballJobManagementService.ListLongTermPricing",
189
- };
126
+ const headers = sharedHeaders("ListLongTermPricing");
190
127
  let body;
191
128
  body = JSON.stringify(se_ListLongTermPricingRequest(input, context));
192
129
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
193
130
  };
194
131
  export const se_ListServiceVersionsCommand = async (input, context) => {
195
- const headers = {
196
- "content-type": "application/x-amz-json-1.1",
197
- "x-amz-target": "AWSIESnowballJobManagementService.ListServiceVersions",
198
- };
132
+ const headers = sharedHeaders("ListServiceVersions");
199
133
  let body;
200
134
  body = JSON.stringify(se_ListServiceVersionsRequest(input, context));
201
135
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
202
136
  };
203
137
  export const se_UpdateClusterCommand = async (input, context) => {
204
- const headers = {
205
- "content-type": "application/x-amz-json-1.1",
206
- "x-amz-target": "AWSIESnowballJobManagementService.UpdateCluster",
207
- };
138
+ const headers = sharedHeaders("UpdateCluster");
208
139
  let body;
209
140
  body = JSON.stringify(se_UpdateClusterRequest(input, context));
210
141
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
142
  };
212
143
  export const se_UpdateJobCommand = async (input, context) => {
213
- const headers = {
214
- "content-type": "application/x-amz-json-1.1",
215
- "x-amz-target": "AWSIESnowballJobManagementService.UpdateJob",
216
- };
144
+ const headers = sharedHeaders("UpdateJob");
217
145
  let body;
218
146
  body = JSON.stringify(se_UpdateJobRequest(input, context));
219
147
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
220
148
  };
221
149
  export const se_UpdateJobShipmentStateCommand = async (input, context) => {
222
- const headers = {
223
- "content-type": "application/x-amz-json-1.1",
224
- "x-amz-target": "AWSIESnowballJobManagementService.UpdateJobShipmentState",
225
- };
150
+ const headers = sharedHeaders("UpdateJobShipmentState");
226
151
  let body;
227
152
  body = JSON.stringify(se_UpdateJobShipmentStateRequest(input, context));
228
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
229
154
  };
230
155
  export const se_UpdateLongTermPricingCommand = async (input, context) => {
231
- const headers = {
232
- "content-type": "application/x-amz-json-1.1",
233
- "x-amz-target": "AWSIESnowballJobManagementService.UpdateLongTermPricing",
234
- };
156
+ const headers = sharedHeaders("UpdateLongTermPricing");
235
157
  let body;
236
158
  body = JSON.stringify(se_UpdateLongTermPricingRequest(input, context));
237
159
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -2341,6 +2263,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
2341
2263
  }
2342
2264
  return new __HttpRequest(contents);
2343
2265
  };
2266
+ function sharedHeaders(operation) {
2267
+ return {
2268
+ "content-type": "application/x-amz-json-1.1",
2269
+ "x-amz-target": `AWSIESnowballJobManagementService.${operation}`,
2270
+ };
2271
+ }
2344
2272
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2345
2273
  if (encoded.length) {
2346
2274
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-snowball",
3
3
  "description": "AWS SDK for JavaScript Snowball Client for Node.js, Browser and React Native",
4
- "version": "3.310.0",
4
+ "version": "3.312.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",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.310.0",
24
+ "@aws-sdk/client-sts": "3.312.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
26
  "@aws-sdk/credential-provider-node": "3.310.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",