AutoCloseable
, AwsCredentialsProvider
public class InstanceProfileCredentialsProvider extends Object implements AwsCredentialsProvider, AutoCloseable
Modifier and Type | Class | Description |
---|---|---|
static class |
InstanceProfileCredentialsProvider.Builder |
A builder for creating a custom a
InstanceProfileCredentialsProvider . |
Constructor | Description |
---|---|
InstanceProfileCredentialsProvider() |
Create an
InstanceProfileCredentialsProvider using the default configuration. |
Modifier and Type | Method | Description |
---|---|---|
static InstanceProfileCredentialsProvider.Builder |
builder() |
Create a builder for creating a
InstanceProfileCredentialsProvider . |
void |
close() |
|
AwsCredentials |
getCredentials() |
Returns
AwsCredentials that can be used to authorize an AWS request. |
String |
toString() |
public InstanceProfileCredentialsProvider()
InstanceProfileCredentialsProvider
using the default configuration. See builder()
for
customizing the configuration.public static InstanceProfileCredentialsProvider.Builder builder()
InstanceProfileCredentialsProvider
.public AwsCredentials getCredentials()
AwsCredentialsProvider
AwsCredentials
that can be used to authorize an AWS request. Each implementation of AWSCredentialsProvider
can chose its own strategy for loading credentials. For example, an implementation might load credentials from an existing
key management system, or load new credentials when credentials are rotated.
If an error occurs during the loading of credentials or credentials could not be found, a runtime exception will be raised.
getCredentials
in interface AwsCredentialsProvider
public void close()
close
in interface AutoCloseable
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.