當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。