public final class EC2CredentialsUtils extends Object
Modifier and Type | Method and Description |
---|---|
static EC2CredentialsUtils |
getInstance() |
String |
readResource(URI endpoint)
Connects to the given endpoint to read the resource
and returns the text contents.
|
String |
readResource(URI endpoint,
CredentialsEndpointRetryPolicy retryPolicy,
Map<String,String> headers)
Connects to the given endpoint to read the resource
and returns the text contents.
|
public static EC2CredentialsUtils getInstance()
public String readResource(URI endpoint) throws IOException
endpoint
- The service endpoint to connect to.IOException
- If any problems were encountered while connecting to the
service for the requested resource path.SdkClientException
- If the requested service is not found.public String readResource(URI endpoint, CredentialsEndpointRetryPolicy retryPolicy, Map<String,String> headers) throws IOException
endpoint
- The service endpoint to connect to.retryPolicy
- The custom retry policy that determines whether a
failed request should be retried or not.IOException
- If any problems were encountered while connecting to the
service for the requested resource path.SdkClientException
- If the requested service is not found.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.