sts

package
v0.9.180 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Overview

Package sts defines the STS service of BCE. It contains the model sub package to implement the concrete request and response of the GetSessionToken API.

Index

Constants

View Source
const DEFAULT_SERVICE_DOMAIN = "sts." + bce.DEFAULT_REGION + "." + bce.DEFAULT_DOMAIN

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bce.BceClient
}

Client of STS service is a kind of BceClient, so it derived from the BceClient and it only supports the GetSessionToken API. There is no other fields needed.

func NewClient

func NewClient(ak, sk string) (*Client, error)

NewClient make the STS service client with default configuration. Use `cli.Config.xxx` to access the config or change it to non-default value.

func NewStsClient added in v0.9.14

func NewStsClient(ak, sk, endpoint string) (*Client, error)

func (*Client) AssumeRole added in v0.9.17

func (c *Client) AssumeRole(args *api.AssumeRoleArgs) (*api.Credential, error)

func (*Client) GetSessionToken

func (c *Client) GetSessionToken(duration int, acl string) (*api.GetSessionTokenResult, error)

Directories

Path Synopsis
Package api defines all APIs supported by the STS service of BCE.
Package api defines all APIs supported by the STS service of BCE.

Jump to

Keyboard shortcuts

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