Class AwsCloudFormationUtils


  • public class AwsCloudFormationUtils
    extends Object
    Utility methods for AWS CloudFormation.
    Author:
    avasquez
    • Method Detail

      • buildClient

        public static com.amazonaws.services.cloudformation.AmazonCloudFormation buildClient​(AwsClientBuilderConfigurer builderConfigurer)
        Builds an AmazonCloudFormation client, using the provided AwsClientBuilderConfigurer.
        Parameters:
        builderConfigurer - the helper used to configure the AmazonCloudFormationClientBuilder
        Returns:
        the built AmazonCloudFormation client
      • stackExists

        public static boolean stackExists​(com.amazonaws.services.cloudformation.AmazonCloudFormation cloudFormation,
                                          String stackName)
                                   throws DeployerException
        Returns true if the specified stack exists, false otherwise.
        Parameters:
        cloudFormation - the CloudFormation client
        stackName - the stack name
        Returns:
        true if the specified stack exists, false otherwise.
        Throws:
        DeployerException - in an error occurs
      • getStack

        public static com.amazonaws.services.cloudformation.model.Stack getStack​(com.amazonaws.services.cloudformation.AmazonCloudFormation cloudFormation,
                                                                                 String stackName)
                                                                          throws DeployerException
        Returns the info of the specifed stack.
        Parameters:
        cloudFormation - the CloudFormation client
        stackName - the stack name
        Returns:
        the info of the stack
        Throws:
        DeployerException - if an error occurs