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

Configuration options for Credential Providers

Most credential providers builders offer a configure method which applies general provider configuration options.

To use a region from the default region provider chain use ProviderConfig::with_default_region. Otherwise, use ProviderConfig::without_region. Note that some credentials providers require a region to be explicitly set.

Implementations

Create a default provider config with the region unset.

Using this option means that you may need to set a region manually.

This constructor will use a default value for the HTTPS connector and Sleep implementation when they are enabled as crate features which is usually the correct option. To construct a ProviderConfig without these fields set, use ProviderConfig::empty.

Examples
use aws_config::provider_config::ProviderConfig;
use aws_sdk_sts::Region;
use aws_config::web_identity_token::WebIdentityTokenCredentialsProvider;
let conf = ProviderConfig::without_region().with_region(Some(Region::new("us-east-1")));

let credential_provider = WebIdentityTokenCredentialsProvider::builder().configure(&conf).build();

Constructs a ProviderConfig with no fields set

Create a default provider config with the region region automatically loaded from the default chain.

Examples
use aws_config::provider_config::ProviderConfig;
use aws_sdk_sts::Region;
use aws_config::web_identity_token::WebIdentityTokenCredentialsProvider;
let conf = ProviderConfig::with_default_region().await;
let credential_provider = WebIdentityTokenCredentialsProvider::builder().configure(&conf).build();
}

Override the region for the configuration

Use the default region chain to set the region for this configuration

Note: the env and fs already set on this provider will be used when loading the default region.

Override the HTTPS connector for this configuration

Warning: Use of this method will prevent you from taking advantage of the HTTP connect timeouts. Consider ProviderConfig::with_tcp_connector.

Stability

This method is expected to change to support HTTP configuration.

Override the TCP connector for this configuration

This connector MUST provide an HTTPS encrypted connection.

Stability

This method may change to support HTTP configuration.

Override the sleep implementation for this configuration

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

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