Interface Ec2MetadataClientBuilder<B,T>
- Type Parameters:
B
- the Builder TypeT
- the Ec2MetadataClient Type
- All Superinterfaces:
Buildable
,SdkBuilder<Ec2MetadataClientBuilder<B,
T>, T>
- All Known Subinterfaces:
Ec2MetadataAsyncClient.Builder
,Ec2MetadataClient.Builder
-
Method Summary
Modifier and TypeMethodDescriptionDefine the endpoint of IMDS.endpointMode
(EndpointMode endpointMode) Define the endpoint mode of IMDS.retryPolicy
(Consumer<Ec2MetadataRetryPolicy.Builder> builderConsumer) Define the retry policy which includes the number of retry attempts for any failed request.retryPolicy
(Ec2MetadataRetryPolicy retryPolicy) Define the retry policy which includes the number of retry attempts for any failed request.Define the Time to live (TTL) of the token.Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Method Details
-
retryPolicy
Define the retry policy which includes the number of retry attempts for any failed request.If not specified, defaults to 3 retry attempts and a
BackoffStrategy.defaultStrategy()
backoff strategy} that usesRetryMode.STANDARD
. Can be also specified by using theretryPolicy(Consumer)
method. if any of the retryPolicy methods are called multiple times, only the last invocation will be considered.- Parameters:
retryPolicy
- The retry policy which includes the number of retry attempts for any failed request.- Returns:
- a reference to this builder
-
retryPolicy
Define the retry policy which includes the number of retry attempts for any failed request. Can be used instead ofretryPolicy(Ec2MetadataRetryPolicy)
to use a "fluent consumer" syntax. User should not manually build the builder in the consumer.If not specified, defaults to 3 retry attempts and a
BackoffStrategy.defaultStrategy()
backoff strategy} that usesRetryMode.STANDARD
. Can be also specified by using theretryPolicy(Ec2MetadataRetryPolicy)
method. if any of the retryPolicy methods are called multiple times, only the last invocation will be considered.- Parameters:
builderConsumer
- the consumer- Returns:
- a reference to this builder
-
endpoint
Define the endpoint of IMDS.If not specified, the IMDS client will attempt to automatically resolve the endpoint value based on the logic of
Ec2MetadataEndpointProvider
.- Parameters:
endpoint
- The endpoint of IMDS.- Returns:
- a reference to this builder
-
tokenTtl
Define the Time to live (TTL) of the token. The token represents a logical session. The TTL specifies the length of time that the token is valid and, therefore, the duration of the session. Defaults to 21,600 seconds (6 hours) if not specified.- Parameters:
tokenTtl
- The Time to live (TTL) of the token.- Returns:
- a reference to this builder
-
endpointMode
Define the endpoint mode of IMDS. Supported values include IPv4 and IPv6. Used to determine the endpoint of the IMDS Client only ifendpoint(URI)
is not specified. Only one of both endpoint or endpoint mode but not both. If both are specified in the Builder, aIllegalArgumentException
will be thrown.If not specified, the IMDS client will attempt to automatically resolve the endpoint mode value based on the logic of
Ec2MetadataEndpointProvider
.- Parameters:
endpointMode
- The endpoint mode of IMDS. Supported values include IPv4 and IPv6.- Returns:
- a reference to this builder
-