Class StackSetInstanceManager
- java.lang.Object
-
- pl.wrzasq.lambda.cform.stackset.instance.service.StackSetInstanceManager
-
public class StackSetInstanceManager extends Object
CloudFormation API implementation.
-
-
Field Summary
Fields Modifier and Type Field Description private com.amazonaws.services.cloudformation.AmazonCloudFormation
cloudFormation
AWS CloudFormation API client.private org.slf4j.Logger
logger
Logger.private pl.wrzasq.commons.aws.cloudformation.StackSetHandler
stackSetHandler
Stack set operations helper.
-
Constructor Summary
Constructors Constructor Description StackSetInstanceManager(com.amazonaws.services.cloudformation.AmazonCloudFormation cloudFormation, pl.wrzasq.commons.aws.cloudformation.StackSetHandler stackSetHandler)
Initializes object with given CloudFormation client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static String
buildPhysicalResourceId(StackInstanceRequest input)
Converts stack instance specification into string specification.private static Collection<com.amazonaws.services.cloudformation.model.Parameter>
buildSdkParameters(StackInstanceRequest input)
Converts key-value mapping into AWS SDK structure.private String
createStackInstance(StackInstanceRequest input)
Creates new stack instance.pl.wrzasq.commons.aws.cloudformation.CustomResourceResponse<com.amazonaws.services.cloudformation.model.StackInstance>
deleteStackInstance(StackInstanceRequest input, String physicalResourceId)
Handles stack instance deletion.pl.wrzasq.commons.aws.cloudformation.CustomResourceResponse<com.amazonaws.services.cloudformation.model.StackInstance>
deployStackInstance(StackInstanceRequest input, String physicalResourceId)
Handles stack set deployment.private static StackInstanceRequest
parsePhysicalResourceId(String physicalResourceId)
Converts string identifier into stack instance specification.private String
updateStackInstance(StackInstanceRequest input)
Updates existing stack instance.
-
-
-
Field Detail
-
logger
private org.slf4j.Logger logger
Logger.
-
cloudFormation
private com.amazonaws.services.cloudformation.AmazonCloudFormation cloudFormation
AWS CloudFormation API client.
-
stackSetHandler
private pl.wrzasq.commons.aws.cloudformation.StackSetHandler stackSetHandler
Stack set operations helper.
-
-
Constructor Detail
-
StackSetInstanceManager
public StackSetInstanceManager(com.amazonaws.services.cloudformation.AmazonCloudFormation cloudFormation, pl.wrzasq.commons.aws.cloudformation.StackSetHandler stackSetHandler)
Initializes object with given CloudFormation client.- Parameters:
cloudFormation
- AWS CloudFormation client.stackSetHandler
- Stack set operations helper.
-
-
Method Detail
-
deployStackInstance
public pl.wrzasq.commons.aws.cloudformation.CustomResourceResponse<com.amazonaws.services.cloudformation.model.StackInstance> deployStackInstance(StackInstanceRequest input, String physicalResourceId)
Handles stack set deployment.- Parameters:
input
- Resource deployment request.physicalResourceId
- Physical ID of existing resource (if present).- Returns:
- Data about published version.
-
deleteStackInstance
public pl.wrzasq.commons.aws.cloudformation.CustomResourceResponse<com.amazonaws.services.cloudformation.model.StackInstance> deleteStackInstance(StackInstanceRequest input, String physicalResourceId)
Handles stack instance deletion.- Parameters:
input
- Resource delete request.physicalResourceId
- Physical ID of existing resource (if present).- Returns:
- Empty response.
-
createStackInstance
private String createStackInstance(StackInstanceRequest input)
Creates new stack instance.- Parameters:
input
- Stack instance specification.- Returns:
- Stack set operation ID.
-
updateStackInstance
private String updateStackInstance(StackInstanceRequest input)
Updates existing stack instance.- Parameters:
input
- Stack instance specification.- Returns:
- Stack set operation ID.
-
buildSdkParameters
private static Collection<com.amazonaws.services.cloudformation.model.Parameter> buildSdkParameters(StackInstanceRequest input)
Converts key-value mapping into AWS SDK structure.- Parameters:
input
- Request data.- Returns:
- Collection of AWS SDK DTOs.
-
parsePhysicalResourceId
private static StackInstanceRequest parsePhysicalResourceId(String physicalResourceId)
Converts string identifier into stack instance specification.- Parameters:
physicalResourceId
- Compound identifier.- Returns:
- Stack instance request specification.
-
buildPhysicalResourceId
private static String buildPhysicalResourceId(StackInstanceRequest input)
Converts stack instance specification into string specification.- Parameters:
input
- Stack instance request specification.- Returns:
- Compound identifier.
-
-