PHP Класс Scalr\Service\Aws

С версии: 18.09.2012
Автор: Vitaliy Demidov ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$queriesQuantity integer The quantity of the processed queries to the AWS API

Защищенные свойства (Protected)

Свойство Тип Описание
$container Scalr\DependencyInjection\Container

Открытые методы

Метод Описание
__construct ( string $accessKeyId, string $secretAccessKey, string $region = null, string $certificate = null, string $privateKey = null ) Constructor
__get ( string $name ) : mixed | null Magic getter
describeRegions ( ) : Scalr\Service\Aws\Ec2\DataType\RegionInfoList DescribeRegions action
getAccessKeyId ( ) : string Gets Access Key Id
getAccountNumber ( ) : string Retrieves AWS Account Number
getAvailableRegions ( boolean $ignoreCache = false ) : array Gets available regions
getAvailableServiceInterfaces ( ) : array Gets implemented web service interfaces
getCertificate ( ) : string Get x.509 certificate
getCloudLocations ( ) : array Gets defined AWS cloud locations
getCloudLocationsZoneIds ( ) : array Gets defined AWS cloud locations hosted zone ids
getContainer ( ) : Container Gets container
getDebug ( ) : boolean Gets debug flag value
getEntityManager ( ) : Scalr\Service\Aws\EntityManager Gets an AWS Entity Manager
getEnvironment ( ) : Scalr_Environment Gets an Scalr Environment object which is associated with the AWS client instance
getEventObserver ( ) : Scalr\Service\Aws\Plugin\EventObserver Gets an AWS client event observer
getMd5Base64Digest ( string $string ) : string Calculates an MD5.Base64digest for the given string.
getMd5Base64DigestFile ( string $file ) : string Calculates an MD5.Base64digest for the given file.
getPresignedUrl ( string $service, string $action, string $destRegion, string $objectId ) Gets presigned url signed with aws4 version signing algorithm
getPrivateKey ( ) : string Get private key
getProxy ( ) : array | boolean Gets proxy configuration
getReflectionClass ( ) : ReflectionClass Gets reflection class of Aws
getRegion ( ) : string Gets region
getSecretAccessKey ( ) : string Gets Secret Access Key
getUserArn ( ) : string Retrieves AWS user arn
getUsername ( ) : string Retrieves AWS username
isValidRegion ( string $region ) : boolean Checks whether provided region is valid.
resetDebug ( ) : Aws Resets debug
setDebug ( boolean $debug = true ) : Aws Sets debug flag
setEnvironment ( Scalr_Environment $environment = null ) : Aws Sets an Scalr environment object which is associated with the AWS client instance
setEventObserver ( Scalr\Service\Aws\Plugin\EventObserver $eventObserver = null ) : Aws Sets an AWS client event observer object associated with this instance
setProxy ( string $host, integer $port = 3128, string $user = null, string $pass = null, integer $type, integer $authType = 1 ) Set proxy configuration to connect to AWS services
validateCertificateAndPrivateKey ( ) : boolean Validates certificate and privatekey making AWS SOAP request

Описание методов

__construct() публичный Метод

Constructor
public __construct ( string $accessKeyId, string $secretAccessKey, string $region = null, string $certificate = null, string $privateKey = null )
$accessKeyId string AWS access key id
$secretAccessKey string AWS secret access key
$region string optional An AWS region. (Aws::REGION_US_EAST_1)
$certificate string optional AWS x.509 certificate (It's used only for Soap API)
$privateKey string optional Private Key (It's used only for Soap API)

__get() публичный Метод

Magic getter
public __get ( string $name ) : mixed | null
$name string
Результат mixed | null

describeRegions() публичный Метод

DescribeRegions action
public describeRegions ( ) : Scalr\Service\Aws\Ec2\DataType\RegionInfoList
Результат Scalr\Service\Aws\Ec2\DataType\RegionInfoList Returns the list of the RegionInfoData objects on success

getAccessKeyId() публичный Метод

Gets Access Key Id
public getAccessKeyId ( ) : string
Результат string Returns Access Key Id

getAccountNumber() публичный Метод

Retrieves AWS Account Number
public getAccountNumber ( ) : string
Результат string Returns AWS Account number for current user

getAvailableRegions() публичный Метод

Gets available regions
public getAvailableRegions ( boolean $ignoreCache = false ) : array
$ignoreCache boolean optional If true it will ignore cache
Результат array Returns list of available regions

getAvailableServiceInterfaces() публичный Метод

Gets implemented web service interfaces
public getAvailableServiceInterfaces ( ) : array
Результат array Returns Returns the list of available (implemented) web service interfaces

getCertificate() публичный Метод

Get x.509 certificate
public getCertificate ( ) : string
Результат string Returns x.509 certificate

getCloudLocations() публичный статический Метод

Gets defined AWS cloud locations
public static getCloudLocations ( ) : array
Результат array

getCloudLocationsZoneIds() публичный статический Метод

Gets defined AWS cloud locations hosted zone ids
public static getCloudLocationsZoneIds ( ) : array
Результат array

getContainer() публичный Метод

Gets container
public getContainer ( ) : Container
Результат Scalr\DependencyInjection\Container

getDebug() публичный Метод

Gets debug flag value
public getDebug ( ) : boolean
Результат boolean Returns true if debug is enabled.

getEntityManager() публичный Метод

This manager helps manipulate with retrieved from AWS objects. These object are stored in the cache.
public getEntityManager ( ) : Scalr\Service\Aws\EntityManager
Результат Scalr\Service\Aws\EntityManager Returns an AWS Entity Manager object.

getEnvironment() публичный Метод

Gets an Scalr Environment object which is associated with the AWS client instance
public getEnvironment ( ) : Scalr_Environment
Результат Scalr_Environment Returns Scalr Environment object

getEventObserver() публичный Метод

Gets an AWS client event observer
public getEventObserver ( ) : Scalr\Service\Aws\Plugin\EventObserver
Результат Scalr\Service\Aws\Plugin\EventObserver Returns AWS client event observer

getMd5Base64Digest() публичный статический Метод

Calculates an MD5.Base64digest for the given string.
public static getMd5Base64Digest ( string $string ) : string
$string string A string which should digest be calculated for.
Результат string Returns MD5 Base64 digest

getMd5Base64DigestFile() публичный статический Метод

Calculates an MD5.Base64digest for the given file.
public static getMd5Base64DigestFile ( string $file ) : string
$file string A file path which should digest be calculated for.
Результат string Returns MD5 Base64 digest

getPresignedUrl() публичный Метод

Gets presigned url signed with aws4 version signing algorithm
public getPresignedUrl ( string $service, string $action, string $destRegion, string $objectId )
$service string Service name (ec2, s3)
$action string Action name (CopySnapshot)
$destRegion string Destination region
$objectId string Id of the snapshot, image , etc

getPrivateKey() публичный Метод

Get private key
public getPrivateKey ( ) : string
Результат string Returns private key from certificate

getProxy() публичный Метод

Gets proxy configuration
public getProxy ( ) : array | boolean
Результат array | boolean

getReflectionClass() публичный статический Метод

Gets reflection class of Aws
public static getReflectionClass ( ) : ReflectionClass
Результат ReflectionClass Returns reflection class of Aws

getRegion() публичный Метод

Gets region
public getRegion ( ) : string
Результат string Returns region that has been provided for instance

getSecretAccessKey() публичный Метод

Gets Secret Access Key
public getSecretAccessKey ( ) : string
Результат string Returns Secret Access Key

getUserArn() публичный Метод

Retrieves AWS user arn
public getUserArn ( ) : string
Результат string Returns AWS user arn

getUsername() публичный Метод

Retrieves AWS username
public getUsername ( ) : string
Результат string Returns AWS username

isValidRegion() публичный Метод

Checks whether provided region is valid.
public isValidRegion ( string $region ) : boolean
$region string AWS region (Aws::REGION_US_EAST_1)
Результат boolean Returns boolean true if region is valid or false otherwise.

resetDebug() публичный Метод

Resets debug
public resetDebug ( ) : Aws
Результат Aws

setDebug() публичный Метод

Sets debug flag
public setDebug ( boolean $debug = true ) : Aws
$debug boolean optional If true it will enable debug mode
Результат Aws

setEnvironment() публичный Метод

Sets an Scalr environment object which is associated with the AWS client instance
public setEnvironment ( Scalr_Environment $environment = null ) : Aws
$environment Scalr_Environment An environment object
Результат Aws

setEventObserver() публичный Метод

Sets an AWS client event observer object associated with this instance
public setEventObserver ( Scalr\Service\Aws\Plugin\EventObserver $eventObserver = null ) : Aws
$eventObserver Scalr\Service\Aws\Plugin\EventObserver The event observer
Результат Aws

setProxy() публичный Метод

Set proxy configuration to connect to AWS services
public setProxy ( string $host, integer $port = 3128, string $user = null, string $pass = null, integer $type, integer $authType = 1 )
$host string
$port integer
$user string
$pass string
$type integer Allowed values 4 - SOCKS4, 5 - SOCKS5, 0 - HTTP
$authType integer Allowed authtypes: 1 - Basic, Digest - 2, GSSNeg - 4, NTLM - 8, any - -1

validateCertificateAndPrivateKey() публичный Метод

Validates certificate and privatekey making AWS SOAP request
public validateCertificateAndPrivateKey ( ) : boolean
Результат boolean Returns true on success or throws an exception

Описание свойств

$container защищенное свойство

protected Container,Scalr\DependencyInjection $container
Результат Scalr\DependencyInjection\Container

$queriesQuantity публичное свойство

The quantity of the processed queries to the AWS API
public int $queriesQuantity
Результат integer