create_storage_location ( $opt )

Creates the Amazon S3 storage location for the account.

This location is used to store user log files.

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

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

  • 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 version.

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

// Create a new S3 storage location for use with Elastic Beanstalk.
$s3_bucket = (string) $bean->create_storage_location()->body->S3Bucket()->first();

$response = $bean->create_application_version('my-application', '1.0', array(
	'Description' => 'Version 1.0 of the application.',
	'SourceBundle' => array(
		'S3Bucket' => 'elasticbeanstalk-us-east-1',
		'S3Key' => 'resources/sampleapp.war'
	),
	'AutoCreateApplication' => 'true'
));

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

Related Methods

Source

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

public function create_storage_location($opt = null)
{
    if (!$opt) $opt = array();
            
    return $this->authenticate('CreateStorageLocation', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback