Class AutoDefaultsModeDiscovery
- java.lang.Object
-
- software.amazon.awssdk.awscore.internal.defaultsmode.AutoDefaultsModeDiscovery
-
public class AutoDefaultsModeDiscovery extends Object
This class attempts to discover the appropriateDefaultsModeby inspecting the environment. It falls back to theDefaultsMode.STANDARDmode if the target mode cannot be determined.Implementation notes: this class should've been outside internal package, but we can't fix it due to backwards compatibility reasons.
-
-
Constructor Summary
Constructors Constructor Description AutoDefaultsModeDiscovery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultsModediscover(Region regionResolvedFromSdkClient)Discovers the defaultMode using the following workflow: 1.
-
-
-
Method Detail
-
discover
public DefaultsMode discover(Region regionResolvedFromSdkClient)
Discovers the defaultMode using the following workflow: 1. Check if it's on mobile 2. If it's not on mobile (best we can tell), see if we can determine whether we're an in-region or cross-region client. 3. If we couldn't figure out the region from environment variables. Check IMDSv2. This step might take up to 1 second (default connect timeout) 4. Finally, use fallback mode
-
-