PHP Class Scalr\Model\Entity\Account\Environment

Since: 5.4.0 (23.02.2015)
Author: Vitaliy Demidov ([email protected])
Inheritance: extends Scalr\Model\AbstractEntity
ファイルを表示 Open project: scalr/scalr Class Usage Examples

Public Properties

Property Type Description
$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

Public Methods

Method Description
__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

Method Details

__construct() public method

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

aws() public method

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
return Scalr\Service\Aws Returns Aws instance

cloudCredentialsList() public method

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
return Scalr\Model\Entity\CloudCredentials[]

delete() public method

See also: AbstractEntity::delete()
public delete ( boolean $force = false )
$force boolean Delete ignoring restrictions

getAccountId() public method

Gets identifier of the Account
public getAccountId ( ) : integer
return integer Returns identifier of the Account

getProperties() public method

TODO: need to implement proper properties handling @see \Scalr_Environment::getEncryptedVariables() NOTE: currently there are no properties that require encryption
public getProperties ( ) : EnvironmentProperty[]
return EnvironmentProperty[]

getProperty() public method

Gets environment property
public getProperty ( string $name ) : EnvironmentProperty
$name string Property name
return EnvironmentProperty

keychain() public method

Gets specified cloud credentials for this environment
public keychain ( string $cloud ) : CloudCredentials
$cloud string The cloud name
return Scalr\Model\Entity\CloudCredentials

save() public method

See also: AbstractEntity::save()
public save ( )

setProperty() public method

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

Property Details

$accountId public_oe property

The identifier of the Account
public int $accountId
return integer

$added public_oe property

The timestamp when this environment was added
public DateTime $added
return DateTime

$defaultPriority public_oe property

The default priority of the environment
public int $defaultPriority
return integer

$id public_oe property

The identifier of the Environment
public int $id
return integer

$name public_oe property

The name of the environment
public string $name
return string

$status public_oe property

The status of the environment
public string $status
return string