Search in sources :

Example 1 with DescribeStacksResult

use of com.amazonaws.services.cloudformation.model.DescribeStacksResult in project pipeline-aws-plugin by jenkinsci.

the class CloudFormationStack method describeOutputs.

public Map<String, String> describeOutputs() {
    DescribeStacksResult result = this.client.describeStacks(new DescribeStacksRequest().withStackName(this.stack));
    Stack cfnStack = result.getStacks().get(0);
    Map<String, String> map = new HashMap<>();
    for (Output output : cfnStack.getOutputs()) {
        map.put(output.getOutputKey(), output.getOutputValue());
    }
    return map;
}
Also used : DescribeStacksRequest(com.amazonaws.services.cloudformation.model.DescribeStacksRequest) HashMap(java.util.HashMap) Output(com.amazonaws.services.cloudformation.model.Output) DescribeStacksResult(com.amazonaws.services.cloudformation.model.DescribeStacksResult) Stack(com.amazonaws.services.cloudformation.model.Stack)

Aggregations

DescribeStacksRequest (com.amazonaws.services.cloudformation.model.DescribeStacksRequest)1 DescribeStacksResult (com.amazonaws.services.cloudformation.model.DescribeStacksResult)1 Output (com.amazonaws.services.cloudformation.model.Output)1 Stack (com.amazonaws.services.cloudformation.model.Stack)1 HashMap (java.util.HashMap)1