\AlibabaCloud\Client\RequestRoaRequest

RESTful ROA Request.

Summary

Methods
Properties
Constants
putPathParameter()
setUriPattern()
getUriPattern()
getPathParameters()
__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()
resolveParameter()
stringToSign()
pathParameter()
pathPattern()
__call()
setParameter()
stringToSign()
resolveParameter()
$method
$format
$client
$uri
$data
$options
$regionId
$version
$product
$action
$serviceCode
$endpointType
$network
$endpointMap
$endpointRegional
$endpointSuffix
$pathPattern
$pathParameters
CONNECT_TIMEOUT
TIMEOUT
No protected methods found
$scheme
N/A
response()
cleanQuery()
cleanFormParams()
resolveHostWays()
hostResolver()
shouldServerRetry()
shouldClientRetry()
resolveQuery()
resolveBody()
encodeBody()
resolveHeaders()
resolveSignature()
resolveAccept()
resolveContentType()
resolveSecurityToken()
resolveBearerToken()
signature()
resolveUri()
queryString()
$userAgent
$config
$serverRetry
$serverRetryStrings
$serverRetryStatusCodes
$clientRetry
$clientRetryStrings
$clientRetryStatusCodes
$dateTimeFormat
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

$pathPattern

$pathPattern : string

Type

string

$pathParameters

$pathParameters : array

Type

array

$scheme

$scheme : string

Type

string — HTTP Scheme

$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>

$dateTimeFormat

$dateTimeFormat : string

Type

string

Methods

putPathParameter()

putPathParameter(  $name,   $value) : $this

Parameters

$name
$value

Returns

$this

setUriPattern()

setUriPattern(  $pathPattern) : $this

Parameters

$pathPattern

Returns

$this

getUriPattern()

getUriPattern() : string

Returns

string

getPathParameters()

getPathParameters() : array

Returns

array

__construct()

__construct(array  $options = array()) 

Request constructor.

Parameters

array $options

Throws

\AlibabaCloud\Client\Exception\ClientException

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

resolveParameter()

resolveParameter() 

Resolve request parameter.

Throws

\AlibabaCloud\Client\Exception\ClientException
\Exception

stringToSign()

stringToSign() : string

Returns

string

pathParameter()

pathParameter(string  $name, string  $value) : \AlibabaCloud\Client\Request\RoaRequest

Set path parameter by name.

Parameters

string $name
string $value

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

\AlibabaCloud\Client\Request\RoaRequest

pathPattern()

pathPattern(string  $pattern) : self

Set path pattern.

Parameters

string $pattern

Throws

\AlibabaCloud\Client\Exception\ClientException

Returns

self

__call()

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

Magic method for set or get request parameters.

Parameters

string $name
mixed $arguments

Returns

$this

setParameter()

setParameter() : void

stringToSign()

stringToSign() : string

Returns

string

resolveParameter()

resolveParameter() : string

Returns

string

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

resolveQuery()

resolveQuery() 

resolveBody()

resolveBody() 

encodeBody()

encodeBody(array  $params) 

Determine the body format based on the Content-Type and calculate the MD5 value.

Parameters

array $params

resolveHeaders()

resolveHeaders() 

Throws

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

resolveSignature()

resolveSignature() 

Throws

\AlibabaCloud\Client\Exception\ClientException
\Exception

resolveAccept()

resolveAccept() 

If accept is not specified, it is determined by format.

resolveContentType()

resolveContentType() 

If the Content-Type is not specified, it is determined according to accept.

resolveSecurityToken()

resolveSecurityToken() 

Throws

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

resolveBearerToken()

resolveBearerToken() 

Throws

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

signature()

signature() : string

Sign the request message.

Throws

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

Returns

string

resolveUri()

resolveUri() : void

queryString()

queryString() : boolean|string

Returns

boolean|string