@aws-sdk/client-ec2 3.44.0 → 3.45.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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.45.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.44.0...v3.45.0) (2021-12-23)
7
+
8
+
9
+ ### Features
10
+
11
+ * **clients:** update clients as of 2021/12/23 ([#3110](https://github.com/aws/aws-sdk-js-v3/issues/3110)) ([5d638e1](https://github.com/aws/aws-sdk-js-v3/commit/5d638e188ce64fa80fe36b8cba79ba63b80b50b7))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.44.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.43.0...v3.44.0) (2021-12-02)
7
18
 
8
19
 
@@ -141,6 +141,7 @@ const partitionHash = {
141
141
  "ap-south-1",
142
142
  "ap-southeast-1",
143
143
  "ap-southeast-2",
144
+ "ap-southeast-3",
144
145
  "ca-central-1",
145
146
  "eu-central-1",
146
147
  "eu-north-1",
@@ -15,6 +15,7 @@ tslib_1.__exportStar(require("./waitForInstanceRunning"), exports);
15
15
  tslib_1.__exportStar(require("./waitForInstanceStatusOk"), exports);
16
16
  tslib_1.__exportStar(require("./waitForInstanceStopped"), exports);
17
17
  tslib_1.__exportStar(require("./waitForInstanceTerminated"), exports);
18
+ tslib_1.__exportStar(require("./waitForInternetGatewayExists"), exports);
18
19
  tslib_1.__exportStar(require("./waitForKeyPairExists"), exports);
19
20
  tslib_1.__exportStar(require("./waitForNatGatewayAvailable"), exports);
20
21
  tslib_1.__exportStar(require("./waitForNetworkInterfaceAvailable"), exports);
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.waitUntilInternetGatewayExists = exports.waitForInternetGatewayExists = void 0;
4
+ const util_waiter_1 = require("@aws-sdk/util-waiter");
5
+ const DescribeInternetGatewaysCommand_1 = require("../commands/DescribeInternetGatewaysCommand");
6
+ const checkState = async (client, input) => {
7
+ let reason;
8
+ try {
9
+ const result = await client.send(new DescribeInternetGatewaysCommand_1.DescribeInternetGatewaysCommand(input));
10
+ reason = result;
11
+ try {
12
+ const returnComparator = () => {
13
+ const flat_1 = [].concat(...result.InternetGateways);
14
+ const projection_3 = flat_1.map((element_2) => {
15
+ return element_2.InternetGatewayId;
16
+ });
17
+ return projection_3.length > 0.0;
18
+ };
19
+ if (returnComparator() == true) {
20
+ return { state: util_waiter_1.WaiterState.SUCCESS, reason };
21
+ }
22
+ }
23
+ catch (e) { }
24
+ }
25
+ catch (exception) {
26
+ reason = exception;
27
+ if (exception.name && exception.name == "InvalidInternetGateway.NotFound") {
28
+ return { state: util_waiter_1.WaiterState.RETRY, reason };
29
+ }
30
+ }
31
+ return { state: util_waiter_1.WaiterState.RETRY, reason };
32
+ };
33
+ const waitForInternetGatewayExists = async (params, input) => {
34
+ const serviceDefaults = { minDelay: 5, maxDelay: 120 };
35
+ return util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
36
+ };
37
+ exports.waitForInternetGatewayExists = waitForInternetGatewayExists;
38
+ const waitUntilInternetGatewayExists = async (params, input) => {
39
+ const serviceDefaults = { minDelay: 5, maxDelay: 120 };
40
+ const result = await util_waiter_1.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
41
+ return util_waiter_1.checkExceptions(result);
42
+ };
43
+ exports.waitUntilInternetGatewayExists = waitUntilInternetGatewayExists;
@@ -139,6 +139,7 @@ var partitionHash = {
139
139
  "ap-south-1",
140
140
  "ap-southeast-1",
141
141
  "ap-southeast-2",
142
+ "ap-southeast-3",
142
143
  "ca-central-1",
143
144
  "eu-central-1",
144
145
  "eu-north-1",
@@ -12,6 +12,7 @@ export * from "./waitForInstanceRunning";
12
12
  export * from "./waitForInstanceStatusOk";
13
13
  export * from "./waitForInstanceStopped";
14
14
  export * from "./waitForInstanceTerminated";
15
+ export * from "./waitForInternetGatewayExists";
15
16
  export * from "./waitForKeyPairExists";
16
17
  export * from "./waitForNatGatewayAvailable";
17
18
  export * from "./waitForNetworkInterfaceAvailable";
@@ -0,0 +1,58 @@
1
+ import { __assign, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
3
+ import { DescribeInternetGatewaysCommand, } from "../commands/DescribeInternetGatewaysCommand";
4
+ var checkState = function (client, input) { return __awaiter(void 0, void 0, void 0, function () {
5
+ var reason, result_1, returnComparator, exception_1;
6
+ return __generator(this, function (_a) {
7
+ switch (_a.label) {
8
+ case 0:
9
+ _a.trys.push([0, 2, , 3]);
10
+ return [4, client.send(new DescribeInternetGatewaysCommand(input))];
11
+ case 1:
12
+ result_1 = _a.sent();
13
+ reason = result_1;
14
+ try {
15
+ returnComparator = function () {
16
+ var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.InternetGateways)));
17
+ var projection_3 = flat_1.map(function (element_2) {
18
+ return element_2.InternetGatewayId;
19
+ });
20
+ return projection_3.length > 0.0;
21
+ };
22
+ if (returnComparator() == true) {
23
+ return [2, { state: WaiterState.SUCCESS, reason: reason }];
24
+ }
25
+ }
26
+ catch (e) { }
27
+ return [3, 3];
28
+ case 2:
29
+ exception_1 = _a.sent();
30
+ reason = exception_1;
31
+ if (exception_1.name && exception_1.name == "InvalidInternetGateway.NotFound") {
32
+ return [2, { state: WaiterState.RETRY, reason: reason }];
33
+ }
34
+ return [3, 3];
35
+ case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
36
+ }
37
+ });
38
+ }); };
39
+ export var waitForInternetGatewayExists = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
40
+ var serviceDefaults;
41
+ return __generator(this, function (_a) {
42
+ serviceDefaults = { minDelay: 5, maxDelay: 120 };
43
+ return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
44
+ });
45
+ }); };
46
+ export var waitUntilInternetGatewayExists = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
47
+ var serviceDefaults, result;
48
+ return __generator(this, function (_a) {
49
+ switch (_a.label) {
50
+ case 0:
51
+ serviceDefaults = { minDelay: 5, maxDelay: 120 };
52
+ return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
53
+ case 1:
54
+ result = _a.sent();
55
+ return [2, checkExceptions(result)];
56
+ }
57
+ });
58
+ }); };
@@ -12,6 +12,7 @@ export * from "./waitForInstanceRunning";
12
12
  export * from "./waitForInstanceStatusOk";
13
13
  export * from "./waitForInstanceStopped";
14
14
  export * from "./waitForInstanceTerminated";
15
+ export * from "./waitForInternetGatewayExists";
15
16
  export * from "./waitForKeyPairExists";
16
17
  export * from "./waitForNatGatewayAvailable";
17
18
  export * from "./waitForNetworkInterfaceAvailable";
@@ -0,0 +1,7 @@
1
+ import { WaiterConfiguration, WaiterResult } from "@aws-sdk/util-waiter";
2
+ import { DescribeInternetGatewaysCommandInput } from "../commands/DescribeInternetGatewaysCommand";
3
+ import { EC2Client } from "../EC2Client";
4
+
5
+ export declare const waitForInternetGatewayExists: (params: WaiterConfiguration<EC2Client>, input: DescribeInternetGatewaysCommandInput) => Promise<WaiterResult>;
6
+
7
+ export declare const waitUntilInternetGatewayExists: (params: WaiterConfiguration<EC2Client>, input: DescribeInternetGatewaysCommandInput) => Promise<WaiterResult>;
@@ -12,6 +12,7 @@ export * from "./waitForInstanceRunning";
12
12
  export * from "./waitForInstanceStatusOk";
13
13
  export * from "./waitForInstanceStopped";
14
14
  export * from "./waitForInstanceTerminated";
15
+ export * from "./waitForInternetGatewayExists";
15
16
  export * from "./waitForKeyPairExists";
16
17
  export * from "./waitForNatGatewayAvailable";
17
18
  export * from "./waitForNetworkInterfaceAvailable";
@@ -0,0 +1,14 @@
1
+ import { WaiterConfiguration, WaiterResult } from "@aws-sdk/util-waiter";
2
+ import { DescribeInternetGatewaysCommandInput } from "../commands/DescribeInternetGatewaysCommand";
3
+ import { EC2Client } from "../EC2Client";
4
+ /**
5
+ *
6
+ * @deprecated Use waitUntilInternetGatewayExists instead. waitForInternetGatewayExists does not throw error in non-success cases.
7
+ */
8
+ export declare const waitForInternetGatewayExists: (params: WaiterConfiguration<EC2Client>, input: DescribeInternetGatewaysCommandInput) => Promise<WaiterResult>;
9
+ /**
10
+ *
11
+ * @param params - Waiter configuration options.
12
+ * @param input - The input to DescribeInternetGatewaysCommand for polling.
13
+ */
14
+ export declare const waitUntilInternetGatewayExists: (params: WaiterConfiguration<EC2Client>, input: DescribeInternetGatewaysCommandInput) => Promise<WaiterResult>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-ec2",
3
3
  "description": "AWS SDK for JavaScript Ec2 Client for Node.js, Browser and React Native",
4
- "version": "3.44.0",
4
+ "version": "3.45.0",
5
5
  "scripts": {
6
6
  "build": "yarn build:cjs && yarn build:es && yarn build:types",
7
7
  "build:cjs": "tsc -p tsconfig.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "2.0.0",
23
23
  "@aws-crypto/sha256-js": "2.0.0",
24
- "@aws-sdk/client-sts": "3.43.0",
25
- "@aws-sdk/config-resolver": "3.40.0",
26
- "@aws-sdk/credential-provider-node": "3.41.0",
24
+ "@aws-sdk/client-sts": "3.45.0",
25
+ "@aws-sdk/config-resolver": "3.45.0",
26
+ "@aws-sdk/credential-provider-node": "3.45.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.40.0",
28
28
  "@aws-sdk/hash-node": "3.40.0",
29
29
  "@aws-sdk/invalid-dependency": "3.40.0",
@@ -31,9 +31,9 @@
31
31
  "@aws-sdk/middleware-host-header": "3.40.0",
32
32
  "@aws-sdk/middleware-logger": "3.40.0",
33
33
  "@aws-sdk/middleware-retry": "3.40.0",
34
- "@aws-sdk/middleware-sdk-ec2": "3.42.0",
34
+ "@aws-sdk/middleware-sdk-ec2": "3.45.0",
35
35
  "@aws-sdk/middleware-serde": "3.40.0",
36
- "@aws-sdk/middleware-signing": "3.40.0",
36
+ "@aws-sdk/middleware-signing": "3.45.0",
37
37
  "@aws-sdk/middleware-stack": "3.40.0",
38
38
  "@aws-sdk/middleware-user-agent": "3.40.0",
39
39
  "@aws-sdk/node-config-provider": "3.40.0",