Class Ec2MetadataEndpointProvider
java.lang.Object
software.amazon.awssdk.imds.internal.Ec2MetadataEndpointProvider
Endpoint Provider Class which contains methods for endpoint resolution.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static Ec2MetadataEndpointProviderinstance()resolveEndpoint(EndpointMode endpointMode) Resolve the endpoint to be used for theDefaultEc2MetadataClientclient.
-
Method Details
-
instance
-
resolveEndpoint
Resolve the endpoint to be used for theDefaultEc2MetadataClientclient. Users may manually provide an endpoint through theAWS_EC2_METADATA_SERVICE_ENDPOINTenvironment variable or theec2_metadata_service_endpointkey in their aws config file. If an endpoint is specified is this manner, use it. If no values are provided, the defaults to:- If endpoint mode is set to IPv4:
"http://169.254.169.254" - If endpoint mode is set to IPv6:
"http://[fd00:ec2::254]"
- Parameters:
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.- Returns:
- the String representing the endpoint to be used,
- If endpoint mode is set to IPv4:
-
resolveEndpointMode
-
resolveProfile
-
builder
-