Amazon AWS SDK User's Guide Page 16

  • Download
  • Add to my manuals
  • Print
  • Page
    / 76
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 15
Specifying a Credential Provider or Provider Chain
If you want to specify a different credential provider than the default credential provider chain, you can
specify it in the client constructor.
To specify a specific credentials provider
Provide an instance of a credentials provider or provider chain to a service client constructor that takes
an AWSCredentialsProvider interface as input. For example, to use environment credentials specifically:
AmazonS3 s3Client = new AmazonS3Client(new EnvironmentVariableCredentialsPro
vider());
For the full list of SDK for Java-supplied credential providers and provider chains, see the list of "All known
implementing classes" in the reference topic for AWSCredentialsProvider.
Tip
You can use this technique to supply credential providers or provider chains that you create, by
implementing your own credential provider that implements the AWSCredentialsProvider
interface, or by sub-classing the AWSCredentialsProviderChain class.
Explicitly Specifying Credentials
If neither the default credential chain or a specific or custom provider or provider chain works for your
code, you can set credentials explicitly by supplying them yourself. If you have retrieved temporary
credentials using AWS STS, use this method to specify the credentials for AWS access.
To explicitly supply credentials to an AWS client:
Instantiate a class that provides the AWSCredentials interface, such as BasicAWSCredentials, supplying
it with the AWS access key and secret key you will use for the connection.
Provide the class instance to a service client constructor that takes an AWSCredentials interface as input.
For example:
BasicAWSCredentials awsCreds = new BasicAWSCredentials(access_key_id,
secret_access_key)
AmazonS3 s3Client = new AmazonS3Client(awsCreds);
When using temporary credentials obtained from AWS STS (p.61), create a BasicSessionCredentials
object, passing it the STS-supplied credentials and session token:
BasicSessionCredentials basic_session_creds = new BasicSessionCredentials(
session_creds.getAccessKeyId(),
session_creds.getSecretAccessKey(),
session_creds.getSessionToken());
AmazonS3Client s3 = new AmazonS3Client(basic_session_creds);
Version v1.0.0
12
AWS SDK for Java Developer Guide
Specifying a Credential Provider or Provider Chain
Page view 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 75 76

Comments to this Manuals

No comments

Indesit K3G51S(W)/HU S manuels

Manuels d'utilisation et guides de l'utilisateur pour Micro-ondes Indesit K3G51S(W)/HU S.
Nous fournissons des manuels en pdf 1 Indesit K3G51S(W)/HU S à télécharger gratuitement par type de document : Mode d'emploi






Plus de produits et de manuels pour Micro-ondes Indesit

Modèles Type de document
FN 56 XA S Mode d'emploi       Indesit FN 56 XA S Instruction for Use, 60 pages
FIM 832J K.A IX (PL) Mode d'emploi       Indesit FIM 832J K.A IX (PL) Instruction for Use [es] , 84 pages
FK 63 X/HA S Mode d'emploi      Indesit FK 63 X/HA S Instruction for Use, 52 pages
7OFHR 640 (AN)RU/HA Mode d'emploi    Indesit 7OFHR 640 (AN)RU/HA Instruction for Use [de] [fr] , 20 pages
FH 51 (WH)/HA S Mode d'emploi        Indesit FH 51 (WH)/HA S Instruction for Use [et] [nl] , 52 pages
IF 88 K GP.A IX S Mode d'emploi        Indesit IF 88 K GP.A IX S Instruction for Use [es] , 64 pages
7OIF 617 K.A IX RU Mode d'emploi   Indesit 7OIF 617 K.A IX RU Instruction for Use, 20 pages
FHR 540 (AN)/HA S Mode d'emploi       Indesit FHR 540 (AN)/HA S Instruction for Use [nl] , 56 pages
CP87SG1 /HA Mode d'emploi       Indesit CP87SG1 /HA Instruction for Use, 64 pages
UT 89 S P X/HA Mode d'emploi       Indesit UT 89 S P X/HA Instruction for Use, 56 pages
EHS 53 KX/HA Mode d'emploi    Indesit EHS 53 KX/HA Instruction for Use [fr] , 20 pages
I5G62AG(W)/UA Mode d'emploi    Indesit I5G62AG(W)/UA Instruction for Use [ua] , 24 pages
FIMS 20 K.A AX S Mode d'emploi        Indesit FIMS 20 K.A AX S Instruction for Use, 60 pages
FIMS 20 K.A AX S Mode d'emploi        Indesit FIMS 20 K.A AX S Instruction for Use, 60 pages
FHS 21 IX/HA S Mode d'emploi         Indesit FHS 21 IX/HA S Instruction for Use, 68 pages
KN6G660SA(W)/U S Mode d'emploi     Indesit KN6G66SA(X)/U S Instruction for Use, 64 pages
I6VV2A(X)/EX Mode d'emploi      Indesit I6VV2A(X)/EX Instruction for Use [de] , 58 pages
BIG 73 J KC.A IX GB Mode d'emploi   Indesit BIG 73 J KC.A IX GB Instruction for Use [fr] , 16 pages
FIE 76 KC.A IX GB Mode d'emploi   Indesit FIE 76 KC.A IX GB Instruction for Use [da] [it] , 12 pages
XF 995.3 /HA Mode d'emploi       Indesit XF 995.3 /HA Instruction for Use [fr] , 52 pages