Beispiel #1
0
        public ProfileCSMConfigs(ICredentialProfileSource source, CSMFallbackConfigChain cSMFallbackConfigChain)
        {
            ProfileName = FallbackCredentialsFactory.GetProfileName();
            CredentialProfile profile;

            if (!source.TryGetProfile(ProfileName, out profile))
            {
                return;
            }
            Setup(cSMFallbackConfigChain, profile.Properties);
        }
Beispiel #2
0
        /// <summary>
        /// Attempts to construct an instance of <see cref="ProfileInternalConfiguration"/>.
        /// If the AWS_PROFILE environment variable is set the instance will be constructed using that profile,
        /// otherwise it will use the default profile.
        ///
        /// If the profile doesn't exist status will be logged and no value will be set in the configuration.
        /// </summary>
        /// <param name="source">The ICredentialProfileSource to read the profile from.</param>
        public ProfileInternalConfiguration(ICredentialProfileSource source)
        {
            var profileName = FallbackCredentialsFactory.GetProfileName();

            Setup(source, profileName);
        }