AmazonCloudFormationClient amazonCfClient = awsStackUtil.createCloudFormationClient(awsTemplate.getRegion(), awsCredential);
return getAutoscalingGroupName(stack, amazonCfClient);
}
public String getAutoscalingGroupName(Stack stack, AmazonCloudFormationClient amazonCFClient) {
DescribeStackResourceResult asGroupResource = amazonCFClient.describeStackResource(new DescribeStackResourceRequest()
.withStackName(stack.getResourcesByType(ResourceType.CLOUDFORMATION_STACK).get(0).getResourceName())
.withLogicalResourceId("AmbariNodes"));
return asGroupResource.getStackResourceDetail().getPhysicalResourceId();
}