Codebase list golang-github-denverdino-aliyungo / dee1d80d-ca4f-4810-be6f-c37b9b585def/upstream/sid sts / get_caller_identity.go
dee1d80d-ca4f-4810-be6f-c37b9b585def/upstream/sid

Tree @dee1d80d-ca4f-4810-be6f-c37b9b585def/upstream/sid (Download .tar.gz)

get_caller_identity.go @dee1d80d-ca4f-4810-be6f-c37b9b585def/upstream/sidraw · history · blame

package sts

import "github.com/denverdino/aliyungo/common"

type GetCallerIdentityRequest struct {
}

type GetCallerIdentityResponse struct {
	common.Response
	AccountId string
	UserId    string
	Arn       string
}

func (c *STSClient) GetCallerIdentity() (*GetCallerIdentityResponse, error) {
	resp := &GetCallerIdentityResponse{}
	err := c.Invoke("GetCallerIdentity", &GetCallerIdentityRequest{}, resp)
	if err != nil {
		return resp, err
	}
	return resp, nil
}