\AlibabaCloud\Client\Credentials\RequestsAssumeRole

Retrieving assume role credentials.

Summary

Methods
Properties
Constants
resolveParameter()
boolToString()
stringToSign()
__call()
__construct()
appendUserAgent()
withUserAgent()
format()
contentType()
accept()
body()
jsonBody()
scheme()
host()
method()
client()
isDebug()
resolveOption()
request()
requestAsync()
createClient()
setContent()
setMethod()
setProtocol()
getProtocolType()
setProtocolType()
setActionName()
setAcceptFormat()
getProtocol()
getContent()
getMethod()
getHeaders()
addHeader()
getQueryParameters()
setQueryParameters()
getDomainParameter()
putDomainParameters()
getActionName()
getAcceptFormat()
getLocationEndpointType()
getLocationServiceCode()
timeout()
timeoutMilliseconds()
connectTimeout()
connectTimeoutMilliseconds()
debug()
cert()
proxy()
verify()
options()
regionId()
config()
credential()
httpClient()
mergeOptionsIntoClient()
action()
endpointSuffix()
network()
version()
product()
endpointType()
serviceCode()
resolveHost()
realRegionId()
offsetGet()
offsetSet()
offsetExists()
offsetUnset()
__get()
__set()
__isset()
__unset()
retryByServer()
retryByClient()
stringToSign()
resolveParameter()
$method
$format
$client
$uri
$data
$options
$regionId
$version
$product
$action
$serviceCode
$endpointType
$network
$endpointMap
$endpointRegional
$endpointSuffix
CONNECT_TIMEOUT
TIMEOUT
No protected methods found
$scheme
N/A
resolveBoolInParameters()
resolveCommonParameters()
resolveSecurityToken()
resolveBearerToken()
signature()
repositionParameters()
response()
cleanQuery()
cleanFormParams()
resolveHostWays()
hostResolver()
shouldServerRetry()
shouldClientRetry()
$dateTimeFormat
$userAgent
$config
$serverRetry
$serverRetryStrings
$serverRetryStatusCodes
$clientRetry
$clientRetryStrings
$clientRetryStatusCodes
N/A

Constants

CONNECT_TIMEOUT

CONNECT_TIMEOUT = 5

Request Connect Timeout

TIMEOUT

TIMEOUT = 10

Request Timeout

Properties

$method

$method : string

Type

string — HTTP Method

$format

$format : string

Type

string

$client

$client : string

Type

string

$data

$data : array

Type

array — The original parameters of the request.

$options

$options : array

Type

array

$regionId

$regionId : string|null

Type

string|null

$version

$version : string

Type

string

$product

$product : string

Type

string

$action

$action : string

Type

string

$serviceCode

$serviceCode : string

Type

string

$endpointType

$endpointType : string

Type

string

$network

$network : string|null

Type

string|null

$endpointMap

$endpointMap : array|null

Type

array|null

$endpointRegional

$endpointRegional : string|null

Type

string|null

$endpointSuffix

$endpointSuffix : string

Type

string

$scheme

$scheme : string

Type

string — HTTP Scheme

$dateTimeFormat

$dateTimeFormat : string

Type

string

$userAgent

$userAgent : array

Type

array

$config

$config : array

Type

array

$serverRetry

$serverRetry : integer

Server Retry Times

Type

integer

$serverRetryStrings

$serverRetryStrings : array<mixed,string>

Server Retry Strings

Type

array<mixed,string>

$serverRetryStatusCodes

$serverRetryStatusCodes : array<mixed,integer>

Server Retry Codes

Type

array<mixed,integer>

$clientRetry

$clientRetry : integer

Client Retry Times

Type

integer

$clientRetryStrings

$clientRetryStrings : array<mixed,string>

Client Retry Strings

Type

array<mixed,string>

$clientRetryStatusCodes

$clientRetryStatusCodes : array<mixed,integer>

Client Retry Codes

Type

array<mixed,integer>

Methods

resolveParameter()

resolveParameter() 

Resolve request parameter.

Throws

\AlibabaCloud\Client\Exception\ClientException

boolToString()

boolToString(boolean|string  $value) : string

Convert a Boolean value to a string.

Parameters

boolean|string $value

Returns

string

stringToSign()

stringToSign() : string

Returns

string

__call()

__call(string  $name, mixed  $arguments) : $this

Magic method for set or get request parameters.

Parameters

string $name
mixed $arguments

Returns

$this

appendUserAgent()

appendUserAgent(string  $name, string  $value) : $this

Parameters

string $name
string $value

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

withUserAgent()

withUserAgent(array  $userAgent) : $this

Parameters

array $userAgent

Returns

$this

format()

format(string  $format) : $this

Set Accept format.

Parameters

string $format

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

contentType()

contentType(  $contentType) : $this

Parameters

$contentType

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

accept()

accept(string  $accept) : $this

Parameters

string $accept

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

body()

body(string  $body) : $this

Set the request body.

Parameters

string $body

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

jsonBody()

jsonBody(array|object  $content) : $this

Set the json as body.

Parameters

array|object $content

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

scheme()

scheme(string  $scheme) : $this

Set the request scheme.

Parameters

string $scheme

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

host()

host(string  $host) : $this

Set the request host.

Parameters

string $host

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

method()

method(string  $method) : $this

Parameters

string $method

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

client()

client(string  $clientName) : $this

Parameters

string $clientName

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

isDebug()

isDebug() : boolean

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

boolean

resolveOption()

resolveOption() 

Throws

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

request()

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

Throws

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

Returns

\AlibabaCloud\Client\Result\Result

requestAsync()

requestAsync() 

createClient()

createClient(\AlibabaCloud\Client\Request\Request  $request = null) : \GuzzleHttp\Client

Parameters

\AlibabaCloud\Client\Request\Request $request

Throws

\Exception

Returns

\GuzzleHttp\Client

setContent()

setContent(  $content) : $this

Parameters

$content

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

setMethod()

setMethod(  $method) : $this

Parameters

$method

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

setProtocol()

setProtocol(  $scheme) : $this

Parameters

$scheme

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

getProtocolType()

getProtocolType() 

setProtocolType()

setProtocolType(  $scheme) : $this

Parameters

$scheme

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

setActionName()

setActionName(  $actionName) : $this

Parameters

$actionName

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

setAcceptFormat()

setAcceptFormat(  $format) : $this

Parameters

$format

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

getProtocol()

getProtocol() 

getContent()

getContent() 

getMethod()

getMethod() 

getHeaders()

getHeaders() 

addHeader()

addHeader(  $headerKey,   $headerValue) : $this

Parameters

$headerKey
$headerValue

Returns

$this

getQueryParameters()

getQueryParameters() 

setQueryParameters()

setQueryParameters(  $name,   $value) : $this

Parameters

$name
$value

Returns

$this

getDomainParameter()

getDomainParameter() 

putDomainParameters()

putDomainParameters(  $name,   $value) : $this

Parameters

$name
$value

Returns

$this

getActionName()

getActionName() 

getAcceptFormat()

getAcceptFormat() 

getLocationEndpointType()

getLocationEndpointType() 

getLocationServiceCode()

getLocationServiceCode() 

timeout()

timeout(integer|float  $seconds) : $this

Parameters

integer|float $seconds

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

timeoutMilliseconds()

timeoutMilliseconds(integer  $milliseconds) : $this

Parameters

integer $milliseconds

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

connectTimeout()

connectTimeout(integer|float  $seconds) : $this

Parameters

integer|float $seconds

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

connectTimeoutMilliseconds()

connectTimeoutMilliseconds(integer  $milliseconds) : $this

Parameters

integer $milliseconds

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

debug()

debug(boolean  $debug) : $this

Parameters

boolean $debug

Returns

$this

cert()

cert(array  $cert) : $this

Parameters

array $cert

Returns

$this

proxy()

proxy(array|string  $proxy) : $this

Parameters

array|string $proxy

Returns

$this

verify()

verify(mixed  $verify) : $this

Parameters

mixed $verify

Returns

$this

options()

options(array  $options) : $this

Parameters

array $options

Returns

$this

regionId()

regionId(string  $regionId) : $this

Parameters

string $regionId

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

config()

config(array  $config) 

Parameters

array $config

credential()

credential() : \AlibabaCloud\Client\Credentials\AccessKeyCredential|\AlibabaCloud\Client\Credentials\BearerTokenCredential|\AlibabaCloud\Client\Credentials\CredentialsInterface|\AlibabaCloud\Client\Credentials\StsCredential

Return credentials directly if it is an AssumeRole or GenerateSessionAccessKey.

Throws

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

Returns

\AlibabaCloud\Client\Credentials\AccessKeyCredential|\AlibabaCloud\Client\Credentials\BearerTokenCredential|\AlibabaCloud\Client\Credentials\CredentialsInterface|\AlibabaCloud\Client\Credentials\StsCredential

httpClient()

httpClient() : \AlibabaCloud\Client\Clients\Client

Get the client based on the request's settings.

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

\AlibabaCloud\Client\Clients\Client

mergeOptionsIntoClient()

mergeOptionsIntoClient() 

Merged with the client's options, the same name will be overwritten.

Throws

\AlibabaCloud\Client\Exception\ClientException

action()

action(string  $action) : $this

Parameters

string $action

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

endpointSuffix()

endpointSuffix(string  $endpointSuffix) : \AlibabaCloud\Client\Request\Traits\AcsTrait

Parameters

string $endpointSuffix

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

\AlibabaCloud\Client\Request\Traits\AcsTrait

network()

network(string  $network) 

Parameters

string $network

version()

version(string  $version) : $this

Parameters

string $version

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

product()

product(string  $product) : $this

Parameters

string $product

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

endpointType()

endpointType(string  $endpointType) : $this

Parameters

string $endpointType

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

serviceCode()

serviceCode(string  $serviceCode) : $this

Parameters

string $serviceCode

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

resolveHost()

resolveHost() 

Resolve Host.

Throws

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

realRegionId()

realRegionId() : string

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

string

offsetGet()

offsetGet(string  $offset) : mixed|null

This method returns a reference to the variable to allow for indirect array modification (e.g., $foo['bar']['baz'] = 'qux').

Parameters

string $offset

Returns

mixed|null

offsetSet()

offsetSet(string  $offset, string|mixed  $value) 

Parameters

string $offset
string|mixed $value

offsetExists()

offsetExists(string  $offset) : boolean

Parameters

string $offset

Returns

boolean

offsetUnset()

offsetUnset(string  $offset) 

Parameters

string $offset

__get()

__get(string  $name) : mixed|null

Parameters

string $name

Returns

mixed|null

__set()

__set(string  $name, mixed  $value) 

Parameters

string $name
mixed $value

__isset()

__isset(string  $name) : boolean

Parameters

string $name

Returns

boolean

__unset()

__unset(  $name) : void

Parameters

$name

retryByServer()

retryByServer(integer  $times, array  $strings, array  $statusCodes = array()) : $this

Parameters

integer $times
array $strings
array $statusCodes

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

retryByClient()

retryByClient(integer  $times, array  $strings, array  $codes = array()) : $this

Parameters

integer $times
array $strings
array $codes

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

$this

stringToSign()

stringToSign() : string

Returns

string

resolveParameter()

resolveParameter() : string

Returns

string

resolveBoolInParameters()

resolveBoolInParameters() 

Convert a Boolean value to a string

resolveCommonParameters()

resolveCommonParameters() 

Resolve Common Parameters.

Throws

\AlibabaCloud\Client\Exception\ClientException
\Exception

resolveSecurityToken()

resolveSecurityToken() 

Throws

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

resolveBearerToken()

resolveBearerToken() 

Throws

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

signature()

signature() : mixed

Sign the parameters.

Throws

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

Returns

mixed

repositionParameters()

repositionParameters() 

Adjust parameter position

response()

response() 

Throws

\AlibabaCloud\Client\Exception\ClientException
\Exception

cleanQuery()

cleanQuery() 

Remove redundant Query

cleanFormParams()

cleanFormParams() 

Remove redundant Headers

resolveHostWays()

resolveHostWays(string  $host, string  $region_id) 

Parameters

string $host
string $region_id

Throws

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

hostResolver()

hostResolver(string  $host, string  $region_id) 

Parameters

string $host
string $region_id

Throws

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

shouldClientRetry()

shouldClientRetry(\Exception  $exception) : boolean

Parameters

\Exception $exception

Returns

boolean