Documentation
¶
Index ¶
Constants ¶
View Source
const ( Host = "https://sts.aliyuncs.com/" // public domain Ver = "2015-04-01" // API version )
API constants
Variables ¶
This section is empty.
Functions ¶
func AssumeRoleAPI ¶
func AssumeRoleAPI(r *AssumeRoleParam, dur int64) aliyun.API
AssumeRoleAPI forms the API for AssumeRole. doc https://help.aliyun.com/document_detail/28763.html
func DefaultKey ¶
func DefaultKey(p *AssumeRoleParam) string
DefaultKey concatenates the params as a key.
func GetRoleArn ¶
GetRoleArn composes the roleArn parameter; it must be of the form "acs:ram::$accountID:role/$roleName".
Types ¶
type AssumeRoleParam ¶
An AssumeRoleParam is the param for AssumeRole.
type AssumeRoleResponse ¶
type AssumeRoleResponse struct { RequestID string `json:"RequestId,omitempty"` User AssumedRoleUser `json:"AssumedRoleUser"` Cred Credentials `json:"Credentials"` }
An AssumeRoleResponse is the response for action AssumeRole.
type AssumedRoleUser ¶
An AssumedRoleUser is the user representation.
type Credentials ¶
type Credentials struct { AccessKeySecret string `json:"AccessKeySecret"` AccessKeyID string `json:"AccessKeyId"` Expiration time.Time `json:"Expiration"` // "2006-01-02T15:04:05Z" SecurityToken string `json:"SecurityToken"` }
A Credentials is the credentials obtained by AssumedRole.
type Getter ¶
type Getter interface { // Get gets the credentials using the param. // The returned credentials should not expire before // specified duration (in seconds). Get(*AssumeRoleParam, int64) (Credentials, error) }
A Getter gets the STS credentials.
Click to show internal directories.
Click to hide internal directories.