sts

package
v0.0.0-...-2731d20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2017 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssumeRoleParams

type AssumeRoleParams struct {
	DurationSeconds int
	ExternalId      string
	Policy          string
	RoleArn         string
	RoleSessionName string
}

options for the AssumeRole function

See http://goo.gl/Ld6Dbk for details

type AssumeRoleResult

type AssumeRoleResult struct {
	AssumedRoleUser  AssumedRoleUser `xml:"AssumeRoleResult>AssumedRoleUser"`
	Credentials      Credentials     `xml:"AssumeRoleResult>Credentials"`
	PackedPolicySize int             `xml:"AssumeRoleResult>PackedPolicySize"`
	RequestId        string          `xml:"ResponseMetadata>RequestId"`
}

type AssumedRoleUser

type AssumedRoleUser struct {
	Arn           string `xml:"Arn"`
	AssumedRoleId string `xml:"AssumedRoleId"`
}

type Credentials

type Credentials struct {
	AccessKeyId     string    `xml:"AccessKeyId"`
	Expiration      time.Time `xml:"Expiration"`
	SecretAccessKey string    `xml:"SecretAccessKey"`
	SessionToken    string    `xml:"SessionToken"`
}

type Error

type Error struct {
	// HTTP status code (200, 403, ...)
	StatusCode int
	// STS error code
	Code string
	// The human-oriented error message
	Message   string
	RequestId string `xml:"RequestID"`
}

Error encapsulates an error returned by the AWS STS API.

See http://goo.gl/zDZbuQ for more details.

func (*Error) Error

func (err *Error) Error() string

type FederatedUser

type FederatedUser struct {
	Arn             string `xml:"Arn"`
	FederatedUserId string `xml:"FederatedUserId"`
}

FederatedUser presents dentifiers for the federated user that is associated with the credentials.

See http://goo.gl/uPtr7V for more details

type GetFederationTokenResult

type GetFederationTokenResult struct {
	Credentials      Credentials   `xml:"GetFederationTokenResult>Credentials"`
	FederatedUser    FederatedUser `xml:"GetFederationTokenResult>FederatedUser"`
	PackedPolicySize int           `xml:"GetFederationTokenResult>PackedPolicySize"`
	RequestId        string        `xml:"ResponseMetadata>RequestId"`
}

GetFederationToken wraps GetFederationToken response

See http://goo.gl/Iujjeg for more details

type GetSessionTokenResult

type GetSessionTokenResult struct {
	Credentials Credentials `xml:"GetSessionTokenResult>Credentials"`
	RequestId   string      `xml:"ResponseMetadata>RequestId"`
}

GetSessionToken wraps GetSessionToken response

See http://goo.gl/v8s5Y for more details

type STS

type STS struct {
	aws.Auth
	aws.Region
	// contains filtered or unexported fields
}

The STS type encapsulates operations within a specific EC2 region.

func New

func New(auth aws.Auth, region aws.Region) *STS

New creates a new STS Client. We can only use us-east for region because AWS..

func (*STS) AssumeRole

func (sts *STS) AssumeRole(options *AssumeRoleParams) (resp *AssumeRoleResult, err error)

AssumeRole assumes the specified role

See http://goo.gl/zDZbuQ for more details.

func (*STS) GetFederationToken

func (sts *STS) GetFederationToken(name, policy string, durationSeconds int) (
	resp *GetFederationTokenResult, err error)

GetFederationToken returns a set of temporary credentials for an AWS account or IAM user

See http://goo.gl/Iujjeg for more details

func (*STS) GetSessionToken

func (sts *STS) GetSessionToken(durationSeconds int, serialnNumber, tokenCode string) (
	resp *GetSessionTokenResult, err error)

GetSessionToken returns a set of temporary credentials for an AWS account or IAM user

See http://goo.gl/v8s5Y for more details

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL