@aws-sdk/client-opensearch 3.460.0 → 3.462.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/dist-cjs/OpenSearch.js +10 -0
- package/dist-cjs/commands/AddDataSourceCommand.js +51 -0
- package/dist-cjs/commands/DeleteDataSourceCommand.js +51 -0
- package/dist-cjs/commands/GetDataSourceCommand.js +51 -0
- package/dist-cjs/commands/ListDataSourcesCommand.js +51 -0
- package/dist-cjs/commands/UpdateDataSourceCommand.js +51 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/models/models_0.js +23 -15
- package/dist-cjs/protocols/Aws_restJson1.js +360 -3
- package/dist-es/OpenSearch.js +10 -0
- package/dist-es/commands/AddDataSourceCommand.js +47 -0
- package/dist-es/commands/DeleteDataSourceCommand.js +47 -0
- package/dist-es/commands/GetDataSourceCommand.js +47 -0
- package/dist-es/commands/ListDataSourcesCommand.js +47 -0
- package/dist-es/commands/UpdateDataSourceCommand.js +47 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +20 -12
- package/dist-es/protocols/Aws_restJson1.js +347 -0
- package/dist-types/OpenSearch.d.ts +35 -0
- package/dist-types/OpenSearchClient.d.ts +7 -2
- package/dist-types/commands/AddDataSourceCommand.d.ts +101 -0
- package/dist-types/commands/DeleteDataSourceCommand.d.ts +92 -0
- package/dist-types/commands/GetDataSourceCommand.d.ts +98 -0
- package/dist-types/commands/ListDataSourcesCommand.d.ts +101 -0
- package/dist-types/commands/UpdateDataSourceCommand.d.ts +98 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/models_0.d.ts +291 -54
- package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
- package/dist-types/ts3.4/OpenSearch.d.ts +85 -0
- package/dist-types/ts3.4/OpenSearchClient.d.ts +30 -0
- package/dist-types/ts3.4/commands/AddDataSourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteDataSourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetDataSourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListDataSourcesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateDataSourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/models_0.d.ts +82 -16
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
- package/package.json +3 -3
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_ListDataSourcesCommand, se_ListDataSourcesCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class ListDataSourcesCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, ListDataSourcesCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "OpenSearchClient";
|
|
26
|
+
const commandName = "ListDataSourcesCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonOpenSearchService",
|
|
35
|
+
operation: "ListDataSources",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_ListDataSourcesCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_ListDataSourcesCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_UpdateDataSourceCommand, se_UpdateDataSourceCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class UpdateDataSourceCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, UpdateDataSourceCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "OpenSearchClient";
|
|
26
|
+
const commandName = "UpdateDataSourceCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonOpenSearchService",
|
|
35
|
+
operation: "UpdateDataSource",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_UpdateDataSourceCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_UpdateDataSourceCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./AcceptInboundConnectionCommand";
|
|
2
|
+
export * from "./AddDataSourceCommand";
|
|
2
3
|
export * from "./AddTagsCommand";
|
|
3
4
|
export * from "./AssociatePackageCommand";
|
|
4
5
|
export * from "./AuthorizeVpcEndpointAccessCommand";
|
|
@@ -7,6 +8,7 @@ export * from "./CreateDomainCommand";
|
|
|
7
8
|
export * from "./CreateOutboundConnectionCommand";
|
|
8
9
|
export * from "./CreatePackageCommand";
|
|
9
10
|
export * from "./CreateVpcEndpointCommand";
|
|
11
|
+
export * from "./DeleteDataSourceCommand";
|
|
10
12
|
export * from "./DeleteDomainCommand";
|
|
11
13
|
export * from "./DeleteInboundConnectionCommand";
|
|
12
14
|
export * from "./DeleteOutboundConnectionCommand";
|
|
@@ -29,10 +31,12 @@ export * from "./DescribeReservedInstancesCommand";
|
|
|
29
31
|
export * from "./DescribeVpcEndpointsCommand";
|
|
30
32
|
export * from "./DissociatePackageCommand";
|
|
31
33
|
export * from "./GetCompatibleVersionsCommand";
|
|
34
|
+
export * from "./GetDataSourceCommand";
|
|
32
35
|
export * from "./GetDomainMaintenanceStatusCommand";
|
|
33
36
|
export * from "./GetPackageVersionHistoryCommand";
|
|
34
37
|
export * from "./GetUpgradeHistoryCommand";
|
|
35
38
|
export * from "./GetUpgradeStatusCommand";
|
|
39
|
+
export * from "./ListDataSourcesCommand";
|
|
36
40
|
export * from "./ListDomainMaintenancesCommand";
|
|
37
41
|
export * from "./ListDomainNamesCommand";
|
|
38
42
|
export * from "./ListDomainsForPackageCommand";
|
|
@@ -50,6 +54,7 @@ export * from "./RemoveTagsCommand";
|
|
|
50
54
|
export * from "./RevokeVpcEndpointAccessCommand";
|
|
51
55
|
export * from "./StartDomainMaintenanceCommand";
|
|
52
56
|
export * from "./StartServiceSoftwareUpdateCommand";
|
|
57
|
+
export * from "./UpdateDataSourceCommand";
|
|
53
58
|
export * from "./UpdateDomainConfigCommand";
|
|
54
59
|
export * from "./UpdatePackageCommand";
|
|
55
60
|
export * from "./UpdateScheduledActionCommand";
|
|
@@ -85,6 +85,14 @@ export const ActionType = {
|
|
|
85
85
|
JVM_YOUNG_GEN_TUNING: "JVM_YOUNG_GEN_TUNING",
|
|
86
86
|
SERVICE_SOFTWARE_UPDATE: "SERVICE_SOFTWARE_UPDATE",
|
|
87
87
|
};
|
|
88
|
+
export var DataSourceType;
|
|
89
|
+
(function (DataSourceType) {
|
|
90
|
+
DataSourceType.visit = (value, visitor) => {
|
|
91
|
+
if (value.S3GlueDataCatalog !== undefined)
|
|
92
|
+
return visitor.S3GlueDataCatalog(value.S3GlueDataCatalog);
|
|
93
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
94
|
+
};
|
|
95
|
+
})(DataSourceType || (DataSourceType = {}));
|
|
88
96
|
export class BaseException extends __BaseException {
|
|
89
97
|
constructor(opts) {
|
|
90
98
|
super({
|
|
@@ -97,6 +105,18 @@ export class BaseException extends __BaseException {
|
|
|
97
105
|
Object.setPrototypeOf(this, BaseException.prototype);
|
|
98
106
|
}
|
|
99
107
|
}
|
|
108
|
+
export class DependencyFailureException extends __BaseException {
|
|
109
|
+
constructor(opts) {
|
|
110
|
+
super({
|
|
111
|
+
name: "DependencyFailureException",
|
|
112
|
+
$fault: "client",
|
|
113
|
+
...opts,
|
|
114
|
+
});
|
|
115
|
+
this.name = "DependencyFailureException";
|
|
116
|
+
this.$fault = "client";
|
|
117
|
+
Object.setPrototypeOf(this, DependencyFailureException.prototype);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
100
120
|
export class InternalException extends __BaseException {
|
|
101
121
|
constructor(opts) {
|
|
102
122
|
super({
|
|
@@ -396,18 +416,6 @@ export const MasterNodeStatus = {
|
|
|
396
416
|
Available: "Available",
|
|
397
417
|
UnAvailable: "UnAvailable",
|
|
398
418
|
};
|
|
399
|
-
export class DependencyFailureException extends __BaseException {
|
|
400
|
-
constructor(opts) {
|
|
401
|
-
super({
|
|
402
|
-
name: "DependencyFailureException",
|
|
403
|
-
$fault: "client",
|
|
404
|
-
...opts,
|
|
405
|
-
});
|
|
406
|
-
this.name = "DependencyFailureException";
|
|
407
|
-
this.$fault = "client";
|
|
408
|
-
Object.setPrototypeOf(this, DependencyFailureException.prototype);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
419
|
export const NodeStatus = {
|
|
412
420
|
Active: "Active",
|
|
413
421
|
NotAvailable: "NotAvailable",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { AccessDeniedException, BaseException, ConflictException, DependencyFailureException, DisabledOperationException, InternalException, InvalidPaginationTokenException, InvalidTypeException, LimitExceededException, ResourceAlreadyExistsException, ResourceNotFoundException, SlotNotAvailableException, ValidationException, } from "../models/models_0";
|
|
@@ -19,6 +20,30 @@ export const se_AcceptInboundConnectionCommand = async (input, context) => {
|
|
|
19
20
|
body,
|
|
20
21
|
});
|
|
21
22
|
};
|
|
23
|
+
export const se_AddDataSourceCommand = async (input, context) => {
|
|
24
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
25
|
+
const headers = {
|
|
26
|
+
"content-type": "application/json",
|
|
27
|
+
};
|
|
28
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
29
|
+
"/2021-01-01/opensearch/domain/{DomainName}/dataSource";
|
|
30
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
|
|
31
|
+
let body;
|
|
32
|
+
body = JSON.stringify(take(input, {
|
|
33
|
+
DataSourceType: (_) => _json(_),
|
|
34
|
+
Description: [],
|
|
35
|
+
Name: [],
|
|
36
|
+
}));
|
|
37
|
+
return new __HttpRequest({
|
|
38
|
+
protocol,
|
|
39
|
+
hostname,
|
|
40
|
+
port,
|
|
41
|
+
method: "POST",
|
|
42
|
+
headers,
|
|
43
|
+
path: resolvedPath,
|
|
44
|
+
body,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
22
47
|
export const se_AddTagsCommand = async (input, context) => {
|
|
23
48
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
24
49
|
const headers = {
|
|
@@ -209,6 +234,24 @@ export const se_CreateVpcEndpointCommand = async (input, context) => {
|
|
|
209
234
|
body,
|
|
210
235
|
});
|
|
211
236
|
};
|
|
237
|
+
export const se_DeleteDataSourceCommand = async (input, context) => {
|
|
238
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
239
|
+
const headers = {};
|
|
240
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
241
|
+
"/2021-01-01/opensearch/domain/{DomainName}/dataSource/{Name}";
|
|
242
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
|
|
243
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
244
|
+
let body;
|
|
245
|
+
return new __HttpRequest({
|
|
246
|
+
protocol,
|
|
247
|
+
hostname,
|
|
248
|
+
port,
|
|
249
|
+
method: "DELETE",
|
|
250
|
+
headers,
|
|
251
|
+
path: resolvedPath,
|
|
252
|
+
body,
|
|
253
|
+
});
|
|
254
|
+
};
|
|
212
255
|
export const se_DeleteDomainCommand = async (input, context) => {
|
|
213
256
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
214
257
|
const headers = {};
|
|
@@ -638,6 +681,24 @@ export const se_GetCompatibleVersionsCommand = async (input, context) => {
|
|
|
638
681
|
body,
|
|
639
682
|
});
|
|
640
683
|
};
|
|
684
|
+
export const se_GetDataSourceCommand = async (input, context) => {
|
|
685
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
686
|
+
const headers = {};
|
|
687
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
688
|
+
"/2021-01-01/opensearch/domain/{DomainName}/dataSource/{Name}";
|
|
689
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
|
|
690
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
691
|
+
let body;
|
|
692
|
+
return new __HttpRequest({
|
|
693
|
+
protocol,
|
|
694
|
+
hostname,
|
|
695
|
+
port,
|
|
696
|
+
method: "GET",
|
|
697
|
+
headers,
|
|
698
|
+
path: resolvedPath,
|
|
699
|
+
body,
|
|
700
|
+
});
|
|
701
|
+
};
|
|
641
702
|
export const se_GetDomainMaintenanceStatusCommand = async (input, context) => {
|
|
642
703
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
643
704
|
const headers = {};
|
|
@@ -719,6 +780,23 @@ export const se_GetUpgradeStatusCommand = async (input, context) => {
|
|
|
719
780
|
body,
|
|
720
781
|
});
|
|
721
782
|
};
|
|
783
|
+
export const se_ListDataSourcesCommand = async (input, context) => {
|
|
784
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
785
|
+
const headers = {};
|
|
786
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
787
|
+
"/2021-01-01/opensearch/domain/{DomainName}/dataSource";
|
|
788
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
|
|
789
|
+
let body;
|
|
790
|
+
return new __HttpRequest({
|
|
791
|
+
protocol,
|
|
792
|
+
hostname,
|
|
793
|
+
port,
|
|
794
|
+
method: "GET",
|
|
795
|
+
headers,
|
|
796
|
+
path: resolvedPath,
|
|
797
|
+
body,
|
|
798
|
+
});
|
|
799
|
+
};
|
|
722
800
|
export const se_ListDomainMaintenancesCommand = async (input, context) => {
|
|
723
801
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
724
802
|
const headers = {};
|
|
@@ -1080,6 +1158,30 @@ export const se_StartServiceSoftwareUpdateCommand = async (input, context) => {
|
|
|
1080
1158
|
body,
|
|
1081
1159
|
});
|
|
1082
1160
|
};
|
|
1161
|
+
export const se_UpdateDataSourceCommand = async (input, context) => {
|
|
1162
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1163
|
+
const headers = {
|
|
1164
|
+
"content-type": "application/json",
|
|
1165
|
+
};
|
|
1166
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1167
|
+
"/2021-01-01/opensearch/domain/{DomainName}/dataSource/{Name}";
|
|
1168
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
|
|
1169
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
1170
|
+
let body;
|
|
1171
|
+
body = JSON.stringify(take(input, {
|
|
1172
|
+
DataSourceType: (_) => _json(_),
|
|
1173
|
+
Description: [],
|
|
1174
|
+
}));
|
|
1175
|
+
return new __HttpRequest({
|
|
1176
|
+
protocol,
|
|
1177
|
+
hostname,
|
|
1178
|
+
port,
|
|
1179
|
+
method: "PUT",
|
|
1180
|
+
headers,
|
|
1181
|
+
path: resolvedPath,
|
|
1182
|
+
body,
|
|
1183
|
+
});
|
|
1184
|
+
};
|
|
1083
1185
|
export const se_UpdateDomainConfigCommand = async (input, context) => {
|
|
1084
1186
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1085
1187
|
const headers = {
|
|
@@ -1251,6 +1353,57 @@ const de_AcceptInboundConnectionCommandError = async (output, context) => {
|
|
|
1251
1353
|
});
|
|
1252
1354
|
}
|
|
1253
1355
|
};
|
|
1356
|
+
export const de_AddDataSourceCommand = async (output, context) => {
|
|
1357
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1358
|
+
return de_AddDataSourceCommandError(output, context);
|
|
1359
|
+
}
|
|
1360
|
+
const contents = map({
|
|
1361
|
+
$metadata: deserializeMetadata(output),
|
|
1362
|
+
});
|
|
1363
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1364
|
+
const doc = take(data, {
|
|
1365
|
+
Message: __expectString,
|
|
1366
|
+
});
|
|
1367
|
+
Object.assign(contents, doc);
|
|
1368
|
+
return contents;
|
|
1369
|
+
};
|
|
1370
|
+
const de_AddDataSourceCommandError = async (output, context) => {
|
|
1371
|
+
const parsedOutput = {
|
|
1372
|
+
...output,
|
|
1373
|
+
body: await parseErrorBody(output.body, context),
|
|
1374
|
+
};
|
|
1375
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1376
|
+
switch (errorCode) {
|
|
1377
|
+
case "BaseException":
|
|
1378
|
+
case "com.amazonaws.opensearch#BaseException":
|
|
1379
|
+
throw await de_BaseExceptionRes(parsedOutput, context);
|
|
1380
|
+
case "DependencyFailureException":
|
|
1381
|
+
case "com.amazonaws.opensearch#DependencyFailureException":
|
|
1382
|
+
throw await de_DependencyFailureExceptionRes(parsedOutput, context);
|
|
1383
|
+
case "DisabledOperationException":
|
|
1384
|
+
case "com.amazonaws.opensearch#DisabledOperationException":
|
|
1385
|
+
throw await de_DisabledOperationExceptionRes(parsedOutput, context);
|
|
1386
|
+
case "InternalException":
|
|
1387
|
+
case "com.amazonaws.opensearch#InternalException":
|
|
1388
|
+
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1389
|
+
case "LimitExceededException":
|
|
1390
|
+
case "com.amazonaws.opensearch#LimitExceededException":
|
|
1391
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1392
|
+
case "ResourceNotFoundException":
|
|
1393
|
+
case "com.amazonaws.opensearch#ResourceNotFoundException":
|
|
1394
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1395
|
+
case "ValidationException":
|
|
1396
|
+
case "com.amazonaws.opensearch#ValidationException":
|
|
1397
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1398
|
+
default:
|
|
1399
|
+
const parsedBody = parsedOutput.body;
|
|
1400
|
+
return throwDefaultError({
|
|
1401
|
+
output,
|
|
1402
|
+
parsedBody,
|
|
1403
|
+
errorCode,
|
|
1404
|
+
});
|
|
1405
|
+
}
|
|
1406
|
+
};
|
|
1254
1407
|
export const de_AddTagsCommand = async (output, context) => {
|
|
1255
1408
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1256
1409
|
return de_AddTagsCommandError(output, context);
|
|
@@ -1625,6 +1778,54 @@ const de_CreateVpcEndpointCommandError = async (output, context) => {
|
|
|
1625
1778
|
});
|
|
1626
1779
|
}
|
|
1627
1780
|
};
|
|
1781
|
+
export const de_DeleteDataSourceCommand = async (output, context) => {
|
|
1782
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1783
|
+
return de_DeleteDataSourceCommandError(output, context);
|
|
1784
|
+
}
|
|
1785
|
+
const contents = map({
|
|
1786
|
+
$metadata: deserializeMetadata(output),
|
|
1787
|
+
});
|
|
1788
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1789
|
+
const doc = take(data, {
|
|
1790
|
+
Message: __expectString,
|
|
1791
|
+
});
|
|
1792
|
+
Object.assign(contents, doc);
|
|
1793
|
+
return contents;
|
|
1794
|
+
};
|
|
1795
|
+
const de_DeleteDataSourceCommandError = async (output, context) => {
|
|
1796
|
+
const parsedOutput = {
|
|
1797
|
+
...output,
|
|
1798
|
+
body: await parseErrorBody(output.body, context),
|
|
1799
|
+
};
|
|
1800
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1801
|
+
switch (errorCode) {
|
|
1802
|
+
case "BaseException":
|
|
1803
|
+
case "com.amazonaws.opensearch#BaseException":
|
|
1804
|
+
throw await de_BaseExceptionRes(parsedOutput, context);
|
|
1805
|
+
case "DependencyFailureException":
|
|
1806
|
+
case "com.amazonaws.opensearch#DependencyFailureException":
|
|
1807
|
+
throw await de_DependencyFailureExceptionRes(parsedOutput, context);
|
|
1808
|
+
case "DisabledOperationException":
|
|
1809
|
+
case "com.amazonaws.opensearch#DisabledOperationException":
|
|
1810
|
+
throw await de_DisabledOperationExceptionRes(parsedOutput, context);
|
|
1811
|
+
case "InternalException":
|
|
1812
|
+
case "com.amazonaws.opensearch#InternalException":
|
|
1813
|
+
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1814
|
+
case "ResourceNotFoundException":
|
|
1815
|
+
case "com.amazonaws.opensearch#ResourceNotFoundException":
|
|
1816
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1817
|
+
case "ValidationException":
|
|
1818
|
+
case "com.amazonaws.opensearch#ValidationException":
|
|
1819
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1820
|
+
default:
|
|
1821
|
+
const parsedBody = parsedOutput.body;
|
|
1822
|
+
return throwDefaultError({
|
|
1823
|
+
output,
|
|
1824
|
+
parsedBody,
|
|
1825
|
+
errorCode,
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
};
|
|
1628
1829
|
export const de_DeleteDomainCommand = async (output, context) => {
|
|
1629
1830
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1630
1831
|
return de_DeleteDomainCommandError(output, context);
|
|
@@ -2579,6 +2780,56 @@ const de_GetCompatibleVersionsCommandError = async (output, context) => {
|
|
|
2579
2780
|
});
|
|
2580
2781
|
}
|
|
2581
2782
|
};
|
|
2783
|
+
export const de_GetDataSourceCommand = async (output, context) => {
|
|
2784
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2785
|
+
return de_GetDataSourceCommandError(output, context);
|
|
2786
|
+
}
|
|
2787
|
+
const contents = map({
|
|
2788
|
+
$metadata: deserializeMetadata(output),
|
|
2789
|
+
});
|
|
2790
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2791
|
+
const doc = take(data, {
|
|
2792
|
+
DataSourceType: (_) => _json(__expectUnion(_)),
|
|
2793
|
+
Description: __expectString,
|
|
2794
|
+
Name: __expectString,
|
|
2795
|
+
});
|
|
2796
|
+
Object.assign(contents, doc);
|
|
2797
|
+
return contents;
|
|
2798
|
+
};
|
|
2799
|
+
const de_GetDataSourceCommandError = async (output, context) => {
|
|
2800
|
+
const parsedOutput = {
|
|
2801
|
+
...output,
|
|
2802
|
+
body: await parseErrorBody(output.body, context),
|
|
2803
|
+
};
|
|
2804
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2805
|
+
switch (errorCode) {
|
|
2806
|
+
case "BaseException":
|
|
2807
|
+
case "com.amazonaws.opensearch#BaseException":
|
|
2808
|
+
throw await de_BaseExceptionRes(parsedOutput, context);
|
|
2809
|
+
case "DependencyFailureException":
|
|
2810
|
+
case "com.amazonaws.opensearch#DependencyFailureException":
|
|
2811
|
+
throw await de_DependencyFailureExceptionRes(parsedOutput, context);
|
|
2812
|
+
case "DisabledOperationException":
|
|
2813
|
+
case "com.amazonaws.opensearch#DisabledOperationException":
|
|
2814
|
+
throw await de_DisabledOperationExceptionRes(parsedOutput, context);
|
|
2815
|
+
case "InternalException":
|
|
2816
|
+
case "com.amazonaws.opensearch#InternalException":
|
|
2817
|
+
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
2818
|
+
case "ResourceNotFoundException":
|
|
2819
|
+
case "com.amazonaws.opensearch#ResourceNotFoundException":
|
|
2820
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2821
|
+
case "ValidationException":
|
|
2822
|
+
case "com.amazonaws.opensearch#ValidationException":
|
|
2823
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2824
|
+
default:
|
|
2825
|
+
const parsedBody = parsedOutput.body;
|
|
2826
|
+
return throwDefaultError({
|
|
2827
|
+
output,
|
|
2828
|
+
parsedBody,
|
|
2829
|
+
errorCode,
|
|
2830
|
+
});
|
|
2831
|
+
}
|
|
2832
|
+
};
|
|
2582
2833
|
export const de_GetDomainMaintenanceStatusCommand = async (output, context) => {
|
|
2583
2834
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2584
2835
|
return de_GetDomainMaintenanceStatusCommandError(output, context);
|
|
@@ -2769,6 +3020,54 @@ const de_GetUpgradeStatusCommandError = async (output, context) => {
|
|
|
2769
3020
|
});
|
|
2770
3021
|
}
|
|
2771
3022
|
};
|
|
3023
|
+
export const de_ListDataSourcesCommand = async (output, context) => {
|
|
3024
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3025
|
+
return de_ListDataSourcesCommandError(output, context);
|
|
3026
|
+
}
|
|
3027
|
+
const contents = map({
|
|
3028
|
+
$metadata: deserializeMetadata(output),
|
|
3029
|
+
});
|
|
3030
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3031
|
+
const doc = take(data, {
|
|
3032
|
+
DataSources: _json,
|
|
3033
|
+
});
|
|
3034
|
+
Object.assign(contents, doc);
|
|
3035
|
+
return contents;
|
|
3036
|
+
};
|
|
3037
|
+
const de_ListDataSourcesCommandError = async (output, context) => {
|
|
3038
|
+
const parsedOutput = {
|
|
3039
|
+
...output,
|
|
3040
|
+
body: await parseErrorBody(output.body, context),
|
|
3041
|
+
};
|
|
3042
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3043
|
+
switch (errorCode) {
|
|
3044
|
+
case "BaseException":
|
|
3045
|
+
case "com.amazonaws.opensearch#BaseException":
|
|
3046
|
+
throw await de_BaseExceptionRes(parsedOutput, context);
|
|
3047
|
+
case "DependencyFailureException":
|
|
3048
|
+
case "com.amazonaws.opensearch#DependencyFailureException":
|
|
3049
|
+
throw await de_DependencyFailureExceptionRes(parsedOutput, context);
|
|
3050
|
+
case "DisabledOperationException":
|
|
3051
|
+
case "com.amazonaws.opensearch#DisabledOperationException":
|
|
3052
|
+
throw await de_DisabledOperationExceptionRes(parsedOutput, context);
|
|
3053
|
+
case "InternalException":
|
|
3054
|
+
case "com.amazonaws.opensearch#InternalException":
|
|
3055
|
+
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
3056
|
+
case "ResourceNotFoundException":
|
|
3057
|
+
case "com.amazonaws.opensearch#ResourceNotFoundException":
|
|
3058
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
3059
|
+
case "ValidationException":
|
|
3060
|
+
case "com.amazonaws.opensearch#ValidationException":
|
|
3061
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
3062
|
+
default:
|
|
3063
|
+
const parsedBody = parsedOutput.body;
|
|
3064
|
+
return throwDefaultError({
|
|
3065
|
+
output,
|
|
3066
|
+
parsedBody,
|
|
3067
|
+
errorCode,
|
|
3068
|
+
});
|
|
3069
|
+
}
|
|
3070
|
+
};
|
|
2772
3071
|
export const de_ListDomainMaintenancesCommand = async (output, context) => {
|
|
2773
3072
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2774
3073
|
return de_ListDomainMaintenancesCommandError(output, context);
|
|
@@ -3491,6 +3790,54 @@ const de_StartServiceSoftwareUpdateCommandError = async (output, context) => {
|
|
|
3491
3790
|
});
|
|
3492
3791
|
}
|
|
3493
3792
|
};
|
|
3793
|
+
export const de_UpdateDataSourceCommand = async (output, context) => {
|
|
3794
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3795
|
+
return de_UpdateDataSourceCommandError(output, context);
|
|
3796
|
+
}
|
|
3797
|
+
const contents = map({
|
|
3798
|
+
$metadata: deserializeMetadata(output),
|
|
3799
|
+
});
|
|
3800
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
3801
|
+
const doc = take(data, {
|
|
3802
|
+
Message: __expectString,
|
|
3803
|
+
});
|
|
3804
|
+
Object.assign(contents, doc);
|
|
3805
|
+
return contents;
|
|
3806
|
+
};
|
|
3807
|
+
const de_UpdateDataSourceCommandError = async (output, context) => {
|
|
3808
|
+
const parsedOutput = {
|
|
3809
|
+
...output,
|
|
3810
|
+
body: await parseErrorBody(output.body, context),
|
|
3811
|
+
};
|
|
3812
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3813
|
+
switch (errorCode) {
|
|
3814
|
+
case "BaseException":
|
|
3815
|
+
case "com.amazonaws.opensearch#BaseException":
|
|
3816
|
+
throw await de_BaseExceptionRes(parsedOutput, context);
|
|
3817
|
+
case "DependencyFailureException":
|
|
3818
|
+
case "com.amazonaws.opensearch#DependencyFailureException":
|
|
3819
|
+
throw await de_DependencyFailureExceptionRes(parsedOutput, context);
|
|
3820
|
+
case "DisabledOperationException":
|
|
3821
|
+
case "com.amazonaws.opensearch#DisabledOperationException":
|
|
3822
|
+
throw await de_DisabledOperationExceptionRes(parsedOutput, context);
|
|
3823
|
+
case "InternalException":
|
|
3824
|
+
case "com.amazonaws.opensearch#InternalException":
|
|
3825
|
+
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
3826
|
+
case "ResourceNotFoundException":
|
|
3827
|
+
case "com.amazonaws.opensearch#ResourceNotFoundException":
|
|
3828
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
3829
|
+
case "ValidationException":
|
|
3830
|
+
case "com.amazonaws.opensearch#ValidationException":
|
|
3831
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
3832
|
+
default:
|
|
3833
|
+
const parsedBody = parsedOutput.body;
|
|
3834
|
+
return throwDefaultError({
|
|
3835
|
+
output,
|
|
3836
|
+
parsedBody,
|
|
3837
|
+
errorCode,
|
|
3838
|
+
});
|
|
3839
|
+
}
|
|
3840
|
+
};
|
|
3494
3841
|
export const de_UpdateDomainConfigCommand = async (output, context) => {
|
|
3495
3842
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3496
3843
|
return de_UpdateDomainConfigCommandError(output, context);
|