Package com.amazonaws.services.ec2.model

Examples of com.amazonaws.services.ec2.model.Region


    final Collection<String> resourceList = new ArrayList<String>(1);
    resourceList.add(resourceId);

    final Collection<Tag> tagList = new ArrayList<Tag>(1);
    tagList.add(new Tag(key, value));

    request.setResources(resourceList);
    request.setTags(tagList);

    logger.info("tag delete request=" + request);
View Full Code Here


   *
   * @param instanceIds
   */
  public static void terminateInstances(List<String> instanceIds) {
    // terminate
    TerminateInstancesRequest request = new TerminateInstancesRequest(instanceIds);
    getEC2Client().terminateInstances(request);
  }
View Full Code Here

   *
   * @param instanceIds
   */
  public static void terminateInstances(String... instanceIds) {
    // terminate
    TerminateInstancesRequest request = new TerminateInstancesRequest();
    getEC2Client().terminateInstances(request.withInstanceIds(instanceIds));
  }
View Full Code Here

     * Returns the marshaled request configured with additional parameters to
     * enable operation dry-run.
     */
    @Override
    public Request<RunInstancesRequest> getDryRunRequest() {
        Request<RunInstancesRequest> request = new RunInstancesRequestMarshaller().marshall(this);
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }
View Full Code Here

     * Returns the marshaled request configured with additional parameters to
     * enable operation dry-run.
     */
    @Override
    public Request<RunInstancesRequest> getDryRunRequest() {
        Request<RunInstancesRequest> request = new RunInstancesRequestMarshaller().marshall(this);
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }
View Full Code Here

            s3service = Utils.openService(prop);
            if (bucket == null || "".equals(bucket.trim())) {
                bucket = prop.getProperty(S3Constants.S3_BUCKET);
            }
            String region = prop.getProperty(S3Constants.S3_REGION);
            Region s3Region = null;
            String endpoint = null;
            if (DEFAULT_AWS_BUCKET_REGION.equals(region)) {
                s3Region =  Region.US_Standard;
                endpoint = S3 + DOT + AWSDOTCOM;
            } else if (Region.EU_Ireland.toString().equals(region)) {
View Full Code Here

     * @param client
     *            An {@link AmazonS3Client} to use in the cache. Its region will
     *            be detected automatically.
     */
    public void useClient(AmazonS3Client client) {
        Region s3region = client.getRegion();

        synchronized (transferManagersByRegion) {
            TransferManager tm = transferManagersByRegion.remove(s3region);
            if (tm != null) {
                tm.shutdownNow();
View Full Code Here

            s3service = Utils.openService(prop);
            if (bucket == null || "".equals(bucket.trim())) {
                bucket = prop.getProperty(S3Constants.S3_BUCKET);
            }
            String region = prop.getProperty(S3Constants.S3_REGION);
            Region s3Region = null;
            String endpoint = null;
            if (DEFAULT_AWS_BUCKET_REGION.equals(region)) {
                s3Region =  Region.US_Standard;
                endpoint = S3 + DOT + AWSDOTCOM;
            } else if (Region.EU_Ireland.toString().equals(region)) {
View Full Code Here

     * @param client
     *            An {@link AmazonS3Client} to use in the cache. Its region will
     *            be detected automatically.
     */
    public void useClient(AmazonS3Client client) {
        Region s3region = client.getRegion();

        synchronized (transferManagersByRegion) {
            TransferManager tm = transferManagersByRegion.remove(s3region);
            if (tm != null) {
                tm.shutdownNow();
View Full Code Here

        this.service = service;
        this.transferManager = new TransferManager(service);
        this.serverSideEncryption = S3FileSystemConfigBuilder
            .getInstance().getServerSideEncryption(fileSystemOptions);

        Region region = S3FileSystemConfigBuilder.getInstance().getRegion(
            fileSystemOptions);
        if (region != null)
            service.setRegion(region.toAWSRegion());

        try {
            if (service.doesBucketExist(bucketId)) {
                bucket = new Bucket(bucketId);
            } else {
View Full Code Here

TOP

Related Classes of com.amazonaws.services.ec2.model.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.