package sts
import "github.com/AdRoll/goamz/sts"
Index ¶
- type AssumeRoleParams
- type AssumeRoleResult
- type AssumedRoleUser
- type Credentials
- type Error
- type FederatedUser
- type GetFederationTokenResult
- type GetSessionTokenResult
- type STS
- func New(auth aws.Auth, region aws.Region) *STS
- func (sts *STS) AssumeRole(options *AssumeRoleParams) (resp *AssumeRoleResult, err error)
- func (sts *STS) GetFederationToken(name, policy string, durationSeconds int) ( resp *GetFederationTokenResult, err error)
- func (sts *STS) GetSessionToken(durationSeconds int, serialnNumber, tokenCode string) ( resp *GetSessionTokenResult, err error)
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 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 ¶
type FederatedUser ¶
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 ¶
The STS type encapsulates operations within a specific EC2 region.
func New ¶
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
Source Files ¶
- Version
- v0.0.0-20170825154802-2731d20f46f4 (latest)
- Published
- Aug 25, 2017
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 11 months ago –
Tools for package owners.