Class AwsCloudFormationUtils

java.lang.Object
org.craftercms.deployer.utils.aws.AwsCloudFormationUtils

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

    Modifier and Type
    Method
    Description
    static software.amazon.awssdk.services.cloudformation.CloudFormationClient
    Builds an AmazonCloudFormation client, using the provided AwsClientBuilderConfigurer.
    static software.amazon.awssdk.services.cloudformation.model.Stack
    getStack(software.amazon.awssdk.services.cloudformation.CloudFormationClient cloudFormation, String stackName)
    Returns the info of the specifed stack.
    static boolean
    stackExists(software.amazon.awssdk.services.cloudformation.CloudFormationClient cloudFormation, String stackName)
    Returns true if the specified stack exists, false otherwise.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • buildClient

      public static software.amazon.awssdk.services.cloudformation.CloudFormationClient 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(software.amazon.awssdk.services.cloudformation.CloudFormationClient 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 software.amazon.awssdk.services.cloudformation.model.Stack getStack(software.amazon.awssdk.services.cloudformation.CloudFormationClient 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