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 <em>Auto Scaling API Reference</em>. This guide provides detailed information about
19
 * Auto Scaling actions, data types, parameters, and errors. For detailed information about Auto
20
 * Scaling features and their associated API calls, go to the <a href=
21
 * "http://docs.amazonwebservices.com/AutoScaling/latest/DeveloperGuide/">Auto Scaling Developer
22
 * Guide</a>.
23
 *
24
 * Auto Scaling is a web service designed to automatically launch or terminate EC2 instances based
25
 * on user-defined policies, schedules, and health checks. This service is used in conjunction
26
 * with Amazon CloudWatch and Elastic Load Balancing services.
27
 *
28
 * This reference is based on the current WSDL, which is available at:
29
 *
30
 * 	<a href=
31
 * "http://autoscaling.amazonaws.com/doc/2011-01-01/AutoScaling.wsdl">http://autoscaling.amazonaws.com/doc/2011-01-01/AutoScaling.wsdl</a>
32
 *
33
 * <strong>Endpoints</strong>
34
 *
35
 * For information about this product's regions and endpoints, go to <a href=
36
 * "http://docs.amazonwebservices.com/general/latest/gr/index.html?rande.html">Regions and
37
 * Endpoints</a> in the Amazon Web Services General Reference.
38
 *
39
 * @version 2012.01.17
40
 * @license See the included NOTICE.md file for complete information.
41
 * @copyright See the included NOTICE.md file for complete information.
42
 * @link http://aws.amazon.com/as/ Auto Scaling
43
 * @link http://aws.amazon.com/as/documentation/ Auto Scaling documentation
44
 */
45
class AmazonAS extends CFRuntime
46
{
47
	/*%******************************************************************************************%*/
48
	// CLASS CONSTANTS
49
 
50
	/**
51
	 * Specify the queue URL for the United States East (Northern Virginia) Region.
52
	 */
53
	const REGION_US_E1 = 'autoscaling.us-east-1.amazonaws.com';
54
 
55
	/**
56
	 * Specify the queue URL for the United States East (Northern Virginia) Region.
57
	 */
58
	const REGION_VIRGINIA = self::REGION_US_E1;
59
 
60
	/**
61
	 * Specify the queue URL for the United States West (Northern California) Region.
62
	 */
63
	const REGION_US_W1 = 'autoscaling.us-west-1.amazonaws.com';
64
 
65
	/**
66
	 * Specify the queue URL for the United States West (Northern California) Region.
67
	 */
68
	const REGION_CALIFORNIA = self::REGION_US_W1;
69
 
70
	/**
71
	 * Specify the queue URL for the United States West (Oregon) Region.
72
	 */
73
	const REGION_US_W2 = 'autoscaling.us-west-2.amazonaws.com';
74
 
75
	/**
76
	 * Specify the queue URL for the United States West (Oregon) Region.
77
	 */
78
	const REGION_OREGON = self::REGION_US_W2;
79
 
80
	/**
81
	 * Specify the queue URL for the Europe West (Ireland) Region.
82
	 */
83
	const REGION_EU_W1 = 'autoscaling.eu-west-1.amazonaws.com';
84
 
85
	/**
86
	 * Specify the queue URL for the Europe West (Ireland) Region.
87
	 */
88
	const REGION_IRELAND = self::REGION_EU_W1;
89
 
90
	/**
91
	 * Specify the queue URL for the Asia Pacific Southeast (Singapore) Region.
92
	 */
93
	const REGION_APAC_SE1 = 'autoscaling.ap-southeast-1.amazonaws.com';
94
 
95
	/**
96
	 * Specify the queue URL for the Asia Pacific Southeast (Singapore) Region.
97
	 */
98
	const REGION_SINGAPORE = self::REGION_APAC_SE1;
99
 
100
	/**
101
	 * Specify the queue URL for the Asia Pacific Northeast (Tokyo) Region.
102
	 */
103
	const REGION_APAC_NE1 = 'autoscaling.ap-northeast-1.amazonaws.com';
104
 
105
	/**
106
	 * Specify the queue URL for the Asia Pacific Northeast (Tokyo) Region.
107
	 */
108
	const REGION_TOKYO = self::REGION_APAC_NE1;
109
 
110
	/**
111
	 * Specify the queue URL for the South America (Sao Paulo) Region.
112
	 */
113
	const REGION_SA_E1 = 'autoscaling.sa-east-1.amazonaws.com';
114
 
115
	/**
116
	 * Specify the queue URL for the South America (Sao Paulo) Region.
117
	 */
118
	const REGION_SAO_PAULO = self::REGION_SA_E1;
119
 
120
	/**
121
	 * Default service endpoint.
122
	 */
123
	const DEFAULT_URL = self::REGION_US_E1;
124
 
125
 
126
	/*%******************************************************************************************%*/
127
	// CONSTRUCTOR
128
 
129
	/**
130
	 * Constructs a new instance of <AmazonAS>.
131
	 *
132
	 * @param array $options (Optional) An associative array of parameters that can have the following keys: <ul>
133
	 * 	<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>
134
	 * 	<li><code>credentials</code> - <code>string</code> - Optional - The name of the credential set to use for authentication.</li>
135
	 * 	<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>
136
	 * 	<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>
137
	 * 	<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>
138
	 * 	<li><code>token</code> - <code>string</code> - Optional - An AWS session token.</li></ul>
139
	 * @return void
140
	 */
141
	public function __construct(array $options = array())
142
	{
143
		$this->api_version = '2011-01-01';
144
		$this->hostname = self::DEFAULT_URL;
145
		$this->auth_class = 'AuthV2Query';
146
 
147
		return parent::__construct($options);
148
	}
149
 
150
 
151
	/*%******************************************************************************************%*/
152
	// SETTERS
153
 
154
	/**
155
	 * This allows you to explicitly sets the region for the service to use.
156
	 *
157
	 * @param string $region (Required) The region to explicitly set. Available options are <REGION_US_E1>, <REGION_US_W1>, <REGION_US_W2>, <REGION_EU_W1>, <REGION_APAC_SE1>, <REGION_APAC_NE1>, <REGION_SA_E1>.
158
	 * @return $this A reference to the current instance.
159
	 */
160
	public function set_region($region)
161
	{
162
		// @codeCoverageIgnoreStart
163
		$this->set_hostname($region);
164
		return $this;
165
		// @codeCoverageIgnoreEnd
166
	}
167
 
168
 
169
	/*%******************************************************************************************%*/
170
	// SERVICE METHODS
171
 
172
	/**
173
	 * Creates a new Auto Scaling group with the specified name and other attributes. When the
174
	 * creation request is completed, the Auto Scaling group is ready to be used in other calls.
175
	 *
176
	 * <p class="note">
177
	 * The Auto Scaling group name must be unique within the scope of your AWS account, and under the
178
	 * quota of Auto Scaling groups allowed for your account.
179
	 * </p>
180
	 *
181
	 * @param string $auto_scaling_group_name (Required) The name of the Auto Scaling group. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
182
	 * @param string $launch_configuration_name (Required) The name of the launch configuration to use with the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
183
	 * @param integer $min_size (Required) The minimum size of the Auto Scaling group.
184
	 * @param integer $max_size (Required) The maximum size of the Auto Scaling group.
185
	 * @param string|array $availability_zones (Required) A list of Availability Zones for the Auto Scaling group. Pass a string for a single value, or an indexed array for multiple values.
186
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
187
	 * 	<li><code>DesiredCapacity</code> - <code>integer</code> - Optional - The number of Amazon EC2 instances that should be running in the group.</li>
188
	 * 	<li><code>DefaultCooldown</code> - <code>integer</code> - Optional - The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.</li>
189
	 * 	<li><code>LoadBalancerNames</code> - <code>string|array</code> - Optional - A list of load balancers to use. Pass a string for a single value, or an indexed array for multiple values.</li>
190
	 * 	<li><code>HealthCheckType</code> - <code>string</code> - Optional - The service you want the health status from, Amazon EC2 or Elastic Load Balancer. Valid values are <code>EC2</code> or <code>ELB</code>. [Constraints: The value must be between 1 and 32 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
191
	 * 	<li><code>HealthCheckGracePeriod</code> - <code>integer</code> - Optional - Length of time in seconds after a new Amazon EC2 instance comes into service that Auto Scaling starts checking its health.</li>
192
	 * 	<li><code>PlacementGroup</code> - <code>string</code> - Optional - Physical location of your cluster placement group created in Amazon EC2. For more information about cluster placement group, see <a href="http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using_cluster_computing.html">Using Cluster Instances</a> [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
193
	 * 	<li><code>VPCZoneIdentifier</code> - <code>string</code> - Optional - A comma-separated list of subnet identifiers of Amazon Virtual Private Clouds (Amazon VPCs). When you specify subnets and Availability Zones with this call, ensure that the subnets' Availability Zones match the Availability Zones specified. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
194
	 * 	<li><code>Tags</code> - <code>array</code> - Optional - The tag to be created. Each tag should be defined by its resource ID, resource type, key, value, and a propagate flag. The <code>PropagateAtLaunch</code> flag defines whether the new tag will be applied to instances launched after the tag is created. <ul>
195
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
196
	 * 			<li><code>ResourceId</code> - <code>string</code> - Optional - The name of the tag. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
197
	 * 			<li><code>ResourceType</code> - <code>string</code> - Optional - The kind of resource to which the tag is applied. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
198
	 * 			<li><code>Key</code> - <code>string</code> - Required - The key of the tag. [Constraints: The value must be between 1 and 128 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
199
	 * 			<li><code>Value</code> - <code>string</code> - Optional - The value of the tag. [Constraints: The value must be between 0 and 256 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
200
	 * 			<li><code>PropagateAtLaunch</code> - <code>boolean</code> - Optional - Specifies whether the new tag will be applied to instances launched after the tag is created. The same behavior applies to updates: If you change a tag, the changed tag will be applied to all instances launched after you made the change.</li>
201
	 * 		</ul></li>
202
	 * 	</ul></li>
203
	 * 	<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>
204
	 * 	<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>
205
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
206
	 */
207
	public function create_auto_scaling_group($auto_scaling_group_name, $launch_configuration_name, $min_size, $max_size, $availability_zones, $opt = null)
208
	{
209
		if (!$opt) $opt = array();
210
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
211
		$opt['LaunchConfigurationName'] = $launch_configuration_name;
212
		$opt['MinSize'] = $min_size;
213
		$opt['MaxSize'] = $max_size;
214
 
215
		// Required list (non-map)
216
		$opt = array_merge($opt, CFComplexType::map(array(
217
			'AvailabilityZones' => (is_array($availability_zones) ? $availability_zones : array($availability_zones))
218
		), 'member'));
219
 
220
		// Optional list (non-map)
221
		if (isset($opt['LoadBalancerNames']))
222
		{
223
			$opt = array_merge($opt, CFComplexType::map(array(
224
				'LoadBalancerNames' => (is_array($opt['LoadBalancerNames']) ? $opt['LoadBalancerNames'] : array($opt['LoadBalancerNames']))
225
			), 'member'));
226
			unset($opt['LoadBalancerNames']);
227
		}
228
 
229
		// Optional list + map
230
		if (isset($opt['Tags']))
231
		{
232
			$opt = array_merge($opt, CFComplexType::map(array(
233
				'Tags' => $opt['Tags']
234
			), 'member'));
235
			unset($opt['Tags']);
236
		}
237
 
238
		return $this->authenticate('CreateAutoScalingGroup', $opt);
239
	}
240
 
241
	/**
242
	 * Creates a new launch configuration. The launch configuration name must be unique within the
243
	 * scope of the client's AWS account. The maximum limit of launch configurations, which by default
244
	 * is 100, must not yet have been met; otherwise, the call will fail. When created, the new launch
245
	 * configuration is available for immediate use.
246
	 *
247
	 * You can create a launch configuration with Amazon EC2 security groups or with Amazon VPC
248
	 * security groups. However, you can't use Amazon EC2 security groups together with Amazon VPC
249
	 * security groups, or vice versa.
250
	 *
251
	 * <p class="note">
252
	 * At this time, Auto Scaling launch configurations don't support compressed (e.g. zipped) user
253
	 * data files.
254
	 * </p>
255
	 *
256
	 * @param string $launch_configuration_name (Required) The name of the launch configuration to create. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
257
	 * @param string $image_id (Required) Unique ID of the <em>Amazon Machine Image</em> (AMI) which was assigned during registration. For more information about Amazon EC2 images, please see <a href="http://aws.amazon.com/ec2/">Amazon EC2 product documentation</a>. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
258
	 * @param string $instance_type (Required) The instance type of the Amazon EC2 instance. For more information about Amazon EC2 instance types, please see <a href="http://aws.amazon.com/ec2/">Amazon EC2 product documentation</a> [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
259
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
260
	 * 	<li><code>KeyName</code> - <code>string</code> - Optional - The name of the Amazon EC2 key pair. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
261
	 * 	<li><code>SecurityGroups</code> - <code>string|array</code> - Optional - The names of the security groups with which to associate Amazon EC2 or Amazon VPC instances. Specify Amazon EC2 security groups using security group names, such as <code>websrv</code>. Specify Amazon VPC security groups using security group IDs, such as <code>sg-12345678</code>. For more information about Amazon EC2 security groups, go to <a href="http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?using-network-security.html">Using Security Groups</a> in the Amazon EC2 product documentation. For more information about Amazon VPC security groups, go to <a href="http://docs.amazonwebservices.com/AmazonVPC/latest/UserGuide/index.html?VPC_SecurityGroups.html">Security Groups</a> in the Amazon VPC product documentation. Pass a string for a single value, or an indexed array for multiple values.</li>
262
	 * 	<li><code>UserData</code> - <code>string</code> - Optional - The user data available to the launched Amazon EC2 instances. For more information about Amazon EC2 user data, please see <a href="http://aws.amazon.com/ec2/">Amazon EC2 product documentation</a>. [Constraints: The value must be between 0 and 21847 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
263
	 * 	<li><code>KernelId</code> - <code>string</code> - Optional - The ID of the kernel associated with the Amazon EC2 AMI. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
264
	 * 	<li><code>RamdiskId</code> - <code>string</code> - Optional - The ID of the RAM disk associated with the Amazon EC2 AMI. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
265
	 * 	<li><code>BlockDeviceMappings</code> - <code>array</code> - Optional - A list of mappings that specify how block devices are exposed to the instance. Each mapping is made up of a <em>VirtualName</em>, a <em>DeviceName</em>, and an <em>ebs</em> data structure that contains information about the associated Elastic Block Storage volume. For more information about Amazon EC2 BlockDeviceMappings, go to <a href="http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?block-device-mapping-concepts.html">Block Device Mapping</a> in the Amazon EC2 product documentation. <ul>
266
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
267
	 * 			<li><code>VirtualName</code> - <code>string</code> - Optional - The virtual name associated with the device. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
268
	 * 			<li><code>DeviceName</code> - <code>string</code> - Required - The name of the device within Amazon EC2. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
269
	 * 			<li><code>Ebs</code> - <code>array</code> - Optional - The Elastic Block Storage volume information. <ul>
270
	 * 				<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
271
	 * 					<li><code>SnapshotId</code> - <code>string</code> - Optional - The snapshot ID. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
272
	 * 					<li><code>VolumeSize</code> - <code>integer</code> - Optional - The volume size, in gigabytes.</li>
273
	 * 				</ul></li>
274
	 * 			</ul></li>
275
	 * 		</ul></li>
276
	 * 	</ul></li>
277
	 * 	<li><code>InstanceMonitoring</code> - <code>array</code> - Optional - Enables detailed monitoring, which is enabled by default. When detailed monitoring is enabled, CloudWatch will generate metrics every minute and your account will be charged a fee. When you disable detailed monitoring, by specifying <code>False</code>, Cloudwatch will generate metrics every 5 minutes. For information about monitoring, see the <a href="http://aws.amazon.com/cloudwatch/">Amazon CloudWatch</a> product page. <ul>
278
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
279
	 * 			<li><code>Enabled</code> - <code>boolean</code> - Optional - If <code>True</code>, instance monitoring is enabled.</li>
280
	 * 		</ul></li>
281
	 * 	</ul></li>
282
	 * 	<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>
283
	 * 	<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>
284
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
285
	 */
286
	public function create_launch_configuration($launch_configuration_name, $image_id, $instance_type, $opt = null)
287
	{
288
		if (!$opt) $opt = array();
289
		$opt['LaunchConfigurationName'] = $launch_configuration_name;
290
		$opt['ImageId'] = $image_id;
291
		$opt['InstanceType'] = $instance_type;
292
 
293
		// Optional list (non-map)
294
		if (isset($opt['SecurityGroups']))
295
		{
296
			$opt = array_merge($opt, CFComplexType::map(array(
297
				'SecurityGroups' => (is_array($opt['SecurityGroups']) ? $opt['SecurityGroups'] : array($opt['SecurityGroups']))
298
			), 'member'));
299
			unset($opt['SecurityGroups']);
300
		}
301
 
302
		// Optional list + map
303
		if (isset($opt['BlockDeviceMappings']))
304
		{
305
			$opt = array_merge($opt, CFComplexType::map(array(
306
				'BlockDeviceMappings' => $opt['BlockDeviceMappings']
307
			), 'member'));
308
			unset($opt['BlockDeviceMappings']);
309
		}
310
 
311
		// Optional map (non-list)
312
		if (isset($opt['InstanceMonitoring']))
313
		{
314
			$opt = array_merge($opt, CFComplexType::map(array(
315
				'InstanceMonitoring' => $opt['InstanceMonitoring']
316
			), 'member'));
317
			unset($opt['InstanceMonitoring']);
318
		}
319
 
320
		return $this->authenticate('CreateLaunchConfiguration', $opt);
321
	}
322
 
323
	/**
324
	 * Creates new tags or updates existing tags for an Auto Scaling group.
325
	 *
326
	 * When you use the <code>PropagateAtLaunch</code> flag, the tag you create will be applied to new
327
	 * instances launched by the Auto Scaling group. However, instances already running will not get
328
	 * the new or updated tag. Likewise, when you modify a tag, the updated version will be applied to
329
	 * new instances launched by the Auto Scaling group after the change. Instances that are already
330
	 * running that had the previous version of the tag will continue to have the older tag.
331
	 *
332
	 * @param array $tags (Required) The tag to be created or updated. Each tag should be defined by its resource ID, resource type, key, value, and a propagate flag. The <code>PropagateAtLaunch</code> flag defines whether the new tag will be applied to instances launched after the tag is created. <ul>
333
	 * 	<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
334
	 * 		<li><code>ResourceId</code> - <code>string</code> - Optional - The name of the tag. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
335
	 * 		<li><code>ResourceType</code> - <code>string</code> - Optional - The kind of resource to which the tag is applied. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
336
	 * 		<li><code>Key</code> - <code>string</code> - Required - The key of the tag. [Constraints: The value must be between 1 and 128 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
337
	 * 		<li><code>Value</code> - <code>string</code> - Optional - The value of the tag. [Constraints: The value must be between 0 and 256 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
338
	 * 		<li><code>PropagateAtLaunch</code> - <code>boolean</code> - Optional - Specifies whether the new tag will be applied to instances launched after the tag is created. The same behavior applies to updates: If you change a tag, the changed tag will be applied to all instances launched after you made the change.</li>
339
	 * 	</ul></li>
340
	 * </ul>
341
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
342
	 * 	<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>
343
	 * 	<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>
344
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
345
	 */
346
	public function create_or_update_tags($tags, $opt = null)
347
	{
348
		if (!$opt) $opt = array();
349
 
350
		// Required list + map
351
		$opt = array_merge($opt, CFComplexType::map(array(
352
			'Tags' => (is_array($tags) ? $tags : array($tags))
353
		), 'member'));
354
 
355
		return $this->authenticate('CreateOrUpdateTags', $opt);
356
	}
357
 
358
	/**
359
	 * Deletes the specified Auto Scaling group if the group has no instances and no scaling
360
	 * activities in progress.
361
	 *
362
	 * <p class="note">
363
	 * To remove all instances before calling <code>DeleteAutoScalingGroup</code>, you can call
364
	 * <code>UpdateAutoScalingGroup</code> to set the minimum and maximum size of the AutoScalingGroup
365
	 * to zero.
366
	 * </p>
367
	 *
368
	 * @param string $auto_scaling_group_name (Required) The name of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
369
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
370
	 * 	<li><code>ForceDelete</code> - <code>boolean</code> - Optional - Starting with API version 2011-01-01, specifies that the Auto Scaling group will be deleted along with all instances associated with the group, without waiting for all instances to be terminated.</li>
371
	 * 	<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>
372
	 * 	<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>
373
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
374
	 */
375
	public function delete_auto_scaling_group($auto_scaling_group_name, $opt = null)
376
	{
377
		if (!$opt) $opt = array();
378
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
379
 
380
		return $this->authenticate('DeleteAutoScalingGroup', $opt);
381
	}
382
 
383
	/**
384
	 * Deletes the specified <code>LaunchConfiguration</code>.
385
	 *
386
	 * The specified launch configuration must not be attached to an Auto Scaling group. When this
387
	 * call completes, the launch configuration is no longer available for use.
388
	 *
389
	 * @param string $launch_configuration_name (Required) The name of the launch configuration. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
390
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
391
	 * 	<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>
392
	 * 	<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>
393
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
394
	 */
395
	public function delete_launch_configuration($launch_configuration_name, $opt = null)
396
	{
397
		if (!$opt) $opt = array();
398
		$opt['LaunchConfigurationName'] = $launch_configuration_name;
399
 
400
		return $this->authenticate('DeleteLaunchConfiguration', $opt);
401
	}
402
 
403
	/**
404
	 * Deletes notifications created by <code>PutNotificationConfiguration</code>.
405
	 *
406
	 * @param string $auto_scaling_group_name (Required) The name of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
407
	 * @param string $topic_arn (Required) The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
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_notification_configuration($auto_scaling_group_name, $topic_arn, $opt = null)
414
	{
415
		if (!$opt) $opt = array();
416
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
417
		$opt['TopicARN'] = $topic_arn;
418
 
419
		return $this->authenticate('DeleteNotificationConfiguration', $opt);
420
	}
421
 
422
	/**
423
	 * Deletes a policy created by <code>PutScalingPolicy</code>.
424
	 *
425
	 * @param string $policy_name (Required) The name or PolicyARN of the policy you want to delete. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
426
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
427
	 * 	<li><code>AutoScalingGroupName</code> - <code>string</code> - Optional - The name of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</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 delete_policy($policy_name, $opt = null)
433
	{
434
		if (!$opt) $opt = array();
435
		$opt['PolicyName'] = $policy_name;
436
 
437
		return $this->authenticate('DeletePolicy', $opt);
438
	}
439
 
440
	/**
441
	 * Deletes a scheduled action previously created using the
442
	 * <code>PutScheduledUpdateGroupAction</code>.
443
	 *
444
	 * @param string $scheduled_action_name (Required) The name of the action you want to delete. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
445
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
446
	 * 	<li><code>AutoScalingGroupName</code> - <code>string</code> - Optional - The name of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
447
	 * 	<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>
448
	 * 	<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>
449
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
450
	 */
451
	public function delete_scheduled_action($scheduled_action_name, $opt = null)
452
	{
453
		if (!$opt) $opt = array();
454
		$opt['ScheduledActionName'] = $scheduled_action_name;
455
 
456
		return $this->authenticate('DeleteScheduledAction', $opt);
457
	}
458
 
459
	/**
460
	 * Removes the specified tags or a set of tags from a set of resources.
461
	 *
462
	 * @param array $tags (Required) The tag to be deleted. Each tag should be defined by its resource ID, resource type, key, value, and a propagate flag. The <code>PropagateAtLaunch</code> flag defines whether the new tag will be applied to instances launched after the tag is created. <ul>
463
	 * 	<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
464
	 * 		<li><code>ResourceId</code> - <code>string</code> - Optional - The name of the tag. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
465
	 * 		<li><code>ResourceType</code> - <code>string</code> - Optional - The kind of resource to which the tag is applied. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
466
	 * 		<li><code>Key</code> - <code>string</code> - Required - The key of the tag. [Constraints: The value must be between 1 and 128 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
467
	 * 		<li><code>Value</code> - <code>string</code> - Optional - The value of the tag. [Constraints: The value must be between 0 and 256 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
468
	 * 		<li><code>PropagateAtLaunch</code> - <code>boolean</code> - Optional - Specifies whether the new tag will be applied to instances launched after the tag is created. The same behavior applies to updates: If you change a tag, the changed tag will be applied to all instances launched after you made the change.</li>
469
	 * 	</ul></li>
470
	 * </ul>
471
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
472
	 * 	<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>
473
	 * 	<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>
474
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
475
	 */
476
	public function delete_tags($tags, $opt = null)
477
	{
478
		if (!$opt) $opt = array();
479
 
480
		// Required list + map
481
		$opt = array_merge($opt, CFComplexType::map(array(
482
			'Tags' => (is_array($tags) ? $tags : array($tags))
483
		), 'member'));
484
 
485
		return $this->authenticate('DeleteTags', $opt);
486
	}
487
 
488
	/**
489
	 * Returns policy adjustment types for use in the <code>PutScalingPolicy</code> action.
490
	 *
491
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
492
	 * 	<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>
493
	 * 	<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>
494
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
495
	 */
496
	public function describe_adjustment_types($opt = null)
497
	{
498
		if (!$opt) $opt = array();
499
 
500
		return $this->authenticate('DescribeAdjustmentTypes', $opt);
501
	}
502
 
503
	/**
504
	 * Returns a full description of each Auto Scaling group in the given list. This includes all
505
	 * Amazon EC2 instances that are members of the group. If a list of names is not provided, the
506
	 * service returns the full details of all Auto Scaling groups.
507
	 *
508
	 * This action supports pagination by returning a token if there are more pages to retrieve. To
509
	 * get the next page, call this action again with the returned token as the <code>NextToken</code>
510
	 * parameter.
511
	 *
512
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
513
	 * 	<li><code>AutoScalingGroupNames</code> - <code>string|array</code> - Optional - A list of Auto Scaling group names. Pass a string for a single value, or an indexed array for multiple values.</li>
514
	 * 	<li><code>NextToken</code> - <code>string</code> - Optional - A string that marks the start of the next batch of returned results. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
515
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to return.</li>
516
	 * 	<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>
517
	 * 	<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>
518
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
519
	 */
520
	public function describe_auto_scaling_groups($opt = null)
521
	{
522
		if (!$opt) $opt = array();
523
 
524
		// Optional list (non-map)
525
		if (isset($opt['AutoScalingGroupNames']))
526
		{
527
			$opt = array_merge($opt, CFComplexType::map(array(
528
				'AutoScalingGroupNames' => (is_array($opt['AutoScalingGroupNames']) ? $opt['AutoScalingGroupNames'] : array($opt['AutoScalingGroupNames']))
529
			), 'member'));
530
			unset($opt['AutoScalingGroupNames']);
531
		}
532
 
533
		return $this->authenticate('DescribeAutoScalingGroups', $opt);
534
	}
535
 
536
	/**
537
	 * Returns a description of each Auto Scaling instance in the <code>InstanceIds</code> list. If a
538
	 * list is not provided, the service returns the full details of all instances up to a maximum of
539
	 * 50. By default, the service returns a list of 20 items.
540
	 *
541
	 * This action supports pagination by returning a token if there are more pages to retrieve. To
542
	 * get the next page, call this action again with the returned token as the <code>NextToken</code>
543
	 * parameter.
544
	 *
545
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
546
	 * 	<li><code>InstanceIds</code> - <code>string|array</code> - Optional - The list of Auto Scaling instances to describe. If this list is omitted, all auto scaling instances are described. The list of requested instances cannot contain more than 50 items. If unknown instances are requested, they are ignored with no error. Pass a string for a single value, or an indexed array for multiple values.</li>
547
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of Auto Scaling instances to be described with each call.</li>
548
	 * 	<li><code>NextToken</code> - <code>string</code> - Optional - The token returned by a previous call to indicate that there is more data available. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
549
	 * 	<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>
550
	 * 	<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>
551
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
552
	 */
553
	public function describe_auto_scaling_instances($opt = null)
554
	{
555
		if (!$opt) $opt = array();
556
 
557
		// Optional list (non-map)
558
		if (isset($opt['InstanceIds']))
559
		{
560
			$opt = array_merge($opt, CFComplexType::map(array(
561
				'InstanceIds' => (is_array($opt['InstanceIds']) ? $opt['InstanceIds'] : array($opt['InstanceIds']))
562
			), 'member'));
563
			unset($opt['InstanceIds']);
564
		}
565
 
566
		return $this->authenticate('DescribeAutoScalingInstances', $opt);
567
	}
568
 
569
	/**
570
	 * Returns a list of all notification types that are supported by Auto Scaling.
571
	 *
572
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
573
	 * 	<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>
574
	 * 	<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>
575
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
576
	 */
577
	public function describe_auto_scaling_notification_types($opt = null)
578
	{
579
		if (!$opt) $opt = array();
580
 
581
		return $this->authenticate('DescribeAutoScalingNotificationTypes', $opt);
582
	}
583
 
584
	/**
585
	 * Returns a full description of the launch configurations, or the specified launch
586
	 * configurations, if they exist.
587
	 *
588
	 * If no name is specified, then the full details of all launch configurations are returned.
589
	 *
590
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
591
	 * 	<li><code>LaunchConfigurationNames</code> - <code>string|array</code> - Optional - A list of launch configuration names. Pass a string for a single value, or an indexed array for multiple values.</li>
592
	 * 	<li><code>NextToken</code> - <code>string</code> - Optional - A string that marks the start of the next batch of returned results. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
593
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of launch configurations. The default is 100.</li>
594
	 * 	<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>
595
	 * 	<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>
596
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
597
	 */
598
	public function describe_launch_configurations($opt = null)
599
	{
600
		if (!$opt) $opt = array();
601
 
602
		// Optional list (non-map)
603
		if (isset($opt['LaunchConfigurationNames']))
604
		{
605
			$opt = array_merge($opt, CFComplexType::map(array(
606
				'LaunchConfigurationNames' => (is_array($opt['LaunchConfigurationNames']) ? $opt['LaunchConfigurationNames'] : array($opt['LaunchConfigurationNames']))
607
			), 'member'));
608
			unset($opt['LaunchConfigurationNames']);
609
		}
610
 
611
		return $this->authenticate('DescribeLaunchConfigurations', $opt);
612
	}
613
 
614
	/**
615
	 * Returns a list of metrics and a corresponding list of granularities for each metric.
616
	 *
617
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
618
	 * 	<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>
619
	 * 	<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>
620
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
621
	 */
622
	public function describe_metric_collection_types($opt = null)
623
	{
624
		if (!$opt) $opt = array();
625
 
626
		return $this->authenticate('DescribeMetricCollectionTypes', $opt);
627
	}
628
 
629
	/**
630
	 * Returns a list of notification actions associated with Auto Scaling groups for specified
631
	 * events.
632
	 *
633
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
634
	 * 	<li><code>AutoScalingGroupNames</code> - <code>string|array</code> - Optional - The name of the Auto Scaling group. Pass a string for a single value, or an indexed array for multiple values.</li>
635
	 * 	<li><code>NextToken</code> - <code>string</code> - Optional - A string that is used to mark the start of the next batch of returned results for pagination. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
636
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - Maximum number of records to be returned.</li>
637
	 * 	<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>
638
	 * 	<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>
639
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
640
	 */
641
	public function describe_notification_configurations($opt = null)
642
	{
643
		if (!$opt) $opt = array();
644
 
645
		// Optional list (non-map)
646
		if (isset($opt['AutoScalingGroupNames']))
647
		{
648
			$opt = array_merge($opt, CFComplexType::map(array(
649
				'AutoScalingGroupNames' => (is_array($opt['AutoScalingGroupNames']) ? $opt['AutoScalingGroupNames'] : array($opt['AutoScalingGroupNames']))
650
			), 'member'));
651
			unset($opt['AutoScalingGroupNames']);
652
		}
653
 
654
		return $this->authenticate('DescribeNotificationConfigurations', $opt);
655
	}
656
 
657
	/**
658
	 * Returns descriptions of what each policy does. This action supports pagination. If the response
659
	 * includes a token, there are more records available. To get the additional records, repeat the
660
	 * request with the response token as the <code>NextToken</code> parameter.
661
	 *
662
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
663
	 * 	<li><code>AutoScalingGroupName</code> - <code>string</code> - Optional - The name of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
664
	 * 	<li><code>PolicyNames</code> - <code>string|array</code> - Optional - A list of policy names or policy ARNs to be described. If this list is omitted, all policy names are described. If an auto scaling group name is provided, the results are limited to that group. The list of requested policy names cannot contain more than 50 items. If unknown policy names are requested, they are ignored with no error. Pass a string for a single value, or an indexed array for multiple values.</li>
665
	 * 	<li><code>NextToken</code> - <code>string</code> - Optional - A string that is used to mark the start of the next batch of returned results for pagination. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
666
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of policies that will be described with each call.</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 describe_policies($opt = null)
672
	{
673
		if (!$opt) $opt = array();
674
 
675
		// Optional list (non-map)
676
		if (isset($opt['PolicyNames']))
677
		{
678
			$opt = array_merge($opt, CFComplexType::map(array(
679
				'PolicyNames' => (is_array($opt['PolicyNames']) ? $opt['PolicyNames'] : array($opt['PolicyNames']))
680
			), 'member'));
681
			unset($opt['PolicyNames']);
682
		}
683
 
684
		return $this->authenticate('DescribePolicies', $opt);
685
	}
686
 
687
	/**
688
	 * Returns the scaling activities for the specified Auto Scaling group.
689
	 *
690
	 * If the specified <code>ActivityIds</code> list is empty, all the activities from the past six
691
	 * weeks are returned. Activities are sorted by completion time. Activities still in progress
692
	 * appear first on the list.
693
	 *
694
	 * This action supports pagination. If the response includes a token, there are more records
695
	 * available. To get the additional records, repeat the request with the response token as the
696
	 * <code>NextToken</code> parameter.
697
	 *
698
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
699
	 * 	<li><code>ActivityIds</code> - <code>string|array</code> - Optional - A list containing the activity IDs of the desired scaling activities. If this list is omitted, all activities are described. If an <code>AutoScalingGroupName</code> is provided, the results are limited to that group. The list of requested activities cannot contain more than 50 items. If unknown activities are requested, they are ignored with no error. Pass a string for a single value, or an indexed array for multiple values.</li>
700
	 * 	<li><code>AutoScalingGroupName</code> - <code>string</code> - Optional - The name of the <code>AutoScalingGroup</code>. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
701
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of scaling activities to return.</li>
702
	 * 	<li><code>NextToken</code> - <code>string</code> - Optional - A string that marks the start of the next batch of returned results for pagination. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
703
	 * 	<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>
704
	 * 	<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>
705
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
706
	 */
707
	public function describe_scaling_activities($opt = null)
708
	{
709
		if (!$opt) $opt = array();
710
 
711
		// Optional list (non-map)
712
		if (isset($opt['ActivityIds']))
713
		{
714
			$opt = array_merge($opt, CFComplexType::map(array(
715
				'ActivityIds' => (is_array($opt['ActivityIds']) ? $opt['ActivityIds'] : array($opt['ActivityIds']))
716
			), 'member'));
717
			unset($opt['ActivityIds']);
718
		}
719
 
720
		return $this->authenticate('DescribeScalingActivities', $opt);
721
	}
722
 
723
	/**
724
	 * Returns scaling process types for use in the <code>ResumeProcesses</code> and
725
	 * <code>SuspendProcesses</code> actions.
726
	 *
727
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
728
	 * 	<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>
729
	 * 	<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>
730
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
731
	 */
732
	public function describe_scaling_process_types($opt = null)
733
	{
734
		if (!$opt) $opt = array();
735
 
736
		return $this->authenticate('DescribeScalingProcessTypes', $opt);
737
	}
738
 
739
	/**
740
	 * Lists all the actions scheduled for your Auto Scaling group that haven't been executed. To see
741
	 * a list of actions already executed, see the activity record returned in
742
	 * <code>DescribeScalingActivities</code>.
743
	 *
744
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
745
	 * 	<li><code>AutoScalingGroupName</code> - <code>string</code> - Optional - The name of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
746
	 * 	<li><code>ScheduledActionNames</code> - <code>string|array</code> - Optional - A list of scheduled actions to be described. If this list is omitted, all scheduled actions are described. The list of requested scheduled actions cannot contain more than 50 items. If an auto scaling group name is provided, the results are limited to that group. If unknown scheduled actions are requested, they are ignored with no error. Pass a string for a single value, or an indexed array for multiple values.</li>
747
	 * 	<li><code>StartTime</code> - <code>string</code> - Optional - The earliest scheduled start time to return. If scheduled action names are provided, this field will be ignored. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
748
	 * 	<li><code>EndTime</code> - <code>string</code> - Optional - The latest scheduled start time to return. If scheduled action names are provided, this field is ignored. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
749
	 * 	<li><code>NextToken</code> - <code>string</code> - Optional - A string that marks the start of the next batch of returned results. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
750
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of scheduled actions to return.</li>
751
	 * 	<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>
752
	 * 	<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>
753
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
754
	 */
755
	public function describe_scheduled_actions($opt = null)
756
	{
757
		if (!$opt) $opt = array();
758
 
759
		// Optional DateTime
760
		if (isset($opt['StartTime']))
761
		{
762
			$opt['StartTime'] = $this->util->convert_date_to_iso8601($opt['StartTime']);
763
		}
764
 
765
		// Optional DateTime
766
		if (isset($opt['EndTime']))
767
		{
768
			$opt['EndTime'] = $this->util->convert_date_to_iso8601($opt['EndTime']);
769
		}
770
 
771
		// Optional list (non-map)
772
		if (isset($opt['ScheduledActionNames']))
773
		{
774
			$opt = array_merge($opt, CFComplexType::map(array(
775
				'ScheduledActionNames' => (is_array($opt['ScheduledActionNames']) ? $opt['ScheduledActionNames'] : array($opt['ScheduledActionNames']))
776
			), 'member'));
777
			unset($opt['ScheduledActionNames']);
778
		}
779
 
780
		return $this->authenticate('DescribeScheduledActions', $opt);
781
	}
782
 
783
	/**
784
	 * Lists the Auto Scaling tags.
785
	 *
786
	 * You can use filters to limit results when describing tags. For example, you can query for tags
787
	 * of a particular Auto Scaling group. You can specify multiple values for a filter. A tag must
788
	 * match at least one of the specified values for it to be included in the results.
789
	 *
790
	 * You can also specify multiple filters. The result includes information for a particular tag
791
	 * only if it matches all your filters. If there's no match, no special message is returned.
792
	 *
793
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
794
	 * 	<li><code>Filters</code> - <code>array</code> - Optional - The value of the filter type used to identify the tags to be returned. For example, you can filter so that<c>DescribeTags</c>returns tags according to Auto Scaling group, the key and value, or whether the new tag will be applied to instances launched after the tag is created (PropagateAtLaunch). <ul>
795
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
796
	 * 			<li><code>Name</code> - <code>string</code> - Optional - The name of the filter. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
797
	 * 			<li><code>Values</code> - <code>string|array</code> - Optional - The value of the filter. Pass a string for a single value, or an indexed array for multiple values.</li>
798
	 * 		</ul></li>
799
	 * 	</ul></li>
800
	 * 	<li><code>NextToken</code> - <code>string</code> - Optional - A string that marks the start of the next batch of returned results. [Constraints: The value must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
801
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to return.</li>
802
	 * 	<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>
803
	 * 	<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>
804
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
805
	 */
806
	public function describe_tags($opt = null)
807
	{
808
		if (!$opt) $opt = array();
809
 
810
		// Optional list + map
811
		if (isset($opt['Filters']))
812
		{
813
			$opt = array_merge($opt, CFComplexType::map(array(
814
				'Filters' => $opt['Filters']
815
			), 'member'));
816
			unset($opt['Filters']);
817
		}
818
 
819
		return $this->authenticate('DescribeTags', $opt);
820
	}
821
 
822
	/**
823
	 * Disables monitoring of group metrics for the Auto Scaling group specified in
824
	 * <code>AutoScalingGroupName</code>. You can specify the list of affected metrics with the
825
	 * <code>Metrics</code> parameter.
826
	 *
827
	 * @param string $auto_scaling_group_name (Required) The name or ARN of the Auto Scaling Group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
828
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
829
	 * 	<li><code>Metrics</code> - <code>string|array</code> - Optional - The list of metrics to disable. If no metrics are specified, all metrics are disabled. The following metrics are supported:<ul><li>GroupMinSize</li><li>GroupMaxSize</li><li>GroupDesiredCapacity</li><li>GroupInServiceInstances</li><li>GroupPendingInstances</li><li>GroupTerminatingInstances</li><li>GroupTotalInstances</li></ul> Pass a string for a single value, or an indexed array for multiple values.</li>
830
	 * 	<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>
831
	 * 	<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>
832
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
833
	 */
834
	public function disable_metrics_collection($auto_scaling_group_name, $opt = null)
835
	{
836
		if (!$opt) $opt = array();
837
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
838
 
839
		// Optional list (non-map)
840
		if (isset($opt['Metrics']))
841
		{
842
			$opt = array_merge($opt, CFComplexType::map(array(
843
				'Metrics' => (is_array($opt['Metrics']) ? $opt['Metrics'] : array($opt['Metrics']))
844
			), 'member'));
845
			unset($opt['Metrics']);
846
		}
847
 
848
		return $this->authenticate('DisableMetricsCollection', $opt);
849
	}
850
 
851
	/**
852
	 * Enables monitoring of group metrics for the Auto Scaling group specified in
853
	 * <code>AutoScalingGroupName</code>. You can specify the list of enabled metrics with the
854
	 * <code>Metrics</code> parameter.
855
	 *
856
	 * Auto scaling metrics collection can be turned on only if the <code>InstanceMonitoring</code>
857
	 * flag, in the Auto Scaling group's launch configuration, is set to <code>True</code>.
858
	 *
859
	 * @param string $auto_scaling_group_name (Required) The name or ARN of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
860
	 * @param string $granularity (Required) The granularity to associate with the metrics to collect. Currently, the only legal granularity is "1Minute". [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
861
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
862
	 * 	<li><code>Metrics</code> - <code>string|array</code> - Optional - The list of metrics to collect. If no metrics are specified, all metrics are enabled. The following metrics are supported:<ul><li>GroupMinSize</li><li>GroupMaxSize</li><li>GroupDesiredCapacity</li><li>GroupInServiceInstances</li><li>GroupPendingInstances</li><li>GroupTerminatingInstances</li><li>GroupTotalInstances</li></ul> Pass a string for a single value, or an indexed array for multiple values.</li>
863
	 * 	<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>
864
	 * 	<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>
865
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
866
	 */
867
	public function enable_metrics_collection($auto_scaling_group_name, $granularity, $opt = null)
868
	{
869
		if (!$opt) $opt = array();
870
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
871
		$opt['Granularity'] = $granularity;
872
 
873
		// Optional list (non-map)
874
		if (isset($opt['Metrics']))
875
		{
876
			$opt = array_merge($opt, CFComplexType::map(array(
877
				'Metrics' => (is_array($opt['Metrics']) ? $opt['Metrics'] : array($opt['Metrics']))
878
			), 'member'));
879
			unset($opt['Metrics']);
880
		}
881
 
882
		return $this->authenticate('EnableMetricsCollection', $opt);
883
	}
884
 
885
	/**
886
	 * Runs the policy you create for your Auto Scaling group in <code>PutScalingPolicy</code>.
887
	 *
888
	 * @param string $policy_name (Required) The name or PolicyARN of the policy you want to run. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
889
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
890
	 * 	<li><code>AutoScalingGroupName</code> - <code>string</code> - Optional - The name or ARN of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
891
	 * 	<li><code>HonorCooldown</code> - <code>boolean</code> - Optional - Set to <code>True</code> if you want Auto Scaling to reject this request when the Auto Scaling group is in cooldown.</li>
892
	 * 	<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>
893
	 * 	<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>
894
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
895
	 */
896
	public function execute_policy($policy_name, $opt = null)
897
	{
898
		if (!$opt) $opt = array();
899
		$opt['PolicyName'] = $policy_name;
900
 
901
		return $this->authenticate('ExecutePolicy', $opt);
902
	}
903
 
904
	/**
905
	 * Configures an Auto Scaling group to send notifications when specified events take place.
906
	 * Subscribers to this topic can have messages for events delivered to an endpoint such as a web
907
	 * server or email address.
908
	 *
909
	 * A new <code>PutNotificationConfiguration</code> overwrites an existing configuration.
910
	 *
911
	 * @param string $auto_scaling_group_name (Required) The name of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
912
	 * @param string $topic_arn (Required) The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
913
	 * @param string|array $notification_types (Required) The type of events that will trigger the notification. For more information, go to <code>DescribeAutoScalingNotificationTypes</code>. Pass a string for a single value, or an indexed array for multiple values.
914
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
915
	 * 	<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>
916
	 * 	<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>
917
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
918
	 */
919
	public function put_notification_configuration($auto_scaling_group_name, $topic_arn, $notification_types, $opt = null)
920
	{
921
		if (!$opt) $opt = array();
922
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
923
		$opt['TopicARN'] = $topic_arn;
924
 
925
		// Required list (non-map)
926
		$opt = array_merge($opt, CFComplexType::map(array(
927
			'NotificationTypes' => (is_array($notification_types) ? $notification_types : array($notification_types))
928
		), 'member'));
929
 
930
		return $this->authenticate('PutNotificationConfiguration', $opt);
931
	}
932
 
933
	/**
934
	 * Creates or updates a policy for an Auto Scaling group. To update an existing policy, use the
935
	 * existing policy name and set the parameter(s) you want to change. Any existing parameter not
936
	 * changed in an update to an existing policy is not changed in this update request.
937
	 *
938
	 * @param string $auto_scaling_group_name (Required) The name or ARN of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
939
	 * @param string $policy_name (Required) The name of the policy you want to create or update. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
940
	 * @param integer $scaling_adjustment (Required) The number of instances by which to scale. <code>AdjustmentType</code> determines the interpretation of this number (e.g., as an absolute number or as a percentage of the existing Auto Scaling group size). A positive increment adds to the current capacity and a negative value removes from the current capacity.
941
	 * @param string $adjustment_type (Required) Specifies whether the <code>ScalingAdjustment</code> is an absolute number or a percentage of the current capacity. Valid values are <code>ChangeInCapacity</code>, <code>ExactCapacity</code>, and <code>PercentChangeInCapacity</code>. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
942
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
943
	 * 	<li><code>Cooldown</code> - <code>integer</code> - Optional - The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.</li>
944
	 * 	<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>
945
	 * 	<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>
946
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
947
	 */
948
	public function put_scaling_policy($auto_scaling_group_name, $policy_name, $scaling_adjustment, $adjustment_type, $opt = null)
949
	{
950
		if (!$opt) $opt = array();
951
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
952
		$opt['PolicyName'] = $policy_name;
953
		$opt['ScalingAdjustment'] = $scaling_adjustment;
954
		$opt['AdjustmentType'] = $adjustment_type;
955
 
956
		return $this->authenticate('PutScalingPolicy', $opt);
957
	}
958
 
959
	/**
960
	 * Creates a scheduled scaling action for an Auto Scaling group. If you leave a parameter
961
	 * unspecified, the corresponding value remains unchanged in the affected Auto Scaling group.
962
	 *
963
	 * @param string $auto_scaling_group_name (Required) The name or ARN of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
964
	 * @param string $scheduled_action_name (Required) The name of this scaling action. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
965
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
966
	 * 	<li><code>Time</code> - <code>string</code> - Optional - <code>Time</code> is deprecated. The time for this action to start. <code>Time</code> is an alias for <code>StartTime</code> and can be specified instead of <code>StartTime</code>, or vice versa. If both <code>Time</code> and <code>StartTime</code> are specified, their values should be identical. Otherwise, <code>PutScheduledUpdateGroupAction</code> will return an error. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
967
	 * 	<li><code>StartTime</code> - <code>string</code> - Optional - The time for this action to start, as in <code>--start-time 2010-06-01T00:00:00Z</code>. When <code>StartTime</code> and <code>EndTime</code> are specified with <code>Recurrence</code>, they form the boundaries of when the recurring action will start and stop. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
968
	 * 	<li><code>EndTime</code> - <code>string</code> - Optional - The time for this action to end. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
969
	 * 	<li><code>Recurrence</code> - <code>string</code> - Optional - The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format. For information about cron syntax, go to <a href="http://en.wikipedia.org/wiki/Cron">Wikipedia, The Free Encyclopedia</a>. When <code>StartTime</code> and <code>EndTime</code> are specified with <code>Recurrence</code>, they form the boundaries of when the recurring action will start and stop. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
970
	 * 	<li><code>MinSize</code> - <code>integer</code> - Optional - The minimum size for the new Auto Scaling group.</li>
971
	 * 	<li><code>MaxSize</code> - <code>integer</code> - Optional - The maximum size for the Auto Scaling group.</li>
972
	 * 	<li><code>DesiredCapacity</code> - <code>integer</code> - Optional - The number of Amazon EC2 instances that should be running in the group.</li>
973
	 * 	<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>
974
	 * 	<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>
975
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
976
	 */
977
	public function put_scheduled_update_group_action($auto_scaling_group_name, $scheduled_action_name, $opt = null)
978
	{
979
		if (!$opt) $opt = array();
980
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
981
		$opt['ScheduledActionName'] = $scheduled_action_name;
982
 
983
		// Optional DateTime
984
		if (isset($opt['Time']))
985
		{
986
			$opt['Time'] = $this->util->convert_date_to_iso8601($opt['Time']);
987
		}
988
 
989
		// Optional DateTime
990
		if (isset($opt['StartTime']))
991
		{
992
			$opt['StartTime'] = $this->util->convert_date_to_iso8601($opt['StartTime']);
993
		}
994
 
995
		// Optional DateTime
996
		if (isset($opt['EndTime']))
997
		{
998
			$opt['EndTime'] = $this->util->convert_date_to_iso8601($opt['EndTime']);
999
		}
1000
 
1001
		return $this->authenticate('PutScheduledUpdateGroupAction', $opt);
1002
	}
1003
 
1004
	/**
1005
	 * Resumes Auto Scaling processes for an Auto Scaling group. For more information, see
1006
	 * <code>SuspendProcesses</code> and <code>ProcessType</code>.
1007
	 *
1008
	 * @param string $auto_scaling_group_name (Required) The name or Amazon Resource Name (ARN) of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
1009
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
1010
	 * 	<li><code>ScalingProcesses</code> - <code>string|array</code> - Optional - The processes that you want to suspend or resume, which can include one or more of the following:<ul><li>Launch</li><li>Terminate</li><li>HealthCheck</li><li>ReplaceUnhealthy</li><li>AZRebalance</li><li>AlarmNotifications</li><li>ScheduledActions</li><li>AddToLoadBalancer</li></ul>To suspend all process types, omit this parameter. Pass a string for a single value, or an indexed array for multiple values.</li>
1011
	 * 	<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>
1012
	 * 	<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>
1013
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
1014
	 */
1015
	public function resume_processes($auto_scaling_group_name, $opt = null)
1016
	{
1017
		if (!$opt) $opt = array();
1018
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
1019
 
1020
		// Optional list (non-map)
1021
		if (isset($opt['ScalingProcesses']))
1022
		{
1023
			$opt = array_merge($opt, CFComplexType::map(array(
1024
				'ScalingProcesses' => (is_array($opt['ScalingProcesses']) ? $opt['ScalingProcesses'] : array($opt['ScalingProcesses']))
1025
			), 'member'));
1026
			unset($opt['ScalingProcesses']);
1027
		}
1028
 
1029
		return $this->authenticate('ResumeProcesses', $opt);
1030
	}
1031
 
1032
	/**
1033
	 * Adjusts the desired size of the <code>AutoScalingGroup</code> by initiating scaling activities.
1034
	 * When reducing the size of the group, it is not possible to define which Amazon EC2 instances
1035
	 * will be terminated. This applies to any Auto Scaling decisions that might result in terminating
1036
	 * instances.
1037
	 *
1038
	 * There are two common use cases for <code>SetDesiredCapacity</code>: one for users of the Auto
1039
	 * Scaling triggering system, and another for developers who write their own triggering systems.
1040
	 * Both use cases relate to the concept of cooldown.
1041
	 *
1042
	 * In the first case, if you use the Auto Scaling triggering system,
1043
	 * <code>SetDesiredCapacity</code> changes the size of your Auto Scaling group without regard to
1044
	 * the cooldown period. This could be useful, for example, if Auto Scaling did something
1045
	 * unexpected for some reason. If your cooldown period is 10 minutes, Auto Scaling would normally
1046
	 * reject requests to change the size of the group for that entire 10-minute period. The
1047
	 * <code>SetDesiredCapacity</code> command allows you to circumvent this restriction and change
1048
	 * the size of the group before the end of the cooldown period.
1049
	 *
1050
	 * In the second case, if you write your own triggering system, you can use
1051
	 * <code>SetDesiredCapacity</code> to control the size of your Auto Scaling group. If you want the
1052
	 * same cooldown functionality that Auto Scaling offers, you can configure
1053
	 * <code>SetDesiredCapacity</code> to honor cooldown by setting the <code>HonorCooldown</code>
1054
	 * parameter to <code>true</code>.
1055
	 *
1056
	 * @param string $auto_scaling_group_name (Required) The name of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
1057
	 * @param integer $desired_capacity (Required) The new capacity setting for the Auto Scaling group.
1058
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
1059
	 * 	<li><code>HonorCooldown</code> - <code>boolean</code> - Optional - By default, <code>SetDesiredCapacity</code> overrides any cooldown period. Set to <code>True</code> if you want Auto Scaling to reject this request when the Auto Scaling group is in cooldown.</li>
1060
	 * 	<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>
1061
	 * 	<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>
1062
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
1063
	 */
1064
	public function set_desired_capacity($auto_scaling_group_name, $desired_capacity, $opt = null)
1065
	{
1066
		if (!$opt) $opt = array();
1067
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
1068
		$opt['DesiredCapacity'] = $desired_capacity;
1069
 
1070
		return $this->authenticate('SetDesiredCapacity', $opt);
1071
	}
1072
 
1073
	/**
1074
	 * Sets the health status of an instance.
1075
	 *
1076
	 * @param string $instance_id (Required) The identifier of the Amazon EC2 instance. [Constraints: The value must be between 1 and 16 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
1077
	 * @param string $health_status (Required) The health status of the instance. "Healthy" means that the instance is healthy and should remain in service. "Unhealthy" means that the instance is unhealthy. Auto Scaling should terminate and replace it. [Constraints: The value must be between 1 and 32 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
1078
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
1079
	 * 	<li><code>ShouldRespectGracePeriod</code> - <code>boolean</code> - Optional - If True, this call should respect the grace period associated with the group.</li>
1080
	 * 	<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>
1081
	 * 	<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>
1082
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
1083
	 */
1084
	public function set_instance_health($instance_id, $health_status, $opt = null)
1085
	{
1086
		if (!$opt) $opt = array();
1087
		$opt['InstanceId'] = $instance_id;
1088
		$opt['HealthStatus'] = $health_status;
1089
 
1090
		return $this->authenticate('SetInstanceHealth', $opt);
1091
	}
1092
 
1093
	/**
1094
	 * Suspends Auto Scaling processes for an Auto Scaling group. To suspend specific process types,
1095
	 * specify them by name with the <code>ScalingProcesses.member.N</code> parameter. To suspend all
1096
	 * process types, omit the <code>ScalingProcesses.member.N</code> parameter.
1097
	 *
1098
	 * <p class="important"></p>
1099
	 * Suspending either of the two primary process types, <code>Launch</code> or
1100
	 * <code>Terminate</code>, can prevent other process types from functioning properly. For more
1101
	 * information about processes and their dependencies, see <code>ProcessType</code>.
1102
	 *
1103
	 * To resume processes that have been suspended, use <code>ResumeProcesses</code>.
1104
	 *
1105
	 * @param string $auto_scaling_group_name (Required) The name or Amazon Resource Name (ARN) of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
1106
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
1107
	 * 	<li><code>ScalingProcesses</code> - <code>string|array</code> - Optional - The processes that you want to suspend or resume, which can include one or more of the following:<ul><li>Launch</li><li>Terminate</li><li>HealthCheck</li><li>ReplaceUnhealthy</li><li>AZRebalance</li><li>AlarmNotifications</li><li>ScheduledActions</li><li>AddToLoadBalancer</li></ul>To suspend all process types, omit this parameter. Pass a string for a single value, or an indexed array for multiple values.</li>
1108
	 * 	<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>
1109
	 * 	<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>
1110
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
1111
	 */
1112
	public function suspend_processes($auto_scaling_group_name, $opt = null)
1113
	{
1114
		if (!$opt) $opt = array();
1115
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
1116
 
1117
		// Optional list (non-map)
1118
		if (isset($opt['ScalingProcesses']))
1119
		{
1120
			$opt = array_merge($opt, CFComplexType::map(array(
1121
				'ScalingProcesses' => (is_array($opt['ScalingProcesses']) ? $opt['ScalingProcesses'] : array($opt['ScalingProcesses']))
1122
			), 'member'));
1123
			unset($opt['ScalingProcesses']);
1124
		}
1125
 
1126
		return $this->authenticate('SuspendProcesses', $opt);
1127
	}
1128
 
1129
	/**
1130
	 * Terminates the specified instance. Optionally, the desired group size can be adjusted.
1131
	 *
1132
	 * <p class="note">
1133
	 * This call simply registers a termination request. The termination of the instance cannot happen
1134
	 * immediately.
1135
	 * </p>
1136
	 *
1137
	 * @param string $instance_id (Required) The ID of the Amazon EC2 instance to be terminated. [Constraints: The value must be between 1 and 16 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
1138
	 * @param boolean $should_decrement_desired_capacity (Required) Specifies whether (<em>true</em>) or not (<em>false</em>) terminating this instance should also decrement the size of the <code>AutoScalingGroup</code>.
1139
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
1140
	 * 	<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>
1141
	 * 	<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>
1142
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
1143
	 */
1144
	public function terminate_instance_in_auto_scaling_group($instance_id, $should_decrement_desired_capacity, $opt = null)
1145
	{
1146
		if (!$opt) $opt = array();
1147
		$opt['InstanceId'] = $instance_id;
1148
		$opt['ShouldDecrementDesiredCapacity'] = $should_decrement_desired_capacity;
1149
 
1150
		return $this->authenticate('TerminateInstanceInAutoScalingGroup', $opt);
1151
	}
1152
 
1153
	/**
1154
	 * Updates the configuration for the specified <code>AutoScalingGroup</code>.
1155
	 *
1156
	 * <p class="note"></p>
1157
	 * To update an Auto Scaling group with a launch configuration that has the
1158
	 * <code>InstanceMonitoring</code> flag set to <code>False</code>, you must first ensure that
1159
	 * collection of group metrics is disabled. Otherwise, calls to
1160
	 * <code>UpdateAutoScalingGroup</code> will fail. If you have previously enabled group metrics
1161
	 * collection, you can disable collection of all group metrics by calling
1162
	 * <code>DisableMetricsCollection</code>.
1163
	 *
1164
	 * The new settings are registered upon the completion of this call. Any launch configuration
1165
	 * settings take effect on any triggers after this call returns. Triggers that are currently in
1166
	 * progress aren't affected.
1167
	 *
1168
	 * <p class="note">
1169
	 * If the new values are specified for the <em>MinSize</em> or <em>MaxSize</em> parameters, then
1170
	 * there will be an implicit call to <code>SetDesiredCapacity</code> to set the group to the new
1171
	 * <em>MaxSize</em>. All optional parameters are left unchanged if not passed in the request.
1172
	 * </p>
1173
	 *
1174
	 * @param string $auto_scaling_group_name (Required) The name of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]
1175
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
1176
	 * 	<li><code>LaunchConfigurationName</code> - <code>string</code> - Optional - The name of the launch configuration. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
1177
	 * 	<li><code>MinSize</code> - <code>integer</code> - Optional - The minimum size of the Auto Scaling group.</li>
1178
	 * 	<li><code>MaxSize</code> - <code>integer</code> - Optional - The maximum size of the Auto Scaling group.</li>
1179
	 * 	<li><code>DesiredCapacity</code> - <code>integer</code> - Optional - The desired capacity for the Auto Scaling group.</li>
1180
	 * 	<li><code>DefaultCooldown</code> - <code>integer</code> - Optional - The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.</li>
1181
	 * 	<li><code>AvailabilityZones</code> - <code>string|array</code> - Optional - Availability Zones for the group. Pass a string for a single value, or an indexed array for multiple values.</li>
1182
	 * 	<li><code>HealthCheckType</code> - <code>string</code> - Optional - The service of interest for the health status check, either "EC2" for Amazon EC2 or "ELB" for Elastic Load Balancing. [Constraints: The value must be between 1 and 32 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
1183
	 * 	<li><code>HealthCheckGracePeriod</code> - <code>integer</code> - Optional - The length of time that Auto Scaling waits before checking an instance's health status. The grace period begins when an instance comes into service.</li>
1184
	 * 	<li><code>PlacementGroup</code> - <code>string</code> - Optional - The name of the cluster placement group, if applicable. For more information, go to <a href="http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using_cluster_computing.html">Using Cluster Instances</a> in the Amazon EC2 User Guide. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
1185
	 * 	<li><code>VPCZoneIdentifier</code> - <code>string</code> - Optional - The subnet identifier for the Amazon VPC connection, if applicable. You can specify several subnets in a comma-separated list. When you specify <code>VPCZoneIdentifier</code> with <code>AvailabilityZones</code>, ensure that the subnets' Availability Zones match the values you specify for <code>AvailabilityZones</code>. [Constraints: The value must be between 1 and 255 characters, and must match the following regular expression pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>]</li>
1186
	 * 	<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>
1187
	 * 	<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>
1188
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
1189
	 */
1190
	public function update_auto_scaling_group($auto_scaling_group_name, $opt = null)
1191
	{
1192
		if (!$opt) $opt = array();
1193
		$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
1194
 
1195
		// Optional list (non-map)
1196
		if (isset($opt['AvailabilityZones']))
1197
		{
1198
			$opt = array_merge($opt, CFComplexType::map(array(
1199
				'AvailabilityZones' => (is_array($opt['AvailabilityZones']) ? $opt['AvailabilityZones'] : array($opt['AvailabilityZones']))
1200
			), 'member'));
1201
			unset($opt['AvailabilityZones']);
1202
		}
1203
 
1204
		return $this->authenticate('UpdateAutoScalingGroup', $opt);
1205
	}
1206
}
1207
 
1208
 
1209
/*%******************************************************************************************%*/
1210
// EXCEPTIONS
1211
 
1212
class AS_Exception extends Exception {}