Documentation ¶
Index ¶
- Variables
- func GetEndpointMap() map[string]string
- func GetEndpointType() string
- func SetClientProperty(client *Client, propertyName string, propertyValue interface{})
- func SetEndpointDataToClient(client *Client)
- type AssumeRoleRequest
- type AssumeRoleResponse
- type AssumeRoleWithOIDCRequest
- type AssumeRoleWithOIDCResponse
- type AssumeRoleWithSAMLRequest
- type AssumeRoleWithSAMLResponse
- type AssumedRoleUser
- type Client
- func NewClient() (client *Client, err error)
- func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)
- func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error)
- func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error)
- func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error)
- func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)
- func NewClientWithRamRoleArnAndPolicy(regionId string, ...) (client *Client, err error)
- func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error)
- func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error)
- func (client *Client) AssumeRole(request *AssumeRoleRequest) (response *AssumeRoleResponse, err error)
- func (client *Client) AssumeRoleWithCallback(request *AssumeRoleRequest, ...) <-chan int
- func (client *Client) AssumeRoleWithChan(request *AssumeRoleRequest) (<-chan *AssumeRoleResponse, <-chan error)
- func (client *Client) AssumeRoleWithOIDC(request *AssumeRoleWithOIDCRequest) (response *AssumeRoleWithOIDCResponse, err error)
- func (client *Client) AssumeRoleWithOIDCWithCallback(request *AssumeRoleWithOIDCRequest, ...) <-chan int
- func (client *Client) AssumeRoleWithOIDCWithChan(request *AssumeRoleWithOIDCRequest) (<-chan *AssumeRoleWithOIDCResponse, <-chan error)
- func (client *Client) AssumeRoleWithSAML(request *AssumeRoleWithSAMLRequest) (response *AssumeRoleWithSAMLResponse, err error)
- func (client *Client) AssumeRoleWithSAMLWithCallback(request *AssumeRoleWithSAMLRequest, ...) <-chan int
- func (client *Client) AssumeRoleWithSAMLWithChan(request *AssumeRoleWithSAMLRequest) (<-chan *AssumeRoleWithSAMLResponse, <-chan error)
- func (client *Client) GetCallerIdentity(request *GetCallerIdentityRequest) (response *GetCallerIdentityResponse, err error)
- func (client *Client) GetCallerIdentityWithCallback(request *GetCallerIdentityRequest, ...) <-chan int
- func (client *Client) GetCallerIdentityWithChan(request *GetCallerIdentityRequest) (<-chan *GetCallerIdentityResponse, <-chan error)
- type Credentials
- type GetCallerIdentityRequest
- type GetCallerIdentityResponse
- type OIDCTokenInfo
- type SAMLAssertionInfo
Constants ¶
This section is empty.
Variables ¶
var EndpointMap map[string]string
EndpointMap Endpoint Data
var EndpointType = "regional"
EndpointType regional or central
Functions ¶
func GetEndpointMap ¶ added in v1.60.377
GetEndpointMap Get Endpoint Data Map
func GetEndpointType ¶ added in v1.60.377
func GetEndpointType() string
GetEndpointType Get Endpoint Type Value
func SetClientProperty ¶ added in v1.60.377
SetClientProperty Set Property by Reflect
func SetEndpointDataToClient ¶ added in v1.60.377
func SetEndpointDataToClient(client *Client)
SetEndpointDataToClient Set EndpointMap and ENdpointType
Types ¶
type AssumeRoleRequest ¶
type AssumeRoleRequest struct { *requests.RpcRequest ExternalId string `position:"Query" name:"ExternalId"` RoleSessionName string `position:"Query" name:"RoleSessionName"` Policy string `position:"Query" name:"Policy"` RoleArn string `position:"Query" name:"RoleArn"` DurationSeconds requests.Integer `position:"Query" name:"DurationSeconds"` }
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"` AssumedRoleUser AssumedRoleUser `json:"AssumedRoleUser" xml:"AssumedRoleUser"` Credentials Credentials `json:"Credentials" xml:"Credentials"` }
AssumeRoleResponse is the response struct for api AssumeRole
func CreateAssumeRoleResponse ¶
func CreateAssumeRoleResponse() (response *AssumeRoleResponse)
CreateAssumeRoleResponse creates a response to parse from AssumeRole response
type AssumeRoleWithOIDCRequest ¶ added in v1.61.1280
type AssumeRoleWithOIDCRequest struct { *requests.RpcRequest RoleArn string `position:"Query" name:"RoleArn"` RoleSessionName string `position:"Query" name:"RoleSessionName"` OIDCToken string `position:"Query" name:"OIDCToken"` DurationSeconds requests.Integer `position:"Query" name:"DurationSeconds"` OIDCProviderArn string `position:"Query" name:"OIDCProviderArn"` Policy string `position:"Query" name:"Policy"` }
AssumeRoleWithOIDCRequest is the request struct for api AssumeRoleWithOIDC
func CreateAssumeRoleWithOIDCRequest ¶ added in v1.61.1280
func CreateAssumeRoleWithOIDCRequest() (request *AssumeRoleWithOIDCRequest)
CreateAssumeRoleWithOIDCRequest creates a request to invoke AssumeRoleWithOIDC API
type AssumeRoleWithOIDCResponse ¶ added in v1.61.1280
type AssumeRoleWithOIDCResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` OIDCTokenInfo OIDCTokenInfo `json:"OIDCTokenInfo" xml:"OIDCTokenInfo"` AssumedRoleUser AssumedRoleUser `json:"AssumedRoleUser" xml:"AssumedRoleUser"` Credentials Credentials `json:"Credentials" xml:"Credentials"` }
AssumeRoleWithOIDCResponse is the response struct for api AssumeRoleWithOIDC
func CreateAssumeRoleWithOIDCResponse ¶ added in v1.61.1280
func CreateAssumeRoleWithOIDCResponse() (response *AssumeRoleWithOIDCResponse)
CreateAssumeRoleWithOIDCResponse creates a response to parse from AssumeRoleWithOIDC response
type AssumeRoleWithSAMLRequest ¶
type AssumeRoleWithSAMLRequest struct { *requests.RpcRequest SAMLAssertion string `position:"Query" name:"SAMLAssertion"` RoleArn string `position:"Query" name:"RoleArn"` SAMLProviderArn string `position:"Query" name:"SAMLProviderArn"` DurationSeconds requests.Integer `position:"Query" name:"DurationSeconds"` Policy string `position:"Query" name:"Policy"` }
AssumeRoleWithSAMLRequest is the request struct for api AssumeRoleWithSAML
func CreateAssumeRoleWithSAMLRequest ¶
func CreateAssumeRoleWithSAMLRequest() (request *AssumeRoleWithSAMLRequest)
CreateAssumeRoleWithSAMLRequest creates a request to invoke AssumeRoleWithSAML API
type AssumeRoleWithSAMLResponse ¶
type AssumeRoleWithSAMLResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` SAMLAssertionInfo SAMLAssertionInfo `json:"SAMLAssertionInfo" xml:"SAMLAssertionInfo"` AssumedRoleUser AssumedRoleUser `json:"AssumedRoleUser" xml:"AssumedRoleUser"` Credentials Credentials `json:"Credentials" xml:"Credentials"` }
AssumeRoleWithSAMLResponse is the response struct for api AssumeRoleWithSAML
func CreateAssumeRoleWithSAMLResponse ¶
func CreateAssumeRoleWithSAMLResponse() (response *AssumeRoleWithSAMLResponse)
CreateAssumeRoleWithSAMLResponse creates a response to parse from AssumeRoleWithSAML response
type AssumedRoleUser ¶
type AssumedRoleUser struct { AssumedRoleId string `json:"AssumedRoleId" xml:"AssumedRoleId"` Arn string `json:"Arn" xml:"Arn"` }
AssumedRoleUser is a nested struct in sts response
type Client ¶
Client is the sdk client struct, each func corresponds to an OpenAPI
func NewClientWithAccessKey ¶
func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)
NewClientWithAccessKey is a shortcut to create sdk client with accesskey usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
func NewClientWithEcsRamRole ¶
NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
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 NewClientWithProvider ¶
func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error)
NewClientWithProvider creates a sdk client with providers usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
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://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
func NewClientWithRamRoleArnAndPolicy ¶
func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error)
NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
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 usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
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://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md
func (*Client) AssumeRole ¶
func (client *Client) AssumeRole(request *AssumeRoleRequest) (response *AssumeRoleResponse, err error)
AssumeRole invokes the sts.AssumeRole API synchronously
func (*Client) AssumeRoleWithCallback ¶
func (client *Client) AssumeRoleWithCallback(request *AssumeRoleRequest, callback func(response *AssumeRoleResponse, err error)) <-chan int
AssumeRoleWithCallback invokes the sts.AssumeRole API asynchronously
func (*Client) AssumeRoleWithChan ¶
func (client *Client) AssumeRoleWithChan(request *AssumeRoleRequest) (<-chan *AssumeRoleResponse, <-chan error)
AssumeRoleWithChan invokes the sts.AssumeRole API asynchronously
func (*Client) AssumeRoleWithOIDC ¶ added in v1.61.1280
func (client *Client) AssumeRoleWithOIDC(request *AssumeRoleWithOIDCRequest) (response *AssumeRoleWithOIDCResponse, err error)
AssumeRoleWithOIDC invokes the sts.AssumeRoleWithOIDC API synchronously
func (*Client) AssumeRoleWithOIDCWithCallback ¶ added in v1.61.1280
func (client *Client) AssumeRoleWithOIDCWithCallback(request *AssumeRoleWithOIDCRequest, callback func(response *AssumeRoleWithOIDCResponse, err error)) <-chan int
AssumeRoleWithOIDCWithCallback invokes the sts.AssumeRoleWithOIDC API asynchronously
func (*Client) AssumeRoleWithOIDCWithChan ¶ added in v1.61.1280
func (client *Client) AssumeRoleWithOIDCWithChan(request *AssumeRoleWithOIDCRequest) (<-chan *AssumeRoleWithOIDCResponse, <-chan error)
AssumeRoleWithOIDCWithChan invokes the sts.AssumeRoleWithOIDC API asynchronously
func (*Client) AssumeRoleWithSAML ¶
func (client *Client) AssumeRoleWithSAML(request *AssumeRoleWithSAMLRequest) (response *AssumeRoleWithSAMLResponse, err error)
AssumeRoleWithSAML invokes the sts.AssumeRoleWithSAML API synchronously
func (*Client) AssumeRoleWithSAMLWithCallback ¶
func (client *Client) AssumeRoleWithSAMLWithCallback(request *AssumeRoleWithSAMLRequest, callback func(response *AssumeRoleWithSAMLResponse, err error)) <-chan int
AssumeRoleWithSAMLWithCallback invokes the sts.AssumeRoleWithSAML API asynchronously
func (*Client) AssumeRoleWithSAMLWithChan ¶
func (client *Client) AssumeRoleWithSAMLWithChan(request *AssumeRoleWithSAMLRequest) (<-chan *AssumeRoleWithSAMLResponse, <-chan error)
AssumeRoleWithSAMLWithChan invokes the sts.AssumeRoleWithSAML API asynchronously
func (*Client) GetCallerIdentity ¶
func (client *Client) GetCallerIdentity(request *GetCallerIdentityRequest) (response *GetCallerIdentityResponse, err error)
GetCallerIdentity invokes the sts.GetCallerIdentity API synchronously
func (*Client) GetCallerIdentityWithCallback ¶
func (client *Client) GetCallerIdentityWithCallback(request *GetCallerIdentityRequest, callback func(response *GetCallerIdentityResponse, err error)) <-chan int
GetCallerIdentityWithCallback invokes the sts.GetCallerIdentity API asynchronously
func (*Client) GetCallerIdentityWithChan ¶
func (client *Client) GetCallerIdentityWithChan(request *GetCallerIdentityRequest) (<-chan *GetCallerIdentityResponse, <-chan error)
GetCallerIdentityWithChan invokes the sts.GetCallerIdentity API asynchronously
type Credentials ¶
type Credentials struct { AccessKeySecret string `json:"AccessKeySecret" xml:"AccessKeySecret"` Expiration string `json:"Expiration" xml:"Expiration"` AccessKeyId string `json:"AccessKeyId" xml:"AccessKeyId"` SecurityToken string `json:"SecurityToken" xml:"SecurityToken"` }
Credentials is a nested struct in sts 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 IdentityType string `json:"IdentityType" xml:"IdentityType"` AccountId string `json:"AccountId" xml:"AccountId"` RequestId string `json:"RequestId" xml:"RequestId"` PrincipalId string `json:"PrincipalId" xml:"PrincipalId"` UserId string `json:"UserId" xml:"UserId"` Arn string `json:"Arn" xml:"Arn"` RoleId string `json:"RoleId" xml:"RoleId"` }
GetCallerIdentityResponse is the response struct for api GetCallerIdentity
func CreateGetCallerIdentityResponse ¶
func CreateGetCallerIdentityResponse() (response *GetCallerIdentityResponse)
CreateGetCallerIdentityResponse creates a response to parse from GetCallerIdentity response
type OIDCTokenInfo ¶ added in v1.61.1280
type OIDCTokenInfo struct { Subject string `json:"Subject" xml:"Subject"` Issuer string `json:"Issuer" xml:"Issuer"` ClientIds string `json:"ClientIds" xml:"ClientIds"` ExpirationTime string `json:"ExpirationTime" xml:"ExpirationTime"` IssuanceTime string `json:"IssuanceTime" xml:"IssuanceTime"` VerificationInfo string `json:"VerificationInfo" xml:"VerificationInfo"` }
OIDCTokenInfo is a nested struct in sts response
type SAMLAssertionInfo ¶
type SAMLAssertionInfo struct { SubjectType string `json:"SubjectType" xml:"SubjectType"` Subject string `json:"Subject" xml:"Subject"` Issuer string `json:"Issuer" xml:"Issuer"` Recipient string `json:"Recipient" xml:"Recipient"` }
SAMLAssertionInfo is a nested struct in sts response