EC2MetadataUtils@Deprecated public class EC2MetadataClient extends Object
| Modifier and Type | Field | Description |
|---|---|---|
static String |
SECURITY_CREDENTIALS_RESOURCE |
Deprecated.
Default resource path for credentials in the Amazon EC2 Instance Metadata Service.
|
| Constructor | Description |
|---|---|
EC2MetadataClient() |
Deprecated.
|
| Modifier and Type | Method | Description |
|---|---|---|
String |
getDefaultCredentials() |
Deprecated.
Connects to the Amazon EC2 Instance Metadata Service to retrieve the
default credential information (if any).
|
String |
readResource(String resourcePath) |
Deprecated.
Connects to the metadata service to read the specified resource and
returns the text contents.
|
public static final String SECURITY_CREDENTIALS_RESOURCE
public String getDefaultCredentials() throws IOException
IOException - If any problems are encountered while connecting to the
Amazon EC2 Instance Metadata Service.public String readResource(String resourcePath) throws IOException, SdkClientException
resourcePath - The resourceIOException - If any problems were encountered while connecting to metadata
service for the requested resource path.SdkClientException - If the requested metadata service is not found.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.