AutoCloseable
, AwsCredentialsProvider
public class ElasticContainerCredentialsProvider extends Object implements AwsCredentialsProvider, AutoCloseable
AwsCredentialsProvider
implementation that loads credentials from the Amazon Elastic Container Service.
The URI path is retrieved from the environment variable "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" in the container's environment. If the environment variable is not set, this credentials provider will always return null.
Modifier and Type | Class | Description |
---|---|---|
static class |
ElasticContainerCredentialsProvider.Builder |
A builder for creating a custom a
ElasticContainerCredentialsProvider . |
Constructor | Description |
---|---|
ElasticContainerCredentialsProvider() |
Create an instance of this provider using the default configuration.
|
Modifier and Type | Method | Description |
---|---|---|
static ElasticContainerCredentialsProvider.Builder |
builder() |
Create a builder for creating a
ElasticContainerCredentialsProvider . |
void |
close() |
|
AwsCredentials |
getCredentials() |
Returns
AwsCredentials that can be used to authorize an AWS request. |
String |
toString() |
public ElasticContainerCredentialsProvider()
builder()
.public static ElasticContainerCredentialsProvider.Builder builder()
ElasticContainerCredentialsProvider
.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.