Class AutoDefaultsModeDiscovery


  • public class AutoDefaultsModeDiscovery
    extends Object
    This class attempts to discover the appropriate DefaultsMode by inspecting the environment. It falls back to the DefaultsMode.STANDARD mode if the target mode cannot be determined.
    • Constructor Detail

      • AutoDefaultsModeDiscovery

        public AutoDefaultsModeDiscovery()
    • 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