From d4176b5a1512eebc935aa68ee54aaf059a7823d1 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 21 Dec 2023 19:17:55 +0000 Subject: [PATCH] feat(client-neptune-graph): Adds Waiters for successful creation and deletion of Graph, Graph Snapshot, Import Task and Private Endpoints for Neptune Analytics --- clients/client-neptune-graph/package.json | 1 + clients/client-neptune-graph/src/index.ts | 1 + .../client-neptune-graph/src/waiters/index.ts | 9 + .../src/waiters/waitForGraphAvailable.ts | 64 +++++ .../src/waiters/waitForGraphDeleted.ts | 51 ++++ .../waiters/waitForGraphSnapshotAvailable.ts | 64 +++++ .../waiters/waitForGraphSnapshotDeleted.ts | 51 ++++ .../src/waiters/waitForImportTaskCancelled.ts | 56 ++++ .../waiters/waitForImportTaskSuccessful.ts | 80 ++++++ .../waitForPrivateGraphEndpointAvailable.ts | 70 +++++ .../waitForPrivateGraphEndpointDeleted.ts | 57 ++++ .../sdk-codegen/aws-models/neptune-graph.json | 272 ++++++++++++++++++ 12 files changed, 776 insertions(+) create mode 100644 clients/client-neptune-graph/src/waiters/index.ts create mode 100644 clients/client-neptune-graph/src/waiters/waitForGraphAvailable.ts create mode 100644 clients/client-neptune-graph/src/waiters/waitForGraphDeleted.ts create mode 100644 clients/client-neptune-graph/src/waiters/waitForGraphSnapshotAvailable.ts create mode 100644 clients/client-neptune-graph/src/waiters/waitForGraphSnapshotDeleted.ts create mode 100644 clients/client-neptune-graph/src/waiters/waitForImportTaskCancelled.ts create mode 100644 clients/client-neptune-graph/src/waiters/waitForImportTaskSuccessful.ts create mode 100644 clients/client-neptune-graph/src/waiters/waitForPrivateGraphEndpointAvailable.ts create mode 100644 clients/client-neptune-graph/src/waiters/waitForPrivateGraphEndpointDeleted.ts diff --git a/clients/client-neptune-graph/package.json b/clients/client-neptune-graph/package.json index 3725a7afc97cd..aef6fa8656c85 100644 --- a/clients/client-neptune-graph/package.json +++ b/clients/client-neptune-graph/package.json @@ -57,6 +57,7 @@ "@smithy/util-endpoints": "^1.0.7", "@smithy/util-retry": "^2.0.8", "@smithy/util-utf8": "^2.0.2", + "@smithy/util-waiter": "^2.0.15", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-neptune-graph/src/index.ts b/clients/client-neptune-graph/src/index.ts index d6e67ab71a083..2b5d76f19fcae 100644 --- a/clients/client-neptune-graph/src/index.ts +++ b/clients/client-neptune-graph/src/index.ts @@ -14,6 +14,7 @@ export { RuntimeExtension } from "./runtimeExtensions"; export { NeptuneGraphExtensionConfiguration } from "./extensionConfiguration"; export * from "./commands"; export * from "./pagination"; +export * from "./waiters"; export * from "./models"; import "@aws-sdk/util-endpoints"; diff --git a/clients/client-neptune-graph/src/waiters/index.ts b/clients/client-neptune-graph/src/waiters/index.ts new file mode 100644 index 0000000000000..1d305627e3ac9 --- /dev/null +++ b/clients/client-neptune-graph/src/waiters/index.ts @@ -0,0 +1,9 @@ +// smithy-typescript generated code +export * from "./waitForGraphAvailable"; +export * from "./waitForGraphDeleted"; +export * from "./waitForGraphSnapshotAvailable"; +export * from "./waitForGraphSnapshotDeleted"; +export * from "./waitForImportTaskCancelled"; +export * from "./waitForImportTaskSuccessful"; +export * from "./waitForPrivateGraphEndpointAvailable"; +export * from "./waitForPrivateGraphEndpointDeleted"; diff --git a/clients/client-neptune-graph/src/waiters/waitForGraphAvailable.ts b/clients/client-neptune-graph/src/waiters/waitForGraphAvailable.ts new file mode 100644 index 0000000000000..e4228fec2b315 --- /dev/null +++ b/clients/client-neptune-graph/src/waiters/waitForGraphAvailable.ts @@ -0,0 +1,64 @@ +// smithy-typescript generated code +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@smithy/util-waiter"; + +import { GetGraphCommand, GetGraphCommandInput } from "../commands/GetGraphCommand"; +import { NeptuneGraphClient } from "../NeptuneGraphClient"; + +const checkState = async (client: NeptuneGraphClient, input: GetGraphCommandInput): Promise => { + let reason; + try { + const result: any = await client.send(new GetGraphCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "DELETING") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "FAILED") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "AVAILABLE") { + return { state: WaiterState.SUCCESS, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * Wait until Graph is Available + * @deprecated Use waitUntilGraphAvailable instead. waitForGraphAvailable does not throw error in non-success cases. + */ +export const waitForGraphAvailable = async ( + params: WaiterConfiguration, + input: GetGraphCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 28800 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * Wait until Graph is Available + * @param params - Waiter configuration options. + * @param input - The input to GetGraphCommand for polling. + */ +export const waitUntilGraphAvailable = async ( + params: WaiterConfiguration, + input: GetGraphCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 28800 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/clients/client-neptune-graph/src/waiters/waitForGraphDeleted.ts b/clients/client-neptune-graph/src/waiters/waitForGraphDeleted.ts new file mode 100644 index 0000000000000..c38e371d9eaa7 --- /dev/null +++ b/clients/client-neptune-graph/src/waiters/waitForGraphDeleted.ts @@ -0,0 +1,51 @@ +// smithy-typescript generated code +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@smithy/util-waiter"; + +import { GetGraphCommand, GetGraphCommandInput } from "../commands/GetGraphCommand"; +import { NeptuneGraphClient } from "../NeptuneGraphClient"; + +const checkState = async (client: NeptuneGraphClient, input: GetGraphCommandInput): Promise => { + let reason; + try { + const result: any = await client.send(new GetGraphCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.status != "DELETING"; + }; + if (returnComparator() == true) { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "ResourceNotFoundException") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * Wait until Graph is Deleted + * @deprecated Use waitUntilGraphDeleted instead. waitForGraphDeleted does not throw error in non-success cases. + */ +export const waitForGraphDeleted = async ( + params: WaiterConfiguration, + input: GetGraphCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 3600 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * Wait until Graph is Deleted + * @param params - Waiter configuration options. + * @param input - The input to GetGraphCommand for polling. + */ +export const waitUntilGraphDeleted = async ( + params: WaiterConfiguration, + input: GetGraphCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 3600 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/clients/client-neptune-graph/src/waiters/waitForGraphSnapshotAvailable.ts b/clients/client-neptune-graph/src/waiters/waitForGraphSnapshotAvailable.ts new file mode 100644 index 0000000000000..a8d5961859d2a --- /dev/null +++ b/clients/client-neptune-graph/src/waiters/waitForGraphSnapshotAvailable.ts @@ -0,0 +1,64 @@ +// smithy-typescript generated code +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@smithy/util-waiter"; + +import { GetGraphSnapshotCommand, GetGraphSnapshotCommandInput } from "../commands/GetGraphSnapshotCommand"; +import { NeptuneGraphClient } from "../NeptuneGraphClient"; + +const checkState = async (client: NeptuneGraphClient, input: GetGraphSnapshotCommandInput): Promise => { + let reason; + try { + const result: any = await client.send(new GetGraphSnapshotCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "DELETING") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "FAILED") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "AVAILABLE") { + return { state: WaiterState.SUCCESS, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * Wait until GraphSnapshot is Available + * @deprecated Use waitUntilGraphSnapshotAvailable instead. waitForGraphSnapshotAvailable does not throw error in non-success cases. + */ +export const waitForGraphSnapshotAvailable = async ( + params: WaiterConfiguration, + input: GetGraphSnapshotCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 7200 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * Wait until GraphSnapshot is Available + * @param params - Waiter configuration options. + * @param input - The input to GetGraphSnapshotCommand for polling. + */ +export const waitUntilGraphSnapshotAvailable = async ( + params: WaiterConfiguration, + input: GetGraphSnapshotCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 7200 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/clients/client-neptune-graph/src/waiters/waitForGraphSnapshotDeleted.ts b/clients/client-neptune-graph/src/waiters/waitForGraphSnapshotDeleted.ts new file mode 100644 index 0000000000000..dd3eb6ffde9c9 --- /dev/null +++ b/clients/client-neptune-graph/src/waiters/waitForGraphSnapshotDeleted.ts @@ -0,0 +1,51 @@ +// smithy-typescript generated code +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@smithy/util-waiter"; + +import { GetGraphSnapshotCommand, GetGraphSnapshotCommandInput } from "../commands/GetGraphSnapshotCommand"; +import { NeptuneGraphClient } from "../NeptuneGraphClient"; + +const checkState = async (client: NeptuneGraphClient, input: GetGraphSnapshotCommandInput): Promise => { + let reason; + try { + const result: any = await client.send(new GetGraphSnapshotCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.status != "DELETING"; + }; + if (returnComparator() == true) { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "ResourceNotFoundException") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * Wait until GraphSnapshot is Deleted + * @deprecated Use waitUntilGraphSnapshotDeleted instead. waitForGraphSnapshotDeleted does not throw error in non-success cases. + */ +export const waitForGraphSnapshotDeleted = async ( + params: WaiterConfiguration, + input: GetGraphSnapshotCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 3600 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * Wait until GraphSnapshot is Deleted + * @param params - Waiter configuration options. + * @param input - The input to GetGraphSnapshotCommand for polling. + */ +export const waitUntilGraphSnapshotDeleted = async ( + params: WaiterConfiguration, + input: GetGraphSnapshotCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 3600 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/clients/client-neptune-graph/src/waiters/waitForImportTaskCancelled.ts b/clients/client-neptune-graph/src/waiters/waitForImportTaskCancelled.ts new file mode 100644 index 0000000000000..b2261102f939b --- /dev/null +++ b/clients/client-neptune-graph/src/waiters/waitForImportTaskCancelled.ts @@ -0,0 +1,56 @@ +// smithy-typescript generated code +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@smithy/util-waiter"; + +import { GetImportTaskCommand, GetImportTaskCommandInput } from "../commands/GetImportTaskCommand"; +import { NeptuneGraphClient } from "../NeptuneGraphClient"; + +const checkState = async (client: NeptuneGraphClient, input: GetImportTaskCommandInput): Promise => { + let reason; + try { + const result: any = await client.send(new GetImportTaskCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.status != "CANCELLING"; + }; + if (returnComparator() == true) { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "CANCELLED") { + return { state: WaiterState.SUCCESS, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * Wait until Import Task is Cancelled + * @deprecated Use waitUntilImportTaskCancelled instead. waitForImportTaskCancelled does not throw error in non-success cases. + */ +export const waitForImportTaskCancelled = async ( + params: WaiterConfiguration, + input: GetImportTaskCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 3600 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * Wait until Import Task is Cancelled + * @param params - Waiter configuration options. + * @param input - The input to GetImportTaskCommand for polling. + */ +export const waitUntilImportTaskCancelled = async ( + params: WaiterConfiguration, + input: GetImportTaskCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 3600 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/clients/client-neptune-graph/src/waiters/waitForImportTaskSuccessful.ts b/clients/client-neptune-graph/src/waiters/waitForImportTaskSuccessful.ts new file mode 100644 index 0000000000000..f6f73bc8c7a46 --- /dev/null +++ b/clients/client-neptune-graph/src/waiters/waitForImportTaskSuccessful.ts @@ -0,0 +1,80 @@ +// smithy-typescript generated code +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@smithy/util-waiter"; + +import { GetImportTaskCommand, GetImportTaskCommandInput } from "../commands/GetImportTaskCommand"; +import { NeptuneGraphClient } from "../NeptuneGraphClient"; + +const checkState = async (client: NeptuneGraphClient, input: GetImportTaskCommandInput): Promise => { + let reason; + try { + const result: any = await client.send(new GetImportTaskCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "CANCELLING") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "CANCELLED") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "ROLLING_BACK") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "FAILED") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "SUCCEEDED") { + return { state: WaiterState.SUCCESS, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * Wait until Import Task is Successful + * @deprecated Use waitUntilImportTaskSuccessful instead. waitForImportTaskSuccessful does not throw error in non-success cases. + */ +export const waitForImportTaskSuccessful = async ( + params: WaiterConfiguration, + input: GetImportTaskCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 28800 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * Wait until Import Task is Successful + * @param params - Waiter configuration options. + * @param input - The input to GetImportTaskCommand for polling. + */ +export const waitUntilImportTaskSuccessful = async ( + params: WaiterConfiguration, + input: GetImportTaskCommandInput +): Promise => { + const serviceDefaults = { minDelay: 60, maxDelay: 28800 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/clients/client-neptune-graph/src/waiters/waitForPrivateGraphEndpointAvailable.ts b/clients/client-neptune-graph/src/waiters/waitForPrivateGraphEndpointAvailable.ts new file mode 100644 index 0000000000000..2b34c047a8013 --- /dev/null +++ b/clients/client-neptune-graph/src/waiters/waitForPrivateGraphEndpointAvailable.ts @@ -0,0 +1,70 @@ +// smithy-typescript generated code +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@smithy/util-waiter"; + +import { + GetPrivateGraphEndpointCommand, + GetPrivateGraphEndpointCommandInput, +} from "../commands/GetPrivateGraphEndpointCommand"; +import { NeptuneGraphClient } from "../NeptuneGraphClient"; + +const checkState = async ( + client: NeptuneGraphClient, + input: GetPrivateGraphEndpointCommandInput +): Promise => { + let reason; + try { + const result: any = await client.send(new GetPrivateGraphEndpointCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "DELETING") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "FAILED") { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + return result.status; + }; + if (returnComparator() === "AVAILABLE") { + return { state: WaiterState.SUCCESS, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * Wait until PrivateGraphEndpoint is Available + * @deprecated Use waitUntilPrivateGraphEndpointAvailable instead. waitForPrivateGraphEndpointAvailable does not throw error in non-success cases. + */ +export const waitForPrivateGraphEndpointAvailable = async ( + params: WaiterConfiguration, + input: GetPrivateGraphEndpointCommandInput +): Promise => { + const serviceDefaults = { minDelay: 10, maxDelay: 1800 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * Wait until PrivateGraphEndpoint is Available + * @param params - Waiter configuration options. + * @param input - The input to GetPrivateGraphEndpointCommand for polling. + */ +export const waitUntilPrivateGraphEndpointAvailable = async ( + params: WaiterConfiguration, + input: GetPrivateGraphEndpointCommandInput +): Promise => { + const serviceDefaults = { minDelay: 10, maxDelay: 1800 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/clients/client-neptune-graph/src/waiters/waitForPrivateGraphEndpointDeleted.ts b/clients/client-neptune-graph/src/waiters/waitForPrivateGraphEndpointDeleted.ts new file mode 100644 index 0000000000000..7954733692715 --- /dev/null +++ b/clients/client-neptune-graph/src/waiters/waitForPrivateGraphEndpointDeleted.ts @@ -0,0 +1,57 @@ +// smithy-typescript generated code +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@smithy/util-waiter"; + +import { + GetPrivateGraphEndpointCommand, + GetPrivateGraphEndpointCommandInput, +} from "../commands/GetPrivateGraphEndpointCommand"; +import { NeptuneGraphClient } from "../NeptuneGraphClient"; + +const checkState = async ( + client: NeptuneGraphClient, + input: GetPrivateGraphEndpointCommandInput +): Promise => { + let reason; + try { + const result: any = await client.send(new GetPrivateGraphEndpointCommand(input)); + reason = result; + try { + const returnComparator = () => { + return result.status != "DELETING"; + }; + if (returnComparator() == true) { + return { state: WaiterState.FAILURE, reason }; + } + } catch (e) {} + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "ResourceNotFoundException") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * Wait until PrivateGraphEndpoint is Deleted + * @deprecated Use waitUntilPrivateGraphEndpointDeleted instead. waitForPrivateGraphEndpointDeleted does not throw error in non-success cases. + */ +export const waitForPrivateGraphEndpointDeleted = async ( + params: WaiterConfiguration, + input: GetPrivateGraphEndpointCommandInput +): Promise => { + const serviceDefaults = { minDelay: 10, maxDelay: 1800 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * Wait until PrivateGraphEndpoint is Deleted + * @param params - Waiter configuration options. + * @param input - The input to GetPrivateGraphEndpointCommand for polling. + */ +export const waitUntilPrivateGraphEndpointDeleted = async ( + params: WaiterConfiguration, + input: GetPrivateGraphEndpointCommandInput +): Promise => { + const serviceDefaults = { minDelay: 10, maxDelay: 1800 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/codegen/sdk-codegen/aws-models/neptune-graph.json b/codegen/sdk-codegen/aws-models/neptune-graph.json index 41befa887e27e..bf2147534c866 100644 --- a/codegen/sdk-codegen/aws-models/neptune-graph.json +++ b/codegen/sdk-codegen/aws-models/neptune-graph.json @@ -2662,6 +2662,68 @@ "ApiType": { "value": "ControlPlane" } + }, + "smithy.waiters#waitable": { + "GraphAvailable": { + "documentation": "Wait until Graph is Available", + "minDelay": 60, + "maxDelay": 28800, + "acceptors": [ + { + "state": "failure", + "matcher": { + "output": { + "path": "status", + "expected": "DELETING", + "comparator": "stringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "status", + "expected": "FAILED", + "comparator": "stringEquals" + } + } + }, + { + "state": "success", + "matcher": { + "output": { + "path": "status", + "expected": "AVAILABLE", + "comparator": "stringEquals" + } + } + } + ] + }, + "GraphDeleted": { + "documentation": "Wait until Graph is Deleted", + "minDelay": 60, + "maxDelay": 3600, + "acceptors": [ + { + "state": "failure", + "matcher": { + "output": { + "path": "status != 'DELETING'", + "expected": "true", + "comparator": "booleanEquals" + } + } + }, + { + "state": "success", + "matcher": { + "errorType": "ResourceNotFoundException" + } + } + ] + } } } }, @@ -2814,6 +2876,68 @@ "ApiType": { "value": "ControlPlane" } + }, + "smithy.waiters#waitable": { + "GraphSnapshotAvailable": { + "documentation": "Wait until GraphSnapshot is Available", + "minDelay": 60, + "maxDelay": 7200, + "acceptors": [ + { + "state": "failure", + "matcher": { + "output": { + "path": "status", + "expected": "DELETING", + "comparator": "stringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "status", + "expected": "FAILED", + "comparator": "stringEquals" + } + } + }, + { + "state": "success", + "matcher": { + "output": { + "path": "status", + "expected": "AVAILABLE", + "comparator": "stringEquals" + } + } + } + ] + }, + "GraphSnapshotDeleted": { + "documentation": "Wait until GraphSnapshot is Deleted", + "minDelay": 60, + "maxDelay": 3600, + "acceptors": [ + { + "state": "failure", + "matcher": { + "output": { + "path": "status != 'DELETING'", + "expected": "true", + "comparator": "booleanEquals" + } + } + }, + { + "state": "success", + "matcher": { + "errorType": "ResourceNotFoundException" + } + } + ] + } } } }, @@ -2921,6 +3045,92 @@ "ApiType": { "value": "ControlPlane" } + }, + "smithy.waiters#waitable": { + "ImportTaskSuccessful": { + "documentation": "Wait until Import Task is Successful", + "minDelay": 60, + "maxDelay": 28800, + "acceptors": [ + { + "state": "failure", + "matcher": { + "output": { + "path": "status", + "expected": "CANCELLING", + "comparator": "stringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "status", + "expected": "CANCELLED", + "comparator": "stringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "status", + "expected": "ROLLING_BACK", + "comparator": "stringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "status", + "expected": "FAILED", + "comparator": "stringEquals" + } + } + }, + { + "state": "success", + "matcher": { + "output": { + "path": "status", + "expected": "SUCCEEDED", + "comparator": "stringEquals" + } + } + } + ] + }, + "ImportTaskCancelled": { + "documentation": "Wait until Import Task is Cancelled", + "minDelay": 60, + "maxDelay": 3600, + "acceptors": [ + { + "state": "failure", + "matcher": { + "output": { + "path": "status != 'CANCELLING'", + "expected": "true", + "comparator": "booleanEquals" + } + } + }, + { + "state": "success", + "matcher": { + "output": { + "path": "status", + "expected": "CANCELLED", + "comparator": "stringEquals" + } + } + } + ] + } } } }, @@ -3047,6 +3257,68 @@ "ApiType": { "value": "ControlPlane" } + }, + "smithy.waiters#waitable": { + "PrivateGraphEndpointAvailable": { + "documentation": "Wait until PrivateGraphEndpoint is Available", + "minDelay": 10, + "maxDelay": 1800, + "acceptors": [ + { + "state": "failure", + "matcher": { + "output": { + "path": "status", + "expected": "DELETING", + "comparator": "stringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "status", + "expected": "FAILED", + "comparator": "stringEquals" + } + } + }, + { + "state": "success", + "matcher": { + "output": { + "path": "status", + "expected": "AVAILABLE", + "comparator": "stringEquals" + } + } + } + ] + }, + "PrivateGraphEndpointDeleted": { + "documentation": "Wait until PrivateGraphEndpoint is Deleted", + "minDelay": 10, + "maxDelay": 1800, + "acceptors": [ + { + "state": "failure", + "matcher": { + "output": { + "path": "status != 'DELETING'", + "expected": "true", + "comparator": "booleanEquals" + } + } + }, + { + "state": "success", + "matcher": { + "errorType": "ResourceNotFoundException" + } + } + ] + } } } },