Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/*
3
 * Copyright 2010-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
 *
5
 * Licensed under the Apache License, Version 2.0 (the "License").
6
 * You may not use this file except in compliance with the License.
7
 * A copy of the License is located at
8
 *
9
 *  http://aws.amazon.com/apache2.0
10
 *
11
 * or in the "license" file accompanying this file. This file is distributed
12
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
 * express or implied. See the License for the specific language governing
14
 * permissions and limitations under the License.
15
 */
16
 
17
/**
18
 * Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set
19
 * up, operate, and scale a relational database in the cloud. It provides cost-efficient,
20
 * resizable capacity for an industry-standard relational database and manages common database
21
 * administration tasks, freeing up developers to focus on what makes their applications and
22
 * businesses unique.
23
 *
24
 * Amazon RDS gives you access to the capabilities of a familiar MySQL or Oracle database server.
25
 * This means the code, applications, and tools you already use today with your existing MySQL or
26
 * Oracle databases work with Amazon RDS without modification. Amazon RDS automatically backs up
27
 * your database and maintains the database software that powers your DB Instance. Amazon RDS is
28
 * flexible: you can scale your database instance's compute resources and storage capacity to meet
29
 * your application's demand. As with all Amazon Web Services, there are no up-front investments,
30
 * and you pay only for the resources you use.
31
 *
32
 * This is the <em>Amazon RDS API Reference</em>. It contains a comprehensive description of all
33
 * Amazon RDS Query APIs and data types. To get started with Amazon RDS, go to the <a href=
34
 * "http://docs.amazonwebservices.com/AmazonRDS/latest/GettingStartedGuide/">Amazon RDS Getting
35
 * Started Guide</a>. For more information on Amazon RDS concepts and usage scenarios, go to the
36
 * 	<a href="http://docs.amazonwebservices.com/AmazonRDS/latest/UserGuide/">Amazon RDS User
37
 * Guide</a>.
38
 *
39
 * @version 2012.01.16
40
 * @license See the included NOTICE.md file for complete information.
41
 * @copyright See the included NOTICE.md file for complete information.
42
 * @link http://aws.amazon.com/rds/ Amazon Relational Database Service
43
 * @link http://aws.amazon.com/rds/documentation/ Amazon Relational Database Service documentation
44
 */
45
class AmazonRDS extends CFRuntime
46
{
47
	/*%******************************************************************************************%*/
48
	// CLASS CONSTANTS
49
 
50
	/**
51
	 * Specify the queue URL for the United States East (Northern Virginia) Region.
52
	 */
53
	const REGION_US_E1 = 'rds.us-east-1.amazonaws.com';
54
 
55
	/**
56
	 * Specify the queue URL for the United States East (Northern Virginia) Region.
57
	 */
58
	const REGION_VIRGINIA = self::REGION_US_E1;
59
 
60
	/**
61
	 * Specify the queue URL for the United States West (Northern California) Region.
62
	 */
63
	const REGION_US_W1 = 'rds.us-west-1.amazonaws.com';
64
 
65
	/**
66
	 * Specify the queue URL for the United States West (Northern California) Region.
67
	 */
68
	const REGION_CALIFORNIA = self::REGION_US_W1;
69
 
70
	/**
71
	 * Specify the queue URL for the United States West (Oregon) Region.
72
	 */
73
	const REGION_US_W2 = 'rds.us-west-2.amazonaws.com';
74
 
75
	/**
76
	 * Specify the queue URL for the United States West (Oregon) Region.
77
	 */
78
	const REGION_OREGON = self::REGION_US_W2;
79
 
80
	/**
81
	 * Specify the queue URL for the Europe West (Ireland) Region.
82
	 */
83
	const REGION_EU_W1 = 'rds.eu-west-1.amazonaws.com';
84
 
85
	/**
86
	 * Specify the queue URL for the Europe West (Ireland) Region.
87
	 */
88
	const REGION_IRELAND = self::REGION_EU_W1;
89
 
90
	/**
91
	 * Specify the queue URL for the Asia Pacific Southeast (Singapore) Region.
92
	 */
93
	const REGION_APAC_SE1 = 'rds.ap-southeast-1.amazonaws.com';
94
 
95
	/**
96
	 * Specify the queue URL for the Asia Pacific Southeast (Singapore) Region.
97
	 */
98
	const REGION_SINGAPORE = self::REGION_APAC_SE1;
99
 
100
	/**
101
	 * Specify the queue URL for the Asia Pacific Northeast (Tokyo) Region.
102
	 */
103
	const REGION_APAC_NE1 = 'rds.ap-northeast-1.amazonaws.com';
104
 
105
	/**
106
	 * Specify the queue URL for the Asia Pacific Northeast (Tokyo) Region.
107
	 */
108
	const REGION_TOKYO = self::REGION_APAC_NE1;
109
 
110
	/**
111
	 * Specify the queue URL for the South America (Sao Paulo) Region.
112
	 */
113
	const REGION_SA_E1 = 'rds.sa-east-1.amazonaws.com';
114
 
115
	/**
116
	 * Specify the queue URL for the South America (Sao Paulo) Region.
117
	 */
118
	const REGION_SAO_PAULO = self::REGION_SA_E1;
119
 
120
	/**
121
	 * Default service endpoint.
122
	 */
123
	const DEFAULT_URL = self::REGION_US_E1;
124
 
125
 
126
	/*%******************************************************************************************%*/
127
	// CONSTRUCTOR
128
 
129
	/**
130
	 * Constructs a new instance of <AmazonRDS>.
131
	 *
132
	 * @param array $options (Optional) An associative array of parameters that can have the following keys: <ul>
133
	 * 	<li><code>certificate_authority</code> - <code>boolean</code> - Optional - Determines which Cerificate Authority file to use. A value of boolean <code>false</code> will use the Certificate Authority file available on the system. A value of boolean <code>true</code> will use the Certificate Authority provided by the SDK. Passing a file system path to a Certificate Authority file (chmodded to <code>0755</code>) will use that. Leave this set to <code>false</code> if you're not sure.</li>
134
	 * 	<li><code>credentials</code> - <code>string</code> - Optional - The name of the credential set to use for authentication.</li>
135
	 * 	<li><code>default_cache_config</code> - <code>string</code> - Optional - This option allows a preferred storage type to be configured for long-term caching. This can be changed later using the <set_cache_config()> method. Valid values are: <code>apc</code>, <code>xcache</code>, or a file system path such as <code>./cache</code> or <code>/tmp/cache/</code>.</li>
136
	 * 	<li><code>key</code> - <code>string</code> - Optional - Your AWS key, or a session key. If blank, the default credential set will be used.</li>
137
	 * 	<li><code>secret</code> - <code>string</code> - Optional - Your AWS secret key, or a session secret key. If blank, the default credential set will be used.</li>
138
	 * 	<li><code>token</code> - <code>string</code> - Optional - An AWS session token.</li></ul>
139
	 * @return void
140
	 */
141
	public function __construct(array $options = array())
142
	{
143
		$this->api_version = '2011-04-01';
144
		$this->hostname = self::DEFAULT_URL;
145
		$this->auth_class = 'AuthV2Query';
146
 
147
		return parent::__construct($options);
148
	}
149
 
150
 
151
	/*%******************************************************************************************%*/
152
	// SETTERS
153
 
154
	/**
155
	 * This allows you to explicitly sets the region for the service to use.
156
	 *
157
	 * @param string $region (Required) The region to explicitly set. Available options are <REGION_US_E1>, <REGION_US_W1>, <REGION_US_W2>, <REGION_EU_W1>, <REGION_APAC_SE1>, <REGION_APAC_NE1>, <REGION_SA_E1>.
158
	 * @return $this A reference to the current instance.
159
	 */
160
	public function set_region($region)
161
	{
162
		// @codeCoverageIgnoreStart
163
		$this->set_hostname($region);
164
		return $this;
165
		// @codeCoverageIgnoreEnd
166
	}
167
 
168
 
169
	/*%******************************************************************************************%*/
170
	// SERVICE METHODS
171
 
172
	/**
173
	 * Enables ingress to a DBSecurityGroup using one of two forms of authorization. First, EC2
174
	 * Security Groups can be added to the DBSecurityGroup if the application using the database is
175
	 * running on EC2 instances. Second, IP ranges are available if the application accessing your
176
	 * database is running on the Internet. Required parameters for this API are one of CIDR range or
177
	 * (EC2SecurityGroupName AND EC2SecurityGroupOwnerId).
178
	 *
179
	 * <p class="note">
180
	 * You cannot authorize ingress from an EC2 security group in one Region to an Amazon RDS DB
181
	 * Instance in another.
182
	 * </p>
183
	 * For an overview of CIDR ranges, go to the <a href=
184
	 * "http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">Wikipedia Tutorial</a>.
185
	 *
186
	 * @param string $db_security_group_name (Required) The name of the DB Security Group to add authorization to.
187
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
188
	 * 	<li><code>CIDRIP</code> - <code>string</code> - Optional - The IP range to authorize.</li>
189
	 * 	<li><code>EC2SecurityGroupName</code> - <code>string</code> - Optional - Name of the EC2 Security Group to authorize.</li>
190
	 * 	<li><code>EC2SecurityGroupOwnerId</code> - <code>string</code> - Optional - AWS Account Number of the owner of the EC2 Security Group specified in the EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable value.</li>
191
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
192
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
193
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
194
	 */
195
	public function authorize_db_security_group_ingress($db_security_group_name, $opt = null)
196
	{
197
		if (!$opt) $opt = array();
198
		$opt['DBSecurityGroupName'] = $db_security_group_name;
199
 
200
		return $this->authenticate('AuthorizeDBSecurityGroupIngress', $opt);
201
	}
202
 
203
	/**
204
	 * Creates a new DB instance.
205
	 *
206
	 * @param string $db_instance_identifier (Required) The DB Instance identifier. This parameter is stored as a lowercase string. Constraints:<ul><li>Must contain from 1 to 63 alphanumeric characters or hyphens.</li><li>First character must be a letter.</li><li>Cannot end with a hyphen or contain two consecutive hyphens.</li></ul>Example: <code>mydbinstance</code>
207
	 * @param integer $allocated_storage (Required) The amount of storage (in gigabytes) to be initially allocated for the database instance. <strong>MySQL</strong> Constraints: Must be an integer from 5 to 1024. Type: Integer <strong>Oracle</strong> Constraints: Must be an integer from 10 to 1024.
208
	 * @param string $db_instance_class (Required) The compute and memory capacity of the DB Instance. Valid Values: <code>db.m1.small | db.m1.large | db.m1.xlarge | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge</code>
209
	 * @param string $engine (Required) The name of the database engine to be used for this instance. Valid Values: <code>MySQL</code> | <code>oracle-se1</code> | <code>oracle-se</code> | <code>oracle-ee</code>
210
	 * @param string $master_username (Required) The name of master user for the client DB Instance. <strong>MySQL</strong> Constraints:<ul><li>Must be 1 to 16 alphanumeric characters.</li><li>First character must be a letter.</li><li>Cannot be a reserved word for the chosen database engine.</li></ul>Type: String <strong>Oracle</strong> Constraints:<ul><li>Must be 1 to 30 alphanumeric characters.</li><li>First character must be a letter.</li><li>Cannot be a reserved word for the chosen database engine.</li></ul>
211
	 * @param string $master_user_password (Required) The password for the master DB Instance user. <strong>MySQL</strong> Constraints: Cannot contain more than 41 alphanumeric characters. Type: String <strong>Oracle</strong> Constraints: Cannot contain more than 30 alphanumeric characters.
212
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
213
	 * 	<li><code>DBName</code> - <code>string</code> - Optional - The meaning of this parameter differs according to the database engine you use. <strong>MySQL</strong> The name of the database to create when the DB Instance is created. If this parameter is not specified, no database is created in the DB Instance. Constraints:<ul><li>Must contain 1 to 64 alphanumeric characters</li><li>Cannot be a word reserved by the specified database engine</li></ul>Type: String <strong>Oracle</strong> The Oracle System ID (SID) of the created DB Instance. Default: <code>ORACL</code> Constraints:<ul><li>Cannot be longer than 8 characters</li></ul></li>
214
	 * 	<li><code>DBSecurityGroups</code> - <code>string|array</code> - Optional - A list of DB Security Groups to associate with this DB Instance. Default: The default DB Security Group for the database engine. Pass a string for a single value, or an indexed array for multiple values.</li>
215
	 * 	<li><code>AvailabilityZone</code> - <code>string</code> - Optional - The EC2 Availability Zone that the database instance will be created in. Default: A random, system-chosen Availability Zone in the endpoint's region. Example: <code>us-east-1d</code> Constraint: The AvailabilityZone parameter cannot be specified if the MultiAZ parameter is set to <code>true</code>. The specified Availability Zone must be in the same region as the current endpoint.</li>
216
	 * 	<li><code>PreferredMaintenanceWindow</code> - <code>string</code> - Optional - The weekly time range (in UTC) during which system maintenance can occur. Format: <code>ddd:hh24:mi-ddd:hh24:mi</code> Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. The following list shows the time blocks for each region from which the default maintenance windows are assigned.<ul><li> <strong>US-East (Northern Virginia) Region:</strong> 03:00-11:00 UTC</li><li> <strong>US-West (Northern California) Region:</strong> 06:00-14:00 UTC</li><li> <strong>EU (Ireland) Region:</strong> 22:00-06:00 UTC</li><li> <strong>Asia Pacific (Singapore) Region:</strong> 14:00-22:00 UTC</li><li> <strong>Asia Pacific (Tokyo) Region:</strong> 17:00-03:00 UTC</li></ul>Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun Constraints: Minimum 30-minute window.</li>
217
	 * 	<li><code>DBParameterGroupName</code> - <code>string</code> - Optional - The name of the DB Parameter Group to associate with this DB instance. If this argument is omitted, the default DBParameterGroup for the specified engine will be used. Constraints:<ul><li>Must be 1 to 255 alphanumeric characters</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul></li>
218
	 * 	<li><code>BackupRetentionPeriod</code> - <code>integer</code> - Optional - The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups. Default: 1 Constraints:<ul><li>Must be a value from 0 to 8</li><li>Cannot be set to 0 if the DB Instance is a master instance with read replicas</li></ul></li>
219
	 * 	<li><code>PreferredBackupWindow</code> - <code>string</code> - Optional - The daily time range during which automated backups are created if automated backups are enabled, using the <code>BackupRetentionPeriod</code> parameter. Default: A 30-minute window selected at random from an 8-hour block of time per region. The following list shows the time blocks for each region from which the default backup windows are assigned.<ul><li> <strong>US-East (Northern Virginia) Region:</strong> 03:00-11:00 UTC</li><li> <strong>US-West (Northern California) Region:</strong> 06:00-14:00 UTC</li><li> <strong>EU (Ireland) Region:</strong> 22:00-06:00 UTC</li><li> <strong>Asia Pacific (Singapore) Region:</strong> 14:00-22:00 UTC</li><li> <strong>Asia Pacific (Tokyo) Region:</strong> 17:00-03:00 UTC</li></ul>Constraints: Must be in the format <code>hh24:mi-hh24:mi</code>. Times should be Universal Time Coordinated (UTC). Must not conflict with the preferred maintenance window. Must be at least 30 minutes.</li>
220
	 * 	<li><code>Port</code> - <code>integer</code> - Optional - The port number on which the database accepts connections. <strong>MySQL</strong> Default: <code>3306</code> Valid Values: <code>1150-65535</code> Type: Integer <strong>Oracle</strong> Default: <code>1521</code> Valid Values: <code>1150-65535</code></li>
221
	 * 	<li><code>MultiAZ</code> - <code>boolean</code> - Optional - Specifies if the DB Instance is a Multi-AZ deployment. You cannot set the AvailabilityZone parameter if the MultiAZ parameter is set to true.</li>
222
	 * 	<li><code>EngineVersion</code> - <code>string</code> - Optional - The version number of the database engine to use. <strong>MySQL</strong> Example: <code>5.1.42</code> Type: String <strong>Oracle</strong> Example: <code>11.2.0.2.v2</code></li>
223
	 * 	<li><code>AutoMinorVersionUpgrade</code> - <code>boolean</code> - Optional - Indicates that minor engine upgrades will be applied automatically to the DB Instance during the maintenance window. Default: <code>true</code></li>
224
	 * 	<li><code>LicenseModel</code> - <code>string</code> - Optional - License model information for this DB Instance. Valid values: <code>license-included</code> | <code>bring-your-own-license</code> | <code>general-public-license</code></li>
225
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
226
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
227
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
228
	 */
229
	public function create_db_instance($db_instance_identifier, $allocated_storage, $db_instance_class, $engine, $master_username, $master_user_password, $opt = null)
230
	{
231
		if (!$opt) $opt = array();
232
		$opt['DBInstanceIdentifier'] = $db_instance_identifier;
233
		$opt['AllocatedStorage'] = $allocated_storage;
234
		$opt['DBInstanceClass'] = $db_instance_class;
235
		$opt['Engine'] = $engine;
236
		$opt['MasterUsername'] = $master_username;
237
		$opt['MasterUserPassword'] = $master_user_password;
238
 
239
		// Optional list (non-map)
240
		if (isset($opt['DBSecurityGroups']))
241
		{
242
			$opt = array_merge($opt, CFComplexType::map(array(
243
				'DBSecurityGroups' => (is_array($opt['DBSecurityGroups']) ? $opt['DBSecurityGroups'] : array($opt['DBSecurityGroups']))
244
			), 'member'));
245
			unset($opt['DBSecurityGroups']);
246
		}
247
 
248
		return $this->authenticate('CreateDBInstance', $opt);
249
	}
250
 
251
	/**
252
	 * Creates a DB Instance that acts as a Read Replica of a source DB Instance.
253
	 *
254
	 * All Read Replica DB Instances are created as Single-AZ deployments with backups disabled. All
255
	 * other DB Instance attributes (including DB Security Groups and DB Parameter Groups) are
256
	 * inherited from the source DB Instance, except as specified below.
257
	 *
258
	 * <p class="important"></p>
259
	 * The source DB Instance must have backup retention enabled.
260
	 *
261
	 * @param string $db_instance_identifier (Required) The DB Instance identifier of the Read Replica. This is the unique key that identifies a DB Instance. This parameter is stored as a lowercase string.
262
	 * @param string $source_db_instance_identifier (Required) The identifier of the DB Instance that will act as the source for the Read Replica. Each DB Instance can have up to five Read Replicas. Constraints: Must be the identifier of an existing DB Instance that is not already a Read Replica DB Instance.
263
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
264
	 * 	<li><code>DBInstanceClass</code> - <code>string</code> - Optional - The compute and memory capacity of the Read Replica. Valid Values: <code>db.m1.small | db.m1.large | db.m1.xlarge | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge</code> Default: Inherits from the source DB Instance.</li>
265
	 * 	<li><code>AvailabilityZone</code> - <code>string</code> - Optional - The Amazon EC2 Availability Zone that the Read Replica will be created in. Default: A random, system-chosen Availability Zone in the endpoint's region. Example: <code>us-east-1d</code></li>
266
	 * 	<li><code>Port</code> - <code>integer</code> - Optional - The port number that the DB Instance uses for connections. Default: Inherits from the source DB Instance Valid Values: <code>1150-65535</code></li>
267
	 * 	<li><code>AutoMinorVersionUpgrade</code> - <code>boolean</code> - Optional - Indicates that minor engine upgrades will be applied automatically to the Read Replica during the maintenance window. Default: Inherits from the source DB Instance</li>
268
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
269
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
270
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
271
	 */
272
	public function create_db_instance_read_replica($db_instance_identifier, $source_db_instance_identifier, $opt = null)
273
	{
274
		if (!$opt) $opt = array();
275
		$opt['DBInstanceIdentifier'] = $db_instance_identifier;
276
		$opt['SourceDBInstanceIdentifier'] = $source_db_instance_identifier;
277
 
278
		return $this->authenticate('CreateDBInstanceReadReplica', $opt);
279
	}
280
 
281
	/**
282
	 * Creates a new DB Parameter Group.
283
	 *
284
	 * A DB Parameter Group is initially created with the default parameters for the database engine
285
	 * used by the DB Instance. To provide custom values for any of the parameters, you must modify
286
	 * the group after creating it using <em>ModifyDBParameterGroup</em>. Once you've created a DB
287
	 * Parameter Group, you need to associate it with your DB Instance using
288
	 * <em>ModifyDBInstance</em>. When you associate a new DB Parameter Group with a running DB
289
	 * Instance, you need to reboot the DB Instance for the new DB Parameter Group and associated
290
	 * settings to take effect.
291
	 *
292
	 * @param string $db_parameter_group_name (Required) The name of the DB Parameter Group. Constraints:<ul><li>Must be 1 to 255 alphanumeric characters</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul> <p class="note">This value is stored as a lower-case string.</p>
293
	 * @param string $db_parameter_group_family (Required) The DB Parameter Group Family name. A DB Parameter Group can be associated with one and only one DB Parameter Group Family, and can be applied only to a DB Instance running a database engine and engine version compatible with that DB Parameter Group Family.
294
	 * @param string $description (Required) The description for the DB Parameter Group.
295
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
296
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
297
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
298
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
299
	 */
300
	public function create_db_parameter_group($db_parameter_group_name, $db_parameter_group_family, $description, $opt = null)
301
	{
302
		if (!$opt) $opt = array();
303
		$opt['DBParameterGroupName'] = $db_parameter_group_name;
304
		$opt['DBParameterGroupFamily'] = $db_parameter_group_family;
305
		$opt['Description'] = $description;
306
 
307
		return $this->authenticate('CreateDBParameterGroup', $opt);
308
	}
309
 
310
	/**
311
	 * Creates a new DB Security Group. DB Security Groups control access to a DB Instance.
312
	 *
313
	 * @param string $db_security_group_name (Required) The name for the DB Security Group. This value is stored as a lowercase string. Constraints: Must contain no more than 255 alphanumeric characters or hyphens. Must not be "Default". Example: <code>mysecuritygroup</code>
314
	 * @param string $db_security_group_description (Required) The description for the DB Security Group.
315
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
316
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
317
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
318
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
319
	 */
320
	public function create_db_security_group($db_security_group_name, $db_security_group_description, $opt = null)
321
	{
322
		if (!$opt) $opt = array();
323
		$opt['DBSecurityGroupName'] = $db_security_group_name;
324
		$opt['DBSecurityGroupDescription'] = $db_security_group_description;
325
 
326
		return $this->authenticate('CreateDBSecurityGroup', $opt);
327
	}
328
 
329
	/**
330
	 * Creates a DBSnapshot. The source DBInstance must be in "available" state.
331
	 *
332
	 * @param string $db_snapshot_identifier (Required) The identifier for the DB Snapshot. Constraints:<ul><li>Cannot be null, empty, or blank</li><li>Must contain from 1 to 255 alphanumeric characters or hyphens</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>Example: <code>my-snapshot-id</code>
333
	 * @param string $db_instance_identifier (Required) The DB Instance identifier. This is the unique key that identifies a DB Instance. This parameter isn't case sensitive. Constraints:<ul><li>Must contain from 1 to 63 alphanumeric characters or hyphens</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>
334
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
335
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
336
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
337
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
338
	 */
339
	public function create_db_snapshot($db_snapshot_identifier, $db_instance_identifier, $opt = null)
340
	{
341
		if (!$opt) $opt = array();
342
		$opt['DBSnapshotIdentifier'] = $db_snapshot_identifier;
343
		$opt['DBInstanceIdentifier'] = $db_instance_identifier;
344
 
345
		return $this->authenticate('CreateDBSnapshot', $opt);
346
	}
347
 
348
	/**
349
	 * The DeleteDBInstance API deletes a previously provisioned RDS instance. A successful response
350
	 * from the web service indicates the request was received correctly. If a final DBSnapshot is
351
	 * requested the status of the RDS instance will be "deleting" until the DBSnapshot is created.
352
	 * DescribeDBInstance is used to monitor the status of this operation. This cannot be canceled or
353
	 * reverted once submitted.
354
	 *
355
	 * @param string $db_instance_identifier (Required) The DB Instance identifier for the DB Instance to be deleted. This parameter isn't case sensitive. Constraints:<ul><li>Must contain from 1 to 63 alphanumeric characters or hyphens</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>
356
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
357
	 * 	<li><code>SkipFinalSnapshot</code> - <code>boolean</code> - Optional - Determines whether a final DB Snapshot is created before the DB Instance is deleted. If <code>true</code> is specified, no DBSnapshot is created. If false is specified, a DB Snapshot is created before the DB Instance is deleted. <p class="note">The FinalDBSnapshotIdentifier parameter must be specified if SkipFinalSnapshot is <code>false</code>.</p> Default: <code>false</code></li>
358
	 * 	<li><code>FinalDBSnapshotIdentifier</code> - <code>string</code> - Optional - The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot is set to <code>false</code>. <p class="note">Specifying this parameter and also setting the SkipFinalShapshot parameter to true results in an error.</p> Constraints:<ul><li>Must be 1 to 255 alphanumeric characters</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul></li>
359
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
360
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
361
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
362
	 */
363
	public function delete_db_instance($db_instance_identifier, $opt = null)
364
	{
365
		if (!$opt) $opt = array();
366
		$opt['DBInstanceIdentifier'] = $db_instance_identifier;
367
 
368
		return $this->authenticate('DeleteDBInstance', $opt);
369
	}
370
 
371
	/**
372
	 * Deletes a specified DBParameterGroup.
373
	 *
374
	 * <p class="note">
375
	 * The specified DB Parameter Group cannot be associated with any DB Instances.
376
	 * </p>
377
	 *
378
	 * @param string $db_parameter_group_name (Required) The name of the DB Parameter Group. Constraints:<ul><li>Must be the name of an existing DB Parameter Group</li><li>You cannot delete a default DB Parameter Group</li><li>Cannot be associated with any DB Instances</li></ul>
379
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
380
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
381
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
382
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
383
	 */
384
	public function delete_db_parameter_group($db_parameter_group_name, $opt = null)
385
	{
386
		if (!$opt) $opt = array();
387
		$opt['DBParameterGroupName'] = $db_parameter_group_name;
388
 
389
		return $this->authenticate('DeleteDBParameterGroup', $opt);
390
	}
391
 
392
	/**
393
	 * Deletes a DB Security Group.
394
	 *
395
	 * <p class="note">
396
	 * The specified DB Security Group must not be associated with any DB Instances.
397
	 * </p>
398
	 *
399
	 * @param string $db_security_group_name (Required) The name of the DB Security Group to delete. <p class="note">You cannot delete the default DB Security Group.</p> Constraints:<ul><li>Must be 1 to 255 alphanumeric characters</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>
400
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
401
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
402
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
403
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
404
	 */
405
	public function delete_db_security_group($db_security_group_name, $opt = null)
406
	{
407
		if (!$opt) $opt = array();
408
		$opt['DBSecurityGroupName'] = $db_security_group_name;
409
 
410
		return $this->authenticate('DeleteDBSecurityGroup', $opt);
411
	}
412
 
413
	/**
414
	 * Deletes a DB Snapshot.
415
	 *
416
	 * <p class="note">
417
	 * The DBSnapshot must be in the <code>available</code> state to be deleted.
418
	 * </p>
419
	 *
420
	 * @param string $db_snapshot_identifier (Required) The name of the DB Snapshot to delete. Constraints: Must be the name of an existing DB Snapshot in the <code>available</code> state.
421
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
422
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
423
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
424
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
425
	 */
426
	public function delete_db_snapshot($db_snapshot_identifier, $opt = null)
427
	{
428
		if (!$opt) $opt = array();
429
		$opt['DBSnapshotIdentifier'] = $db_snapshot_identifier;
430
 
431
		return $this->authenticate('DeleteDBSnapshot', $opt);
432
	}
433
 
434
	/**
435
	 * Returns a list of the available DB engines.
436
	 *
437
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
438
	 * 	<li><code>Engine</code> - <code>string</code> - Optional - The database engine to return.</li>
439
	 * 	<li><code>EngineVersion</code> - <code>string</code> - Optional - The database engine version to return. Example: <code>5.1.49</code></li>
440
	 * 	<li><code>DBParameterGroupFamily</code> - <code>string</code> - Optional - The name of a specific DB Parameter Group family to return details for. Constraints:<ul><li>Must be 1 to 255 alphanumeric characters</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul></li>
441
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more than the <code>MaxRecords</code> value is available, a marker is included in the response so that the following results can be retrieved. Default: 100 Constraints: minimum 20, maximum 100</li>
442
	 * 	<li><code>Marker</code> - <code>string</code> - Optional - The marker provided in the previous request. If this parameter is specified, the response includes records beyond the marker only, up to <code>MaxRecords</code>.</li>
443
	 * 	<li><code>DefaultOnly</code> - <code>boolean</code> - Optional - Indicates that only the default version of the specified engine or engine and major version combination is returned.</li>
444
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
445
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
446
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
447
	 */
448
	public function describe_db_engine_versions($opt = null)
449
	{
450
		if (!$opt) $opt = array();
451
 
452
		return $this->authenticate('DescribeDBEngineVersions', $opt);
453
	}
454
 
455
	/**
456
	 * Returns information about provisioned RDS instances. This API supports pagination.
457
	 *
458
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
459
	 * 	<li><code>DBInstanceIdentifier</code> - <code>string</code> - Optional - The user-supplied instance identifier. If this parameter is specified, information from only the specific DB Instance is returned. This parameter isn't case sensitive. Constraints:<ul><li>Must contain from 1 to 63 alphanumeric characters or hyphens</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul></li>
460
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100</li>
461
	 * 	<li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeDBInstances request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</li>
462
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
463
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
464
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
465
	 */
466
	public function describe_db_instances($opt = null)
467
	{
468
		if (!$opt) $opt = array();
469
 
470
		return $this->authenticate('DescribeDBInstances', $opt);
471
	}
472
 
473
	/**
474
	 * Returns a list of DBParameterGroup descriptions. If a DBParameterGroupName is specified, the
475
	 * list will contain only the description of the specified DBParameterGroup.
476
	 *
477
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
478
	 * 	<li><code>DBParameterGroupName</code> - <code>string</code> - Optional - The name of a specific DB Parameter Group to return details for. Constraints:<ul><li>Must be 1 to 255 alphanumeric characters</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul></li>
479
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100</li>
480
	 * 	<li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeDBParameterGroups request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</li>
481
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
482
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
483
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
484
	 */
485
	public function describe_db_parameter_groups($opt = null)
486
	{
487
		if (!$opt) $opt = array();
488
 
489
		return $this->authenticate('DescribeDBParameterGroups', $opt);
490
	}
491
 
492
	/**
493
	 * Returns the detailed parameter list for a particular DBParameterGroup.
494
	 *
495
	 * @param string $db_parameter_group_name (Required) The name of a specific DB Parameter Group to return details for. Constraints:<ul><li>Must be 1 to 255 alphanumeric characters</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>
496
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
497
	 * 	<li><code>Source</code> - <code>string</code> - Optional - The parameter types to return. Default: All parameter types returned Valid Values: <code>user | system | engine-default</code></li>
498
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100</li>
499
	 * 	<li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeDBInstances request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</li>
500
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
501
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
502
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
503
	 */
504
	public function describe_db_parameters($db_parameter_group_name, $opt = null)
505
	{
506
		if (!$opt) $opt = array();
507
		$opt['DBParameterGroupName'] = $db_parameter_group_name;
508
 
509
		return $this->authenticate('DescribeDBParameters', $opt);
510
	}
511
 
512
	/**
513
	 * Returns a list of DBSecurityGroup descriptions. If a DBSecurityGroupName is specified, the list
514
	 * will contain only the descriptions of the specified DBSecurityGroup.
515
	 *
516
	 * For an overview of CIDR ranges, go to the <a href=
517
	 * "http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">Wikipedia Tutorial</a>.
518
	 *
519
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
520
	 * 	<li><code>DBSecurityGroupName</code> - <code>string</code> - Optional - The name of the DB Security Group to return details for.</li>
521
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100</li>
522
	 * 	<li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeDBInstances request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</li>
523
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
524
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
525
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
526
	 */
527
	public function describe_db_security_groups($opt = null)
528
	{
529
		if (!$opt) $opt = array();
530
 
531
		return $this->authenticate('DescribeDBSecurityGroups', $opt);
532
	}
533
 
534
	/**
535
	 * Returns information about DBSnapshots. This API supports pagination.
536
	 *
537
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
538
	 * 	<li><code>DBInstanceIdentifier</code> - <code>string</code> - Optional - A DB Instance Identifier to retrieve the list of DB Snapshots for. Cannot be used in conjunction with DBSnapshotIdentifier. Constraints:<ul><li>Must contain from 1 to 63 alphanumeric characters or hyphens</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul></li>
539
	 * 	<li><code>DBSnapshotIdentifier</code> - <code>string</code> - Optional - A specific DB Snapshot Identifier to describe. Cannot be used in conjunction with DBInstanceIdentifier. Constraints:<ul><li>Must be 1 to 255 alphanumeric characters</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul></li>
540
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100</li>
541
	 * 	<li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeDBSnapshots request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</li>
542
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
543
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
544
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
545
	 */
546
	public function describe_db_snapshots($opt = null)
547
	{
548
		if (!$opt) $opt = array();
549
 
550
		return $this->authenticate('DescribeDBSnapshots', $opt);
551
	}
552
 
553
	/**
554
	 * Returns the default engine and system parameter information for the specified DB Parameter
555
	 * Group Family.
556
	 *
557
	 * @param string $db_parameter_group_family (Required) The name of the DB Parameter Group Family.
558
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
559
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100</li>
560
	 * 	<li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeEngineDefaultParameters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</li>
561
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
562
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
563
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
564
	 */
565
	public function describe_engine_default_parameters($db_parameter_group_family, $opt = null)
566
	{
567
		if (!$opt) $opt = array();
568
		$opt['DBParameterGroupFamily'] = $db_parameter_group_family;
569
 
570
		return $this->authenticate('DescribeEngineDefaultParameters', $opt);
571
	}
572
 
573
	/**
574
	 * Returns events related to DB Instances, DB Security Groups, DB Snapshots and DB Parameter
575
	 * Groups for the past 14 days. Events specific to a particular DB Instance, DB Security Group, DB
576
	 * Snapshot, or DB Parameter Group can be obtained by providing the name as a parameter. By
577
	 * default, the past hour of events are returned.
578
	 *
579
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
580
	 * 	<li><code>SourceIdentifier</code> - <code>string</code> - Optional - The identifier of the event source for which events will be returned. If not specified, then all sources are included in the response. Constraints:<ul><li>If SourceIdentifier is supplied, SourceType must also be provided.</li><li>If the source type is DBInstance, then a DBInstanceIdentifier must be supplied.</li><li>If the source type is DBSecurityGroup, a DBSecurityGroupName must be supplied.</li><li>If the source type is DBParameterGroup, a DBParameterGroupName must be supplied.</li><li>If the source type is DBSnapshot, a DBSnapshotIdentifier must be supplied.</li><li>Cannot end with a hyphen or contain two consecutive hyphens.</li></ul></li>
581
	 * 	<li><code>SourceType</code> - <code>string</code> - Optional - The event source to retrieve events for. If no value is specified, all events are returned. [Allowed values: <code>db-instance</code>, <code>db-parameter-group</code>, <code>db-security-group</code>, <code>db-snapshot</code>]</li>
582
	 * 	<li><code>StartTime</code> - <code>string</code> - Optional - The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO8601 Wikipedia page.</a> Example: 2009-07-08T18:00Z May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
583
	 * 	<li><code>EndTime</code> - <code>string</code> - Optional - The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO8601 Wikipedia page.</a> Example: 2009-07-08T18:00Z May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
584
	 * 	<li><code>Duration</code> - <code>integer</code> - Optional - The number of minutes to retrieve events for. Default: 60</li>
585
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100</li>
586
	 * 	<li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeEvents request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</li>
587
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
588
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
589
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
590
	 */
591
	public function describe_events($opt = null)
592
	{
593
		if (!$opt) $opt = array();
594
 
595
		// Optional DateTime
596
		if (isset($opt['StartTime']))
597
		{
598
			$opt['StartTime'] = $this->util->convert_date_to_iso8601($opt['StartTime']);
599
		}
600
 
601
		// Optional DateTime
602
		if (isset($opt['EndTime']))
603
		{
604
			$opt['EndTime'] = $this->util->convert_date_to_iso8601($opt['EndTime']);
605
		}
606
 
607
		return $this->authenticate('DescribeEvents', $opt);
608
	}
609
 
610
	/**
611
	 * Returns a list of orderable DB Instance options for the specified engine.
612
	 *
613
	 * @param string $engine (Required) The name of the engine to retrieve DB Instance options for.
614
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
615
	 * 	<li><code>EngineVersion</code> - <code>string</code> - Optional - The engine version filter value. Specify this parameter to show only the available offerings matching the specified engine version.</li>
616
	 * 	<li><code>DBInstanceClass</code> - <code>string</code> - Optional - The DB Instance class filter value. Specify this parameter to show only the available offerings matching the specified DB Instance class.</li>
617
	 * 	<li><code>LicenseModel</code> - <code>string</code> - Optional - The license model filter value. Specify this parameter to show only the available offerings matching the specified license model.</li>
618
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100</li>
619
	 * 	<li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeOrderableDBInstanceOptions request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</li>
620
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
621
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
622
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
623
	 */
624
	public function describe_orderable_db_instance_options($engine, $opt = null)
625
	{
626
		if (!$opt) $opt = array();
627
		$opt['Engine'] = $engine;
628
 
629
		return $this->authenticate('DescribeOrderableDBInstanceOptions', $opt);
630
	}
631
 
632
	/**
633
	 * Returns information about reserved DB Instances for this account, or about a specified reserved
634
	 * DB Instance.
635
	 *
636
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
637
	 * 	<li><code>ReservedDBInstanceId</code> - <code>string</code> - Optional - The reserved DB Instance identifier filter value. Specify this parameter to show only the reservation that matches the specified reservation ID.</li>
638
	 * 	<li><code>ReservedDBInstancesOfferingId</code> - <code>string</code> - Optional - The offering identifier filter value. Specify this parameter to show only purchased reservations matching the specified offering identifier.</li>
639
	 * 	<li><code>DBInstanceClass</code> - <code>string</code> - Optional - The DB Instance class filter value. Specify this parameter to show only those reservations matching the specified DB Instances class.</li>
640
	 * 	<li><code>Duration</code> - <code>string</code> - Optional - The duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration. Valid Values: <code>1 | 3 | 31536000 | 94608000</code></li>
641
	 * 	<li><code>ProductDescription</code> - <code>string</code> - Optional - The product description filter value. Specify this parameter to show only those reservations matching the specified product description.</li>
642
	 * 	<li><code>MultiAZ</code> - <code>boolean</code> - Optional - The Multi-AZ filter value. Specify this parameter to show only those reservations matching the specified Multi-AZ parameter.</li>
643
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more than the <code>MaxRecords</code> value is available, a marker is included in the response so that the following results can be retrieved. Default: 100 Constraints: minimum 20, maximum 100</li>
644
	 * 	<li><code>Marker</code> - <code>string</code> - Optional - The marker provided in the previous request. If this parameter is specified, the response includes records beyond the marker only, up to <code>MaxRecords</code>.</li>
645
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
646
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
647
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
648
	 */
649
	public function describe_reserved_db_instances($opt = null)
650
	{
651
		if (!$opt) $opt = array();
652
 
653
		return $this->authenticate('DescribeReservedDBInstances', $opt);
654
	}
655
 
656
	/**
657
	 * Lists available reserved DB Instance offerings.
658
	 *
659
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
660
	 * 	<li><code>ReservedDBInstancesOfferingId</code> - <code>string</code> - Optional - The offering identifier filter value. Specify this parameter to show only the available offering that matches the specified reservation identifier. Example: <code>438012d3-4052-4cc7-b2e3-8d3372e0e706</code></li>
661
	 * 	<li><code>DBInstanceClass</code> - <code>string</code> - Optional - The DB Instance class filter value. Specify this parameter to show only the available offerings matching the specified DB Instance class.</li>
662
	 * 	<li><code>Duration</code> - <code>string</code> - Optional - Duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration. Valid Values: <code>1 | 3 | 31536000 | 94608000</code></li>
663
	 * 	<li><code>ProductDescription</code> - <code>string</code> - Optional - Product description filter value. Specify this parameter to show only the available offerings matching the specified product description.</li>
664
	 * 	<li><code>MultiAZ</code> - <code>boolean</code> - Optional - The Multi-AZ filter value. Specify this parameter to show only the available offerings matching the specified Multi-AZ parameter.</li>
665
	 * 	<li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more than the <code>MaxRecords</code> value is available, a marker is included in the response so that the following results can be retrieved. Default: 100 Constraints: minimum 20, maximum 100</li>
666
	 * 	<li><code>Marker</code> - <code>string</code> - Optional - The marker provided in the previous request. If this parameter is specified, the response includes records beyond the marker only, up to <code>MaxRecords</code>.</li>
667
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
668
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
669
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
670
	 */
671
	public function describe_reserved_db_instances_offerings($opt = null)
672
	{
673
		if (!$opt) $opt = array();
674
 
675
		return $this->authenticate('DescribeReservedDBInstancesOfferings', $opt);
676
	}
677
 
678
	/**
679
	 * Modify settings for a DB Instance. You can change one or more database configuration parameters
680
	 * by specifying these parameters and the new values in the request.
681
	 *
682
	 * @param string $db_instance_identifier (Required) The DB Instance identifier. This value is stored as a lowercase string. Constraints:<ul><li>Must be the identifier for an existing DB Instance</li><li>Must contain from 1 to 63 alphanumeric characters or hyphens</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>Example:<copy>mydbinstance</copy>
683
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
684
	 * 	<li><code>AllocatedStorage</code> - <code>integer</code> - Optional - The new storage capacity of the RDS instance. This change does not result in an outage and is applied during the next maintenance window unless the <code>ApplyImmediately</code> parameter is specified as <code>true</code> for this request. <strong>MySQL</strong> Default: Uses existing setting Valid Values: 5-1024 Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value. Type: Integer <strong>Oracle</strong> Default: Uses existing setting Valid Values: 10-1024 Constraints: Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.</li>
685
	 * 	<li><code>DBInstanceClass</code> - <code>string</code> - Optional - The new compute and memory capacity of the DB Instance. Passing a value for this parameter causes an outage during the change and is applied during the next maintenance window, unless the <code>ApplyImmediately</code> parameter is specified as <code>true</code> for this request. Default: Uses existing setting Valid Values: <code>db.m1.small | db.m1.large | db.m1.xlarge | db.m2.xlarge | db.m2.2xlarge | db.m2.4xlarge</code></li>
686
	 * 	<li><code>DBSecurityGroups</code> - <code>string|array</code> - Optional - A list of DB Security Groups to authorize on this DB Instance. This change is asynchronously applied as soon as possible. Constraints:<ul><li>Must be 1 to 255 alphanumeric characters</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul> Pass a string for a single value, or an indexed array for multiple values.</li>
687
	 * 	<li><code>ApplyImmediately</code> - <code>boolean</code> - Optional - Specifies whether or not the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the <code>PreferredMaintenanceWindow</code> setting for the DB Instance. If this parameter is passed as <code>false</code>, changes to the DB Instance are applied on the next call to <code>RebootDBInstance</code>, the next maintenance reboot, or the next failure reboot, whichever occurs first. Default: <code>false</code></li>
688
	 * 	<li><code>MasterUserPassword</code> - <code>string</code> - Optional - The new password for the DB Instance master user. This change is asynchronously applied as soon as possible. Between the time of the request and the completion of the request, the <code>MasterUserPassword</code> element exists in the <code>PendingModifiedValues</code> element of the operation response. Default: Uses existing setting Constraints: Must be 4 to 41 alphanumeric characters (engine specific) <p class="note">Amazon RDS APIs never return the password, so this API provides a way to regain access to a master instance user if the password is lost.</p></li>
689
	 * 	<li><code>DBParameterGroupName</code> - <code>string</code> - Optional - The name of the DB Parameter Group to apply to this DB Instance. This change is asynchronously applied as soon as possible for parameters when the <em>ApplyImmediately</em> parameter is specified as <code>true</code> for this request. Default: Uses existing setting Constraints: The DB Parameter Group must be in the same DB Parameter Group family as this DB Instance.</li>
690
	 * 	<li><code>BackupRetentionPeriod</code> - <code>integer</code> - Optional - The number of days to retain automated backups. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups. Default: Uses existing setting Constraints:<ul><li>Must be a value from 0 to 8</li><li>Cannot be set to 0 if the DB Instance is a master instance with read replicas or of the DB Instance is a read replica</li></ul></li>
691
	 * 	<li><code>PreferredBackupWindow</code> - <code>string</code> - Optional - The daily time range during which automated backups are created if automated backups are enabled, as determined by the <code>BackupRetentionPeriod</code>. Constraints:<ul><li>Must be in the format hh24:mi-hh24:mi</li><li>Times should be Universal Time Coordinated (UTC)</li><li>Must not conflict with the preferred maintenance window</li><li>Must be at least 30 minutes</li></ul></li>
692
	 * 	<li><code>PreferredMaintenanceWindow</code> - <code>string</code> - Optional - The weekly time range (in UTC) during which system maintenance can occur, which may result in an outage. This change is made immediately. If moving this window to the current time, there must be at least 120 minutes between the current time and end of the window to ensure pending changes are applied. Default: Uses existing setting Format: ddd:hh24:mi-ddd:hh24:mi Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun Constraints: Must be at least 30 minutes</li>
693
	 * 	<li><code>MultiAZ</code> - <code>boolean</code> - Optional - Specifies if the DB Instance is a Multi-AZ deployment. Constraints: Cannot be specified if the DB Instance is a read replica.</li>
694
	 * 	<li><code>EngineVersion</code> - <code>string</code> - Optional - The version number of the database engine to upgrade to. For major version upgrades, if a nondefault DB Parameter Group is currently in use, a new DB Parameter Group in the DB Parameter Group Family for the new engine version must be specified. The new DB Parameter Group can be the default for that DB Parameter Group Family. Example: <code>5.1.42</code></li>
695
	 * 	<li><code>AllowMajorVersionUpgrade</code> - <code>boolean</code> - Optional - Indicates that major version upgrades are allowed. Constraints: This parameter must be set to true when specifying a value for the EngineVersion parameter that is a different major version than the DB Instance's current version.</li>
696
	 * 	<li><code>AutoMinorVersionUpgrade</code> - <code>boolean</code> - Optional - Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window.</li>
697
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
698
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
699
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
700
	 */
701
	public function modify_db_instance($db_instance_identifier, $opt = null)
702
	{
703
		if (!$opt) $opt = array();
704
		$opt['DBInstanceIdentifier'] = $db_instance_identifier;
705
 
706
		// Optional list (non-map)
707
		if (isset($opt['DBSecurityGroups']))
708
		{
709
			$opt = array_merge($opt, CFComplexType::map(array(
710
				'DBSecurityGroups' => (is_array($opt['DBSecurityGroups']) ? $opt['DBSecurityGroups'] : array($opt['DBSecurityGroups']))
711
			), 'member'));
712
			unset($opt['DBSecurityGroups']);
713
		}
714
 
715
		return $this->authenticate('ModifyDBInstance', $opt);
716
	}
717
 
718
	/**
719
	 * Modifies the parameters of a DBParameterGroup. To modify more than one parameter submit a list
720
	 * of the following: ParameterName, ParameterValue, and ApplyMethod. A maximum of 20 parameters
721
	 * can be modified in a single request.
722
	 *
723
	 * <p class="note"></p>
724
	 * The <code>apply-immediate</code> method can only be used for dynamic parameters; the
725
	 * <code>pending-reboot</code> method can be used for either dynamic or static parameters.
726
	 *
727
	 * @param string $db_parameter_group_name (Required) The name of the DB Parameter Group. Constraints:<ul><li>Must be the name of an existing DB Parameter Group</li><li>Must be 1 to 255 alphanumeric characters</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>
728
	 * @param array $parameters (Required) An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request. Valid Values (for the application method): <code>immediate | pending-reboot</code>  <p class="note">You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters, and changes are applied when DB Instance reboots.</p> <ul>
729
	 * 	<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
730
	 * 		<li><code>ParameterName</code> - <code>string</code> - Optional - Specifies the name of the parameter.</li>
731
	 * 		<li><code>ParameterValue</code> - <code>string</code> - Optional - Specifies the value of the parameter.</li>
732
	 * 		<li><code>Description</code> - <code>string</code> - Optional - Provides a description of the parameter.</li>
733
	 * 		<li><code>Source</code> - <code>string</code> - Optional - Indicates the source of the parameter value.</li>
734
	 * 		<li><code>ApplyType</code> - <code>string</code> - Optional - Specifies the engine specific parameters type.</li>
735
	 * 		<li><code>DataType</code> - <code>string</code> - Optional - Specifies the valid data type for the parameter.</li>
736
	 * 		<li><code>AllowedValues</code> - <code>string</code> - Optional - Specifies the valid range of values for the parameter.</li>
737
	 * 		<li><code>IsModifiable</code> - <code>boolean</code> - Optional - Indicates whether (<code>true</code>) or not (<code>false</code>) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.</li>
738
	 * 		<li><code>MinimumEngineVersion</code> - <code>string</code> - Optional - The earliest engine version to which the parameter can apply.</li>
739
	 * 		<li><code>ApplyMethod</code> - <code>string</code> - Optional - Indicates when to apply parameter updates. [Allowed values: <code>immediate</code>, <code>pending-reboot</code>]</li>
740
	 * 	</ul></li>
741
	 * </ul>
742
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
743
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
744
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
745
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
746
	 */
747
	public function modify_db_parameter_group($db_parameter_group_name, $parameters, $opt = null)
748
	{
749
		if (!$opt) $opt = array();
750
		$opt['DBParameterGroupName'] = $db_parameter_group_name;
751
 
752
		// Required list + map
753
		$opt = array_merge($opt, CFComplexType::map(array(
754
			'Parameters' => (is_array($parameters) ? $parameters : array($parameters))
755
		), 'member'));
756
 
757
		return $this->authenticate('ModifyDBParameterGroup', $opt);
758
	}
759
 
760
	/**
761
	 * Purchases a reserved DB Instance offering.
762
	 *
763
	 * @param string $reserved_db_instances_offering_id (Required) The ID of the Reserved DB Instance offering to purchase. Example: 438012d3-4052-4cc7-b2e3-8d3372e0e706
764
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
765
	 * 	<li><code>ReservedDBInstanceId</code> - <code>string</code> - Optional - Customer-specified identifier to track this reservation. Example: myreservationID</li>
766
	 * 	<li><code>DBInstanceCount</code> - <code>integer</code> - Optional - The number of instances to reserve. Default: <code>1</code></li>
767
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
768
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
769
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
770
	 */
771
	public function purchase_reserved_db_instances_offering($reserved_db_instances_offering_id, $opt = null)
772
	{
773
		if (!$opt) $opt = array();
774
		$opt['ReservedDBInstancesOfferingId'] = $reserved_db_instances_offering_id;
775
 
776
		return $this->authenticate('PurchaseReservedDBInstancesOffering', $opt);
777
	}
778
 
779
	/**
780
	 * Reboots a previously provisioned RDS instance. This API results in the application of modified
781
	 * DBParameterGroup parameters with ApplyStatus of pending-reboot to the RDS instance. This action
782
	 * is taken as soon as possible, and results in a momentary outage to the RDS instance during
783
	 * which the RDS instance status is set to rebooting. A DBInstance event is created when the
784
	 * reboot is completed.
785
	 *
786
	 * @param string $db_instance_identifier (Required) The DB Instance identifier. This parameter is stored as a lowercase string. Constraints:<ul><li>Must contain from 1 to 63 alphanumeric characters or hyphens</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>
787
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
788
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
789
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
790
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
791
	 */
792
	public function reboot_db_instance($db_instance_identifier, $opt = null)
793
	{
794
		if (!$opt) $opt = array();
795
		$opt['DBInstanceIdentifier'] = $db_instance_identifier;
796
 
797
		return $this->authenticate('RebootDBInstance', $opt);
798
	}
799
 
800
	/**
801
	 * Resets the parameters of a DBParameterGroup to the engine/system default value. To reset
802
	 * specific parameters submit a list of the following: ParameterName and ApplyMethod. To reset the
803
	 * entire DBParameterGroup specify the DBParameterGroup name and ResetAllParameters parameters.
804
	 * When resetting the entire group, dynamic parameters are updated immediately and static
805
	 * parameters are set to pending-reboot to take effect on the next DB instance restart or
806
	 * RebootDBInstance request.
807
	 *
808
	 * @param string $db_parameter_group_name (Required) The name of the DB Parameter Group. Constraints:<ul><li>Must be 1 to 255 alphanumeric characters</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>
809
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
810
	 * 	<li><code>ResetAllParameters</code> - <code>boolean</code> - Optional - Specifies whether (<code>true</code>) or not (<code>false</code>) to reset all parameters in the DB Parameter Group to default values. Default: <code>true</code></li>
811
	 * 	<li><code>Parameters</code> - <code>array</code> - Optional - An array of parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request. <strong>MySQL</strong> Valid Values (for Apply method): <code>immediate</code> | <code>pending-reboot</code> You can use the immediate value with dynamic parameters only. You can use the <code>pending-reboot</code> value for both dynamic and static parameters, and changes are applied when DB Instance reboots. <strong>Oracle</strong> Valid Values (for Apply method): <code>pending-reboot</code> <ul>
812
	 * 		<li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
813
	 * 			<li><code>ParameterName</code> - <code>string</code> - Optional - Specifies the name of the parameter.</li>
814
	 * 			<li><code>ParameterValue</code> - <code>string</code> - Optional - Specifies the value of the parameter.</li>
815
	 * 			<li><code>Description</code> - <code>string</code> - Optional - Provides a description of the parameter.</li>
816
	 * 			<li><code>Source</code> - <code>string</code> - Optional - Indicates the source of the parameter value.</li>
817
	 * 			<li><code>ApplyType</code> - <code>string</code> - Optional - Specifies the engine specific parameters type.</li>
818
	 * 			<li><code>DataType</code> - <code>string</code> - Optional - Specifies the valid data type for the parameter.</li>
819
	 * 			<li><code>AllowedValues</code> - <code>string</code> - Optional - Specifies the valid range of values for the parameter.</li>
820
	 * 			<li><code>IsModifiable</code> - <code>boolean</code> - Optional - Indicates whether (<code>true</code>) or not (<code>false</code>) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.</li>
821
	 * 			<li><code>MinimumEngineVersion</code> - <code>string</code> - Optional - The earliest engine version to which the parameter can apply.</li>
822
	 * 			<li><code>ApplyMethod</code> - <code>string</code> - Optional - Indicates when to apply parameter updates. [Allowed values: <code>immediate</code>, <code>pending-reboot</code>]</li>
823
	 * 		</ul></li>
824
	 * 	</ul></li>
825
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
826
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
827
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
828
	 */
829
	public function reset_db_parameter_group($db_parameter_group_name, $opt = null)
830
	{
831
		if (!$opt) $opt = array();
832
		$opt['DBParameterGroupName'] = $db_parameter_group_name;
833
 
834
		// Optional list + map
835
		if (isset($opt['Parameters']))
836
		{
837
			$opt = array_merge($opt, CFComplexType::map(array(
838
				'Parameters' => $opt['Parameters']
839
			), 'member'));
840
			unset($opt['Parameters']);
841
		}
842
 
843
		return $this->authenticate('ResetDBParameterGroup', $opt);
844
	}
845
 
846
	/**
847
	 * Creates a new DB Instance from a DB snapshot. The new DB Instance will have the same
848
	 * configuration as the original source database, except that the new DB instance is created with
849
	 * the default security group.
850
	 *
851
	 * @param string $db_instance_identifier (Required) The identifier for the DB Snapshot to restore from. Constraints:<ul><li>Must contain from 1 to 63 alphanumeric characters or hyphens</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>
852
	 * @param string $db_snapshot_identifier (Required) Name of the DB Instance to create from the DB Snapshot. This parameter isn't case sensitive. Constraints:<ul><li>Must contain from 1 to 255 alphanumeric characters or hyphens</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>Example: <code>my-snapshot-id</code>
853
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
854
	 * 	<li><code>DBInstanceClass</code> - <code>string</code> - Optional - The compute and memory capacity of the Amazon RDS DB instance. Valid Values: <code>db.m1.small | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge</code></li>
855
	 * 	<li><code>Port</code> - <code>integer</code> - Optional - The port number on which the database accepts connections. Default: The same port as the original DB Instance Constraints: Value must be <code>1150-65535</code></li>
856
	 * 	<li><code>AvailabilityZone</code> - <code>string</code> - Optional - The EC2 Availability Zone that the database instance will be created in. Default: A random, system-chosen Availability Zone. Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to <code>true</code>. Example: <code>us-east-1a</code></li>
857
	 * 	<li><code>MultiAZ</code> - <code>boolean</code> - Optional - Specifies if the DB Instance is a Multi-AZ deployment. Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to <code>true</code>.</li>
858
	 * 	<li><code>AutoMinorVersionUpgrade</code> - <code>boolean</code> - Optional - Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window.</li>
859
	 * 	<li><code>LicenseModel</code> - <code>string</code> - Optional - License model information for the restored DB Instance. Default: Same as source. Valid values: <code>license-included</code> | <code>bring-your-own-license</code> | <code>general-public-license</code></li>
860
	 * 	<li><code>DBName</code> - <code>string</code> - Optional - The database name for the restored DB Instance. <p class="note">This parameter doesn't apply to the MySQL engine.</p></li>
861
	 * 	<li><code>Engine</code> - <code>string</code> - Optional - The database engine to use for the new instance. Default: The same as source Constraint: Must be compatible with the engine of the source Example: <code>oracle-ee</code></li>
862
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
863
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
864
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
865
	 */
866
	public function restore_db_instance_from_db_snapshot($db_instance_identifier, $db_snapshot_identifier, $opt = null)
867
	{
868
		if (!$opt) $opt = array();
869
		$opt['DBInstanceIdentifier'] = $db_instance_identifier;
870
		$opt['DBSnapshotIdentifier'] = $db_snapshot_identifier;
871
 
872
		return $this->authenticate('RestoreDBInstanceFromDBSnapshot', $opt);
873
	}
874
 
875
	/**
876
	 * Restores a DB Instance to an arbitrary point-in-time. Users can restore to any point in time
877
	 * before the latestRestorableTime for up to backupRetentionPeriod days. The target database is
878
	 * created from the source database with the same configuration as the source database except that
879
	 * the new DB instance is created with the default DB security group.
880
	 *
881
	 * @param string $source_db_instance_identifier (Required) The identifier of the source DB Instance from which to restore. Constraints:<ul><li>Must be the identifier of an existing database instance</li><li>Must contain from 1 to 63 alphanumeric characters or hyphens</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>
882
	 * @param string $target_db_instance_identifier (Required) The name of the new database instance to be created. Constraints:<ul><li>Must contain from 1 to 63 alphanumeric characters or hyphens</li><li>First character must be a letter</li><li>Cannot end with a hyphen or contain two consecutive hyphens</li></ul>
883
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
884
	 * 	<li><code>RestoreTime</code> - <code>string</code> - Optional - The date and time to restore from. Valid Values: Value must be a UTC time Constraints:<ul><li>Must be before the latest restorable time for the DB Instance</li><li>Cannot be specified if UseLatestRestorableTime parameter is true</li></ul>Example: <code>2009-09-07T23:45:00Z</code> May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
885
	 * 	<li><code>UseLatestRestorableTime</code> - <code>boolean</code> - Optional - Specifies whether (<code>true</code>) or not (<code>false</code>) the DB Instance is restored from the latest backup time. Default: <code>false</code> Constraints: Cannot be specified if RestoreTime parameter is provided.</li>
886
	 * 	<li><code>DBInstanceClass</code> - <code>string</code> - Optional - The compute and memory capacity of the Amazon RDS DB instance. Valid Values: <code>db.m1.small | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge</code> Default: The same DBInstanceClass as the original DB Instance.</li>
887
	 * 	<li><code>Port</code> - <code>integer</code> - Optional - The port number on which the database accepts connections. Constraints: Value must be <code>1150-65535</code> Default: The same port as the original DB Instance.</li>
888
	 * 	<li><code>AvailabilityZone</code> - <code>string</code> - Optional - The EC2 Availability Zone that the database instance will be created in. Default: A random, system-chosen Availability Zone. Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to true. Example: <code>us-east-1a</code></li>
889
	 * 	<li><code>MultiAZ</code> - <code>boolean</code> - Optional - Specifies if the DB Instance is a Multi-AZ deployment. Constraint: You cannot specify the AvailabilityZone parameter if the MultiAZ parameter is set to <code>true</code>.</li>
890
	 * 	<li><code>AutoMinorVersionUpgrade</code> - <code>boolean</code> - Optional - Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window.</li>
891
	 * 	<li><code>LicenseModel</code> - <code>string</code> - Optional - License model information for the restored DB Instance. Default: Same as source. Valid values: <code>license-included</code> | <code>bring-your-own-license</code> | <code>general-public-license</code></li>
892
	 * 	<li><code>DBName</code> - <code>string</code> - Optional - The database name for the restored DB Instance. <p class="note">This parameter is not used for the MySQL engine.</p></li>
893
	 * 	<li><code>Engine</code> - <code>string</code> - Optional - The database engine to use for the new instance. Default: The same as source Constraint: Must be compatible with the engine of the source Example: <code>oracle-ee</code></li>
894
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
895
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
896
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
897
	 */
898
	public function restore_db_instance_to_point_in_time($source_db_instance_identifier, $target_db_instance_identifier, $opt = null)
899
	{
900
		if (!$opt) $opt = array();
901
		$opt['SourceDBInstanceIdentifier'] = $source_db_instance_identifier;
902
		$opt['TargetDBInstanceIdentifier'] = $target_db_instance_identifier;
903
 
904
		// Optional DateTime
905
		if (isset($opt['RestoreTime']))
906
		{
907
			$opt['RestoreTime'] = $this->util->convert_date_to_iso8601($opt['RestoreTime']);
908
		}
909
 
910
		return $this->authenticate('RestoreDBInstanceToPointInTime', $opt);
911
	}
912
 
913
	/**
914
	 * Revokes ingress from a DBSecurityGroup for previously authorized IP ranges or EC2 Security
915
	 * Groups. Required parameters for this API are one of CIDRIP or (EC2SecurityGroupName AND
916
	 * EC2SecurityGroupOwnerId).
917
	 *
918
	 * @param string $db_security_group_name (Required) The name of the DB Security Group to revoke ingress from.
919
	 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
920
	 * 	<li><code>CIDRIP</code> - <code>string</code> - Optional - The IP range to revoke access from. Must be a valid CIDR range. If <code>CIDRIP</code> is specified, <code>EC2SecurityGroupName</code> and <code>EC2SecurityGroupOwnerId</code> cannot be provided.</li>
921
	 * 	<li><code>EC2SecurityGroupName</code> - <code>string</code> - Optional - The name of the EC2 Security Group to revoke access from. If <code>EC2SecurityGroupName</code> is specified, <code>EC2SecurityGroupOwnerId</code> must also be provided and <code>CIDRIP</code> cannot be provided.</li>
922
	 * 	<li><code>EC2SecurityGroupOwnerId</code> - <code>string</code> - Optional - The AWS Account Number of the owner of the EC2 Security specified in the <code>EC2SecurityGroupName</code> parameter. The AWS Access Key ID is not an acceptable value. If <code>EC2SecurityGroupOwnerId</code> is specified <code>EC2SecurityGroupName</code> must also be provided and <code>CIDRIP</code> cannot be provided.</li>
923
	 * 	<li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
924
	 * 	<li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
925
	 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
926
	 */
927
	public function revoke_db_security_group_ingress($db_security_group_name, $opt = null)
928
	{
929
		if (!$opt) $opt = array();
930
		$opt['DBSecurityGroupName'] = $db_security_group_name;
931
 
932
		return $this->authenticate('RevokeDBSecurityGroupIngress', $opt);
933
	}
934
}
935
 
936
 
937
/*%******************************************************************************************%*/
938
// EXCEPTIONS
939
 
940
class RDS_Exception extends Exception {}