describe_launch_configurations ( $opt )

Returns a full description of the launch configurations, or the specified launch configurations, if they exist.

If no name is specified, then the full details of all launch configurations are returned.

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

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

  • LaunchConfigurationNames - string|array - Optional - A list of launch configuration names. Pass a string for a single value, or an indexed array for multiple values.
  • NextToken - string - Optional - A string that marks the start of the next batch of returned results. [Constraints: The value must match the following regular expression pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*]
  • MaxRecords - integer - Optional - The maximum number of launch configurations. The default is 100.
  • 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 launch configurations.

// Instantiate the class
$as = new AmazonAS();

$response = $as->describe_launch_configurations();

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

Describe specific launch configurations.

This is a fairly contrived example where we look up a list of launch configuration names, then pass that array back into a new call.

// Instantiate the class
$as = new AmazonAS();

// Fetch list of all LaunchConfigurationName that contain the word "Test".
$response = $as->describe_launch_configurations();
$list_of_launch_configurations = $response->body->query('//LaunchConfigurationName[contains(., "Test")]')->map_string();

// Pass the list (array) into a new request.
$response = $as->describe_launch_configurations(array(
	'LaunchConfigurationNames' => $list_of_launch_configurations
));

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

Related Methods

Source

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

public function describe_launch_configurations($opt = null)
{
    if (!$opt) $opt = array();
            
    // Optional list (non-map)
    if (isset($opt['LaunchConfigurationNames']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'LaunchConfigurationNames' => (is_array($opt['LaunchConfigurationNames']) ? $opt['LaunchConfigurationNames'] : array($opt['LaunchConfigurationNames']))
        ), 'member'));
        unset($opt['LaunchConfigurationNames']);
    }

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback