PHP Класс Scalr\Model\Entity\Account\Environment

С версии: 5.4.0 (23.02.2015)
Автор: Vitaliy Demidov ([email protected])
Наследование: extends Scalr\Model\AbstractEntity
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$accountId integer The identifier of the Account
$added DateTime The timestamp when this environment was added
$defaultPriority integer The default priority of the environment
$id integer The identifier of the Environment
$name string The name of the environment
$status string The status of the environment

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

Метод Описание
__construct ( string $accountId = null ) Constructor
aws ( string | DBServer | DBFarmRole | DBEBSVolume $awsRegion = null, string $awsAccessKeyId = null, string $awsSecretAccessKey = null, string $certificate = null, string $privateKey = null ) : Aws Gets an Amazon Web Service (Aws) factory instance
cloudCredentialsList ( array $clouds = null, array $credentialsFilter = [], array $propertiesFilter = [], boolean $cacheResult = true ) : CloudCredentials[] Gets cloud credentials for listed clouds
delete ( boolean $force = false )
getAccountId ( ) : integer Gets identifier of the Account
getProperties ( ) : EnvironmentProperty[] Gets environment properties list
getProperty ( string $name ) : EnvironmentProperty Gets environment property
keychain ( string $cloud ) : CloudCredentials Gets specified cloud credentials for this environment
save ( )
setProperty ( string $name, string $value ) Sets Environment property

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

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

Constructor
public __construct ( string $accountId = null )
$accountId string optional The identifier of the account

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

This method ensures that aws instance is always from the current environment scope.
public aws ( string | DBServer | DBFarmRole | DBEBSVolume $awsRegion = null, string $awsAccessKeyId = null, string $awsSecretAccessKey = null, string $certificate = null, string $privateKey = null ) : Aws
$awsRegion string | DBServer | DBFarmRole | DBEBSVolume optional The region or object which has both Scalr_Environment instance and cloud location itself
$awsAccessKeyId string optional The AccessKeyId
$awsSecretAccessKey string optional The SecretAccessKey
$certificate string optional Contains x.509 certificate
$privateKey string optional The private key for the certificate
Результат Scalr\Service\Aws Returns Aws instance

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

Gets cloud credentials for listed clouds
public cloudCredentialsList ( array $clouds = null, array $credentialsFilter = [], array $propertiesFilter = [], boolean $cacheResult = true ) : CloudCredentials[]
$clouds array optional Clouds list
$credentialsFilter array optional Criteria to filter by CloudCredentials properties
$propertiesFilter array optional Criteria to filter by CloudCredentialsProperties
$cacheResult boolean optional Cache result
Результат Scalr\Model\Entity\CloudCredentials[]

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

См. также: AbstractEntity::delete()
public delete ( boolean $force = false )
$force boolean Delete ignoring restrictions

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

Gets identifier of the Account
public getAccountId ( ) : integer
Результат integer Returns identifier of the Account

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

TODO: need to implement proper properties handling @see \Scalr_Environment::getEncryptedVariables() NOTE: currently there are no properties that require encryption
public getProperties ( ) : EnvironmentProperty[]
Результат EnvironmentProperty[]

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

Gets environment property
public getProperty ( string $name ) : EnvironmentProperty
$name string Property name
Результат EnvironmentProperty

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

Gets specified cloud credentials for this environment
public keychain ( string $cloud ) : CloudCredentials
$cloud string The cloud name
Результат Scalr\Model\Entity\CloudCredentials

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

См. также: AbstractEntity::save()
public save ( )

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

Sets Environment property
public setProperty ( string $name, string $value )
$name string Property name
$value string Property value

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

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

The identifier of the Account
public int $accountId
Результат integer

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

The timestamp when this environment was added
public DateTime $added
Результат DateTime

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

The default priority of the environment
public int $defaultPriority
Результат integer

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

The identifier of the Environment
public int $id
Результат integer

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

The name of the environment
public string $name
Результат string

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

The status of the environment
public string $status
Результат string