AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

GetFederationTokenInput

import "github.com/aws/aws-sdk-go/service/sts"

type GetFederationTokenInput struct { DurationSeconds *int64 `min:"900" type:"integer"` Name *string `min:"2" type:"string" required:"true"` Policy *string `min:"1" type:"string"` }

DurationSeconds

Type: *int64

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 obtained using AWS account (root) credentials are restricted to a maximum of 3600 seconds (one hour). If the specified duration is longer than one hour, the session obtained by using AWS account (root) credentials defaults to one hour.

Name

Type: *string

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.

The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-

Name is a required field

Policy

Type: *string

An IAM policy in JSON format that is passed with the GetFederationToken call and evaluated along with the policy or policies that are attached to the IAM user whose credentials are used to call GetFederationToken. The passed policy is used to scope down the permissions that are available to the IAM user, by allowing only a subset of the permissions that are granted to the IAM user. The passed policy cannot grant more permissions than those granted to the IAM user. The final permissions for the federated user are the most restrictive set based on the intersection of the passed policy and the IAM user policy.

If you do not pass a policy, the resulting temporary security credentials have no effective permissions. The only exception is when the temporary security credentials are used to access a resource that has a resource-based policy that specifically allows the federated user to access the resource.

The format for this parameter, as described by its regex pattern, is a string of characters up to 2048 characters in length. The characters can be any ASCII character from the space character to the end of the valid character list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage return (\u000D) characters.

The policy plain text must be 2048 bytes or shorter. However, an internal conversion compresses it into a packed binary format with a separate limit. The PackedPolicySize response element indicates by percentage how close to the upper size limit the policy is, with 100% equaling the maximum allowed size.

For more information about how permissions work, see Permissions for GetFederationToken (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getfederationtoken.html).

Method

GoString

func (s GetFederationTokenInput) GoString() string

GoString returns the string representation

SetDurationSeconds

func (s *GetFederationTokenInput) SetDurationSeconds(v int64) *GetFederationTokenInput

SetDurationSeconds sets the DurationSeconds field's value.

SetName

func (s *GetFederationTokenInput) SetName(v string) *GetFederationTokenInput

SetName sets the Name field's value.

SetPolicy

func (s *GetFederationTokenInput) SetPolicy(v string) *GetFederationTokenInput

SetPolicy sets the Policy field's value.

String

func (s GetFederationTokenInput) String() string

String returns the string representation

Validate

func (s *GetFederationTokenInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: