@aws-sdk/client-opensearch 3.272.0 → 3.277.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.
Files changed (39) hide show
  1. package/dist-cjs/OpenSearch.js +30 -0
  2. package/dist-cjs/commands/ListScheduledActionsCommand.js +46 -0
  3. package/dist-cjs/commands/UpdateScheduledActionCommand.js +46 -0
  4. package/dist-cjs/commands/index.js +2 -0
  5. package/dist-cjs/endpoint/ruleset.js +3 -3
  6. package/dist-cjs/models/models_0.js +95 -5
  7. package/dist-cjs/pagination/ListScheduledActionsPaginator.js +36 -0
  8. package/dist-cjs/pagination/index.js +1 -0
  9. package/dist-cjs/protocols/Aws_restJson1.js +295 -2
  10. package/dist-es/OpenSearch.js +30 -0
  11. package/dist-es/commands/ListScheduledActionsCommand.js +42 -0
  12. package/dist-es/commands/UpdateScheduledActionCommand.js +42 -0
  13. package/dist-es/commands/index.js +2 -0
  14. package/dist-es/endpoint/ruleset.js +3 -3
  15. package/dist-es/models/models_0.js +78 -0
  16. package/dist-es/pagination/ListScheduledActionsPaginator.js +32 -0
  17. package/dist-es/pagination/index.js +1 -0
  18. package/dist-es/protocols/Aws_restJson1.js +289 -1
  19. package/dist-types/OpenSearch.d.ts +20 -0
  20. package/dist-types/OpenSearchClient.d.ts +4 -2
  21. package/dist-types/commands/ListScheduledActionsCommand.d.ts +40 -0
  22. package/dist-types/commands/UpdateScheduledActionCommand.d.ts +40 -0
  23. package/dist-types/commands/index.d.ts +2 -0
  24. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  25. package/dist-types/models/models_0.d.ts +389 -15
  26. package/dist-types/pagination/ListScheduledActionsPaginator.d.ts +4 -0
  27. package/dist-types/pagination/index.d.ts +1 -0
  28. package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
  29. package/dist-types/ts3.4/OpenSearch.d.ts +34 -0
  30. package/dist-types/ts3.4/OpenSearchClient.d.ts +12 -0
  31. package/dist-types/ts3.4/commands/ListScheduledActionsCommand.d.ts +41 -0
  32. package/dist-types/ts3.4/commands/UpdateScheduledActionCommand.d.ts +41 -0
  33. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  34. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  35. package/dist-types/ts3.4/models/models_0.d.ts +133 -0
  36. package/dist-types/ts3.4/pagination/ListScheduledActionsPaginator.d.ts +11 -0
  37. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  38. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  39. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- const q = "fn", r = "argv", s = "ref";
2
- const a = true, b = false, c = "String", d = "PartitionResult", e = "tree", f = "error", g = "endpoint", h = { "required": true, "default": false, "type": "Boolean" }, i = { [s]: "Endpoint" }, j = { [q]: "booleanEquals", [r]: [{ [s]: "UseFIPS" }, true] }, k = { [q]: "booleanEquals", [r]: [{ [s]: "UseDualStack" }, true] }, l = {}, m = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: d }, "supportsFIPS"] }] }, n = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: d }, "supportsDualStack"] }] }, o = [j], p = [k];
3
- const _data = { version: "1.0", parameters: { Region: { required: a, type: c }, UseDualStack: h, UseFIPS: h, Endpoint: { required: b, type: c } }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: d }], type: e, rules: [{ conditions: [{ [q]: "isSet", [r]: [i] }], type: e, rules: [{ conditions: o, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: f }, { type: e, rules: [{ conditions: p, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: f }, { endpoint: { url: i, properties: l, headers: l }, type: g }] }] }, { conditions: [j, k], type: e, rules: [{ conditions: [m, n], type: e, rules: [{ type: e, rules: [{ endpoint: { url: "https://es-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: g }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: f }] }, { conditions: o, type: e, rules: [{ conditions: [m], type: e, rules: [{ type: e, rules: [{ endpoint: { url: "https://es-fips.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: g }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: f }] }, { conditions: p, type: e, rules: [{ conditions: [n], type: e, rules: [{ type: e, rules: [{ endpoint: { url: "https://es.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: g }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: f }] }, { type: e, rules: [{ endpoint: { url: "https://es.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: g }] }] }] };
1
+ const q = "required", r = "fn", s = "argv", t = "ref";
2
+ const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
3
+ const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://es-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://es-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://es.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://es.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
4
4
  export const ruleSet = _data;
@@ -70,6 +70,27 @@ export var OptionState;
70
70
  OptionState["Processing"] = "Processing";
71
71
  OptionState["RequiresIndexDocuments"] = "RequiresIndexDocuments";
72
72
  })(OptionState || (OptionState = {}));
73
+ export var ActionSeverity;
74
+ (function (ActionSeverity) {
75
+ ActionSeverity["HIGH"] = "HIGH";
76
+ ActionSeverity["LOW"] = "LOW";
77
+ ActionSeverity["MEDIUM"] = "MEDIUM";
78
+ })(ActionSeverity || (ActionSeverity = {}));
79
+ export var ActionStatus;
80
+ (function (ActionStatus) {
81
+ ActionStatus["COMPLETED"] = "COMPLETED";
82
+ ActionStatus["ELIGIBLE"] = "ELIGIBLE";
83
+ ActionStatus["FAILED"] = "FAILED";
84
+ ActionStatus["IN_PROGRESS"] = "IN_PROGRESS";
85
+ ActionStatus["NOT_ELIGIBLE"] = "NOT_ELIGIBLE";
86
+ ActionStatus["PENDING_UPDATE"] = "PENDING_UPDATE";
87
+ })(ActionStatus || (ActionStatus = {}));
88
+ export var ActionType;
89
+ (function (ActionType) {
90
+ ActionType["JVM_HEAP_SIZE_TUNING"] = "JVM_HEAP_SIZE_TUNING";
91
+ ActionType["JVM_YOUNG_GEN_TUNING"] = "JVM_YOUNG_GEN_TUNING";
92
+ ActionType["SERVICE_SOFTWARE_UPDATE"] = "SERVICE_SOFTWARE_UPDATE";
93
+ })(ActionType || (ActionType = {}));
73
94
  export class BaseException extends __BaseException {
74
95
  constructor(opts) {
75
96
  super({
@@ -419,11 +440,35 @@ export var EngineType;
419
440
  EngineType["Elasticsearch"] = "Elasticsearch";
420
441
  EngineType["OpenSearch"] = "OpenSearch";
421
442
  })(EngineType || (EngineType = {}));
443
+ export var ScheduledBy;
444
+ (function (ScheduledBy) {
445
+ ScheduledBy["CUSTOMER"] = "CUSTOMER";
446
+ ScheduledBy["SYSTEM"] = "SYSTEM";
447
+ })(ScheduledBy || (ScheduledBy = {}));
448
+ export var ScheduleAt;
449
+ (function (ScheduleAt) {
450
+ ScheduleAt["NOW"] = "NOW";
451
+ ScheduleAt["OFF_PEAK_WINDOW"] = "OFF_PEAK_WINDOW";
452
+ ScheduleAt["TIMESTAMP"] = "TIMESTAMP";
453
+ })(ScheduleAt || (ScheduleAt = {}));
422
454
  export var DryRunMode;
423
455
  (function (DryRunMode) {
424
456
  DryRunMode["Basic"] = "Basic";
425
457
  DryRunMode["Verbose"] = "Verbose";
426
458
  })(DryRunMode || (DryRunMode = {}));
459
+ export class SlotNotAvailableException extends __BaseException {
460
+ constructor(opts) {
461
+ super({
462
+ name: "SlotNotAvailableException",
463
+ $fault: "client",
464
+ ...opts,
465
+ });
466
+ this.name = "SlotNotAvailableException";
467
+ this.$fault = "client";
468
+ Object.setPrototypeOf(this, SlotNotAvailableException.prototype);
469
+ this.SlotSuggestions = opts.SlotSuggestions;
470
+ }
471
+ }
427
472
  export const AcceptInboundConnectionRequestFilterSensitiveLog = (obj) => ({
428
473
  ...obj,
429
474
  });
@@ -552,9 +597,21 @@ export const LogPublishingOptionFilterSensitiveLog = (obj) => ({
552
597
  export const NodeToNodeEncryptionOptionsFilterSensitiveLog = (obj) => ({
553
598
  ...obj,
554
599
  });
600
+ export const WindowStartTimeFilterSensitiveLog = (obj) => ({
601
+ ...obj,
602
+ });
603
+ export const OffPeakWindowFilterSensitiveLog = (obj) => ({
604
+ ...obj,
605
+ });
606
+ export const OffPeakWindowOptionsFilterSensitiveLog = (obj) => ({
607
+ ...obj,
608
+ });
555
609
  export const SnapshotOptionsFilterSensitiveLog = (obj) => ({
556
610
  ...obj,
557
611
  });
612
+ export const SoftwareUpdateOptionsFilterSensitiveLog = (obj) => ({
613
+ ...obj,
614
+ });
558
615
  export const VPCOptionsFilterSensitiveLog = (obj) => ({
559
616
  ...obj,
560
617
  });
@@ -717,9 +774,15 @@ export const LogPublishingOptionsStatusFilterSensitiveLog = (obj) => ({
717
774
  export const NodeToNodeEncryptionOptionsStatusFilterSensitiveLog = (obj) => ({
718
775
  ...obj,
719
776
  });
777
+ export const OffPeakWindowOptionsStatusFilterSensitiveLog = (obj) => ({
778
+ ...obj,
779
+ });
720
780
  export const SnapshotOptionsStatusFilterSensitiveLog = (obj) => ({
721
781
  ...obj,
722
782
  });
783
+ export const SoftwareUpdateOptionsStatusFilterSensitiveLog = (obj) => ({
784
+ ...obj,
785
+ });
723
786
  export const VPCDerivedInfoStatusFilterSensitiveLog = (obj) => ({
724
787
  ...obj,
725
788
  });
@@ -897,6 +960,15 @@ export const ListPackagesForDomainRequestFilterSensitiveLog = (obj) => ({
897
960
  export const ListPackagesForDomainResponseFilterSensitiveLog = (obj) => ({
898
961
  ...obj,
899
962
  });
963
+ export const ListScheduledActionsRequestFilterSensitiveLog = (obj) => ({
964
+ ...obj,
965
+ });
966
+ export const ScheduledActionFilterSensitiveLog = (obj) => ({
967
+ ...obj,
968
+ });
969
+ export const ListScheduledActionsResponseFilterSensitiveLog = (obj) => ({
970
+ ...obj,
971
+ });
900
972
  export const ListTagsRequestFilterSensitiveLog = (obj) => ({
901
973
  ...obj,
902
974
  });
@@ -969,6 +1041,12 @@ export const UpdatePackageRequestFilterSensitiveLog = (obj) => ({
969
1041
  export const UpdatePackageResponseFilterSensitiveLog = (obj) => ({
970
1042
  ...obj,
971
1043
  });
1044
+ export const UpdateScheduledActionRequestFilterSensitiveLog = (obj) => ({
1045
+ ...obj,
1046
+ });
1047
+ export const UpdateScheduledActionResponseFilterSensitiveLog = (obj) => ({
1048
+ ...obj,
1049
+ });
972
1050
  export const UpdateVpcEndpointRequestFilterSensitiveLog = (obj) => ({
973
1051
  ...obj,
974
1052
  });
@@ -0,0 +1,32 @@
1
+ import { ListScheduledActionsCommand, } from "../commands/ListScheduledActionsCommand";
2
+ import { OpenSearch } from "../OpenSearch";
3
+ import { OpenSearchClient } from "../OpenSearchClient";
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListScheduledActionsCommand(input), ...args);
6
+ };
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listScheduledActions(input, ...args);
9
+ };
10
+ export async function* paginateListScheduledActions(config, input, ...additionalArguments) {
11
+ let token = config.startingToken || undefined;
12
+ let hasNext = true;
13
+ let page;
14
+ while (hasNext) {
15
+ input.NextToken = token;
16
+ input["MaxResults"] = config.pageSize;
17
+ if (config.client instanceof OpenSearch) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof OpenSearchClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected OpenSearch | OpenSearchClient");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.NextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
30
+ }
31
+ return undefined;
32
+ }
@@ -10,4 +10,5 @@ export * from "./Interfaces";
10
10
  export * from "./ListDomainsForPackagePaginator";
11
11
  export * from "./ListInstanceTypeDetailsPaginator";
12
12
  export * from "./ListPackagesForDomainPaginator";
13
+ export * from "./ListScheduledActionsPaginator";
13
14
  export * from "./ListVersionsPaginator";
@@ -1,6 +1,6 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
2
  import { 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 as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
3
- import { AccessDeniedException, BaseException, ConflictException, DisabledOperationException, InternalException, InvalidPaginationTokenException, InvalidTypeException, LimitExceededException, ResourceAlreadyExistsException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
3
+ import { AccessDeniedException, BaseException, ConflictException, DisabledOperationException, InternalException, InvalidPaginationTokenException, InvalidTypeException, LimitExceededException, ResourceAlreadyExistsException, ResourceNotFoundException, SlotNotAvailableException, ValidationException, } from "../models/models_0";
4
4
  import { OpenSearchServiceException as __BaseException } from "../models/OpenSearchServiceException";
5
5
  export const serializeAws_restJson1AcceptInboundConnectionCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -140,9 +140,15 @@ export const serializeAws_restJson1CreateDomainCommand = async (input, context)
140
140
  ...(input.NodeToNodeEncryptionOptions != null && {
141
141
  NodeToNodeEncryptionOptions: serializeAws_restJson1NodeToNodeEncryptionOptions(input.NodeToNodeEncryptionOptions, context),
142
142
  }),
143
+ ...(input.OffPeakWindowOptions != null && {
144
+ OffPeakWindowOptions: serializeAws_restJson1OffPeakWindowOptions(input.OffPeakWindowOptions, context),
145
+ }),
143
146
  ...(input.SnapshotOptions != null && {
144
147
  SnapshotOptions: serializeAws_restJson1SnapshotOptions(input.SnapshotOptions, context),
145
148
  }),
149
+ ...(input.SoftwareUpdateOptions != null && {
150
+ SoftwareUpdateOptions: serializeAws_restJson1SoftwareUpdateOptions(input.SoftwareUpdateOptions, context),
151
+ }),
146
152
  ...(input.TagList != null && { TagList: serializeAws_restJson1TagList(input.TagList, context) }),
147
153
  ...(input.VPCOptions != null && { VPCOptions: serializeAws_restJson1VPCOptions(input.VPCOptions, context) }),
148
154
  });
@@ -772,6 +778,28 @@ export const serializeAws_restJson1ListPackagesForDomainCommand = async (input,
772
778
  body,
773
779
  });
774
780
  };
781
+ export const serializeAws_restJson1ListScheduledActionsCommand = async (input, context) => {
782
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
783
+ const headers = {};
784
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
785
+ "/2021-01-01/opensearch/domain/{DomainName}/scheduledActions";
786
+ resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
787
+ const query = map({
788
+ maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
789
+ nextToken: [, input.NextToken],
790
+ });
791
+ let body;
792
+ return new __HttpRequest({
793
+ protocol,
794
+ hostname,
795
+ port,
796
+ method: "GET",
797
+ headers,
798
+ path: resolvedPath,
799
+ query,
800
+ body,
801
+ });
802
+ };
775
803
  export const serializeAws_restJson1ListTagsCommand = async (input, context) => {
776
804
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
777
805
  const headers = {};
@@ -964,7 +992,9 @@ export const serializeAws_restJson1StartServiceSoftwareUpdateCommand = async (in
964
992
  "/2021-01-01/opensearch/serviceSoftwareUpdate/start";
965
993
  let body;
966
994
  body = JSON.stringify({
995
+ ...(input.DesiredStartTime != null && { DesiredStartTime: input.DesiredStartTime }),
967
996
  ...(input.DomainName != null && { DomainName: input.DomainName }),
997
+ ...(input.ScheduleAt != null && { ScheduleAt: input.ScheduleAt }),
968
998
  });
969
999
  return new __HttpRequest({
970
1000
  protocol,
@@ -1017,9 +1047,15 @@ export const serializeAws_restJson1UpdateDomainConfigCommand = async (input, con
1017
1047
  ...(input.NodeToNodeEncryptionOptions != null && {
1018
1048
  NodeToNodeEncryptionOptions: serializeAws_restJson1NodeToNodeEncryptionOptions(input.NodeToNodeEncryptionOptions, context),
1019
1049
  }),
1050
+ ...(input.OffPeakWindowOptions != null && {
1051
+ OffPeakWindowOptions: serializeAws_restJson1OffPeakWindowOptions(input.OffPeakWindowOptions, context),
1052
+ }),
1020
1053
  ...(input.SnapshotOptions != null && {
1021
1054
  SnapshotOptions: serializeAws_restJson1SnapshotOptions(input.SnapshotOptions, context),
1022
1055
  }),
1056
+ ...(input.SoftwareUpdateOptions != null && {
1057
+ SoftwareUpdateOptions: serializeAws_restJson1SoftwareUpdateOptions(input.SoftwareUpdateOptions, context),
1058
+ }),
1023
1059
  ...(input.VPCOptions != null && { VPCOptions: serializeAws_restJson1VPCOptions(input.VPCOptions, context) }),
1024
1060
  });
1025
1061
  return new __HttpRequest({
@@ -1057,6 +1093,31 @@ export const serializeAws_restJson1UpdatePackageCommand = async (input, context)
1057
1093
  body,
1058
1094
  });
1059
1095
  };
1096
+ export const serializeAws_restJson1UpdateScheduledActionCommand = async (input, context) => {
1097
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1098
+ const headers = {
1099
+ "content-type": "application/json",
1100
+ };
1101
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1102
+ "/2021-01-01/opensearch/domain/{DomainName}/scheduledAction/update";
1103
+ resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName, "{DomainName}", false);
1104
+ let body;
1105
+ body = JSON.stringify({
1106
+ ...(input.ActionID != null && { ActionID: input.ActionID }),
1107
+ ...(input.ActionType != null && { ActionType: input.ActionType }),
1108
+ ...(input.DesiredStartTime != null && { DesiredStartTime: input.DesiredStartTime }),
1109
+ ...(input.ScheduleAt != null && { ScheduleAt: input.ScheduleAt }),
1110
+ });
1111
+ return new __HttpRequest({
1112
+ protocol,
1113
+ hostname,
1114
+ port,
1115
+ method: "PUT",
1116
+ headers,
1117
+ path: resolvedPath,
1118
+ body,
1119
+ });
1120
+ };
1060
1121
  export const serializeAws_restJson1UpdateVpcEndpointCommand = async (input, context) => {
1061
1122
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1062
1123
  const headers = {
@@ -2724,6 +2785,54 @@ const deserializeAws_restJson1ListPackagesForDomainCommandError = async (output,
2724
2785
  });
2725
2786
  }
2726
2787
  };
2788
+ export const deserializeAws_restJson1ListScheduledActionsCommand = async (output, context) => {
2789
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2790
+ return deserializeAws_restJson1ListScheduledActionsCommandError(output, context);
2791
+ }
2792
+ const contents = map({
2793
+ $metadata: deserializeMetadata(output),
2794
+ });
2795
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2796
+ if (data.NextToken != null) {
2797
+ contents.NextToken = __expectString(data.NextToken);
2798
+ }
2799
+ if (data.ScheduledActions != null) {
2800
+ contents.ScheduledActions = deserializeAws_restJson1ScheduledActionsList(data.ScheduledActions, context);
2801
+ }
2802
+ return contents;
2803
+ };
2804
+ const deserializeAws_restJson1ListScheduledActionsCommandError = async (output, context) => {
2805
+ const parsedOutput = {
2806
+ ...output,
2807
+ body: await parseErrorBody(output.body, context),
2808
+ };
2809
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2810
+ switch (errorCode) {
2811
+ case "BaseException":
2812
+ case "com.amazonaws.opensearch#BaseException":
2813
+ throw await deserializeAws_restJson1BaseExceptionResponse(parsedOutput, context);
2814
+ case "InternalException":
2815
+ case "com.amazonaws.opensearch#InternalException":
2816
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
2817
+ case "InvalidPaginationTokenException":
2818
+ case "com.amazonaws.opensearch#InvalidPaginationTokenException":
2819
+ throw await deserializeAws_restJson1InvalidPaginationTokenExceptionResponse(parsedOutput, context);
2820
+ case "ResourceNotFoundException":
2821
+ case "com.amazonaws.opensearch#ResourceNotFoundException":
2822
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2823
+ case "ValidationException":
2824
+ case "com.amazonaws.opensearch#ValidationException":
2825
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2826
+ default:
2827
+ const parsedBody = parsedOutput.body;
2828
+ throwDefaultError({
2829
+ output,
2830
+ parsedBody,
2831
+ exceptionCtor: __BaseException,
2832
+ errorCode,
2833
+ });
2834
+ }
2835
+ };
2727
2836
  export const deserializeAws_restJson1ListTagsCommand = async (output, context) => {
2728
2837
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2729
2838
  return deserializeAws_restJson1ListTagsCommandError(output, context);
@@ -3252,6 +3361,57 @@ const deserializeAws_restJson1UpdatePackageCommandError = async (output, context
3252
3361
  });
3253
3362
  }
3254
3363
  };
3364
+ export const deserializeAws_restJson1UpdateScheduledActionCommand = async (output, context) => {
3365
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3366
+ return deserializeAws_restJson1UpdateScheduledActionCommandError(output, context);
3367
+ }
3368
+ const contents = map({
3369
+ $metadata: deserializeMetadata(output),
3370
+ });
3371
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3372
+ if (data.ScheduledAction != null) {
3373
+ contents.ScheduledAction = deserializeAws_restJson1ScheduledAction(data.ScheduledAction, context);
3374
+ }
3375
+ return contents;
3376
+ };
3377
+ const deserializeAws_restJson1UpdateScheduledActionCommandError = async (output, context) => {
3378
+ const parsedOutput = {
3379
+ ...output,
3380
+ body: await parseErrorBody(output.body, context),
3381
+ };
3382
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3383
+ switch (errorCode) {
3384
+ case "BaseException":
3385
+ case "com.amazonaws.opensearch#BaseException":
3386
+ throw await deserializeAws_restJson1BaseExceptionResponse(parsedOutput, context);
3387
+ case "ConflictException":
3388
+ case "com.amazonaws.opensearch#ConflictException":
3389
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3390
+ case "InternalException":
3391
+ case "com.amazonaws.opensearch#InternalException":
3392
+ throw await deserializeAws_restJson1InternalExceptionResponse(parsedOutput, context);
3393
+ case "LimitExceededException":
3394
+ case "com.amazonaws.opensearch#LimitExceededException":
3395
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
3396
+ case "ResourceNotFoundException":
3397
+ case "com.amazonaws.opensearch#ResourceNotFoundException":
3398
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3399
+ case "SlotNotAvailableException":
3400
+ case "com.amazonaws.opensearch#SlotNotAvailableException":
3401
+ throw await deserializeAws_restJson1SlotNotAvailableExceptionResponse(parsedOutput, context);
3402
+ case "ValidationException":
3403
+ case "com.amazonaws.opensearch#ValidationException":
3404
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3405
+ default:
3406
+ const parsedBody = parsedOutput.body;
3407
+ throwDefaultError({
3408
+ output,
3409
+ parsedBody,
3410
+ exceptionCtor: __BaseException,
3411
+ errorCode,
3412
+ });
3413
+ }
3414
+ };
3255
3415
  export const deserializeAws_restJson1UpdateVpcEndpointCommand = async (output, context) => {
3256
3416
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3257
3417
  return deserializeAws_restJson1UpdateVpcEndpointCommandError(output, context);
@@ -3484,6 +3644,21 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
3484
3644
  });
3485
3645
  return __decorateServiceException(exception, parsedOutput.body);
3486
3646
  };
3647
+ const deserializeAws_restJson1SlotNotAvailableExceptionResponse = async (parsedOutput, context) => {
3648
+ const contents = map({});
3649
+ const data = parsedOutput.body;
3650
+ if (data.SlotSuggestions != null) {
3651
+ contents.SlotSuggestions = deserializeAws_restJson1SlotList(data.SlotSuggestions, context);
3652
+ }
3653
+ if (data.message != null) {
3654
+ contents.message = __expectString(data.message);
3655
+ }
3656
+ const exception = new SlotNotAvailableException({
3657
+ $metadata: deserializeMetadata(parsedOutput),
3658
+ ...contents,
3659
+ });
3660
+ return __decorateServiceException(exception, parsedOutput.body);
3661
+ };
3487
3662
  const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
3488
3663
  const contents = map({});
3489
3664
  const data = parsedOutput.body;
@@ -3543,6 +3718,7 @@ const serializeAws_restJson1AutoTuneOptions = (input, context) => {
3543
3718
  MaintenanceSchedules: serializeAws_restJson1AutoTuneMaintenanceScheduleList(input.MaintenanceSchedules, context),
3544
3719
  }),
3545
3720
  ...(input.RollbackOnDisable != null && { RollbackOnDisable: input.RollbackOnDisable }),
3721
+ ...(input.UseOffPeakWindow != null && { UseOffPeakWindow: input.UseOffPeakWindow }),
3546
3722
  };
3547
3723
  };
3548
3724
  const serializeAws_restJson1AutoTuneOptionsInput = (input, context) => {
@@ -3551,6 +3727,7 @@ const serializeAws_restJson1AutoTuneOptionsInput = (input, context) => {
3551
3727
  ...(input.MaintenanceSchedules != null && {
3552
3728
  MaintenanceSchedules: serializeAws_restJson1AutoTuneMaintenanceScheduleList(input.MaintenanceSchedules, context),
3553
3729
  }),
3730
+ ...(input.UseOffPeakWindow != null && { UseOffPeakWindow: input.UseOffPeakWindow }),
3554
3731
  };
3555
3732
  };
3556
3733
  const serializeAws_restJson1AWSDomainInformation = (input, context) => {
@@ -3698,6 +3875,21 @@ const serializeAws_restJson1NodeToNodeEncryptionOptions = (input, context) => {
3698
3875
  ...(input.Enabled != null && { Enabled: input.Enabled }),
3699
3876
  };
3700
3877
  };
3878
+ const serializeAws_restJson1OffPeakWindow = (input, context) => {
3879
+ return {
3880
+ ...(input.WindowStartTime != null && {
3881
+ WindowStartTime: serializeAws_restJson1WindowStartTime(input.WindowStartTime, context),
3882
+ }),
3883
+ };
3884
+ };
3885
+ const serializeAws_restJson1OffPeakWindowOptions = (input, context) => {
3886
+ return {
3887
+ ...(input.Enabled != null && { Enabled: input.Enabled }),
3888
+ ...(input.OffPeakWindow != null && {
3889
+ OffPeakWindow: serializeAws_restJson1OffPeakWindow(input.OffPeakWindow, context),
3890
+ }),
3891
+ };
3892
+ };
3701
3893
  const serializeAws_restJson1PackageSource = (input, context) => {
3702
3894
  return {
3703
3895
  ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }),
@@ -3726,6 +3918,11 @@ const serializeAws_restJson1SnapshotOptions = (input, context) => {
3726
3918
  ...(input.AutomatedSnapshotStartHour != null && { AutomatedSnapshotStartHour: input.AutomatedSnapshotStartHour }),
3727
3919
  };
3728
3920
  };
3921
+ const serializeAws_restJson1SoftwareUpdateOptions = (input, context) => {
3922
+ return {
3923
+ ...(input.AutoSoftwareUpdateEnabled != null && { AutoSoftwareUpdateEnabled: input.AutoSoftwareUpdateEnabled }),
3924
+ };
3925
+ };
3729
3926
  const serializeAws_restJson1StringList = (input, context) => {
3730
3927
  return input
3731
3928
  .filter((e) => e != null)
@@ -3768,6 +3965,12 @@ const serializeAws_restJson1VPCOptions = (input, context) => {
3768
3965
  ...(input.SubnetIds != null && { SubnetIds: serializeAws_restJson1StringList(input.SubnetIds, context) }),
3769
3966
  };
3770
3967
  };
3968
+ const serializeAws_restJson1WindowStartTime = (input, context) => {
3969
+ return {
3970
+ ...(input.Hours != null && { Hours: input.Hours }),
3971
+ ...(input.Minutes != null && { Minutes: input.Minutes }),
3972
+ };
3973
+ };
3771
3974
  const serializeAws_restJson1ZoneAwarenessConfig = (input, context) => {
3772
3975
  return {
3773
3976
  ...(input.AvailabilityZoneCount != null && { AvailabilityZoneCount: input.AvailabilityZoneCount }),
@@ -3896,12 +4099,14 @@ const deserializeAws_restJson1AutoTuneOptions = (output, context) => {
3896
4099
  ? deserializeAws_restJson1AutoTuneMaintenanceScheduleList(output.MaintenanceSchedules, context)
3897
4100
  : undefined,
3898
4101
  RollbackOnDisable: __expectString(output.RollbackOnDisable),
4102
+ UseOffPeakWindow: __expectBoolean(output.UseOffPeakWindow),
3899
4103
  };
3900
4104
  };
3901
4105
  const deserializeAws_restJson1AutoTuneOptionsOutput = (output, context) => {
3902
4106
  return {
3903
4107
  ErrorMessage: __expectString(output.ErrorMessage),
3904
4108
  State: __expectString(output.State),
4109
+ UseOffPeakWindow: __expectBoolean(output.UseOffPeakWindow),
3905
4110
  };
3906
4111
  };
3907
4112
  const deserializeAws_restJson1AutoTuneOptionsStatus = (output, context) => {
@@ -4076,9 +4281,15 @@ const deserializeAws_restJson1DomainConfig = (output, context) => {
4076
4281
  NodeToNodeEncryptionOptions: output.NodeToNodeEncryptionOptions != null
4077
4282
  ? deserializeAws_restJson1NodeToNodeEncryptionOptionsStatus(output.NodeToNodeEncryptionOptions, context)
4078
4283
  : undefined,
4284
+ OffPeakWindowOptions: output.OffPeakWindowOptions != null
4285
+ ? deserializeAws_restJson1OffPeakWindowOptionsStatus(output.OffPeakWindowOptions, context)
4286
+ : undefined,
4079
4287
  SnapshotOptions: output.SnapshotOptions != null
4080
4288
  ? deserializeAws_restJson1SnapshotOptionsStatus(output.SnapshotOptions, context)
4081
4289
  : undefined,
4290
+ SoftwareUpdateOptions: output.SoftwareUpdateOptions != null
4291
+ ? deserializeAws_restJson1SoftwareUpdateOptionsStatus(output.SoftwareUpdateOptions, context)
4292
+ : undefined,
4082
4293
  VPCOptions: output.VPCOptions != null ? deserializeAws_restJson1VPCDerivedInfoStatus(output.VPCOptions, context) : undefined,
4083
4294
  };
4084
4295
  };
@@ -4187,6 +4398,9 @@ const deserializeAws_restJson1DomainStatus = (output, context) => {
4187
4398
  NodeToNodeEncryptionOptions: output.NodeToNodeEncryptionOptions != null
4188
4399
  ? deserializeAws_restJson1NodeToNodeEncryptionOptions(output.NodeToNodeEncryptionOptions, context)
4189
4400
  : undefined,
4401
+ OffPeakWindowOptions: output.OffPeakWindowOptions != null
4402
+ ? deserializeAws_restJson1OffPeakWindowOptions(output.OffPeakWindowOptions, context)
4403
+ : undefined,
4190
4404
  Processing: __expectBoolean(output.Processing),
4191
4405
  ServiceSoftwareOptions: output.ServiceSoftwareOptions != null
4192
4406
  ? deserializeAws_restJson1ServiceSoftwareOptions(output.ServiceSoftwareOptions, context)
@@ -4194,6 +4408,9 @@ const deserializeAws_restJson1DomainStatus = (output, context) => {
4194
4408
  SnapshotOptions: output.SnapshotOptions != null
4195
4409
  ? deserializeAws_restJson1SnapshotOptions(output.SnapshotOptions, context)
4196
4410
  : undefined,
4411
+ SoftwareUpdateOptions: output.SoftwareUpdateOptions != null
4412
+ ? deserializeAws_restJson1SoftwareUpdateOptions(output.SoftwareUpdateOptions, context)
4413
+ : undefined,
4197
4414
  UpgradeProcessing: __expectBoolean(output.UpgradeProcessing),
4198
4415
  VPCOptions: output.VPCOptions != null ? deserializeAws_restJson1VPCDerivedInfo(output.VPCOptions, context) : undefined,
4199
4416
  };
@@ -4426,6 +4643,25 @@ const deserializeAws_restJson1NodeToNodeEncryptionOptionsStatus = (output, conte
4426
4643
  Status: output.Status != null ? deserializeAws_restJson1OptionStatus(output.Status, context) : undefined,
4427
4644
  };
4428
4645
  };
4646
+ const deserializeAws_restJson1OffPeakWindow = (output, context) => {
4647
+ return {
4648
+ WindowStartTime: output.WindowStartTime != null
4649
+ ? deserializeAws_restJson1WindowStartTime(output.WindowStartTime, context)
4650
+ : undefined,
4651
+ };
4652
+ };
4653
+ const deserializeAws_restJson1OffPeakWindowOptions = (output, context) => {
4654
+ return {
4655
+ Enabled: __expectBoolean(output.Enabled),
4656
+ OffPeakWindow: output.OffPeakWindow != null ? deserializeAws_restJson1OffPeakWindow(output.OffPeakWindow, context) : undefined,
4657
+ };
4658
+ };
4659
+ const deserializeAws_restJson1OffPeakWindowOptionsStatus = (output, context) => {
4660
+ return {
4661
+ Options: output.Options != null ? deserializeAws_restJson1OffPeakWindowOptions(output.Options, context) : undefined,
4662
+ Status: output.Status != null ? deserializeAws_restJson1OptionStatus(output.Status, context) : undefined,
4663
+ };
4664
+ };
4429
4665
  const deserializeAws_restJson1OptionStatus = (output, context) => {
4430
4666
  return {
4431
4667
  CreationDate: output.CreationDate != null
@@ -4605,6 +4841,30 @@ const deserializeAws_restJson1SAMLOptionsOutput = (output, context) => {
4605
4841
  SubjectKey: __expectString(output.SubjectKey),
4606
4842
  };
4607
4843
  };
4844
+ const deserializeAws_restJson1ScheduledAction = (output, context) => {
4845
+ return {
4846
+ Cancellable: __expectBoolean(output.Cancellable),
4847
+ Description: __expectString(output.Description),
4848
+ Id: __expectString(output.Id),
4849
+ Mandatory: __expectBoolean(output.Mandatory),
4850
+ ScheduledBy: __expectString(output.ScheduledBy),
4851
+ ScheduledTime: __expectLong(output.ScheduledTime),
4852
+ Severity: __expectString(output.Severity),
4853
+ Status: __expectString(output.Status),
4854
+ Type: __expectString(output.Type),
4855
+ };
4856
+ };
4857
+ const deserializeAws_restJson1ScheduledActionsList = (output, context) => {
4858
+ const retVal = (output || [])
4859
+ .filter((e) => e != null)
4860
+ .map((entry) => {
4861
+ if (entry === null) {
4862
+ return null;
4863
+ }
4864
+ return deserializeAws_restJson1ScheduledAction(entry, context);
4865
+ });
4866
+ return retVal;
4867
+ };
4608
4868
  const deserializeAws_restJson1ScheduledAutoTuneDetails = (output, context) => {
4609
4869
  return {
4610
4870
  Action: __expectString(output.Action),
@@ -4627,6 +4887,17 @@ const deserializeAws_restJson1ServiceSoftwareOptions = (output, context) => {
4627
4887
  UpdateStatus: __expectString(output.UpdateStatus),
4628
4888
  };
4629
4889
  };
4890
+ const deserializeAws_restJson1SlotList = (output, context) => {
4891
+ const retVal = (output || [])
4892
+ .filter((e) => e != null)
4893
+ .map((entry) => {
4894
+ if (entry === null) {
4895
+ return null;
4896
+ }
4897
+ return __expectLong(entry);
4898
+ });
4899
+ return retVal;
4900
+ };
4630
4901
  const deserializeAws_restJson1SnapshotOptions = (output, context) => {
4631
4902
  return {
4632
4903
  AutomatedSnapshotStartHour: __expectInt32(output.AutomatedSnapshotStartHour),
@@ -4638,6 +4909,17 @@ const deserializeAws_restJson1SnapshotOptionsStatus = (output, context) => {
4638
4909
  Status: output.Status != null ? deserializeAws_restJson1OptionStatus(output.Status, context) : undefined,
4639
4910
  };
4640
4911
  };
4912
+ const deserializeAws_restJson1SoftwareUpdateOptions = (output, context) => {
4913
+ return {
4914
+ AutoSoftwareUpdateEnabled: __expectBoolean(output.AutoSoftwareUpdateEnabled),
4915
+ };
4916
+ };
4917
+ const deserializeAws_restJson1SoftwareUpdateOptionsStatus = (output, context) => {
4918
+ return {
4919
+ Options: output.Options != null ? deserializeAws_restJson1SoftwareUpdateOptions(output.Options, context) : undefined,
4920
+ Status: output.Status != null ? deserializeAws_restJson1OptionStatus(output.Status, context) : undefined,
4921
+ };
4922
+ };
4641
4923
  const deserializeAws_restJson1StorageType = (output, context) => {
4642
4924
  return {
4643
4925
  StorageSubTypeName: __expectString(output.StorageSubTypeName),
@@ -4853,6 +5135,12 @@ const deserializeAws_restJson1VpcEndpointSummaryList = (output, context) => {
4853
5135
  });
4854
5136
  return retVal;
4855
5137
  };
5138
+ const deserializeAws_restJson1WindowStartTime = (output, context) => {
5139
+ return {
5140
+ Hours: __expectLong(output.Hours),
5141
+ Minutes: __expectLong(output.Minutes),
5142
+ };
5143
+ };
4856
5144
  const deserializeAws_restJson1ZoneAwarenessConfig = (output, context) => {
4857
5145
  return {
4858
5146
  AvailabilityZoneCount: __expectInt32(output.AvailabilityZoneCount),