Package com.amazonaws.services.cloudformation.model

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


            // Wait for stack to be created
            // Note that you could use SNS notifications on the CreateStack call to track the progress of the stack creation
            System.out.println("Stack creation completed, the stack " + stackName + " completed with " + waitForCompletion(stackbuilder, stackName));

            // Show all the stacks for this account along with the resources for each stack
            for (Stack stack : stackbuilder.describeStacks(new DescribeStacksRequest()).getStacks()) {
                System.out.println("Stack : " + stack.getStackName() + " [" + stack.getStackStatus().toString() + "]");

                DescribeStackResourcesRequest stackResourceRequest = new DescribeStackResourcesRequest();
                stackResourceRequest.setStackName(stack.getStackName());
                for (StackResource resource : stackbuilder.describeStackResources(stackResourceRequest).getStackResources()) {
View Full Code Here


    //    DELETE_FAILED
    //    ROLLBACK_FAILED
    // OR the stack no longer exists
    public static String waitForCompletion(AmazonCloudFormation stackbuilder, String stackName) throws Exception {

        DescribeStacksRequest wait = new DescribeStacksRequest();
        wait.setStackName(stackName);
        Boolean completed = false;
        String  stackStatus = "Unknown";
        String  stackReason = "";

        System.out.print("Waiting");
View Full Code Here

            }
        }
    }

    private static boolean stackExists(AmazonCloudFormation client, String stackName) {
        DescribeStacksRequest describeStacksRequest = new DescribeStacksRequest();
        describeStacksRequest.setStackName(stackName);
        try {
            client.describeStacks(describeStacksRequest);
            return true;
        } catch (AmazonServiceException e) {
            return false;
View Full Code Here

            return false;
        }
    }

    private static StackStatus stackStatus(AmazonCloudFormation client, String stackName) {
        DescribeStacksRequest describeStacksRequest = new DescribeStacksRequest();
        describeStacksRequest.setStackName(stackName);
        // describeStacks (with stack name specified) will return list of size 1 if found
        // and throw AmazonServiceException if no stack with that name exists
        try {
            return StackStatus.fromValue(client.describeStacks(describeStacksRequest)
                    .getStacks()
View Full Code Here

        DescribeInstancesResult instancesResult = null;
        Resource resource = stack.getResourceByType(ResourceType.CLOUDFORMATION_STACK);
        if (resource != null) {
            try {
                AmazonCloudFormationClient client = awsStackUtil.createCloudFormationClient(awsInfra.getRegion(), awsCredential);
                DescribeStacksRequest stackRequest = new DescribeStacksRequest().withStackName(
                        resource.getResourceName()
                );
                stackResult = client.describeStacks(stackRequest);

                DescribeStackResourcesRequest resourcesRequest = new DescribeStackResourcesRequest().withStackName(
View Full Code Here

  }

  public Stack findStack() throws Exception {

    final DescribeStacksRequest request = new DescribeStacksRequest();

    final DescribeStacksResult result = amazonClient
        .describeStacks(request);

    for (final Stack stack : result.getStacks()) {
View Full Code Here

    return (System.currentTimeMillis() - startTime) > (timeout * 1000);
  }

  private Stack getStack() throws Exception {

    final DescribeStacksRequest request = new DescribeStacksRequest();

    final DescribeStacksResult result = amazonClient
        .describeStacks(request);

    for (final Stack stack : result.getStacks()) {
View Full Code Here

    return (System.currentTimeMillis() - startTime) > (timeout * 1000);
  }

  private Stack getStack() throws Exception {

    final DescribeStacksRequest request = new DescribeStacksRequest();

    final DescribeStacksResult result = amazonClient
        .describeStacks(request);

    for (final Stack stack : result.getStacks()) {
View Full Code Here

    return (System.currentTimeMillis() - startTime) > (timeout * 1000);
  }

  private Stack getStack() throws Exception {

    final DescribeStacksRequest request = new DescribeStacksRequest();

    final DescribeStacksResult result = amazonClient
        .describeStacks(request);

    for (final Stack stack : result.getStacks()) {
View Full Code Here

            // Wait for stack to be created
            // Note that you could use SNS notifications on the CreateStack call to track the progress of the stack creation
            System.out.println("Stack creation completed, the stack " + stackName + " completed with " + waitForCompletion(stackbuilder, stackName));

            // Show all the stacks for this account along with the resources for each stack
            for (Stack stack : stackbuilder.describeStacks(new DescribeStacksRequest()).getStacks()) {
                System.out.println("Stack : " + stack.getStackName() + " [" + stack.getStackStatus().toString() + "]");

                DescribeStackResourcesRequest stackResourceRequest = new DescribeStackResourcesRequest();
                stackResourceRequest.setStackName(stack.getStackName());
                for (StackResource resource : stackbuilder.describeStackResources(stackResourceRequest).getStackResources()) {
View Full Code Here

TOP

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

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.