@aws-sdk/client-opensearch 3.461.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 +2 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.de_UpgradeDomainCommand = exports.de_UpdateVpcEndpointCommand = exports.de_UpdateScheduledActionCommand = exports.de_UpdatePackageCommand = exports.de_UpdateDomainConfigCommand = exports.de_StartServiceSoftwareUpdateCommand = exports.de_StartDomainMaintenanceCommand = exports.de_RevokeVpcEndpointAccessCommand = exports.de_RemoveTagsCommand = exports.de_RejectInboundConnectionCommand = exports.de_PurchaseReservedInstanceOfferingCommand = exports.de_ListVpcEndpointsForDomainCommand = exports.de_ListVpcEndpointsCommand = exports.de_ListVpcEndpointAccessCommand = void 0;
|
|
3
|
+
exports.se_ListVpcEndpointsForDomainCommand = exports.se_ListVpcEndpointsCommand = exports.se_ListVpcEndpointAccessCommand = exports.se_ListVersionsCommand = exports.se_ListTagsCommand = exports.se_ListScheduledActionsCommand = exports.se_ListPackagesForDomainCommand = exports.se_ListInstanceTypeDetailsCommand = exports.se_ListDomainsForPackageCommand = exports.se_ListDomainNamesCommand = exports.se_ListDomainMaintenancesCommand = exports.se_ListDataSourcesCommand = exports.se_GetUpgradeStatusCommand = exports.se_GetUpgradeHistoryCommand = exports.se_GetPackageVersionHistoryCommand = exports.se_GetDomainMaintenanceStatusCommand = exports.se_GetDataSourceCommand = exports.se_GetCompatibleVersionsCommand = exports.se_DissociatePackageCommand = exports.se_DescribeVpcEndpointsCommand = exports.se_DescribeReservedInstancesCommand = exports.se_DescribeReservedInstanceOfferingsCommand = exports.se_DescribePackagesCommand = exports.se_DescribeOutboundConnectionsCommand = exports.se_DescribeInstanceTypeLimitsCommand = exports.se_DescribeInboundConnectionsCommand = exports.se_DescribeDryRunProgressCommand = exports.se_DescribeDomainsCommand = exports.se_DescribeDomainNodesCommand = exports.se_DescribeDomainHealthCommand = exports.se_DescribeDomainConfigCommand = exports.se_DescribeDomainChangeProgressCommand = exports.se_DescribeDomainAutoTunesCommand = exports.se_DescribeDomainCommand = exports.se_DeleteVpcEndpointCommand = exports.se_DeletePackageCommand = exports.se_DeleteOutboundConnectionCommand = exports.se_DeleteInboundConnectionCommand = exports.se_DeleteDomainCommand = exports.se_DeleteDataSourceCommand = exports.se_CreateVpcEndpointCommand = exports.se_CreatePackageCommand = exports.se_CreateOutboundConnectionCommand = exports.se_CreateDomainCommand = exports.se_CancelServiceSoftwareUpdateCommand = exports.se_AuthorizeVpcEndpointAccessCommand = exports.se_AssociatePackageCommand = exports.se_AddTagsCommand = exports.se_AddDataSourceCommand = exports.se_AcceptInboundConnectionCommand = void 0;
|
|
4
|
+
exports.de_GetUpgradeStatusCommand = exports.de_GetUpgradeHistoryCommand = exports.de_GetPackageVersionHistoryCommand = exports.de_GetDomainMaintenanceStatusCommand = exports.de_GetDataSourceCommand = exports.de_GetCompatibleVersionsCommand = exports.de_DissociatePackageCommand = exports.de_DescribeVpcEndpointsCommand = exports.de_DescribeReservedInstancesCommand = exports.de_DescribeReservedInstanceOfferingsCommand = exports.de_DescribePackagesCommand = exports.de_DescribeOutboundConnectionsCommand = exports.de_DescribeInstanceTypeLimitsCommand = exports.de_DescribeInboundConnectionsCommand = exports.de_DescribeDryRunProgressCommand = exports.de_DescribeDomainsCommand = exports.de_DescribeDomainNodesCommand = exports.de_DescribeDomainHealthCommand = exports.de_DescribeDomainConfigCommand = exports.de_DescribeDomainChangeProgressCommand = exports.de_DescribeDomainAutoTunesCommand = exports.de_DescribeDomainCommand = exports.de_DeleteVpcEndpointCommand = exports.de_DeletePackageCommand = exports.de_DeleteOutboundConnectionCommand = exports.de_DeleteInboundConnectionCommand = exports.de_DeleteDomainCommand = exports.de_DeleteDataSourceCommand = exports.de_CreateVpcEndpointCommand = exports.de_CreatePackageCommand = exports.de_CreateOutboundConnectionCommand = exports.de_CreateDomainCommand = exports.de_CancelServiceSoftwareUpdateCommand = exports.de_AuthorizeVpcEndpointAccessCommand = exports.de_AssociatePackageCommand = exports.de_AddTagsCommand = exports.de_AddDataSourceCommand = exports.de_AcceptInboundConnectionCommand = exports.se_UpgradeDomainCommand = exports.se_UpdateVpcEndpointCommand = exports.se_UpdateScheduledActionCommand = exports.se_UpdatePackageCommand = exports.se_UpdateDomainConfigCommand = exports.se_UpdateDataSourceCommand = exports.se_StartServiceSoftwareUpdateCommand = exports.se_StartDomainMaintenanceCommand = exports.se_RevokeVpcEndpointAccessCommand = exports.se_RemoveTagsCommand = exports.se_RejectInboundConnectionCommand = exports.se_PurchaseReservedInstanceOfferingCommand = void 0;
|
|
5
|
+
exports.de_UpgradeDomainCommand = exports.de_UpdateVpcEndpointCommand = exports.de_UpdateScheduledActionCommand = exports.de_UpdatePackageCommand = exports.de_UpdateDomainConfigCommand = exports.de_UpdateDataSourceCommand = exports.de_StartServiceSoftwareUpdateCommand = exports.de_StartDomainMaintenanceCommand = exports.de_RevokeVpcEndpointAccessCommand = exports.de_RemoveTagsCommand = exports.de_RejectInboundConnectionCommand = exports.de_PurchaseReservedInstanceOfferingCommand = exports.de_ListVpcEndpointsForDomainCommand = exports.de_ListVpcEndpointsCommand = exports.de_ListVpcEndpointAccessCommand = exports.de_ListVersionsCommand = exports.de_ListTagsCommand = exports.de_ListScheduledActionsCommand = exports.de_ListPackagesForDomainCommand = exports.de_ListInstanceTypeDetailsCommand = exports.de_ListDomainsForPackageCommand = exports.de_ListDomainNamesCommand = exports.de_ListDomainMaintenancesCommand = exports.de_ListDataSourcesCommand = void 0;
|
|
6
|
+
const core_1 = require("@aws-sdk/core");
|
|
6
7
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
7
8
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
9
|
const models_0_1 = require("../models/models_0");
|
|
@@ -25,6 +26,31 @@ const se_AcceptInboundConnectionCommand = async (input, context) => {
|
|
|
25
26
|
});
|
|
26
27
|
};
|
|
27
28
|
exports.se_AcceptInboundConnectionCommand = se_AcceptInboundConnectionCommand;
|
|
29
|
+
const se_AddDataSourceCommand = async (input, context) => {
|
|
30
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
31
|
+
const headers = {
|
|
32
|
+
"content-type": "application/json",
|
|
33
|
+
};
|
|
34
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
35
|
+
"/2021-01-01/opensearch/domain/{DomainName}/dataSource";
|
|
36
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
39
|
+
DataSourceType: (_) => (0, smithy_client_1._json)(_),
|
|
40
|
+
Description: [],
|
|
41
|
+
Name: [],
|
|
42
|
+
}));
|
|
43
|
+
return new protocol_http_1.HttpRequest({
|
|
44
|
+
protocol,
|
|
45
|
+
hostname,
|
|
46
|
+
port,
|
|
47
|
+
method: "POST",
|
|
48
|
+
headers,
|
|
49
|
+
path: resolvedPath,
|
|
50
|
+
body,
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
exports.se_AddDataSourceCommand = se_AddDataSourceCommand;
|
|
28
54
|
const se_AddTagsCommand = async (input, context) => {
|
|
29
55
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
30
56
|
const headers = {
|
|
@@ -223,6 +249,25 @@ const se_CreateVpcEndpointCommand = async (input, context) => {
|
|
|
223
249
|
});
|
|
224
250
|
};
|
|
225
251
|
exports.se_CreateVpcEndpointCommand = se_CreateVpcEndpointCommand;
|
|
252
|
+
const se_DeleteDataSourceCommand = async (input, context) => {
|
|
253
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
254
|
+
const headers = {};
|
|
255
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
256
|
+
"/2021-01-01/opensearch/domain/{DomainName}/dataSource/{Name}";
|
|
257
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
|
|
258
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
259
|
+
let body;
|
|
260
|
+
return new protocol_http_1.HttpRequest({
|
|
261
|
+
protocol,
|
|
262
|
+
hostname,
|
|
263
|
+
port,
|
|
264
|
+
method: "DELETE",
|
|
265
|
+
headers,
|
|
266
|
+
path: resolvedPath,
|
|
267
|
+
body,
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
exports.se_DeleteDataSourceCommand = se_DeleteDataSourceCommand;
|
|
226
271
|
const se_DeleteDomainCommand = async (input, context) => {
|
|
227
272
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
228
273
|
const headers = {};
|
|
@@ -674,6 +719,25 @@ const se_GetCompatibleVersionsCommand = async (input, context) => {
|
|
|
674
719
|
});
|
|
675
720
|
};
|
|
676
721
|
exports.se_GetCompatibleVersionsCommand = se_GetCompatibleVersionsCommand;
|
|
722
|
+
const se_GetDataSourceCommand = async (input, context) => {
|
|
723
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
724
|
+
const headers = {};
|
|
725
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
726
|
+
"/2021-01-01/opensearch/domain/{DomainName}/dataSource/{Name}";
|
|
727
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
|
|
728
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
729
|
+
let body;
|
|
730
|
+
return new protocol_http_1.HttpRequest({
|
|
731
|
+
protocol,
|
|
732
|
+
hostname,
|
|
733
|
+
port,
|
|
734
|
+
method: "GET",
|
|
735
|
+
headers,
|
|
736
|
+
path: resolvedPath,
|
|
737
|
+
body,
|
|
738
|
+
});
|
|
739
|
+
};
|
|
740
|
+
exports.se_GetDataSourceCommand = se_GetDataSourceCommand;
|
|
677
741
|
const se_GetDomainMaintenanceStatusCommand = async (input, context) => {
|
|
678
742
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
679
743
|
const headers = {};
|
|
@@ -759,6 +823,24 @@ const se_GetUpgradeStatusCommand = async (input, context) => {
|
|
|
759
823
|
});
|
|
760
824
|
};
|
|
761
825
|
exports.se_GetUpgradeStatusCommand = se_GetUpgradeStatusCommand;
|
|
826
|
+
const se_ListDataSourcesCommand = async (input, context) => {
|
|
827
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
828
|
+
const headers = {};
|
|
829
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
830
|
+
"/2021-01-01/opensearch/domain/{DomainName}/dataSource";
|
|
831
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
|
|
832
|
+
let body;
|
|
833
|
+
return new protocol_http_1.HttpRequest({
|
|
834
|
+
protocol,
|
|
835
|
+
hostname,
|
|
836
|
+
port,
|
|
837
|
+
method: "GET",
|
|
838
|
+
headers,
|
|
839
|
+
path: resolvedPath,
|
|
840
|
+
body,
|
|
841
|
+
});
|
|
842
|
+
};
|
|
843
|
+
exports.se_ListDataSourcesCommand = se_ListDataSourcesCommand;
|
|
762
844
|
const se_ListDomainMaintenancesCommand = async (input, context) => {
|
|
763
845
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
764
846
|
const headers = {};
|
|
@@ -1137,6 +1219,31 @@ const se_StartServiceSoftwareUpdateCommand = async (input, context) => {
|
|
|
1137
1219
|
});
|
|
1138
1220
|
};
|
|
1139
1221
|
exports.se_StartServiceSoftwareUpdateCommand = se_StartServiceSoftwareUpdateCommand;
|
|
1222
|
+
const se_UpdateDataSourceCommand = async (input, context) => {
|
|
1223
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1224
|
+
const headers = {
|
|
1225
|
+
"content-type": "application/json",
|
|
1226
|
+
};
|
|
1227
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1228
|
+
"/2021-01-01/opensearch/domain/{DomainName}/dataSource/{Name}";
|
|
1229
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
|
|
1230
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
1231
|
+
let body;
|
|
1232
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
1233
|
+
DataSourceType: (_) => (0, smithy_client_1._json)(_),
|
|
1234
|
+
Description: [],
|
|
1235
|
+
}));
|
|
1236
|
+
return new protocol_http_1.HttpRequest({
|
|
1237
|
+
protocol,
|
|
1238
|
+
hostname,
|
|
1239
|
+
port,
|
|
1240
|
+
method: "PUT",
|
|
1241
|
+
headers,
|
|
1242
|
+
path: resolvedPath,
|
|
1243
|
+
body,
|
|
1244
|
+
});
|
|
1245
|
+
};
|
|
1246
|
+
exports.se_UpdateDataSourceCommand = se_UpdateDataSourceCommand;
|
|
1140
1247
|
const se_UpdateDomainConfigCommand = async (input, context) => {
|
|
1141
1248
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1142
1249
|
const headers = {
|
|
@@ -1314,6 +1421,58 @@ const de_AcceptInboundConnectionCommandError = async (output, context) => {
|
|
|
1314
1421
|
});
|
|
1315
1422
|
}
|
|
1316
1423
|
};
|
|
1424
|
+
const de_AddDataSourceCommand = async (output, context) => {
|
|
1425
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1426
|
+
return de_AddDataSourceCommandError(output, context);
|
|
1427
|
+
}
|
|
1428
|
+
const contents = (0, smithy_client_1.map)({
|
|
1429
|
+
$metadata: deserializeMetadata(output),
|
|
1430
|
+
});
|
|
1431
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1432
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1433
|
+
Message: smithy_client_1.expectString,
|
|
1434
|
+
});
|
|
1435
|
+
Object.assign(contents, doc);
|
|
1436
|
+
return contents;
|
|
1437
|
+
};
|
|
1438
|
+
exports.de_AddDataSourceCommand = de_AddDataSourceCommand;
|
|
1439
|
+
const de_AddDataSourceCommandError = async (output, context) => {
|
|
1440
|
+
const parsedOutput = {
|
|
1441
|
+
...output,
|
|
1442
|
+
body: await parseErrorBody(output.body, context),
|
|
1443
|
+
};
|
|
1444
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1445
|
+
switch (errorCode) {
|
|
1446
|
+
case "BaseException":
|
|
1447
|
+
case "com.amazonaws.opensearch#BaseException":
|
|
1448
|
+
throw await de_BaseExceptionRes(parsedOutput, context);
|
|
1449
|
+
case "DependencyFailureException":
|
|
1450
|
+
case "com.amazonaws.opensearch#DependencyFailureException":
|
|
1451
|
+
throw await de_DependencyFailureExceptionRes(parsedOutput, context);
|
|
1452
|
+
case "DisabledOperationException":
|
|
1453
|
+
case "com.amazonaws.opensearch#DisabledOperationException":
|
|
1454
|
+
throw await de_DisabledOperationExceptionRes(parsedOutput, context);
|
|
1455
|
+
case "InternalException":
|
|
1456
|
+
case "com.amazonaws.opensearch#InternalException":
|
|
1457
|
+
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1458
|
+
case "LimitExceededException":
|
|
1459
|
+
case "com.amazonaws.opensearch#LimitExceededException":
|
|
1460
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1461
|
+
case "ResourceNotFoundException":
|
|
1462
|
+
case "com.amazonaws.opensearch#ResourceNotFoundException":
|
|
1463
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1464
|
+
case "ValidationException":
|
|
1465
|
+
case "com.amazonaws.opensearch#ValidationException":
|
|
1466
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1467
|
+
default:
|
|
1468
|
+
const parsedBody = parsedOutput.body;
|
|
1469
|
+
return throwDefaultError({
|
|
1470
|
+
output,
|
|
1471
|
+
parsedBody,
|
|
1472
|
+
errorCode,
|
|
1473
|
+
});
|
|
1474
|
+
}
|
|
1475
|
+
};
|
|
1317
1476
|
const de_AddTagsCommand = async (output, context) => {
|
|
1318
1477
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1319
1478
|
return de_AddTagsCommandError(output, context);
|
|
@@ -1696,6 +1855,55 @@ const de_CreateVpcEndpointCommandError = async (output, context) => {
|
|
|
1696
1855
|
});
|
|
1697
1856
|
}
|
|
1698
1857
|
};
|
|
1858
|
+
const de_DeleteDataSourceCommand = async (output, context) => {
|
|
1859
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1860
|
+
return de_DeleteDataSourceCommandError(output, context);
|
|
1861
|
+
}
|
|
1862
|
+
const contents = (0, smithy_client_1.map)({
|
|
1863
|
+
$metadata: deserializeMetadata(output),
|
|
1864
|
+
});
|
|
1865
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1866
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1867
|
+
Message: smithy_client_1.expectString,
|
|
1868
|
+
});
|
|
1869
|
+
Object.assign(contents, doc);
|
|
1870
|
+
return contents;
|
|
1871
|
+
};
|
|
1872
|
+
exports.de_DeleteDataSourceCommand = de_DeleteDataSourceCommand;
|
|
1873
|
+
const de_DeleteDataSourceCommandError = async (output, context) => {
|
|
1874
|
+
const parsedOutput = {
|
|
1875
|
+
...output,
|
|
1876
|
+
body: await parseErrorBody(output.body, context),
|
|
1877
|
+
};
|
|
1878
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1879
|
+
switch (errorCode) {
|
|
1880
|
+
case "BaseException":
|
|
1881
|
+
case "com.amazonaws.opensearch#BaseException":
|
|
1882
|
+
throw await de_BaseExceptionRes(parsedOutput, context);
|
|
1883
|
+
case "DependencyFailureException":
|
|
1884
|
+
case "com.amazonaws.opensearch#DependencyFailureException":
|
|
1885
|
+
throw await de_DependencyFailureExceptionRes(parsedOutput, context);
|
|
1886
|
+
case "DisabledOperationException":
|
|
1887
|
+
case "com.amazonaws.opensearch#DisabledOperationException":
|
|
1888
|
+
throw await de_DisabledOperationExceptionRes(parsedOutput, context);
|
|
1889
|
+
case "InternalException":
|
|
1890
|
+
case "com.amazonaws.opensearch#InternalException":
|
|
1891
|
+
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
1892
|
+
case "ResourceNotFoundException":
|
|
1893
|
+
case "com.amazonaws.opensearch#ResourceNotFoundException":
|
|
1894
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1895
|
+
case "ValidationException":
|
|
1896
|
+
case "com.amazonaws.opensearch#ValidationException":
|
|
1897
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1898
|
+
default:
|
|
1899
|
+
const parsedBody = parsedOutput.body;
|
|
1900
|
+
return throwDefaultError({
|
|
1901
|
+
output,
|
|
1902
|
+
parsedBody,
|
|
1903
|
+
errorCode,
|
|
1904
|
+
});
|
|
1905
|
+
}
|
|
1906
|
+
};
|
|
1699
1907
|
const de_DeleteDomainCommand = async (output, context) => {
|
|
1700
1908
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1701
1909
|
return de_DeleteDomainCommandError(output, context);
|
|
@@ -2672,6 +2880,57 @@ const de_GetCompatibleVersionsCommandError = async (output, context) => {
|
|
|
2672
2880
|
});
|
|
2673
2881
|
}
|
|
2674
2882
|
};
|
|
2883
|
+
const de_GetDataSourceCommand = async (output, context) => {
|
|
2884
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2885
|
+
return de_GetDataSourceCommandError(output, context);
|
|
2886
|
+
}
|
|
2887
|
+
const contents = (0, smithy_client_1.map)({
|
|
2888
|
+
$metadata: deserializeMetadata(output),
|
|
2889
|
+
});
|
|
2890
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2891
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2892
|
+
DataSourceType: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
2893
|
+
Description: smithy_client_1.expectString,
|
|
2894
|
+
Name: smithy_client_1.expectString,
|
|
2895
|
+
});
|
|
2896
|
+
Object.assign(contents, doc);
|
|
2897
|
+
return contents;
|
|
2898
|
+
};
|
|
2899
|
+
exports.de_GetDataSourceCommand = de_GetDataSourceCommand;
|
|
2900
|
+
const de_GetDataSourceCommandError = async (output, context) => {
|
|
2901
|
+
const parsedOutput = {
|
|
2902
|
+
...output,
|
|
2903
|
+
body: await parseErrorBody(output.body, context),
|
|
2904
|
+
};
|
|
2905
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2906
|
+
switch (errorCode) {
|
|
2907
|
+
case "BaseException":
|
|
2908
|
+
case "com.amazonaws.opensearch#BaseException":
|
|
2909
|
+
throw await de_BaseExceptionRes(parsedOutput, context);
|
|
2910
|
+
case "DependencyFailureException":
|
|
2911
|
+
case "com.amazonaws.opensearch#DependencyFailureException":
|
|
2912
|
+
throw await de_DependencyFailureExceptionRes(parsedOutput, context);
|
|
2913
|
+
case "DisabledOperationException":
|
|
2914
|
+
case "com.amazonaws.opensearch#DisabledOperationException":
|
|
2915
|
+
throw await de_DisabledOperationExceptionRes(parsedOutput, context);
|
|
2916
|
+
case "InternalException":
|
|
2917
|
+
case "com.amazonaws.opensearch#InternalException":
|
|
2918
|
+
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
2919
|
+
case "ResourceNotFoundException":
|
|
2920
|
+
case "com.amazonaws.opensearch#ResourceNotFoundException":
|
|
2921
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2922
|
+
case "ValidationException":
|
|
2923
|
+
case "com.amazonaws.opensearch#ValidationException":
|
|
2924
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2925
|
+
default:
|
|
2926
|
+
const parsedBody = parsedOutput.body;
|
|
2927
|
+
return throwDefaultError({
|
|
2928
|
+
output,
|
|
2929
|
+
parsedBody,
|
|
2930
|
+
errorCode,
|
|
2931
|
+
});
|
|
2932
|
+
}
|
|
2933
|
+
};
|
|
2675
2934
|
const de_GetDomainMaintenanceStatusCommand = async (output, context) => {
|
|
2676
2935
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2677
2936
|
return de_GetDomainMaintenanceStatusCommandError(output, context);
|
|
@@ -2866,6 +3125,55 @@ const de_GetUpgradeStatusCommandError = async (output, context) => {
|
|
|
2866
3125
|
});
|
|
2867
3126
|
}
|
|
2868
3127
|
};
|
|
3128
|
+
const de_ListDataSourcesCommand = async (output, context) => {
|
|
3129
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3130
|
+
return de_ListDataSourcesCommandError(output, context);
|
|
3131
|
+
}
|
|
3132
|
+
const contents = (0, smithy_client_1.map)({
|
|
3133
|
+
$metadata: deserializeMetadata(output),
|
|
3134
|
+
});
|
|
3135
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3136
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
3137
|
+
DataSources: smithy_client_1._json,
|
|
3138
|
+
});
|
|
3139
|
+
Object.assign(contents, doc);
|
|
3140
|
+
return contents;
|
|
3141
|
+
};
|
|
3142
|
+
exports.de_ListDataSourcesCommand = de_ListDataSourcesCommand;
|
|
3143
|
+
const de_ListDataSourcesCommandError = async (output, context) => {
|
|
3144
|
+
const parsedOutput = {
|
|
3145
|
+
...output,
|
|
3146
|
+
body: await parseErrorBody(output.body, context),
|
|
3147
|
+
};
|
|
3148
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3149
|
+
switch (errorCode) {
|
|
3150
|
+
case "BaseException":
|
|
3151
|
+
case "com.amazonaws.opensearch#BaseException":
|
|
3152
|
+
throw await de_BaseExceptionRes(parsedOutput, context);
|
|
3153
|
+
case "DependencyFailureException":
|
|
3154
|
+
case "com.amazonaws.opensearch#DependencyFailureException":
|
|
3155
|
+
throw await de_DependencyFailureExceptionRes(parsedOutput, context);
|
|
3156
|
+
case "DisabledOperationException":
|
|
3157
|
+
case "com.amazonaws.opensearch#DisabledOperationException":
|
|
3158
|
+
throw await de_DisabledOperationExceptionRes(parsedOutput, context);
|
|
3159
|
+
case "InternalException":
|
|
3160
|
+
case "com.amazonaws.opensearch#InternalException":
|
|
3161
|
+
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
3162
|
+
case "ResourceNotFoundException":
|
|
3163
|
+
case "com.amazonaws.opensearch#ResourceNotFoundException":
|
|
3164
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
3165
|
+
case "ValidationException":
|
|
3166
|
+
case "com.amazonaws.opensearch#ValidationException":
|
|
3167
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
3168
|
+
default:
|
|
3169
|
+
const parsedBody = parsedOutput.body;
|
|
3170
|
+
return throwDefaultError({
|
|
3171
|
+
output,
|
|
3172
|
+
parsedBody,
|
|
3173
|
+
errorCode,
|
|
3174
|
+
});
|
|
3175
|
+
}
|
|
3176
|
+
};
|
|
2869
3177
|
const de_ListDomainMaintenancesCommand = async (output, context) => {
|
|
2870
3178
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2871
3179
|
return de_ListDomainMaintenancesCommandError(output, context);
|
|
@@ -3605,6 +3913,55 @@ const de_StartServiceSoftwareUpdateCommandError = async (output, context) => {
|
|
|
3605
3913
|
});
|
|
3606
3914
|
}
|
|
3607
3915
|
};
|
|
3916
|
+
const de_UpdateDataSourceCommand = async (output, context) => {
|
|
3917
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3918
|
+
return de_UpdateDataSourceCommandError(output, context);
|
|
3919
|
+
}
|
|
3920
|
+
const contents = (0, smithy_client_1.map)({
|
|
3921
|
+
$metadata: deserializeMetadata(output),
|
|
3922
|
+
});
|
|
3923
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
3924
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
3925
|
+
Message: smithy_client_1.expectString,
|
|
3926
|
+
});
|
|
3927
|
+
Object.assign(contents, doc);
|
|
3928
|
+
return contents;
|
|
3929
|
+
};
|
|
3930
|
+
exports.de_UpdateDataSourceCommand = de_UpdateDataSourceCommand;
|
|
3931
|
+
const de_UpdateDataSourceCommandError = async (output, context) => {
|
|
3932
|
+
const parsedOutput = {
|
|
3933
|
+
...output,
|
|
3934
|
+
body: await parseErrorBody(output.body, context),
|
|
3935
|
+
};
|
|
3936
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3937
|
+
switch (errorCode) {
|
|
3938
|
+
case "BaseException":
|
|
3939
|
+
case "com.amazonaws.opensearch#BaseException":
|
|
3940
|
+
throw await de_BaseExceptionRes(parsedOutput, context);
|
|
3941
|
+
case "DependencyFailureException":
|
|
3942
|
+
case "com.amazonaws.opensearch#DependencyFailureException":
|
|
3943
|
+
throw await de_DependencyFailureExceptionRes(parsedOutput, context);
|
|
3944
|
+
case "DisabledOperationException":
|
|
3945
|
+
case "com.amazonaws.opensearch#DisabledOperationException":
|
|
3946
|
+
throw await de_DisabledOperationExceptionRes(parsedOutput, context);
|
|
3947
|
+
case "InternalException":
|
|
3948
|
+
case "com.amazonaws.opensearch#InternalException":
|
|
3949
|
+
throw await de_InternalExceptionRes(parsedOutput, context);
|
|
3950
|
+
case "ResourceNotFoundException":
|
|
3951
|
+
case "com.amazonaws.opensearch#ResourceNotFoundException":
|
|
3952
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
3953
|
+
case "ValidationException":
|
|
3954
|
+
case "com.amazonaws.opensearch#ValidationException":
|
|
3955
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
3956
|
+
default:
|
|
3957
|
+
const parsedBody = parsedOutput.body;
|
|
3958
|
+
return throwDefaultError({
|
|
3959
|
+
output,
|
|
3960
|
+
parsedBody,
|
|
3961
|
+
errorCode,
|
|
3962
|
+
});
|
|
3963
|
+
}
|
|
3964
|
+
};
|
|
3608
3965
|
const de_UpdateDomainConfigCommand = async (output, context) => {
|
|
3609
3966
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3610
3967
|
return de_UpdateDomainConfigCommandError(output, context);
|
package/dist-es/OpenSearch.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
2
2
|
import { AcceptInboundConnectionCommand, } from "./commands/AcceptInboundConnectionCommand";
|
|
3
|
+
import { AddDataSourceCommand, } from "./commands/AddDataSourceCommand";
|
|
3
4
|
import { AddTagsCommand } from "./commands/AddTagsCommand";
|
|
4
5
|
import { AssociatePackageCommand, } from "./commands/AssociatePackageCommand";
|
|
5
6
|
import { AuthorizeVpcEndpointAccessCommand, } from "./commands/AuthorizeVpcEndpointAccessCommand";
|
|
@@ -8,6 +9,7 @@ import { CreateDomainCommand, } from "./commands/CreateDomainCommand";
|
|
|
8
9
|
import { CreateOutboundConnectionCommand, } from "./commands/CreateOutboundConnectionCommand";
|
|
9
10
|
import { CreatePackageCommand, } from "./commands/CreatePackageCommand";
|
|
10
11
|
import { CreateVpcEndpointCommand, } from "./commands/CreateVpcEndpointCommand";
|
|
12
|
+
import { DeleteDataSourceCommand, } from "./commands/DeleteDataSourceCommand";
|
|
11
13
|
import { DeleteDomainCommand, } from "./commands/DeleteDomainCommand";
|
|
12
14
|
import { DeleteInboundConnectionCommand, } from "./commands/DeleteInboundConnectionCommand";
|
|
13
15
|
import { DeleteOutboundConnectionCommand, } from "./commands/DeleteOutboundConnectionCommand";
|
|
@@ -30,10 +32,12 @@ import { DescribeReservedInstancesCommand, } from "./commands/DescribeReservedIn
|
|
|
30
32
|
import { DescribeVpcEndpointsCommand, } from "./commands/DescribeVpcEndpointsCommand";
|
|
31
33
|
import { DissociatePackageCommand, } from "./commands/DissociatePackageCommand";
|
|
32
34
|
import { GetCompatibleVersionsCommand, } from "./commands/GetCompatibleVersionsCommand";
|
|
35
|
+
import { GetDataSourceCommand, } from "./commands/GetDataSourceCommand";
|
|
33
36
|
import { GetDomainMaintenanceStatusCommand, } from "./commands/GetDomainMaintenanceStatusCommand";
|
|
34
37
|
import { GetPackageVersionHistoryCommand, } from "./commands/GetPackageVersionHistoryCommand";
|
|
35
38
|
import { GetUpgradeHistoryCommand, } from "./commands/GetUpgradeHistoryCommand";
|
|
36
39
|
import { GetUpgradeStatusCommand, } from "./commands/GetUpgradeStatusCommand";
|
|
40
|
+
import { ListDataSourcesCommand, } from "./commands/ListDataSourcesCommand";
|
|
37
41
|
import { ListDomainMaintenancesCommand, } from "./commands/ListDomainMaintenancesCommand";
|
|
38
42
|
import { ListDomainNamesCommand, } from "./commands/ListDomainNamesCommand";
|
|
39
43
|
import { ListDomainsForPackageCommand, } from "./commands/ListDomainsForPackageCommand";
|
|
@@ -51,6 +55,7 @@ import { RemoveTagsCommand } from "./commands/RemoveTagsCommand";
|
|
|
51
55
|
import { RevokeVpcEndpointAccessCommand, } from "./commands/RevokeVpcEndpointAccessCommand";
|
|
52
56
|
import { StartDomainMaintenanceCommand, } from "./commands/StartDomainMaintenanceCommand";
|
|
53
57
|
import { StartServiceSoftwareUpdateCommand, } from "./commands/StartServiceSoftwareUpdateCommand";
|
|
58
|
+
import { UpdateDataSourceCommand, } from "./commands/UpdateDataSourceCommand";
|
|
54
59
|
import { UpdateDomainConfigCommand, } from "./commands/UpdateDomainConfigCommand";
|
|
55
60
|
import { UpdatePackageCommand, } from "./commands/UpdatePackageCommand";
|
|
56
61
|
import { UpdateScheduledActionCommand, } from "./commands/UpdateScheduledActionCommand";
|
|
@@ -59,6 +64,7 @@ import { UpgradeDomainCommand, } from "./commands/UpgradeDomainCommand";
|
|
|
59
64
|
import { OpenSearchClient } from "./OpenSearchClient";
|
|
60
65
|
const commands = {
|
|
61
66
|
AcceptInboundConnectionCommand,
|
|
67
|
+
AddDataSourceCommand,
|
|
62
68
|
AddTagsCommand,
|
|
63
69
|
AssociatePackageCommand,
|
|
64
70
|
AuthorizeVpcEndpointAccessCommand,
|
|
@@ -67,6 +73,7 @@ const commands = {
|
|
|
67
73
|
CreateOutboundConnectionCommand,
|
|
68
74
|
CreatePackageCommand,
|
|
69
75
|
CreateVpcEndpointCommand,
|
|
76
|
+
DeleteDataSourceCommand,
|
|
70
77
|
DeleteDomainCommand,
|
|
71
78
|
DeleteInboundConnectionCommand,
|
|
72
79
|
DeleteOutboundConnectionCommand,
|
|
@@ -89,10 +96,12 @@ const commands = {
|
|
|
89
96
|
DescribeVpcEndpointsCommand,
|
|
90
97
|
DissociatePackageCommand,
|
|
91
98
|
GetCompatibleVersionsCommand,
|
|
99
|
+
GetDataSourceCommand,
|
|
92
100
|
GetDomainMaintenanceStatusCommand,
|
|
93
101
|
GetPackageVersionHistoryCommand,
|
|
94
102
|
GetUpgradeHistoryCommand,
|
|
95
103
|
GetUpgradeStatusCommand,
|
|
104
|
+
ListDataSourcesCommand,
|
|
96
105
|
ListDomainMaintenancesCommand,
|
|
97
106
|
ListDomainNamesCommand,
|
|
98
107
|
ListDomainsForPackageCommand,
|
|
@@ -110,6 +119,7 @@ const commands = {
|
|
|
110
119
|
RevokeVpcEndpointAccessCommand,
|
|
111
120
|
StartDomainMaintenanceCommand,
|
|
112
121
|
StartServiceSoftwareUpdateCommand,
|
|
122
|
+
UpdateDataSourceCommand,
|
|
113
123
|
UpdateDomainConfigCommand,
|
|
114
124
|
UpdatePackageCommand,
|
|
115
125
|
UpdateScheduledActionCommand,
|
|
@@ -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_AddDataSourceCommand, se_AddDataSourceCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class AddDataSourceCommand 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, AddDataSourceCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "OpenSearchClient";
|
|
26
|
+
const commandName = "AddDataSourceCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonOpenSearchService",
|
|
35
|
+
operation: "AddDataSource",
|
|
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_AddDataSourceCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_AddDataSourceCommand(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_DeleteDataSourceCommand, se_DeleteDataSourceCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class DeleteDataSourceCommand 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, DeleteDataSourceCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "OpenSearchClient";
|
|
26
|
+
const commandName = "DeleteDataSourceCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonOpenSearchService",
|
|
35
|
+
operation: "DeleteDataSource",
|
|
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_DeleteDataSourceCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_DeleteDataSourceCommand(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_GetDataSourceCommand, se_GetDataSourceCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetDataSourceCommand 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, GetDataSourceCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "OpenSearchClient";
|
|
26
|
+
const commandName = "GetDataSourceCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonOpenSearchService",
|
|
35
|
+
operation: "GetDataSource",
|
|
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_GetDataSourceCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_GetDataSourceCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|