pub struct Builder { /* private fields */ }
Expand description

IMDSv2 Client Builder

Implementations

Override the number of retries for fetching tokens & metadata

By default, 4 attempts will be made.

Configure generic options of the Client

Examples
use aws_config::imds::Client;
use aws_config::provider_config::ProviderConfig;

let provider = Client::builder()
    .configure(&ProviderConfig::with_default_region().await)
    .build();

Override the endpoint for the Client

By default, the client will resolve an endpoint from the environment, AWS config, and endpoint mode.

See Client for more information.

Override the endpoint mode for Client

  • When set to IpV4, the endpoint will be http://169.254.169.254.
  • When set to IpV6, the endpoint will be http://[fd00:ec2::254].

Override the time-to-live for the session token

Requests to IMDS utilize a session token for authentication. By default, session tokens last for 6 hours. When the TTL for the token expires, a new token must be retrieved from the metadata service.

Override the connect timeout for IMDS

This value defaults to 1 second

Override the read timeout for IMDS

This value defaults to 1 second

Build an IMDSv2 Client

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more