public class Profile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
AWS_ACCESS_KEY_ID
Property name for specifying the Amazon AWS Access Key
|
(package private) static java.lang.String |
AWS_SECRET_ACCESS_KEY
Property name for specifying the Amazon AWS Secret Access Key
|
(package private) static java.lang.String |
AWS_SESSION_TOKEN
Property name for specifying the Amazon AWS Session Token
|
private AWSCredentialsProvider |
awsCredentials
Holds the AWS Credentials for the profile.
|
(package private) static java.lang.String |
EXTERNAL_ID
Property name for specifying the IAM role external id
|
private java.lang.String |
profileName
The name of this profile
|
private java.util.Map<java.lang.String,java.lang.String> |
properties
Profile properties
|
(package private) static java.lang.String |
ROLE_ARN
Property name for specifying the IAM role to assume
|
(package private) static java.lang.String |
ROLE_SESSION_NAME
Property name for specifying the IAM role session name
|
(package private) static java.lang.String |
SOURCE_PROFILE
Property name for specifying the profile credentials to use when assuming a role
|
Modifier | Constructor and Description |
---|---|
|
Profile(java.lang.String profileName,
AWSCredentials awsCredentials) |
private |
Profile(java.lang.String profileName,
java.util.Map<java.lang.String,java.lang.String> properties,
AWSCredentialsProvider awsCredentials) |
|
Profile(java.lang.String profileName,
java.lang.String sourceProfile,
AWSCredentialsProvider awsCredentials,
RoleInfo roleInfo) |
Modifier and Type | Method and Description |
---|---|
(package private) static Profile |
createInvalidProfile(java.lang.String profileName,
java.lang.String invalidReason)
Ideally we should throw an exception when parsing the profile but for backwards compatiblity
we return a dummy profile that will throw an exception if it is used.
|
AWSCredentials |
getCredentials() |
java.lang.String |
getProfileName() |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns a map of profile properties included in this Profile instance.
|
java.lang.String |
getPropertyValue(java.lang.String propertyName)
Returns the value of a specific property that is included in this Profile instance.
|
static final java.lang.String AWS_ACCESS_KEY_ID
static final java.lang.String AWS_SECRET_ACCESS_KEY
static final java.lang.String AWS_SESSION_TOKEN
static final java.lang.String ROLE_ARN
static final java.lang.String ROLE_SESSION_NAME
static final java.lang.String EXTERNAL_ID
static final java.lang.String SOURCE_PROFILE
private final java.lang.String profileName
private final java.util.Map<java.lang.String,java.lang.String> properties
private final AWSCredentialsProvider awsCredentials
public Profile(java.lang.String profileName, AWSCredentials awsCredentials)
public Profile(java.lang.String profileName, java.lang.String sourceProfile, AWSCredentialsProvider awsCredentials, RoleInfo roleInfo)
private Profile(java.lang.String profileName, java.util.Map<java.lang.String,java.lang.String> properties, AWSCredentialsProvider awsCredentials)
static Profile createInvalidProfile(java.lang.String profileName, java.lang.String invalidReason)
profileName
- Name of profileinvalidReason
- Reason why the profile is invalidpublic java.lang.String getProfileName()
public AWSCredentials getCredentials()
public java.util.Map<java.lang.String,java.lang.String> getProperties()
public java.lang.String getPropertyValue(java.lang.String propertyName)
getProperties()