Package com.amazonaws.services.cloudformation.model

Examples of com.amazonaws.services.cloudformation.model.Stack


      final CloudFormation formation = getCloudFormation(
          stackTemplateFile, stackParams);

      formation.logParamList();

      final Stack stack = formation.stackCreate();

      final StackStatus status = StackStatus.fromValue(stack
          .getStackStatus());

      switch (status) {
      case CREATE_COMPLETE:
        break;
      default:
        throw new IllegalStateException("stack create failed");
      }

      getLog().info("stack create stack=\n" + stack);

      getLog().info("stack create output:");

      final List<Output> outputList = stack.getOutputs();

      final Properties outputProps = new Properties();

      for (final Output output : outputList) {
View Full Code Here


      getLog().info("stack delete init [" + stackName + "]");

      final CloudFormation formation = getCloudFormation(null, null);

      final Stack stack = formation.stackDelete();

      final StackStatus status = StackStatus.fromValue(stack
          .getStackStatus());

      switch (status) {
      case DELETE_COMPLETE:
        break;
View Full Code Here

      getLog().info("stack delete init [" + stackName() + "]");

      final CarrotCloudForm formation = newCloudFormation(null, null);

      final Stack stack = formation.stackDelete();

      final StackStatus status = StackStatus.fromValue(stack
          .getStackStatus());

      switch (status) {
      case DELETE_COMPLETE:
        break;
View Full Code Here

      final CarrotCloudForm formation = newCloudFormation(
          stackTemplateFile, stackTemplateParams);

      formation.logParamList();

      final Stack stack = formation.stackCreate();

      final StackStatus status = StackStatus.fromValue(stack
          .getStackStatus());

      switch (status) {
      case CREATE_COMPLETE:
        break;
      default:
        throw new IllegalStateException("stack create failed");
      }

      //

      getLog().info("stack create stack=\n" + stack);

      getLog().info("stack create output:");

      final List<Output> outputList = stack.getOutputs();

      final Properties outputProps = new Properties();

      for (final Output output : outputList) {
View Full Code Here

  }

  private Stack newStackWithStatus(final StackStatus status,
      final String reason) {

    final Stack stack = new Stack();

    stack.setStackName(name);
    stack.setStackStatus(status);
    stack.setStackStatusReason(reason);

    return stack;

  }
View Full Code Here

    request.withParameters(paramList);
    request.withTemplateBody(template);

    amazonClient.createStack(request);

    final Stack stack = waitForStackCreate();

    return stack;

  }
View Full Code Here

    request.withStackName(name);

    amazonClient.deleteStack(request);

    final Stack stack = waitForStackDelete();

    return stack;

  }
View Full Code Here

    request.withParameters(paramList);
    request.withTemplateBody(template);

    amazonClient.updateStack(request);

    final Stack stack = waitForStackUpdate();

    return stack;

  }
View Full Code Here

      if (isTimeoutPending(timeStart)) {
        return newStackWithStatus(StackStatus.CREATE_FAILED,
            "stack create timeout");
      }

      Stack stack = null;
      try {
        stack = findStack();
      } catch (final Exception e) {
        return newStackWithStatus(StackStatus.CREATE_FAILED,
            e.toString());
      }

      if (!isStackValid(stack)) {
        return newStackWithStatus(StackStatus.CREATE_FAILED,
            "stack create invalid/missing");
      }

      final StackStatus status = StackStatus.fromValue(stack
          .getStackStatus());

      switch (status) {
      case CREATE_IN_PROGRESS:
        final long timeCurrent = System.currentTimeMillis();
View Full Code Here

      if (isTimeoutPending(timeStart)) {
        return newStackWithStatus(StackStatus.DELETE_FAILED,
            "stack delete timeout");
      }

      Stack stack = null;
      try {
        stack = findStack();
      } catch (final Exception e) {
        return newStackWithStatus(StackStatus.DELETE_FAILED,
            e.toString());
      }

      if (!isStackValid(stack)) {
        return newStackWithStatus(StackStatus.DELETE_COMPLETE,
            "stack delete invalid/missing");
      }

      final StackStatus status = StackStatus.fromValue(stack
          .getStackStatus());

      switch (status) {
      case DELETE_IN_PROGRESS:
        final long timeCurrent = System.currentTimeMillis();
View Full Code Here

TOP

Related Classes of com.amazonaws.services.cloudformation.model.Stack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.