public final class MetadataUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AVAILABILITY_ZONE_URI
Post-fix URI to fetch availability-zone info.
|
static String |
IAM_SECURITY_CREDENTIALS_URI
Post-fix URI to fetch IAM role details
|
static String |
INSTANCE_METADATA_URI
This IP is only accessible inside AWS and is used to fetch metadata of running EC2 Instance.
|
Modifier and Type | Method and Description |
---|---|
static String |
retrieveMetadataFromURI(String uri,
int timeoutInSeconds)
Performs the HTTP request to retrieve AWS Instance Metadata from the given URI.
|
static String |
retrieveMetadataFromURI(String uri,
int timeoutInSeconds,
int retries)
Performs the HTTP request to retrieve AWS Instance Metadata from the given URI.
|
public static final String INSTANCE_METADATA_URI
public static final String IAM_SECURITY_CREDENTIALS_URI
public static final String AVAILABILITY_ZONE_URI
public static String retrieveMetadataFromURI(String uri, int timeoutInSeconds)
uri
- the full URI where a `GET` request will retrieve the metadata information, represented as JSON.timeoutInSeconds
- timeout for the AWS service callpublic static String retrieveMetadataFromURI(String uri, int timeoutInSeconds, int retries)
uri
- the full URI where a `GET` request will retrieve the metadata information, represented as JSON.timeoutInSeconds
- timeout for the AWS service callretries
- number of retries in case the AWS request failsCopyright © 2020 Hazelcast, Inc.. All rights reserved.