\AlibabaCloud\Client\Credentials\ProvidersEcsRamRoleProvider

Class EcsRamRoleProvider

Summary

Methods
Properties
Constants
__construct()
getCredentialsInCache()
get()
request()
getResponse()
No public properties found
DURATION_SECONDS
key()
cache()
$credentialsCache
$expirationSlot
$client
$error
N/A
No private methods found
$uri
N/A

Constants

DURATION_SECONDS

DURATION_SECONDS = 3600

For TSC Duration Seconds

Properties

$credentialsCache

$credentialsCache : array

Type

array

$expirationSlot

$expirationSlot : integer

Expiration time slot for temporary security credentials.

Type

integer

$error

$error : string

Type

string

$uri

$uri : string

Type

string

Methods

getCredentialsInCache()

getCredentialsInCache() : array|null

Get the credentials from the cache in the validity period.

Returns

array|null

get()

get() : \AlibabaCloud\Client\Credentials\StsCredential

Get credential.

Throws

\AlibabaCloud\Client\Exception\ClientException
\AlibabaCloud\Client\Exception\ServerException

Returns

\AlibabaCloud\Client\Credentials\StsCredential

request()

request() : \AlibabaCloud\Client\Result\Result

Get credentials by request.

Throws

\AlibabaCloud\Client\Exception\ClientException
\AlibabaCloud\Client\Exception\ServerException

Returns

\AlibabaCloud\Client\Result\Result

getResponse()

getResponse() : mixed|\Psr\Http\Message\ResponseInterface

Get data from meta.

Throws

\AlibabaCloud\Client\Exception\ClientException
\Exception

Returns

mixed|\Psr\Http\Message\ResponseInterface

key()

key() : string

Get the toString of the credentials as the key.

Returns

string

cache()

cache(array  $credential) 

Cache credentials.

Parameters

array $credential