/** * Constructs a new ArchiveTransferManager, using the specified AWS * credentials to authenticate requests. * * @param credentials * The AWS credentials used to authenticate requests. * @deprecated Use {@link ArchiveTransferManagerBuilder}. */ public ArchiveTransferManager(AWSCredentials credentials) { this(new StaticCredentialsProvider(credentials), new ClientConfiguration()); }
/** * Sets the optional credentials to use for this request, overriding the default credentials set at the client level. * * @param credentials The optional AWS security credentials to use for this request, overriding the default credentials set at * the client level. * @deprecated by {@link #setRequestCredentialsProvider(AWSCredentialsProvider)}. If you must use {@link AWSCredentials} you * can wrap it with a {@link com.amazonaws.auth.AWSStaticCredentialsProvider}. */ @Deprecated public void setRequestCredentials(AWSCredentials credentials) { this.credentialsProvider = credentials == null ? null : new StaticCredentialsProvider(credentials); }
@Deprecated S3ClientCache(AWSCredentials credentials) { this(new StaticCredentialsProvider(credentials)); }
/** * @deprecated use {@link AmazonS3EncryptionClientBuilder#withEncryptionMaterials(EncryptionMaterialsProvider)} and * {@link AmazonS3EncryptionClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonS3EncryptionClientBuilder#withCryptoConfiguration(CryptoConfiguration)} and * {@link AmazonS3EncryptionClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonS3EncryptionClient(AWSCredentials credentials, EncryptionMaterialsProvider encryptionMaterialsProvider, ClientConfiguration clientConfig, CryptoConfiguration cryptoConfig) { this(new StaticCredentialsProvider(credentials), encryptionMaterialsProvider, clientConfig, cryptoConfig); }
/** * Constructs a new ArchiveTransferManager, using the specified Amazon * Glacier client and AWS credentials. * * @param glacier * The client for working with Amazon Glacier. * @param credentials * The AWS credentials used to authenticate requests. * @deprecated Use {@link ArchiveTransferManagerBuilder}. */ public ArchiveTransferManager(AmazonGlacierClient glacier, AWSCredentials credentials) { this(glacier, new StaticCredentialsProvider(credentials), new ClientConfiguration()); }
/** * Constructs a new Amazon S3 client using the specified AWS credentials and * client configuration to access Amazon S3. * * @param awsCredentials * The AWS credentials to use when making requests to Amazon S3 * with this client. * @param clientConfiguration * The client configuration options controlling how this client * connects to Amazon S3 (e.g. proxy settings, retry counts, etc). * * @see AmazonS3Client#AmazonS3Client() * @see AmazonS3Client#AmazonS3Client(AWSCredentials) * @deprecated use {@link AmazonS3ClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonS3ClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonS3Client(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { this(new StaticCredentialsProvider(awsCredentials), clientConfiguration); }
@Override public AWSCredentialsProvider getCredentialsProvider(Map<PropertyDescriptor, String> properties) { String accessKey = properties.get(CredentialPropertyDescriptors.ACCESS_KEY); String secretKey = properties.get(CredentialPropertyDescriptors.SECRET_KEY); BasicAWSCredentials creds = new BasicAWSCredentials(accessKey, secretKey); return new StaticCredentialsProvider(creds); }
/** * <p> * Provides the credentials that are used to assume the role. * </p> * @param longLivedCredentials long lived credentials * @return Returns a reference to this object so that method calls can be * chained together. */ public RoleInfo withLongLivedCredentials(AWSCredentials longLivedCredentials) { setLongLivedCredentialsProvider(new StaticCredentialsProvider(longLivedCredentials)); return this; }
public ProfileStaticCredentialsProvider(BasicProfile profile) { this.profile = profile; this.credentialsProvider = new StaticCredentialsProvider(fromStaticCredentials()); }
@Override public AWSCredentialsProvider getCredentialsProvider(Map<PropertyDescriptor, String> properties) { AnonymousAWSCredentials creds = new AnonymousAWSCredentials(); return new StaticCredentialsProvider(creds); }
@Deprecated public Map<String, Profile> getAllProfiles() { Map<String, Profile> legacyProfiles = new HashMap<String, Profile>(); for (Map.Entry<String, BasicProfile> entry : getAllBasicProfiles().entrySet()) { final String profileName = entry.getKey(); legacyProfiles.put(profileName, new Profile(profileName, entry.getValue().getProperties(), new StaticCredentialsProvider( getCredentials(profileName)))); } return legacyProfiles; }
/** * Constructs a new client to invoke service methods on CodePipeline using the specified AWS account credentials and * client configuration options. * * <p> * All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to CodePipeline (ex: proxy settings, * retry counts, etc.). * @deprecated use {@link AWSCodePipelineClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSCodePipelineClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSCodePipelineClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials); this.advancedConfig = AdvancedConfig.EMPTY; init(); }
/** * Constructs a new client to invoke service methods on Auto Scaling using the specified AWS account credentials and * client configuration options. * * <p> * All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to Auto Scaling (ex: proxy settings, * retry counts, etc.). * @deprecated use {@link AmazonAutoScalingClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonAutoScalingClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonAutoScalingClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials); this.advancedConfig = AdvancedConfig.EMPTY; init(); }
/** * Constructs a new client to invoke service methods on Amazon Cognito Identity using the specified AWS account * credentials and client configuration options. * * <p> * All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to Amazon Cognito Identity (ex: * proxy settings, retry counts, etc.). * @deprecated use {@link AmazonCognitoIdentityClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCognitoIdentityClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonCognitoIdentityClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials); this.advancedConfig = AdvancedConfig.EMPTY; init(); }
/** * Constructs a new client to invoke service methods on CloudFront using the specified AWS account credentials and * client configuration options. * * <p> * All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to CloudFront (ex: proxy settings, * retry counts, etc.). * @deprecated use {@link AmazonCloudFrontClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonCloudFrontClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonCloudFrontClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials); this.advancedConfig = AdvancedConfig.EMPTY; init(); }
/** * Constructs a new client to invoke service methods on AWS Device Farm using the specified AWS account credentials * and client configuration options. * * <p> * All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Device Farm (ex: proxy * settings, retry counts, etc.). * @deprecated use {@link AWSDeviceFarmClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSDeviceFarmClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSDeviceFarmClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials); this.advancedConfig = AdvancedConfig.EMPTY; init(); }
/** * Constructs a new client to invoke service methods on Amazon ECS using the specified AWS account credentials and * client configuration options. * * <p> * All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to Amazon ECS (ex: proxy settings, * retry counts, etc.). * @deprecated use {@link AmazonECSClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonECSClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonECSClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials); this.advancedConfig = AdvancedConfig.EMPTY; init(); }
/** * Constructs a new client to invoke service methods on AWS Storage Gateway using the specified AWS account * credentials and client configuration options. * * <p> * All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Storage Gateway (ex: proxy * settings, retry counts, etc.). * @deprecated use {@link AWSStorageGatewayClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSStorageGatewayClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSStorageGatewayClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials); this.advancedConfig = AdvancedConfig.EMPTY; init(); }
/** * Constructs a new client to invoke service methods on Amazon Snowball using the specified AWS account credentials * and client configuration options. * * <p> * All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to Amazon Snowball (ex: proxy * settings, retry counts, etc.). * @deprecated use {@link AmazonSnowballClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonSnowballClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonSnowballClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials); this.advancedConfig = AdvancedConfig.EMPTY; init(); }
public Profile(String profileName, AWSCredentials awsCredentials) { Map<String, String> properties = new LinkedHashMap<String, String>(); properties.put(ProfileKeyConstants.AWS_ACCESS_KEY_ID, awsCredentials.getAWSAccessKeyId()); properties.put(ProfileKeyConstants.AWS_SECRET_ACCESS_KEY, awsCredentials.getAWSSecretKey()); if (awsCredentials instanceof AWSSessionCredentials) { AWSSessionCredentials sessionCred = (AWSSessionCredentials)awsCredentials; properties.put(ProfileKeyConstants.AWS_SESSION_TOKEN, sessionCred.getSessionToken()); } this.profileName = profileName; this.properties = properties; this.awsCredentials = new StaticCredentialsProvider(awsCredentials); }