Struct aws_config::provider_config::ProviderConfig [−][src]
pub struct ProviderConfig { /* fields omitted */ }
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();
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 timeout machinery.
Consider with_tcp_connector
.
Stability
This method is expected to change to support HTTP configuration
Override the TCP connector for this configuration
Stability
This method is may to change to support HTTP configuration.
Override the sleep implementation for this configuration
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ProviderConfig
impl Send for ProviderConfig
impl Sync for ProviderConfig
impl Unpin for ProviderConfig
impl !UnwindSafe for ProviderConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
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