{
  "version": 2,
  "waiters": {
    "StackExists": {
      "delay": 5,
      "operation": "DescribeStacks",
      "maxAttempts": 20,
      "acceptors": [
        {
          "matcher": "status",
          "expected": 200,
          "state": "success"
        },
        {
          "matcher": "error",
          "expected": "ValidationError",
          "state": "retry"
        }
      ]
    },
    "StackCreateComplete": {
      "delay": 30,
      "operation": "DescribeStacks",
      "maxAttempts": 120,
      "description": "Wait until stack status is CREATE_COMPLETE.",
      "acceptors": [
        {
          "expected": "CREATE_COMPLETE",
          "matcher": "pathAll",
          "state": "success",
          "argument": "Stacks[].StackStatus"
        },
        {
          "expected": "CREATE_FAILED",
          "matcher": "pathAny",
          "state": "failure",
          "argument": "Stacks[].StackStatus"
        },
        {
          "expected": "DELETE_COMPLETE",
          "matcher": "pathAny",
          "argument": "Stacks[].StackStatus",
          "state": "failure"
        },
        {
          "expected": "DELETE_IN_PROGRESS",
          "matcher": "pathAny",
          "argument": "Stacks[].StackStatus",
          "state": "failure"
        },
        {
          "expected": "DELETE_FAILED",
          "matcher": "pathAny",
          "argument": "Stacks[].StackStatus",
          "state": "failure"
        },
        {
          "expected": "ROLLBACK_COMPLETE",
          "matcher": "pathAny",
          "state": "failure",
          "argument": "Stacks[].StackStatus"
        },
        {
          "expected": "ROLLBACK_FAILED",
          "matcher": "pathAny",
          "state": "failure",
          "argument": "Stacks[].StackStatus"
        },
        {
          "expected": "ROLLBACK_IN_PROGRESS",
          "matcher": "pathAny",
          "argument": "Stacks[].StackStatus",
          "state": "failure"
        },
        {
          "expected": "ValidationError",
          "matcher": "error",
          "state": "failure"
        }
      ]
    },
    "StackDeleteComplete": {
      "delay": 30,
      "operation": "DescribeStacks",
      "maxAttempts": 120,
      "description": "Wait until stack status is DELETE_COMPLETE.",
      "acceptors": [
        {
          "expected": "DELETE_COMPLETE",
          "matcher": "pathAll",
          "state": "success",
          "argument": "Stacks[].StackStatus"
        },
        {
          "expected": "ValidationError",
          "matcher": "error",
          "state": "success"
        },
        {
          "expected": "DELETE_FAILED",
          "matcher": "pathAny",
          "state": "failure",
          "argument": "Stacks[].StackStatus"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "CREATE_COMPLETE",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "CREATE_FAILED",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "CREATE_IN_PROGRESS",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "ROLLBACK_COMPLETE",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "ROLLBACK_FAILED",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "ROLLBACK_IN_PROGRESS",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "UPDATE_COMPLETE",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "UPDATE_IN_PROGRESS",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "UPDATE_ROLLBACK_COMPLETE",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "UPDATE_ROLLBACK_FAILED",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "UPDATE_ROLLBACK_IN_PROGRESS",
          "matcher": "pathAny",
          "state": "failure"
        }
      ]
    },
    "StackUpdateComplete": {
      "delay": 30,
      "maxAttempts": 120,
      "operation": "DescribeStacks",
      "description": "Wait until stack status is UPDATE_COMPLETE.",
      "acceptors": [
        {
          "expected": "UPDATE_COMPLETE",
          "matcher": "pathAll",
          "state": "success",
          "argument": "Stacks[].StackStatus"
        },
        {
          "expected": "UPDATE_FAILED",
          "matcher": "pathAny",
          "state": "failure",
          "argument": "Stacks[].StackStatus"
        },
        {
          "expected": "UPDATE_ROLLBACK_COMPLETE",
          "matcher": "pathAny",
          "state": "failure",
          "argument": "Stacks[].StackStatus"
        },
        {
          "expected": "UPDATE_ROLLBACK_FAILED",
          "matcher": "pathAny",
          "state": "failure",
          "argument": "Stacks[].StackStatus"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "argument": "Stacks[].StackStatus",
          "expected": "UPDATE_ROLLBACK_IN_PROGRESS",
          "matcher": "pathAny",
          "state": "failure"
        },
        {
          "expected": "ValidationError",
          "matcher": "error",
          "state": "failure"
        }
      ]
    }
  }
}
