PHP 클래스 Scalr\Service\Aws\Client\QueryClient

HTTP Query-based requests are defined as any HTTP requests using the HTTP verb GET or POST and a Query parameter named either Action or Operation.
부터: 21.09.2012
저자: Vitaliy Demidov ([email protected])
상속: extends Scalr\Service\Aws\Client\AbstractClient, implements Scalr\Service\Aws\Client\ClientInterface
파일 보기 프로젝트 열기: scalr/scalr

보호된 프로퍼티들

프로퍼티 타입 설명
$apiVersion string AWS API Version
$awsAccessKeyId string AWS Access Key Id
$secretAccessKey string Secret Access Key
$url string Base url for API requests

공개 메소드들

메소드 설명
__construct ( string $awsAccessKeyId, string $secretAccessKey, string $apiVersion, string $url = null ) Constructor
call ( string $action, array $options, string $path = '/' ) : Scalr\Service\Aws\Client\ClientResponseInterface Calls Amazon web service method.
createRequest ( ) : Scalr\System\Http\Client\Request Creates a new http Request object.
getApiVersion ( ) : string Gets API Version date
getType ( )
getUrl ( ) : string Gets base url for API requests
setApiVersion ( string $apiVersion ) Sets Api Version
setUrl ( string $url ) Sets query url

보호된 메소드들

메소드 설명
getExpirationTime ( ) : string Gets expiration time for Expires option.
signRequestV2 ( Scalr\System\Http\Client\Request $request ) Signs request with signature version 2
signRequestV4 ( Scalr\System\Http\Client\Request $request, string $region = null, string $file = null ) Signs request with signature version 4
tryCall ( Scalr\System\Http\Client\Request $httpRequest, integer $attempts = 3, integer $interval = 200 ) : Scalr\Service\Aws\Client\QueryClientResponse Tries to send request on several attempts.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string $awsAccessKeyId, string $secretAccessKey, string $apiVersion, string $url = null )
$awsAccessKeyId string AWS Access Key Id
$secretAccessKey string AWS Secret Access Key
$apiVersion string YYYY-MM-DD representation of AWS API version
$url string

call() 공개 메소드

It ensures execution of the certain AWS action by transporting the request and receiving response.
public call ( string $action, array $options, string $path = '/' ) : Scalr\Service\Aws\Client\ClientResponseInterface
$action string An Web service API action name.
$options array An options array. It may contain "_host" option which overrides host.
$path string optional A relative path.
리턴 Scalr\Service\Aws\Client\ClientResponseInterface

createRequest() 공개 메소드

Creates a new http Request object.
public createRequest ( ) : Scalr\System\Http\Client\Request
리턴 Scalr\System\Http\Client\Request Returns a new http Request object.

getApiVersion() 공개 메소드

Gets API Version date
public getApiVersion ( ) : string
리턴 string Returns API Version Date in YYYY-MM-DD format

getExpirationTime() 보호된 메소드

Gets expiration time for Expires option.
protected getExpirationTime ( ) : string
리턴 string Returns expiration time form Expires option that's used in AWS api requests.

getType() 공개 메소드

public getType ( )

getUrl() 공개 메소드

Gets base url for API requests
public getUrl ( ) : string
리턴 string Returns base url for API requests

setApiVersion() 공개 메소드

Sets Api Version
public setApiVersion ( string $apiVersion )
$apiVersion string YYYY-MM-DD representation of AWS API version

setUrl() 공개 메소드

Sets query url
public setUrl ( string $url )
$url string Base url for API requests

signRequestV2() 보호된 메소드

Only POST http method is supported
protected signRequestV2 ( Scalr\System\Http\Client\Request $request )
$request Scalr\System\Http\Client\Request Http request object

signRequestV4() 보호된 메소드

Signs request with signature version 4
protected signRequestV4 ( Scalr\System\Http\Client\Request $request, string $region = null, string $file = null )
$request Scalr\System\Http\Client\Request Http Request
$region string optional Overrides region as destination region for multi-regional operations
$file string optional Path to the file transmitted in request for signature calculation

tryCall() 보호된 메소드

Tries to send request on several attempts.
protected tryCall ( Scalr\System\Http\Client\Request $httpRequest, integer $attempts = 3, integer $interval = 200 ) : Scalr\Service\Aws\Client\QueryClientResponse
$httpRequest Scalr\System\Http\Client\Request
$attempts integer Attempts count.
$interval integer An sleep interval between an attempts in microseconds.
리턴 Scalr\Service\Aws\Client\QueryClientResponse Returns response on success

프로퍼티 상세

$apiVersion 보호되어 있는 프로퍼티

AWS API Version
protected string $apiVersion
리턴 string

$awsAccessKeyId 보호되어 있는 프로퍼티

AWS Access Key Id
protected string $awsAccessKeyId
리턴 string

$secretAccessKey 보호되어 있는 프로퍼티

Secret Access Key
protected string $secretAccessKey
리턴 string

$url 보호되어 있는 프로퍼티

Base url for API requests
protected string $url
리턴 string