List of usage examples for com.amazonaws.services.applicationautoscaling.model RegisterScalableTargetRequest getResourceId
public String getResourceId()
The identifier of the resource that is associated with the scalable target.
From source file:com.netflix.spinnaker.clouddriver.ecs.deploy.ops.CreateServerGroupAtomicOperation.java
License:Apache License
private String registerAutoScalingGroup(AmazonCredentials credentials, Service service) { AWSApplicationAutoScaling autoScalingClient = getAmazonApplicationAutoScalingClient(); String assumedRoleArn = inferAssumedRoleArn(credentials); RegisterScalableTargetRequest request = new RegisterScalableTargetRequest() .withServiceNamespace(ServiceNamespace.Ecs) .withScalableDimension(ScalableDimension.EcsServiceDesiredCount) .withResourceId(/*from w w w. ja v a 2 s .com*/ String.format("service/%s/%s", description.getEcsClusterName(), service.getServiceName())) .withRoleARN(assumedRoleArn).withMinCapacity(description.getCapacity().getMin()) .withMaxCapacity(description.getCapacity().getMax()); updateTaskStatus("Creating Amazon Application Auto Scaling Scalable Target Definition..."); autoScalingClient.registerScalableTarget(request); updateTaskStatus("Done creating Amazon Application Auto Scaling Scalable Target Definition."); return request.getResourceId(); }