Package com.amazonaws.auth

Examples of com.amazonaws.auth.BasicAWSCredentials


    public AmazonSimpleDB getSdbClient() {
        return configuration.getAmazonSDBClient() != null ? configuration.getAmazonSDBClient() : createSdbClient();
    }

    AmazonSimpleDBClient createSdbClient() {
        AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());
        AmazonSimpleDBClient client = new AmazonSimpleDBClient(credentials);
        if (configuration.getAmazonSdbEndpoint() != null) {
            client.setEndpoint(configuration.getAmazonSdbEndpoint());
        }
        configuration.setAmazonSDBClient(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

public class AmazonSQSClientMock extends AmazonSQSClient {
   
    List<Message> messages = new ArrayList<Message>();
   
    public AmazonSQSClientMock() {
        super(new BasicAWSCredentials("myAccessKey", "mySecretKey"));
    }
View Full Code Here

        if (amazonSecurityContext.getUserName() == null || amazonSecurityContext.getUserName().isEmpty())
            throw new GFacProviderException("EC2 Username is empty", jobExecutionContext);

        /* Need to start EC2 instance before running it */
        AWSCredentials credential =
                new BasicAWSCredentials(amazonSecurityContext.getAccessKey(), amazonSecurityContext.getSecretKey());
        AmazonEC2Client ec2client = new AmazonEC2Client(credential);

        initEc2Environment(jobExecutionContext, ec2client);
        checkConnection(instance, ec2client);
    }
View Full Code Here

        String key = req.getParameter("key");
        String bucket = req.getParameter("bucket");

        resp.setStatus(200);

        AWSCredentials myCredentials = new BasicAWSCredentials(AWS_PUBLIC_KEY, AWS_SECRET_KEY);
        AmazonS3 s3Client = new AmazonS3Client(myCredentials);
        s3Client.deleteObject(bucket, key);
    }
View Full Code Here

        super();
    }

    public static AmazonS3 acquireClient(final ClientOptions clientOptions) {

        final AWSCredentials credentials = new BasicAWSCredentials(
                clientOptions.getAccessKey(), clientOptions.getSecretKey());

        final ClientConfiguration configuration = new ClientConfiguration();

        if (clientOptions.isHttps() != null) {
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());
        return new AmazonSQSClient(credentials);
    }
View Full Code Here

   * Amazon EC2 instance type
   */
  public final static String[] INSTANCE_TYPE = { "t1.micro", "m1.small", "m1.large", "m1.xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "c1.medium", "c1.xlarge" };
 
  private static AmazonEC2 getEC2Client() {
    AmazonEC2 ec2 = new AmazonEC2Client(new BasicAWSCredentials(AmazonCredential.getInstance().getAwsAccessKeyId(), AmazonCredential.getInstance().getAwsSecretAccessKey()));
    return ec2;
  }
View Full Code Here

    String ins_id = "";
   
    /*
     * 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

    String region = System.getProperty(REGION_PROPERTY);   
    String accessKey = System.getProperty(ACCESS_KEY_PROPERTY);
    String secretKey = System.getProperty(SECRET_KEY_PROPERTY);
    boolean encrypt = Boolean.getBoolean(ENCRYPT_PROPERTY);

    AmazonS3Client s3 = new AmazonS3Client(new BasicAWSCredentials(accessKey, secretKey));
    s3.setRegion(Region.getRegion(Regions.valueOf(region)));

    return new S3DataTransferer(s3, bucketName, encrypt);
  }
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.