sts

package
v0.22.21 Latest Latest
Warning

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

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

Documentation

Overview

Package sts include resources of ucloud sts product

See also

for detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssumeRoleRequest

type AssumeRoleRequest struct {
	request.CommonBase

	// Token有效期。
	DurationSeconds *int `required:"false"`

	// 为STS Token额外添加的一个权限策略,进一步限制STS Token的权限。
	Policy *string `required:"false"`

	// 角色会话名称。
	RoleSessionName *string `required:"true"`

	// 要扮演的RAM角色URN。
	RoleUrn *string `required:"true"`
}

AssumeRoleRequest is request schema for AssumeRole action

type AssumeRoleResponse

type AssumeRoleResponse struct {
	response.CommonBase

	// 访问凭证。
	Credentials Credentials
}

AssumeRoleResponse is response schema for AssumeRole action

type Credentials

type Credentials struct {

	// 密钥ID。
	AccessKeyId string

	// 密钥Secret。
	AccessKeySecret string

	// Token到期失效时间(UTC时间)。
	Expiration string

	// 安全令牌。
	SecurityToken string
}

Credentials -

type STSClient

type STSClient struct {
	*ucloud.Client
}

STSClient is the client of STS

func NewClient

func NewClient(config *ucloud.Config, credential *auth.Credential) *STSClient

NewClient will return a instance of STSClient

func (*STSClient) AssumeRole

func (c *STSClient) AssumeRole(req *AssumeRoleRequest) (*AssumeRoleResponse, error)

API: AssumeRole

获取扮演角色的临时身份凭证

func (*STSClient) NewAssumeRoleRequest

func (c *STSClient) NewAssumeRoleRequest() *AssumeRoleRequest

NewAssumeRoleRequest will create request of AssumeRole action.

Jump to

Keyboard shortcuts

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