@aws-sdk/client-mwaa 3.677.0 → 3.679.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 CHANGED
@@ -73,6 +73,11 @@ AWS SDK for JavaScript MWAA Client for Node.js, Browser and React Native.
73
73
  <a href="https://docs.aws.amazon.com/mwaa/latest/API/API_CreateWebLoginToken.html">CreateWebLoginToken</a>
74
74
  </p>
75
75
  </li>
76
+ <li>
77
+ <p>
78
+ <a href="https://docs.aws.amazon.com/mwaa/latest/API/API_InvokeRestApi.html">InvokeRestApi</a>
79
+ </p>
80
+ </li>
76
81
  </ul>
77
82
  </li>
78
83
  </ul>
@@ -83,7 +88,7 @@ AWS SDK for JavaScript MWAA Client for Node.js, Browser and React Native.
83
88
 
84
89
  ## Installing
85
90
 
86
- To install the this package, simply type add or install @aws-sdk/client-mwaa
91
+ To install this package, simply type add or install @aws-sdk/client-mwaa
87
92
  using your favorite package manager:
88
93
 
89
94
  - `npm install @aws-sdk/client-mwaa`
@@ -315,6 +320,14 @@ GetEnvironment
315
320
 
316
321
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mwaa/command/GetEnvironmentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mwaa/Interface/GetEnvironmentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mwaa/Interface/GetEnvironmentCommandOutput/)
317
322
 
323
+ </details>
324
+ <details>
325
+ <summary>
326
+ InvokeRestApi
327
+ </summary>
328
+
329
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mwaa/command/InvokeRestApiCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mwaa/Interface/InvokeRestApiCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mwaa/Interface/InvokeRestApiCommandOutput/)
330
+
318
331
  </details>
319
332
  <details>
320
333
  <summary>
package/dist-cjs/index.js CHANGED
@@ -35,6 +35,9 @@ __export(src_exports, {
35
35
  GetEnvironmentCommand: () => GetEnvironmentCommand,
36
36
  GetEnvironmentOutputFilterSensitiveLog: () => GetEnvironmentOutputFilterSensitiveLog,
37
37
  InternalServerException: () => InternalServerException,
38
+ InvokeRestApiCommand: () => InvokeRestApiCommand,
39
+ InvokeRestApiRequestFilterSensitiveLog: () => InvokeRestApiRequestFilterSensitiveLog,
40
+ InvokeRestApiResponseFilterSensitiveLog: () => InvokeRestApiResponseFilterSensitiveLog,
38
41
  ListEnvironmentsCommand: () => ListEnvironmentsCommand,
39
42
  ListTagsForResourceCommand: () => ListTagsForResourceCommand,
40
43
  LoggingLevel: () => LoggingLevel,
@@ -43,6 +46,9 @@ __export(src_exports, {
43
46
  MWAAServiceException: () => MWAAServiceException,
44
47
  PublishMetricsCommand: () => PublishMetricsCommand,
45
48
  ResourceNotFoundException: () => ResourceNotFoundException,
49
+ RestApiClientException: () => RestApiClientException,
50
+ RestApiMethod: () => RestApiMethod,
51
+ RestApiServerException: () => RestApiServerException,
46
52
  TagResourceCommand: () => TagResourceCommand,
47
53
  Unit: () => Unit,
48
54
  UntagResourceCommand: () => UntagResourceCommand,
@@ -322,6 +328,51 @@ var EnvironmentStatus = {
322
328
  UPDATE_FAILED: "UPDATE_FAILED",
323
329
  UPDATING: "UPDATING"
324
330
  };
331
+ var RestApiMethod = {
332
+ DELETE: "DELETE",
333
+ GET: "GET",
334
+ PATCH: "PATCH",
335
+ POST: "POST",
336
+ PUT: "PUT"
337
+ };
338
+ var _RestApiClientException = class _RestApiClientException extends MWAAServiceException {
339
+ /**
340
+ * @internal
341
+ */
342
+ constructor(opts) {
343
+ super({
344
+ name: "RestApiClientException",
345
+ $fault: "client",
346
+ ...opts
347
+ });
348
+ this.name = "RestApiClientException";
349
+ this.$fault = "client";
350
+ Object.setPrototypeOf(this, _RestApiClientException.prototype);
351
+ this.RestApiStatusCode = opts.RestApiStatusCode;
352
+ this.RestApiResponse = opts.RestApiResponse;
353
+ }
354
+ };
355
+ __name(_RestApiClientException, "RestApiClientException");
356
+ var RestApiClientException = _RestApiClientException;
357
+ var _RestApiServerException = class _RestApiServerException extends MWAAServiceException {
358
+ /**
359
+ * @internal
360
+ */
361
+ constructor(opts) {
362
+ super({
363
+ name: "RestApiServerException",
364
+ $fault: "client",
365
+ ...opts
366
+ });
367
+ this.name = "RestApiServerException";
368
+ this.$fault = "client";
369
+ Object.setPrototypeOf(this, _RestApiServerException.prototype);
370
+ this.RestApiStatusCode = opts.RestApiStatusCode;
371
+ this.RestApiResponse = opts.RestApiResponse;
372
+ }
373
+ };
374
+ __name(_RestApiServerException, "RestApiServerException");
375
+ var RestApiServerException = _RestApiServerException;
325
376
  var Unit = {
326
377
  BITS: "Bits",
327
378
  BITS_PER_SECOND: "Bits/Second",
@@ -371,6 +422,14 @@ var GetEnvironmentOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
371
422
  ...obj,
372
423
  ...obj.Environment && { Environment: EnvironmentFilterSensitiveLog(obj.Environment) }
373
424
  }), "GetEnvironmentOutputFilterSensitiveLog");
425
+ var InvokeRestApiRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
426
+ ...obj,
427
+ ...obj.Body && { Body: import_smithy_client.SENSITIVE_STRING }
428
+ }), "InvokeRestApiRequestFilterSensitiveLog");
429
+ var InvokeRestApiResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
430
+ ...obj,
431
+ ...obj.RestApiResponse && { RestApiResponse: import_smithy_client.SENSITIVE_STRING }
432
+ }), "InvokeRestApiResponseFilterSensitiveLog");
374
433
  var UpdateEnvironmentInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
375
434
  ...obj,
376
435
  ...obj.AirflowConfigurationOptions && { AirflowConfigurationOptions: import_smithy_client.SENSITIVE_STRING }
@@ -496,6 +555,33 @@ var se_GetEnvironmentCommand = /* @__PURE__ */ __name(async (input, context) =>
496
555
  b.m("GET").h(headers).b(body);
497
556
  return b.build();
498
557
  }, "se_GetEnvironmentCommand");
558
+ var se_InvokeRestApiCommand = /* @__PURE__ */ __name(async (input, context) => {
559
+ const b = (0, import_core.requestBuilder)(input, context);
560
+ const headers = {
561
+ "content-type": "application/json"
562
+ };
563
+ b.bp("/restapi/{Name}");
564
+ b.p("Name", () => input.Name, "{Name}", false);
565
+ let body;
566
+ body = JSON.stringify(
567
+ (0, import_smithy_client.take)(input, {
568
+ Body: (_) => se_RestApiRequestBody(_, context),
569
+ Method: [],
570
+ Path: [],
571
+ QueryParameters: (_) => se_Document(_, context)
572
+ })
573
+ );
574
+ let { hostname: resolvedHostname } = await context.endpoint();
575
+ if (context.disableHostPrefix !== true) {
576
+ resolvedHostname = "env." + resolvedHostname;
577
+ if (!(0, import_protocol_http.isValidHostname)(resolvedHostname)) {
578
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
579
+ }
580
+ }
581
+ b.hn(resolvedHostname);
582
+ b.m("POST").h(headers).b(body);
583
+ return b.build();
584
+ }, "se_InvokeRestApiCommand");
499
585
  var se_ListEnvironmentsCommand = /* @__PURE__ */ __name(async (input, context) => {
500
586
  const b = (0, import_core.requestBuilder)(input, context);
501
587
  const headers = {};
@@ -715,6 +801,21 @@ var de_GetEnvironmentCommand = /* @__PURE__ */ __name(async (output, context) =>
715
801
  Object.assign(contents, doc);
716
802
  return contents;
717
803
  }, "de_GetEnvironmentCommand");
804
+ var de_InvokeRestApiCommand = /* @__PURE__ */ __name(async (output, context) => {
805
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
806
+ return de_CommandError(output, context);
807
+ }
808
+ const contents = (0, import_smithy_client.map)({
809
+ $metadata: deserializeMetadata(output)
810
+ });
811
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
812
+ const doc = (0, import_smithy_client.take)(data, {
813
+ RestApiResponse: (_) => de_RestApiResponse(_, context),
814
+ RestApiStatusCode: import_smithy_client.expectInt32
815
+ });
816
+ Object.assign(contents, doc);
817
+ return contents;
818
+ }, "de_InvokeRestApiCommand");
718
819
  var de_ListEnvironmentsCommand = /* @__PURE__ */ __name(async (output, context) => {
719
820
  if (output.statusCode !== 200 && output.statusCode >= 300) {
720
821
  return de_CommandError(output, context);
@@ -807,6 +908,12 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
807
908
  case "AccessDeniedException":
808
909
  case "com.amazonaws.mwaa#AccessDeniedException":
809
910
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
911
+ case "RestApiClientException":
912
+ case "com.amazonaws.mwaa#RestApiClientException":
913
+ throw await de_RestApiClientExceptionRes(parsedOutput, context);
914
+ case "RestApiServerException":
915
+ case "com.amazonaws.mwaa#RestApiServerException":
916
+ throw await de_RestApiServerExceptionRes(parsedOutput, context);
810
917
  default:
811
918
  const parsedBody = parsedOutput.body;
812
919
  return throwDefaultError({
@@ -856,6 +963,34 @@ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput
856
963
  });
857
964
  return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
858
965
  }, "de_ResourceNotFoundExceptionRes");
966
+ var de_RestApiClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
967
+ const contents = (0, import_smithy_client.map)({});
968
+ const data = parsedOutput.body;
969
+ const doc = (0, import_smithy_client.take)(data, {
970
+ RestApiResponse: (_) => de_RestApiResponse(_, context),
971
+ RestApiStatusCode: import_smithy_client.expectInt32
972
+ });
973
+ Object.assign(contents, doc);
974
+ const exception = new RestApiClientException({
975
+ $metadata: deserializeMetadata(parsedOutput),
976
+ ...contents
977
+ });
978
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
979
+ }, "de_RestApiClientExceptionRes");
980
+ var de_RestApiServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
981
+ const contents = (0, import_smithy_client.map)({});
982
+ const data = parsedOutput.body;
983
+ const doc = (0, import_smithy_client.take)(data, {
984
+ RestApiResponse: (_) => de_RestApiResponse(_, context),
985
+ RestApiStatusCode: import_smithy_client.expectInt32
986
+ });
987
+ Object.assign(contents, doc);
988
+ const exception = new RestApiServerException({
989
+ $metadata: deserializeMetadata(parsedOutput),
990
+ ...contents
991
+ });
992
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
993
+ }, "de_RestApiServerExceptionRes");
859
994
  var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
860
995
  const contents = (0, import_smithy_client.map)({});
861
996
  const data = parsedOutput.body;
@@ -884,6 +1019,9 @@ var se_MetricDatum = /* @__PURE__ */ __name((input, context) => {
884
1019
  Value: import_smithy_client.serializeFloat
885
1020
  });
886
1021
  }, "se_MetricDatum");
1022
+ var se_RestApiRequestBody = /* @__PURE__ */ __name((input, context) => {
1023
+ return input;
1024
+ }, "se_RestApiRequestBody");
887
1025
  var se_StatisticSet = /* @__PURE__ */ __name((input, context) => {
888
1026
  return (0, import_smithy_client.take)(input, {
889
1027
  Maximum: import_smithy_client.serializeFloat,
@@ -892,6 +1030,9 @@ var se_StatisticSet = /* @__PURE__ */ __name((input, context) => {
892
1030
  Sum: import_smithy_client.serializeFloat
893
1031
  });
894
1032
  }, "se_StatisticSet");
1033
+ var se_Document = /* @__PURE__ */ __name((input, context) => {
1034
+ return input;
1035
+ }, "se_Document");
895
1036
  var de_Environment = /* @__PURE__ */ __name((output, context) => {
896
1037
  return (0, import_smithy_client.take)(output, {
897
1038
  AirflowConfigurationOptions: import_smithy_client._json,
@@ -938,6 +1079,9 @@ var de_LastUpdate = /* @__PURE__ */ __name((output, context) => {
938
1079
  Status: import_smithy_client.expectString
939
1080
  });
940
1081
  }, "de_LastUpdate");
1082
+ var de_RestApiResponse = /* @__PURE__ */ __name((output, context) => {
1083
+ return output;
1084
+ }, "de_RestApiResponse");
941
1085
  var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
942
1086
  httpStatusCode: output.statusCode,
943
1087
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1015,6 +1159,20 @@ var _GetEnvironmentCommand = class _GetEnvironmentCommand extends import_smithy_
1015
1159
  __name(_GetEnvironmentCommand, "GetEnvironmentCommand");
1016
1160
  var GetEnvironmentCommand = _GetEnvironmentCommand;
1017
1161
 
1162
+ // src/commands/InvokeRestApiCommand.ts
1163
+
1164
+
1165
+
1166
+ var _InvokeRestApiCommand = class _InvokeRestApiCommand extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1167
+ return [
1168
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1169
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1170
+ ];
1171
+ }).s("AmazonMWAA", "InvokeRestApi", {}).n("MWAAClient", "InvokeRestApiCommand").f(InvokeRestApiRequestFilterSensitiveLog, InvokeRestApiResponseFilterSensitiveLog).ser(se_InvokeRestApiCommand).de(de_InvokeRestApiCommand).build() {
1172
+ };
1173
+ __name(_InvokeRestApiCommand, "InvokeRestApiCommand");
1174
+ var InvokeRestApiCommand = _InvokeRestApiCommand;
1175
+
1018
1176
  // src/commands/ListEnvironmentsCommand.ts
1019
1177
 
1020
1178
 
@@ -1106,6 +1264,7 @@ var commands = {
1106
1264
  CreateWebLoginTokenCommand,
1107
1265
  DeleteEnvironmentCommand,
1108
1266
  GetEnvironmentCommand,
1267
+ InvokeRestApiCommand,
1109
1268
  ListEnvironmentsCommand,
1110
1269
  ListTagsForResourceCommand,
1111
1270
  PublishMetricsCommand,
@@ -1135,6 +1294,7 @@ var paginateListEnvironments = (0, import_core.createPaginator)(MWAAClient, List
1135
1294
  CreateWebLoginTokenCommand,
1136
1295
  DeleteEnvironmentCommand,
1137
1296
  GetEnvironmentCommand,
1297
+ InvokeRestApiCommand,
1138
1298
  ListEnvironmentsCommand,
1139
1299
  ListTagsForResourceCommand,
1140
1300
  PublishMetricsCommand,
@@ -1151,12 +1311,17 @@ var paginateListEnvironments = (0, import_core.createPaginator)(MWAAClient, List
1151
1311
  ValidationException,
1152
1312
  UpdateStatus,
1153
1313
  EnvironmentStatus,
1314
+ RestApiMethod,
1315
+ RestApiClientException,
1316
+ RestApiServerException,
1154
1317
  Unit,
1155
1318
  CreateCliTokenResponseFilterSensitiveLog,
1156
1319
  CreateEnvironmentInputFilterSensitiveLog,
1157
1320
  CreateWebLoginTokenResponseFilterSensitiveLog,
1158
1321
  EnvironmentFilterSensitiveLog,
1159
1322
  GetEnvironmentOutputFilterSensitiveLog,
1323
+ InvokeRestApiRequestFilterSensitiveLog,
1324
+ InvokeRestApiResponseFilterSensitiveLog,
1160
1325
  UpdateEnvironmentInputFilterSensitiveLog
1161
1326
  });
1162
1327
 
package/dist-es/MWAA.js CHANGED
@@ -4,6 +4,7 @@ import { CreateEnvironmentCommand, } from "./commands/CreateEnvironmentCommand";
4
4
  import { CreateWebLoginTokenCommand, } from "./commands/CreateWebLoginTokenCommand";
5
5
  import { DeleteEnvironmentCommand, } from "./commands/DeleteEnvironmentCommand";
6
6
  import { GetEnvironmentCommand, } from "./commands/GetEnvironmentCommand";
7
+ import { InvokeRestApiCommand, } from "./commands/InvokeRestApiCommand";
7
8
  import { ListEnvironmentsCommand, } from "./commands/ListEnvironmentsCommand";
8
9
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
9
10
  import { PublishMetricsCommand, } from "./commands/PublishMetricsCommand";
@@ -17,6 +18,7 @@ const commands = {
17
18
  CreateWebLoginTokenCommand,
18
19
  DeleteEnvironmentCommand,
19
20
  GetEnvironmentCommand,
21
+ InvokeRestApiCommand,
20
22
  ListEnvironmentsCommand,
21
23
  ListTagsForResourceCommand,
22
24
  PublishMetricsCommand,
@@ -0,0 +1,23 @@
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 { commonParams } from "../endpoint/EndpointParameters";
5
+ import { InvokeRestApiRequestFilterSensitiveLog, InvokeRestApiResponseFilterSensitiveLog, } from "../models/models_0";
6
+ import { de_InvokeRestApiCommand, se_InvokeRestApiCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class InvokeRestApiCommand extends $Command
9
+ .classBuilder()
10
+ .ep(commonParams)
11
+ .m(function (Command, cs, config, o) {
12
+ return [
13
+ getSerdePlugin(config, this.serialize, this.deserialize),
14
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
15
+ ];
16
+ })
17
+ .s("AmazonMWAA", "InvokeRestApi", {})
18
+ .n("MWAAClient", "InvokeRestApiCommand")
19
+ .f(InvokeRestApiRequestFilterSensitiveLog, InvokeRestApiResponseFilterSensitiveLog)
20
+ .ser(se_InvokeRestApiCommand)
21
+ .de(de_InvokeRestApiCommand)
22
+ .build() {
23
+ }
@@ -3,6 +3,7 @@ export * from "./CreateEnvironmentCommand";
3
3
  export * from "./CreateWebLoginTokenCommand";
4
4
  export * from "./DeleteEnvironmentCommand";
5
5
  export * from "./GetEnvironmentCommand";
6
+ export * from "./InvokeRestApiCommand";
6
7
  export * from "./ListEnvironmentsCommand";
7
8
  export * from "./ListTagsForResourceCommand";
8
9
  export * from "./PublishMetricsCommand";
@@ -83,6 +83,41 @@ export const EnvironmentStatus = {
83
83
  UPDATE_FAILED: "UPDATE_FAILED",
84
84
  UPDATING: "UPDATING",
85
85
  };
86
+ export const RestApiMethod = {
87
+ DELETE: "DELETE",
88
+ GET: "GET",
89
+ PATCH: "PATCH",
90
+ POST: "POST",
91
+ PUT: "PUT",
92
+ };
93
+ export class RestApiClientException extends __BaseException {
94
+ constructor(opts) {
95
+ super({
96
+ name: "RestApiClientException",
97
+ $fault: "client",
98
+ ...opts,
99
+ });
100
+ this.name = "RestApiClientException";
101
+ this.$fault = "client";
102
+ Object.setPrototypeOf(this, RestApiClientException.prototype);
103
+ this.RestApiStatusCode = opts.RestApiStatusCode;
104
+ this.RestApiResponse = opts.RestApiResponse;
105
+ }
106
+ }
107
+ export class RestApiServerException extends __BaseException {
108
+ constructor(opts) {
109
+ super({
110
+ name: "RestApiServerException",
111
+ $fault: "client",
112
+ ...opts,
113
+ });
114
+ this.name = "RestApiServerException";
115
+ this.$fault = "client";
116
+ Object.setPrototypeOf(this, RestApiServerException.prototype);
117
+ this.RestApiStatusCode = opts.RestApiStatusCode;
118
+ this.RestApiResponse = opts.RestApiResponse;
119
+ }
120
+ }
86
121
  export const Unit = {
87
122
  BITS: "Bits",
88
123
  BITS_PER_SECOND: "Bits/Second",
@@ -132,6 +167,14 @@ export const GetEnvironmentOutputFilterSensitiveLog = (obj) => ({
132
167
  ...obj,
133
168
  ...(obj.Environment && { Environment: EnvironmentFilterSensitiveLog(obj.Environment) }),
134
169
  });
170
+ export const InvokeRestApiRequestFilterSensitiveLog = (obj) => ({
171
+ ...obj,
172
+ ...(obj.Body && { Body: SENSITIVE_STRING }),
173
+ });
174
+ export const InvokeRestApiResponseFilterSensitiveLog = (obj) => ({
175
+ ...obj,
176
+ ...(obj.RestApiResponse && { RestApiResponse: SENSITIVE_STRING }),
177
+ });
135
178
  export const UpdateEnvironmentInputFilterSensitiveLog = (obj) => ({
136
179
  ...obj,
137
180
  ...(obj.AirflowConfigurationOptions && { AirflowConfigurationOptions: SENSITIVE_STRING }),
@@ -2,7 +2,7 @@ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody a
2
2
  import { requestBuilder as rb } from "@smithy/core";
3
3
  import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
4
4
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
5
- import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
5
+ import { AccessDeniedException, InternalServerException, ResourceNotFoundException, RestApiClientException, RestApiServerException, ValidationException, } from "../models/models_0";
6
6
  import { MWAAServiceException as __BaseException } from "../models/MWAAServiceException";
7
7
  export const se_CreateCliTokenCommand = async (input, context) => {
8
8
  const b = rb(input, context);
@@ -117,6 +117,31 @@ export const se_GetEnvironmentCommand = async (input, context) => {
117
117
  b.m("GET").h(headers).b(body);
118
118
  return b.build();
119
119
  };
120
+ export const se_InvokeRestApiCommand = async (input, context) => {
121
+ const b = rb(input, context);
122
+ const headers = {
123
+ "content-type": "application/json",
124
+ };
125
+ b.bp("/restapi/{Name}");
126
+ b.p("Name", () => input.Name, "{Name}", false);
127
+ let body;
128
+ body = JSON.stringify(take(input, {
129
+ Body: (_) => se_RestApiRequestBody(_, context),
130
+ Method: [],
131
+ Path: [],
132
+ QueryParameters: (_) => se_Document(_, context),
133
+ }));
134
+ let { hostname: resolvedHostname } = await context.endpoint();
135
+ if (context.disableHostPrefix !== true) {
136
+ resolvedHostname = "env." + resolvedHostname;
137
+ if (!__isValidHostname(resolvedHostname)) {
138
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
139
+ }
140
+ }
141
+ b.hn(resolvedHostname);
142
+ b.m("POST").h(headers).b(body);
143
+ return b.build();
144
+ };
120
145
  export const se_ListEnvironmentsCommand = async (input, context) => {
121
146
  const b = rb(input, context);
122
147
  const headers = {};
@@ -330,6 +355,21 @@ export const de_GetEnvironmentCommand = async (output, context) => {
330
355
  Object.assign(contents, doc);
331
356
  return contents;
332
357
  };
358
+ export const de_InvokeRestApiCommand = async (output, context) => {
359
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
360
+ return de_CommandError(output, context);
361
+ }
362
+ const contents = map({
363
+ $metadata: deserializeMetadata(output),
364
+ });
365
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
366
+ const doc = take(data, {
367
+ RestApiResponse: (_) => de_RestApiResponse(_, context),
368
+ RestApiStatusCode: __expectInt32,
369
+ });
370
+ Object.assign(contents, doc);
371
+ return contents;
372
+ };
333
373
  export const de_ListEnvironmentsCommand = async (output, context) => {
334
374
  if (output.statusCode !== 200 && output.statusCode >= 300) {
335
375
  return de_CommandError(output, context);
@@ -422,6 +462,12 @@ const de_CommandError = async (output, context) => {
422
462
  case "AccessDeniedException":
423
463
  case "com.amazonaws.mwaa#AccessDeniedException":
424
464
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
465
+ case "RestApiClientException":
466
+ case "com.amazonaws.mwaa#RestApiClientException":
467
+ throw await de_RestApiClientExceptionRes(parsedOutput, context);
468
+ case "RestApiServerException":
469
+ case "com.amazonaws.mwaa#RestApiServerException":
470
+ throw await de_RestApiServerExceptionRes(parsedOutput, context);
425
471
  default:
426
472
  const parsedBody = parsedOutput.body;
427
473
  return throwDefaultError({
@@ -471,6 +517,34 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
471
517
  });
472
518
  return __decorateServiceException(exception, parsedOutput.body);
473
519
  };
520
+ const de_RestApiClientExceptionRes = async (parsedOutput, context) => {
521
+ const contents = map({});
522
+ const data = parsedOutput.body;
523
+ const doc = take(data, {
524
+ RestApiResponse: (_) => de_RestApiResponse(_, context),
525
+ RestApiStatusCode: __expectInt32,
526
+ });
527
+ Object.assign(contents, doc);
528
+ const exception = new RestApiClientException({
529
+ $metadata: deserializeMetadata(parsedOutput),
530
+ ...contents,
531
+ });
532
+ return __decorateServiceException(exception, parsedOutput.body);
533
+ };
534
+ const de_RestApiServerExceptionRes = async (parsedOutput, context) => {
535
+ const contents = map({});
536
+ const data = parsedOutput.body;
537
+ const doc = take(data, {
538
+ RestApiResponse: (_) => de_RestApiResponse(_, context),
539
+ RestApiStatusCode: __expectInt32,
540
+ });
541
+ Object.assign(contents, doc);
542
+ const exception = new RestApiServerException({
543
+ $metadata: deserializeMetadata(parsedOutput),
544
+ ...contents,
545
+ });
546
+ return __decorateServiceException(exception, parsedOutput.body);
547
+ };
474
548
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
475
549
  const contents = map({});
476
550
  const data = parsedOutput.body;
@@ -501,6 +575,9 @@ const se_MetricDatum = (input, context) => {
501
575
  Value: __serializeFloat,
502
576
  });
503
577
  };
578
+ const se_RestApiRequestBody = (input, context) => {
579
+ return input;
580
+ };
504
581
  const se_StatisticSet = (input, context) => {
505
582
  return take(input, {
506
583
  Maximum: __serializeFloat,
@@ -509,6 +586,9 @@ const se_StatisticSet = (input, context) => {
509
586
  Sum: __serializeFloat,
510
587
  });
511
588
  };
589
+ const se_Document = (input, context) => {
590
+ return input;
591
+ };
512
592
  const de_Environment = (output, context) => {
513
593
  return take(output, {
514
594
  AirflowConfigurationOptions: _json,
@@ -555,6 +635,9 @@ const de_LastUpdate = (output, context) => {
555
635
  Status: __expectString,
556
636
  });
557
637
  };
638
+ const de_RestApiResponse = (output, context) => {
639
+ return output;
640
+ };
558
641
  const deserializeMetadata = (output) => ({
559
642
  httpStatusCode: output.statusCode,
560
643
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -4,6 +4,7 @@ import { CreateEnvironmentCommandInput, CreateEnvironmentCommandOutput } from ".
4
4
  import { CreateWebLoginTokenCommandInput, CreateWebLoginTokenCommandOutput } from "./commands/CreateWebLoginTokenCommand";
5
5
  import { DeleteEnvironmentCommandInput, DeleteEnvironmentCommandOutput } from "./commands/DeleteEnvironmentCommand";
6
6
  import { GetEnvironmentCommandInput, GetEnvironmentCommandOutput } from "./commands/GetEnvironmentCommand";
7
+ import { InvokeRestApiCommandInput, InvokeRestApiCommandOutput } from "./commands/InvokeRestApiCommand";
7
8
  import { ListEnvironmentsCommandInput, ListEnvironmentsCommandOutput } from "./commands/ListEnvironmentsCommand";
8
9
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
9
10
  import { PublishMetricsCommandInput, PublishMetricsCommandOutput } from "./commands/PublishMetricsCommand";
@@ -42,6 +43,12 @@ export interface MWAA {
42
43
  getEnvironment(args: GetEnvironmentCommandInput, options?: __HttpHandlerOptions): Promise<GetEnvironmentCommandOutput>;
43
44
  getEnvironment(args: GetEnvironmentCommandInput, cb: (err: any, data?: GetEnvironmentCommandOutput) => void): void;
44
45
  getEnvironment(args: GetEnvironmentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetEnvironmentCommandOutput) => void): void;
46
+ /**
47
+ * @see {@link InvokeRestApiCommand}
48
+ */
49
+ invokeRestApi(args: InvokeRestApiCommandInput, options?: __HttpHandlerOptions): Promise<InvokeRestApiCommandOutput>;
50
+ invokeRestApi(args: InvokeRestApiCommandInput, cb: (err: any, data?: InvokeRestApiCommandOutput) => void): void;
51
+ invokeRestApi(args: InvokeRestApiCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeRestApiCommandOutput) => void): void;
45
52
  /**
46
53
  * @see {@link ListEnvironmentsCommand}
47
54
  */
@@ -147,6 +154,11 @@ export interface MWAA {
147
154
  * <a href="https://docs.aws.amazon.com/mwaa/latest/API/API_CreateWebLoginToken.html">CreateWebLoginToken</a>
148
155
  * </p>
149
156
  * </li>
157
+ * <li>
158
+ * <p>
159
+ * <a href="https://docs.aws.amazon.com/mwaa/latest/API/API_InvokeRestApi.html">InvokeRestApi</a>
160
+ * </p>
161
+ * </li>
150
162
  * </ul>
151
163
  * </li>
152
164
  * </ul>
@@ -12,6 +12,7 @@ import { CreateEnvironmentCommandInput, CreateEnvironmentCommandOutput } from ".
12
12
  import { CreateWebLoginTokenCommandInput, CreateWebLoginTokenCommandOutput } from "./commands/CreateWebLoginTokenCommand";
13
13
  import { DeleteEnvironmentCommandInput, DeleteEnvironmentCommandOutput } from "./commands/DeleteEnvironmentCommand";
14
14
  import { GetEnvironmentCommandInput, GetEnvironmentCommandOutput } from "./commands/GetEnvironmentCommand";
15
+ import { InvokeRestApiCommandInput, InvokeRestApiCommandOutput } from "./commands/InvokeRestApiCommand";
15
16
  import { ListEnvironmentsCommandInput, ListEnvironmentsCommandOutput } from "./commands/ListEnvironmentsCommand";
16
17
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
17
18
  import { PublishMetricsCommandInput, PublishMetricsCommandOutput } from "./commands/PublishMetricsCommand";
@@ -24,11 +25,11 @@ export { __Client };
24
25
  /**
25
26
  * @public
26
27
  */
27
- export type ServiceInputTypes = CreateCliTokenCommandInput | CreateEnvironmentCommandInput | CreateWebLoginTokenCommandInput | DeleteEnvironmentCommandInput | GetEnvironmentCommandInput | ListEnvironmentsCommandInput | ListTagsForResourceCommandInput | PublishMetricsCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateEnvironmentCommandInput;
28
+ export type ServiceInputTypes = CreateCliTokenCommandInput | CreateEnvironmentCommandInput | CreateWebLoginTokenCommandInput | DeleteEnvironmentCommandInput | GetEnvironmentCommandInput | InvokeRestApiCommandInput | ListEnvironmentsCommandInput | ListTagsForResourceCommandInput | PublishMetricsCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateEnvironmentCommandInput;
28
29
  /**
29
30
  * @public
30
31
  */
31
- export type ServiceOutputTypes = CreateCliTokenCommandOutput | CreateEnvironmentCommandOutput | CreateWebLoginTokenCommandOutput | DeleteEnvironmentCommandOutput | GetEnvironmentCommandOutput | ListEnvironmentsCommandOutput | ListTagsForResourceCommandOutput | PublishMetricsCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateEnvironmentCommandOutput;
32
+ export type ServiceOutputTypes = CreateCliTokenCommandOutput | CreateEnvironmentCommandOutput | CreateWebLoginTokenCommandOutput | DeleteEnvironmentCommandOutput | GetEnvironmentCommandOutput | InvokeRestApiCommandOutput | ListEnvironmentsCommandOutput | ListTagsForResourceCommandOutput | PublishMetricsCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateEnvironmentCommandOutput;
32
33
  /**
33
34
  * @public
34
35
  */
@@ -228,6 +229,11 @@ export interface MWAAClientResolvedConfig extends MWAAClientResolvedConfigType {
228
229
  * <a href="https://docs.aws.amazon.com/mwaa/latest/API/API_CreateWebLoginToken.html">CreateWebLoginToken</a>
229
230
  * </p>
230
231
  * </li>
232
+ * <li>
233
+ * <p>
234
+ * <a href="https://docs.aws.amazon.com/mwaa/latest/API/API_InvokeRestApi.html">InvokeRestApi</a>
235
+ * </p>
236
+ * </li>
231
237
  * </ul>
232
238
  * </li>
233
239
  * </ul>
@@ -27,7 +27,7 @@ declare const CreateEnvironmentCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * <p>Creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.</p>
30
+ * <p>Creates an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.</p>
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -27,7 +27,7 @@ declare const DeleteEnvironmentCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * <p>Deletes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.</p>
30
+ * <p>Deletes an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.</p>
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -0,0 +1,126 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { InvokeRestApiRequest, InvokeRestApiResponse } from "../models/models_0";
4
+ import { MWAAClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MWAAClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link InvokeRestApiCommand}.
14
+ */
15
+ export interface InvokeRestApiCommandInput extends InvokeRestApiRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link InvokeRestApiCommand}.
21
+ */
22
+ export interface InvokeRestApiCommandOutput extends InvokeRestApiResponse, __MetadataBearer {
23
+ }
24
+ declare const InvokeRestApiCommand_base: {
25
+ new (input: InvokeRestApiCommandInput): import("@smithy/smithy-client").CommandImpl<InvokeRestApiCommandInput, InvokeRestApiCommandOutput, MWAAClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: InvokeRestApiCommandInput): import("@smithy/smithy-client").CommandImpl<InvokeRestApiCommandInput, InvokeRestApiCommandOutput, MWAAClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Invokes the Apache Airflow REST API on the webserver with the specified inputs. To
31
+ * learn more, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/access-mwaa-apache-airflow-rest-api.html">Using the Apache Airflow REST API</a>
32
+ * </p>
33
+ * @example
34
+ * Use a bare-bones client and the command you need to make an API call.
35
+ * ```javascript
36
+ * import { MWAAClient, InvokeRestApiCommand } from "@aws-sdk/client-mwaa"; // ES Modules import
37
+ * // const { MWAAClient, InvokeRestApiCommand } = require("@aws-sdk/client-mwaa"); // CommonJS import
38
+ * const client = new MWAAClient(config);
39
+ * const input = { // InvokeRestApiRequest
40
+ * Name: "STRING_VALUE", // required
41
+ * Path: "STRING_VALUE", // required
42
+ * Method: "STRING_VALUE", // required
43
+ * QueryParameters: "DOCUMENT_VALUE",
44
+ * Body: "DOCUMENT_VALUE",
45
+ * };
46
+ * const command = new InvokeRestApiCommand(input);
47
+ * const response = await client.send(command);
48
+ * // { // InvokeRestApiResponse
49
+ * // RestApiStatusCode: Number("int"),
50
+ * // RestApiResponse: "DOCUMENT_VALUE",
51
+ * // };
52
+ *
53
+ * ```
54
+ *
55
+ * @param InvokeRestApiCommandInput - {@link InvokeRestApiCommandInput}
56
+ * @returns {@link InvokeRestApiCommandOutput}
57
+ * @see {@link InvokeRestApiCommandInput} for command's `input` shape.
58
+ * @see {@link InvokeRestApiCommandOutput} for command's `response` shape.
59
+ * @see {@link MWAAClientResolvedConfig | config} for MWAAClient's `config` shape.
60
+ *
61
+ * @throws {@link AccessDeniedException} (client fault)
62
+ * <p>Access to the Apache Airflow Web UI or CLI has been denied due to insufficient permissions. To learn more, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/access-policies.html">Accessing an Amazon MWAA environment</a>.</p>
63
+ *
64
+ * @throws {@link InternalServerException} (server fault)
65
+ * <p>InternalServerException: An internal error has occurred.</p>
66
+ *
67
+ * @throws {@link ResourceNotFoundException} (client fault)
68
+ * <p>ResourceNotFoundException: The resource is not available.</p>
69
+ *
70
+ * @throws {@link RestApiClientException} (client fault)
71
+ * <p>An exception indicating that a client-side error occurred during the Apache Airflow
72
+ * REST API call.</p>
73
+ *
74
+ * @throws {@link RestApiServerException} (client fault)
75
+ * <p>An exception indicating that a server-side error occurred during the Apache Airflow
76
+ * REST API call.</p>
77
+ *
78
+ * @throws {@link ValidationException} (client fault)
79
+ * <p>ValidationException: The provided input is not valid.</p>
80
+ *
81
+ * @throws {@link MWAAServiceException}
82
+ * <p>Base exception class for all service exceptions from MWAA service.</p>
83
+ *
84
+ * @public
85
+ * @example Listing Airflow variables.
86
+ * ```javascript
87
+ * //
88
+ * const input = {
89
+ * "Method": "GET",
90
+ * "Name": "MyEnvironment",
91
+ * "Path": "/variables"
92
+ * };
93
+ * const command = new InvokeRestApiCommand(input);
94
+ * const response = await client.send(command);
95
+ * /* response ==
96
+ * {
97
+ * "RestApiResponse": {
98
+ * "total_entries": 1,
99
+ * "variables": [
100
+ * {
101
+ * "key": "test-variable",
102
+ * "value": "123",
103
+ * "description": "Example variable"
104
+ * }
105
+ * ]
106
+ * },
107
+ * "RestApiStatusCode": 200
108
+ * }
109
+ * *\/
110
+ * // example id: example-1
111
+ * ```
112
+ *
113
+ */
114
+ export declare class InvokeRestApiCommand extends InvokeRestApiCommand_base {
115
+ /** @internal type navigation helper, not in runtime. */
116
+ protected static __types: {
117
+ api: {
118
+ input: InvokeRestApiRequest;
119
+ output: InvokeRestApiResponse;
120
+ };
121
+ sdk: {
122
+ input: InvokeRestApiCommandInput;
123
+ output: InvokeRestApiCommandOutput;
124
+ };
125
+ };
126
+ }
@@ -3,6 +3,7 @@ export * from "./CreateEnvironmentCommand";
3
3
  export * from "./CreateWebLoginTokenCommand";
4
4
  export * from "./DeleteEnvironmentCommand";
5
5
  export * from "./GetEnvironmentCommand";
6
+ export * from "./InvokeRestApiCommand";
6
7
  export * from "./ListEnvironmentsCommand";
7
8
  export * from "./ListTagsForResourceCommand";
8
9
  export * from "./PublishMetricsCommand";
@@ -65,6 +65,11 @@
65
65
  * <a href="https://docs.aws.amazon.com/mwaa/latest/API/API_CreateWebLoginToken.html">CreateWebLoginToken</a>
66
66
  * </p>
67
67
  * </li>
68
+ * <li>
69
+ * <p>
70
+ * <a href="https://docs.aws.amazon.com/mwaa/latest/API/API_InvokeRestApi.html">InvokeRestApi</a>
71
+ * </p>
72
+ * </li>
68
73
  * </ul>
69
74
  * </li>
70
75
  * </ul>
@@ -1,4 +1,5 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
2
+ import { DocumentType as __DocumentType } from "@smithy/types";
2
3
  import { MWAAServiceException as __BaseException } from "./MWAAServiceException";
3
4
  /**
4
5
  * <p>Access to the Apache Airflow Web UI or CLI has been denied due to insufficient permissions. To learn more, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/access-policies.html">Accessing an Amazon MWAA environment</a>.</p>
@@ -153,7 +154,7 @@ export declare const WebserverAccessMode: {
153
154
  */
154
155
  export type WebserverAccessMode = (typeof WebserverAccessMode)[keyof typeof WebserverAccessMode];
155
156
  /**
156
- * <p>This section contains the Amazon Managed Workflows for Apache Airflow (MWAA) API reference documentation to create an environment. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/get-started.html">Get started with Amazon Managed Workflows for Apache Airflow</a>.</p>
157
+ * <p>This section contains the Amazon Managed Workflows for Apache Airflow (Amazon MWAA) API reference documentation to create an environment. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/get-started.html">Get started with Amazon Managed Workflows for Apache Airflow</a>.</p>
157
158
  * @public
158
159
  */
159
160
  export interface CreateEnvironmentInput {
@@ -250,10 +251,10 @@ export interface CreateEnvironmentInput {
250
251
  KmsKey?: string;
251
252
  /**
252
253
  * <p>The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version.
253
- * For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions.html">Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (MWAA)</a>.</p>
254
- * <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>
255
- * <code>2.8.1</code>
256
- * </p>
254
+ * For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions.html">Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA)</a>.</p>
255
+ * <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>,
256
+ * <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>,
257
+ * <code>2.8.1</code>, <code>2.9.2</code>, and <code>2.10.1</code>.</p>
257
258
  * @public
258
259
  */
259
260
  AirflowVersion?: string;
@@ -656,7 +657,9 @@ export interface Environment {
656
657
  KmsKey?: string;
657
658
  /**
658
659
  * <p>The Apache Airflow version on your environment.</p>
659
- * <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>, <code>2.8.1</code>.</p>
660
+ * <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>,
661
+ * <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>,
662
+ * <code>2.8.1</code>, <code>2.9.2</code>, and <code>2.10.1</code>.</p>
660
663
  * @public
661
664
  */
662
665
  AirflowVersion?: string;
@@ -844,6 +847,120 @@ export interface GetEnvironmentOutput {
844
847
  */
845
848
  Environment?: Environment;
846
849
  }
850
+ /**
851
+ * @public
852
+ * @enum
853
+ */
854
+ export declare const RestApiMethod: {
855
+ readonly DELETE: "DELETE";
856
+ readonly GET: "GET";
857
+ readonly PATCH: "PATCH";
858
+ readonly POST: "POST";
859
+ readonly PUT: "PUT";
860
+ };
861
+ /**
862
+ * @public
863
+ */
864
+ export type RestApiMethod = (typeof RestApiMethod)[keyof typeof RestApiMethod];
865
+ /**
866
+ * @public
867
+ */
868
+ export interface InvokeRestApiRequest {
869
+ /**
870
+ * <p>The name of the Amazon MWAA environment. For example, <code>MyMWAAEnvironment</code>.</p>
871
+ * @public
872
+ */
873
+ Name: string | undefined;
874
+ /**
875
+ * <p>The Apache Airflow REST API endpoint path to be called. For example,
876
+ * <code>/dags/123456/clearTaskInstances</code>. For more information, see <a href="https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html">Apache Airflow API</a>
877
+ * </p>
878
+ * @public
879
+ */
880
+ Path: string | undefined;
881
+ /**
882
+ * <p>The HTTP method used for making Airflow REST API calls. For example,
883
+ * <code>POST</code>. </p>
884
+ * @public
885
+ */
886
+ Method: RestApiMethod | undefined;
887
+ /**
888
+ * <p>Query parameters to be included in the Apache Airflow REST API call, provided as a
889
+ * JSON object. </p>
890
+ * @public
891
+ */
892
+ QueryParameters?: __DocumentType;
893
+ /**
894
+ * <p>The request body for the Apache Airflow REST API call, provided as a JSON
895
+ * object.</p>
896
+ * @public
897
+ */
898
+ Body?: __DocumentType;
899
+ }
900
+ /**
901
+ * @public
902
+ */
903
+ export interface InvokeRestApiResponse {
904
+ /**
905
+ * <p>The HTTP status code returned by the Apache Airflow REST API call.</p>
906
+ * @public
907
+ */
908
+ RestApiStatusCode?: number;
909
+ /**
910
+ * <p>The response data from the Apache Airflow REST API call, provided as a JSON
911
+ * object.</p>
912
+ * @public
913
+ */
914
+ RestApiResponse?: __DocumentType;
915
+ }
916
+ /**
917
+ * <p>An exception indicating that a client-side error occurred during the Apache Airflow
918
+ * REST API call.</p>
919
+ * @public
920
+ */
921
+ export declare class RestApiClientException extends __BaseException {
922
+ readonly name: "RestApiClientException";
923
+ readonly $fault: "client";
924
+ /**
925
+ * <p>The HTTP status code returned by the Apache Airflow REST API call.</p>
926
+ * @public
927
+ */
928
+ RestApiStatusCode?: number;
929
+ /**
930
+ * <p>The error response data from the Apache Airflow REST API call, provided as a JSON
931
+ * object.</p>
932
+ * @public
933
+ */
934
+ RestApiResponse?: __DocumentType;
935
+ /**
936
+ * @internal
937
+ */
938
+ constructor(opts: __ExceptionOptionType<RestApiClientException, __BaseException>);
939
+ }
940
+ /**
941
+ * <p>An exception indicating that a server-side error occurred during the Apache Airflow
942
+ * REST API call.</p>
943
+ * @public
944
+ */
945
+ export declare class RestApiServerException extends __BaseException {
946
+ readonly name: "RestApiServerException";
947
+ readonly $fault: "client";
948
+ /**
949
+ * <p>The HTTP status code returned by the Apache Airflow REST API call.</p>
950
+ * @public
951
+ */
952
+ RestApiStatusCode?: number;
953
+ /**
954
+ * <p>The error response data from the Apache Airflow REST API call, provided as a JSON
955
+ * object.</p>
956
+ * @public
957
+ */
958
+ RestApiResponse?: __DocumentType;
959
+ /**
960
+ * @internal
961
+ */
962
+ constructor(opts: __ExceptionOptionType<RestApiServerException, __BaseException>);
963
+ }
847
964
  /**
848
965
  * @public
849
966
  */
@@ -1127,7 +1244,9 @@ export interface UpdateEnvironmentInput {
1127
1244
  * <p>The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.</p>
1128
1245
  * <p>Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating
1129
1246
  * your resources, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/upgrading-environment.html">Upgrading an Amazon MWAA environment</a>.</p>
1130
- * <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>, <code>2.8.1</code>.</p>
1247
+ * <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>,
1248
+ * <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>,
1249
+ * <code>2.8.1</code>, <code>2.9.2</code>, and <code>2.10.1</code>.</p>
1131
1250
  * @public
1132
1251
  */
1133
1252
  AirflowVersion?: string;
@@ -1289,6 +1408,14 @@ export declare const EnvironmentFilterSensitiveLog: (obj: Environment) => any;
1289
1408
  * @internal
1290
1409
  */
1291
1410
  export declare const GetEnvironmentOutputFilterSensitiveLog: (obj: GetEnvironmentOutput) => any;
1411
+ /**
1412
+ * @internal
1413
+ */
1414
+ export declare const InvokeRestApiRequestFilterSensitiveLog: (obj: InvokeRestApiRequest) => any;
1415
+ /**
1416
+ * @internal
1417
+ */
1418
+ export declare const InvokeRestApiResponseFilterSensitiveLog: (obj: InvokeRestApiResponse) => any;
1292
1419
  /**
1293
1420
  * @internal
1294
1421
  */
@@ -5,6 +5,7 @@ import { CreateEnvironmentCommandInput, CreateEnvironmentCommandOutput } from ".
5
5
  import { CreateWebLoginTokenCommandInput, CreateWebLoginTokenCommandOutput } from "../commands/CreateWebLoginTokenCommand";
6
6
  import { DeleteEnvironmentCommandInput, DeleteEnvironmentCommandOutput } from "../commands/DeleteEnvironmentCommand";
7
7
  import { GetEnvironmentCommandInput, GetEnvironmentCommandOutput } from "../commands/GetEnvironmentCommand";
8
+ import { InvokeRestApiCommandInput, InvokeRestApiCommandOutput } from "../commands/InvokeRestApiCommand";
8
9
  import { ListEnvironmentsCommandInput, ListEnvironmentsCommandOutput } from "../commands/ListEnvironmentsCommand";
9
10
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "../commands/ListTagsForResourceCommand";
10
11
  import { PublishMetricsCommandInput, PublishMetricsCommandOutput } from "../commands/PublishMetricsCommand";
@@ -31,6 +32,10 @@ export declare const se_DeleteEnvironmentCommand: (input: DeleteEnvironmentComma
31
32
  * serializeAws_restJson1GetEnvironmentCommand
32
33
  */
33
34
  export declare const se_GetEnvironmentCommand: (input: GetEnvironmentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
35
+ /**
36
+ * serializeAws_restJson1InvokeRestApiCommand
37
+ */
38
+ export declare const se_InvokeRestApiCommand: (input: InvokeRestApiCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
34
39
  /**
35
40
  * serializeAws_restJson1ListEnvironmentsCommand
36
41
  */
@@ -75,6 +80,10 @@ export declare const de_DeleteEnvironmentCommand: (output: __HttpResponse, conte
75
80
  * deserializeAws_restJson1GetEnvironmentCommand
76
81
  */
77
82
  export declare const de_GetEnvironmentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetEnvironmentCommandOutput>;
83
+ /**
84
+ * deserializeAws_restJson1InvokeRestApiCommand
85
+ */
86
+ export declare const de_InvokeRestApiCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<InvokeRestApiCommandOutput>;
78
87
  /**
79
88
  * deserializeAws_restJson1ListEnvironmentsCommand
80
89
  */
@@ -19,6 +19,10 @@ import {
19
19
  GetEnvironmentCommandInput,
20
20
  GetEnvironmentCommandOutput,
21
21
  } from "./commands/GetEnvironmentCommand";
22
+ import {
23
+ InvokeRestApiCommandInput,
24
+ InvokeRestApiCommandOutput,
25
+ } from "./commands/InvokeRestApiCommand";
22
26
  import {
23
27
  ListEnvironmentsCommandInput,
24
28
  ListEnvironmentsCommandOutput,
@@ -110,6 +114,19 @@ export interface MWAA {
110
114
  options: __HttpHandlerOptions,
111
115
  cb: (err: any, data?: GetEnvironmentCommandOutput) => void
112
116
  ): void;
117
+ invokeRestApi(
118
+ args: InvokeRestApiCommandInput,
119
+ options?: __HttpHandlerOptions
120
+ ): Promise<InvokeRestApiCommandOutput>;
121
+ invokeRestApi(
122
+ args: InvokeRestApiCommandInput,
123
+ cb: (err: any, data?: InvokeRestApiCommandOutput) => void
124
+ ): void;
125
+ invokeRestApi(
126
+ args: InvokeRestApiCommandInput,
127
+ options: __HttpHandlerOptions,
128
+ cb: (err: any, data?: InvokeRestApiCommandOutput) => void
129
+ ): void;
113
130
  listEnvironments(): Promise<ListEnvironmentsCommandOutput>;
114
131
  listEnvironments(
115
132
  args: ListEnvironmentsCommandInput,
@@ -65,6 +65,10 @@ import {
65
65
  GetEnvironmentCommandInput,
66
66
  GetEnvironmentCommandOutput,
67
67
  } from "./commands/GetEnvironmentCommand";
68
+ import {
69
+ InvokeRestApiCommandInput,
70
+ InvokeRestApiCommandOutput,
71
+ } from "./commands/InvokeRestApiCommand";
68
72
  import {
69
73
  ListEnvironmentsCommandInput,
70
74
  ListEnvironmentsCommandOutput,
@@ -102,6 +106,7 @@ export type ServiceInputTypes =
102
106
  | CreateWebLoginTokenCommandInput
103
107
  | DeleteEnvironmentCommandInput
104
108
  | GetEnvironmentCommandInput
109
+ | InvokeRestApiCommandInput
105
110
  | ListEnvironmentsCommandInput
106
111
  | ListTagsForResourceCommandInput
107
112
  | PublishMetricsCommandInput
@@ -114,6 +119,7 @@ export type ServiceOutputTypes =
114
119
  | CreateWebLoginTokenCommandOutput
115
120
  | DeleteEnvironmentCommandOutput
116
121
  | GetEnvironmentCommandOutput
122
+ | InvokeRestApiCommandOutput
117
123
  | ListEnvironmentsCommandOutput
118
124
  | ListTagsForResourceCommandOutput
119
125
  | PublishMetricsCommandOutput
@@ -0,0 +1,50 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import {
4
+ InvokeRestApiRequest,
5
+ InvokeRestApiResponse,
6
+ } from "../models/models_0";
7
+ import {
8
+ MWAAClientResolvedConfig,
9
+ ServiceInputTypes,
10
+ ServiceOutputTypes,
11
+ } from "../MWAAClient";
12
+ export { __MetadataBearer };
13
+ export { $Command };
14
+ export interface InvokeRestApiCommandInput extends InvokeRestApiRequest {}
15
+ export interface InvokeRestApiCommandOutput
16
+ extends InvokeRestApiResponse,
17
+ __MetadataBearer {}
18
+ declare const InvokeRestApiCommand_base: {
19
+ new (
20
+ input: InvokeRestApiCommandInput
21
+ ): import("@smithy/smithy-client").CommandImpl<
22
+ InvokeRestApiCommandInput,
23
+ InvokeRestApiCommandOutput,
24
+ MWAAClientResolvedConfig,
25
+ ServiceInputTypes,
26
+ ServiceOutputTypes
27
+ >;
28
+ new (
29
+ __0_0: InvokeRestApiCommandInput
30
+ ): import("@smithy/smithy-client").CommandImpl<
31
+ InvokeRestApiCommandInput,
32
+ InvokeRestApiCommandOutput,
33
+ MWAAClientResolvedConfig,
34
+ ServiceInputTypes,
35
+ ServiceOutputTypes
36
+ >;
37
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
38
+ };
39
+ export declare class InvokeRestApiCommand extends InvokeRestApiCommand_base {
40
+ protected static __types: {
41
+ api: {
42
+ input: InvokeRestApiRequest;
43
+ output: InvokeRestApiResponse;
44
+ };
45
+ sdk: {
46
+ input: InvokeRestApiCommandInput;
47
+ output: InvokeRestApiCommandOutput;
48
+ };
49
+ };
50
+ }
@@ -3,6 +3,7 @@ export * from "./CreateEnvironmentCommand";
3
3
  export * from "./CreateWebLoginTokenCommand";
4
4
  export * from "./DeleteEnvironmentCommand";
5
5
  export * from "./GetEnvironmentCommand";
6
+ export * from "./InvokeRestApiCommand";
6
7
  export * from "./ListEnvironmentsCommand";
7
8
  export * from "./ListTagsForResourceCommand";
8
9
  export * from "./PublishMetricsCommand";
@@ -1,4 +1,5 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
2
+ import { DocumentType as __DocumentType } from "@smithy/types";
2
3
  import { MWAAServiceException as __BaseException } from "./MWAAServiceException";
3
4
  export declare class AccessDeniedException extends __BaseException {
4
5
  readonly name: "AccessDeniedException";
@@ -200,6 +201,43 @@ export interface Environment {
200
201
  export interface GetEnvironmentOutput {
201
202
  Environment?: Environment;
202
203
  }
204
+ export declare const RestApiMethod: {
205
+ readonly DELETE: "DELETE";
206
+ readonly GET: "GET";
207
+ readonly PATCH: "PATCH";
208
+ readonly POST: "POST";
209
+ readonly PUT: "PUT";
210
+ };
211
+ export type RestApiMethod = (typeof RestApiMethod)[keyof typeof RestApiMethod];
212
+ export interface InvokeRestApiRequest {
213
+ Name: string | undefined;
214
+ Path: string | undefined;
215
+ Method: RestApiMethod | undefined;
216
+ QueryParameters?: __DocumentType;
217
+ Body?: __DocumentType;
218
+ }
219
+ export interface InvokeRestApiResponse {
220
+ RestApiStatusCode?: number;
221
+ RestApiResponse?: __DocumentType;
222
+ }
223
+ export declare class RestApiClientException extends __BaseException {
224
+ readonly name: "RestApiClientException";
225
+ readonly $fault: "client";
226
+ RestApiStatusCode?: number;
227
+ RestApiResponse?: __DocumentType;
228
+ constructor(
229
+ opts: __ExceptionOptionType<RestApiClientException, __BaseException>
230
+ );
231
+ }
232
+ export declare class RestApiServerException extends __BaseException {
233
+ readonly name: "RestApiServerException";
234
+ readonly $fault: "client";
235
+ RestApiStatusCode?: number;
236
+ RestApiResponse?: __DocumentType;
237
+ constructor(
238
+ opts: __ExceptionOptionType<RestApiServerException, __BaseException>
239
+ );
240
+ }
203
241
  export interface ListEnvironmentsInput {
204
242
  NextToken?: string;
205
243
  MaxResults?: number;
@@ -320,6 +358,12 @@ export declare const EnvironmentFilterSensitiveLog: (obj: Environment) => any;
320
358
  export declare const GetEnvironmentOutputFilterSensitiveLog: (
321
359
  obj: GetEnvironmentOutput
322
360
  ) => any;
361
+ export declare const InvokeRestApiRequestFilterSensitiveLog: (
362
+ obj: InvokeRestApiRequest
363
+ ) => any;
364
+ export declare const InvokeRestApiResponseFilterSensitiveLog: (
365
+ obj: InvokeRestApiResponse
366
+ ) => any;
323
367
  export declare const UpdateEnvironmentInputFilterSensitiveLog: (
324
368
  obj: UpdateEnvironmentInput
325
369
  ) => any;
@@ -23,6 +23,10 @@ import {
23
23
  GetEnvironmentCommandInput,
24
24
  GetEnvironmentCommandOutput,
25
25
  } from "../commands/GetEnvironmentCommand";
26
+ import {
27
+ InvokeRestApiCommandInput,
28
+ InvokeRestApiCommandOutput,
29
+ } from "../commands/InvokeRestApiCommand";
26
30
  import {
27
31
  ListEnvironmentsCommandInput,
28
32
  ListEnvironmentsCommandOutput,
@@ -67,6 +71,10 @@ export declare const se_GetEnvironmentCommand: (
67
71
  input: GetEnvironmentCommandInput,
68
72
  context: __SerdeContext
69
73
  ) => Promise<__HttpRequest>;
74
+ export declare const se_InvokeRestApiCommand: (
75
+ input: InvokeRestApiCommandInput,
76
+ context: __SerdeContext
77
+ ) => Promise<__HttpRequest>;
70
78
  export declare const se_ListEnvironmentsCommand: (
71
79
  input: ListEnvironmentsCommandInput,
72
80
  context: __SerdeContext
@@ -111,6 +119,10 @@ export declare const de_GetEnvironmentCommand: (
111
119
  output: __HttpResponse,
112
120
  context: __SerdeContext
113
121
  ) => Promise<GetEnvironmentCommandOutput>;
122
+ export declare const de_InvokeRestApiCommand: (
123
+ output: __HttpResponse,
124
+ context: __SerdeContext
125
+ ) => Promise<InvokeRestApiCommandOutput>;
114
126
  export declare const de_ListEnvironmentsCommand: (
115
127
  output: __HttpResponse,
116
128
  context: __SerdeContext
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-mwaa",
3
3
  "description": "AWS SDK for JavaScript Mwaa Client for Node.js, Browser and React Native",
4
- "version": "3.677.0",
4
+ "version": "3.679.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-mwaa",
@@ -20,19 +20,19 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/client-sso-oidc": "3.677.0",
24
- "@aws-sdk/client-sts": "3.677.0",
25
- "@aws-sdk/core": "3.677.0",
26
- "@aws-sdk/credential-provider-node": "3.677.0",
27
- "@aws-sdk/middleware-host-header": "3.667.0",
28
- "@aws-sdk/middleware-logger": "3.667.0",
29
- "@aws-sdk/middleware-recursion-detection": "3.667.0",
30
- "@aws-sdk/middleware-user-agent": "3.677.0",
31
- "@aws-sdk/region-config-resolver": "3.667.0",
32
- "@aws-sdk/types": "3.667.0",
33
- "@aws-sdk/util-endpoints": "3.667.0",
34
- "@aws-sdk/util-user-agent-browser": "3.675.0",
35
- "@aws-sdk/util-user-agent-node": "3.677.0",
23
+ "@aws-sdk/client-sso-oidc": "3.679.0",
24
+ "@aws-sdk/client-sts": "3.679.0",
25
+ "@aws-sdk/core": "3.679.0",
26
+ "@aws-sdk/credential-provider-node": "3.679.0",
27
+ "@aws-sdk/middleware-host-header": "3.679.0",
28
+ "@aws-sdk/middleware-logger": "3.679.0",
29
+ "@aws-sdk/middleware-recursion-detection": "3.679.0",
30
+ "@aws-sdk/middleware-user-agent": "3.679.0",
31
+ "@aws-sdk/region-config-resolver": "3.679.0",
32
+ "@aws-sdk/types": "3.679.0",
33
+ "@aws-sdk/util-endpoints": "3.679.0",
34
+ "@aws-sdk/util-user-agent-browser": "3.679.0",
35
+ "@aws-sdk/util-user-agent-node": "3.679.0",
36
36
  "@smithy/config-resolver": "^3.0.9",
37
37
  "@smithy/core": "^2.4.8",
38
38
  "@smithy/fetch-http-handler": "^3.2.9",