Java 类com.amazonaws.services.autoscaling.model.DeletePolicyRequest 实例源码

项目:enhanced-snapshots    文件:ClusterConfigurationServiceImpl.java   
@Override
public void removeClusterInfrastructure() {
    autoScaling.deletePolicy(new DeletePolicyRequest().withAutoScalingGroupName(getAutoScalingGroup().getAutoScalingGroupName()).withPolicyName(SCALE_UP_POLICY));
    autoScaling.deletePolicy(new DeletePolicyRequest().withAutoScalingGroupName(getAutoScalingGroup().getAutoScalingGroupName()).withPolicyName(SCALE_DOWN_POLICY));
    cloudWatch.deleteAlarms(new DeleteAlarmsRequest().withAlarmNames(ESS_OVERLOAD_ALARM, ESS_IDLE_ALARM));
    // CloudWatch metrics are stored for two weeks. Old data will be removed automatically.

    amazonSQS.deleteQueue(new DeleteQueueRequest().withQueueUrl(ESS_QUEUE_NAME));
    cloudFormation.deleteStack(new DeleteStackRequest().withStackName(SystemUtils.getCloudFormationStackName()));
}
项目:cmn-project    文件:AutoScaling.java   
public void deletePolicy(String asGroupName, String policyName) {
    logger.info("delete scaling policy, asGroup={}, policy={}", asGroupName, policyName);
    autoScaling.deletePolicy(new DeletePolicyRequest()
        .withAutoScalingGroupName(asGroupName)
        .withPolicyName(policyName));
}