sts

package
v0.0.0-...-bbc24d0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssumeRoleRequest

type AssumeRoleRequest struct {
	*requests.RpcRequest
	RoleArn         string           `position:"Query" name:"RoleArn"`
	RoleSessionName string           `position:"Query" name:"RoleSessionName"`
	DurationSeconds requests.Integer `position:"Query" name:"DurationSeconds"`
	Policy          string           `position:"Query" name:"Policy"`
}

AssumeRoleRequest is the request struct for api AssumeRole

func CreateAssumeRoleRequest

func CreateAssumeRoleRequest() (request *AssumeRoleRequest)

CreateAssumeRoleRequest creates a request to invoke AssumeRole API

type AssumeRoleResponse

type AssumeRoleResponse struct {
	*responses.BaseResponse
	RequestId       string          `json:"RequestId" xml:"RequestId"`
	Credentials     Credentials     `json:"Credentials" xml:"Credentials"`
	AssumedRoleUser AssumedRoleUser `json:"AssumedRoleUser" xml:"AssumedRoleUser"`
}

AssumeRoleResponse is the response struct for api AssumeRole

func CreateAssumeRoleResponse

func CreateAssumeRoleResponse() (response *AssumeRoleResponse)

CreateAssumeRoleResponse creates a response to parse from AssumeRole response

type AssumedRoleUser

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

AssumedRoleUser is a nested struct in sts response

type Client

type Client struct {
	sdk.Client
}

Client is the sdk client struct, each func corresponds to an OpenAPI

func NewClient

func NewClient() (client *Client, err error)

NewClient creates a sdk client with environment variables

func NewClientWithAccessKey

func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)

NewClientWithAccessKey is a shortcut to create sdk client with accesskey usage: https://help.aliyun.com/document_detail/66217.html

func NewClientWithEcsRamRole

func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error)

NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role usage: https://help.aliyun.com/document_detail/66223.html

func NewClientWithOptions

func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error)

NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential this is the common api to create a sdk client

func NewClientWithRamRoleArn

func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn usage: https://help.aliyun.com/document_detail/66222.html

func NewClientWithRsaKeyPair

func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error)

NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair attention: rsa key pair auth is only Japan regions available

func NewClientWithStsToken

func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error)

NewClientWithStsToken is a shortcut to create sdk client with sts token usage: https://help.aliyun.com/document_detail/66222.html

func (*Client) AssumeRole

func (client *Client) AssumeRole(request *AssumeRoleRequest) (response *AssumeRoleResponse, err error)

AssumeRole invokes the sts.AssumeRole API synchronously api document: https://help.aliyun.com/api/sts/assumerole.html

func (*Client) AssumeRoleWithCallback

func (client *Client) AssumeRoleWithCallback(request *AssumeRoleRequest, callback func(response *AssumeRoleResponse, err error)) <-chan int

AssumeRoleWithCallback invokes the sts.AssumeRole API asynchronously api document: https://help.aliyun.com/api/sts/assumerole.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) AssumeRoleWithChan

func (client *Client) AssumeRoleWithChan(request *AssumeRoleRequest) (<-chan *AssumeRoleResponse, <-chan error)

AssumeRoleWithChan invokes the sts.AssumeRole API asynchronously api document: https://help.aliyun.com/api/sts/assumerole.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) GenerateSessionAccessKey

func (client *Client) GenerateSessionAccessKey(request *GenerateSessionAccessKeyRequest) (response *GenerateSessionAccessKeyResponse, err error)

GenerateSessionAccessKey invokes the sts.GenerateSessionAccessKey API synchronously api document: https://help.aliyun.com/api/sts/generatesessionaccesskey.html

func (*Client) GenerateSessionAccessKeyWithCallback

func (client *Client) GenerateSessionAccessKeyWithCallback(request *GenerateSessionAccessKeyRequest, callback func(response *GenerateSessionAccessKeyResponse, err error)) <-chan int

GenerateSessionAccessKeyWithCallback invokes the sts.GenerateSessionAccessKey API asynchronously api document: https://help.aliyun.com/api/sts/generatesessionaccesskey.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) GenerateSessionAccessKeyWithChan

func (client *Client) GenerateSessionAccessKeyWithChan(request *GenerateSessionAccessKeyRequest) (<-chan *GenerateSessionAccessKeyResponse, <-chan error)

GenerateSessionAccessKeyWithChan invokes the sts.GenerateSessionAccessKey API asynchronously api document: https://help.aliyun.com/api/sts/generatesessionaccesskey.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) GetCallerIdentity

func (client *Client) GetCallerIdentity(request *GetCallerIdentityRequest) (response *GetCallerIdentityResponse, err error)

GetCallerIdentity invokes the sts.GetCallerIdentity API synchronously api document: https://help.aliyun.com/api/sts/getcalleridentity.html

func (*Client) GetCallerIdentityWithCallback

func (client *Client) GetCallerIdentityWithCallback(request *GetCallerIdentityRequest, callback func(response *GetCallerIdentityResponse, err error)) <-chan int

GetCallerIdentityWithCallback invokes the sts.GetCallerIdentity API asynchronously api document: https://help.aliyun.com/api/sts/getcalleridentity.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) GetCallerIdentityWithChan

func (client *Client) GetCallerIdentityWithChan(request *GetCallerIdentityRequest) (<-chan *GetCallerIdentityResponse, <-chan error)

GetCallerIdentityWithChan invokes the sts.GetCallerIdentity API asynchronously api document: https://help.aliyun.com/api/sts/getcalleridentity.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

type Credentials

type Credentials struct {
	SecurityToken   string `json:"SecurityToken" xml:"SecurityToken"`
	AccessKeySecret string `json:"AccessKeySecret" xml:"AccessKeySecret"`
	AccessKeyId     string `json:"AccessKeyId" xml:"AccessKeyId"`
	Expiration      string `json:"Expiration" xml:"Expiration"`
}

Credentials is a nested struct in sts response

type GenerateSessionAccessKeyRequest

type GenerateSessionAccessKeyRequest struct {
	*requests.RpcRequest
	DurationSeconds requests.Integer `position:"Query" name:"DurationSeconds"`
}

GenerateSessionAccessKeyRequest is the request struct for api GenerateSessionAccessKey

func CreateGenerateSessionAccessKeyRequest

func CreateGenerateSessionAccessKeyRequest() (request *GenerateSessionAccessKeyRequest)

CreateGenerateSessionAccessKeyRequest creates a request to invoke GenerateSessionAccessKey API

type GenerateSessionAccessKeyResponse

type GenerateSessionAccessKeyResponse struct {
	*responses.BaseResponse
	RequestId        string           `json:"RequestId" xml:"RequestId"`
	SessionAccessKey SessionAccessKey `json:"SessionAccessKey" xml:"SessionAccessKey"`
}

GenerateSessionAccessKeyResponse is the response struct for api GenerateSessionAccessKey

func CreateGenerateSessionAccessKeyResponse

func CreateGenerateSessionAccessKeyResponse() (response *GenerateSessionAccessKeyResponse)

CreateGenerateSessionAccessKeyResponse creates a response to parse from GenerateSessionAccessKey response

type GetCallerIdentityRequest

type GetCallerIdentityRequest struct {
	*requests.RpcRequest
}

GetCallerIdentityRequest is the request struct for api GetCallerIdentity

func CreateGetCallerIdentityRequest

func CreateGetCallerIdentityRequest() (request *GetCallerIdentityRequest)

CreateGetCallerIdentityRequest creates a request to invoke GetCallerIdentity API

type GetCallerIdentityResponse

type GetCallerIdentityResponse struct {
	*responses.BaseResponse
	AccountId    string `json:"AccountId" xml:"AccountId"`
	UserId       string `json:"UserId" xml:"UserId"`
	RoleId       string `json:"RoleId" xml:"RoleId"`
	Arn          string `json:"Arn" xml:"Arn"`
	IdentityType string `json:"IdentityType" xml:"IdentityType"`
	PrincipalId  string `json:"PrincipalId" xml:"PrincipalId"`
	RequestId    string `json:"RequestId" xml:"RequestId"`
}

GetCallerIdentityResponse is the response struct for api GetCallerIdentity

func CreateGetCallerIdentityResponse

func CreateGetCallerIdentityResponse() (response *GetCallerIdentityResponse)

CreateGetCallerIdentityResponse creates a response to parse from GetCallerIdentity response

type SessionAccessKey

type SessionAccessKey struct {
	SessionAccessKeyId     string `json:"SessionAccessKeyId" xml:"SessionAccessKeyId"`
	SessionAccessKeySecret string `json:"SessionAccessKeySecret" xml:"SessionAccessKeySecret"`
	Expiration             string `json:"Expiration" xml:"Expiration"`
}

SessionAccessKey is a nested struct in sts response

Jump to

Keyboard shortcuts

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