PHP Class Scalr\Model\Entity\Account\Environment

Since: 5.4.0 (23.02.2015)
Author: Vitaliy Demidov ([email protected])
Inheritance: extends Scalr\Model\AbstractEntity
Afficher le fichier Open project: scalr/scalr Class Usage Examples

Méthodes publiques

Свойство 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

Méthodes publiques

Méthode 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 méthode

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

aws() public méthode

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
Résultat Scalr\Service\Aws Returns Aws instance

cloudCredentialsList() public méthode

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
Résultat Scalr\Model\Entity\CloudCredentials[]

delete() public méthode

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

getAccountId() public méthode

Gets identifier of the Account
public getAccountId ( ) : integer
Résultat integer Returns identifier of the Account

getProperties() public méthode

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

getProperty() public méthode

Gets environment property
public getProperty ( string $name ) : EnvironmentProperty
$name string Property name
Résultat EnvironmentProperty

keychain() public méthode

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

save() public méthode

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

setProperty() public méthode

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
Résultat integer

$added public_oe property

The timestamp when this environment was added
public DateTime $added
Résultat DateTime

$defaultPriority public_oe property

The default priority of the environment
public int $defaultPriority
Résultat integer

$id public_oe property

The identifier of the Environment
public int $id
Résultat integer

$name public_oe property

The name of the environment
public string $name
Résultat string

$status public_oe property

The status of the environment
public string $status
Résultat string