Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.securitytoken.model
Class GetFederationTokenRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.securitytoken.model.GetFederationTokenRequest
All Implemented Interfaces:
java.io.Serializable

public class GetFederationTokenRequest
extends AmazonWebServiceRequest
implements java.io.Serializable

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 15 minutes and 36 hours; credentials created using account credentials have a maximum duration of 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 IAM . For information about using GetFederationToken to create temporary credentials, see Creating Temporary Credentials to Enable Access for Federated Users in Using IAM .

See Also:
AWSSecurityTokenService.getFederationToken(GetFederationTokenRequest), Serialized Form

Constructor Summary
GetFederationTokenRequest()
          Default constructor for a new GetFederationTokenRequest object.
GetFederationTokenRequest(java.lang.String name)
          Constructs a new GetFederationTokenRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Integer getDurationSeconds()
          The duration, in seconds, that the session should last.
 java.lang.String getName()
          The name of the federated user associated with the credentials.
 java.lang.String getPolicy()
          A policy specifying the permissions to associate with the credentials.
 int hashCode()
           
 void setDurationSeconds(java.lang.Integer durationSeconds)
          The duration, in seconds, that the session should last.
 void setName(java.lang.String name)
          The name of the federated user associated with the credentials.
 void setPolicy(java.lang.String policy)
          A policy specifying the permissions to associate with the credentials.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 GetFederationTokenRequest withDurationSeconds(java.lang.Integer durationSeconds)
          The duration, in seconds, that the session should last.
 GetFederationTokenRequest withName(java.lang.String name)
          The name of the federated user associated with the credentials.
 GetFederationTokenRequest withPolicy(java.lang.String policy)
          A policy specifying the permissions to associate with the credentials.
 
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

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(java.lang.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 IAM.
Method Detail

getName

public java.lang.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 IAM.

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 IAM.

setName

public void setName(java.lang.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 IAM.

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 IAM.

withName

public GetFederationTokenRequest withName(java.lang.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 IAM.

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 IAM.
Returns:
A reference to this updated object so that method calls can be chained together.

getPolicy

public java.lang.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 IAM.

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 IAM.

setPolicy

public void setPolicy(java.lang.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 IAM.

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 IAM.

withPolicy

public GetFederationTokenRequest withPolicy(java.lang.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 IAM.

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 IAM.
Returns:
A reference to this updated object so that method calls can be chained together.

getDurationSeconds

public java.lang.Integer getDurationSeconds()
The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 900s (15 minutes) to 129600s (36 hours), with 43200s (12 hours) as the default. Sessions for AWS account owners are restricted to a maximum of 3600s (one hour). If the duration is longer than one hour, the session for AWS account owners defaults to one hour.

Constraints:
Range: 900 - 129600

Returns:
The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 900s (15 minutes) to 129600s (36 hours), with 43200s (12 hours) as the default. Sessions for AWS account owners are restricted to a maximum of 3600s (one hour). If the duration is longer than one hour, the session for AWS account owners defaults to one hour.

setDurationSeconds

public void setDurationSeconds(java.lang.Integer durationSeconds)
The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 900s (15 minutes) to 129600s (36 hours), with 43200s (12 hours) as the default. Sessions for AWS account owners are restricted to a maximum of 3600s (one hour). If the duration is longer than one hour, the session for AWS account owners defaults to one hour.

Constraints:
Range: 900 - 129600

Parameters:
durationSeconds - The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 900s (15 minutes) to 129600s (36 hours), with 43200s (12 hours) as the default. Sessions for AWS account owners are restricted to a maximum of 3600s (one hour). If the duration is longer than one hour, the session for AWS account owners defaults to one hour.

withDurationSeconds

public GetFederationTokenRequest withDurationSeconds(java.lang.Integer durationSeconds)
The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 900s (15 minutes) to 129600s (36 hours), with 43200s (12 hours) as the default. Sessions for AWS account owners are restricted to a maximum of 3600s (one hour). If the duration is longer than one hour, the session for AWS account owners defaults to one hour.

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

Constraints:
Range: 900 - 129600

Parameters:
durationSeconds - The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 900s (15 minutes) to 129600s (36 hours), with 43200s (12 hours) as the default. Sessions for AWS account owners are restricted to a maximum of 3600s (one hour). If the duration is longer than one hour, the session for AWS account owners defaults to one hour.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

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

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


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