create_application ( $application_name, $opt )

Creates an application that has one configuration template named default and no application versions.

The default configuration template is for a 32-bit version of the Amazon Linux operating system running the Tomcat 6 application container.

Access

public

Parameters

Parameter

Type

Required

Description

$application_name

string

Required

The name of the application. Constraint: This name must be unique within your account. If the specified name already exists, the action returns an InvalidParameterValue error.

$opt

array

Optional

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

  • Description - string - Optional - Describes the application.
  • 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

Creates a new application.

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

$response = $bean->create_application('my-application', array(
	'Description' => 'This is my application!'
));

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

Related Methods

Source

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

public function create_application($application_name, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['ApplicationName'] = $application_name;
    
    return $this->authenticate('CreateApplication', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback