use of com.amazonaws.services.cloudformation.model.DescribeStackResourceRequest in project cloudbreak by hortonworks.
the class CloudFormationStackUtil method getAutoscalingGroupName.
public String getAutoscalingGroupName(AuthenticatedContext ac, AmazonCloudFormation amazonCFClient, String instanceGroup) {
String cFStackName = getCfStackName(ac);
DescribeStackResourceResult asGroupResource = amazonCFClient.describeStackResource(new DescribeStackResourceRequest().withStackName(cFStackName).withLogicalResourceId(String.format("AmbariNodes%s", instanceGroup.replaceAll("_", ""))));
return asGroupResource.getStackResourceDetail().getPhysicalResourceId();
}
use of com.amazonaws.services.cloudformation.model.DescribeStackResourceRequest in project cloudbreak by hortonworks.
the class CloudFormationStackUtil method getResourceArnByLogicalId.
public String getResourceArnByLogicalId(AuthenticatedContext ac, String logicalId, String region) {
String cFStackName = getCfStackName(ac);
AmazonCloudFormationClient amazonCfClient = awsClient.createCloudFormationClient(new AwsCredentialView(ac.getCloudCredential()), region);
DescribeStackResourceResult result = amazonCfClient.describeStackResource(new DescribeStackResourceRequest().withStackName(cFStackName).withLogicalResourceId(logicalId));
return result.getStackResourceDetail().getPhysicalResourceId();
}
use of com.amazonaws.services.cloudformation.model.DescribeStackResourceRequest in project cloudbreak by hortonworks.
the class CloudFormationStackUtil method getAutoscalingGroupName.
@Retryable(value = SdkClientException.class, maxAttempts = 15, backoff = @Backoff(delay = 1000, multiplier = 2, maxDelay = 10000))
public String getAutoscalingGroupName(AuthenticatedContext ac, AmazonCloudFormationClient amazonCFClient, String instanceGroup) {
String cFStackName = getCfStackName(ac);
DescribeStackResourceResult asGroupResource = amazonCFClient.describeStackResource(new DescribeStackResourceRequest().withStackName(cFStackName).withLogicalResourceId(String.format("AmbariNodes%s", instanceGroup.replaceAll("_", ""))));
return asGroupResource.getStackResourceDetail().getPhysicalResourceId();
}
Aggregations