Unverified Commit 374a0a25 authored by Kevin Park's avatar Kevin Park Committed by GitHub
Browse files

Ability to override the IMDS client in `DefaultCredentialsChain` (#1867)

parent ab703195
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -180,3 +180,9 @@ message = "Enable local maven repo dependency override."
references = ["smithy-rs#1852"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "ogudavid"

[[aws-sdk-rust]]
message = "Ability to override the IMDS client in `DefaultCredentialsChain`"
references = ["aws-sdk-rust#625"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "kevinpark1217"
+8 −0
Original line number Diff line number Diff line
@@ -212,6 +212,14 @@ impl Builder {
        self
    }

    /// Override the IMDS client used for this provider
    ///
    /// When unset, the default IMDS client will be used.
    pub fn imds_client(mut self, client: crate::imds::Client) -> Self {
        self.imds_builder = self.imds_builder.imds_client(client);
        self
    }

    /// Override the configuration used for this provider
    pub fn configure(mut self, config: ProviderConfig) -> Self {
        self.region_chain = self.region_chain.configure(&config);