Package com.amazonaws.auth

Examples of com.amazonaws.auth.BasicAWSCredentials


   * Creates a new instance based on the bucket provided.
   * @param bucket the name of the S3 bucket
   */
  public AWSFileStore(String bucket) {
    this.bucket = bucket;
    this.awsCredentials = new BasicAWSCredentials(Config.AWS_ACCESSKEY, Config.AWS_SECRETKEY);
    this.s3 = new AmazonS3Client(awsCredentials);
  }
View Full Code Here


      }
      awsAccessKey = this.accessKey;
      awsSecretKey = this.secretKey;
    }

        this.emailService = new AmazonSimpleEmailServiceClient(new BasicAWSCredentials(awsAccessKey, awsSecretKey));
    if (!isNullOrEmpty(host)) {
      this.emailService.setEndpoint(host);
    } else if (this.httpsEndpoint != null) {
      this.emailService.setEndpoint(this.httpsEndpoint);
    }
View Full Code Here

        return new LocalYumRepoFacade(stagingDirectory, createrepo, getLog());
    }

    private AmazonS3Client createS3Client() {
        if (s3AccessKey != null || s3SecretKey != null) {
            return new AmazonS3Client(new BasicAWSCredentials(s3AccessKey, s3SecretKey));
        } else {
            return new AmazonS3Client(new DefaultAWSCredentialsProviderChain());
        }
    }
View Full Code Here

  private static AmazonS3 getS3Client(String accessKey, String secretKey)
  {
    AWSCredentialsProvider provider;
    if (accessKey != null && secretKey != null) {
      AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);
      provider = new StaticCredentialsProvider(credentials);
    } else {
      provider = new DefaultAWSCredentialsProviderChain();
    }
View Full Code Here

  private static AmazonS3 getS3Client(String accessKey, String secretKey)
  {
    AWSCredentialsProvider provider;
    if (accessKey != null && secretKey != null) {
      AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);
      provider = new StaticCredentialsProvider(credentials);
    } else {
      provider = new DefaultAWSCredentialsProviderChain();
    }
View Full Code Here

      awsAccessKey = this.accessKey;
      awsSecretKey = this.secretKey;
    }

    this.emailService = new AmazonSimpleEmailServiceClient(
        new BasicAWSCredentials(awsAccessKey, awsSecretKey));
    if (!isNullOrEmpty(host)) {
      this.emailService.setEndpoint(host);
    } else if (this.httpsEndpoint != null) {
      this.emailService.setEndpoint(this.httpsEndpoint);
    }
View Full Code Here

        return new LocalYumRepoFacade(stagingDirectory, createrepo, createrepoOpts, getLog());
    }

    private AmazonS3Client createS3Client() {
        if (s3AccessKey != null || s3SecretKey != null) {
            return new AmazonS3Client(new BasicAWSCredentials(s3AccessKey, s3SecretKey));
        } else {
            return new AmazonS3Client(new DefaultAWSCredentialsProviderChain());
        }
    }
View Full Code Here

        return new DefaultArtifact(item.getGroupId(), item.getArtifactId(), item.getClassifier(), item.getType()/*extension*/, item.getVersion());
    }

    private AmazonS3Client createS3Client() {
        if (s3AccessKey != null || s3SecretKey != null) {
            return new AmazonS3Client(new BasicAWSCredentials(s3AccessKey, s3SecretKey));
        } else {
            return new AmazonS3Client(new DefaultAWSCredentialsProviderChain());
        }
    }
View Full Code Here

  }

  private AmazonEC2 newClient() {

    final AWSCredentials credentials = new BasicAWSCredentials(
        this.awsAccessKey, this.awsSecretKey);

    final AmazonEC2 amazonClient = new AmazonEC2Client(credentials);

    amazonClient.setEndpoint(endpoint);
View Full Code Here

        if(s3Client == null) {
            if(s3AccessKey == null || s3AccessKey.isEmpty())
                throw new IOException("S3 configuration is missing. Please add s3-user");
            if(s3SecretKey == null || s3SecretKey.isEmpty())
                throw new IOException("S3 configuration is missing. Please add s3-secret");
            s3Client = new AmazonS3Client(new BasicAWSCredentials(s3AccessKey, s3SecretKey));
        }
        return s3Client;
    }
View Full Code Here

TOP

Related Classes of com.amazonaws.auth.BasicAWSCredentials

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.