Package com.amazonaws.auth

Examples of com.amazonaws.auth.BasicAWSCredentials


     * Provide the possibility to override this method for an mock implementation
     *
     * @return AmazonS3Client
     */
    AmazonS3Client createS3Client() {
        AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());
        AmazonS3Client client = new AmazonS3Client(credentials);
        if (configuration.getAmazonS3Endpoint() != null) {
            client.setEndpoint(configuration.getAmazonS3Endpoint());
        }
        return client;
View Full Code Here


    /**
     * Provide the possibility to override this method for an mock implementation
     * @return AmazonSQSClient
     */
    AmazonSQSClient createClient() {
        AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());
        AmazonSQSClient client = new AmazonSQSClient(credentials);
        if (configuration.getAmazonSQSEndpoint() != null) {
            client.setEndpoint(configuration.getAmazonSQSEndpoint());
        }
        return client;
View Full Code Here

     * Provide the possibility to override this method for an mock implementation
     *
     * @return AmazonSNSClient
     */
    AmazonSNSClient createSNSClient() {
        AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());
        AmazonSNSClient client = new AmazonSNSClient(credentials);
        if (configuration.getAmazonSNSEndpoint() != null) {
            client.setEndpoint(configuration.getAmazonSNSEndpoint());
        }
        return client;
View Full Code Here

   
    List<Message> messages = new ArrayList<Message>();
    Map<String, Map<String, String>> queueAttributes = new HashMap<String, Map<String, String>>();
   
    public AmazonSQSClientMock() {
        super(new BasicAWSCredentials("myAccessKey", "mySecretKey"));
    }
View Full Code Here

            throw new ProviderException("EC2 Username is empty", invocationContext);

        /*
         * Need to start EC2 instance before running it
         */
        AWSCredentials credential = new BasicAWSCredentials(access_key, secret_key);
        AmazonEC2Client ec2client = new AmazonEC2Client(credential);

        try {
            /*
             * Build key pair before start instance
View Full Code Here

        }

        if (secretData.hasUsername()) {
            String accessKey = secretData.getUsername();
            String secretKey = secretData.getPassword();
            AWSCredentials awsCredentials = new BasicAWSCredentials(accessKey, secretKey);
            ec2Client = new AmazonEC2Client(awsCredentials);
        }
    }
View Full Code Here

                    if (jsonObject.has("Token")) {
                        credentials = new BasicSessionCredentials(jsonObject.getString("AccessKeyId"),
                                jsonObject.getString("SecretAccessKey"), jsonObject.getString("Token"));
                    } else {
                        credentials = new BasicAWSCredentials(jsonObject.getString("AccessKeyId"),
                                jsonObject.getString("SecretAccessKey"));
                    }

                    if (jsonObject.has("Expiration")) {
                        /*
 
View Full Code Here

    public AwsRoute53Client(Configuration config) {
        this(config.get("aws.route53.access"), config.get("aws.route53.secret"));
    }

    public AwsRoute53Client(String accessKey, String secretKey) {
        BasicAWSCredentials awsCredentials = new BasicAWSCredentials(accessKey, secretKey);
        this.restClient = new AmazonRoute53Client(awsCredentials);
    }
View Full Code Here

        getLog().error(errorMessage);

        throw new MojoFailureException(errorMessage);
      }

      this.awsCredentials = new BasicAWSCredentials(awsAccessKey,
          awsSecretKey);
    }

    return this.awsCredentials;
  }
View Full Code Here

        return summary.getKey().startsWith(metadataFilePrefix);
    }

    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

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.