|
Did this page help you?Yes No Tell us about it... |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.securitytoken.model.AssumeRoleRequest
public class AssumeRoleRequest
Container for the parameters to the AssumeRole operation
.
The AssumeRole
action returns a set of temporary security credentials that you can use to access resources that are defined in the
role's policy. The returned credentials consist of an Access Key ID, a Secret Access Key, and a security token.
Important: Only IAM users can assume a role. If you use AWS account credentials to call AssumeRole, access is denied.
The credentials are valid for the duration that you specified when calling AssumeRole
, which can be from 15 minutes to 1 hour.
When you assume a role, you have the privileges that are defined in the role. You can further restrict the privileges by passing a policy when
calling AssumeRole
.
To assume a role, you must be an IAM user from a trusted entity and have permission to call AssumeRole
.
Trusted entites are defined when the IAM role is created. Permission to call AssumeRole
is defined in your or your group's IAM
policy.
AWSSecurityTokenService.assumeRole(AssumeRoleRequest)
Constructor Summary | |
---|---|
AssumeRoleRequest()
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Integer |
getDurationSeconds()
The duration, in seconds, of the role session. |
java.lang.String |
getExternalId()
A unique identifier that is generated by a third party for each of their customers. |
java.lang.String |
getPolicy()
A supplemental policy that can be associated with the temporary security credentials. |
java.lang.String |
getRoleArn()
The Amazon Resource Name (ARN) of the role that the caller is assuming. |
java.lang.String |
getRoleSessionName()
An identifier for the assumed role session. |
int |
hashCode()
|
void |
setDurationSeconds(java.lang.Integer durationSeconds)
The duration, in seconds, of the role session. |
void |
setExternalId(java.lang.String externalId)
A unique identifier that is generated by a third party for each of their customers. |
void |
setPolicy(java.lang.String policy)
A supplemental policy that can be associated with the temporary security credentials. |
void |
setRoleArn(java.lang.String roleArn)
The Amazon Resource Name (ARN) of the role that the caller is assuming. |
void |
setRoleSessionName(java.lang.String roleSessionName)
An identifier for the assumed role session. |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
AssumeRoleRequest |
withDurationSeconds(java.lang.Integer durationSeconds)
The duration, in seconds, of the role session. |
AssumeRoleRequest |
withExternalId(java.lang.String externalId)
A unique identifier that is generated by a third party for each of their customers. |
AssumeRoleRequest |
withPolicy(java.lang.String policy)
A supplemental policy that can be associated with the temporary security credentials. |
AssumeRoleRequest |
withRoleArn(java.lang.String roleArn)
The Amazon Resource Name (ARN) of the role that the caller is assuming. |
AssumeRoleRequest |
withRoleSessionName(java.lang.String roleSessionName)
An identifier for the assumed role session. |
Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
---|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AssumeRoleRequest()
Method Detail |
---|
public java.lang.String getRoleArn()
Constraints:
Length: 20 - 2048
public void setRoleArn(java.lang.String roleArn)
Constraints:
Length: 20 - 2048
roleArn
- The Amazon Resource Name (ARN) of the role that the caller is
assuming.public AssumeRoleRequest withRoleArn(java.lang.String roleArn)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 20 - 2048
roleArn
- The Amazon Resource Name (ARN) of the role that the caller is
assuming.
public java.lang.String getRoleSessionName()
AssumedRoleUser
.
Constraints:
Length: 2 - 32
Pattern: [\w+=,.@-]*
AssumedRoleUser
.public void setRoleSessionName(java.lang.String roleSessionName)
AssumedRoleUser
.
Constraints:
Length: 2 - 32
Pattern: [\w+=,.@-]*
roleSessionName
- An identifier for the assumed role session. The session name is
included as part of the AssumedRoleUser
.public AssumeRoleRequest withRoleSessionName(java.lang.String roleSessionName)
AssumedRoleUser
.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 2 - 32
Pattern: [\w+=,.@-]*
roleSessionName
- An identifier for the assumed role session. The session name is
included as part of the AssumedRoleUser
.
public java.lang.String getPolicy()
Constraints:
Length: 1 - 2048
Pattern: [
-?]+
public void setPolicy(java.lang.String policy)
Constraints:
Length: 1 - 2048
Pattern: [
-?]+
policy
- A supplemental policy that can be associated with the temporary
security credentials. The caller can restrict the permissions that are
available on the role's temporary security credentials to maintain the
least amount of privileges. When a service call is made with the
temporary security credentials, both the role's permission policy and
supplemental policy are checked. For more information about how
permissions work in the context of temporary credentials, see Controlling Permissions in Temporary Credentials.public AssumeRoleRequest withPolicy(java.lang.String policy)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 2048
Pattern: [
-?]+
policy
- A supplemental policy that can be associated with the temporary
security credentials. The caller can restrict the permissions that are
available on the role's temporary security credentials to maintain the
least amount of privileges. When a service call is made with the
temporary security credentials, both the role's permission policy and
supplemental policy are checked. For more information about how
permissions work in the context of temporary credentials, see Controlling Permissions in Temporary Credentials.
public java.lang.Integer getDurationSeconds()
Constraints:
Range: 900 - 3600
public void setDurationSeconds(java.lang.Integer durationSeconds)
Constraints:
Range: 900 - 3600
durationSeconds
- The duration, in seconds, of the role session. The value can range
from 900 seconds (15 minutes) to 3600 seconds (1 hour). By default,
the value is set to 3600 seconds (1 hour).public AssumeRoleRequest withDurationSeconds(java.lang.Integer durationSeconds)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 900 - 3600
durationSeconds
- The duration, in seconds, of the role session. The value can range
from 900 seconds (15 minutes) to 3600 seconds (1 hour). By default,
the value is set to 3600 seconds (1 hour).
public java.lang.String getExternalId()
Constraints:
Length: 2 - 96
Pattern: [\w+=,.@:-]*
public void setExternalId(java.lang.String externalId)
Constraints:
Length: 2 - 96
Pattern: [\w+=,.@:-]*
externalId
- A unique identifier that is generated by a third party for each of
their customers. For each role that the third party can assume, they
should instruct their customers to create a role with the external ID
that was generated by the third party. Each time the third party
assumes the role, they must pass the customer's correct external ID.
The external ID is useful in order to help third parties bind a role
to the customer who created it. For more information about the
external ID, see About the External ID in Using Temporary
Security Credentials.public AssumeRoleRequest withExternalId(java.lang.String externalId)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 2 - 96
Pattern: [\w+=,.@:-]*
externalId
- A unique identifier that is generated by a third party for each of
their customers. For each role that the third party can assume, they
should instruct their customers to create a role with the external ID
that was generated by the third party. Each time the third party
assumes the role, they must pass the customer's correct external ID.
The external ID is useful in order to help third parties bind a role
to the customer who created it. For more information about the
external ID, see About the External ID in Using Temporary
Security Credentials.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |