Package com.amazonaws.regions

Examples of com.amazonaws.regions.Region


                    "Please make sure that your credentials file is at the correct " +
                    "location (~/.aws/credentials), and is in valid format.",
                    e);
        }
        dynamoDB = new AmazonDynamoDBClient(credentials);
        Region usWest2 = Region.getRegion(Regions.US_WEST_2);
        dynamoDB.setRegion(usWest2);
    }
View Full Code Here


                    "location (~/.aws/credentials), and is in valid format.",
                    e);
        }

        ec2 = new AmazonEC2Client(credentials);
        Region usWest2 = Region.getRegion(Regions.US_WEST_2);
        ec2.setRegion(usWest2);

        this.instanceType = instanceType;
        this.amiID = amiID;
        this.bidPrice = bidPrice;
View Full Code Here

                    "location (~/.aws/credentials), and is in valid format.",
                    e);
        }

        AmazonCloudFormation stackbuilder = new AmazonCloudFormationClient(credentials);
        Region usWest2 = Region.getRegion(Regions.US_WEST_2);
        stackbuilder.setRegion(usWest2);

        System.out.println("===========================================");
        System.out.println("Getting Started with AWS CloudFormation");
        System.out.println("===========================================\n");
View Full Code Here

        this(recordProcessorFactory, config, kinesisClient, dynamoDBClient, new CWMetricsFactory(cloudWatchClient,
                config.getApplicationName(),
                config.getMetricsBufferTimeMillis(),
                config.getMetricsMaxQueueSize()), execService);
        if (config.getRegionName() != null) {
            Region region = RegionUtils.getRegion(config.getRegionName());
            cloudWatchClient.setRegion(region);
            LOG.debug("The region of Amazon CloudWatch client has been set to " + config.getRegionName());
        }
    }
View Full Code Here

                        config.getFailoverTimeMillis(),
                        config.getEpsilonMillis(),
                        metricsFactory), metricsFactory, execService);
        // If a region name was explicitly specified, use it as the region for Amazon Kinesis and Amazon DynamoDB.
        if (config.getRegionName() != null) {
            Region region = RegionUtils.getRegion(config.getRegionName());
            kinesisClient.setRegion(region);
            LOG.debug("The region of Amazon Kinesis client has been set to " + config.getRegionName());
            dynamoDBClient.setRegion(region);
            LOG.debug("The region of Amazon DynamoDB client has been set to " + config.getRegionName());
        }
View Full Code Here

        this(recordProcessorFactory, config, kinesisClient, dynamoDBClient, new CWMetricsFactory(cloudWatchClient,
                config.getApplicationName(),
                config.getMetricsBufferTimeMillis(),
                config.getMetricsMaxQueueSize()), execService);
        if (config.getRegionName() != null) {
            Region region = RegionUtils.getRegion(config.getRegionName());
            cloudWatchClient.setRegion(region);
            LOG.debug("The region of Amazon CloudWatch client has been set to " + config.getRegionName());
        }
    }
View Full Code Here

                        config.getFailoverTimeMillis(),
                        config.getEpsilonMillis(),
                        metricsFactory), metricsFactory, execService);
        // If a region name was explicitly specified, use it as the region for Amazon Kinesis and Amazon DynamoDB.
        if (config.getRegionName() != null) {
            Region region = RegionUtils.getRegion(config.getRegionName());
            kinesisClient.setRegion(region);
            LOG.debug("The region of Amazon Kinesis client has been set to " + config.getRegionName());
            dynamoDBClient.setRegion(region);
            LOG.debug("The region of Amazon DynamoDB client has been set to " + config.getRegionName());
        }
View Full Code Here

      String accessKey = System.getProperty("AWS_ACCESS_KEY_ID");
      String secretKey = System.getProperty("AWS_SECRET_KEY");
      String tableName = System.getProperty("PARAM1");
      String regionName = System.getProperty("PARAM2");

      Region region = Region.getRegion(Regions.fromName(regionName));
      ClientConfiguration clientConfiguration = new ClientConfiguration().withMaxErrorRetry(20);
      AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);

      AmazonDynamoDBClient ddb = new AmazonDynamoDBClient(credentials, clientConfiguration);
      ddb.setRegion(region);
View Full Code Here

    String tableName = System.getProperty("PARAM1");
    String regionName = System.getProperty("PARAM2");

    AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);
    AmazonDynamoDBClient ddb = new AmazonDynamoDBClient(credentials);
    Region region = Region.getRegion(Regions.fromName(regionName));
    ddb.setRegion(region);

    config = new GeoDataManagerConfiguration(ddb, tableName);
    geoDataManager = new GeoDataManager(config);
  }
View Full Code Here

    private void initAWS() {
        AWSCredentialsProvider credentials = new AWSCredentialsProviderChain(
                new StaticCredentialsProvider(new BasicAWSCredentials(
                        awsAccessKeyId,
                        awsSecretSharedKey)));
        Region region = Region.getRegion(Regions.fromName(awsRegion));
        ClientConfiguration clientConfig = new ClientConfiguration();

        clientConfig.setUserAgent("AwsGradlePlugin");

        s3 = region.createClient(AmazonS3Client.class, credentials,
                clientConfig);
        awseb = region.createClient(AWSElasticBeanstalkClient.class,
                credentials, clientConfig);
    }
View Full Code Here

TOP

Related Classes of com.amazonaws.regions.Region

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.