com.amazonaws.services.securitytoken.model
Class GetFederationTokenRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.securitytoken.model.GetFederationTokenRequest

public class GetFederationTokenRequest
extends AmazonWebServiceRequest

Container for the parameters to the GetFederationToken operation.

The GetFederationToken action returns a set of temporary credentials for a federated user with the user name and policy specified in the request. The credentials consist of an Access Key ID, a Secret Access Key, and a security token. Credentials created by IAM users are valid for the specified duration, between one and 36 hours; credentials created using account credentials last one hour.

The federated user who holds these credentials has any permissions allowed by the intersection of the specified policy and any resource or user policies that apply to the caller of the GetFederationToken API, and any resource policies that apply to the federated user's Amazon Resource Name (ARN). For more information about how token permissions work, see Controlling Permissions in Temporary Credentials in Using AWS Identity and Access Management . For information about using GetFederationToken to create temporary credentials, see Creating Temporary Credentials to Enable Access for Federated Users in Using AWS Identity and Access Management .

See Also:
AWSSecurityTokenService.getFederationToken(GetFederationTokenRequest)

Constructor Summary
GetFederationTokenRequest()
          Default constructor for a new GetFederationTokenRequest object.
GetFederationTokenRequest(String name)
          Constructs a new GetFederationTokenRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 Integer getDurationSeconds()
          The duration, in seconds, that the session should last.
 String getName()
          The name of the federated user associated with the credentials.
 String getPolicy()
          A policy specifying the permissions to associate with the credentials.
 int hashCode()
           
 void setDurationSeconds(Integer durationSeconds)
          The duration, in seconds, that the session should last.
 void setName(String name)
          The name of the federated user associated with the credentials.
 void setPolicy(String policy)
          A policy specifying the permissions to associate with the credentials.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 GetFederationTokenRequest withDurationSeconds(Integer durationSeconds)
          The duration, in seconds, that the session should last.
 GetFederationTokenRequest withName(String name)
          The name of the federated user associated with the credentials.
 GetFederationTokenRequest withPolicy(String policy)
          A policy specifying the permissions to associate with the credentials.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GetFederationTokenRequest

public GetFederationTokenRequest()
Default constructor for a new GetFederationTokenRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


GetFederationTokenRequest

public GetFederationTokenRequest(String name)
Constructs a new GetFederationTokenRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
name - The name of the federated user associated with the credentials. For information about limitations on user names, go to Limitations on IAM Entities in Using AWS Identity and Access Management.
Method Detail

getName

public String getName()
The name of the federated user associated with the credentials. For information about limitations on user names, go to Limitations on IAM Entities in Using AWS Identity and Access Management.

Constraints:
Length: 2 - 32
Pattern: [\w+=,.@-]*

Returns:
The name of the federated user associated with the credentials. For information about limitations on user names, go to Limitations on IAM Entities in Using AWS Identity and Access Management.

setName

public void setName(String name)
The name of the federated user associated with the credentials. For information about limitations on user names, go to Limitations on IAM Entities in Using AWS Identity and Access Management.

Constraints:
Length: 2 - 32
Pattern: [\w+=,.@-]*

Parameters:
name - The name of the federated user associated with the credentials. For information about limitations on user names, go to Limitations on IAM Entities in Using AWS Identity and Access Management.

withName

public GetFederationTokenRequest withName(String name)
The name of the federated user associated with the credentials. For information about limitations on user names, go to Limitations on IAM Entities in Using AWS Identity and Access Management.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 2 - 32
Pattern: [\w+=,.@-]*

Parameters:
name - The name of the federated user associated with the credentials. For information about limitations on user names, go to Limitations on IAM Entities in Using AWS Identity and Access Management.
Returns:
A reference to this updated object so that method calls can be chained together.

getPolicy

public String getPolicy()
A policy specifying the permissions to associate with the credentials. The caller can delegate their own permissions by specifying a policy, and both policies will be checked when a service call is made. For more information about how permissions work in the context of temporary credentials, see Controlling Permissions in Temporary Credentials in Using AWS Identity and Access Management.

Constraints:
Length: 1 - 2048
Pattern: [ -ÿ]+

Returns:
A policy specifying the permissions to associate with the credentials. The caller can delegate their own permissions by specifying a policy, and both policies will be checked when a service call is made. For more information about how permissions work in the context of temporary credentials, see Controlling Permissions in Temporary Credentials in Using AWS Identity and Access Management.

setPolicy

public void setPolicy(String policy)
A policy specifying the permissions to associate with the credentials. The caller can delegate their own permissions by specifying a policy, and both policies will be checked when a service call is made. For more information about how permissions work in the context of temporary credentials, see Controlling Permissions in Temporary Credentials in Using AWS Identity and Access Management.

Constraints:
Length: 1 - 2048
Pattern: [ -ÿ]+

Parameters:
policy - A policy specifying the permissions to associate with the credentials. The caller can delegate their own permissions by specifying a policy, and both policies will be checked when a service call is made. For more information about how permissions work in the context of temporary credentials, see Controlling Permissions in Temporary Credentials in Using AWS Identity and Access Management.

withPolicy

public GetFederationTokenRequest withPolicy(String policy)
A policy specifying the permissions to associate with the credentials. The caller can delegate their own permissions by specifying a policy, and both policies will be checked when a service call is made. For more information about how permissions work in the context of temporary credentials, see Controlling Permissions in Temporary Credentials in Using AWS Identity and Access Management.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 2048
Pattern: [ -ÿ]+

Parameters:
policy - A policy specifying the permissions to associate with the credentials. The caller can delegate their own permissions by specifying a policy, and both policies will be checked when a service call is made. For more information about how permissions work in the context of temporary credentials, see Controlling Permissions in Temporary Credentials in Using AWS Identity and Access Management.
Returns:
A reference to this updated object so that method calls can be chained together.

getDurationSeconds

public Integer getDurationSeconds()
The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 3600s (one hour) to 129600s (36 hours), with 43200s (12 hours) as the default.

Constraints:
Range: 3600 - 129600

Returns:
The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 3600s (one hour) to 129600s (36 hours), with 43200s (12 hours) as the default.

setDurationSeconds

public void setDurationSeconds(Integer durationSeconds)
The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 3600s (one hour) to 129600s (36 hours), with 43200s (12 hours) as the default.

Constraints:
Range: 3600 - 129600

Parameters:
durationSeconds - The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 3600s (one hour) to 129600s (36 hours), with 43200s (12 hours) as the default.

withDurationSeconds

public GetFederationTokenRequest withDurationSeconds(Integer durationSeconds)
The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 3600s (one hour) to 129600s (36 hours), with 43200s (12 hours) as the default.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 3600 - 129600

Parameters:
durationSeconds - The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 3600s (one hour) to 129600s (36 hours), with 43200s (12 hours) as the default.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.