sts

package
v0.0.0-...-c8d9381 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StsHost = "sts.api.qcloud.com"
	StsPath = "/v2/index.php"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssumeRoleArgs

type AssumeRoleArgs struct {
	RoleArn         string `qcloud_arg:"roleArn"`
	RoleSessionName string `qcloud_arg:"roleSessionName"`
	DurationSeconds *int   `qcloud_arg:"durationSeconds"`
}

type AssumeRoleResponse

type AssumeRoleResponse struct {
	Response
	Data struct {
		Credentials struct {
			SessionToken string `json:"sessionToken"`
			TmpSecretId  string `json:"tmpSecretId"`
			TmpSecretKey string `json:"tmpSecretKey"`
		} `json:"credentials"`
		ExpiredTime int    `json:"expiredTime"`
		Expiration  string `json:"expiration"`
	} `json:"data"`
}

type Client

type Client struct {
	*common.Client
}

func NewClient

func NewClient(credential common.CredentialInterface, opts common.Opts) (*Client, error)

func NewClientFromEnv

func NewClientFromEnv() (*Client, error)

func (*Client) AssumeRole

func (client *Client) AssumeRole(args *AssumeRoleArgs) (*AssumeRoleResponse, error)

type Response

type Response struct {
	Code     int    `json:"code"`
	Message  string `json:"message"`
	CodeDesc string `json:"codeDesc"`
}

Jump to

Keyboard shortcuts

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