本文整理汇总了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());
}