Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/*
3
 * Copyright 2010-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
 *
5
 * Licensed under the Apache License, Version 2.0 (the "License").
6
 * You may not use this file except in compliance with the License.
7
 * A copy of the License is located at
8
 *
9
 *  http://aws.amazon.com/apache2.0
10
 *
11
 * or in the "license" file accompanying this file. This file is distributed
12
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
 * express or implied. See the License for the specific language governing
14
 * permissions and limitations under the License.
15
 */
16
 
17
/**
18
 * This is the AWS Elastic Beanstalk API Reference. This guide provides detailed information about
19
 * AWS Elastic Beanstalk actions, data types, parameters, and errors.
20
 *
21
 * AWS Elastic Beanstalk is a tool that makes it easy for you to create, deploy, and manage
22
 * scalable, fault-tolerant applications running on Amazon Web Services cloud resources.
23
 *
24
 * For more information about this product, go to the <a href=
25
 * "http://aws.amazon.com/elasticbeanstalk/">AWS Elastic Beanstalk</a> details page. The location
26
 * of the lastest AWS Elastic Beanstalk WSDL is <a href=
27
 * "http://elasticbeanstalk.s3.amazonaws.com/doc/2010-12-01/AWSElasticBeanstalk.wsdl">http://elasticbeanstalk.s3.amazonaws.com/doc/2010-12-01/AWSElasticBeanstalk.wsdl</a>.
28
 *
29
 * <strong>Endpoints</strong>
30
 *
31
 * AWS Elastic Beanstalk supports the following region-specific endpoint:
32
 *
33
 * <ul>
34
 * 	<li>https://elasticbeanstalk.us-east-1.amazonaws.com</li>
35
 * </ul>
36
 *
37
 * @version 2012.01.16
38
 * @license See the included NOTICE.md file for complete information.
39
 * @copyright See the included NOTICE.md file for complete information.
40
 * @link http://aws.amazon.com/elasticbeanstalk/ AWS ElasticBeanstalk
41
 * @link http://aws.amazon.com/elasticbeanstalk/documentation/ AWS ElasticBeanstalk documentation
42
 */
43
class AmazonElasticBeanstalk extends CFRuntime
44
{
45
	/*%******************************************************************************************%*/
46
	// CLASS CONSTANTS
47
 
48
	/**
49
	 * Specify the queue URL for the United States East (Northern Virginia) Region.
50
	 */
51
	const REGION_US_E1 = 'elasticbeanstalk.us-east-1.amazonaws.com';
52
 
53
	/**
54
	 * Specify the queue URL for the United States East (Northern Virginia) Region.
55
	 */
56
	const REGION_VIRGINIA = self::REGION_US_E1;
57
 
58
	/**
59
	 * Default service endpoint.
60
	 */
61
	const DEFAULT_URL = self::REGION_US_E1;
62
 
63
 
64
	/*%******************************************************************************************%*/
65
	// CONSTRUCTOR
66
 
67
	/**
68
	 * Constructs a new instance of <AmazonElasticBeanstalk>.
69
	 *
70
	 * @param array $options (Optional) An associative array of parameters that can have the following keys: <ul>
71
	 * 	<li><code>certificate_authority</code> - <code>boolean</code> - Optional - Determines which Cerificate Authority file to use. A value of boolean <code>false</code> will use the Certificate Authority file available on the system. A value of boolean <code>true</code> will use the Certificate Authority provided by the SDK. Passing a file system path to a Certificate Authority file (chmodded to <code>0755</code>) will use that. Leave this set to <code>false</code> if you're not sure.</li>
72
	 * 	<li><code>credentials</code> - <code>string</code> - Optional - The name of the credential set to use for authentication.</li>
73
	 * 	<li><code>default_cache_config</code> - <code>string</code> - Optional - This option allows a preferred storage type to be configured for long-term caching. This can be changed later using the <set_cache_config()> method. Valid values are: <code>apc</code>, <code>xcache</code>, or a file system path such as <code>./cache</code> or <code>/tmp/cache/</code>.</li>
74
	 * 	<li><code>key</code> - <code>string</code> - Optional - Your AWS key, or a session key. If blank, the default credential set will be used.</li>
75
	 * 	<li><code>secret</code> - <code>string</code> - Optional - Your AWS secret key, or a session secret key. If blank, the default credential set will be used.</li>
76
	 * 	<li><code>token</code> - <code>string</code> - Optional - An AWS session token.</li></ul>
77
	 * @return void
78
	 */
79
	public function __construct(array $options = array())
80
	{
81
		$this->api_version = '2010-12-01';
82
		$this->hostname = self::DEFAULT_URL;
83
		$this->auth_class = 'AuthV2Query';
84
 
85
		return parent::__construct($options);
86
	}
87
 
88
 
89
	/*%******************************************************************************************%*/
90
	// SETTERS
91
 
92
	/**
93
	 * This allows you to explicitly sets the region for the service to use.
94
	 *
95
	 * @param string $region (Required) The region to explicitly set. Available options are <REGION_US_E1>.
96
	 * @return $this A reference to the current instance.
97
	 */
98
	public function set_region($region)
99
	{
100
		// @codeCoverageIgnoreStart
101
		$this->set_hostname($region);
102
		return $this;
103
		// @codeCoverageIgnoreEnd
104
	}
105
 
106
 
107
	/*%******************************************************************************************%*/
108
	// SERVICE METHODS
109
 
110
	/**
111
	 * Checks if the specified CNAME is available.
112
	 *
113
	 * @param string $cnameprefix (Required) The prefix used when this CNAME is reserved.
114
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
115
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
116
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
117
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
118
	 */
119
	public function check_dns_availability($cnameprefix, $opt = null)
120
	{
121
		if (!$opt) $opt = array();
122
		$opt['CNAMEPrefix'] = $cnameprefix;
123
 
124
		return $this->authenticate('CheckDNSAvailability', $opt);
125
	}
126
 
127
	/**
128
	 * Creates an application that has one configuration template named <code>default</code> and no
129
	 * application versions.
130
	 *
131
	 * <p class="note">
132
	 * The <code>default</code> configuration template is for a 32-bit version of the Amazon Linux
133
	 * operating system running the Tomcat 6 application container.
134
	 * </p>
135
	 *
136
	 * @param string $application_name (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 <code>InvalidParameterValue</code> error.
137
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
138
	 * 	<li><code>Description</code> - <code>string</code> - Optional - Describes the application.</li>
139
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
140
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
141
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
142
	 */
143
	public function create_application($application_name, $opt = null)
144
	{
145
		if (!$opt) $opt = array();
146
		$opt['ApplicationName'] = $application_name;
147
 
148
		return $this->authenticate('CreateApplication', $opt);
149
	}
150
 
151
	/**
152
	 * Creates an application version for the specified application.
153
	 *
154
	 * <p class="note">
155
	 * Once you create an application version with a specified Amazon S3 bucket and key location, you
156
	 * cannot change that Amazon S3 location. If you change the Amazon S3 location, you receive an
157
	 * exception when you attempt to launch an environment from the application version.
158
	 * </p>
159
	 *
160
	 * @param string $application_name (Required) The name of the application. If no application is found with this name, and <code>AutoCreateApplication</code> is <code>false</code>, returns an <code>InvalidParameterValue</code> error.
161
	 * @param string $version_label (Required) A label identifying this version. Constraint: Must be unique per application. If an application version already exists with this label for the specified application, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.
162
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
163
	 * 	<li><code>Description</code> - <code>string</code> - Optional - Describes this version.</li>
164
	 * 	<li><code>SourceBundle</code> - <code>array</code> - Optional - The Amazon S3 bucket and key that identify the location of the source bundle for this version. If data found at the Amazon S3 location exceeds the maximum allowed source bundle size, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error. Default: If not specified, AWS Elastic Beanstalk uses a sample application. If only partially specified (for example, a bucket is provided but not the key) or if no data is found at the Amazon S3 location, AWS Elastic Beanstalk returns an <code>InvalidParameterCombination</code> error. <ul>
165
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
166
	 * 			<li><code>S3Bucket</code> - <code>string</code> - Optional - The Amazon S3 bucket where the data is located.</li>
167
	 * 			<li><code>S3Key</code> - <code>string</code> - Optional - The Amazon S3 key where the data is located.</li>
168
	 * 		</ul></li>
169
	 * 	</ul></li>
170
	 * 	<li><code>AutoCreateApplication</code> - <code>boolean</code> - Optional - Determines how the system behaves if the specified application for this version does not already exist:<enumValues><value name="true"> <code>true</code>: Automatically creates the specified application for this version if it does not already exist.</value><value name="false"> <code>false</code>: Returns an <code>InvalidParameterValue</code> if the specified application for this version does not already exist.</value></enumValues><ul><li> <code>true</code>: Automatically creates the specified application for this release if it does not already exist.</li><li> <code>false</code>: Throws an <code>InvalidParameterValue</code> if the specified application for this release does not already exist.</li></ul>Default: <code>false</code> Valid Values: <code>true</code> | <code>false</code></li>
171
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
172
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
173
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
174
	 */
175
	public function create_application_version($application_name, $version_label, $opt = null)
176
	{
177
		if (!$opt) $opt = array();
178
		$opt['ApplicationName'] = $application_name;
179
		$opt['VersionLabel'] = $version_label;
180
 
181
		// Optional map (non-list)
182
		if (isset($opt['SourceBundle']))
183
		{
184
			$opt = array_merge($opt, CFComplexType::map(array(
185
				'SourceBundle' => $opt['SourceBundle']
186
			), 'member'));
187
			unset($opt['SourceBundle']);
188
		}
189
 
190
		return $this->authenticate('CreateApplicationVersion', $opt);
191
	}
192
 
193
	/**
194
	 * Creates a configuration template. Templates are associated with a specific application and are
195
	 * used to deploy different versions of the application with the same configuration settings.
196
	 *
197
	 * Related Topics
198
	 *
199
	 * <ul>
200
	 * 	<li><code>DescribeConfigurationOptions</code></li>
201
	 * 	<li><code>DescribeConfigurationSettings</code></li>
202
	 * 	<li><code>ListAvailableSolutionStacks</code></li>
203
	 * </ul>
204
	 *
205
	 * @param string $application_name (Required) The name of the application to associate with this configuration template. If no application is found with this name, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.
206
	 * @param string $template_name (Required) The name of the configuration template. Constraint: This name must be unique per application. Default: If a configuration template already exists with this name, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.
207
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
208
	 * 	<li><code>SolutionStackName</code> - <code>string</code> - Optional - The name of the solution stack used by this configuration. The solution stack specifies the operating system, architecture, and application server for a configuration template. It determines the set of configuration options as well as the possible and default values. Use <code>ListAvailableSolutionStacks</code> to obtain a list of available solution stacks. Default: If the <code>SolutionStackName</code> is not specified and the source configuration parameter is blank, AWS Elastic Beanstalk uses the default solution stack. If not specified and the source configuration parameter is specified, AWS Elastic Beanstalk uses the same solution stack as the source configuration template.</li>
209
	 * 	<li><code>SourceConfiguration</code> - <code>array</code> - Optional - If specified, AWS Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration. Values specified in the <code>OptionSettings</code> parameter of this call overrides any values obtained from the <code>SourceConfiguration</code>. If no configuration template is found, returns an <code>InvalidParameterValue</code> error. Constraint: If both the solution stack name parameter and the source configuration parameters are specified, the solution stack of the source configuration template must match the specified solution stack name or else AWS Elastic Beanstalk returns an <code>InvalidParameterCombination</code> error. <ul>
210
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
211
	 * 			<li><code>ApplicationName</code> - <code>string</code> - Optional - The name of the application associated with the configuration.</li>
212
	 * 			<li><code>TemplateName</code> - <code>string</code> - Optional - The name of the configuration template.</li>
213
	 * 		</ul></li>
214
	 * 	</ul></li>
215
	 * 	<li><code>EnvironmentId</code> - <code>string</code> - Optional - The ID of the environment used with this configuration template.</li>
216
	 * 	<li><code>Description</code> - <code>string</code> - Optional - Describes this configuration.</li>
217
	 * 	<li><code>OptionSettings</code> - <code>array</code> - Optional - If specified, AWS Elastic Beanstalk sets the specified configuration option to the requested value. The new value overrides the value obtained from the solution stack or the source configuration template. <ul>
218
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
219
	 * 			<li><code>Namespace</code> - <code>string</code> - Optional - A unique namespace identifying the option's associated AWS resource.</li>
220
	 * 			<li><code>OptionName</code> - <code>string</code> - Optional - The name of the configuration option.</li>
221
	 * 			<li><code>Value</code> - <code>string</code> - Optional - The current value for the configuration option.</li>
222
	 * 		</ul></li>
223
	 * 	</ul></li>
224
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
225
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
226
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
227
	 */
228
	public function create_configuration_template($application_name, $template_name, $opt = null)
229
	{
230
		if (!$opt) $opt = array();
231
		$opt['ApplicationName'] = $application_name;
232
		$opt['TemplateName'] = $template_name;
233
 
234
		// Optional map (non-list)
235
		if (isset($opt['SourceConfiguration']))
236
		{
237
			$opt = array_merge($opt, CFComplexType::map(array(
238
				'SourceConfiguration' => $opt['SourceConfiguration']
239
			), 'member'));
240
			unset($opt['SourceConfiguration']);
241
		}
242
 
243
		// Optional list + map
244
		if (isset($opt['OptionSettings']))
245
		{
246
			$opt = array_merge($opt, CFComplexType::map(array(
247
				'OptionSettings' => $opt['OptionSettings']
248
			), 'member'));
249
			unset($opt['OptionSettings']);
250
		}
251
 
252
		return $this->authenticate('CreateConfigurationTemplate', $opt);
253
	}
254
 
255
	/**
256
	 * Launches an environment for the specified application using the specified configuration.
257
	 *
258
	 * @param string $application_name (Required) The name of the application that contains the version to be deployed. If no application is found with this name, <code>CreateEnvironment</code> returns an <code>InvalidParameterValue</code> error.
259
	 * @param string $environment_name (Required) A unique name for the deployment environment. Used in the application URL. Constraint: Must be from 4 to 23 characters in length. The name can contain only letters, numbers, and hyphens. It cannot start or end with a hyphen. This name must be unique in your account. If the specified name already exists, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error. Default: If the CNAME parameter is not specified, the environment name becomes part of the CNAME, and therefore part of the visible URL for your application.
260
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
261
	 * 	<li><code>VersionLabel</code> - <code>string</code> - Optional - The name of the application version to deploy. If the specified application has no associated application versions, AWS Elastic Beanstalk <code>UpdateEnvironment</code> returns an <code>InvalidParameterValue</code> error. Default: If not specified, AWS Elastic Beanstalk attempts to launch the most recently created application version.</li>
262
	 * 	<li><code>TemplateName</code> - <code>string</code> - Optional - The name of the configuration template to use in deployment. If no configuration template is found with this name, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error. Condition: You must specify either this parameter or a <code>SolutionStackName</code>, but not both. If you specify both, AWS Elastic Beanstalk returns an <code>InvalidParameterCombination</code> error. If you do not specify either, AWS Elastic Beanstalk returns a <code>MissingRequiredParameter</code> error.</li>
263
	 * 	<li><code>SolutionStackName</code> - <code>string</code> - Optional - This is an alternative to specifying a configuration name. If specified, AWS Elastic Beanstalk sets the configuration values to the default values associated with the specified solution stack. Condition: You must specify either this or a <code>TemplateName</code>, but not both. If you specify both, AWS Elastic Beanstalk returns an <code>InvalidParameterCombination</code> error. If you do not specify either, AWS Elastic Beanstalk returns a <code>MissingRequiredParameter</code> error.</li>
264
	 * 	<li><code>CNAMEPrefix</code> - <code>string</code> - Optional - If specified, the environment attempts to use this value as the prefix for the CNAME. If not specified, the environment uses the environment name.</li>
265
	 * 	<li><code>Description</code> - <code>string</code> - Optional - Describes this environment.</li>
266
	 * 	<li><code>OptionSettings</code> - <code>array</code> - Optional - If specified, AWS Elastic Beanstalk sets the specified configuration options to the requested value in the configuration set for the new environment. These override the values obtained from the solution stack or the configuration template. <ul>
267
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
268
	 * 			<li><code>Namespace</code> - <code>string</code> - Optional - A unique namespace identifying the option's associated AWS resource.</li>
269
	 * 			<li><code>OptionName</code> - <code>string</code> - Optional - The name of the configuration option.</li>
270
	 * 			<li><code>Value</code> - <code>string</code> - Optional - The current value for the configuration option.</li>
271
	 * 		</ul></li>
272
	 * 	</ul></li>
273
	 * 	<li><code>OptionsToRemove</code> - <code>array</code> - Optional - A list of custom user-defined configuration options to remove from the configuration set for this new environment. <ul>
274
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
275
	 * 			<li><code>Namespace</code> - <code>string</code> - Optional - A unique namespace identifying the option's associated AWS resource.</li>
276
	 * 			<li><code>OptionName</code> - <code>string</code> - Optional - The name of the configuration option.</li>
277
	 * 		</ul></li>
278
	 * 	</ul></li>
279
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
280
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
281
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
282
	 */
283
	public function create_environment($application_name, $environment_name, $opt = null)
284
	{
285
		if (!$opt) $opt = array();
286
		$opt['ApplicationName'] = $application_name;
287
		$opt['EnvironmentName'] = $environment_name;
288
 
289
		// Optional list + map
290
		if (isset($opt['OptionSettings']))
291
		{
292
			$opt = array_merge($opt, CFComplexType::map(array(
293
				'OptionSettings' => $opt['OptionSettings']
294
			), 'member'));
295
			unset($opt['OptionSettings']);
296
		}
297
 
298
		// Optional list + map
299
		if (isset($opt['OptionsToRemove']))
300
		{
301
			$opt = array_merge($opt, CFComplexType::map(array(
302
				'OptionsToRemove' => $opt['OptionsToRemove']
303
			), 'member'));
304
			unset($opt['OptionsToRemove']);
305
		}
306
 
307
		return $this->authenticate('CreateEnvironment', $opt);
308
	}
309
 
310
	/**
311
	 * Creates the Amazon S3 storage location for the account.
312
	 *
313
	 * This location is used to store user log files.
314
	 *
315
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
316
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
317
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
318
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
319
	 */
320
	public function create_storage_location($opt = null)
321
	{
322
		if (!$opt) $opt = array();
323
 
324
		return $this->authenticate('CreateStorageLocation', $opt);
325
	}
326
 
327
	/**
328
	 * Deletes the specified application along with all associated versions and configurations.
329
	 *
330
	 * <p class="note">
331
	 * You cannot delete an application that has a running environment.
332
	 * </p>
333
	 *
334
	 * @param string $application_name (Required) The name of the application to delete.
335
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
336
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
337
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
338
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
339
	 */
340
	public function delete_application($application_name, $opt = null)
341
	{
342
		if (!$opt) $opt = array();
343
		$opt['ApplicationName'] = $application_name;
344
 
345
		return $this->authenticate('DeleteApplication', $opt);
346
	}
347
 
348
	/**
349
	 * Deletes the specified version from the specified application.
350
	 *
351
	 * <p class="note">
352
	 * You cannot delete an application version that is associated with a running environment.
353
	 * </p>
354
	 *
355
	 * @param string $application_name (Required) The name of the application to delete releases from.
356
	 * @param string $version_label (Required) The label of the version to delete.
357
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
358
	 * 	<li><code>DeleteSourceBundle</code> - <code>boolean</code> - Optional - Indicates whether to delete the associated source bundle from Amazon S3:<ul><li> <code>true</code>: An attempt is made to delete the associated Amazon S3 source bundle specified at time of creation.</li><li> <code>false</code>: No action is taken on the Amazon S3 source bundle specified at time of creation.</li></ul>Valid Values: <code>true</code> | <code>false</code></li>
359
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
360
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
361
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
362
	 */
363
	public function delete_application_version($application_name, $version_label, $opt = null)
364
	{
365
		if (!$opt) $opt = array();
366
		$opt['ApplicationName'] = $application_name;
367
		$opt['VersionLabel'] = $version_label;
368
 
369
		return $this->authenticate('DeleteApplicationVersion', $opt);
370
	}
371
 
372
	/**
373
	 * Deletes the specified configuration template.
374
	 *
375
	 * <p class="note">
376
	 * When you launch an environment using a configuration template, the environment gets a copy of
377
	 * the template. You can delete or modify the environment's copy of the template without affecting
378
	 * the running environment.
379
	 * </p>
380
	 *
381
	 * @param string $application_name (Required) The name of the application to delete the configuration template from.
382
	 * @param string $template_name (Required) The name of the configuration template to delete.
383
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
384
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
385
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
386
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
387
	 */
388
	public function delete_configuration_template($application_name, $template_name, $opt = null)
389
	{
390
		if (!$opt) $opt = array();
391
		$opt['ApplicationName'] = $application_name;
392
		$opt['TemplateName'] = $template_name;
393
 
394
		return $this->authenticate('DeleteConfigurationTemplate', $opt);
395
	}
396
 
397
	/**
398
	 * Deletes the draft configuration associated with the running environment.
399
	 *
400
	 * Updating a running environment with any configuration changes creates a draft configuration
401
	 * set. You can get the draft configuration using <code>DescribeConfigurationSettings</code> while
402
	 * the update is in progress or if the update fails. The <code>DeploymentStatus</code> for the
403
	 * draft configuration indicates whether the deployment is in process or has failed. The draft
404
	 * configuration remains in existence until it is deleted with this action.
405
	 *
406
	 * @param string $application_name (Required) The name of the application the environment is associated with.
407
	 * @param string $environment_name (Required) The name of the environment to delete the draft configuration from.
408
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
409
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
410
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
411
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
412
	 */
413
	public function delete_environment_configuration($application_name, $environment_name, $opt = null)
414
	{
415
		if (!$opt) $opt = array();
416
		$opt['ApplicationName'] = $application_name;
417
		$opt['EnvironmentName'] = $environment_name;
418
 
419
		return $this->authenticate('DeleteEnvironmentConfiguration', $opt);
420
	}
421
 
422
	/**
423
	 * Returns descriptions for existing application versions.
424
	 *
425
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
426
	 * 	<li><code>ApplicationName</code> - <code>string</code> - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to only include ones that are associated with the specified application.</li>
427
	 * 	<li><code>VersionLabels</code> - <code>string|array</code> - Optional - If specified, restricts the returned descriptions to only include ones that have the specified version labels. Pass a string for a single value, or an indexed array for multiple values.</li>
428
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
429
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
430
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
431
	 */
432
	public function describe_application_versions($opt = null)
433
	{
434
		if (!$opt) $opt = array();
435
 
436
		// Optional list (non-map)
437
		if (isset($opt['VersionLabels']))
438
		{
439
			$opt = array_merge($opt, CFComplexType::map(array(
440
				'VersionLabels' => (is_array($opt['VersionLabels']) ? $opt['VersionLabels'] : array($opt['VersionLabels']))
441
			), 'member'));
442
			unset($opt['VersionLabels']);
443
		}
444
 
445
		return $this->authenticate('DescribeApplicationVersions', $opt);
446
	}
447
 
448
	/**
449
	 * Returns the descriptions of existing applications.
450
	 *
451
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
452
	 * 	<li><code>ApplicationNames</code> - <code>string|array</code> - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to only include those with the specified names. Pass a string for a single value, or an indexed array for multiple values.</li>
453
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
454
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
455
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
456
	 */
457
	public function describe_applications($opt = null)
458
	{
459
		if (!$opt) $opt = array();
460
 
461
		// Optional list (non-map)
462
		if (isset($opt['ApplicationNames']))
463
		{
464
			$opt = array_merge($opt, CFComplexType::map(array(
465
				'ApplicationNames' => (is_array($opt['ApplicationNames']) ? $opt['ApplicationNames'] : array($opt['ApplicationNames']))
466
			), 'member'));
467
			unset($opt['ApplicationNames']);
468
		}
469
 
470
		return $this->authenticate('DescribeApplications', $opt);
471
	}
472
 
473
	/**
474
	 * Describes the configuration options that are used in a particular configuration template or
475
	 * environment, or that a specified solution stack defines. The description includes the values
476
	 * the options, their default values, and an indication of the required action on a running
477
	 * environment if an option value is changed.
478
	 *
479
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
480
	 * 	<li><code>ApplicationName</code> - <code>string</code> - Optional - The name of the application associated with the configuration template or environment. Only needed if you want to describe the configuration options associated with either the configuration template or environment.</li>
481
	 * 	<li><code>TemplateName</code> - <code>string</code> - Optional - The name of the configuration template whose configuration options you want to describe.</li>
482
	 * 	<li><code>EnvironmentName</code> - <code>string</code> - Optional - The name of the environment whose configuration options you want to describe.</li>
483
	 * 	<li><code>SolutionStackName</code> - <code>string</code> - Optional - The name of the solution stack whose configuration options you want to describe.</li>
484
	 * 	<li><code>Options</code> - <code>array</code> - Optional - If specified, restricts the descriptions to only the specified options. <ul>
485
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
486
	 * 			<li><code>Namespace</code> - <code>string</code> - Optional - A unique namespace identifying the option's associated AWS resource.</li>
487
	 * 			<li><code>OptionName</code> - <code>string</code> - Optional - The name of the configuration option.</li>
488
	 * 		</ul></li>
489
	 * 	</ul></li>
490
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
491
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
492
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
493
	 */
494
	public function describe_configuration_options($opt = null)
495
	{
496
		if (!$opt) $opt = array();
497
 
498
		// Optional list + map
499
		if (isset($opt['Options']))
500
		{
501
			$opt = array_merge($opt, CFComplexType::map(array(
502
				'Options' => $opt['Options']
503
			), 'member'));
504
			unset($opt['Options']);
505
		}
506
 
507
		return $this->authenticate('DescribeConfigurationOptions', $opt);
508
	}
509
 
510
	/**
511
	 * Returns a description of the settings for the specified configuration set, that is, either a
512
	 * configuration template or the configuration set associated with a running environment.
513
	 *
514
	 * When describing the settings for the configuration set associated with a running environment,
515
	 * it is possible to receive two sets of setting descriptions. One is the deployed configuration
516
	 * set, and the other is a draft configuration of an environment that is either in the process of
517
	 * deployment or that failed to deploy.
518
	 *
519
	 * Related Topics
520
	 *
521
	 * <ul>
522
	 * 	<li><code>DeleteEnvironmentConfiguration</code></li>
523
	 * </ul>
524
	 *
525
	 * @param string $application_name (Required) The application for the environment or configuration template.
526
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
527
	 * 	<li><code>TemplateName</code> - <code>string</code> - Optional - The name of the configuration template to describe. Conditional: You must specify either this parameter or an EnvironmentName, but not both. If you specify both, AWS Elastic Beanstalk returns an <code>InvalidParameterCombination</code> error. If you do not specify either, AWS Elastic Beanstalk returns a <code>MissingRequiredParameter</code> error.</li>
528
	 * 	<li><code>EnvironmentName</code> - <code>string</code> - Optional - The name of the environment to describe. Condition: You must specify either this or a TemplateName, but not both. If you specify both, AWS Elastic Beanstalk returns an <code>InvalidParameterCombination</code> error. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
529
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
530
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
531
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
532
	 */
533
	public function describe_configuration_settings($application_name, $opt = null)
534
	{
535
		if (!$opt) $opt = array();
536
		$opt['ApplicationName'] = $application_name;
537
 
538
		return $this->authenticate('DescribeConfigurationSettings', $opt);
539
	}
540
 
541
	/**
542
	 * Returns AWS resources for this environment.
543
	 *
544
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
545
	 * 	<li><code>EnvironmentId</code> - <code>string</code> - Optional - The ID of the environment to retrieve AWS resource usage data. Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
546
	 * 	<li><code>EnvironmentName</code> - <code>string</code> - Optional - The name of the environment to retrieve AWS resource usage data. Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
547
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
548
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
549
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
550
	 */
551
	public function describe_environment_resources($opt = null)
552
	{
553
		if (!$opt) $opt = array();
554
 
555
		return $this->authenticate('DescribeEnvironmentResources', $opt);
556
	}
557
 
558
	/**
559
	 * Returns descriptions for existing environments.
560
	 *
561
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
562
	 * 	<li><code>ApplicationName</code> - <code>string</code> - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.</li>
563
	 * 	<li><code>VersionLabel</code> - <code>string</code> - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application version.</li>
564
	 * 	<li><code>EnvironmentIds</code> - <code>string|array</code> - 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.</li>
565
	 * 	<li><code>EnvironmentNames</code> - <code>string|array</code> - 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.</li>
566
	 * 	<li><code>IncludeDeleted</code> - <code>boolean</code> - Optional - Indicates whether to include deleted environments: <code>true</code>: Environments that have been deleted after <code>IncludedDeletedBackTo</code> are displayed. <code>false</code>: Do not include deleted environments.</li>
567
	 * 	<li><code>IncludedDeletedBackTo</code> - <code>string</code> - Optional - If specified when <code>IncludeDeleted</code> is set to <code>true</code>, then environments deleted after this date are displayed. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
568
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
569
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
570
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
571
	 */
572
	public function describe_environments($opt = null)
573
	{
574
		if (!$opt) $opt = array();
575
 
576
		// Optional DateTime
577
		if (isset($opt['IncludedDeletedBackTo']))
578
		{
579
			$opt['IncludedDeletedBackTo'] = $this->util->convert_date_to_iso8601($opt['IncludedDeletedBackTo']);
580
		}
581
 
582
		// Optional list (non-map)
583
		if (isset($opt['EnvironmentIds']))
584
		{
585
			$opt = array_merge($opt, CFComplexType::map(array(
586
				'EnvironmentIds' => (is_array($opt['EnvironmentIds']) ? $opt['EnvironmentIds'] : array($opt['EnvironmentIds']))
587
			), 'member'));
588
			unset($opt['EnvironmentIds']);
589
		}
590
 
591
		// Optional list (non-map)
592
		if (isset($opt['EnvironmentNames']))
593
		{
594
			$opt = array_merge($opt, CFComplexType::map(array(
595
				'EnvironmentNames' => (is_array($opt['EnvironmentNames']) ? $opt['EnvironmentNames'] : array($opt['EnvironmentNames']))
596
			), 'member'));
597
			unset($opt['EnvironmentNames']);
598
		}
599
 
600
		return $this->authenticate('DescribeEnvironments', $opt);
601
	}
602
 
603
	/**
604
	 * Returns list of event descriptions matching criteria up to the last 6 weeks.
605
	 *
606
	 * <p class="note">
607
	 * This action returns the most recent 1,000 events from the specified <code>NextToken</code>.
608
	 * </p>
609
	 *
610
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
611
	 * 	<li><code>ApplicationName</code> - <code>string</code> - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those associated with this application.</li>
612
	 * 	<li><code>VersionLabel</code> - <code>string</code> - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this application version.</li>
613
	 * 	<li><code>TemplateName</code> - <code>string</code> - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that are associated with this environment configuration.</li>
614
	 * 	<li><code>EnvironmentId</code> - <code>string</code> - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this environment.</li>
615
	 * 	<li><code>EnvironmentName</code> - <code>string</code> - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to those associated with this environment.</li>
616
	 * 	<li><code>RequestId</code> - <code>string</code> - Optional - If specified, AWS Elastic Beanstalk restricts the described events to include only those associated with this request ID.</li>
617
	 * 	<li><code>Severity</code> - <code>string</code> - Optional - If specified, limits the events returned from this call to include only those with the specified severity or higher. [Allowed values: <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, <code>FATAL</code>]</li>
618
	 * 	<li><code>StartTime</code> - <code>string</code> - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that occur on or after this time. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
619
	 * 	<li><code>EndTime</code> - <code>string</code> - Optional - If specified, AWS Elastic Beanstalk restricts the returned descriptions to those that occur up to, but not including, the <code>EndTime</code>. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
620
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - Specifies the maximum number of events that can be returned, beginning with the most recent event.</li>
621
	 * 	<li><code>NextToken</code> - <code>string</code> - Optional - Pagination token. If specified, the events return the next batch of results.</li>
622
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
623
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
624
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
625
	 */
626
	public function describe_events($opt = null)
627
	{
628
		if (!$opt) $opt = array();
629
 
630
		// Optional DateTime
631
		if (isset($opt['StartTime']))
632
		{
633
			$opt['StartTime'] = $this->util->convert_date_to_iso8601($opt['StartTime']);
634
		}
635
 
636
		// Optional DateTime
637
		if (isset($opt['EndTime']))
638
		{
639
			$opt['EndTime'] = $this->util->convert_date_to_iso8601($opt['EndTime']);
640
		}
641
 
642
		return $this->authenticate('DescribeEvents', $opt);
643
	}
644
 
645
	/**
646
	 * Returns a list of the available solution stack names.
647
	 *
648
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
649
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
650
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
651
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
652
	 */
653
	public function list_available_solution_stacks($opt = null)
654
	{
655
		if (!$opt) $opt = array();
656
 
657
		return $this->authenticate('ListAvailableSolutionStacks', $opt);
658
	}
659
 
660
	/**
661
	 * Deletes and recreates all of the AWS resources (for example: the Auto Scaling group, load
662
	 * balancer, etc.) for a specified environment and forces a restart.
663
	 *
664
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
665
	 * 	<li><code>EnvironmentId</code> - <code>string</code> - Optional - The ID of the environment to rebuild. Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
666
	 * 	<li><code>EnvironmentName</code> - <code>string</code> - Optional - The name of the environment to rebuild. Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
667
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
668
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
669
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
670
	 */
671
	public function rebuild_environment($opt = null)
672
	{
673
		if (!$opt) $opt = array();
674
 
675
		return $this->authenticate('RebuildEnvironment', $opt);
676
	}
677
 
678
	/**
679
	 * Initiates a request to compile the specified type of information of the deployed environment.
680
	 *
681
	 * Setting the <code>InfoType</code> to <code>tail</code> compiles the last lines from the
682
	 * application server log files of every Amazon EC2 instance in your environment. Use
683
	 * <code>RetrieveEnvironmentInfo</code> to access the compiled information.
684
	 *
685
	 * Related Topics
686
	 *
687
	 * <ul>
688
	 * 	<li><code>RetrieveEnvironmentInfo</code></li>
689
	 * </ul>
690
	 *
691
	 * @param string $info_type (Required) The type of information to request. [Allowed values: <code>tail</code>]
692
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
693
	 * 	<li><code>EnvironmentId</code> - <code>string</code> - Optional - The ID of the environment of the requested data. If no such environment is found, <code>RequestEnvironmentInfo</code> returns an <code>InvalidParameterValue</code> error. Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
694
	 * 	<li><code>EnvironmentName</code> - <code>string</code> - Optional - The name of the environment of the requested data. If no such environment is found, <code>RequestEnvironmentInfo</code> returns an <code>InvalidParameterValue</code> error. Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
695
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
696
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
697
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
698
	 */
699
	public function request_environment_info($info_type, $opt = null)
700
	{
701
		if (!$opt) $opt = array();
702
		$opt['InfoType'] = $info_type;
703
 
704
		return $this->authenticate('RequestEnvironmentInfo', $opt);
705
	}
706
 
707
	/**
708
	 * Causes the environment to restart the application container server running on each Amazon EC2
709
	 * instance.
710
	 *
711
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
712
	 * 	<li><code>EnvironmentId</code> - <code>string</code> - Optional - The ID of the environment to restart the server for. Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
713
	 * 	<li><code>EnvironmentName</code> - <code>string</code> - Optional - The name of the environment to restart the server for. Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
714
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
715
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
716
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
717
	 */
718
	public function restart_app_server($opt = null)
719
	{
720
		if (!$opt) $opt = array();
721
 
722
		return $this->authenticate('RestartAppServer', $opt);
723
	}
724
 
725
	/**
726
	 * Retrieves the compiled information from a <code>RequestEnvironmentInfo</code> request.
727
	 *
728
	 * Related Topics
729
	 *
730
	 * <ul>
731
	 * 	<li><code>RequestEnvironmentInfo</code></li>
732
	 * </ul>
733
	 *
734
	 * @param string $info_type (Required) The type of information to retrieve. [Allowed values: <code>tail</code>]
735
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
736
	 * 	<li><code>EnvironmentId</code> - <code>string</code> - Optional - The ID of the data's environment. If no such environment is found, returns an <code>InvalidParameterValue</code> error. Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
737
	 * 	<li><code>EnvironmentName</code> - <code>string</code> - Optional - The name of the data's environment. If no such environment is found, returns an <code>InvalidParameterValue</code> error. Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
738
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
739
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
740
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
741
	 */
742
	public function retrieve_environment_info($info_type, $opt = null)
743
	{
744
		if (!$opt) $opt = array();
745
		$opt['InfoType'] = $info_type;
746
 
747
		return $this->authenticate('RetrieveEnvironmentInfo', $opt);
748
	}
749
 
750
	/**
751
	 * Swaps the CNAMEs of two environments.
752
	 *
753
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
754
	 * 	<li><code>SourceEnvironmentId</code> - <code>string</code> - Optional - The ID of the source environment. Condition: You must specify at least the <code>SourceEnvironmentID</code> or the <code>SourceEnvironmentName</code>. You may also specify both. If you specify the <code>SourceEnvironmentId</code>, you must specify the <code>DestinationEnvironmentId</code>.</li>
755
	 * 	<li><code>SourceEnvironmentName</code> - <code>string</code> - Optional - The name of the source environment. Condition: You must specify at least the <code>SourceEnvironmentID</code> or the <code>SourceEnvironmentName</code>. You may also specify both. If you specify the <code>SourceEnvironmentName</code>, you must specify the <code>DestinationEnvironmentName</code>.</li>
756
	 * 	<li><code>DestinationEnvironmentId</code> - <code>string</code> - Optional - The ID of the destination environment. Condition: You must specify at least the <code>DestinationEnvironmentID</code> or the <code>DestinationEnvironmentName</code>. You may also specify both. You must specify the <code>SourceEnvironmentId</code> with the <code>DestinationEnvironmentId</code>.</li>
757
	 * 	<li><code>DestinationEnvironmentName</code> - <code>string</code> - Optional - The name of the destination environment. Condition: You must specify at least the <code>DestinationEnvironmentID</code> or the <code>DestinationEnvironmentName</code>. You may also specify both. You must specify the <code>SourceEnvironmentName</code> with the <code>DestinationEnvironmentName</code>.</li>
758
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
759
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
760
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
761
	 */
762
	public function swap_environment_cnames($opt = null)
763
	{
764
		if (!$opt) $opt = array();
765
 
766
		return $this->authenticate('SwapEnvironmentCNAMEs', $opt);
767
	}
768
 
769
	/**
770
	 * Terminates the specified environment.
771
	 *
772
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
773
	 * 	<li><code>EnvironmentId</code> - <code>string</code> - Optional - The ID of the environment to terminate. Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
774
	 * 	<li><code>EnvironmentName</code> - <code>string</code> - Optional - The name of the environment to terminate. Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
775
	 * 	<li><code>TerminateResources</code> - <code>boolean</code> - Optional - Indicates whether the associated AWS resources should shut down when the environment is terminated:<enumValues><value name="true"> <code>true</code>: (default) The user AWS resources (for example, the Auto Scaling group, LoadBalancer, etc.) are terminated along with the environment.</value><value name="false"> <code>false</code>: The environment is removed from the AWS Elastic Beanstalk but the AWS resources continue to operate.</value></enumValues><ul><li> <code>true</code>: The specified environment as well as the associated AWS resources, such as Auto Scaling group and LoadBalancer, are terminated.</li><li> <code>false</code>: AWS Elastic Beanstalk resource management is removed from the environment, but the AWS resources continue to operate.</li></ul>For more information, see the <a href="http://docs.amazonwebservices.com/elasticbeanstalk/latest/ug/">AWS Elastic Beanstalk User Guide.</a> Default: <code>true</code> Valid Values: <code>true</code> | <code>false</code></li>
776
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
777
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
778
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
779
	 */
780
	public function terminate_environment($opt = null)
781
	{
782
		if (!$opt) $opt = array();
783
 
784
		return $this->authenticate('TerminateEnvironment', $opt);
785
	}
786
 
787
	/**
788
	 * Updates the specified application to have the specified properties.
789
	 *
790
	 * <p class="note">
791
	 * If a property (for example, <code>description</code>) is not provided, the value remains
792
	 * unchanged. To clear these properties, specify an empty string.
793
	 * </p>
794
	 *
795
	 * @param string $application_name (Required) The name of the application to update. If no such application is found, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error.
796
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
797
	 * 	<li><code>Description</code> - <code>string</code> - Optional - A new description for the application. Default: If not specified, AWS Elastic Beanstalk does not update the description.</li>
798
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
799
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
800
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
801
	 */
802
	public function update_application($application_name, $opt = null)
803
	{
804
		if (!$opt) $opt = array();
805
		$opt['ApplicationName'] = $application_name;
806
 
807
		return $this->authenticate('UpdateApplication', $opt);
808
	}
809
 
810
	/**
811
	 * Updates the specified application version to have the specified properties.
812
	 *
813
	 * <p class="note">
814
	 * If a property (for example, <code>description</code>) is not provided, the value remains
815
	 * unchanged. To clear properties, specify an empty string.
816
	 * </p>
817
	 *
818
	 * @param string $application_name (Required) The name of the application associated with this version. If no application is found with this name, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error.
819
	 * @param string $version_label (Required) The name of the version to update. If no application version is found with this label, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error.
820
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
821
	 * 	<li><code>Description</code> - <code>string</code> - Optional - A new description for this release.</li>
822
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
823
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
824
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
825
	 */
826
	public function update_application_version($application_name, $version_label, $opt = null)
827
	{
828
		if (!$opt) $opt = array();
829
		$opt['ApplicationName'] = $application_name;
830
		$opt['VersionLabel'] = $version_label;
831
 
832
		return $this->authenticate('UpdateApplicationVersion', $opt);
833
	}
834
 
835
	/**
836
	 * Updates the specified configuration template to have the specified properties or configuration
837
	 * option values.
838
	 *
839
	 * <p class="note">
840
	 * If a property (for example, <code>ApplicationName</code>) is not provided, its value remains
841
	 * unchanged. To clear such properties, specify an empty string.
842
	 * </p>
843
	 * Related Topics
844
	 *
845
	 * <ul>
846
	 * 	<li><code>DescribeConfigurationOptions</code></li>
847
	 * </ul>
848
	 *
849
	 * @param string $application_name (Required) The name of the application associated with the configuration template to update. If no application is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.
850
	 * @param string $template_name (Required) The name of the configuration template to update. If no configuration template is found with this name, <code>UpdateConfigurationTemplate</code> returns an <code>InvalidParameterValue</code> error.
851
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
852
	 * 	<li><code>Description</code> - <code>string</code> - Optional - A new description for the configuration.</li>
853
	 * 	<li><code>OptionSettings</code> - <code>array</code> - Optional - A list of configuration option settings to update with the new specified option value. <ul>
854
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
855
	 * 			<li><code>Namespace</code> - <code>string</code> - Optional - A unique namespace identifying the option's associated AWS resource.</li>
856
	 * 			<li><code>OptionName</code> - <code>string</code> - Optional - The name of the configuration option.</li>
857
	 * 			<li><code>Value</code> - <code>string</code> - Optional - The current value for the configuration option.</li>
858
	 * 		</ul></li>
859
	 * 	</ul></li>
860
	 * 	<li><code>OptionsToRemove</code> - <code>array</code> - Optional - A list of configuration options to remove from the configuration set. Constraint: You can remove only <code>UserDefined</code> configuration options. <ul>
861
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
862
	 * 			<li><code>Namespace</code> - <code>string</code> - Optional - A unique namespace identifying the option's associated AWS resource.</li>
863
	 * 			<li><code>OptionName</code> - <code>string</code> - Optional - The name of the configuration option.</li>
864
	 * 		</ul></li>
865
	 * 	</ul></li>
866
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
867
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
868
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
869
	 */
870
	public function update_configuration_template($application_name, $template_name, $opt = null)
871
	{
872
		if (!$opt) $opt = array();
873
		$opt['ApplicationName'] = $application_name;
874
		$opt['TemplateName'] = $template_name;
875
 
876
		// Optional list + map
877
		if (isset($opt['OptionSettings']))
878
		{
879
			$opt = array_merge($opt, CFComplexType::map(array(
880
				'OptionSettings' => $opt['OptionSettings']
881
			), 'member'));
882
			unset($opt['OptionSettings']);
883
		}
884
 
885
		// Optional list + map
886
		if (isset($opt['OptionsToRemove']))
887
		{
888
			$opt = array_merge($opt, CFComplexType::map(array(
889
				'OptionsToRemove' => $opt['OptionsToRemove']
890
			), 'member'));
891
			unset($opt['OptionsToRemove']);
892
		}
893
 
894
		return $this->authenticate('UpdateConfigurationTemplate', $opt);
895
	}
896
 
897
	/**
898
	 * Updates the environment description, deploys a new application version, updates the
899
	 * configuration settings to an entirely new configuration template, or updates select
900
	 * configuration option values in the running environment.
901
	 *
902
	 * Attempting to update both the release and configuration is not allowed and AWS Elastic
903
	 * Beanstalk returns an <code>InvalidParameterCombination</code> error.
904
	 *
905
	 * When updating the configuration settings to a new template or individual settings, a draft
906
	 * configuration is created and <code>DescribeConfigurationSettings</code> for this environment
907
	 * returns two setting descriptions with different <code>DeploymentStatus</code> values.
908
	 *
909
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
910
	 * 	<li><code>EnvironmentId</code> - <code>string</code> - Optional - The ID of the environment to update. If no environment with this ID exists, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error. Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
911
	 * 	<li><code>EnvironmentName</code> - <code>string</code> - Optional - The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error. Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</li>
912
	 * 	<li><code>VersionLabel</code> - <code>string</code> - Optional - If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. If no such application version is found, returns an <code>InvalidParameterValue</code> error.</li>
913
	 * 	<li><code>TemplateName</code> - <code>string</code> - Optional - If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If no such configuration template is found, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</li>
914
	 * 	<li><code>Description</code> - <code>string</code> - Optional - If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment.</li>
915
	 * 	<li><code>OptionSettings</code> - <code>array</code> - Optional - If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and sets the specified configuration options to the requested value. <ul>
916
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
917
	 * 			<li><code>Namespace</code> - <code>string</code> - Optional - A unique namespace identifying the option's associated AWS resource.</li>
918
	 * 			<li><code>OptionName</code> - <code>string</code> - Optional - The name of the configuration option.</li>
919
	 * 			<li><code>Value</code> - <code>string</code> - Optional - The current value for the configuration option.</li>
920
	 * 		</ul></li>
921
	 * 	</ul></li>
922
	 * 	<li><code>OptionsToRemove</code> - <code>array</code> - Optional - A list of custom user-defined configuration options to remove from the configuration set for this environment. <ul>
923
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
924
	 * 			<li><code>Namespace</code> - <code>string</code> - Optional - A unique namespace identifying the option's associated AWS resource.</li>
925
	 * 			<li><code>OptionName</code> - <code>string</code> - Optional - The name of the configuration option.</li>
926
	 * 		</ul></li>
927
	 * 	</ul></li>
928
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
929
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
930
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
931
	 */
932
	public function update_environment($opt = null)
933
	{
934
		if (!$opt) $opt = array();
935
 
936
		// Optional list + map
937
		if (isset($opt['OptionSettings']))
938
		{
939
			$opt = array_merge($opt, CFComplexType::map(array(
940
				'OptionSettings' => $opt['OptionSettings']
941
			), 'member'));
942
			unset($opt['OptionSettings']);
943
		}
944
 
945
		// Optional list + map
946
		if (isset($opt['OptionsToRemove']))
947
		{
948
			$opt = array_merge($opt, CFComplexType::map(array(
949
				'OptionsToRemove' => $opt['OptionsToRemove']
950
			), 'member'));
951
			unset($opt['OptionsToRemove']);
952
		}
953
 
954
		return $this->authenticate('UpdateEnvironment', $opt);
955
	}
956
 
957
	/**
958
	 * Takes a set of configuration settings and either a configuration template or environment, and
959
	 * determines whether those values are valid.
960
	 *
961
	 * This action returns a list of messages indicating any errors or warnings associated with the
962
	 * selection of option values.
963
	 *
964
	 * @param string $application_name (Required) The name of the application that the configuration template or environment belongs to.
965
	 * @param array $option_settings (Required) A list of the options and desired values to evaluate. <ul>
966
	 * 	<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
967
	 * 		<li><code>Namespace</code> - <code>string</code> - Optional - A unique namespace identifying the option's associated AWS resource.</li>
968
	 * 		<li><code>OptionName</code> - <code>string</code> - Optional - The name of the configuration option.</li>
969
	 * 		<li><code>Value</code> - <code>string</code> - Optional - The current value for the configuration option.</li>
970
	 * 	</ul></li>
971
	 * </ul>
972
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
973
	 * 	<li><code>TemplateName</code> - <code>string</code> - Optional - The name of the configuration template to validate the settings against. Condition: You cannot specify both this and an environment name.</li>
974
	 * 	<li><code>EnvironmentName</code> - <code>string</code> - Optional - The name of the environment to validate the settings against. Condition: You cannot specify both this and a configuration template name.</li>
975
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
976
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - 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.</li></ul>
977
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
978
	 */
979
	public function validate_configuration_settings($application_name, $option_settings, $opt = null)
980
	{
981
		if (!$opt) $opt = array();
982
		$opt['ApplicationName'] = $application_name;
983
 
984
		// Required list + map
985
		$opt = array_merge($opt, CFComplexType::map(array(
986
			'OptionSettings' => (is_array($option_settings) ? $option_settings : array($option_settings))
987
		), 'member'));
988
 
989
		return $this->authenticate('ValidateConfigurationSettings', $opt);
990
	}
991
}
992
 
993
 
994
/*%******************************************************************************************%*/
995
// EXCEPTIONS
996
 
997
class ElasticBeanstalk_Exception extends Exception {}