com.amazonaws.services.securitytoken.model

## クラス GetFederationTokenRequest

- java.lang.Object
- - com.amazonaws.AmazonWebServiceRequest
  - - com.amazonaws.services.securitytoken.model.GetFederationTokenRequest

- すべての実装されたインタフェース:
    java.io.Serializable

      public class GetFederationTokenRequest
      extends AmazonWebServiceRequest
      implements java.io.Serializable

  Container for the parameters to the `GetFederationToken operation`.

  Returns a set of temporary security credentials (consisting of an access key ID, a secret access key, and a security token) for a federated user. A typical use is in a proxy application that is getting temporary security credentials on behalf of distributed applications inside a corporate network. Because you must call the `GetFederationToken` action using the long-term security credentials of an IAM user, this call is appropriate in contexts where those credentials can be safely stored, usually in a server-based application.

  Note: Do not use this call in mobile applications or client-based web applications that directly get temporary security credentials. For those types of applications, use `AssumeRoleWithWebIdentity` .

  The `GetFederationToken` action must be called by using the long-term AWS security credentials of the AWS account or an IAM user. Credentials that are created by IAM users are valid for the specified duration, between 900 seconds (15 minutes) and 129600 seconds (36 hours); credentials that are created by using account credentials have a maximum duration of 3600 seconds (1 hour).

  The permissions that are granted to the federated user are the intersection of the policy that is passed with the `GetFederationToken` request and policies that are associated with of the entity making the `GetFederationToken` call.

  For more information about how permissions work, see Controlling Permissions in Temporary Credentials in Using Temporary Security Credentials . For information about using `GetFederationToken` to create temporary security credentials, see Creating Temporary Credentials to Enable Access for Federated Users in Using Temporary Security Credentials .

  関連項目:
    `AWSSecurityTokenService.getFederationToken(GetFederationTokenRequest)`, 直列化された形式

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `GetFederationTokenRequest()` Default constructor for a new GetFederationTokenRequest object.
    `GetFederationTokenRequest(java.lang.String name)` Constructs a new GetFederationTokenRequest object.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `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.
    `java.lang.String` | `getPolicy()` A policy that specifies the permissions that are granted to the federated user.
    `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.
    `void` | `setPolicy(java.lang.String policy)` A policy that specifies the permissions that are granted to the federated user.
    `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.
    `GetFederationTokenRequest` | `withPolicy(java.lang.String policy)` A policy that specifies the permissions that are granted to the federated user.

    - ### クラスから継承されたメソッド com.amazonaws.AmazonWebServiceRequest

      `copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials`

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### 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.
      パラメータ:
        `name` - The name of the federated user. The name is used as an identifier for the temporary security credentials (such as `Bob`). For example, you can reference the federated user name in a resource-based policy, such as in an Amazon S3 bucket policy.

  - ### メソッドの詳細

    - #### getName

          public java.lang.String getName()

      The name of the federated user. The name is used as an identifier for the temporary security credentials (such as `Bob`). For example, you can reference the federated user name in a resource-based policy, such as in an Amazon S3 bucket policy.

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

      戻り値:
        The name of the federated user. The name is used as an identifier for the temporary security credentials (such as `Bob`). For example, you can reference the federated user name in a resource-based policy, such as in an Amazon S3 bucket policy.

    - #### setName

          public void setName(java.lang.String name)

      The name of the federated user. The name is used as an identifier for the temporary security credentials (such as `Bob`). For example, you can reference the federated user name in a resource-based policy, such as in an Amazon S3 bucket policy.

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

      パラメータ:
        `name` - The name of the federated user. The name is used as an identifier for the temporary security credentials (such as `Bob`). For example, you can reference the federated user name in a resource-based policy, such as in an Amazon S3 bucket policy.

    - #### withName

          public GetFederationTokenRequest withName(java.lang.String name)

      The name of the federated user. The name is used as an identifier for the temporary security credentials (such as `Bob`). For example, you can reference the federated user name in a resource-based policy, such as in an Amazon S3 bucket policy.

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

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

      パラメータ:
        `name` - The name of the federated user. The name is used as an identifier for the temporary security credentials (such as `Bob`). For example, you can reference the federated user name in a resource-based policy, such as in an Amazon S3 bucket policy.

    - #### getPolicy

          public java.lang.String getPolicy()

      A policy that specifies the permissions that are granted to the federated user. By default, federated users have no permissions; they do not inherit any from the IAM user. When you specify a policy, the federated user's permissions are intersection of the specified policy and the IAM user's policy. If you don't specify a policy, federated users can only access AWS resources that explicitly allow those federated users in a resource policy, such as in an Amazon S3 bucket policy.

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

      戻り値:
        A policy that specifies the permissions that are granted to the federated user. By default, federated users have no permissions; they do not inherit any from the IAM user. When you specify a policy, the federated user's permissions are intersection of the specified policy and the IAM user's policy. If you don't specify a policy, federated users can only access AWS resources that explicitly allow those federated users in a resource policy, such as in an Amazon S3 bucket policy.

    - #### setPolicy

          public void setPolicy(java.lang.String policy)

      A policy that specifies the permissions that are granted to the federated user. By default, federated users have no permissions; they do not inherit any from the IAM user. When you specify a policy, the federated user's permissions are intersection of the specified policy and the IAM user's policy. If you don't specify a policy, federated users can only access AWS resources that explicitly allow those federated users in a resource policy, such as in an Amazon S3 bucket policy.

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

      パラメータ:
        `policy` - A policy that specifies the permissions that are granted to the federated user. By default, federated users have no permissions; they do not inherit any from the IAM user. When you specify a policy, the federated user's permissions are intersection of the specified policy and the IAM user's policy. If you don't specify a policy, federated users can only access AWS resources that explicitly allow those federated users in a resource policy, such as in an Amazon S3 bucket policy.

    - #### withPolicy

          public GetFederationTokenRequest withPolicy(java.lang.String policy)

      A policy that specifies the permissions that are granted to the federated user. By default, federated users have no permissions; they do not inherit any from the IAM user. When you specify a policy, the federated user's permissions are intersection of the specified policy and the IAM user's policy. If you don't specify a policy, federated users can only access AWS resources that explicitly allow those federated users in a resource policy, such as in an Amazon S3 bucket policy.

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

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

      パラメータ:
        `policy` - A policy that specifies the permissions that are granted to the federated user. By default, federated users have no permissions; they do not inherit any from the IAM user. When you specify a policy, the federated user's permissions are intersection of the specified policy and the IAM user's policy. If you don't specify a policy, federated users can only access AWS resources that explicitly allow those federated users in a resource policy, such as in an Amazon S3 bucket policy.

    - #### getDurationSeconds

          public java.lang.Integer getDurationSeconds()

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

      Constraints:
      Range: 900 - 129600

      戻り値:
        The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 900 seconds (15 minutes) to 129600 seconds (36 hours), with 43200 seconds (12 hours) as the default. Sessions for AWS account owners are restricted to a maximum of 3600 seconds (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 900 seconds (15 minutes) to 129600 seconds (36 hours), with 43200 seconds (12 hours) as the default. Sessions for AWS account owners are restricted to a maximum of 3600 seconds (one hour). If the duration is longer than one hour, the session for AWS account owners defaults to one hour.

      Constraints:
      Range: 900 - 129600

      パラメータ:
        `durationSeconds` - The duration, in seconds, that the session should last. Acceptable durations for federation sessions range from 900 seconds (15 minutes) to 129600 seconds (36 hours), with 43200 seconds (12 hours) as the default. Sessions for AWS account owners are restricted to a maximum of 3600 seconds (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 900 seconds (15 minutes) to 129600 seconds (36 hours), with 43200 seconds (12 hours) as the default. Sessions for AWS account owners are restricted to a maximum of 3600 seconds (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

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

    - #### toString

          public java.lang.String toString()

      Returns a string representation of this object; useful for testing and debugging.
      オーバーライド:
        `toString` クラス内 `java.lang.Object`
      戻り値:
        A string representation of this object.
      関連項目:
        `Object.toString()`

    - #### hashCode

          public int hashCode()

      オーバーライド:
        `hashCode` クラス内 `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      オーバーライド:
        `equals` クラス内 `java.lang.Object`