当前位置: 首页>>代码示例>>Java>>正文


Java ProfileKeyConstants类代码示例

本文整理汇总了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);
}
 
开发者ID:IBM,项目名称:ibm-cos-sdk-java,代码行数:16,代码来源:ProfilesConfigFileWriter.java

示例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());
}
 
开发者ID:IBM,项目名称:ibm-cos-sdk-java,代码行数:11,代码来源:AwsProfileRegionProviderTest.java

示例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());
}
 
开发者ID:IBM,项目名称:ibm-cos-sdk-java,代码行数:9,代码来源:AwsProfileRegionProviderTest.java

示例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());
}
 
开发者ID:IBM,项目名称:ibm-cos-sdk-java,代码行数:10,代码来源:AwsProfileRegionProviderTest.java


注:本文中的com.amazonaws.auth.profile.internal.ProfileKeyConstants类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。