Package com.amazonaws.regions

Examples of com.amazonaws.regions.Regions


    public void setMachineMetricsExcluded(boolean excludeJvmMetrics) {
        AwsSdkMetrics.setMachineMetricsExcluded(excludeJvmMetrics);
    }
    @Override
    public String getRegion() {
        Regions region = AwsSdkMetrics.getRegion();
        return region == null ? null : region.getName();
    }
View Full Code Here


    public void setMachineMetricsExcluded(boolean excludeJvmMetrics) {
        AwsSdkMetrics.setMachineMetricsExcluded(excludeJvmMetrics);
    }
    @Override
    public String getRegion() {
        Regions region = AwsSdkMetrics.getRegion();
        return region == null ? null : region.getName();
    }
View Full Code Here

    @Override
    public boolean addInstances(Stack stack, String userData, Integer instanceCount) {
        MDCBuilder.buildMdcContext(stack);
        Integer requiredInstances = stack.getNodeCount() + instanceCount;
        Regions region = ((AwsTemplate) stack.getTemplate()).getRegion();
        AwsCredential credential = (AwsCredential) stack.getCredential();
        AmazonAutoScalingClient amazonASClient = awsStackUtil.createAutoScalingClient(region, credential);
        AmazonEC2Client amazonEC2Client = awsStackUtil.createEC2Client(region, credential);
        String asGroupName = cfStackUtil.getAutoscalingGroupName(stack);
        amazonASClient.updateAutoScalingGroup(new UpdateAutoScalingGroupRequest()
View Full Code Here

    }

    @Override
    public boolean removeInstances(Stack stack, Set<String> instanceIds) {
        MDCBuilder.buildMdcContext(stack);
        Regions region = ((AwsTemplate) stack.getTemplate()).getRegion();
        AwsCredential credential = (AwsCredential) stack.getCredential();
        AmazonAutoScalingClient amazonASClient = awsStackUtil.createAutoScalingClient(region, credential);
        AmazonEC2Client amazonEC2Client = awsStackUtil.createEC2Client(region, credential);

        String asGroupName = cfStackUtil.getAutoscalingGroupName(stack);
View Full Code Here

    }

    private boolean setStackState(Stack stack, boolean stopped) {
        MDCBuilder.buildMdcContext(stack);
        boolean result = true;
        Regions region = ((AwsTemplate) stack.getTemplate()).getRegion();
        AwsCredential credential = (AwsCredential) stack.getCredential();
        AmazonAutoScalingClient amazonASClient = awsStackUtil.createAutoScalingClient(region, credential);
        AmazonEC2Client amazonEC2Client = awsStackUtil.createEC2Client(region, credential);
        String asGroupName = cfStackUtil.getAutoscalingGroupName(stack);
        Set<InstanceMetaData> instanceMetaData = stack.getInstanceMetaData();
View Full Code Here

     * started; null if any failure.
     */
    @Override
    public MetricCollector getInstance() {
        AWSCredentialsProvider provider = AwsSdkMetrics.getCredentialProvider();
        Regions region = AwsSdkMetrics.getRegion();
        Integer qSize = AwsSdkMetrics.getMetricQueueSize();
        Long timeoutMilli = AwsSdkMetrics.getQueuePollTimeoutMilli();
        CloudWatchMetricConfig config = new CloudWatchMetricConfig();
        if (provider != null)
            config.setCredentialsProvider(provider);
        if (region != null) {
            String endPoint = "monitoring." + region.getName() + ".amazonaws.com";
            config.setCloudWatchEndPoint(endPoint);
        }
        if (qSize != null)
            config.setMetricQueueSize(qSize.intValue());
        if (timeoutMilli != null)
View Full Code Here

    public void setMachineMetricsExcluded(boolean excludeJvmMetrics) {
        AwsSdkMetrics.setMachineMetricsExcluded(excludeJvmMetrics);
    }
    @Override
    public String getRegion() {
        Regions region = AwsSdkMetrics.getRegion();
        return region == null ? null : region.getName();
    }
View Full Code Here

     * started; null if any failure.
     */
    @Override
    public MetricCollector getInstance() {
        AWSCredentialsProvider provider = AwsSdkMetrics.getCredentialProvider();
        Regions region = AwsSdkMetrics.getRegion();
        Integer qSize = AwsSdkMetrics.getMetricQueueSize();
        Long timeoutMilli = AwsSdkMetrics.getQueuePollTimeoutMilli();
        CloudWatchMetricConfig config = new CloudWatchMetricConfig();
        if (provider != null)
            config.setCredentialsProvider(provider);
        if (region != null) {
            String endPoint = "monitoring." + region.getName() + ".amazonaws.com";
            config.setCloudWatchEndPoint(endPoint);
        }
        if (qSize != null)
            config.setMetricQueueSize(qSize.intValue());
        if (timeoutMilli != null)
View Full Code Here

    public void setMachineMetricsExcluded(boolean excludeJvmMetrics) {
        AwsSdkMetrics.setMachineMetricsExcluded(excludeJvmMetrics);
    }
    @Override
    public String getRegion() {
        Regions region = AwsSdkMetrics.getRegion();
        return region == null ? null : region.getName();
    }
View Full Code Here

     * started; null if any failure.
     */
    @Override
    public MetricCollector getInstance() {
        AWSCredentialsProvider provider = AwsSdkMetrics.getCredentialProvider();
        Regions region = AwsSdkMetrics.getRegion();
        Integer qSize = AwsSdkMetrics.getMetricQueueSize();
        Long timeoutMilli = AwsSdkMetrics.getQueuePollTimeoutMilli();
        CloudWatchMetricConfig config = new CloudWatchMetricConfig();
        if (provider != null)
            config.setCredentialsProvider(provider);
        if (region != null) {
            String endPoint = "monitoring." + region.getName() + ".amazonaws.com";
            config.setCloudWatchEndPoint(endPoint);
        }
        if (qSize != null)
            config.setMetricQueueSize(qSize.intValue());
        if (timeoutMilli != null)
View Full Code Here

TOP

Related Classes of com.amazonaws.regions.Regions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.