PageRenderTime 48ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 1ms

/vendors/aws-sdk/services/ec2.class.php

https://github.com/joebeeson/amazon
PHP | 3813 lines | 1107 code | 300 blank | 2406 comment | 168 complexity | 32edd84b329ffa27a9dc688554fe2534 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <?php
  2. /*
  3. * Copyright 2010 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. * File: AmazonEC2
  18. * Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity
  19. * in the cloud. It is designed to make web-scale computing easier for developers.
  20. *
  21. * Amazon EC2's simple web service interface allows you to obtain and configure capacity with minimal
  22. * friction. It provides you with complete control of your computing resources and lets you run on
  23. * Amazon's proven computing environment. Amazon EC2 reduces the time required to obtain and boot new
  24. * server instances to minutes, allowing you to quickly scale capacity, both up and down, as your
  25. * computing requirements change. Amazon EC2 changes the economics of computing by allowing you to pay
  26. * only for capacity that you actually use. Amazon EC2 provides developers the tools to build failure
  27. * resilient applications and isolate themselves from common failure scenarios.
  28. *
  29. * Visit [http://aws.amazon.com/ec2/](http://aws.amazon.com/ec2/) for more information.
  30. *
  31. * Version:
  32. * Fri Dec 03 16:23:55 PST 2010
  33. *
  34. * License and Copyright:
  35. * See the included NOTICE.md file for complete information.
  36. *
  37. * See Also:
  38. * [Amazon Elastic Compute Cloud](http://aws.amazon.com/ec2/)
  39. * [Amazon Elastic Compute Cloud documentation](http://aws.amazon.com/documentation/ec2/)
  40. */
  41. /*%******************************************************************************************%*/
  42. // EXCEPTIONS
  43. /**
  44. * Exception: EC2_Exception
  45. * Default EC2 Exception.
  46. */
  47. class EC2_Exception extends Exception {}
  48. /*%******************************************************************************************%*/
  49. // MAIN CLASS
  50. /**
  51. * Class: AmazonEC2
  52. * Container for all service-related methods.
  53. */
  54. class AmazonEC2 extends CFRuntime
  55. {
  56. /*%******************************************************************************************%*/
  57. // CLASS CONSTANTS
  58. /**
  59. * Constant: DEFAULT_URL
  60. * Specify the default queue URL.
  61. */
  62. const DEFAULT_URL = 'ec2.amazonaws.com';
  63. /**
  64. * Constant: REGION_US_E1
  65. * Specify the queue URL for the US-East (Northern Virginia) Region.
  66. */
  67. const REGION_US_E1 = 'us-east-1';
  68. /**
  69. * Constant: REGION_US_W1
  70. * Specify the queue URL for the US-West (Northern California) Region.
  71. */
  72. const REGION_US_W1 = 'us-west-1';
  73. /**
  74. * Constant: REGION_EU_W1
  75. * Specify the queue URL for the EU (Ireland) Region.
  76. */
  77. const REGION_EU_W1 = 'eu-west-1';
  78. /**
  79. * Constant: REGION_APAC_SE1
  80. * Specify the queue URL for the Asia Pacific (Singapore) Region.
  81. */
  82. const REGION_APAC_SE1 = 'ap-southeast-1';
  83. /**
  84. * Constant: STATE_PENDING
  85. * The "pending" state code of an EC2 instance. Useful for conditionals.
  86. */
  87. const STATE_PENDING = 0;
  88. /**
  89. * Constant: STATE_RUNNING
  90. * The "running" state code of an EC2 instance. Useful for conditionals.
  91. */
  92. const STATE_RUNNING = 16;
  93. /**
  94. * Constant: STATE_SHUTTING_DOWN
  95. * The "shutting-down" state code of an EC2 instance. Useful for conditionals.
  96. */
  97. const STATE_SHUTTING_DOWN = 32;
  98. /**
  99. * Constant: STATE_TERMINATED
  100. * The "terminated" state code of an EC2 instance. Useful for conditionals.
  101. */
  102. const STATE_TERMINATED = 48;
  103. /**
  104. * Constant: STATE_STOPPING
  105. * The "stopping" state code of an EC2 instance. Useful for conditionals.
  106. */
  107. const STATE_STOPPING = 64;
  108. /**
  109. * Constant: STATE_STOPPED
  110. * The "stopped" state code of an EC2 instance. Useful for conditionals.
  111. */
  112. const STATE_STOPPED = 80;
  113. /*%******************************************************************************************%*/
  114. // SETTERS
  115. /**
  116. * Method: set_region()
  117. * This allows you to explicitly sets the region for the service to use.
  118. *
  119. * Access:
  120. * public
  121. *
  122. * Parameters:
  123. * $region - _string_ (Required) The region to explicitly set. Available options are <REGION_US_E1>, <REGION_US_W1>, <REGION_EU_W1>, or <REGION_APAC_SE1>.
  124. *
  125. * Returns:
  126. * `$this`
  127. */
  128. public function set_region($region)
  129. {
  130. $this->set_hostname('http://ec2.'. $region .'.amazonaws.com');
  131. return $this;
  132. }
  133. /*%******************************************************************************************%*/
  134. // CONSTRUCTOR
  135. /**
  136. * Method: __construct()
  137. * Constructs a new instance of <AmazonEC2>.
  138. *
  139. * Access:
  140. * public
  141. *
  142. * Parameters:
  143. * $key - _string_ (Optional) Your Amazon API Key. If blank, it will look for the <AWS_KEY> constant.
  144. * $secret_key - _string_ (Optional) Your Amazon API Secret Key. If blank, it will look for the <AWS_SECRET_KEY> constant.
  145. *
  146. * Returns:
  147. * _boolean_ false if no valid values are set, otherwise true.
  148. */
  149. public function __construct($key = null, $secret_key = null)
  150. {
  151. $this->api_version = '2010-08-31';
  152. $this->hostname = self::DEFAULT_URL;
  153. if (!$key && !defined('AWS_KEY'))
  154. {
  155. throw new EC2_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.');
  156. }
  157. if (!$secret_key && !defined('AWS_SECRET_KEY'))
  158. {
  159. throw new EC2_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.');
  160. }
  161. return parent::__construct($key, $secret_key);
  162. }
  163. /*%******************************************************************************************%*/
  164. // SERVICE METHODS
  165. /**
  166. * Method: reboot_instances()
  167. * The RebootInstances operation requests a reboot of one or more instances. This operation is
  168. * asynchronous; it only queues a request to reboot the specified instance(s). The operation will
  169. * succeed if the instances are valid and belong to the user. Requests to reboot terminated instances
  170. * are ignored.
  171. *
  172. * Access:
  173. * public
  174. *
  175. * Parameters:
  176. * $instance_id - _string_|_array_ (Required) The list of instances to terminate. Pass a string for a single value, or an indexed array for multiple values.
  177. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  178. *
  179. * Keys for the $opt parameter:
  180. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  181. *
  182. * Returns:
  183. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  184. */
  185. public function reboot_instances($instance_id, $opt = null)
  186. {
  187. if (!$opt) $opt = array();
  188. // Required parameter
  189. $opt = array_merge($opt, CFComplexType::map(array(
  190. 'InstanceId' => (is_array($instance_id) ? $instance_id : array($instance_id))
  191. )));
  192. return $this->authenticate('RebootInstances', $opt, $this->hostname);
  193. }
  194. /**
  195. * Method: describe_placement_groups()
  196. * Returns information about one or more PlacementGroup instances in a user's account.
  197. *
  198. * Access:
  199. * public
  200. *
  201. * Parameters:
  202. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  203. *
  204. * Keys for the $opt parameter:
  205. * GroupName - _string_|_array_ (Optional) The name of the `PlacementGroup`. Pass a string for a single value, or an indexed array for multiple values.
  206. * Filter - _ComplexList_ (Optional) A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  207. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  208. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  209. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  210. *
  211. * Returns:
  212. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  213. */
  214. public function describe_placement_groups($opt = null)
  215. {
  216. if (!$opt) $opt = array();
  217. // Optional parameter
  218. if (isset($opt['GroupName']))
  219. {
  220. $opt = array_merge($opt, CFComplexType::map(array(
  221. 'GroupName' => (is_array($opt['GroupName']) ? $opt['GroupName'] : array($opt['GroupName']))
  222. )));
  223. unset($opt['GroupName']);
  224. }
  225. // Optional parameter
  226. if (isset($opt['Filter']))
  227. {
  228. $opt = array_merge($opt, CFComplexType::map(array(
  229. 'Filter' => $opt['Filter']
  230. )));
  231. unset($opt['Filter']);
  232. }
  233. return $this->authenticate('DescribePlacementGroups', $opt, $this->hostname);
  234. }
  235. /**
  236. * Method: run_instances()
  237. * The RunInstances operation launches a specified number of instances.
  238. *
  239. * If Amazon EC2 cannot launch the minimum number AMIs you request, no instances launch. If there is
  240. * insufficient capacity to launch the maximum number of AMIs you request, Amazon EC2 launches as many
  241. * as possible to satisfy the requested maximum values.
  242. *
  243. * Every instance is launched in a security group. If you do not specify a security group at launch,
  244. * the instances start in your default security group. For more information on creating security
  245. * groups, see CreateSecurityGroup.
  246. *
  247. * An optional instance type can be specified. For information about instance types, see Instance
  248. * Types.
  249. *
  250. * You can provide an optional key pair ID for each image in the launch request (for more information,
  251. * see CreateKeyPair). All instances that are created from images that use this key pair will have
  252. * access to the associated public key at boot. You can use this key to provide secure access to an
  253. * instance of an image on a per-instance basis. Amazon EC2 public images use this feature to provide
  254. * secure access without passwords.
  255. *
  256. * Launching public images without a key pair ID will leave them inaccessible.
  257. *
  258. * The public key material is made available to the instance at boot time by placing it in the
  259. * openssh_id.pub file on a logical device that is exposed to the instance as /dev/sda2 (the ephemeral
  260. * store). The format of this file is suitable for use as an entry within ~/.ssh/authorized_keys (the
  261. * OpenSSH format). This can be done at boot (e.g., as part of rc.local) allowing for secure access
  262. * without passwords.
  263. *
  264. * Optional user data can be provided in the launch request. All instances that collectively comprise
  265. * the launch request have access to this data For more information, see Instance Metadata.
  266. *
  267. * If any of the AMIs have a product code attached for which the user has not subscribed, the
  268. * RunInstances call will fail.
  269. *
  270. * We strongly recommend using the 2.6.18 Xen stock kernel with the c1.medium and c1.xlarge instances.
  271. * Although the default Amazon EC2 kernels will work, the new kernels provide greater stability and
  272. * performance for these instance types. For more information about kernels, see Kernels, RAM Disks,
  273. * and Block Device Mappings.
  274. *
  275. * Access:
  276. * public
  277. *
  278. * Parameters:
  279. * $image_id - _string_ (Required) Unique ID of a machine image, returned by a call to DescribeImages.
  280. * $min_count - _integer_ (Required) Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances are launched at all.
  281. * $max_count - _integer_ (Required) Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead. Between 1 and the maximum number allowed for your account (default: 20).
  282. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  283. *
  284. * Keys for the $opt parameter:
  285. * KeyName - _string_ (Optional) The name of the key pair.
  286. * SecurityGroup - _string_|_array_ (Optional) The names of the security groups into which the instances will be launched. Pass a string for a single value, or an indexed array for multiple values.
  287. * UserData - _string_ (Optional) Specifies additional information to make available to the instance(s).
  288. * InstanceType - _string_ (Optional) Specifies the instance type for the launched instances. [Allowed values: `t1.micro`, `m1.small`, `m1.large`, `m1.xlarge`, `m2.xlarge`, `m2.2xlarge`, `m2.4xlarge`, `c1.medium`, `c1.xlarge`, `cc1.4xlarge`, `cg1.4xlarge`]
  289. * Placement - _ComplexType_ (Optional) Specifies the placement constraints (Availability Zones) for launching the instances. A ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Placement` subtype (documented next), or by passing an associative array with the following `Placement`-prefixed entries as keys. See below for a list and a usage example.
  290. * Placement.AvailabilityZone - _string_ (Optional) The availability zone in which an Amazon EC2 instance runs.
  291. * Placement.GroupName - _string_ (Optional) The name of a PlacementGroup.
  292. * KernelId - _string_ (Optional) The ID of the kernel with which to launch the instance.
  293. * RamdiskId - _string_ (Optional) The ID of the RAM disk with which to launch the instance. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID.
  294. * BlockDeviceMapping - _ComplexList_ (Optional) A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `BlockDeviceMapping` subtype (documented next), or by passing an associative array with the following `BlockDeviceMapping`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  295. * BlockDeviceMapping.x.VirtualName - _string_ (Optional) Specifies the virtual device name.
  296. * BlockDeviceMapping.x.DeviceName - _string_ (Optional) Specifies the device name (e.g., /dev/sdh).
  297. * BlockDeviceMapping.x.Ebs.SnapshotId - _string_ (Optional) The ID of the snapshot from which the volume will be created.
  298. * BlockDeviceMapping.x.Ebs.VolumeSize - _integer_ (Optional) The size of the volume, in gigabytes.
  299. * BlockDeviceMapping.x.Ebs.DeleteOnTermination - _boolean_ (Optional) Specifies whether the Amazon EBS volume is deleted on instance termination.
  300. * BlockDeviceMapping.x.NoDevice - _string_ (Optional) Specifies the device name to suppress during instance launch.
  301. * Monitoring.Enabled - _boolean_ (Optional) Enables monitoring for the instance.
  302. * SubnetId - _string_ (Optional) Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.
  303. * DisableApiTermination - _boolean_ (Optional) Specifies whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs.
  304. * InstanceInitiatedShutdownBehavior - _string_ (Optional) Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.
  305. * License - _ComplexType_ (Optional) Specifies active licenses in use and attached to an Amazon EC2 instance. A ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `License` subtype (documented next), or by passing an associative array with the following `License`-prefixed entries as keys. See below for a list and a usage example.
  306. * License.Pool - _string_ (Optional) The license pool from which to take a license when starting Amazon EC2 instances in the associated `RunInstances` request.
  307. * PrivateIpAddress - _string_ (Optional) If you're using Amazon Virtual Private Cloud, you can optionally use this parameter to assign the instance a specific available IP address from the subnet.
  308. * ClientToken - _string_ (Optional) Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, go to How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
  309. * AdditionalInfo - _string_ (Optional) For internal use only.
  310. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  311. *
  312. * Returns:
  313. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  314. */
  315. public function run_instances($image_id, $min_count, $max_count, $opt = null)
  316. {
  317. if (!$opt) $opt = array();
  318. $opt['ImageId'] = $image_id;
  319. $opt['MinCount'] = $min_count;
  320. $opt['MaxCount'] = $max_count;
  321. // Optional parameter
  322. if (isset($opt['SecurityGroup']))
  323. {
  324. $opt = array_merge($opt, CFComplexType::map(array(
  325. 'SecurityGroup' => (is_array($opt['SecurityGroup']) ? $opt['SecurityGroup'] : array($opt['SecurityGroup']))
  326. )));
  327. unset($opt['SecurityGroup']);
  328. }
  329. // Optional parameter
  330. if (isset($opt['Placement']))
  331. {
  332. $opt = array_merge($opt, CFComplexType::map(array(
  333. 'Placement' => $opt['Placement']
  334. )));
  335. unset($opt['Placement']);
  336. }
  337. // Optional parameter
  338. if (isset($opt['BlockDeviceMapping']))
  339. {
  340. $opt = array_merge($opt, CFComplexType::map(array(
  341. 'BlockDeviceMapping' => $opt['BlockDeviceMapping']
  342. )));
  343. unset($opt['BlockDeviceMapping']);
  344. }
  345. // Optional parameter
  346. if (isset($opt['License']))
  347. {
  348. $opt = array_merge($opt, CFComplexType::map(array(
  349. 'License' => $opt['License']
  350. )));
  351. unset($opt['License']);
  352. }
  353. return $this->authenticate('RunInstances', $opt, $this->hostname);
  354. }
  355. /**
  356. * Method: describe_reserved_instances()
  357. * The DescribeReservedInstances operation describes Reserved Instances that were purchased for use
  358. * with your account.
  359. *
  360. * Access:
  361. * public
  362. *
  363. * Parameters:
  364. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  365. *
  366. * Keys for the $opt parameter:
  367. * ReservedInstancesId - _string_|_array_ (Optional) The optional list of Reserved Instance IDs to describe. Pass a string for a single value, or an indexed array for multiple values.
  368. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for ReservedInstances. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  369. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  370. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  371. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  372. *
  373. * Returns:
  374. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  375. */
  376. public function describe_reserved_instances($opt = null)
  377. {
  378. if (!$opt) $opt = array();
  379. // Optional parameter
  380. if (isset($opt['ReservedInstancesId']))
  381. {
  382. $opt = array_merge($opt, CFComplexType::map(array(
  383. 'ReservedInstancesId' => (is_array($opt['ReservedInstancesId']) ? $opt['ReservedInstancesId'] : array($opt['ReservedInstancesId']))
  384. )));
  385. unset($opt['ReservedInstancesId']);
  386. }
  387. // Optional parameter
  388. if (isset($opt['Filter']))
  389. {
  390. $opt = array_merge($opt, CFComplexType::map(array(
  391. 'Filter' => $opt['Filter']
  392. )));
  393. unset($opt['Filter']);
  394. }
  395. return $this->authenticate('DescribeReservedInstances', $opt, $this->hostname);
  396. }
  397. /**
  398. * Method: describe_subnets()
  399. * Gives you information about your subnets. You can filter the results to return information only
  400. * about subnets that match criteria you specify. For example, you could ask to get information about a
  401. * particular subnet (or all) only if the subnet's state is available. You can specify multiple filters
  402. * (e.g., the subnet is in a particular VPC, and the subnet's state is available). The result includes
  403. * information for a particular subnet only if the subnet matches all your filters. If there's no
  404. * match, no special message is returned; the response is simply empty. The following table shows the
  405. * available filters.
  406. *
  407. * Access:
  408. * public
  409. *
  410. * Parameters:
  411. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  412. *
  413. * Keys for the $opt parameter:
  414. * SubnetId - _string_|_array_ (Optional) A set of one or more subnet IDs. Pass a string for a single value, or an indexed array for multiple values.
  415. * Filter - _ComplexList_ (Optional) A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  416. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  417. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  418. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  419. *
  420. * Returns:
  421. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  422. */
  423. public function describe_subnets($opt = null)
  424. {
  425. if (!$opt) $opt = array();
  426. // Optional parameter
  427. if (isset($opt['SubnetId']))
  428. {
  429. $opt = array_merge($opt, CFComplexType::map(array(
  430. 'SubnetId' => (is_array($opt['SubnetId']) ? $opt['SubnetId'] : array($opt['SubnetId']))
  431. )));
  432. unset($opt['SubnetId']);
  433. }
  434. // Optional parameter
  435. if (isset($opt['Filter']))
  436. {
  437. $opt = array_merge($opt, CFComplexType::map(array(
  438. 'Filter' => $opt['Filter']
  439. )));
  440. unset($opt['Filter']);
  441. }
  442. return $this->authenticate('DescribeSubnets', $opt, $this->hostname);
  443. }
  444. /**
  445. * Method: describe_availability_zones()
  446. * The DescribeAvailabilityZones operation describes availability zones that are currently available to
  447. * the account and their states.
  448. *
  449. * Availability zones are not the same across accounts. The availability zone us-east-1a for account A
  450. * is not necessarily the same as us-east-1a for account B. Zone assignments are mapped independently
  451. * for each account.
  452. *
  453. * Access:
  454. * public
  455. *
  456. * Parameters:
  457. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  458. *
  459. * Keys for the $opt parameter:
  460. * ZoneName - _string_|_array_ (Optional) A list of the availability zone names to describe. Pass a string for a single value, or an indexed array for multiple values.
  461. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for AvailabilityZones. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  462. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  463. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  464. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  465. *
  466. * Returns:
  467. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  468. */
  469. public function describe_availability_zones($opt = null)
  470. {
  471. if (!$opt) $opt = array();
  472. // Optional parameter
  473. if (isset($opt['ZoneName']))
  474. {
  475. $opt = array_merge($opt, CFComplexType::map(array(
  476. 'ZoneName' => (is_array($opt['ZoneName']) ? $opt['ZoneName'] : array($opt['ZoneName']))
  477. )));
  478. unset($opt['ZoneName']);
  479. }
  480. // Optional parameter
  481. if (isset($opt['Filter']))
  482. {
  483. $opt = array_merge($opt, CFComplexType::map(array(
  484. 'Filter' => $opt['Filter']
  485. )));
  486. unset($opt['Filter']);
  487. }
  488. return $this->authenticate('DescribeAvailabilityZones', $opt, $this->hostname);
  489. }
  490. /**
  491. * Method: detach_volume()
  492. * Detach a previously attached volume from a running instance.
  493. *
  494. * Access:
  495. * public
  496. *
  497. * Parameters:
  498. * $volume_id - _string_ (Required) The ID of the volume to detach.
  499. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  500. *
  501. * Keys for the $opt parameter:
  502. * InstanceId - _string_ (Optional) The ID of the instance from which to detach the the specified volume.
  503. * Device - _string_ (Optional) The device name to which the volume is attached on the specified instance.
  504. * Force - _boolean_ (Optional) Forces detachment if the previous detachment attempt did not occur cleanly (logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures.
  505. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  506. *
  507. * Returns:
  508. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  509. */
  510. public function detach_volume($volume_id, $opt = null)
  511. {
  512. if (!$opt) $opt = array();
  513. $opt['VolumeId'] = $volume_id;
  514. return $this->authenticate('DetachVolume', $opt, $this->hostname);
  515. }
  516. /**
  517. * Method: delete_key_pair()
  518. * The DeleteKeyPair operation deletes a key pair.
  519. *
  520. * Access:
  521. * public
  522. *
  523. * Parameters:
  524. * $key_name - _string_ (Required) The name of the Amazon EC2 key pair to delete.
  525. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  526. *
  527. * Keys for the $opt parameter:
  528. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  529. *
  530. * Returns:
  531. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  532. */
  533. public function delete_key_pair($key_name, $opt = null)
  534. {
  535. if (!$opt) $opt = array();
  536. $opt['KeyName'] = $key_name;
  537. return $this->authenticate('DeleteKeyPair', $opt, $this->hostname);
  538. }
  539. /**
  540. * Method: describe_instances()
  541. * The DescribeInstances operation returns information about instances that you own.
  542. *
  543. * If you specify one or more instance IDs, Amazon EC2 returns information for those instances. If you
  544. * do not specify instance IDs, Amazon EC2 returns information for all relevant instances. If you
  545. * specify an invalid instance ID, a fault is returned. If you specify an instance that you do not own,
  546. * it will not be included in the returned results.
  547. *
  548. * Recently terminated instances might appear in the returned results. This interval is usually less
  549. * than one hour.
  550. *
  551. * Access:
  552. * public
  553. *
  554. * Parameters:
  555. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  556. *
  557. * Keys for the $opt parameter:
  558. * InstanceId - _string_|_array_ (Optional) An optional list of the instances to describe. Pass a string for a single value, or an indexed array for multiple values.
  559. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for Instances. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  560. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  561. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  562. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  563. *
  564. * Returns:
  565. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  566. */
  567. public function describe_instances($opt = null)
  568. {
  569. if (!$opt) $opt = array();
  570. // Optional parameter
  571. if (isset($opt['InstanceId']))
  572. {
  573. $opt = array_merge($opt, CFComplexType::map(array(
  574. 'InstanceId' => (is_array($opt['InstanceId']) ? $opt['InstanceId'] : array($opt['InstanceId']))
  575. )));
  576. unset($opt['InstanceId']);
  577. }
  578. // Optional parameter
  579. if (isset($opt['Filter']))
  580. {
  581. $opt = array_merge($opt, CFComplexType::map(array(
  582. 'Filter' => $opt['Filter']
  583. )));
  584. unset($opt['Filter']);
  585. }
  586. return $this->authenticate('DescribeInstances', $opt, $this->hostname);
  587. }
  588. /**
  589. * Method: describe_images()
  590. * The DescribeImages operation returns information about AMIs, AKIs, and ARIs available to the user.
  591. * Information returned includes image type, product codes, architecture, and kernel and RAM disk IDs.
  592. * Images available to the user include public images available for any user to launch, private images
  593. * owned by the user making the request, and private images owned by other users for which the user has
  594. * explicit launch permissions.
  595. *
  596. * Launch permissions fall into three categories:
  597. *
  598. * - Public: The owner of the AMI granted launch permissions for the AMI to the all group. All users
  599. * have launch permissions for these AMIs.
  600. *
  601. * - Explicit: The owner of the AMI granted launch permissions to a specific user.
  602. *
  603. * - Implicit: A user has implicit launch permissions for all AMIs he or she owns.
  604. *
  605. * The list of AMIs returned can be modified by specifying AMI IDs, AMI owners, or users with launch
  606. * permissions. If no options are specified, Amazon EC2 returns all AMIs for which the user has launch
  607. * permissions.
  608. *
  609. * If you specify one or more AMI IDs, only AMIs that have the specified IDs are returned. If you
  610. * specify an invalid AMI ID, a fault is returned. If you specify an AMI ID for which you do not have
  611. * access, it will not be included in the returned results.
  612. *
  613. * If you specify one or more AMI owners, only AMIs from the specified owners and for which you have
  614. * access are returned. The results can include the account IDs of the specified owners, amazon for
  615. * AMIs owned by Amazon or self for AMIs that you own.
  616. *
  617. * If you specify a list of executable users, only users that have launch permissions for the AMIs are
  618. * returned. You can specify account IDs (if you own the AMI(s)), self for AMIs for which you own or
  619. * have explicit permissions, or all for public AMIs.
  620. *
  621. * Deregistered images are included in the returned results for an unspecified interval after
  622. * deregistration.
  623. *
  624. * Access:
  625. * public
  626. *
  627. * Parameters:
  628. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  629. *
  630. * Keys for the $opt parameter:
  631. * ImageId - _string_|_array_ (Optional) An optional list of the AMI IDs to describe. If not specified, all AMIs will be described. Pass a string for a single value, or an indexed array for multiple values.
  632. * Owner - _string_|_array_ (Optional) The optional list of owners for the described AMIs. The IDs amazon, self, and explicit can be used to include AMIs owned by Amazon, AMIs owned by the user, and AMIs for which the user has explicit launch permissions, respectively. Pass a string for a single value, or an indexed array for multiple values.
  633. * ExecutableBy - _string_|_array_ (Optional) The optional list of users with explicit launch permissions for the described AMIs. The user ID can be a user's account ID, 'self' to return AMIs for which the sender of the request has explicit launch permissions, or 'all' to return AMIs with public launch permissions. Pass a string for a single value, or an indexed array for multiple values.
  634. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for Images. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  635. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  636. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  637. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  638. *
  639. * Returns:
  640. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  641. */
  642. public function describe_images($opt = null)
  643. {
  644. if (!$opt) $opt = array();
  645. // Optional parameter
  646. if (isset($opt['ImageId']))
  647. {
  648. $opt = array_merge($opt, CFComplexType::map(array(
  649. 'ImageId' => (is_array($opt['ImageId']) ? $opt['ImageId'] : array($opt['ImageId']))
  650. )));
  651. unset($opt['ImageId']);
  652. }
  653. // Optional parameter
  654. if (isset($opt['Owner']))
  655. {
  656. $opt = array_merge($opt, CFComplexType::map(array(
  657. 'Owner' => (is_array($opt['Owner']) ? $opt['Owner'] : array($opt['Owner']))
  658. )));
  659. unset($opt['Owner']);
  660. }
  661. // Optional parameter
  662. if (isset($opt['ExecutableBy']))
  663. {
  664. $opt = array_merge($opt, CFComplexType::map(array(
  665. 'ExecutableBy' => (is_array($opt['ExecutableBy']) ? $opt['ExecutableBy'] : array($opt['ExecutableBy']))
  666. )));
  667. unset($opt['ExecutableBy']);
  668. }
  669. // Optional parameter
  670. if (isset($opt['Filter']))
  671. {
  672. $opt = array_merge($opt, CFComplexType::map(array(
  673. 'Filter' => $opt['Filter']
  674. )));
  675. unset($opt['Filter']);
  676. }
  677. return $this->authenticate('DescribeImages', $opt, $this->hostname);
  678. }
  679. /**
  680. * Method: start_instances()
  681. * Starts an instance that uses an Amazon EBS volume as its root device. Instances that use Amazon EBS
  682. * volumes as their root devices can be quickly stopped and started. When an instance is stopped, the
  683. * compute resources are released and you are not billed for hourly instance usage. However, your root
  684. * partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon
  685. * EBS volume usage. You can restart your instance at any time.
  686. *
  687. * Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an
  688. * instance does not preserve data stored in RAM.
  689. *
  690. * Performing this operation on an instance that uses an instance store as its root device returns an
  691. * error.
  692. *
  693. * Access:
  694. * public
  695. *
  696. * Parameters:
  697. * $instance_id - _string_|_array_ (Required) The list of Amazon EC2 instances to start. Pass a string for a single value, or an indexed array for multiple values.
  698. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  699. *
  700. * Keys for the $opt parameter:
  701. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  702. *
  703. * Returns:
  704. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  705. */
  706. public function start_instances($instance_id, $opt = null)
  707. {
  708. if (!$opt) $opt = array();
  709. // Required parameter
  710. $opt = array_merge($opt, CFComplexType::map(array(
  711. 'InstanceId' => (is_array($instance_id) ? $instance_id : array($instance_id))
  712. )));
  713. return $this->authenticate('StartInstances', $opt, $this->hostname);
  714. }
  715. /**
  716. * Method: unmonitor_instances()
  717. * Disables monitoring for a running instance.
  718. *
  719. * Access:
  720. * public
  721. *
  722. * Parameters:
  723. * $instance_id - _string_|_array_ (Required) The list of Amazon EC2 instances on which to disable monitoring. Pass a string for a single value, or an indexed array for multiple values.
  724. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  725. *
  726. * Keys for the $opt parameter:
  727. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  728. *
  729. * Returns:
  730. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  731. */
  732. public function unmonitor_instances($instance_id, $opt = null)
  733. {
  734. if (!$opt) $opt = array();
  735. // Required parameter
  736. $opt = array_merge($opt, CFComplexType::map(array(
  737. 'InstanceId' => (is_array($instance_id) ? $instance_id : array($instance_id))
  738. )));
  739. return $this->authenticate('UnmonitorInstances', $opt, $this->hostname);
  740. }
  741. /**
  742. * Method: attach_vpn_gateway()
  743. * Attaches a VPN gateway to a VPC. This is the last step required to get your VPC fully connected to
  744. * your data center before launching instances in it. For more information, go to Process for Using
  745. * Amazon VPC in the Amazon Virtual Private Cloud Developer Guide.
  746. *
  747. * Access:
  748. * public
  749. *
  750. * Parameters:
  751. * $vpn_gateway_id - _string_ (Required) The ID of the VPN gateway to attach to the VPC.
  752. * $vpc_id - _string_ (Required) The ID of the VPC to attach to the VPN gateway.
  753. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  754. *
  755. * Keys for the $opt parameter:
  756. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  757. *
  758. * Returns:
  759. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  760. */
  761. public function attach_vpn_gateway($vpn_gateway_id, $vpc_id, $opt = null)
  762. {
  763. if (!$opt) $opt = array();
  764. $opt['VpnGatewayId'] = $vpn_gateway_id;
  765. $opt['VpcId'] = $vpc_id;
  766. return $this->authenticate('AttachVpnGateway', $opt, $this->hostname);
  767. }
  768. /**
  769. * Method: modify_instance_attribute()
  770. * Modifies an attribute of an instance.
  771. *
  772. * Access:
  773. * public
  774. *
  775. * Parameters:
  776. * $instance_id - _string_ (Required) The ID of the instance whose attribute is being modified.
  777. * $attribute - _string_ (Required) The name of the attribute being modified. Available attribute names: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDevice, blockDeviceMapping
  778. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  779. *
  780. * Keys for the $opt parameter:
  781. * Value - _string_ (Optional) The new value of the instance attribute being modified. Only valid when kernel, ramdisk, userData disableApiTermination, or instanceInitiateShutdownBehavior is specified as the attribute being modified.
  782. * BlockDeviceMapping - _ComplexList_ (Optional) The new block device mappings for the instance whose attributes are being modified. Only valid when blockDeviceMapping is specified as the attribute being modified. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `BlockDeviceMapping` subtype (documented next), or by passing an associative array with the following `BlockDeviceMapping`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  783. * BlockDeviceMapping.x.DeviceName - _string_ (Optional) The device name (e.g., /dev/sdh) at which the block device is exposed on the instance.
  784. * BlockDeviceMapping.x.Ebs.VolumeId - _string_ (Optional) The ID of the EBS volume that should be mounted as a block device on an Amazon EC2 instance.
  785. * BlockDeviceMapping.x.Ebs.DeleteOnTermination - _boolean_ (Optional) Specifies whether the Amazon EBS volume is deleted on instance termination.
  786. * BlockDeviceMapping.x.VirtualName - _string_ (Optional) The virtual device name.
  787. * BlockDeviceMapping.x.NoDevice - _string_ (Optional) When set to the empty string, specifies that the device name in this object should not be mapped to any real device.
  788. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  789. *
  790. * Returns:
  791. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  792. */
  793. public function modify_instance_attribute($instance_id, $attribute, $opt = null)
  794. {
  795. if (!$opt) $opt = array();
  796. $opt['InstanceId'] = $instance_id;
  797. $opt['Attribute'] = $attribute;
  798. // Optional parameter
  799. if (isset($opt['BlockDeviceMapping']))
  800. {
  801. $opt = array_merge($opt, CFComplexType::map(array(
  802. 'BlockDeviceMapping' => $opt['BlockDeviceMapping']
  803. )));
  804. unset($opt['BlockDeviceMapping']);
  805. }
  806. return $this->authenticate('ModifyInstanceAttribute', $opt, $this->hostname);
  807. }
  808. /**
  809. * Method: delete_dhcp_options()
  810. * Deletes a set of DHCP options that you specify. Amazon VPC returns an error if the set of options
  811. * you specify is currently associated with a VPC. You can disassociate the set of options by
  812. * associating either a new set of options or the default options with the VPC.
  813. *
  814. * Access:
  815. * public
  816. *
  817. * Parameters:
  818. * $dhcp_options_id - _string_ (Required) The ID of the DHCP options set to delete.
  819. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  820. *
  821. * Keys for the $opt parameter:
  822. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  823. *
  824. * Returns:
  825. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  826. */
  827. public function delete_dhcp_options($dhcp_options_id, $opt = null)
  828. {
  829. if (!$opt) $opt = array();
  830. $opt['DhcpOptionsId'] = $dhcp_options_id;
  831. return $this->authenticate('DeleteDhcpOptions', $opt, $this->hostname);
  832. }
  833. /**
  834. * Method: delete_security_group()
  835. * The DeleteSecurityGroup operation deletes a security group.
  836. *
  837. * If you attempt to delete a security group that contains instances, a fault is returned.
  838. *
  839. * If you attempt to delete a security group that is referenced by another security group, a fault is
  840. * returned. For example, if security group B has a rule that allows access from security group A,
  841. * security group A cannot be deleted until the allow rule is removed.
  842. *
  843. * Access:
  844. * public
  845. *
  846. * Parameters:
  847. * $group_name - _string_ (Required) The name of the Amazon EC2 security group to delete.
  848. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  849. *
  850. * Keys for the $opt parameter:
  851. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  852. *
  853. * Returns:
  854. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  855. */
  856. public function delete_security_group($group_name, $opt = null)
  857. {
  858. if (!$opt) $opt = array();
  859. $opt['GroupName'] = $group_name;
  860. return $this->authenticate('DeleteSecurityGroup', $opt, $this->hostname);
  861. }
  862. /**
  863. * Method: create_image()
  864. * Creates an Amazon EBS-backed AMI from a "running" or "stopped" instance. AMIs that use an Amazon EBS
  865. * root device boot faster than AMIs that use instance stores. They can be up to 1 TiB in size, use
  866. * storage that persists on instance failure, and can be stopped and started.
  867. *
  868. * Access:
  869. * public
  870. *
  871. * Parameters:
  872. * $instance_id - _string_ (Required) The ID of the instance from which to create the new image.
  873. * $name - _string_ (Required) The name for the new AMI being created.
  874. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  875. *
  876. * Keys for the $opt parameter:
  877. * Description - _string_ (Optional) The description for the new AMI being created.
  878. * NoReboot - _boolean_ (Optional) By default this property is set to `false`, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards. When set to true, Amazon EC2 will not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.
  879. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  880. *
  881. * Returns:
  882. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  883. */
  884. public function create_image($instance_id, $name, $opt = null)
  885. {
  886. if (!$opt) $opt = array();
  887. $opt['InstanceId'] = $instance_id;
  888. $opt['Name'] = $name;
  889. return $this->authenticate('CreateImage', $opt, $this->hostname);
  890. }
  891. /**
  892. * Method: authorize_security_group_ingress()
  893. * The AuthorizeSecurityGroupIngress operation adds permissions to a security group.
  894. *
  895. * Permissions are specified by the IP protocol (TCP, UDP or ICMP), the source of the request (by IP
  896. * range or an Amazon EC2 user-group pair), the source and destination port ranges (for TCP and UDP),
  897. * and the ICMP codes and types (for ICMP). When authorizing ICMP, -1 can be used as a wildcard in the
  898. * type and code fields.
  899. *
  900. * Permission changes are propagated to instances within the security group as quickly as possible.
  901. * However, depending on the number of instances, a small delay might occur.
  902. *
  903. * Access:
  904. * public
  905. *
  906. * Parameters:
  907. * $group_name - _string_ (Required) Name of the group to modify. The name must be valid and belong to the account.
  908. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  909. *
  910. * Keys for the $opt parameter:
  911. * SourceSecurityGroupName - _string_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. Name of the security group. Cannot be used when specifying a CIDR IP address.
  912. * SourceSecurityGroupOwnerId - _string_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. AWS user ID of an account. Cannot be used when specifying a CIDR IP address.
  913. * IpProtocol - _string_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. IP protocol.
  914. * FromPort - _integer_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).
  915. * ToPort - _integer_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).
  916. * CidrIp - _string_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. CIDR range.
  917. * IpPermissions - _ComplexList_ (Optional) List of IP permissions to authorize on the specified security group. Specifying permissions through IP permissions is the preferred way of authorizing permissions since it offers more flexibility and control. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `IpPermissions` subtype (documented next), or by passing an associative array with the following `IpPermissions`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  918. * IpPermissions.x.IpProtocol - _string_ (Optional) The IP protocol of this permission. Valid protocol values: tpc, upd, icmp
  919. * IpPermissions.x.FromPort - _integer_ (Optional) Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).
  920. * IpPermissions.x.ToPort - _integer_ (Optional) End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).
  921. * IpPermissions.x.Groups.y.UserId - _string_ (Optional) The AWS user ID of an account.
  922. * IpPermissions.x.Groups.y.GroupName - _string_ (Optional) The name of the security group in the specified user's account.
  923. * IpPermissions.x.IpRanges.y - _string_ (Optional) The list of CIDR IP ranges included in this permission.
  924. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  925. *
  926. * Returns:
  927. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  928. */
  929. public function authorize_security_group_ingress($group_name, $opt = null)
  930. {
  931. if (!$opt) $opt = array();
  932. $opt['GroupName'] = $group_name;
  933. // Optional parameter
  934. if (isset($opt['IpPermissions']))
  935. {
  936. $opt = array_merge($opt, CFComplexType::map(array(
  937. 'IpPermissions' => $opt['IpPermissions']
  938. )));
  939. unset($opt['IpPermissions']);
  940. }
  941. return $this->authenticate('AuthorizeSecurityGroupIngress', $opt, $this->hostname);
  942. }
  943. /**
  944. * Method: describe_spot_instance_requests()
  945. * Describes Spot Instance requests. Spot Instances are instances that Amazon EC2 starts on your behalf
  946. * when the maximum price that you specify exceeds the current Spot Price. Amazon EC2 periodically sets
  947. * the Spot Price based on available Spot Instance capacity and current spot instance requests. For
  948. * conceptual information about Spot Instances, refer to the [ Amazon Elastic Compute Cloud Developer
  949. * Guide](http://docs.amazonwebservices.com/AWSEC2/2010-08-31/DeveloperGuide/) or [ Amazon Elastic
  950. * Compute Cloud User Guide](http://docs.amazonwebservices.com/AWSEC2/2010-08-31/UserGuide/). You can
  951. * filter the results to return information only about Spot Instance requests that match criteria you
  952. * specify. For example, you could get information about requests where the Spot Price you specified is
  953. * a certain value (you can't use greater than or less than comparison, but you can use `*` and `?`
  954. * wildcards). You can specify multiple values for a filter. A Spot Instance request must match at
  955. * least one of the specified values for it to be included in the results. You can specify multiple
  956. * filters (e.g., the Spot Price is equal to a particular value, and the instance type is m1.small).
  957. * The result includes information for a particular request only if it matches all your filters. If
  958. * there's no match, no special message is returned; the response is simply empty. You can use
  959. * wildcards with the filter values: `*` matches zero or more characters, and `?` matches exactly one
  960. * character. You can escape special characters using a backslash before the character. For example, a
  961. * value of `\*amazon\?\\` searches for the literal string `*amazon?\`.
  962. *
  963. * Access:
  964. * public
  965. *
  966. * Parameters:
  967. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  968. *
  969. * Keys for the $opt parameter:
  970. * SpotInstanceRequestId - _string_|_array_ (Optional) The ID of the request. Pass a string for a single value, or an indexed array for multiple values.
  971. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for SpotInstances. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  972. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  973. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  974. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  975. *
  976. * Returns:
  977. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  978. */
  979. public function describe_spot_instance_requests($opt = null)
  980. {
  981. if (!$opt) $opt = array();
  982. // Optional parameter
  983. if (isset($opt['SpotInstanceRequestId']))
  984. {
  985. $opt = array_merge($opt, CFComplexType::map(array(
  986. 'SpotInstanceRequestId' => (is_array($opt['SpotInstanceRequestId']) ? $opt['SpotInstanceRequestId'] : array($opt['SpotInstanceRequestId']))
  987. )));
  988. unset($opt['SpotInstanceRequestId']);
  989. }
  990. // Optional parameter
  991. if (isset($opt['Filter']))
  992. {
  993. $opt = array_merge($opt, CFComplexType::map(array(
  994. 'Filter' => $opt['Filter']
  995. )));
  996. unset($opt['Filter']);
  997. }
  998. return $this->authenticate('DescribeSpotInstanceRequests', $opt, $this->hostname);
  999. }
  1000. /**
  1001. * Method: associate_dhcp_options()
  1002. * Associates a set of DHCP options (that you've previously created) with the specified VPC. Or,
  1003. * associates the default DHCP options with the VPC. The default set consists of the standard EC2 host
  1004. * name, no domain name, no DNS server, no NTP server, and no NetBIOS server or node type. After you
  1005. * associate the options with the VPC, any existing instances and all new instances that you launch in
  1006. * that VPC use the options. For more information about the supported DHCP options and using them with
  1007. * Amazon VPC, go to Using DHCP Options in the Amazon Virtual Private Cloud Developer Guide.
  1008. *
  1009. * Access:
  1010. * public
  1011. *
  1012. * Parameters:
  1013. * $dhcp_options_id - _string_ (Required) The ID of the DHCP options to associate with the VPC. Specify "default" to associate the default DHCP options with the VPC.
  1014. * $vpc_id - _string_ (Required) The ID of the VPC to associate the DHCP options with.
  1015. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1016. *
  1017. * Keys for the $opt parameter:
  1018. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1019. *
  1020. * Returns:
  1021. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1022. */
  1023. public function associate_dhcp_options($dhcp_options_id, $vpc_id, $opt = null)
  1024. {
  1025. if (!$opt) $opt = array();
  1026. $opt['DhcpOptionsId'] = $dhcp_options_id;
  1027. $opt['VpcId'] = $vpc_id;
  1028. return $this->authenticate('AssociateDhcpOptions', $opt, $this->hostname);
  1029. }
  1030. /**
  1031. * Method: get_password_data()
  1032. * Retrieves the encrypted administrator password for the instances running Windows.
  1033. *
  1034. * The Windows password is only generated the first time an AMI is launched. It is not generated for
  1035. * rebundled AMIs or after the password is changed on an instance. The password is encrypted using the
  1036. * key pair that you provided.
  1037. *
  1038. * Access:
  1039. * public
  1040. *
  1041. * Parameters:
  1042. * $instance_id - _string_ (Required) The ID of the instance for which you want the Windows administrator password.
  1043. * $opt - _array_ (Optional) An associative array of parameters which can have the following keys:
  1044. *
  1045. * Keys for the $opt parameter:
  1046. * DecryptPasswordWithKey - _string_ (Optional) Enables the decryption of the Administrator password for the given Microsoft Windows instance. Specifies the RSA private key that is associated with the keypair ID which was used to launch the Microsoft Windows instance.
  1047. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This is useful for manually-managed batch requests.
  1048. *
  1049. * Returns:
  1050. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1051. */
  1052. public function get_password_data($instance_id, $opt = null)
  1053. {
  1054. if (!$opt) $opt = array();
  1055. $opt['InstanceId'] = $instance_id;
  1056. // Unless DecryptPasswordWithKey is set, simply return the response.
  1057. if (!isset($opt['DecryptPasswordWithKey']))
  1058. {
  1059. return $this->authenticate('GetPasswordData', $opt, $this->hostname);
  1060. }
  1061. // Otherwise, decrypt the password.
  1062. else
  1063. {
  1064. // Get a resource representing the private key.
  1065. $private_key = openssl_pkey_get_private($opt['DecryptPasswordWithKey']);
  1066. unset($opt['DecryptPasswordWithKey']);
  1067. // Fetch the encrypted password.
  1068. $response = $this->authenticate('GetPasswordData', $opt, $this->hostname);
  1069. $data = trim((string) $response->body->passwordData);
  1070. // If it's Base64-encoded...
  1071. if ($this->util->is_base64($data))
  1072. {
  1073. // Base64-decode it, and decrypt it with the private key.
  1074. if (openssl_private_decrypt(base64_decode($data), $decrypted, $private_key))
  1075. {
  1076. // Replace the previous password data with the decrypted value.
  1077. $response->body->passwordData = $decrypted;
  1078. }
  1079. }
  1080. return $response;
  1081. }
  1082. }
  1083. /**
  1084. * Method: create_vpc()
  1085. * Creates a VPC with the CIDR block you specify. The smallest VPC you can create uses a /28 netmask
  1086. * (16 IP addresses), and the largest uses a /18 netmask (16,384 IP addresses). To help you decide how
  1087. * big to make your VPC, go to the topic about creating VPCs in the Amazon Virtual Private Cloud
  1088. * Developer Guide.
  1089. *
  1090. * By default, each instance you launch in the VPC has the default DHCP options (the standard EC2 host
  1091. * name, no domain name, no DNS server, no NTP server, and no NetBIOS server or node type).
  1092. *
  1093. * Access:
  1094. * public
  1095. *
  1096. * Parameters:
  1097. * $cidr_block - _string_ (Required) A valid CIDR block.
  1098. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1099. *
  1100. * Keys for the $opt parameter:
  1101. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1102. *
  1103. * Returns:
  1104. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1105. */
  1106. public function create_vpc($cidr_block, $opt = null)
  1107. {
  1108. if (!$opt) $opt = array();
  1109. $opt['CidrBlock'] = $cidr_block;
  1110. return $this->authenticate('CreateVpc', $opt, $this->hostname);
  1111. }
  1112. /**
  1113. * Method: stop_instances()
  1114. * Stops an instance that uses an Amazon EBS volume as its root device. Instances that use Amazon EBS
  1115. * volumes as their root devices can be quickly stopped and started. When an instance is stopped, the
  1116. * compute resources are released and you are not billed for hourly instance usage. However, your root
  1117. * partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon
  1118. * EBS volume usage. You can restart your instance at any time.
  1119. *
  1120. * Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an
  1121. * instance does not preserve data stored in RAM.
  1122. *
  1123. * Performing this operation on an instance that uses an instance store as its root device returns an
  1124. * error.
  1125. *
  1126. * Access:
  1127. * public
  1128. *
  1129. * Parameters:
  1130. * $instance_id - _string_|_array_ (Required) The list of Amazon EC2 instances to stop. Pass a string for a single value, or an indexed array for multiple values.
  1131. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1132. *
  1133. * Keys for the $opt parameter:
  1134. * Force - _boolean_ (Optional) Forces the instance to stop. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.
  1135. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1136. *
  1137. * Returns:
  1138. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1139. */
  1140. public function stop_instances($instance_id, $opt = null)
  1141. {
  1142. if (!$opt) $opt = array();
  1143. // Required parameter
  1144. $opt = array_merge($opt, CFComplexType::map(array(
  1145. 'InstanceId' => (is_array($instance_id) ? $instance_id : array($instance_id))
  1146. )));
  1147. return $this->authenticate('StopInstances', $opt, $this->hostname);
  1148. }
  1149. /**
  1150. * Method: describe_customer_gateways()
  1151. * Gives you information about your customer gateways. You can filter the results to return information
  1152. * only about customer gateways that match criteria you specify. For example, you could ask to get
  1153. * information about a particular customer gateway (or all) only if the gateway's state is pending or
  1154. * available. You can specify multiple filters (e.g., the customer gateway has a particular IP address
  1155. * for the Internet-routable external interface, and the gateway's state is pending or available). The
  1156. * result includes information for a particular customer gateway only if the gateway matches all your
  1157. * filters. If there's no match, no special message is returned; the response is simply empty. The
  1158. * following table shows the available filters.
  1159. *
  1160. * Access:
  1161. * public
  1162. *
  1163. * Parameters:
  1164. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1165. *
  1166. * Keys for the $opt parameter:
  1167. * CustomerGatewayId - _string_|_array_ (Optional) A set of one or more customer gateway IDs. Pass a string for a single value, or an indexed array for multiple values.
  1168. * Filter - _ComplexList_ (Optional) A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  1169. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  1170. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  1171. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1172. *
  1173. * Returns:
  1174. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1175. */
  1176. public function describe_customer_gateways($opt = null)
  1177. {
  1178. if (!$opt) $opt = array();
  1179. // Optional parameter
  1180. if (isset($opt['CustomerGatewayId']))
  1181. {
  1182. $opt = array_merge($opt, CFComplexType::map(array(
  1183. 'CustomerGatewayId' => (is_array($opt['CustomerGatewayId']) ? $opt['CustomerGatewayId'] : array($opt['CustomerGatewayId']))
  1184. )));
  1185. unset($opt['CustomerGatewayId']);
  1186. }
  1187. // Optional parameter
  1188. if (isset($opt['Filter']))
  1189. {
  1190. $opt = array_merge($opt, CFComplexType::map(array(
  1191. 'Filter' => $opt['Filter']
  1192. )));
  1193. unset($opt['Filter']);
  1194. }
  1195. return $this->authenticate('DescribeCustomerGateways', $opt, $this->hostname);
  1196. }
  1197. /**
  1198. * Method: import_key_pair()
  1199. * Imports the public key from an RSA key pair created with a third-party tool. This operation differs
  1200. * from CreateKeyPair as the private key is never transferred between the caller and AWS servers.
  1201. *
  1202. * RSA key pairs are easily created on Microsoft Windows and Linux OS systems using the `ssh-keygen`
  1203. * command line tool provided with the standard OpenSSH installation. Standard library support for RSA
  1204. * key pair creation is also available for Java, Ruby, Python, and many other programming languages.
  1205. *
  1206. * The following formats are supported:
  1207. *
  1208. * - OpenSSH public key format.
  1209. *
  1210. * - Base64 encoded DER format.
  1211. *
  1212. * - SSH public key file format as specified in [RFC4716](http://tools.ietf.org/html/rfc4716).
  1213. *
  1214. * Access:
  1215. * public
  1216. *
  1217. * Parameters:
  1218. * $key_name - _string_ (Required) The unique name for the key pair.
  1219. * $public_key_material - _string_ (Required) The public key portion of the key pair being imported.
  1220. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1221. *
  1222. * Keys for the $opt parameter:
  1223. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1224. *
  1225. * Returns:
  1226. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1227. */
  1228. public function import_key_pair($key_name, $public_key_material, $opt = null)
  1229. {
  1230. if (!$opt) $opt = array();
  1231. $opt['KeyName'] = $key_name;
  1232. $opt['PublicKeyMaterial'] = $this->util->is_base64($public_key_material) ? $public_key_material : base64_encode($public_key_material);
  1233. return $this->authenticate('ImportKeyPair', $opt, $this->hostname);
  1234. }
  1235. /**
  1236. * Method: describe_spot_price_history()
  1237. * Describes the Spot Price history.
  1238. *
  1239. * Spot Instances are instances that Amazon EC2 starts on your behalf when the maximum price that you
  1240. * specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on
  1241. * available Spot Instance capacity and current spot instance requests.
  1242. *
  1243. * For conceptual information about Spot Instances, refer to the Amazon Elastic Compute Cloud
  1244. * Developer Guide or Amazon Elastic Compute Cloud User Guide.
  1245. *
  1246. * Access:
  1247. * public
  1248. *
  1249. * Parameters:
  1250. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1251. *
  1252. * Keys for the $opt parameter:
  1253. * StartTime - _string_ (Optional) The start date and time of the Spot Instance price history data. Accepts any value that `strtotime()` understands.
  1254. * EndTime - _string_ (Optional) The end date and time of the Spot Instance price history data. Accepts any value that `strtotime()` understands.
  1255. * InstanceType - _string_|_array_ (Optional) Specifies the instance type to return. Pass a string for a single value, or an indexed array for multiple values.
  1256. * ProductDescription - _string_|_array_ (Optional) The description of the AMI. Pass a string for a single value, or an indexed array for multiple values.
  1257. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for SpotPriceHistory. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  1258. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  1259. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  1260. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1261. *
  1262. * Returns:
  1263. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1264. */
  1265. public function describe_spot_price_history($opt = null)
  1266. {
  1267. if (!$opt) $opt = array();
  1268. // Optional parameter
  1269. if (isset($opt['StartTime']))
  1270. {
  1271. $opt['StartTime'] = $this->util->convert_date_to_iso8601($opt['StartTime']);
  1272. }
  1273. // Optional parameter
  1274. if (isset($opt['EndTime']))
  1275. {
  1276. $opt['EndTime'] = $this->util->convert_date_to_iso8601($opt['EndTime']);
  1277. }
  1278. // Optional parameter
  1279. if (isset($opt['InstanceType']))
  1280. {
  1281. $opt = array_merge($opt, CFComplexType::map(array(
  1282. 'InstanceType' => (is_array($opt['InstanceType']) ? $opt['InstanceType'] : array($opt['InstanceType']))
  1283. )));
  1284. unset($opt['InstanceType']);
  1285. }
  1286. // Optional parameter
  1287. if (isset($opt['ProductDescription']))
  1288. {
  1289. $opt = array_merge($opt, CFComplexType::map(array(
  1290. 'ProductDescription' => (is_array($opt['ProductDescription']) ? $opt['ProductDescription'] : array($opt['ProductDescription']))
  1291. )));
  1292. unset($opt['ProductDescription']);
  1293. }
  1294. // Optional parameter
  1295. if (isset($opt['Filter']))
  1296. {
  1297. $opt = array_merge($opt, CFComplexType::map(array(
  1298. 'Filter' => $opt['Filter']
  1299. )));
  1300. unset($opt['Filter']);
  1301. }
  1302. return $this->authenticate('DescribeSpotPriceHistory', $opt, $this->hostname);
  1303. }
  1304. /**
  1305. * Method: create_security_group()
  1306. * The CreateSecurityGroup operation creates a new security group.
  1307. *
  1308. * Every instance is launched in a security group. If no security group is specified during launch,
  1309. * the instances are launched in the default security group. Instances within the same security group
  1310. * have unrestricted network access to each other. Instances will reject network access attempts from
  1311. * other instances in a different security group. As the owner of instances you can grant or revoke
  1312. * specific permissions using the AuthorizeSecurityGroupIngress and RevokeSecurityGroupIngress
  1313. * operations.
  1314. *
  1315. * Access:
  1316. * public
  1317. *
  1318. * Parameters:
  1319. * $group_name - _string_ (Required) Name of the security group.
  1320. * $group_description - _string_ (Required) Description of the group. This is informational only.
  1321. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1322. *
  1323. * Keys for the $opt parameter:
  1324. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1325. *
  1326. * Returns:
  1327. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1328. */
  1329. public function create_security_group($group_name, $group_description, $opt = null)
  1330. {
  1331. if (!$opt) $opt = array();
  1332. $opt['GroupName'] = $group_name;
  1333. $opt['GroupDescription'] = $group_description;
  1334. return $this->authenticate('CreateSecurityGroup', $opt, $this->hostname);
  1335. }
  1336. /**
  1337. * Method: describe_regions()
  1338. * The DescribeRegions operation describes regions zones that are currently available to the account.
  1339. *
  1340. * Access:
  1341. * public
  1342. *
  1343. * Parameters:
  1344. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1345. *
  1346. * Keys for the $opt parameter:
  1347. * RegionName - _string_|_array_ (Optional) The optional list of regions to describe. Pass a string for a single value, or an indexed array for multiple values.
  1348. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for Regions. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  1349. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  1350. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  1351. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1352. *
  1353. * Returns:
  1354. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1355. */
  1356. public function describe_regions($opt = null)
  1357. {
  1358. if (!$opt) $opt = array();
  1359. // Optional parameter
  1360. if (isset($opt['RegionName']))
  1361. {
  1362. $opt = array_merge($opt, CFComplexType::map(array(
  1363. 'RegionName' => (is_array($opt['RegionName']) ? $opt['RegionName'] : array($opt['RegionName']))
  1364. )));
  1365. unset($opt['RegionName']);
  1366. }
  1367. // Optional parameter
  1368. if (isset($opt['Filter']))
  1369. {
  1370. $opt = array_merge($opt, CFComplexType::map(array(
  1371. 'Filter' => $opt['Filter']
  1372. )));
  1373. unset($opt['Filter']);
  1374. }
  1375. return $this->authenticate('DescribeRegions', $opt, $this->hostname);
  1376. }
  1377. /**
  1378. * Method: create_dhcp_options()
  1379. * Creates a set of DHCP options that you can then associate with one or more VPCs, causing all
  1380. * existing and new instances that you launch in those VPCs to use the set of DHCP options. The
  1381. * following table lists the individual DHCP options you can specify. For more information about the
  1382. * options, go to http://www.ietf.org/rfc/rfc2132.txt
  1383. *
  1384. * Access:
  1385. * public
  1386. *
  1387. * Parameters:
  1388. * $dhcp_configuration - _ComplexList_ (Required) A set of one or more DHCP configurations. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs which must be set by passing an associative array. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`.
  1389. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1390. *
  1391. * Keys for the $dhcp_configuration parameter:
  1392. * Key - _string_ (Optional) Contains the name of a DHCP option.
  1393. * Value - _string_|_array_ (Optional) Contains a set of values for a DHCP option. Pass a string for a single value, or an indexed array for multiple values.
  1394. *
  1395. * Keys for the $opt parameter:
  1396. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1397. *
  1398. * Returns:
  1399. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1400. */
  1401. public function create_dhcp_options($dhcp_configuration, $opt = null)
  1402. {
  1403. if (!$opt) $opt = array();
  1404. // Required parameter
  1405. $opt = array_merge($opt, CFComplexType::map(array(
  1406. 'DhcpConfiguration' => (is_array($dhcp_configuration) ? $dhcp_configuration : array($dhcp_configuration))
  1407. )));
  1408. return $this->authenticate('CreateDhcpOptions', $opt, $this->hostname);
  1409. }
  1410. /**
  1411. * Method: reset_snapshot_attribute()
  1412. * Resets permission settings for the specified snapshot.
  1413. *
  1414. * Access:
  1415. * public
  1416. *
  1417. * Parameters:
  1418. * $snapshot_id - _string_ (Required) The ID of the snapshot whose attribute is being reset.
  1419. * $attribute - _string_ (Required) The name of the attribute being reset. Available attribute names: createVolumePermission
  1420. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1421. *
  1422. * Keys for the $opt parameter:
  1423. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1424. *
  1425. * Returns:
  1426. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1427. */
  1428. public function reset_snapshot_attribute($snapshot_id, $attribute, $opt = null)
  1429. {
  1430. if (!$opt) $opt = array();
  1431. $opt['SnapshotId'] = $snapshot_id;
  1432. $opt['Attribute'] = $attribute;
  1433. return $this->authenticate('ResetSnapshotAttribute', $opt, $this->hostname);
  1434. }
  1435. /**
  1436. * Method: describe_security_groups()
  1437. * The DescribeSecurityGroups operation returns information about security groups that you own.
  1438. *
  1439. * If you specify security group names, information about those security group is returned. Otherwise,
  1440. * information for all security group is returned. If you specify a group that does not exist, a fault
  1441. * is returned.
  1442. *
  1443. * Access:
  1444. * public
  1445. *
  1446. * Parameters:
  1447. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1448. *
  1449. * Keys for the $opt parameter:
  1450. * GroupName - _string_|_array_ (Optional) The optional list of Amazon EC2 security groups to describe. Pass a string for a single value, or an indexed array for multiple values.
  1451. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for SecurityGroups. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  1452. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  1453. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  1454. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1455. *
  1456. * Returns:
  1457. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1458. */
  1459. public function describe_security_groups($opt = null)
  1460. {
  1461. if (!$opt) $opt = array();
  1462. // Optional parameter
  1463. if (isset($opt['GroupName']))
  1464. {
  1465. $opt = array_merge($opt, CFComplexType::map(array(
  1466. 'GroupName' => (is_array($opt['GroupName']) ? $opt['GroupName'] : array($opt['GroupName']))
  1467. )));
  1468. unset($opt['GroupName']);
  1469. }
  1470. // Optional parameter
  1471. if (isset($opt['Filter']))
  1472. {
  1473. $opt = array_merge($opt, CFComplexType::map(array(
  1474. 'Filter' => $opt['Filter']
  1475. )));
  1476. unset($opt['Filter']);
  1477. }
  1478. return $this->authenticate('DescribeSecurityGroups', $opt, $this->hostname);
  1479. }
  1480. /**
  1481. * Method: request_spot_instances()
  1482. * Creates a Spot Instance request.
  1483. *
  1484. * Spot Instances are instances that Amazon EC2 starts on your behalf when the maximum price that you
  1485. * specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on
  1486. * available Spot Instance capacity and current spot instance requests.
  1487. *
  1488. * For conceptual information about Spot Instances, refer to the Amazon Elastic Compute Cloud
  1489. * Developer Guide or Amazon Elastic Compute Cloud User Guide.
  1490. *
  1491. * Access:
  1492. * public
  1493. *
  1494. * Parameters:
  1495. * $spot_price - _string_ (Required) Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.
  1496. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1497. *
  1498. * Keys for the $opt parameter:
  1499. * InstanceCount - _integer_ (Optional) Specifies the maximum number of Spot Instances to launch.
  1500. * Type - _string_ (Optional) Specifies the Spot Instance type. [Allowed values: `one-time`, `persistent`]
  1501. * ValidFrom - _string_ (Optional) Defines the start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled. Accepts any value that `strtotime()` understands.
  1502. * ValidUntil - _string_ (Optional) End date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached. Accepts any value that `strtotime()` understands.
  1503. * LaunchGroup - _string_ (Optional) Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.
  1504. * AvailabilityZoneGroup - _string_ (Optional) Specifies the Availability Zone group. When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
  1505. * LaunchSpecification - _ComplexType_ (Optional) Specifies additional launch instance information. A ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `LaunchSpecification` subtype (documented next), or by passing an associative array with the following `LaunchSpecification`-prefixed entries as keys. See below for a list and a usage example.
  1506. * LaunchSpecification.ImageId - _string_ (Optional) The AMI ID.
  1507. * LaunchSpecification.KeyName - _string_ (Optional) The name of the key pair.
  1508. * LaunchSpecification.SecurityGroup.x - _string_ (Optional)
  1509. * LaunchSpecification.UserData - _string_ (Optional) Optional data, specific to a user's application, to provide in the launch request. All instances that collectively comprise the launch request have access to this data. User data is never returned through API responses.
  1510. * LaunchSpecification.AddressingType - _string_ (Optional) Deprecated.
  1511. * LaunchSpecification.InstanceType - _string_ (Optional) Specifies the instance type. [Allowed values: `t1.micro`, `m1.small`, `m1.large`, `m1.xlarge`, `m2.xlarge`, `m2.2xlarge`, `m2.4xlarge`, `c1.medium`, `c1.xlarge`, `cc1.4xlarge`, `cg1.4xlarge`]
  1512. * LaunchSpecification.Placement.AvailabilityZone - _string_ (Optional) The availability zone in which an Amazon EC2 instance runs.
  1513. * LaunchSpecification.Placement.GroupName - _string_ (Optional) The name of a PlacementGroup.
  1514. * LaunchSpecification.KernelId - _string_ (Optional) Specifies the ID of the kernel to select.
  1515. * LaunchSpecification.RamdiskId - _string_ (Optional) Specifies the ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether or not you need to specify a RAM disk and search for the kernel ID.
  1516. * LaunchSpecification.BlockDeviceMapping.x.VirtualName - _string_ (Optional) Specifies the virtual device name.
  1517. * LaunchSpecification.BlockDeviceMapping.x.DeviceName - _string_ (Optional) Specifies the device name (e.g., /dev/sdh).
  1518. * LaunchSpecification.BlockDeviceMapping.x.Ebs.SnapshotId - _string_ (Optional) The ID of the snapshot from which the volume will be created.
  1519. * LaunchSpecification.BlockDeviceMapping.x.Ebs.VolumeSize - _integer_ (Optional) The size of the volume, in gigabytes.
  1520. * LaunchSpecification.BlockDeviceMapping.x.Ebs.DeleteOnTermination - _boolean_ (Optional) Specifies whether the Amazon EBS volume is deleted on instance termination.
  1521. * LaunchSpecification.BlockDeviceMapping.x.NoDevice - _string_ (Optional) Specifies the device name to suppress during instance launch.
  1522. * LaunchSpecification.Monitoring.Enabled - _boolean_ (Optional)
  1523. * LaunchSpecification.SubnetId - _string_ (Optional) Specifies the Amazon VPC subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.
  1524. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1525. *
  1526. * Returns:
  1527. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1528. */
  1529. public function request_spot_instances($spot_price, $opt = null)
  1530. {
  1531. if (!$opt) $opt = array();
  1532. $opt['SpotPrice'] = $spot_price;
  1533. // Optional parameter
  1534. if (isset($opt['ValidFrom']))
  1535. {
  1536. $opt['ValidFrom'] = $this->util->convert_date_to_iso8601($opt['ValidFrom']);
  1537. }
  1538. // Optional parameter
  1539. if (isset($opt['ValidUntil']))
  1540. {
  1541. $opt['ValidUntil'] = $this->util->convert_date_to_iso8601($opt['ValidUntil']);
  1542. }
  1543. // Optional parameter
  1544. if (isset($opt['LaunchSpecification']))
  1545. {
  1546. $opt = array_merge($opt, CFComplexType::map(array(
  1547. 'LaunchSpecification' => $opt['LaunchSpecification']
  1548. )));
  1549. unset($opt['LaunchSpecification']);
  1550. }
  1551. return $this->authenticate('RequestSpotInstances', $opt, $this->hostname);
  1552. }
  1553. /**
  1554. * Method: create_tags()
  1555. * Adds or overwrites tags for the specified resources. Each resource can have a maximum of 10 tags.
  1556. * Each tag consists of a key-value pair. Tag keys must be unique per resource.
  1557. *
  1558. * Access:
  1559. * public
  1560. *
  1561. * Parameters:
  1562. * $resource_id - _string_|_array_ (Required) One or more IDs of resources to tag. This could be the ID of an AMI, an instance, an EBS volume, or snapshot, etc. Pass a string for a single value, or an indexed array for multiple values.
  1563. * $tag - _ComplexList_ (Required) The tags to add or overwrite for the specified resources. Each tag item consists of a key-value pair. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs which must be set by passing an associative array. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`.
  1564. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1565. *
  1566. * Keys for the $tag parameter:
  1567. * Key - _string_ (Optional) The tag's key.
  1568. * Value - _string_ (Optional) The tag's value.
  1569. *
  1570. * Keys for the $opt parameter:
  1571. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1572. *
  1573. * Returns:
  1574. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1575. */
  1576. public function create_tags($resource_id, $tag, $opt = null)
  1577. {
  1578. if (!$opt) $opt = array();
  1579. // Required parameter
  1580. $opt = array_merge($opt, CFComplexType::map(array(
  1581. 'ResourceId' => (is_array($resource_id) ? $resource_id : array($resource_id))
  1582. )));
  1583. // Required parameter
  1584. $opt = array_merge($opt, CFComplexType::map(array(
  1585. 'Tag' => (is_array($tag) ? $tag : array($tag))
  1586. )));
  1587. return $this->authenticate('CreateTags', $opt, $this->hostname);
  1588. }
  1589. /**
  1590. * Method: detach_vpn_gateway()
  1591. * Detaches a VPN gateway from a VPC. You do this if you're planning to turn off the VPC and not use it
  1592. * anymore. You can confirm a VPN gateway has been completely detached from a VPC by describing the VPN
  1593. * gateway (any attachments to the VPN gateway are also described).
  1594. *
  1595. * You must wait for the attachment's state to switch to detached before you can delete the VPC or
  1596. * attach a different VPC to the VPN gateway.
  1597. *
  1598. * Access:
  1599. * public
  1600. *
  1601. * Parameters:
  1602. * $vpn_gateway_id - _string_ (Required) The ID of the VPN gateway to detach from the VPC.
  1603. * $vpc_id - _string_ (Required) The ID of the VPC to detach the VPN gateway from.
  1604. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1605. *
  1606. * Keys for the $opt parameter:
  1607. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1608. *
  1609. * Returns:
  1610. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1611. */
  1612. public function detach_vpn_gateway($vpn_gateway_id, $vpc_id, $opt = null)
  1613. {
  1614. if (!$opt) $opt = array();
  1615. $opt['VpnGatewayId'] = $vpn_gateway_id;
  1616. $opt['VpcId'] = $vpc_id;
  1617. return $this->authenticate('DetachVpnGateway', $opt, $this->hostname);
  1618. }
  1619. /**
  1620. * Method: deregister_image()
  1621. * The DeregisterImage operation deregisters an AMI. Once deregistered, instances of the AMI can no
  1622. * longer be launched.
  1623. *
  1624. * Access:
  1625. * public
  1626. *
  1627. * Parameters:
  1628. * $image_id - _string_ (Required) The ID of the AMI to deregister.
  1629. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1630. *
  1631. * Keys for the $opt parameter:
  1632. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1633. *
  1634. * Returns:
  1635. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1636. */
  1637. public function deregister_image($image_id, $opt = null)
  1638. {
  1639. if (!$opt) $opt = array();
  1640. $opt['ImageId'] = $image_id;
  1641. return $this->authenticate('DeregisterImage', $opt, $this->hostname);
  1642. }
  1643. /**
  1644. * Method: describe_spot_datafeed_subscription()
  1645. * Describes the data feed for Spot Instances.
  1646. *
  1647. * For conceptual information about Spot Instances, refer to the Amazon Elastic Compute Cloud
  1648. * Developer Guide or Amazon Elastic Compute Cloud User Guide.
  1649. *
  1650. * Access:
  1651. * public
  1652. *
  1653. * Parameters:
  1654. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1655. *
  1656. * Keys for the $opt parameter:
  1657. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1658. *
  1659. * Returns:
  1660. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1661. */
  1662. public function describe_spot_datafeed_subscription($opt = null)
  1663. {
  1664. if (!$opt) $opt = array();
  1665. return $this->authenticate('DescribeSpotDatafeedSubscription', $opt, $this->hostname);
  1666. }
  1667. /**
  1668. * Method: delete_tags()
  1669. * Deletes tags from the specified Amazon EC2 resources.
  1670. *
  1671. * Access:
  1672. * public
  1673. *
  1674. * Parameters:
  1675. * $resource_id - _string_|_array_ (Required) A list of one or more resource IDs. This could be the ID of an AMI, an instance, an EBS volume, or snapshot, etc. Pass a string for a single value, or an indexed array for multiple values.
  1676. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1677. *
  1678. * Keys for the $opt parameter:
  1679. * Tag - _ComplexList_ (Optional) The tags to delete from the specified resources. Each tag item consists of a key-value pair. If a tag is specified without a value, the tag and all of its values are deleted. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Tag` subtype (documented next), or by passing an associative array with the following `Tag`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  1680. * Tag.x.Key - _string_ (Optional) The tag's key.
  1681. * Tag.x.Value - _string_ (Optional) The tag's value.
  1682. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1683. *
  1684. * Returns:
  1685. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1686. */
  1687. public function delete_tags($resource_id, $opt = null)
  1688. {
  1689. if (!$opt) $opt = array();
  1690. // Required parameter
  1691. $opt = array_merge($opt, CFComplexType::map(array(
  1692. 'ResourceId' => (is_array($resource_id) ? $resource_id : array($resource_id))
  1693. )));
  1694. // Optional parameter
  1695. if (isset($opt['Tag']))
  1696. {
  1697. $opt = array_merge($opt, CFComplexType::map(array(
  1698. 'Tag' => $opt['Tag']
  1699. )));
  1700. unset($opt['Tag']);
  1701. }
  1702. return $this->authenticate('DeleteTags', $opt, $this->hostname);
  1703. }
  1704. /**
  1705. * Method: describe_tags()
  1706. * Describes the tags for the specified resources.
  1707. *
  1708. * Access:
  1709. * public
  1710. *
  1711. * Parameters:
  1712. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1713. *
  1714. * Keys for the $opt parameter:
  1715. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for tags. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  1716. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  1717. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  1718. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1719. *
  1720. * Returns:
  1721. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1722. */
  1723. public function describe_tags($opt = null)
  1724. {
  1725. if (!$opt) $opt = array();
  1726. // Optional parameter
  1727. if (isset($opt['Filter']))
  1728. {
  1729. $opt = array_merge($opt, CFComplexType::map(array(
  1730. 'Filter' => $opt['Filter']
  1731. )));
  1732. unset($opt['Filter']);
  1733. }
  1734. return $this->authenticate('DescribeTags', $opt, $this->hostname);
  1735. }
  1736. /**
  1737. * Method: delete_subnet()
  1738. * Deletes a subnet from a VPC. You must terminate all running instances in the subnet before deleting
  1739. * it, otherwise Amazon VPC returns an error.
  1740. *
  1741. * Access:
  1742. * public
  1743. *
  1744. * Parameters:
  1745. * $subnet_id - _string_ (Required) The ID of the subnet you want to delete.
  1746. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1747. *
  1748. * Keys for the $opt parameter:
  1749. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1750. *
  1751. * Returns:
  1752. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1753. */
  1754. public function delete_subnet($subnet_id, $opt = null)
  1755. {
  1756. if (!$opt) $opt = array();
  1757. $opt['SubnetId'] = $subnet_id;
  1758. return $this->authenticate('DeleteSubnet', $opt, $this->hostname);
  1759. }
  1760. /**
  1761. * Method: create_vpn_gateway()
  1762. * Creates a new VPN gateway. A VPN gateway is the VPC-side endpoint for your VPN connection. You can
  1763. * create a VPN gateway before creating the VPC itself.
  1764. *
  1765. * Access:
  1766. * public
  1767. *
  1768. * Parameters:
  1769. * $type - _string_ (Required) The type of VPN connection this VPN gateway supports.
  1770. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1771. *
  1772. * Keys for the $opt parameter:
  1773. * AvailabilityZone - _string_ (Optional) The Availability Zone in which to create the VPN gateway.
  1774. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1775. *
  1776. * Returns:
  1777. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1778. */
  1779. public function create_vpn_gateway($type, $opt = null)
  1780. {
  1781. if (!$opt) $opt = array();
  1782. $opt['Type'] = $type;
  1783. return $this->authenticate('CreateVpnGateway', $opt, $this->hostname);
  1784. }
  1785. /**
  1786. * Method: cancel_bundle_task()
  1787. * CancelBundleTask operation cancels a pending or in-progress bundling task. This is an asynchronous
  1788. * call and it make take a while for the task to be canceled. If a task is canceled while it is storing
  1789. * items, there may be parts of the incomplete AMI stored in S3. It is up to the caller to clean up
  1790. * these parts from S3.
  1791. *
  1792. * Access:
  1793. * public
  1794. *
  1795. * Parameters:
  1796. * $bundle_id - _string_ (Required) The ID of the bundle task to cancel.
  1797. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1798. *
  1799. * Keys for the $opt parameter:
  1800. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1801. *
  1802. * Returns:
  1803. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1804. */
  1805. public function cancel_bundle_task($bundle_id, $opt = null)
  1806. {
  1807. if (!$opt) $opt = array();
  1808. $opt['BundleId'] = $bundle_id;
  1809. return $this->authenticate('CancelBundleTask', $opt, $this->hostname);
  1810. }
  1811. /**
  1812. * Method: delete_vpn_gateway()
  1813. * Deletes a VPN gateway. Use this when you want to delete a VPC and all its associated components
  1814. * because you no longer need them. We recommend that before you delete a VPN gateway, you detach it
  1815. * from the VPC and delete the VPN connection. Note that you don't need to delete the VPN gateway if
  1816. * you just want to delete and re-create the VPN connection between your VPC and data center.
  1817. *
  1818. * Access:
  1819. * public
  1820. *
  1821. * Parameters:
  1822. * $vpn_gateway_id - _string_ (Required) The ID of the VPN gateway to delete.
  1823. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1824. *
  1825. * Keys for the $opt parameter:
  1826. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1827. *
  1828. * Returns:
  1829. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1830. */
  1831. public function delete_vpn_gateway($vpn_gateway_id, $opt = null)
  1832. {
  1833. if (!$opt) $opt = array();
  1834. $opt['VpnGatewayId'] = $vpn_gateway_id;
  1835. return $this->authenticate('DeleteVpnGateway', $opt, $this->hostname);
  1836. }
  1837. /**
  1838. * Method: cancel_spot_instance_requests()
  1839. * Cancels one or more Spot Instance requests.
  1840. *
  1841. * Spot Instances are instances that Amazon EC2 starts on your behalf when the maximum price that you
  1842. * specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on
  1843. * available Spot Instance capacity and current spot instance requests.
  1844. *
  1845. * For conceptual information about Spot Instances, refer to the Amazon Elastic Compute Cloud
  1846. * Developer Guide or Amazon Elastic Compute Cloud User Guide.
  1847. *
  1848. * Access:
  1849. * public
  1850. *
  1851. * Parameters:
  1852. * $spot_instance_request_id - _string_|_array_ (Required) Specifies the ID of the Spot Instance request. Pass a string for a single value, or an indexed array for multiple values.
  1853. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1854. *
  1855. * Keys for the $opt parameter:
  1856. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1857. *
  1858. * Returns:
  1859. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1860. */
  1861. public function cancel_spot_instance_requests($spot_instance_request_id, $opt = null)
  1862. {
  1863. if (!$opt) $opt = array();
  1864. // Required parameter
  1865. $opt = array_merge($opt, CFComplexType::map(array(
  1866. 'SpotInstanceRequestId' => (is_array($spot_instance_request_id) ? $spot_instance_request_id : array($spot_instance_request_id))
  1867. )));
  1868. return $this->authenticate('CancelSpotInstanceRequests', $opt, $this->hostname);
  1869. }
  1870. /**
  1871. * Method: attach_volume()
  1872. * Attach a previously created volume to a running instance.
  1873. *
  1874. * Access:
  1875. * public
  1876. *
  1877. * Parameters:
  1878. * $volume_id - _string_ (Required) The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running.
  1879. * $instance_id - _string_ (Required) The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running.
  1880. * $device - _string_ (Required) Specifies how the device is exposed to the instance (e.g., /dev/sdh).
  1881. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1882. *
  1883. * Keys for the $opt parameter:
  1884. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1885. *
  1886. * Returns:
  1887. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1888. */
  1889. public function attach_volume($volume_id, $instance_id, $device, $opt = null)
  1890. {
  1891. if (!$opt) $opt = array();
  1892. $opt['VolumeId'] = $volume_id;
  1893. $opt['InstanceId'] = $instance_id;
  1894. $opt['Device'] = $device;
  1895. return $this->authenticate('AttachVolume', $opt, $this->hostname);
  1896. }
  1897. /**
  1898. * Method: describe_licenses()
  1899. * Provides details of a user's registered licenses. Zero or more IDs may be specified on the call.
  1900. * When one or more license IDs are specified, only data for the specified IDs are returned.
  1901. *
  1902. * Access:
  1903. * public
  1904. *
  1905. * Parameters:
  1906. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1907. *
  1908. * Keys for the $opt parameter:
  1909. * LicenseId - _string_|_array_ (Optional) Specifies the license registration for which details are to be returned. Pass a string for a single value, or an indexed array for multiple values.
  1910. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for Licenses. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  1911. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  1912. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  1913. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1914. *
  1915. * Returns:
  1916. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1917. */
  1918. public function describe_licenses($opt = null)
  1919. {
  1920. if (!$opt) $opt = array();
  1921. // Optional parameter
  1922. if (isset($opt['LicenseId']))
  1923. {
  1924. $opt = array_merge($opt, CFComplexType::map(array(
  1925. 'LicenseId' => (is_array($opt['LicenseId']) ? $opt['LicenseId'] : array($opt['LicenseId']))
  1926. )));
  1927. unset($opt['LicenseId']);
  1928. }
  1929. // Optional parameter
  1930. if (isset($opt['Filter']))
  1931. {
  1932. $opt = array_merge($opt, CFComplexType::map(array(
  1933. 'Filter' => $opt['Filter']
  1934. )));
  1935. unset($opt['Filter']);
  1936. }
  1937. return $this->authenticate('DescribeLicenses', $opt, $this->hostname);
  1938. }
  1939. /**
  1940. * Method: purchase_reserved_instances_offering()
  1941. * The PurchaseReservedInstancesOffering operation purchases a Reserved Instance for use with your
  1942. * account. With Amazon EC2 Reserved Instances, you purchase the right to launch Amazon EC2 instances
  1943. * for a period of time (without getting insufficient capacity errors) and pay a lower usage rate for
  1944. * the actual time used.
  1945. *
  1946. * Access:
  1947. * public
  1948. *
  1949. * Parameters:
  1950. * $reserved_instances_offering_id - _string_ (Required) The unique ID of the Reserved Instances offering being purchased.
  1951. * $instance_count - _integer_ (Required) The number of Reserved Instances to purchase.
  1952. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1953. *
  1954. * Keys for the $opt parameter:
  1955. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1956. *
  1957. * Returns:
  1958. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1959. */
  1960. public function purchase_reserved_instances_offering($reserved_instances_offering_id, $instance_count, $opt = null)
  1961. {
  1962. if (!$opt) $opt = array();
  1963. $opt['ReservedInstancesOfferingId'] = $reserved_instances_offering_id;
  1964. $opt['InstanceCount'] = $instance_count;
  1965. return $this->authenticate('PurchaseReservedInstancesOffering', $opt, $this->hostname);
  1966. }
  1967. /**
  1968. * Method: activate_license()
  1969. * Activates a specific number of licenses for a 90-day period. Activations can be done against a
  1970. * specific license ID.
  1971. *
  1972. * Access:
  1973. * public
  1974. *
  1975. * Parameters:
  1976. * $license_id - _string_ (Required) Specifies the ID for the specific license to activate against.
  1977. * $capacity - _integer_ (Required) Specifies the additional number of licenses to activate.
  1978. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  1979. *
  1980. * Keys for the $opt parameter:
  1981. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  1982. *
  1983. * Returns:
  1984. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  1985. */
  1986. public function activate_license($license_id, $capacity, $opt = null)
  1987. {
  1988. if (!$opt) $opt = array();
  1989. $opt['LicenseId'] = $license_id;
  1990. $opt['Capacity'] = $capacity;
  1991. return $this->authenticate('ActivateLicense', $opt, $this->hostname);
  1992. }
  1993. /**
  1994. * Method: reset_image_attribute()
  1995. * The ResetImageAttribute operation resets an attribute of an AMI to its default value.
  1996. *
  1997. * The productCodes attribute cannot be reset.
  1998. *
  1999. * Access:
  2000. * public
  2001. *
  2002. * Parameters:
  2003. * $image_id - _string_ (Required) The ID of the AMI whose attribute is being reset.
  2004. * $attribute - _string_ (Required) The name of the attribute being reset. Available attribute names: launchPermission
  2005. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2006. *
  2007. * Keys for the $opt parameter:
  2008. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2009. *
  2010. * Returns:
  2011. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2012. */
  2013. public function reset_image_attribute($image_id, $attribute, $opt = null)
  2014. {
  2015. if (!$opt) $opt = array();
  2016. $opt['ImageId'] = $image_id;
  2017. $opt['Attribute'] = $attribute;
  2018. return $this->authenticate('ResetImageAttribute', $opt, $this->hostname);
  2019. }
  2020. /**
  2021. * Method: describe_vpn_connections()
  2022. * Gives you information about your VPN connections.
  2023. *
  2024. * We strongly recommend you use HTTPS when calling this operation because the response contains
  2025. * sensitive cryptographic information for configuring your customer gateway.
  2026. *
  2027. * You can filter the results to return information only about VPN connections that match criteria you
  2028. * specify. For example, you could ask to get information about a particular VPN connection (or all)
  2029. * only if the VPN's state is pending or available. You can specify multiple filters (e.g., the VPN
  2030. * connection is associated with a particular VPN gateway, and the gateway's state is pending or
  2031. * available). The result includes information for a particular VPN connection only if the VPN
  2032. * connection matches all your filters. If there's no match, no special message is returned; the
  2033. * response is simply empty. The following table shows the available filters.
  2034. *
  2035. * Access:
  2036. * public
  2037. *
  2038. * Parameters:
  2039. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2040. *
  2041. * Keys for the $opt parameter:
  2042. * VpnConnectionId - _string_|_array_ (Optional) A VPN connection ID. More than one may be specified per request. Pass a string for a single value, or an indexed array for multiple values.
  2043. * Filter - _ComplexList_ (Optional) A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  2044. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  2045. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  2046. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2047. *
  2048. * Returns:
  2049. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2050. */
  2051. public function describe_vpn_connections($opt = null)
  2052. {
  2053. if (!$opt) $opt = array();
  2054. // Optional parameter
  2055. if (isset($opt['VpnConnectionId']))
  2056. {
  2057. $opt = array_merge($opt, CFComplexType::map(array(
  2058. 'VpnConnectionId' => (is_array($opt['VpnConnectionId']) ? $opt['VpnConnectionId'] : array($opt['VpnConnectionId']))
  2059. )));
  2060. unset($opt['VpnConnectionId']);
  2061. }
  2062. // Optional parameter
  2063. if (isset($opt['Filter']))
  2064. {
  2065. $opt = array_merge($opt, CFComplexType::map(array(
  2066. 'Filter' => $opt['Filter']
  2067. )));
  2068. unset($opt['Filter']);
  2069. }
  2070. return $this->authenticate('DescribeVpnConnections', $opt, $this->hostname);
  2071. }
  2072. /**
  2073. * Method: create_snapshot()
  2074. * Create a snapshot of the volume identified by volume ID. A volume does not have to be detached at
  2075. * the time the snapshot is taken.
  2076. *
  2077. * Snapshot creation requires that the system is in a consistent state. For instance, this means that
  2078. * if taking a snapshot of a database, the tables must be read-only locked to ensure that the snapshot
  2079. * will not contain a corrupted version of the database. Therefore, be careful when using this API to
  2080. * ensure that the system remains in the consistent state until the create snapshot status has
  2081. * returned.
  2082. *
  2083. * Access:
  2084. * public
  2085. *
  2086. * Parameters:
  2087. * $volume_id - _string_ (Required) The ID of the volume from which to create the snapshot.
  2088. * $description - _string_ (Required) The description for the new snapshot.
  2089. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2090. *
  2091. * Keys for the $opt parameter:
  2092. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2093. *
  2094. * Returns:
  2095. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2096. */
  2097. public function create_snapshot($volume_id, $description, $opt = null)
  2098. {
  2099. if (!$opt) $opt = array();
  2100. $opt['VolumeId'] = $volume_id;
  2101. $opt['Description'] = $description;
  2102. return $this->authenticate('CreateSnapshot', $opt, $this->hostname);
  2103. }
  2104. /**
  2105. * Method: delete_volume()
  2106. * Deletes a previously created volume. Once successfully deleted, a new volume can be created with the
  2107. * same name.
  2108. *
  2109. * Access:
  2110. * public
  2111. *
  2112. * Parameters:
  2113. * $volume_id - _string_ (Required) The ID of the EBS volume to delete.
  2114. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2115. *
  2116. * Keys for the $opt parameter:
  2117. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2118. *
  2119. * Returns:
  2120. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2121. */
  2122. public function delete_volume($volume_id, $opt = null)
  2123. {
  2124. if (!$opt) $opt = array();
  2125. $opt['VolumeId'] = $volume_id;
  2126. return $this->authenticate('DeleteVolume', $opt, $this->hostname);
  2127. }
  2128. /**
  2129. * Method: modify_snapshot_attribute()
  2130. * Adds or remove permission settings for the specified snapshot.
  2131. *
  2132. * Access:
  2133. * public
  2134. *
  2135. * Parameters:
  2136. * $snapshot_id - _string_ (Required) The ID of the EBS snapshot whose attributes are being modified.
  2137. * $attribute - _string_ (Required) The name of the attribute being modified. Available attribute names: createVolumePermission
  2138. * $operation_type - _string_ (Required) The operation to perform on the attribute. Available operation names: add, remove
  2139. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2140. *
  2141. * Keys for the $opt parameter:
  2142. * UserId - _string_|_array_ (Optional) The AWS user IDs to add to or remove from the list of users that have permission to create EBS volumes from the specified snapshot. Currently supports "all". Only valid when the createVolumePermission attribute is being modified. Pass a string for a single value, or an indexed array for multiple values.
  2143. * UserGroup - _string_|_array_ (Optional) The AWS group names to add to or remove from the list of groups that have permission to create EBS volumes from the specified snapshot. Currently supports "all". Only valid when the `createVolumePermission` attribute is being modified. Pass a string for a single value, or an indexed array for multiple values.
  2144. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2145. *
  2146. * Returns:
  2147. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2148. */
  2149. public function modify_snapshot_attribute($snapshot_id, $attribute, $operation_type, $opt = null)
  2150. {
  2151. if (!$opt) $opt = array();
  2152. $opt['SnapshotId'] = $snapshot_id;
  2153. $opt['Attribute'] = $attribute;
  2154. $opt['OperationType'] = $operation_type;
  2155. // Optional parameter
  2156. if (isset($opt['UserId']))
  2157. {
  2158. $opt = array_merge($opt, CFComplexType::map(array(
  2159. 'UserId' => (is_array($opt['UserId']) ? $opt['UserId'] : array($opt['UserId']))
  2160. )));
  2161. unset($opt['UserId']);
  2162. }
  2163. // Optional parameter
  2164. if (isset($opt['UserGroup']))
  2165. {
  2166. $opt = array_merge($opt, CFComplexType::map(array(
  2167. 'UserGroup' => (is_array($opt['UserGroup']) ? $opt['UserGroup'] : array($opt['UserGroup']))
  2168. )));
  2169. unset($opt['UserGroup']);
  2170. }
  2171. return $this->authenticate('ModifySnapshotAttribute', $opt, $this->hostname);
  2172. }
  2173. /**
  2174. * Method: terminate_instances()
  2175. * The TerminateInstances operation shuts down one or more instances. This operation is idempotent; if
  2176. * you terminate an instance more than once, each call will succeed.
  2177. *
  2178. * Terminated instances will remain visible after termination (approximately one hour).
  2179. *
  2180. * Access:
  2181. * public
  2182. *
  2183. * Parameters:
  2184. * $instance_id - _string_|_array_ (Required) The list of instances to terminate. Pass a string for a single value, or an indexed array for multiple values.
  2185. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2186. *
  2187. * Keys for the $opt parameter:
  2188. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2189. *
  2190. * Returns:
  2191. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2192. */
  2193. public function terminate_instances($instance_id, $opt = null)
  2194. {
  2195. if (!$opt) $opt = array();
  2196. // Required parameter
  2197. $opt = array_merge($opt, CFComplexType::map(array(
  2198. 'InstanceId' => (is_array($instance_id) ? $instance_id : array($instance_id))
  2199. )));
  2200. return $this->authenticate('TerminateInstances', $opt, $this->hostname);
  2201. }
  2202. /**
  2203. * Method: delete_spot_datafeed_subscription()
  2204. * Deletes the data feed for Spot Instances.
  2205. *
  2206. * For conceptual information about Spot Instances, refer to the Amazon Elastic Compute Cloud
  2207. * Developer Guide or Amazon Elastic Compute Cloud User Guide.
  2208. *
  2209. * Access:
  2210. * public
  2211. *
  2212. * Parameters:
  2213. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2214. *
  2215. * Keys for the $opt parameter:
  2216. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2217. *
  2218. * Returns:
  2219. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2220. */
  2221. public function delete_spot_datafeed_subscription($opt = null)
  2222. {
  2223. if (!$opt) $opt = array();
  2224. return $this->authenticate('DeleteSpotDatafeedSubscription', $opt, $this->hostname);
  2225. }
  2226. /**
  2227. * Method: describe_vpcs()
  2228. * Gives you information about your VPCs. You can filter the results to return information only about
  2229. * VPCs that match criteria you specify. For example, you could ask to get information about a
  2230. * particular VPC or VPCs (or all your VPCs) only if the VPC's state is available. You can specify
  2231. * multiple filters (e.g., the VPC uses one of several sets of DHCP options, and the VPC's state is
  2232. * available). The result includes information for a particular VPC only if the VPC matches all your
  2233. * filters. If there's no match, no special message is returned; the response is simply empty. The
  2234. * following table shows the available filters.
  2235. *
  2236. * Access:
  2237. * public
  2238. *
  2239. * Parameters:
  2240. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2241. *
  2242. * Keys for the $opt parameter:
  2243. * VpcId - _string_|_array_ (Optional) A set of one or more IDs of VPCs to describe. Pass a string for a single value, or an indexed array for multiple values.
  2244. * Filter - _ComplexList_ (Optional) A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  2245. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  2246. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  2247. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2248. *
  2249. * Returns:
  2250. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2251. */
  2252. public function describe_vpcs($opt = null)
  2253. {
  2254. if (!$opt) $opt = array();
  2255. // Optional parameter
  2256. if (isset($opt['VpcId']))
  2257. {
  2258. $opt = array_merge($opt, CFComplexType::map(array(
  2259. 'VpcId' => (is_array($opt['VpcId']) ? $opt['VpcId'] : array($opt['VpcId']))
  2260. )));
  2261. unset($opt['VpcId']);
  2262. }
  2263. // Optional parameter
  2264. if (isset($opt['Filter']))
  2265. {
  2266. $opt = array_merge($opt, CFComplexType::map(array(
  2267. 'Filter' => $opt['Filter']
  2268. )));
  2269. unset($opt['Filter']);
  2270. }
  2271. return $this->authenticate('DescribeVpcs', $opt, $this->hostname);
  2272. }
  2273. /**
  2274. * Method: associate_address()
  2275. * The AssociateAddress operation associates an elastic IP address with an instance.
  2276. *
  2277. * If the IP address is currently assigned to another instance, the IP address is assigned to the new
  2278. * instance. This is an idempotent operation. If you enter it more than once, Amazon EC2 does not
  2279. * return an error.
  2280. *
  2281. * Access:
  2282. * public
  2283. *
  2284. * Parameters:
  2285. * $instance_id - _string_ (Required) The instance to associate with the IP address.
  2286. * $public_ip - _string_ (Required) IP address that you are assigning to the instance.
  2287. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2288. *
  2289. * Keys for the $opt parameter:
  2290. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2291. *
  2292. * Returns:
  2293. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2294. */
  2295. public function associate_address($instance_id, $public_ip, $opt = null)
  2296. {
  2297. if (!$opt) $opt = array();
  2298. $opt['InstanceId'] = $instance_id;
  2299. $opt['PublicIp'] = $public_ip;
  2300. return $this->authenticate('AssociateAddress', $opt, $this->hostname);
  2301. }
  2302. /**
  2303. * Method: deactivate_license()
  2304. * Deactivates a specific number of licenses. Deactivations can be done against a specific license ID
  2305. * after they have persisted for at least a 90-day period.
  2306. *
  2307. * Access:
  2308. * public
  2309. *
  2310. * Parameters:
  2311. * $license_id - _string_ (Required) Specifies the ID for the specific license to deactivate against.
  2312. * $capacity - _integer_ (Required) Specifies the amount of capacity to deactivate against the license.
  2313. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2314. *
  2315. * Keys for the $opt parameter:
  2316. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2317. *
  2318. * Returns:
  2319. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2320. */
  2321. public function deactivate_license($license_id, $capacity, $opt = null)
  2322. {
  2323. if (!$opt) $opt = array();
  2324. $opt['LicenseId'] = $license_id;
  2325. $opt['Capacity'] = $capacity;
  2326. return $this->authenticate('DeactivateLicense', $opt, $this->hostname);
  2327. }
  2328. /**
  2329. * Method: describe_snapshot_attribute()
  2330. * Returns information about an attribute of a snapshot. Only one attribute can be specified per call.
  2331. *
  2332. * Access:
  2333. * public
  2334. *
  2335. * Parameters:
  2336. * $snapshot_id - _string_ (Required) The ID of the EBS snapshot whose attribute is being described.
  2337. * $attribute - _string_ (Required) The name of the EBS attribute to describe. Available attribute names: createVolumePermission
  2338. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2339. *
  2340. * Keys for the $opt parameter:
  2341. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2342. *
  2343. * Returns:
  2344. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2345. */
  2346. public function describe_snapshot_attribute($snapshot_id, $attribute, $opt = null)
  2347. {
  2348. if (!$opt) $opt = array();
  2349. $opt['SnapshotId'] = $snapshot_id;
  2350. $opt['Attribute'] = $attribute;
  2351. return $this->authenticate('DescribeSnapshotAttribute', $opt, $this->hostname);
  2352. }
  2353. /**
  2354. * Method: delete_customer_gateway()
  2355. * Deletes a customer gateway. You must delete the VPN connection before deleting the customer gateway.
  2356. *
  2357. * You can have a single active customer gateway per AWS account (active means that you've created a
  2358. * VPN connection with that customer gateway). AWS might delete any customer gateway you leave inactive
  2359. * for an extended period of time.
  2360. *
  2361. * Access:
  2362. * public
  2363. *
  2364. * Parameters:
  2365. * $customer_gateway_id - _string_ (Required) The ID of the customer gateway to delete.
  2366. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2367. *
  2368. * Keys for the $opt parameter:
  2369. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2370. *
  2371. * Returns:
  2372. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2373. */
  2374. public function delete_customer_gateway($customer_gateway_id, $opt = null)
  2375. {
  2376. if (!$opt) $opt = array();
  2377. $opt['CustomerGatewayId'] = $customer_gateway_id;
  2378. return $this->authenticate('DeleteCustomerGateway', $opt, $this->hostname);
  2379. }
  2380. /**
  2381. * Method: describe_addresses()
  2382. * The DescribeAddresses operation lists elastic IP addresses assigned to your account.
  2383. *
  2384. * Access:
  2385. * public
  2386. *
  2387. * Parameters:
  2388. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2389. *
  2390. * Keys for the $opt parameter:
  2391. * PublicIp - _string_|_array_ (Optional) The optional list of Elastic IP addresses to describe. Pass a string for a single value, or an indexed array for multiple values.
  2392. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for Addresses. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  2393. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  2394. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  2395. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2396. *
  2397. * Returns:
  2398. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2399. */
  2400. public function describe_addresses($opt = null)
  2401. {
  2402. if (!$opt) $opt = array();
  2403. // Optional parameter
  2404. if (isset($opt['PublicIp']))
  2405. {
  2406. $opt = array_merge($opt, CFComplexType::map(array(
  2407. 'PublicIp' => (is_array($opt['PublicIp']) ? $opt['PublicIp'] : array($opt['PublicIp']))
  2408. )));
  2409. unset($opt['PublicIp']);
  2410. }
  2411. // Optional parameter
  2412. if (isset($opt['Filter']))
  2413. {
  2414. $opt = array_merge($opt, CFComplexType::map(array(
  2415. 'Filter' => $opt['Filter']
  2416. )));
  2417. unset($opt['Filter']);
  2418. }
  2419. return $this->authenticate('DescribeAddresses', $opt, $this->hostname);
  2420. }
  2421. /**
  2422. * Method: describe_key_pairs()
  2423. * The DescribeKeyPairs operation returns information about key pairs available to you. If you specify
  2424. * key pairs, information about those key pairs is returned. Otherwise, information for all registered
  2425. * key pairs is returned.
  2426. *
  2427. * Access:
  2428. * public
  2429. *
  2430. * Parameters:
  2431. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2432. *
  2433. * Keys for the $opt parameter:
  2434. * KeyName - _string_|_array_ (Optional) The optional list of key pair names to describe. Pass a string for a single value, or an indexed array for multiple values.
  2435. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for KeyPairs. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  2436. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  2437. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  2438. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2439. *
  2440. * Returns:
  2441. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2442. */
  2443. public function describe_key_pairs($opt = null)
  2444. {
  2445. if (!$opt) $opt = array();
  2446. // Optional parameter
  2447. if (isset($opt['KeyName']))
  2448. {
  2449. $opt = array_merge($opt, CFComplexType::map(array(
  2450. 'KeyName' => (is_array($opt['KeyName']) ? $opt['KeyName'] : array($opt['KeyName']))
  2451. )));
  2452. unset($opt['KeyName']);
  2453. }
  2454. // Optional parameter
  2455. if (isset($opt['Filter']))
  2456. {
  2457. $opt = array_merge($opt, CFComplexType::map(array(
  2458. 'Filter' => $opt['Filter']
  2459. )));
  2460. unset($opt['Filter']);
  2461. }
  2462. return $this->authenticate('DescribeKeyPairs', $opt, $this->hostname);
  2463. }
  2464. /**
  2465. * Method: describe_image_attribute()
  2466. * The DescribeImageAttribute operation returns information about an attribute of an AMI. Only one
  2467. * attribute can be specified per call.
  2468. *
  2469. * Access:
  2470. * public
  2471. *
  2472. * Parameters:
  2473. * $image_id - _string_ (Required) The ID of the AMI whose attribute is to be described.
  2474. * $attribute - _string_ (Required) The name of the attribute to describe. Available attribute names: productCodes, kernel, ramdisk, launchPermisson, blockDeviceMapping
  2475. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2476. *
  2477. * Keys for the $opt parameter:
  2478. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2479. *
  2480. * Returns:
  2481. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2482. */
  2483. public function describe_image_attribute($image_id, $attribute, $opt = null)
  2484. {
  2485. if (!$opt) $opt = array();
  2486. $opt['ImageId'] = $image_id;
  2487. $opt['Attribute'] = $attribute;
  2488. return $this->authenticate('DescribeImageAttribute', $opt, $this->hostname);
  2489. }
  2490. /**
  2491. * Method: confirm_product_instance()
  2492. * The ConfirmProductInstance operation returns true if the specified product code is attached to the
  2493. * specified instance. The operation returns false if the product code is not attached to the instance.
  2494. *
  2495. * The ConfirmProductInstance operation can only be executed by the owner of the AMI. This feature is
  2496. * useful when an AMI owner is providing support and wants to verify whether a user's instance is
  2497. * eligible.
  2498. *
  2499. * Access:
  2500. * public
  2501. *
  2502. * Parameters:
  2503. * $product_code - _string_ (Required) The product code to confirm.
  2504. * $instance_id - _string_ (Required) The ID of the instance to confirm.
  2505. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2506. *
  2507. * Keys for the $opt parameter:
  2508. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2509. *
  2510. * Returns:
  2511. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2512. */
  2513. public function confirm_product_instance($product_code, $instance_id, $opt = null)
  2514. {
  2515. if (!$opt) $opt = array();
  2516. $opt['ProductCode'] = $product_code;
  2517. $opt['InstanceId'] = $instance_id;
  2518. return $this->authenticate('ConfirmProductInstance', $opt, $this->hostname);
  2519. }
  2520. /**
  2521. * Method: create_volume()
  2522. * Initializes an empty volume of a given size.
  2523. *
  2524. * Access:
  2525. * public
  2526. *
  2527. * Parameters:
  2528. * $availability_zone - _string_ (Required) The Availability Zone in which to create the new volume.
  2529. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2530. *
  2531. * Keys for the $opt parameter:
  2532. * Size - _integer_ (Optional) The size of the volume, in gigabytes. Required if you are not creating a volume from a snapshot.
  2533. * SnapshotId - _string_ (Optional) The ID of the snapshot from which to create the new volume.
  2534. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2535. *
  2536. * Returns:
  2537. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2538. */
  2539. public function create_volume($availability_zone, $opt = null)
  2540. {
  2541. if (!$opt) $opt = array();
  2542. $opt['AvailabilityZone'] = $availability_zone;
  2543. return $this->authenticate('CreateVolume', $opt, $this->hostname);
  2544. }
  2545. /**
  2546. * Method: describe_vpn_gateways()
  2547. * Gives you information about your VPN gateways. You can filter the results to return information only
  2548. * about VPN gateways that match criteria you specify. For example, you could ask to get information
  2549. * about a particular VPN gateway (or all) only if the gateway's state is pending or available. You can
  2550. * specify multiple filters (e.g., the VPN gateway is in a particular Availability Zone and the
  2551. * gateway's state is pending or available). The result includes information for a particular VPN
  2552. * gateway only if the gateway matches all your filters. If there's no match, no special message is
  2553. * returned; the response is simply empty. The following table shows the available filters.
  2554. *
  2555. * Access:
  2556. * public
  2557. *
  2558. * Parameters:
  2559. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2560. *
  2561. * Keys for the $opt parameter:
  2562. * VpnGatewayId - _string_|_array_ (Optional) A set of one or more VPN Gateway IDs. Pass a string for a single value, or an indexed array for multiple values.
  2563. * Filter - _ComplexList_ (Optional) A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  2564. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  2565. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  2566. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2567. *
  2568. * Returns:
  2569. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2570. */
  2571. public function describe_vpn_gateways($opt = null)
  2572. {
  2573. if (!$opt) $opt = array();
  2574. // Optional parameter
  2575. if (isset($opt['VpnGatewayId']))
  2576. {
  2577. $opt = array_merge($opt, CFComplexType::map(array(
  2578. 'VpnGatewayId' => (is_array($opt['VpnGatewayId']) ? $opt['VpnGatewayId'] : array($opt['VpnGatewayId']))
  2579. )));
  2580. unset($opt['VpnGatewayId']);
  2581. }
  2582. // Optional parameter
  2583. if (isset($opt['Filter']))
  2584. {
  2585. $opt = array_merge($opt, CFComplexType::map(array(
  2586. 'Filter' => $opt['Filter']
  2587. )));
  2588. unset($opt['Filter']);
  2589. }
  2590. return $this->authenticate('DescribeVpnGateways', $opt, $this->hostname);
  2591. }
  2592. /**
  2593. * Method: create_subnet()
  2594. * Creates a subnet in an existing VPC. You can create up to 20 subnets in a VPC. If you add more than
  2595. * one subnet to a VPC, they're set up in a star topology with a logical router in the middle. When you
  2596. * create each subnet, you provide the VPC ID and the CIDR block you want for the subnet. Once you
  2597. * create a subnet, you can't change its CIDR block. The subnet's CIDR block can be the same as the
  2598. * VPC's CIDR block (assuming you want only a single subnet in the VPC), or a subset of the VPC's CIDR
  2599. * block. If you create more than one subnet in a VPC, the subnets' CIDR blocks must not overlap. The
  2600. * smallest subnet (and VPC) you can create uses a /28 netmask (16 IP addresses), and the largest uses
  2601. * a /18 netmask (16,384 IP addresses).
  2602. *
  2603. * AWS reserves both the first four and the last IP address in each subnet's CIDR block. They're not
  2604. * available for use.
  2605. *
  2606. * Access:
  2607. * public
  2608. *
  2609. * Parameters:
  2610. * $vpc_id - _string_ (Required) The ID of the VPC to create the subnet in.
  2611. * $cidr_block - _string_ (Required) The CIDR block the subnet is to cover.
  2612. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2613. *
  2614. * Keys for the $opt parameter:
  2615. * AvailabilityZone - _string_ (Optional) The Availability Zone to create the subnet in.
  2616. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2617. *
  2618. * Returns:
  2619. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2620. */
  2621. public function create_subnet($vpc_id, $cidr_block, $opt = null)
  2622. {
  2623. if (!$opt) $opt = array();
  2624. $opt['VpcId'] = $vpc_id;
  2625. $opt['CidrBlock'] = $cidr_block;
  2626. return $this->authenticate('CreateSubnet', $opt, $this->hostname);
  2627. }
  2628. /**
  2629. * Method: describe_reserved_instances_offerings()
  2630. * The DescribeReservedInstancesOfferings operation describes Reserved Instance offerings that are
  2631. * available for purchase. With Amazon EC2 Reserved Instances, you purchase the right to launch Amazon
  2632. * EC2 instances for a period of time (without getting insufficient capacity errors) and pay a lower
  2633. * usage rate for the actual time used.
  2634. *
  2635. * Access:
  2636. * public
  2637. *
  2638. * Parameters:
  2639. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2640. *
  2641. * Keys for the $opt parameter:
  2642. * ReservedInstancesOfferingId - _string_|_array_ (Optional) An optional list of the unique IDs of the Reserved Instance offerings to describe. Pass a string for a single value, or an indexed array for multiple values.
  2643. * InstanceType - _string_ (Optional) The instance type on which the Reserved Instance can be used. [Allowed values: `t1.micro`, `m1.small`, `m1.large`, `m1.xlarge`, `m2.xlarge`, `m2.2xlarge`, `m2.4xlarge`, `c1.medium`, `c1.xlarge`, `cc1.4xlarge`, `cg1.4xlarge`]
  2644. * AvailabilityZone - _string_ (Optional) The Availability Zone in which the Reserved Instance can be used.
  2645. * ProductDescription - _string_ (Optional) The Reserved Instance product description.
  2646. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for ReservedInstancesOfferings. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  2647. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  2648. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  2649. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2650. *
  2651. * Returns:
  2652. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2653. */
  2654. public function describe_reserved_instances_offerings($opt = null)
  2655. {
  2656. if (!$opt) $opt = array();
  2657. // Optional parameter
  2658. if (isset($opt['ReservedInstancesOfferingId']))
  2659. {
  2660. $opt = array_merge($opt, CFComplexType::map(array(
  2661. 'ReservedInstancesOfferingId' => (is_array($opt['ReservedInstancesOfferingId']) ? $opt['ReservedInstancesOfferingId'] : array($opt['ReservedInstancesOfferingId']))
  2662. )));
  2663. unset($opt['ReservedInstancesOfferingId']);
  2664. }
  2665. // Optional parameter
  2666. if (isset($opt['Filter']))
  2667. {
  2668. $opt = array_merge($opt, CFComplexType::map(array(
  2669. 'Filter' => $opt['Filter']
  2670. )));
  2671. unset($opt['Filter']);
  2672. }
  2673. return $this->authenticate('DescribeReservedInstancesOfferings', $opt, $this->hostname);
  2674. }
  2675. /**
  2676. * Method: describe_volumes()
  2677. * Describes the status of the indicated or, in lieu of any specified, all volumes belonging to the
  2678. * caller. Volumes that have been deleted are not described.
  2679. *
  2680. * Access:
  2681. * public
  2682. *
  2683. * Parameters:
  2684. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2685. *
  2686. * Keys for the $opt parameter:
  2687. * VolumeId - _string_|_array_ (Optional) The optional list of EBS volumes to describe. Pass a string for a single value, or an indexed array for multiple values.
  2688. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for Volumes. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  2689. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  2690. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  2691. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2692. *
  2693. * Returns:
  2694. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2695. */
  2696. public function describe_volumes($opt = null)
  2697. {
  2698. if (!$opt) $opt = array();
  2699. // Optional parameter
  2700. if (isset($opt['VolumeId']))
  2701. {
  2702. $opt = array_merge($opt, CFComplexType::map(array(
  2703. 'VolumeId' => (is_array($opt['VolumeId']) ? $opt['VolumeId'] : array($opt['VolumeId']))
  2704. )));
  2705. unset($opt['VolumeId']);
  2706. }
  2707. // Optional parameter
  2708. if (isset($opt['Filter']))
  2709. {
  2710. $opt = array_merge($opt, CFComplexType::map(array(
  2711. 'Filter' => $opt['Filter']
  2712. )));
  2713. unset($opt['Filter']);
  2714. }
  2715. return $this->authenticate('DescribeVolumes', $opt, $this->hostname);
  2716. }
  2717. /**
  2718. * Method: delete_snapshot()
  2719. * Deletes the snapshot identified by snapshotId.
  2720. *
  2721. * Access:
  2722. * public
  2723. *
  2724. * Parameters:
  2725. * $snapshot_id - _string_ (Required) The ID of the snapshot to delete.
  2726. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2727. *
  2728. * Keys for the $opt parameter:
  2729. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2730. *
  2731. * Returns:
  2732. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2733. */
  2734. public function delete_snapshot($snapshot_id, $opt = null)
  2735. {
  2736. if (!$opt) $opt = array();
  2737. $opt['SnapshotId'] = $snapshot_id;
  2738. return $this->authenticate('DeleteSnapshot', $opt, $this->hostname);
  2739. }
  2740. /**
  2741. * Method: describe_dhcp_options()
  2742. * Gives you information about one or more sets of DHCP options. You can specify one or more DHCP
  2743. * options set IDs, or no IDs (to describe all your sets of DHCP options). The returned information
  2744. * consists of:
  2745. *
  2746. * - The DHCP options set ID
  2747. *
  2748. * - The options
  2749. *
  2750. * Access:
  2751. * public
  2752. *
  2753. * Parameters:
  2754. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2755. *
  2756. * Keys for the $opt parameter:
  2757. * DhcpOptionsId - _string_|_array_ (Optional) Pass a string for a single value, or an indexed array for multiple values.
  2758. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for DhcpOptions. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  2759. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  2760. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  2761. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2762. *
  2763. * Returns:
  2764. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2765. */
  2766. public function describe_dhcp_options($opt = null)
  2767. {
  2768. if (!$opt) $opt = array();
  2769. // Optional parameter
  2770. if (isset($opt['DhcpOptionsId']))
  2771. {
  2772. $opt = array_merge($opt, CFComplexType::map(array(
  2773. 'DhcpOptionsId' => (is_array($opt['DhcpOptionsId']) ? $opt['DhcpOptionsId'] : array($opt['DhcpOptionsId']))
  2774. )));
  2775. unset($opt['DhcpOptionsId']);
  2776. }
  2777. // Optional parameter
  2778. if (isset($opt['Filter']))
  2779. {
  2780. $opt = array_merge($opt, CFComplexType::map(array(
  2781. 'Filter' => $opt['Filter']
  2782. )));
  2783. unset($opt['Filter']);
  2784. }
  2785. return $this->authenticate('DescribeDhcpOptions', $opt, $this->hostname);
  2786. }
  2787. /**
  2788. * Method: monitor_instances()
  2789. * Enables monitoring for a running instance.
  2790. *
  2791. * Access:
  2792. * public
  2793. *
  2794. * Parameters:
  2795. * $instance_id - _string_|_array_ (Required) The list of Amazon EC2 instances on which to enable monitoring. Pass a string for a single value, or an indexed array for multiple values.
  2796. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2797. *
  2798. * Keys for the $opt parameter:
  2799. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2800. *
  2801. * Returns:
  2802. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2803. */
  2804. public function monitor_instances($instance_id, $opt = null)
  2805. {
  2806. if (!$opt) $opt = array();
  2807. // Required parameter
  2808. $opt = array_merge($opt, CFComplexType::map(array(
  2809. 'InstanceId' => (is_array($instance_id) ? $instance_id : array($instance_id))
  2810. )));
  2811. return $this->authenticate('MonitorInstances', $opt, $this->hostname);
  2812. }
  2813. /**
  2814. * Method: disassociate_address()
  2815. * The DisassociateAddress operation disassociates the specified elastic IP address from the instance
  2816. * to which it is assigned. This is an idempotent operation. If you enter it more than once, Amazon EC2
  2817. * does not return an error.
  2818. *
  2819. * Access:
  2820. * public
  2821. *
  2822. * Parameters:
  2823. * $public_ip - _string_ (Required) The elastic IP address that you are disassociating from the instance.
  2824. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2825. *
  2826. * Keys for the $opt parameter:
  2827. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2828. *
  2829. * Returns:
  2830. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2831. */
  2832. public function disassociate_address($public_ip, $opt = null)
  2833. {
  2834. if (!$opt) $opt = array();
  2835. $opt['PublicIp'] = $public_ip;
  2836. return $this->authenticate('DisassociateAddress', $opt, $this->hostname);
  2837. }
  2838. /**
  2839. * Method: create_placement_group()
  2840. * Creates a PlacementGroup into which multiple Amazon EC2 instances can be launched. Users must give
  2841. * the group a name unique within the scope of the user account.
  2842. *
  2843. * Access:
  2844. * public
  2845. *
  2846. * Parameters:
  2847. * $group_name - _string_ (Required) The name of the `PlacementGroup`.
  2848. * $strategy - _string_ (Required) The `PlacementGroup` strategy. [Allowed values: `cluster`]
  2849. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2850. *
  2851. * Keys for the $opt parameter:
  2852. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2853. *
  2854. * Returns:
  2855. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2856. */
  2857. public function create_placement_group($group_name, $strategy, $opt = null)
  2858. {
  2859. if (!$opt) $opt = array();
  2860. $opt['GroupName'] = $group_name;
  2861. $opt['Strategy'] = $strategy;
  2862. return $this->authenticate('CreatePlacementGroup', $opt, $this->hostname);
  2863. }
  2864. /**
  2865. * Method: describe_bundle_tasks()
  2866. * The DescribeBundleTasks operation describes in-progress and recent bundle tasks. Complete and failed
  2867. * tasks are removed from the list a short time after completion. If no bundle ids are given, all
  2868. * bundle tasks are returned.
  2869. *
  2870. * Access:
  2871. * public
  2872. *
  2873. * Parameters:
  2874. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2875. *
  2876. * Keys for the $opt parameter:
  2877. * BundleId - _string_|_array_ (Optional) The list of bundle task IDs to describe. Pass a string for a single value, or an indexed array for multiple values.
  2878. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for BundleTasks. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  2879. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  2880. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  2881. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2882. *
  2883. * Returns:
  2884. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2885. */
  2886. public function describe_bundle_tasks($opt = null)
  2887. {
  2888. if (!$opt) $opt = array();
  2889. // Optional parameter
  2890. if (isset($opt['BundleId']))
  2891. {
  2892. $opt = array_merge($opt, CFComplexType::map(array(
  2893. 'BundleId' => (is_array($opt['BundleId']) ? $opt['BundleId'] : array($opt['BundleId']))
  2894. )));
  2895. unset($opt['BundleId']);
  2896. }
  2897. // Optional parameter
  2898. if (isset($opt['Filter']))
  2899. {
  2900. $opt = array_merge($opt, CFComplexType::map(array(
  2901. 'Filter' => $opt['Filter']
  2902. )));
  2903. unset($opt['Filter']);
  2904. }
  2905. return $this->authenticate('DescribeBundleTasks', $opt, $this->hostname);
  2906. }
  2907. /**
  2908. * Method: bundle_instance()
  2909. * The BundleInstance operation request that an instance is bundled the next time it boots. The
  2910. * bundling process creates a new image from a running instance and stores the AMI data in S3. Once
  2911. * bundled, the image must be registered in the normal way using the RegisterImage API.
  2912. *
  2913. * Access:
  2914. * public
  2915. *
  2916. * Parameters:
  2917. * $instance_id - _string_ (Required) The ID of the instance to bundle.
  2918. * $policy - _ComplexType_ (Required) The details of S3 storage for bundling a Windows instance. A **required** ComplexType must be set by passing a nested associative array with the following entries as keys.
  2919. * $opt - _array_ (Optional) Associative array of parameters which can have the following keys:
  2920. *
  2921. * Keys for the $policy parameter:
  2922. * Bucket - _string_ (Optional) The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.
  2923. * Prefix - _string_ (Optional) The prefix to use when storing the AMI in S3.
  2924. * AWSAccessKeyId - _string_ (Optional) The Access Key ID of the owner of the Amazon S3 bucket. Use the <CFPolicy::get_key()> method of a <CFPolicy> instance.
  2925. * UploadPolicy - _string_ (Optional) A Base64-encoded Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on the user's behalf. Use the <CFPolicy::get_policy()> method of a <CFPolicy> instance.
  2926. * UploadPolicySignature - _string_ (Optional) The signature of the Base64 encoded JSON document. Use the <CFPolicy::get_policy_signature()> method of a <CFPolicy> instance.
  2927. *
  2928. * Keys for the $opt parameter:
  2929. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This is useful for manually-managed batch requests.
  2930. *
  2931. * Returns:
  2932. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2933. */
  2934. public function bundle_instance($instance_id, $policy, $opt = null)
  2935. {
  2936. if (!$opt) $opt = array();
  2937. $opt['InstanceId'] = $instance_id;
  2938. $opt = array_merge($opt, CFComplexType::map(array(
  2939. 'Storage.S3' => $policy
  2940. )));
  2941. return $this->authenticate('BundleInstance', $opt, $this->hostname);
  2942. }
  2943. /**
  2944. * Method: delete_placement_group()
  2945. * Deletes a PlacementGroup from a user's account. Terminate all Amazon EC2 instances in the placement
  2946. * group before deletion.
  2947. *
  2948. * Access:
  2949. * public
  2950. *
  2951. * Parameters:
  2952. * $group_name - _string_ (Required) The name of the `PlacementGroup` to delete.
  2953. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2954. *
  2955. * Keys for the $opt parameter:
  2956. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  2957. *
  2958. * Returns:
  2959. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  2960. */
  2961. public function delete_placement_group($group_name, $opt = null)
  2962. {
  2963. if (!$opt) $opt = array();
  2964. $opt['GroupName'] = $group_name;
  2965. return $this->authenticate('DeletePlacementGroup', $opt, $this->hostname);
  2966. }
  2967. /**
  2968. * Method: revoke_security_group_ingress()
  2969. * The RevokeSecurityGroupIngress operation revokes permissions from a security group. The permissions
  2970. * used to revoke must be specified using the same values used to grant the permissions.
  2971. *
  2972. * Permissions are specified by IP protocol (TCP, UDP, or ICMP), the source of the request (by IP
  2973. * range or an Amazon EC2 user-group pair), the source and destination port ranges (for TCP and UDP),
  2974. * and the ICMP codes and types (for ICMP).
  2975. *
  2976. * Permission changes are quickly propagated to instances within the security group. However,
  2977. * depending on the number of instances in the group, a small delay might occur.
  2978. *
  2979. * Access:
  2980. * public
  2981. *
  2982. * Parameters:
  2983. * $group_name - _string_ (Required) The name of the security group from which to remove permissions.
  2984. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  2985. *
  2986. * Keys for the $opt parameter:
  2987. * SourceSecurityGroupName - _string_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. Name of the source security group. Cannot be used when specifying a CIDR IP address.
  2988. * SourceSecurityGroupOwnerId - _string_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. AWS user ID of an account. Cannot be used when specifying a CIDR IP address.
  2989. * IpProtocol - _string_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. IP protocol. Valid values: tcp, udp, icmp
  2990. * FromPort - _integer_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).
  2991. * ToPort - _integer_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).
  2992. * CidrIp - _string_ (Optional) Deprecated - use the list of IP permissions to specify this information instead. CIDR range.
  2993. * IpPermissions - _ComplexList_ (Optional) List of IP permissions to revoke on the specified security group. For an IP permission to be removed, it must exactly match one of the IP permissions you specify in this list. Specifying permissions through IP permissions is the preferred way of revoking permissions since it offers more flexibility and control. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `IpPermissions` subtype (documented next), or by passing an associative array with the following `IpPermissions`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  2994. * IpPermissions.x.IpProtocol - _string_ (Optional) The IP protocol of this permission. Valid protocol values: tpc, upd, icmp
  2995. * IpPermissions.x.FromPort - _integer_ (Optional) Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).
  2996. * IpPermissions.x.ToPort - _integer_ (Optional) End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).
  2997. * IpPermissions.x.Groups.y.UserId - _string_ (Optional) The AWS user ID of an account.
  2998. * IpPermissions.x.Groups.y.GroupName - _string_ (Optional) The name of the security group in the specified user's account.
  2999. * IpPermissions.x.IpRanges.y - _string_ (Optional) The list of CIDR IP ranges included in this permission.
  3000. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3001. *
  3002. * Returns:
  3003. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3004. */
  3005. public function revoke_security_group_ingress($group_name, $opt = null)
  3006. {
  3007. if (!$opt) $opt = array();
  3008. $opt['GroupName'] = $group_name;
  3009. // Optional parameter
  3010. if (isset($opt['IpPermissions']))
  3011. {
  3012. $opt = array_merge($opt, CFComplexType::map(array(
  3013. 'IpPermissions' => $opt['IpPermissions']
  3014. )));
  3015. unset($opt['IpPermissions']);
  3016. }
  3017. return $this->authenticate('RevokeSecurityGroupIngress', $opt, $this->hostname);
  3018. }
  3019. /**
  3020. * Method: delete_vpc()
  3021. * Deletes a VPC. You must terminate all running instances and delete all subnets before deleting the
  3022. * VPC, otherwise Amazon VPC returns an error.
  3023. *
  3024. * Access:
  3025. * public
  3026. *
  3027. * Parameters:
  3028. * $vpc_id - _string_ (Required)
  3029. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3030. *
  3031. * Keys for the $opt parameter:
  3032. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3033. *
  3034. * Returns:
  3035. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3036. */
  3037. public function delete_vpc($vpc_id, $opt = null)
  3038. {
  3039. if (!$opt) $opt = array();
  3040. $opt['VpcId'] = $vpc_id;
  3041. return $this->authenticate('DeleteVpc', $opt, $this->hostname);
  3042. }
  3043. /**
  3044. * Method: get_console_output()
  3045. * The GetConsoleOutput operation retrieves console output for the specified instance.
  3046. *
  3047. * Instance console output is buffered and posted shortly after instance boot, reboot, and
  3048. * termination. Amazon EC2 preserves the most recent 64 KB output which will be available for at least
  3049. * one hour after the most recent post.
  3050. *
  3051. * Access:
  3052. * public
  3053. *
  3054. * Parameters:
  3055. * $instance_id - _string_ (Required) The ID of the instance for which you want console output.
  3056. * $opt - _array_ (Optional) Associative array of parameters which can have the following keys:
  3057. *
  3058. * Keys for the $opt parameter:
  3059. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This is useful for manually-managed batch requests.
  3060. *
  3061. * Returns:
  3062. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response. The value of `output` is automatically Base64-decoded.
  3063. */
  3064. public function get_console_output($instance_id, $opt = null)
  3065. {
  3066. if (!$opt) $opt = array();
  3067. $opt['InstanceId'] = $instance_id;
  3068. $response = $this->authenticate('GetConsoleOutput', $opt, $this->hostname);
  3069. // Automatically Base64-decode the <output> value.
  3070. if ($this->util->is_base64((string) $response->body->output))
  3071. {
  3072. $response->body->output = base64_decode($response->body->output);
  3073. }
  3074. return $response;
  3075. }
  3076. /**
  3077. * Method: allocate_address()
  3078. * The AllocateAddress operation acquires an elastic IP address for use with your account.
  3079. *
  3080. * Access:
  3081. * public
  3082. *
  3083. * Parameters:
  3084. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3085. *
  3086. * Keys for the $opt parameter:
  3087. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3088. *
  3089. * Returns:
  3090. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3091. */
  3092. public function allocate_address($opt = null)
  3093. {
  3094. if (!$opt) $opt = array();
  3095. return $this->authenticate('AllocateAddress', $opt, $this->hostname);
  3096. }
  3097. /**
  3098. * Method: modify_image_attribute()
  3099. * The ModifyImageAttribute operation modifies an attribute of an AMI.
  3100. *
  3101. * Access:
  3102. * public
  3103. *
  3104. * Parameters:
  3105. * $image_id - _string_ (Required) The ID of the AMI whose attribute you want to modify.
  3106. * $attribute - _string_ (Required) The name of the AMI attribute you want to modify. Available attributes: launchPermission, productCodes
  3107. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3108. *
  3109. * Keys for the $opt parameter:
  3110. * OperationType - _string_ (Optional) The type of operation being requested. Available operation types: add, remove
  3111. * UserId - _string_|_array_ (Optional) The AWS user ID being added to or removed from the list of users with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified. Pass a string for a single value, or an indexed array for multiple values.
  3112. * UserGroup - _string_|_array_ (Optional) The user group being added to or removed from the list of user groups with launch permissions for this AMI. Only valid when the launchPermission attribute is being modified. Available user groups: all Pass a string for a single value, or an indexed array for multiple values.
  3113. * ProductCode - _string_|_array_ (Optional) The list of product codes being added to or removed from the specified AMI. Only valid when the productCodes attribute is being modified. Pass a string for a single value, or an indexed array for multiple values.
  3114. * Value - _string_ (Optional) The value of the attribute being modified. Only valid when the description attribute is being modified.
  3115. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3116. *
  3117. * Returns:
  3118. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3119. */
  3120. public function modify_image_attribute($image_id, $attribute, $opt = null)
  3121. {
  3122. if (!$opt) $opt = array();
  3123. $opt['ImageId'] = $image_id;
  3124. $opt['Attribute'] = $attribute;
  3125. // Optional parameter
  3126. if (isset($opt['UserId']))
  3127. {
  3128. $opt = array_merge($opt, CFComplexType::map(array(
  3129. 'UserId' => (is_array($opt['UserId']) ? $opt['UserId'] : array($opt['UserId']))
  3130. )));
  3131. unset($opt['UserId']);
  3132. }
  3133. // Optional parameter
  3134. if (isset($opt['UserGroup']))
  3135. {
  3136. $opt = array_merge($opt, CFComplexType::map(array(
  3137. 'UserGroup' => (is_array($opt['UserGroup']) ? $opt['UserGroup'] : array($opt['UserGroup']))
  3138. )));
  3139. unset($opt['UserGroup']);
  3140. }
  3141. // Optional parameter
  3142. if (isset($opt['ProductCode']))
  3143. {
  3144. $opt = array_merge($opt, CFComplexType::map(array(
  3145. 'ProductCode' => (is_array($opt['ProductCode']) ? $opt['ProductCode'] : array($opt['ProductCode']))
  3146. )));
  3147. unset($opt['ProductCode']);
  3148. }
  3149. return $this->authenticate('ModifyImageAttribute', $opt, $this->hostname);
  3150. }
  3151. /**
  3152. * Method: release_address()
  3153. * The ReleaseAddress operation releases an elastic IP address associated with your account.
  3154. *
  3155. * Releasing an IP address automatically disassociates it from any instance with which it is
  3156. * associated. For more information, see DisassociateAddress.
  3157. *
  3158. * After releasing an elastic IP address, it is released to the IP address pool and might no longer be
  3159. * available to your account. Make sure to update your DNS records and any servers or devices that
  3160. * communicate with the address.
  3161. *
  3162. * If you run this operation on an elastic IP address that is already released, the address might be
  3163. * assigned to another account which will cause Amazon EC2 to return an error.
  3164. *
  3165. * Access:
  3166. * public
  3167. *
  3168. * Parameters:
  3169. * $public_ip - _string_ (Required) The elastic IP address that you are releasing from your account.
  3170. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3171. *
  3172. * Keys for the $opt parameter:
  3173. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3174. *
  3175. * Returns:
  3176. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3177. */
  3178. public function release_address($public_ip, $opt = null)
  3179. {
  3180. if (!$opt) $opt = array();
  3181. $opt['PublicIp'] = $public_ip;
  3182. return $this->authenticate('ReleaseAddress', $opt, $this->hostname);
  3183. }
  3184. /**
  3185. * Method: create_customer_gateway()
  3186. * Provides information to AWS about your customer gateway device. The customer gateway is the
  3187. * appliance at your end of the VPN connection (compared to the VPN gateway, which is the device at the
  3188. * AWS side of the VPN connection). You can have a single active customer gateway per AWS account
  3189. * (active means that you've created a VPN connection to use with the customer gateway). AWS might
  3190. * delete any customer gateway that you create with this operation if you leave it inactive for an
  3191. * extended period of time.
  3192. *
  3193. * You must provide the Internet-routable IP address of the customer gateway's external interface. The
  3194. * IP address must be static.
  3195. *
  3196. * You must also provide the device's Border Gateway Protocol (BGP) Autonomous System Number (ASN).
  3197. * You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use
  3198. * a private ASN (in the 64512 - 65534 range). For more information about ASNs, go to [
  3199. * ki/Autonomous_system_%28Internet%29](http://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29).
  3200. *
  3201. * Access:
  3202. * public
  3203. *
  3204. * Parameters:
  3205. * $type - _string_ (Required) The type of VPN connection this customer gateway supports.
  3206. * $ip_address - _string_ (Required) The Internet-routable IP address for the customer gateway's outside interface. The address must be static
  3207. * $bgp_asn - _integer_ (Required) The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).
  3208. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3209. *
  3210. * Keys for the $opt parameter:
  3211. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3212. *
  3213. * Returns:
  3214. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3215. */
  3216. public function create_customer_gateway($type, $ip_address, $bgp_asn, $opt = null)
  3217. {
  3218. if (!$opt) $opt = array();
  3219. $opt['Type'] = $type;
  3220. $opt['IpAddress'] = $ip_address;
  3221. $opt['BgpAsn'] = $bgp_asn;
  3222. return $this->authenticate('CreateCustomerGateway', $opt, $this->hostname);
  3223. }
  3224. /**
  3225. * Method: reset_instance_attribute()
  3226. * Resets an attribute of an instance to its default value.
  3227. *
  3228. * Access:
  3229. * public
  3230. *
  3231. * Parameters:
  3232. * $instance_id - _string_ (Required) The ID of the Amazon EC2 instance whose attribute is being reset.
  3233. * $attribute - _string_ (Required) The name of the attribute being reset. Available attribute names: kernel, ramdisk
  3234. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3235. *
  3236. * Keys for the $opt parameter:
  3237. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3238. *
  3239. * Returns:
  3240. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3241. */
  3242. public function reset_instance_attribute($instance_id, $attribute, $opt = null)
  3243. {
  3244. if (!$opt) $opt = array();
  3245. $opt['InstanceId'] = $instance_id;
  3246. $opt['Attribute'] = $attribute;
  3247. return $this->authenticate('ResetInstanceAttribute', $opt, $this->hostname);
  3248. }
  3249. /**
  3250. * Method: create_spot_datafeed_subscription()
  3251. * Creates the data feed for Spot Instances, enabling you to view Spot Instance usage logs. You can
  3252. * create one data feed per account.
  3253. *
  3254. * For conceptual information about Spot Instances, refer to the Amazon Elastic Compute Cloud
  3255. * Developer Guide or Amazon Elastic Compute Cloud User Guide.
  3256. *
  3257. * Access:
  3258. * public
  3259. *
  3260. * Parameters:
  3261. * $bucket - _string_ (Required) The Amazon S3 bucket in which to store the Spot Instance datafeed.
  3262. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3263. *
  3264. * Keys for the $opt parameter:
  3265. * Prefix - _string_ (Optional) The prefix that is prepended to datafeed files.
  3266. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3267. *
  3268. * Returns:
  3269. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3270. */
  3271. public function create_spot_datafeed_subscription($bucket, $opt = null)
  3272. {
  3273. if (!$opt) $opt = array();
  3274. $opt['Bucket'] = $bucket;
  3275. return $this->authenticate('CreateSpotDatafeedSubscription', $opt, $this->hostname);
  3276. }
  3277. /**
  3278. * Method: create_key_pair()
  3279. * The CreateKeyPair operation creates a new 2048 bit RSA key pair and returns a unique ID that can be
  3280. * used to reference this key pair when launching new instances. For more information, see
  3281. * RunInstances.
  3282. *
  3283. * Access:
  3284. * public
  3285. *
  3286. * Parameters:
  3287. * $key_name - _string_ (Required) The unique name for the new key pair.
  3288. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3289. *
  3290. * Keys for the $opt parameter:
  3291. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3292. *
  3293. * Returns:
  3294. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3295. */
  3296. public function create_key_pair($key_name, $opt = null)
  3297. {
  3298. if (!$opt) $opt = array();
  3299. $opt['KeyName'] = $key_name;
  3300. return $this->authenticate('CreateKeyPair', $opt, $this->hostname);
  3301. }
  3302. /**
  3303. * Method: describe_snapshots()
  3304. * Returns information about the Amazon EBS snapshots available to you. Snapshots available to you
  3305. * include public snapshots available for any AWS account to launch, private snapshots you own, and
  3306. * private snapshots owned by another AWS account but for which you've been given explicit create
  3307. * volume permissions.
  3308. *
  3309. * Access:
  3310. * public
  3311. *
  3312. * Parameters:
  3313. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3314. *
  3315. * Keys for the $opt parameter:
  3316. * SnapshotId - _string_|_array_ (Optional) The optional list of EBS snapshot IDs to describe. Pass a string for a single value, or an indexed array for multiple values.
  3317. * Owner - _string_|_array_ (Optional) The optional list of EBS snapshot owners. Pass a string for a single value, or an indexed array for multiple values.
  3318. * RestorableBy - _string_|_array_ (Optional) The optional list of users who have permission to create volumes from the described EBS snapshots. Pass a string for a single value, or an indexed array for multiple values.
  3319. * Filter - _ComplexList_ (Optional) A list of filters used to match properties for Snapshots. For a complete reference to the available filter keys for this operation, see the Amazon EC2 API reference. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `Filter` subtype (documented next), or by passing an associative array with the following `Filter`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  3320. * Filter.x.Name - _string_ (Optional) Specifies the name of the filter.
  3321. * Filter.x.Value.y - _string_ (Optional) Contains one or more values for the filter.
  3322. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3323. *
  3324. * Returns:
  3325. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3326. */
  3327. public function describe_snapshots($opt = null)
  3328. {
  3329. if (!$opt) $opt = array();
  3330. // Optional parameter
  3331. if (isset($opt['SnapshotId']))
  3332. {
  3333. $opt = array_merge($opt, CFComplexType::map(array(
  3334. 'SnapshotId' => (is_array($opt['SnapshotId']) ? $opt['SnapshotId'] : array($opt['SnapshotId']))
  3335. )));
  3336. unset($opt['SnapshotId']);
  3337. }
  3338. // Optional parameter
  3339. if (isset($opt['Owner']))
  3340. {
  3341. $opt = array_merge($opt, CFComplexType::map(array(
  3342. 'Owner' => (is_array($opt['Owner']) ? $opt['Owner'] : array($opt['Owner']))
  3343. )));
  3344. unset($opt['Owner']);
  3345. }
  3346. // Optional parameter
  3347. if (isset($opt['RestorableBy']))
  3348. {
  3349. $opt = array_merge($opt, CFComplexType::map(array(
  3350. 'RestorableBy' => (is_array($opt['RestorableBy']) ? $opt['RestorableBy'] : array($opt['RestorableBy']))
  3351. )));
  3352. unset($opt['RestorableBy']);
  3353. }
  3354. // Optional parameter
  3355. if (isset($opt['Filter']))
  3356. {
  3357. $opt = array_merge($opt, CFComplexType::map(array(
  3358. 'Filter' => $opt['Filter']
  3359. )));
  3360. unset($opt['Filter']);
  3361. }
  3362. return $this->authenticate('DescribeSnapshots', $opt, $this->hostname);
  3363. }
  3364. /**
  3365. * Method: register_image()
  3366. * The RegisterImage operation registers an AMI with Amazon EC2. Images must be registered before they
  3367. * can be launched. For more information, see RunInstances.
  3368. *
  3369. * Each AMI is associated with an unique ID which is provided by the Amazon EC2 service through the
  3370. * RegisterImage operation. During registration, Amazon EC2 retrieves the specified image manifest from
  3371. * Amazon S3 and verifies that the image is owned by the user registering the image.
  3372. *
  3373. * The image manifest is retrieved once and stored within the Amazon EC2. Any modifications to an
  3374. * image in Amazon S3 invalidates this registration. If you make changes to an image, deregister the
  3375. * previous image and register the new image. For more information, see DeregisterImage.
  3376. *
  3377. * Access:
  3378. * public
  3379. *
  3380. * Parameters:
  3381. * $image_location - _string_ (Required) The full path to your AMI manifest in Amazon S3 storage.
  3382. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3383. *
  3384. * Keys for the $opt parameter:
  3385. * Name - _string_ (Optional) The name to give the new Amazon Machine Image. Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores(_)
  3386. * Description - _string_ (Optional) The description describing the new AMI.
  3387. * Architecture - _string_ (Optional) The architecture of the image. Valid Values: i386, x86_64
  3388. * KernelId - _string_ (Optional) The optional ID of a specific kernel to register with the new AMI.
  3389. * RamdiskId - _string_ (Optional) The optional ID of a specific ramdisk to register with the new AMI. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk.
  3390. * RootDeviceName - _string_ (Optional) The root device name (e.g., /dev/sda1).
  3391. * BlockDeviceMapping - _ComplexList_ (Optional) The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image. A ComplexList is an indexed array of ComplexTypes. Each ComplexType is a set of key-value pairs. These pairs can be set one of two ways: by setting each individual `BlockDeviceMapping` subtype (documented next), or by passing an associative array with the following `BlockDeviceMapping`-prefixed entries as keys. In the descriptions below, `x`, `y` and `z` should be integers starting at `1`. See below for a list and a usage example.
  3392. * BlockDeviceMapping.x.VirtualName - _string_ (Optional) Specifies the virtual device name.
  3393. * BlockDeviceMapping.x.DeviceName - _string_ (Optional) Specifies the device name (e.g., /dev/sdh).
  3394. * BlockDeviceMapping.x.Ebs.SnapshotId - _string_ (Optional) The ID of the snapshot from which the volume will be created.
  3395. * BlockDeviceMapping.x.Ebs.VolumeSize - _integer_ (Optional) The size of the volume, in gigabytes.
  3396. * BlockDeviceMapping.x.Ebs.DeleteOnTermination - _boolean_ (Optional) Specifies whether the Amazon EBS volume is deleted on instance termination.
  3397. * BlockDeviceMapping.x.NoDevice - _string_ (Optional) Specifies the device name to suppress during instance launch.
  3398. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3399. *
  3400. * Returns:
  3401. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3402. */
  3403. public function register_image($image_location, $opt = null)
  3404. {
  3405. if (!$opt) $opt = array();
  3406. $opt['ImageLocation'] = $image_location;
  3407. // Optional parameter
  3408. if (isset($opt['BlockDeviceMapping']))
  3409. {
  3410. $opt = array_merge($opt, CFComplexType::map(array(
  3411. 'BlockDeviceMapping' => $opt['BlockDeviceMapping']
  3412. )));
  3413. unset($opt['BlockDeviceMapping']);
  3414. }
  3415. return $this->authenticate('RegisterImage', $opt, $this->hostname);
  3416. }
  3417. /**
  3418. * Method: delete_vpn_connection()
  3419. * Deletes a VPN connection. Use this if you want to delete a VPC and all its associated components.
  3420. * Another reason to use this operation is if you believe the tunnel credentials for your VPN
  3421. * connection have been compromised. In that situation, you can delete the VPN connection and create a
  3422. * new one that has new keys, without needing to delete the VPC or VPN gateway. If you create a new VPN
  3423. * connection, you must reconfigure the customer gateway using the new configuration information
  3424. * returned with the new VPN connection ID.
  3425. *
  3426. * If you're deleting the VPC and all its associated parts, we recommend you detach the VPN gateway
  3427. * from the VPC and delete the VPC before deleting the VPN connection.
  3428. *
  3429. * Access:
  3430. * public
  3431. *
  3432. * Parameters:
  3433. * $vpn_connection_id - _string_ (Required) The ID of the VPN connection to delete
  3434. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3435. *
  3436. * Keys for the $opt parameter:
  3437. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3438. *
  3439. * Returns:
  3440. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3441. */
  3442. public function delete_vpn_connection($vpn_connection_id, $opt = null)
  3443. {
  3444. if (!$opt) $opt = array();
  3445. $opt['VpnConnectionId'] = $vpn_connection_id;
  3446. return $this->authenticate('DeleteVpnConnection', $opt, $this->hostname);
  3447. }
  3448. /**
  3449. * Method: create_vpn_connection()
  3450. * Creates a new VPN connection between an existing VPN gateway and customer gateway. The only
  3451. * supported connection type is ipsec.1.
  3452. *
  3453. * The response includes information that you need to configure your customer gateway, in XML format.
  3454. * We recommend you use the command line version of this operation (ec2-create-vpn-connection), which
  3455. * takes an -f option (for format) and returns configuration information formatted as expected by the
  3456. * vendor you specified, or in a generic, human readable format. For information about the command, go
  3457. * to ec2-create-vpn-connection in the Amazon Virtual Private Cloud Command Line Reference.
  3458. *
  3459. * We strongly recommend you use HTTPS when calling this operation because the response contains
  3460. * sensitive cryptographic information for configuring your customer gateway.
  3461. *
  3462. * If you decide to shut down your VPN connection for any reason and then create a new one, you must
  3463. * re-configure your customer gateway with the new information returned from this call.
  3464. *
  3465. * Access:
  3466. * public
  3467. *
  3468. * Parameters:
  3469. * $type - _string_ (Required) The type of VPN connection.
  3470. * $customer_gateway_id - _string_ (Required) The ID of the customer gateway.
  3471. * $vpn_gateway_id - _string_ (Required) The ID of the VPN gateway.
  3472. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3473. *
  3474. * Keys for the $opt parameter:
  3475. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3476. *
  3477. * Returns:
  3478. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3479. */
  3480. public function create_vpn_connection($type, $customer_gateway_id, $vpn_gateway_id, $opt = null)
  3481. {
  3482. if (!$opt) $opt = array();
  3483. $opt['Type'] = $type;
  3484. $opt['CustomerGatewayId'] = $customer_gateway_id;
  3485. $opt['VpnGatewayId'] = $vpn_gateway_id;
  3486. return $this->authenticate('CreateVpnConnection', $opt, $this->hostname);
  3487. }
  3488. /**
  3489. * Method: describe_instance_attribute()
  3490. * Returns information about an attribute of an instance. Only one attribute can be specified per call.
  3491. *
  3492. * Access:
  3493. * public
  3494. *
  3495. * Parameters:
  3496. * $instance_id - _string_ (Required) The ID of the instance whose instance attribute is being described.
  3497. * $attribute - _string_ (Required) The name of the attribute to describe. Available attribute names: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping
  3498. * $opt - _array_ (Optional) An associative array of parameters that can have the keys listed in the following section.
  3499. *
  3500. * Keys for the $opt parameter:
  3501. * returnCurlHandle - _boolean_ (Optional) A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.
  3502. *
  3503. * Returns:
  3504. * _CFResponse_ A <CFResponse> object containing a parsed HTTP response.
  3505. */
  3506. public function describe_instance_attribute($instance_id, $attribute, $opt = null)
  3507. {
  3508. if (!$opt) $opt = array();
  3509. $opt['InstanceId'] = $instance_id;
  3510. $opt['Attribute'] = $attribute;
  3511. return $this->authenticate('DescribeInstanceAttribute', $opt, $this->hostname);
  3512. }
  3513. }