public static interface Ec2MetadataClient.Builder extends Ec2MetadataClientBuilder<Ec2MetadataClient.Builder,Ec2MetadataClient>
Ec2MetadataClient.| Modifier and Type | Method and Description |
|---|---|
Ec2MetadataClient.Builder |
httpClient(SdkHttpClient.Builder<?> builder)
A http client builder used to retrieve an instance of an
SdkHttpClient. |
Ec2MetadataClient.Builder |
httpClient(SdkHttpClient httpClient)
Define the http client used by the Ec2 Metadata client.
|
endpoint, endpointMode, retryPolicy, retryPolicy, tokenTtlapplyMutation, buildEc2MetadataClient.Builder httpClient(SdkHttpClient httpClient)
SdkAutoCloseable.close()
method on it.
If not specified, the IMDS client will look for a SdkHttpClient class included in the classpath of the
application and create a new instance of that class, managed by the IMDS Client, that will be closed when the IMDS
Client is closed. If no such class can be found, will throw a SdkClientException.
httpClient - the http clientEc2MetadataClient.Builder httpClient(SdkHttpClient.Builder<?> builder)
SdkHttpClient. If specified, the Ec2 Metadata Client
will use the instance returned by the builder and manage its lifetime by closing the http client once the Ec2 Client
itself is closed.builder - the builder to used to retrieve an instance.Copyright © 2023. All rights reserved.