describe_environments ( $opt )

Returns descriptions for existing environments.

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • ApplicationName - string - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.
  • VersionLabel - string - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application version.
  • EnvironmentIds - string|array - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified IDs. Pass a string for a single value, or an indexed array for multiple values.
  • EnvironmentNames - string|array - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified names. Pass a string for a single value, or an indexed array for multiple values.
  • IncludeDeleted - boolean - Optional - Indicates whether to include deleted environments: true: Environments that have been deleted after IncludedDeletedBackTo are displayed. false: Do not include deleted environments.
  • IncludedDeletedBackTo - string - Optional - If specified when IncludeDeleted is set to true, then environments deleted after this date are displayed. May be passed as a number of seconds since UNIX Epoch, or any string compatible with strtotime().
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Describe all environments.

// Instantiate the class
$bean = new AmazonElasticBeanstalk();

$response = $bean->describe_environments();

// Success?
var_dump($response->isOK());
Result:
bool(true)

Describe environments for a specific application.

// Instantiate the class
$bean = new AmazonElasticBeanstalk();

$response = $bean->describe_environments(array(
	'ApplicationName' => 'my-application'
));

// Success?
var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

Method defined in services/elasticbeanstalk.class.php | Toggle source view (30 lines) | View on GitHub

public function describe_environments($opt = null)
{
    if (!$opt) $opt = array();
            
    // Optional DateTime
    if (isset($opt['IncludedDeletedBackTo']))
    {
        $opt['IncludedDeletedBackTo'] = $this->util->convert_date_to_iso8601($opt['IncludedDeletedBackTo']);
    }

    // Optional list (non-map)
    if (isset($opt['EnvironmentIds']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'EnvironmentIds' => (is_array($opt['EnvironmentIds']) ? $opt['EnvironmentIds'] : array($opt['EnvironmentIds']))
        ), 'member'));
        unset($opt['EnvironmentIds']);
    }
    
    // Optional list (non-map)
    if (isset($opt['EnvironmentNames']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'EnvironmentNames' => (is_array($opt['EnvironmentNames']) ? $opt['EnvironmentNames'] : array($opt['EnvironmentNames']))
        ), 'member'));
        unset($opt['EnvironmentNames']);
    }

    return $this->authenticate('DescribeEnvironments', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback