@aws-sdk/client-servicediscovery 3.309.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.
@@ -8,80 +8,56 @@ const uuid_1 = require("uuid");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const ServiceDiscoveryServiceException_1 = require("../models/ServiceDiscoveryServiceException");
10
10
  const se_CreateHttpNamespaceCommand = async (input, context) => {
11
- const headers = {
12
- "content-type": "application/x-amz-json-1.1",
13
- "x-amz-target": "Route53AutoNaming_v20170314.CreateHttpNamespace",
14
- };
11
+ const headers = sharedHeaders("CreateHttpNamespace");
15
12
  let body;
16
13
  body = JSON.stringify(se_CreateHttpNamespaceRequest(input, context));
17
14
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
18
15
  };
19
16
  exports.se_CreateHttpNamespaceCommand = se_CreateHttpNamespaceCommand;
20
17
  const se_CreatePrivateDnsNamespaceCommand = async (input, context) => {
21
- const headers = {
22
- "content-type": "application/x-amz-json-1.1",
23
- "x-amz-target": "Route53AutoNaming_v20170314.CreatePrivateDnsNamespace",
24
- };
18
+ const headers = sharedHeaders("CreatePrivateDnsNamespace");
25
19
  let body;
26
20
  body = JSON.stringify(se_CreatePrivateDnsNamespaceRequest(input, context));
27
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
22
  };
29
23
  exports.se_CreatePrivateDnsNamespaceCommand = se_CreatePrivateDnsNamespaceCommand;
30
24
  const se_CreatePublicDnsNamespaceCommand = async (input, context) => {
31
- const headers = {
32
- "content-type": "application/x-amz-json-1.1",
33
- "x-amz-target": "Route53AutoNaming_v20170314.CreatePublicDnsNamespace",
34
- };
25
+ const headers = sharedHeaders("CreatePublicDnsNamespace");
35
26
  let body;
36
27
  body = JSON.stringify(se_CreatePublicDnsNamespaceRequest(input, context));
37
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
38
29
  };
39
30
  exports.se_CreatePublicDnsNamespaceCommand = se_CreatePublicDnsNamespaceCommand;
40
31
  const se_CreateServiceCommand = async (input, context) => {
41
- const headers = {
42
- "content-type": "application/x-amz-json-1.1",
43
- "x-amz-target": "Route53AutoNaming_v20170314.CreateService",
44
- };
32
+ const headers = sharedHeaders("CreateService");
45
33
  let body;
46
34
  body = JSON.stringify(se_CreateServiceRequest(input, context));
47
35
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
36
  };
49
37
  exports.se_CreateServiceCommand = se_CreateServiceCommand;
50
38
  const se_DeleteNamespaceCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.1",
53
- "x-amz-target": "Route53AutoNaming_v20170314.DeleteNamespace",
54
- };
39
+ const headers = sharedHeaders("DeleteNamespace");
55
40
  let body;
56
41
  body = JSON.stringify(se_DeleteNamespaceRequest(input, context));
57
42
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
43
  };
59
44
  exports.se_DeleteNamespaceCommand = se_DeleteNamespaceCommand;
60
45
  const se_DeleteServiceCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.1",
63
- "x-amz-target": "Route53AutoNaming_v20170314.DeleteService",
64
- };
46
+ const headers = sharedHeaders("DeleteService");
65
47
  let body;
66
48
  body = JSON.stringify(se_DeleteServiceRequest(input, context));
67
49
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
50
  };
69
51
  exports.se_DeleteServiceCommand = se_DeleteServiceCommand;
70
52
  const se_DeregisterInstanceCommand = async (input, context) => {
71
- const headers = {
72
- "content-type": "application/x-amz-json-1.1",
73
- "x-amz-target": "Route53AutoNaming_v20170314.DeregisterInstance",
74
- };
53
+ const headers = sharedHeaders("DeregisterInstance");
75
54
  let body;
76
55
  body = JSON.stringify(se_DeregisterInstanceRequest(input, context));
77
56
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
57
  };
79
58
  exports.se_DeregisterInstanceCommand = se_DeregisterInstanceCommand;
80
59
  const se_DiscoverInstancesCommand = async (input, context) => {
81
- const headers = {
82
- "content-type": "application/x-amz-json-1.1",
83
- "x-amz-target": "Route53AutoNaming_v20170314.DiscoverInstances",
84
- };
60
+ const headers = sharedHeaders("DiscoverInstances");
85
61
  let body;
86
62
  body = JSON.stringify(se_DiscoverInstancesRequest(input, context));
87
63
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -95,180 +71,126 @@ const se_DiscoverInstancesCommand = async (input, context) => {
95
71
  };
96
72
  exports.se_DiscoverInstancesCommand = se_DiscoverInstancesCommand;
97
73
  const se_GetInstanceCommand = async (input, context) => {
98
- const headers = {
99
- "content-type": "application/x-amz-json-1.1",
100
- "x-amz-target": "Route53AutoNaming_v20170314.GetInstance",
101
- };
74
+ const headers = sharedHeaders("GetInstance");
102
75
  let body;
103
76
  body = JSON.stringify(se_GetInstanceRequest(input, context));
104
77
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
78
  };
106
79
  exports.se_GetInstanceCommand = se_GetInstanceCommand;
107
80
  const se_GetInstancesHealthStatusCommand = async (input, context) => {
108
- const headers = {
109
- "content-type": "application/x-amz-json-1.1",
110
- "x-amz-target": "Route53AutoNaming_v20170314.GetInstancesHealthStatus",
111
- };
81
+ const headers = sharedHeaders("GetInstancesHealthStatus");
112
82
  let body;
113
83
  body = JSON.stringify(se_GetInstancesHealthStatusRequest(input, context));
114
84
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
115
85
  };
116
86
  exports.se_GetInstancesHealthStatusCommand = se_GetInstancesHealthStatusCommand;
117
87
  const se_GetNamespaceCommand = async (input, context) => {
118
- const headers = {
119
- "content-type": "application/x-amz-json-1.1",
120
- "x-amz-target": "Route53AutoNaming_v20170314.GetNamespace",
121
- };
88
+ const headers = sharedHeaders("GetNamespace");
122
89
  let body;
123
90
  body = JSON.stringify(se_GetNamespaceRequest(input, context));
124
91
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
92
  };
126
93
  exports.se_GetNamespaceCommand = se_GetNamespaceCommand;
127
94
  const se_GetOperationCommand = async (input, context) => {
128
- const headers = {
129
- "content-type": "application/x-amz-json-1.1",
130
- "x-amz-target": "Route53AutoNaming_v20170314.GetOperation",
131
- };
95
+ const headers = sharedHeaders("GetOperation");
132
96
  let body;
133
97
  body = JSON.stringify(se_GetOperationRequest(input, context));
134
98
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
135
99
  };
136
100
  exports.se_GetOperationCommand = se_GetOperationCommand;
137
101
  const se_GetServiceCommand = async (input, context) => {
138
- const headers = {
139
- "content-type": "application/x-amz-json-1.1",
140
- "x-amz-target": "Route53AutoNaming_v20170314.GetService",
141
- };
102
+ const headers = sharedHeaders("GetService");
142
103
  let body;
143
104
  body = JSON.stringify(se_GetServiceRequest(input, context));
144
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
145
106
  };
146
107
  exports.se_GetServiceCommand = se_GetServiceCommand;
147
108
  const se_ListInstancesCommand = async (input, context) => {
148
- const headers = {
149
- "content-type": "application/x-amz-json-1.1",
150
- "x-amz-target": "Route53AutoNaming_v20170314.ListInstances",
151
- };
109
+ const headers = sharedHeaders("ListInstances");
152
110
  let body;
153
111
  body = JSON.stringify(se_ListInstancesRequest(input, context));
154
112
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
113
  };
156
114
  exports.se_ListInstancesCommand = se_ListInstancesCommand;
157
115
  const se_ListNamespacesCommand = async (input, context) => {
158
- const headers = {
159
- "content-type": "application/x-amz-json-1.1",
160
- "x-amz-target": "Route53AutoNaming_v20170314.ListNamespaces",
161
- };
116
+ const headers = sharedHeaders("ListNamespaces");
162
117
  let body;
163
118
  body = JSON.stringify(se_ListNamespacesRequest(input, context));
164
119
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
165
120
  };
166
121
  exports.se_ListNamespacesCommand = se_ListNamespacesCommand;
167
122
  const se_ListOperationsCommand = async (input, context) => {
168
- const headers = {
169
- "content-type": "application/x-amz-json-1.1",
170
- "x-amz-target": "Route53AutoNaming_v20170314.ListOperations",
171
- };
123
+ const headers = sharedHeaders("ListOperations");
172
124
  let body;
173
125
  body = JSON.stringify(se_ListOperationsRequest(input, context));
174
126
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
127
  };
176
128
  exports.se_ListOperationsCommand = se_ListOperationsCommand;
177
129
  const se_ListServicesCommand = async (input, context) => {
178
- const headers = {
179
- "content-type": "application/x-amz-json-1.1",
180
- "x-amz-target": "Route53AutoNaming_v20170314.ListServices",
181
- };
130
+ const headers = sharedHeaders("ListServices");
182
131
  let body;
183
132
  body = JSON.stringify(se_ListServicesRequest(input, context));
184
133
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
185
134
  };
186
135
  exports.se_ListServicesCommand = se_ListServicesCommand;
187
136
  const se_ListTagsForResourceCommand = async (input, context) => {
188
- const headers = {
189
- "content-type": "application/x-amz-json-1.1",
190
- "x-amz-target": "Route53AutoNaming_v20170314.ListTagsForResource",
191
- };
137
+ const headers = sharedHeaders("ListTagsForResource");
192
138
  let body;
193
139
  body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
194
140
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
195
141
  };
196
142
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
197
143
  const se_RegisterInstanceCommand = async (input, context) => {
198
- const headers = {
199
- "content-type": "application/x-amz-json-1.1",
200
- "x-amz-target": "Route53AutoNaming_v20170314.RegisterInstance",
201
- };
144
+ const headers = sharedHeaders("RegisterInstance");
202
145
  let body;
203
146
  body = JSON.stringify(se_RegisterInstanceRequest(input, context));
204
147
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
205
148
  };
206
149
  exports.se_RegisterInstanceCommand = se_RegisterInstanceCommand;
207
150
  const se_TagResourceCommand = async (input, context) => {
208
- const headers = {
209
- "content-type": "application/x-amz-json-1.1",
210
- "x-amz-target": "Route53AutoNaming_v20170314.TagResource",
211
- };
151
+ const headers = sharedHeaders("TagResource");
212
152
  let body;
213
153
  body = JSON.stringify(se_TagResourceRequest(input, context));
214
154
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
215
155
  };
216
156
  exports.se_TagResourceCommand = se_TagResourceCommand;
217
157
  const se_UntagResourceCommand = async (input, context) => {
218
- const headers = {
219
- "content-type": "application/x-amz-json-1.1",
220
- "x-amz-target": "Route53AutoNaming_v20170314.UntagResource",
221
- };
158
+ const headers = sharedHeaders("UntagResource");
222
159
  let body;
223
160
  body = JSON.stringify(se_UntagResourceRequest(input, context));
224
161
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
225
162
  };
226
163
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
227
164
  const se_UpdateHttpNamespaceCommand = async (input, context) => {
228
- const headers = {
229
- "content-type": "application/x-amz-json-1.1",
230
- "x-amz-target": "Route53AutoNaming_v20170314.UpdateHttpNamespace",
231
- };
165
+ const headers = sharedHeaders("UpdateHttpNamespace");
232
166
  let body;
233
167
  body = JSON.stringify(se_UpdateHttpNamespaceRequest(input, context));
234
168
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
235
169
  };
236
170
  exports.se_UpdateHttpNamespaceCommand = se_UpdateHttpNamespaceCommand;
237
171
  const se_UpdateInstanceCustomHealthStatusCommand = async (input, context) => {
238
- const headers = {
239
- "content-type": "application/x-amz-json-1.1",
240
- "x-amz-target": "Route53AutoNaming_v20170314.UpdateInstanceCustomHealthStatus",
241
- };
172
+ const headers = sharedHeaders("UpdateInstanceCustomHealthStatus");
242
173
  let body;
243
174
  body = JSON.stringify(se_UpdateInstanceCustomHealthStatusRequest(input, context));
244
175
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
245
176
  };
246
177
  exports.se_UpdateInstanceCustomHealthStatusCommand = se_UpdateInstanceCustomHealthStatusCommand;
247
178
  const se_UpdatePrivateDnsNamespaceCommand = async (input, context) => {
248
- const headers = {
249
- "content-type": "application/x-amz-json-1.1",
250
- "x-amz-target": "Route53AutoNaming_v20170314.UpdatePrivateDnsNamespace",
251
- };
179
+ const headers = sharedHeaders("UpdatePrivateDnsNamespace");
252
180
  let body;
253
181
  body = JSON.stringify(se_UpdatePrivateDnsNamespaceRequest(input, context));
254
182
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
255
183
  };
256
184
  exports.se_UpdatePrivateDnsNamespaceCommand = se_UpdatePrivateDnsNamespaceCommand;
257
185
  const se_UpdatePublicDnsNamespaceCommand = async (input, context) => {
258
- const headers = {
259
- "content-type": "application/x-amz-json-1.1",
260
- "x-amz-target": "Route53AutoNaming_v20170314.UpdatePublicDnsNamespace",
261
- };
186
+ const headers = sharedHeaders("UpdatePublicDnsNamespace");
262
187
  let body;
263
188
  body = JSON.stringify(se_UpdatePublicDnsNamespaceRequest(input, context));
264
189
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
265
190
  };
266
191
  exports.se_UpdatePublicDnsNamespaceCommand = se_UpdatePublicDnsNamespaceCommand;
267
192
  const se_UpdateServiceCommand = async (input, context) => {
268
- const headers = {
269
- "content-type": "application/x-amz-json-1.1",
270
- "x-amz-target": "Route53AutoNaming_v20170314.UpdateService",
271
- };
193
+ const headers = sharedHeaders("UpdateService");
272
194
  let body;
273
195
  body = JSON.stringify(se_UpdateServiceRequest(input, context));
274
196
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -2330,6 +2252,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
2330
2252
  }
2331
2253
  return new protocol_http_1.HttpRequest(contents);
2332
2254
  };
2255
+ function sharedHeaders(operation) {
2256
+ return {
2257
+ "content-type": "application/x-amz-json-1.1",
2258
+ "x-amz-target": `Route53AutoNaming_v20170314.${operation}`,
2259
+ };
2260
+ }
2333
2261
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2334
2262
  if (encoded.length) {
2335
2263
  return JSON.parse(encoded);
@@ -4,73 +4,49 @@ import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { CustomHealthNotFound, DuplicateRequest, InstanceNotFound, InvalidInput, NamespaceAlreadyExists, NamespaceNotFound, OperationNotFound, RequestLimitExceeded, ResourceInUse, ResourceLimitExceeded, ResourceNotFoundException, ServiceAlreadyExists, ServiceNotFound, TooManyTagsException, } from "../models/models_0";
5
5
  import { ServiceDiscoveryServiceException as __BaseException } from "../models/ServiceDiscoveryServiceException";
6
6
  export const se_CreateHttpNamespaceCommand = async (input, context) => {
7
- const headers = {
8
- "content-type": "application/x-amz-json-1.1",
9
- "x-amz-target": "Route53AutoNaming_v20170314.CreateHttpNamespace",
10
- };
7
+ const headers = sharedHeaders("CreateHttpNamespace");
11
8
  let body;
12
9
  body = JSON.stringify(se_CreateHttpNamespaceRequest(input, context));
13
10
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
11
  };
15
12
  export const se_CreatePrivateDnsNamespaceCommand = async (input, context) => {
16
- const headers = {
17
- "content-type": "application/x-amz-json-1.1",
18
- "x-amz-target": "Route53AutoNaming_v20170314.CreatePrivateDnsNamespace",
19
- };
13
+ const headers = sharedHeaders("CreatePrivateDnsNamespace");
20
14
  let body;
21
15
  body = JSON.stringify(se_CreatePrivateDnsNamespaceRequest(input, context));
22
16
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
17
  };
24
18
  export const se_CreatePublicDnsNamespaceCommand = async (input, context) => {
25
- const headers = {
26
- "content-type": "application/x-amz-json-1.1",
27
- "x-amz-target": "Route53AutoNaming_v20170314.CreatePublicDnsNamespace",
28
- };
19
+ const headers = sharedHeaders("CreatePublicDnsNamespace");
29
20
  let body;
30
21
  body = JSON.stringify(se_CreatePublicDnsNamespaceRequest(input, context));
31
22
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
32
23
  };
33
24
  export const se_CreateServiceCommand = async (input, context) => {
34
- const headers = {
35
- "content-type": "application/x-amz-json-1.1",
36
- "x-amz-target": "Route53AutoNaming_v20170314.CreateService",
37
- };
25
+ const headers = sharedHeaders("CreateService");
38
26
  let body;
39
27
  body = JSON.stringify(se_CreateServiceRequest(input, context));
40
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
29
  };
42
30
  export const se_DeleteNamespaceCommand = async (input, context) => {
43
- const headers = {
44
- "content-type": "application/x-amz-json-1.1",
45
- "x-amz-target": "Route53AutoNaming_v20170314.DeleteNamespace",
46
- };
31
+ const headers = sharedHeaders("DeleteNamespace");
47
32
  let body;
48
33
  body = JSON.stringify(se_DeleteNamespaceRequest(input, context));
49
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
35
  };
51
36
  export const se_DeleteServiceCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.1",
54
- "x-amz-target": "Route53AutoNaming_v20170314.DeleteService",
55
- };
37
+ const headers = sharedHeaders("DeleteService");
56
38
  let body;
57
39
  body = JSON.stringify(se_DeleteServiceRequest(input, context));
58
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
41
  };
60
42
  export const se_DeregisterInstanceCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.1",
63
- "x-amz-target": "Route53AutoNaming_v20170314.DeregisterInstance",
64
- };
43
+ const headers = sharedHeaders("DeregisterInstance");
65
44
  let body;
66
45
  body = JSON.stringify(se_DeregisterInstanceRequest(input, context));
67
46
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
47
  };
69
48
  export const se_DiscoverInstancesCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.1",
72
- "x-amz-target": "Route53AutoNaming_v20170314.DiscoverInstances",
73
- };
49
+ const headers = sharedHeaders("DiscoverInstances");
74
50
  let body;
75
51
  body = JSON.stringify(se_DiscoverInstancesRequest(input, context));
76
52
  let { hostname: resolvedHostname } = await context.endpoint();
@@ -83,163 +59,109 @@ export const se_DiscoverInstancesCommand = async (input, context) => {
83
59
  return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
84
60
  };
85
61
  export const se_GetInstanceCommand = async (input, context) => {
86
- const headers = {
87
- "content-type": "application/x-amz-json-1.1",
88
- "x-amz-target": "Route53AutoNaming_v20170314.GetInstance",
89
- };
62
+ const headers = sharedHeaders("GetInstance");
90
63
  let body;
91
64
  body = JSON.stringify(se_GetInstanceRequest(input, context));
92
65
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
93
66
  };
94
67
  export const se_GetInstancesHealthStatusCommand = async (input, context) => {
95
- const headers = {
96
- "content-type": "application/x-amz-json-1.1",
97
- "x-amz-target": "Route53AutoNaming_v20170314.GetInstancesHealthStatus",
98
- };
68
+ const headers = sharedHeaders("GetInstancesHealthStatus");
99
69
  let body;
100
70
  body = JSON.stringify(se_GetInstancesHealthStatusRequest(input, context));
101
71
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
102
72
  };
103
73
  export const se_GetNamespaceCommand = async (input, context) => {
104
- const headers = {
105
- "content-type": "application/x-amz-json-1.1",
106
- "x-amz-target": "Route53AutoNaming_v20170314.GetNamespace",
107
- };
74
+ const headers = sharedHeaders("GetNamespace");
108
75
  let body;
109
76
  body = JSON.stringify(se_GetNamespaceRequest(input, context));
110
77
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
111
78
  };
112
79
  export const se_GetOperationCommand = async (input, context) => {
113
- const headers = {
114
- "content-type": "application/x-amz-json-1.1",
115
- "x-amz-target": "Route53AutoNaming_v20170314.GetOperation",
116
- };
80
+ const headers = sharedHeaders("GetOperation");
117
81
  let body;
118
82
  body = JSON.stringify(se_GetOperationRequest(input, context));
119
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
120
84
  };
121
85
  export const se_GetServiceCommand = async (input, context) => {
122
- const headers = {
123
- "content-type": "application/x-amz-json-1.1",
124
- "x-amz-target": "Route53AutoNaming_v20170314.GetService",
125
- };
86
+ const headers = sharedHeaders("GetService");
126
87
  let body;
127
88
  body = JSON.stringify(se_GetServiceRequest(input, context));
128
89
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
129
90
  };
130
91
  export const se_ListInstancesCommand = async (input, context) => {
131
- const headers = {
132
- "content-type": "application/x-amz-json-1.1",
133
- "x-amz-target": "Route53AutoNaming_v20170314.ListInstances",
134
- };
92
+ const headers = sharedHeaders("ListInstances");
135
93
  let body;
136
94
  body = JSON.stringify(se_ListInstancesRequest(input, context));
137
95
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
138
96
  };
139
97
  export const se_ListNamespacesCommand = async (input, context) => {
140
- const headers = {
141
- "content-type": "application/x-amz-json-1.1",
142
- "x-amz-target": "Route53AutoNaming_v20170314.ListNamespaces",
143
- };
98
+ const headers = sharedHeaders("ListNamespaces");
144
99
  let body;
145
100
  body = JSON.stringify(se_ListNamespacesRequest(input, context));
146
101
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
102
  };
148
103
  export const se_ListOperationsCommand = async (input, context) => {
149
- const headers = {
150
- "content-type": "application/x-amz-json-1.1",
151
- "x-amz-target": "Route53AutoNaming_v20170314.ListOperations",
152
- };
104
+ const headers = sharedHeaders("ListOperations");
153
105
  let body;
154
106
  body = JSON.stringify(se_ListOperationsRequest(input, context));
155
107
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
156
108
  };
157
109
  export const se_ListServicesCommand = async (input, context) => {
158
- const headers = {
159
- "content-type": "application/x-amz-json-1.1",
160
- "x-amz-target": "Route53AutoNaming_v20170314.ListServices",
161
- };
110
+ const headers = sharedHeaders("ListServices");
162
111
  let body;
163
112
  body = JSON.stringify(se_ListServicesRequest(input, context));
164
113
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
165
114
  };
166
115
  export const se_ListTagsForResourceCommand = async (input, context) => {
167
- const headers = {
168
- "content-type": "application/x-amz-json-1.1",
169
- "x-amz-target": "Route53AutoNaming_v20170314.ListTagsForResource",
170
- };
116
+ const headers = sharedHeaders("ListTagsForResource");
171
117
  let body;
172
118
  body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
173
119
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
174
120
  };
175
121
  export const se_RegisterInstanceCommand = async (input, context) => {
176
- const headers = {
177
- "content-type": "application/x-amz-json-1.1",
178
- "x-amz-target": "Route53AutoNaming_v20170314.RegisterInstance",
179
- };
122
+ const headers = sharedHeaders("RegisterInstance");
180
123
  let body;
181
124
  body = JSON.stringify(se_RegisterInstanceRequest(input, context));
182
125
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
183
126
  };
184
127
  export const se_TagResourceCommand = async (input, context) => {
185
- const headers = {
186
- "content-type": "application/x-amz-json-1.1",
187
- "x-amz-target": "Route53AutoNaming_v20170314.TagResource",
188
- };
128
+ const headers = sharedHeaders("TagResource");
189
129
  let body;
190
130
  body = JSON.stringify(se_TagResourceRequest(input, context));
191
131
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
192
132
  };
193
133
  export const se_UntagResourceCommand = async (input, context) => {
194
- const headers = {
195
- "content-type": "application/x-amz-json-1.1",
196
- "x-amz-target": "Route53AutoNaming_v20170314.UntagResource",
197
- };
134
+ const headers = sharedHeaders("UntagResource");
198
135
  let body;
199
136
  body = JSON.stringify(se_UntagResourceRequest(input, context));
200
137
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
201
138
  };
202
139
  export const se_UpdateHttpNamespaceCommand = async (input, context) => {
203
- const headers = {
204
- "content-type": "application/x-amz-json-1.1",
205
- "x-amz-target": "Route53AutoNaming_v20170314.UpdateHttpNamespace",
206
- };
140
+ const headers = sharedHeaders("UpdateHttpNamespace");
207
141
  let body;
208
142
  body = JSON.stringify(se_UpdateHttpNamespaceRequest(input, context));
209
143
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
144
  };
211
145
  export const se_UpdateInstanceCustomHealthStatusCommand = async (input, context) => {
212
- const headers = {
213
- "content-type": "application/x-amz-json-1.1",
214
- "x-amz-target": "Route53AutoNaming_v20170314.UpdateInstanceCustomHealthStatus",
215
- };
146
+ const headers = sharedHeaders("UpdateInstanceCustomHealthStatus");
216
147
  let body;
217
148
  body = JSON.stringify(se_UpdateInstanceCustomHealthStatusRequest(input, context));
218
149
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
219
150
  };
220
151
  export const se_UpdatePrivateDnsNamespaceCommand = async (input, context) => {
221
- const headers = {
222
- "content-type": "application/x-amz-json-1.1",
223
- "x-amz-target": "Route53AutoNaming_v20170314.UpdatePrivateDnsNamespace",
224
- };
152
+ const headers = sharedHeaders("UpdatePrivateDnsNamespace");
225
153
  let body;
226
154
  body = JSON.stringify(se_UpdatePrivateDnsNamespaceRequest(input, context));
227
155
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
228
156
  };
229
157
  export const se_UpdatePublicDnsNamespaceCommand = async (input, context) => {
230
- const headers = {
231
- "content-type": "application/x-amz-json-1.1",
232
- "x-amz-target": "Route53AutoNaming_v20170314.UpdatePublicDnsNamespace",
233
- };
158
+ const headers = sharedHeaders("UpdatePublicDnsNamespace");
234
159
  let body;
235
160
  body = JSON.stringify(se_UpdatePublicDnsNamespaceRequest(input, context));
236
161
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
237
162
  };
238
163
  export const se_UpdateServiceCommand = async (input, context) => {
239
- const headers = {
240
- "content-type": "application/x-amz-json-1.1",
241
- "x-amz-target": "Route53AutoNaming_v20170314.UpdateService",
242
- };
164
+ const headers = sharedHeaders("UpdateService");
243
165
  let body;
244
166
  body = JSON.stringify(se_UpdateServiceRequest(input, context));
245
167
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -2274,6 +2196,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
2274
2196
  }
2275
2197
  return new __HttpRequest(contents);
2276
2198
  };
2199
+ function sharedHeaders(operation) {
2200
+ return {
2201
+ "content-type": "application/x-amz-json-1.1",
2202
+ "x-amz-target": `Route53AutoNaming_v20170314.${operation}`,
2203
+ };
2204
+ }
2277
2205
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2278
2206
  if (encoded.length) {
2279
2207
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-servicediscovery",
3
3
  "description": "AWS SDK for JavaScript Servicediscovery Client for Node.js, Browser and React Native",
4
- "version": "3.309.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,43 +21,43 @@
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.309.0",
25
- "@aws-sdk/config-resolver": "3.306.0",
26
- "@aws-sdk/credential-provider-node": "3.309.0",
27
- "@aws-sdk/fetch-http-handler": "3.306.0",
28
- "@aws-sdk/hash-node": "3.306.0",
29
- "@aws-sdk/invalid-dependency": "3.306.0",
30
- "@aws-sdk/middleware-content-length": "3.306.0",
31
- "@aws-sdk/middleware-endpoint": "3.306.0",
32
- "@aws-sdk/middleware-host-header": "3.306.0",
33
- "@aws-sdk/middleware-logger": "3.306.0",
34
- "@aws-sdk/middleware-recursion-detection": "3.306.0",
35
- "@aws-sdk/middleware-retry": "3.306.0",
36
- "@aws-sdk/middleware-serde": "3.306.0",
37
- "@aws-sdk/middleware-signing": "3.306.0",
38
- "@aws-sdk/middleware-stack": "3.306.0",
39
- "@aws-sdk/middleware-user-agent": "3.306.0",
40
- "@aws-sdk/node-config-provider": "3.306.0",
41
- "@aws-sdk/node-http-handler": "3.306.0",
42
- "@aws-sdk/protocol-http": "3.306.0",
43
- "@aws-sdk/smithy-client": "3.309.0",
44
- "@aws-sdk/types": "3.306.0",
45
- "@aws-sdk/url-parser": "3.306.0",
46
- "@aws-sdk/util-base64": "3.303.0",
47
- "@aws-sdk/util-body-length-browser": "3.303.0",
48
- "@aws-sdk/util-body-length-node": "3.303.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.309.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.309.0",
51
- "@aws-sdk/util-endpoints": "3.306.0",
52
- "@aws-sdk/util-retry": "3.306.0",
53
- "@aws-sdk/util-user-agent-browser": "3.306.0",
54
- "@aws-sdk/util-user-agent-node": "3.306.0",
55
- "@aws-sdk/util-utf8": "3.303.0",
24
+ "@aws-sdk/client-sts": "3.312.0",
25
+ "@aws-sdk/config-resolver": "3.310.0",
26
+ "@aws-sdk/credential-provider-node": "3.310.0",
27
+ "@aws-sdk/fetch-http-handler": "3.310.0",
28
+ "@aws-sdk/hash-node": "3.310.0",
29
+ "@aws-sdk/invalid-dependency": "3.310.0",
30
+ "@aws-sdk/middleware-content-length": "3.310.0",
31
+ "@aws-sdk/middleware-endpoint": "3.310.0",
32
+ "@aws-sdk/middleware-host-header": "3.310.0",
33
+ "@aws-sdk/middleware-logger": "3.310.0",
34
+ "@aws-sdk/middleware-recursion-detection": "3.310.0",
35
+ "@aws-sdk/middleware-retry": "3.310.0",
36
+ "@aws-sdk/middleware-serde": "3.310.0",
37
+ "@aws-sdk/middleware-signing": "3.310.0",
38
+ "@aws-sdk/middleware-stack": "3.310.0",
39
+ "@aws-sdk/middleware-user-agent": "3.310.0",
40
+ "@aws-sdk/node-config-provider": "3.310.0",
41
+ "@aws-sdk/node-http-handler": "3.310.0",
42
+ "@aws-sdk/protocol-http": "3.310.0",
43
+ "@aws-sdk/smithy-client": "3.310.0",
44
+ "@aws-sdk/types": "3.310.0",
45
+ "@aws-sdk/url-parser": "3.310.0",
46
+ "@aws-sdk/util-base64": "3.310.0",
47
+ "@aws-sdk/util-body-length-browser": "3.310.0",
48
+ "@aws-sdk/util-body-length-node": "3.310.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.310.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.310.0",
51
+ "@aws-sdk/util-endpoints": "3.310.0",
52
+ "@aws-sdk/util-retry": "3.310.0",
53
+ "@aws-sdk/util-user-agent-browser": "3.310.0",
54
+ "@aws-sdk/util-user-agent-node": "3.310.0",
55
+ "@aws-sdk/util-utf8": "3.310.0",
56
56
  "tslib": "^2.5.0",
57
57
  "uuid": "^8.3.2"
58
58
  },
59
59
  "devDependencies": {
60
- "@aws-sdk/service-client-documentation-generator": "3.303.0",
60
+ "@aws-sdk/service-client-documentation-generator": "3.310.0",
61
61
  "@tsconfig/node14": "1.0.3",
62
62
  "@types/node": "^14.14.31",
63
63
  "@types/uuid": "^8.3.0",
@@ -78,7 +78,7 @@
78
78
  }
79
79
  },
80
80
  "files": [
81
- "dist-*"
81
+ "dist-*/**"
82
82
  ],
83
83
  "author": {
84
84
  "name": "AWS SDK for JavaScript Team",