Documentation ¶
Overview ¶
Package api defines all APIs supported by the STS service of BCE.
Index ¶
Constants ¶
View Source
const ( DEFAULT_DURATION_SECONDS = 43200 // default duration is 12 hours URI_PREFIX = bce.URI_PREFIX + "v1" // sts service not support uri without prefix "v1" REQUEST_URI = "/sessionToken" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetSessionTokenResult ¶
type GetSessionTokenResult struct { AccessKeyId string SecretAccessKey string SessionToken string CreateTime string Expiration string UserId string }
func GetSessionToken ¶
GetSessionToken - get the session token from the STS service
PARAMS:
- cli: the client object which can perform sending request
- durationSec: the duration seconds of the token
- acl: the acl string
RETURNS:
- *GetSessionTokenResult: result of this api
- error: nil if ok otherwise the specific error
Click to show internal directories.
Click to hide internal directories.