本文整理匯總了Java中com.amazonaws.auth.profile.internal.ProfileKeyConstants類的典型用法代碼示例。如果您正苦於以下問題:Java ProfileKeyConstants類的具體用法?Java ProfileKeyConstants怎麽用?Java ProfileKeyConstants使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ProfileKeyConstants類屬於com.amazonaws.auth.profile.internal包,在下文中一共展示了ProfileKeyConstants類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isSupportedProperty
import com.amazonaws.auth.profile.internal.ProfileKeyConstants; //導入依賴的package包/類
/**
* ProfilesConfigFileWriter still deals with legacy {@link Profile} interface so it can only
* modify credential related properties. All other properties should be preserved when
* modifying profiles.
*/
@Override
protected boolean isSupportedProperty(String propertyName) {
return ProfileKeyConstants.AWS_ACCESS_KEY_ID.equals(propertyName) ||
ProfileKeyConstants.AWS_SECRET_ACCESS_KEY.equals(propertyName) ||
ProfileKeyConstants.AWS_SESSION_TOKEN.equals(propertyName) ||
ProfileKeyConstants.EXTERNAL_ID.equals(propertyName) ||
ProfileKeyConstants.ROLE_ARN.equals(propertyName) ||
ProfileKeyConstants.ROLE_SESSION_NAME.equals(propertyName) ||
ProfileKeyConstants.SOURCE_PROFILE.equals(propertyName);
}
示例2: profilesNonEmptyButGivenProfileNotPresent_ProvidesNullRegion
import com.amazonaws.auth.profile.internal.ProfileKeyConstants; //導入依賴的package包/類
@Test
public void profilesNonEmptyButGivenProfileNotPresent_ProvidesNullRegion() {
final String otherProfileName = "other_profile";
final BasicProfile other_profile = new BasicProfile(otherProfileName, ImmutableMapParameter
.of(ProfileKeyConstants.REGION, "us-east-8"));
final AllProfiles profiles = new AllProfiles(
ImmutableMapParameter.of(otherProfileName, other_profile));
stubLoadProfile(profiles);
assertNull(regionProvider.getRegion());
}
示例3: profilePresentButRegionIsEmpty_ProvidesNullRegion
import com.amazonaws.auth.profile.internal.ProfileKeyConstants; //導入依賴的package包/類
@Test
public void profilePresentButRegionIsEmpty_ProvidesNullRegion() {
final BasicProfile profile = new BasicProfile(PROFILE, ImmutableMapParameter
.of(ProfileKeyConstants.REGION, ""));
final AllProfiles profiles = new AllProfiles(ImmutableMapParameter.of(PROFILE, profile));
stubLoadProfile(profiles);
assertNull(regionProvider.getRegion());
}
示例4: profilePresentAndRegionIsSet_ProvidesCorrectRegion
import com.amazonaws.auth.profile.internal.ProfileKeyConstants; //導入依賴的package包/類
@Test
public void profilePresentAndRegionIsSet_ProvidesCorrectRegion() {
final String expectedRegion = "us-east-8";
final BasicProfile profile = new BasicProfile(PROFILE, ImmutableMapParameter
.of(ProfileKeyConstants.REGION, expectedRegion));
final AllProfiles profiles = new AllProfiles(ImmutableMapParameter.of(PROFILE, profile));
stubLoadProfile(profiles);
assertEquals(expectedRegion, regionProvider.getRegion());
}