public final class Ec2MetadataEndpointProvider extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Ec2MetadataEndpointProvider.Builder |
| Modifier and Type | Method and Description |
|---|---|
static Ec2MetadataEndpointProvider.Builder |
builder() |
static Ec2MetadataEndpointProvider |
instance() |
String |
resolveEndpoint(EndpointMode endpointMode)
Resolve the endpoint to be used for the
DefaultEc2MetadataClient client. |
EndpointMode |
resolveEndpointMode() |
Optional<Profile> |
resolveProfile() |
public static Ec2MetadataEndpointProvider instance()
public String resolveEndpoint(EndpointMode endpointMode)
DefaultEc2MetadataClient client. Users may manually provide an endpoint
through the AWS_EC2_METADATA_SERVICE_ENDPOINT environment variable or the ec2_metadata_service_endpoint
key in their aws config file.
If an endpoint is specified is this manner, use it. If no values are provided, the defaults to:
"http://169.254.169.254""http://[fd00:ec2::254]"endpointMode - Used only if an endpoint value is not specified. If so, this method will use the endpointMode to
choose the default value to return.public EndpointMode resolveEndpointMode()
public static Ec2MetadataEndpointProvider.Builder builder()
Copyright © 2023. All rights reserved.