Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add snapshot modeling

  • Loading branch information...
commit 8cbdc4999153c01bbad4276318045cb030becf7d 1 parent 1f4041f
@kadwanev kadwanev authored trevorrowe committed
View
1,684 lib/aws/api_config/RDS-2012-07-31.yml
@@ -1,186 +1,887 @@
-# Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"). You
-# may not use this file except in compliance with the License. A copy of
-# the License is located at
-#
-# http://aws.amazon.com/apache2.0/
-#
-# or in the "license" file accompanying this file. This file is
-# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
-# ANY KIND, either express or implied. See the License for the specific
-# language governing permissions and limitations under the License.
-
---
:api_version: '2012-07-31'
:operations:
-- :name: DescribeDBEngineVersions
- :method: describe_db_engine_versions
+- :name: AuthorizeDBSecurityGroupIngress
+ :method: :authorize_db_security_group_ingress
+ :inputs:
+ DBSecurityGroupName:
+ - :string
+ - :required
+ CIDRIP:
+ - :string
+ EC2SecurityGroupName:
+ - :string
+ EC2SecurityGroupId:
+ - :string
+ EC2SecurityGroupOwnerId:
+ - :string
+ :outputs:
+ :children:
+ AuthorizeDBSecurityGroupIngressResult:
+ :ignore: true
+ :children:
+ EC2SecurityGroups:
+ :ignore: true
+ :children:
+ EC2SecurityGroup:
+ :rename: :ec2_security_groups
+ :list: true
+ IPRanges:
+ :ignore: true
+ :children:
+ IPRange:
+ :rename: :ip_ranges
+ :list: true
+- :name: CopyDBSnapshot
+ :method: :copy_db_snapshot
+ :inputs:
+ SourceDBSnapshotIdentifier:
+ - :string
+ - :required
+ TargetDBSnapshotIdentifier:
+ - :string
+ - :required
+ :outputs:
+ :children:
+ CopyDBSnapshotResult:
+ :ignore: true
+ :children:
+ SnapshotCreateTime:
+ :type: :time
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+- :name: CreateDBInstance
+ :method: :create_db_instance
:inputs:
+ DBName:
+ - :string
+ DBInstanceIdentifier:
+ - :string
+ - :required
+ AllocatedStorage:
+ - :integer
+ - :required
+ DBInstanceClass:
+ - :string
+ - :required
+ Engine:
+ - :string
+ - :required
+ MasterUsername:
+ - :string
+ - :required
+ MasterUserPassword:
+ - :string
+ - :required
+ DBSecurityGroups:
+ - :membered_list:
+ - :string
+ AvailabilityZone:
+ - :string
+ DBSubnetGroupName:
+ - :string
+ PreferredMaintenanceWindow:
+ - :string
+ DBParameterGroupName:
+ - :string
+ BackupRetentionPeriod:
+ - :integer
+ PreferredBackupWindow:
+ - :string
+ Port:
+ - :integer
+ MultiAZ:
+ - :boolean
+ EngineVersion:
+ - :string
+ AutoMinorVersionUpgrade:
+ - :boolean
+ LicenseModel:
+ - :string
+ OptionGroupName:
+ - :string
+ CharacterSetName:
+ - :string
+ :outputs:
+ :children:
+ CreateDBInstanceResult:
+ :ignore: true
+ :children:
+ Endpoint:
+ :children:
+ Port:
+ :type: :integer
+ AllocatedStorage:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+ BackupRetentionPeriod:
+ :type: :integer
+ DBSecurityGroups:
+ :ignore: true
+ :children:
+ DBSecurityGroup:
+ :rename: :db_security_groups
+ :list: true
+ DBParameterGroups:
+ :ignore: true
+ :children:
+ DBParameterGroup:
+ :rename: :db_parameter_groups
+ :list: true
+ DBSubnetGroup:
+ :children:
+ Subnets:
+ :ignore: true
+ :children:
+ Subnet:
+ :rename: :subnets
+ :list: true
+ PendingModifiedValues:
+ :children:
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ BackupRetentionPeriod:
+ :type: :integer
+ MultiAZ:
+ :type: :boolean
+ LatestRestorableTime:
+ :type: :time
+ MultiAZ:
+ :type: :boolean
+ AutoMinorVersionUpgrade:
+ :type: :boolean
+ ReadReplicaDBInstanceIdentifiers:
+ :ignore: true
+ :children:
+ ReadReplicaDBInstanceIdentifier:
+ :rename: :read_replica_db_instance_identifiers
+ :list: true
+- :name: CreateDBInstanceReadReplica
+ :method: :create_db_instance_read_replica
+ :inputs:
+ DBInstanceIdentifier:
+ - :string
+ - :required
+ SourceDBInstanceIdentifier:
+ - :string
+ - :required
+ DBInstanceClass:
+ - :string
+ AvailabilityZone:
+ - :string
+ Port:
+ - :integer
+ AutoMinorVersionUpgrade:
+ - :boolean
+ OptionGroupName:
+ - :string
+ :outputs:
+ :children:
+ CreateDBInstanceReadReplicaResult:
+ :ignore: true
+ :children:
+ Endpoint:
+ :children:
+ Port:
+ :type: :integer
+ AllocatedStorage:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+ BackupRetentionPeriod:
+ :type: :integer
+ DBSecurityGroups:
+ :ignore: true
+ :children:
+ DBSecurityGroup:
+ :rename: :db_security_groups
+ :list: true
+ DBParameterGroups:
+ :ignore: true
+ :children:
+ DBParameterGroup:
+ :rename: :db_parameter_groups
+ :list: true
+ DBSubnetGroup:
+ :children:
+ Subnets:
+ :ignore: true
+ :children:
+ Subnet:
+ :rename: :subnets
+ :list: true
+ PendingModifiedValues:
+ :children:
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ BackupRetentionPeriod:
+ :type: :integer
+ MultiAZ:
+ :type: :boolean
+ LatestRestorableTime:
+ :type: :time
+ MultiAZ:
+ :type: :boolean
+ AutoMinorVersionUpgrade:
+ :type: :boolean
+ ReadReplicaDBInstanceIdentifiers:
+ :ignore: true
+ :children:
+ ReadReplicaDBInstanceIdentifier:
+ :rename: :read_replica_db_instance_identifiers
+ :list: true
+- :name: CreateDBParameterGroup
+ :method: :create_db_parameter_group
+ :inputs:
+ DBParameterGroupName:
+ - :string
+ - :required
DBParameterGroupFamily:
- :string
- DefaultOnly:
+ - :required
+ Description:
+ - :string
+ - :required
+ :outputs:
+ :children:
+ CreateDBParameterGroupResult:
+ :ignore: true
+- :name: CreateDBSecurityGroup
+ :method: :create_db_security_group
+ :inputs:
+ DBSecurityGroupName:
+ - :string
+ - :required
+ DBSecurityGroupDescription:
+ - :string
+ - :required
+ EC2VpcId:
+ - :string
+ :outputs:
+ :children:
+ CreateDBSecurityGroupResult:
+ :ignore: true
+ :children:
+ EC2SecurityGroups:
+ :ignore: true
+ :children:
+ EC2SecurityGroup:
+ :rename: :ec2_security_groups
+ :list: true
+ IPRanges:
+ :ignore: true
+ :children:
+ IPRange:
+ :rename: :ip_ranges
+ :list: true
+- :name: CreateDBSnapshot
+ :method: :create_db_snapshot
+ :inputs:
+ DBSnapshotIdentifier:
+ - :string
+ - :required
+ DBInstanceIdentifier:
+ - :string
+ - :required
+ :outputs:
+ :children:
+ CreateDBSnapshotResult:
+ :ignore: true
+ :children:
+ SnapshotCreateTime:
+ :type: :time
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+- :name: CreateDBSubnetGroup
+ :method: :create_db_subnet_group
+ :inputs:
+ DBSubnetGroupName:
+ - :string
+ - :required
+ DBSubnetGroupDescription:
+ - :string
+ - :required
+ SubnetIds:
+ - :membered_list:
+ - :string
+ - :required
+ :outputs:
+ :children:
+ CreateDBSubnetGroupResult:
+ :ignore: true
+ :children:
+ Subnets:
+ :ignore: true
+ :children:
+ Subnet:
+ :rename: :subnets
+ :list: true
+- :name: CreateOptionGroup
+ :method: :create_option_group
+ :inputs:
+ OptionGroupName:
+ - :string
+ - :required
+ EngineName:
+ - :string
+ - :required
+ MajorEngineVersion:
+ - :string
+ - :required
+ OptionGroupDescription:
+ - :string
+ - :required
+ :outputs:
+ :children:
+ CreateOptionGroupResult:
+ :ignore: true
+ :children:
+ Options:
+ :ignore: true
+ :children:
+ Option:
+ :rename: :options
+ :list: true
+ :children:
+ Port:
+ :type: :integer
+ DBSecurityGroupMemberships:
+ :ignore: true
+ :children:
+ DBSecurityGroup:
+ :rename: :db_security_group_memberships
+ :list: true
+- :name: DeleteDBInstance
+ :method: :delete_db_instance
+ :inputs:
+ DBInstanceIdentifier:
+ - :string
+ - :required
+ SkipFinalSnapshot:
- :boolean
+ FinalDBSnapshotIdentifier:
+ - :string
+ :outputs:
+ :children:
+ DeleteDBInstanceResult:
+ :ignore: true
+ :children:
+ Endpoint:
+ :children:
+ Port:
+ :type: :integer
+ AllocatedStorage:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+ BackupRetentionPeriod:
+ :type: :integer
+ DBSecurityGroups:
+ :ignore: true
+ :children:
+ DBSecurityGroup:
+ :rename: :db_security_groups
+ :list: true
+ DBParameterGroups:
+ :ignore: true
+ :children:
+ DBParameterGroup:
+ :rename: :db_parameter_groups
+ :list: true
+ DBSubnetGroup:
+ :children:
+ Subnets:
+ :ignore: true
+ :children:
+ Subnet:
+ :rename: :subnets
+ :list: true
+ PendingModifiedValues:
+ :children:
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ BackupRetentionPeriod:
+ :type: :integer
+ MultiAZ:
+ :type: :boolean
+ LatestRestorableTime:
+ :type: :time
+ MultiAZ:
+ :type: :boolean
+ AutoMinorVersionUpgrade:
+ :type: :boolean
+ ReadReplicaDBInstanceIdentifiers:
+ :ignore: true
+ :children:
+ ReadReplicaDBInstanceIdentifier:
+ :rename: :read_replica_db_instance_identifiers
+ :list: true
+- :name: DeleteDBParameterGroup
+ :method: :delete_db_parameter_group
+ :inputs:
+ DBParameterGroupName:
+ - :string
+ - :required
+ :outputs:
+ :children:
+ DeleteDBParameterGroupResult:
+ :ignore: true
+- :name: DeleteDBSecurityGroup
+ :method: :delete_db_security_group
+ :inputs:
+ DBSecurityGroupName:
+ - :string
+ - :required
+ :outputs:
+ :children:
+ DeleteDBSecurityGroupResult:
+ :ignore: true
+- :name: DeleteDBSnapshot
+ :method: :delete_db_snapshot
+ :inputs:
+ DBSnapshotIdentifier:
+ - :string
+ - :required
+ :outputs:
+ :children:
+ DeleteDBSnapshotResult:
+ :ignore: true
+ :children:
+ SnapshotCreateTime:
+ :type: :time
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+- :name: DeleteDBSubnetGroup
+ :method: :delete_db_subnet_group
+ :inputs:
+ DBSubnetGroupName:
+ - :string
+ - :required
+ :outputs:
+ :children:
+ DeleteDBSubnetGroupResult:
+ :ignore: true
+- :name: DeleteOptionGroup
+ :method: :delete_option_group
+ :inputs:
+ OptionGroupName:
+ - :string
+ - :required
+ :outputs:
+ :children:
+ DeleteOptionGroupResult:
+ :ignore: true
+- :name: DescribeDBEngineVersions
+ :method: :describe_db_engine_versions
+ :inputs:
Engine:
- :string
EngineVersion:
- :string
+ DBParameterGroupFamily:
+ - :string
+ MaxRecords:
+ - :integer
+ Marker:
+ - :string
+ DefaultOnly:
+ - :boolean
ListSupportedCharacterSets:
- :boolean
+ :outputs:
+ :children:
+ DescribeDBEngineVersionsResult:
+ :ignore: true
+ :children:
+ DBEngineVersions:
+ :ignore: true
+ :children:
+ DBEngineVersion:
+ :rename: :db_engine_versions
+ :list: true
+ :children:
+ SupportedCharacterSets:
+ :ignore: true
+ :children:
+ CharacterSet:
+ :rename: :supported_character_sets
+ :list: true
+- :name: DescribeDBInstances
+ :method: :describe_db_instances
+ :inputs:
+ DBInstanceIdentifier:
+ - :string
+ MaxRecords:
+ - :integer
Marker:
- :string
+ :outputs:
+ :children:
+ DescribeDBInstancesResult:
+ :ignore: true
+ :children:
+ DBInstances:
+ :ignore: true
+ :children:
+ DBInstance:
+ :rename: :db_instances
+ :list: true
+ :children:
+ Endpoint:
+ :children:
+ Port:
+ :type: :integer
+ AllocatedStorage:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+ BackupRetentionPeriod:
+ :type: :integer
+ DBSecurityGroups:
+ :ignore: true
+ :children:
+ DBSecurityGroup:
+ :rename: :db_security_groups
+ :list: true
+ DBParameterGroups:
+ :ignore: true
+ :children:
+ DBParameterGroup:
+ :rename: :db_parameter_groups
+ :list: true
+ DBSubnetGroup:
+ :children:
+ Subnets:
+ :ignore: true
+ :children:
+ Subnet:
+ :rename: :subnets
+ :list: true
+ PendingModifiedValues:
+ :children:
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ BackupRetentionPeriod:
+ :type: :integer
+ MultiAZ:
+ :type: :boolean
+ LatestRestorableTime:
+ :type: :time
+ MultiAZ:
+ :type: :boolean
+ AutoMinorVersionUpgrade:
+ :type: :boolean
+ ReadReplicaDBInstanceIdentifiers:
+ :ignore: true
+ :children:
+ ReadReplicaDBInstanceIdentifier:
+ :rename: :read_replica_db_instance_identifiers
+ :list: true
+- :name: DescribeDBParameterGroups
+ :method: :describe_db_parameter_groups
+ :inputs:
+ DBParameterGroupName:
+ - :string
+ MaxRecords:
+ - :integer
+ Marker:
+ - :string
+ :outputs:
+ :children:
+ DescribeDBParameterGroupsResult:
+ :ignore: true
+ :children:
+ DBParameterGroups:
+ :ignore: true
+ :children:
+ DBParameterGroup:
+ :rename: :db_parameter_groups
+ :list: true
+- :name: DescribeDBParameters
+ :method: :describe_db_parameters
+ :inputs:
+ DBParameterGroupName:
+ - :string
+ - :required
+ Source:
+ - :string
+ MaxRecords:
+ - :integer
+ Marker:
+ - :string
+ :outputs:
+ :children:
+ DescribeDBParametersResult:
+ :ignore: true
+ :children:
+ Parameters:
+ :ignore: true
+ :children:
+ Parameter:
+ :rename: :parameters
+ :list: true
+ :children:
+ IsModifiable:
+ :type: :boolean
+- :name: DescribeDBSecurityGroups
+ :method: :describe_db_security_groups
+ :inputs:
+ DBSecurityGroupName:
+ - :string
+ MaxRecords:
+ - :integer
+ Marker:
+ - :string
+ :outputs:
+ :children:
+ DescribeDBSecurityGroupsResult:
+ :ignore: true
+ :children:
+ DBSecurityGroups:
+ :ignore: true
+ :children:
+ DBSecurityGroup:
+ :rename: :db_security_groups
+ :list: true
+ :children:
+ EC2SecurityGroups:
+ :ignore: true
+ :children:
+ EC2SecurityGroup:
+ :rename: :ec2_security_groups
+ :list: true
+ IPRanges:
+ :ignore: true
+ :children:
+ IPRange:
+ :rename: :ip_ranges
+ :list: true
+- :name: DescribeDBSnapshots
+ :method: :describe_db_snapshots
+ :inputs:
+ DBInstanceIdentifier:
+ - :string
+ DBSnapshotIdentifier:
+ - :string
+ SnapshotType:
+ - :string
MaxRecords:
- :integer
+ Marker:
+ - :string
+ :outputs:
+ :children:
+ DescribeDBSnapshotsResult:
+ :ignore: true
+ :children:
+ DBSnapshots:
+ :ignore: true
+ :children:
+ DBSnapshot:
+ :rename: :db_snapshots
+ :list: true
+ :children:
+ SnapshotCreateTime:
+ :type: :time
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+- :name: DescribeDBSubnetGroups
+ :method: :describe_db_subnet_groups
+ :inputs:
+ DBSubnetGroupName:
+ - :string
+ MaxRecords:
+ - :integer
+ Marker:
+ - :string
+ :outputs:
+ :children:
+ DescribeDBSubnetGroupsResult:
+ :ignore: true
+ :children:
+ DBSubnetGroups:
+ :ignore: true
+ :children:
+ DBSubnetGroup:
+ :rename: :db_subnet_groups
+ :list: true
+ :children:
+ Subnets:
+ :ignore: true
+ :children:
+ Subnet:
+ :rename: :subnets
+ :list: true
+- :name: DescribeEngineDefaultParameters
+ :method: :describe_engine_default_parameters
+ :inputs:
+ DBParameterGroupFamily:
+ - :string
+ - :required
+ MaxRecords:
+ - :integer
+ Marker:
+ - :string
:outputs:
:children:
- DescribeDBEngineVersionsResult:
+ DescribeEngineDefaultParametersResult:
:ignore: true
:children:
- DBEngineVersions:
+ Parameters:
:ignore: true
:children:
- DBEngineVersion:
- :rename: :db_engine_versions
+ Parameter:
+ :rename: :parameters
:list: true
:children:
- SupportedCharacterSets:
- :ignore: true
- :children:
- CharacterSet:
- :rename: :supported_character_sets
- :list: true
-- :name: DescribeDBInstances
- :method: :describe_db_instances
+ IsModifiable:
+ :type: :boolean
+- :name: DescribeEvents
+ :method: :describe_events
:inputs:
- DBInstanceIdentifier:
+ SourceIdentifier:
- :string
- Marker:
+ SourceType:
- :string
+ StartTime:
+ - :timestamp
+ EndTime:
+ - :timestamp
+ Duration:
+ - :integer
MaxRecords:
- :integer
+ Marker:
+ - :string
:outputs:
:children:
- DescribeDBInstancesResult:
+ DescribeEventsResult:
:ignore: true
:children:
- DBInstances:
+ Events:
:ignore: true
:children:
- DBInstance:
- :rename: :db_instances
+ Event:
+ :rename: :events
:list: true
:children:
- InstanceCreateTime:
+ Date:
:type: :time
- LatestRestorableTime:
- :type: :time
- DBSubnetGroup:
- :children:
- Subnets:
- :ignore: true
- :children:
- Subnet:
- :rename: subnets
- :list: true
- DBParameterGroups:
- :ignore: true
- :children:
- DBParameterGroup:
- :rename: db_parameter_groups
- :list: true
- DBSecurityGroups:
- :ignore: true
- :children:
- DBSecurityGroup:
- :rename: db_security_groups
- :list: true
-- :name: DeleteDBInstance
- :method: :delete_db_instance
+- :name: DescribeOptionGroupOptions
+ :method: :describe_option_group_options
:inputs:
- DBInstanceIdentifier:
+ EngineName:
- :string
- :required
- SkipFinalSnapshot:
- - :boolean
- FinalDBSnapshotIdentifier:
+ MajorEngineVersion:
+ - :string
+ MaxRecords:
+ - :integer
+ Marker:
- :string
:outputs:
:children:
- DeleteDBInstanceResult:
+ DescribeOptionGroupOptionsResult:
:ignore: true
:children:
- DBInstance:
+ OptionGroupOptions:
+ :ignore: true
:children:
- InstanceCreateTime:
- :type: :time
- LatestRestorableTime:
- :type: :time
- DBSubnetGroup:
+ OptionGroupOption:
+ :rename: :option_group_options
+ :list: true
:children:
- Subnets:
+ PortRequired:
+ :type: :boolean
+ DefaultPort:
+ :type: :integer
+ OptionsDependedOn:
:ignore: true
:children:
- Subnet:
- :rename: subnets
+ OptionName:
+ :rename: :options_depended_on
:list: true
- DBParameterGroups:
- :ignore: true
- :children:
- DBParameterGroup:
- :rename: db_parameter_groups
- :list: true
- DBSecurityGroups:
- :ignore: true
- :children:
- DBSecurityGroup:
- :rename: db_security_groups
- :list: true
-- :name: DescribeEvents
- :method: :describe_events
+- :name: DescribeOptionGroups
+ :method: :describe_option_groups
:inputs:
- Duration:
- - :integer
- StartTime:
- - :timestamp
- EndTime:
- - :timestamp
+ OptionGroupName:
+ - :string
Marker:
- :string
MaxRecords:
- :integer
- SourceIdentifier:
+ EngineName:
- :string
- SourceType:
+ MajorEngineVersion:
- :string
:outputs:
:children:
- DescribeEventsResult:
+ DescribeOptionGroupsResult:
:ignore: true
:children:
- Events:
+ OptionGroupsList:
:ignore: true
:children:
- Event:
- :rename: :events
+ OptionGroup:
+ :rename: :option_groups_list
:list: true
+ :children:
+ Options:
+ :ignore: true
+ :children:
+ Option:
+ :rename: :options
+ :list: true
+ :children:
+ Port:
+ :type: :integer
+ DBSecurityGroupMemberships:
+ :ignore: true
+ :children:
+ DBSecurityGroup:
+ :rename: :db_security_group_memberships
+ :list: true
- :name: DescribeOrderableDBInstanceOptions
- :method: describe_orderable_db_instance_options
+ :method: :describe_orderable_db_instance_options
:inputs:
- DBInstanceClass:
- - :string
Engine:
- :string
- :required
EngineVersion:
- :string
- LicenseModel:
+ DBInstanceClass:
- :string
- Marker:
+ LicenseModel:
- :string
MaxRecords:
- :integer
- Vpc:
- - :boolean
+ Marker:
+ - :string
:outputs:
:children:
DescribeOrderableDBInstanceOptionsResult:
@@ -190,7 +891,7 @@
:ignore: true
:children:
OrderableDBInstanceOption:
- :rename: orderable_db_instance_options
+ :rename: :orderable_db_instance_options
:list: true
:children:
AvailabilityZones:
@@ -199,388 +900,649 @@
AvailabilityZone:
:rename: :availability_zones
:list: true
-- :name: CreateDBInstance
- :method: :create_db_instance
+ MultiAZCapable:
+ :type: :boolean
+ ReadReplicaCapable:
+ :type: :boolean
+ VpcCapable:
+ :type: :boolean
+ VpcMultiAZCapable:
+ :type: :boolean
+ VpcReadReplicaCapable:
+ :type: :boolean
+- :name: DescribeReservedDBInstances
+ :method: :describe_reserved_db_instances
:inputs:
- AllocatedStorage:
- - :integer
- - :required
- AutoMinorVersionUpgrade:
- - :boolean
- AvailabilityZone:
+ ReservedDBInstanceId:
- :string
- BackupRetentionPeriod:
- - :integer
- CharacterSetName:
+ ReservedDBInstancesOfferingId:
- :string
DBInstanceClass:
- :string
- - :required
- DBInstanceIdentifier:
+ Duration:
- :string
- - :required
- DBName:
+ ProductDescription:
- :string
- DBParameterGroupName:
+ OfferingType:
- :string
- DBSecurityGroups:
- - :membered_list:
- - :string
- DBSubnetGroupName:
+ MultiAZ:
+ - :boolean
+ MaxRecords:
+ - :integer
+ Marker:
- :string
- Engine:
+ :outputs:
+ :children:
+ DescribeReservedDBInstancesResult:
+ :ignore: true
+ :children:
+ ReservedDBInstances:
+ :ignore: true
+ :children:
+ ReservedDBInstance:
+ :rename: :reserved_db_instances
+ :list: true
+ :children:
+ StartTime:
+ :type: :time
+ Duration:
+ :type: :integer
+ FixedPrice:
+ :type: :float
+ UsagePrice:
+ :type: :float
+ DBInstanceCount:
+ :type: :integer
+ MultiAZ:
+ :type: :boolean
+ RecurringCharges:
+ :ignore: true
+ :children:
+ RecurringCharge:
+ :rename: :recurring_charges
+ :list: true
+ :children:
+ RecurringChargeAmount:
+ :type: :float
+- :name: DescribeReservedDBInstancesOfferings
+ :method: :describe_reserved_db_instances_offerings
+ :inputs:
+ ReservedDBInstancesOfferingId:
- :string
- - :required
- EngineVersion:
+ DBInstanceClass:
- :string
- LicenseModel:
+ Duration:
- :string
- MasterUserPassword:
+ ProductDescription:
- :string
- - :required
- MasterUsername:
+ OfferingType:
- :string
- - :required
MultiAZ:
- :boolean
- OptionGroupName:
- - :string
- Port:
+ MaxRecords:
- :integer
- PreferredBackupWindow:
- - :string
- PreferredMaintenanceWindow:
+ Marker:
- :string
:outputs:
:children:
- CreateDBInstanceResult:
+ DescribeReservedDBInstancesOfferingsResult:
:ignore: true
:children:
- DBInstance:
+ ReservedDBInstancesOfferings:
+ :ignore: true
:children:
- InstanceCreateTime:
- :type: :time
- LatestRestorableTime:
- :type: :time
- DBSubnetGroup:
+ ReservedDBInstancesOffering:
+ :rename: :reserved_db_instances_offerings
+ :list: true
:children:
- Subnets:
+ Duration:
+ :type: :integer
+ FixedPrice:
+ :type: :float
+ UsagePrice:
+ :type: :float
+ MultiAZ:
+ :type: :boolean
+ RecurringCharges:
:ignore: true
:children:
- Subnet:
- :rename: subnets
+ RecurringCharge:
+ :rename: :recurring_charges
:list: true
- DBParameterGroups:
- :ignore: true
- :children:
- DBParameterGroup:
- :rename: db_parameter_groups
- :list: true
- DBSecurityGroups:
- :ignore: true
- :children:
- DBSecurityGroup:
- :rename: db_security_groups
- :list: true
+ :children:
+ RecurringChargeAmount:
+ :type: :float
- :name: ModifyDBInstance
:method: :modify_db_instance
:inputs:
+ DBInstanceIdentifier:
+ - :string
+ - :required
AllocatedStorage:
- :integer
- AllowMajorVersionUpgrade:
- - :boolean
+ DBInstanceClass:
+ - :string
+ DBSecurityGroups:
+ - :membered_list:
+ - :string
ApplyImmediately:
- :boolean
- AutoMinorVersionUpgrade:
- - :boolean
+ MasterUserPassword:
+ - :string
+ DBParameterGroupName:
+ - :string
BackupRetentionPeriod:
- :integer
- DBInstanceClass:
+ PreferredBackupWindow:
- :string
- DBInstanceIdentifier:
+ PreferredMaintenanceWindow:
+ - :string
+ MultiAZ:
+ - :boolean
+ EngineVersion:
+ - :string
+ AllowMajorVersionUpgrade:
+ - :boolean
+ AutoMinorVersionUpgrade:
+ - :boolean
+ OptionGroupName:
+ - :string
+ :outputs:
+ :children:
+ ModifyDBInstanceResult:
+ :ignore: true
+ :children:
+ Endpoint:
+ :children:
+ Port:
+ :type: :integer
+ AllocatedStorage:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+ BackupRetentionPeriod:
+ :type: :integer
+ DBSecurityGroups:
+ :ignore: true
+ :children:
+ DBSecurityGroup:
+ :rename: :db_security_groups
+ :list: true
+ DBParameterGroups:
+ :ignore: true
+ :children:
+ DBParameterGroup:
+ :rename: :db_parameter_groups
+ :list: true
+ DBSubnetGroup:
+ :children:
+ Subnets:
+ :ignore: true
+ :children:
+ Subnet:
+ :rename: :subnets
+ :list: true
+ PendingModifiedValues:
+ :children:
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ BackupRetentionPeriod:
+ :type: :integer
+ MultiAZ:
+ :type: :boolean
+ LatestRestorableTime:
+ :type: :time
+ MultiAZ:
+ :type: :boolean
+ AutoMinorVersionUpgrade:
+ :type: :boolean
+ ReadReplicaDBInstanceIdentifiers:
+ :ignore: true
+ :children:
+ ReadReplicaDBInstanceIdentifier:
+ :rename: :read_replica_db_instance_identifiers
+ :list: true
+- :name: ModifyDBParameterGroup
+ :method: :modify_db_parameter_group
+ :inputs:
+ DBParameterGroupName:
+ - :string
+ - :required
+ Parameters:
+ - :membered_list:
+ - :structure:
+ ParameterName:
+ - :string
+ ParameterValue:
+ - :string
+ Description:
+ - :string
+ Source:
+ - :string
+ ApplyType:
+ - :string
+ DataType:
+ - :string
+ AllowedValues:
+ - :string
+ IsModifiable:
+ - :boolean
+ MinimumEngineVersion:
+ - :string
+ ApplyMethod:
+ - :string
+ - :required
+ :outputs:
+ :children:
+ ModifyDBParameterGroupResult:
+ :ignore: true
+- :name: ModifyDBSubnetGroup
+ :method: :modify_db_subnet_group
+ :inputs:
+ DBSubnetGroupName:
- :string
- :required
- DBParameterGroupName:
+ DBSubnetGroupDescription:
- :string
- DBSecurityGroups:
+ SubnetIds:
- :membered_list:
- :string
- EngineVersion:
- - :string
- MasterUserPassword:
- - :string
- MasterUsername:
- - :string
- :required
- MultiAZ:
- - :boolean
- OptionGroupName:
- - :string
- PreferredBackupWindow:
- - :string
- PreferredMaintenanceWindow:
- - :string
:outputs:
:children:
- ModifyDBInstanceResult:
+ ModifyDBSubnetGroupResult:
:ignore: true
:children:
- DBInstance:
+ Subnets:
+ :ignore: true
:children:
- InstanceCreateTime:
- :type: :time
- LatestRestorableTime:
- :type: :time
- DBSubnetGroup:
- :children:
- Subnets:
- :ignore: true
- :children:
- Subnet:
- :rename: subnets
- :list: true
- DBParameterGroups:
- :ignore: true
- :children:
- DBParameterGroup:
- :rename: db_parameter_groups
- :list: true
- DBSecurityGroups:
- :ignore: true
- :children:
- DBSecurityGroup:
- :rename: db_security_groups
- :list: true
-- :name: RebootDBInstance
- :method: :reboot_db_instance
+ Subnet:
+ :rename: :subnets
+ :list: true
+- :name: ModifyOptionGroup
+ :method: :modify_option_group
:inputs:
- DBInstanceIdentifier:
+ OptionGroupName:
- :string
- :required
- ForceFailover:
+ OptionsToInclude:
+ - :membered_list:
+ - :structure:
+ OptionName:
+ - :string
+ - :required
+ Port:
+ - :integer
+ DBSecurityGroupMemberships:
+ - :membered_list:
+ - :string
+ OptionsToRemove:
+ - :membered_list:
+ - :string
+ ApplyImmediately:
- :boolean
:outputs:
:children:
- RebootDBInstanceResult:
+ ModifyOptionGroupResult:
:ignore: true
:children:
- DBInstance:
+ Options:
+ :ignore: true
:children:
- InstanceCreateTime:
- :type: :time
- LatestRestorableTime:
- :type: :time
- DBSubnetGroup:
+ Option:
+ :rename: :options
+ :list: true
:children:
- Subnets:
+ Port:
+ :type: :integer
+ DBSecurityGroupMemberships:
:ignore: true
:children:
- Subnet:
- :rename: subnets
+ DBSecurityGroup:
+ :rename: :db_security_group_memberships
:list: true
- DBParameterGroups:
- :ignore: true
- :children:
- DBParameterGroup:
- :rename: db_parameter_groups
- :list: true
- DBSecurityGroups:
- :ignore: true
- :children:
- DBSecurityGroup:
- :rename: db_security_groups
- :list: true
-- :name: DescribeDBSnapshots
- :method: :describe_db_snapshots
+- :name: PurchaseReservedDBInstancesOffering
+ :method: :purchase_reserved_db_instances_offering
:inputs:
- DBInstanceIdentifier:
- - :string
- DBSnapshotIdentifier:
- - :string
- SnapshotType:
+ ReservedDBInstancesOfferingId:
- :string
- Marker:
+ - :required
+ ReservedDBInstanceId:
- :string
- MaxRecords:
+ DBInstanceCount:
- :integer
:outputs:
:children:
- DescribeDBSnapshotsResult:
+ PurchaseReservedDBInstancesOfferingResult:
:ignore: true
:children:
- DBSnapshots:
+ StartTime:
+ :type: :time
+ Duration:
+ :type: :integer
+ FixedPrice:
+ :type: :float
+ UsagePrice:
+ :type: :float
+ DBInstanceCount:
+ :type: :integer
+ MultiAZ:
+ :type: :boolean
+ RecurringCharges:
:ignore: true
:children:
- DBSnapshot:
- :rename: db_snapshots
+ RecurringCharge:
+ :rename: :recurring_charges
:list: true
-- :name: CreateDBSnapshot
- :method: create_db_snapshot
+ :children:
+ RecurringChargeAmount:
+ :type: :float
+- :name: RebootDBInstance
+ :method: :reboot_db_instance
:inputs:
DBInstanceIdentifier:
- :string
- :required
- DBSnapshotIdentifier:
- - :string
- - :required
- :outputs:
- :children:
- CreateDBSnapshotResult:
- :ignore: true
-- :name: CopyDBSnapshot
- :method: copy_db_snapshot
- :inputs:
- SourceDBSnapshotIdentifier:
- - :string
- - :required
- TargetDBSnapshotIdentifier:
- - :string
- - :required
+ ForceFailover:
+ - :boolean
:outputs:
:children:
- CopyDBSnapshotResult:
+ RebootDBInstanceResult:
:ignore: true
-- :name: DeleteDBSnapshot
- :method: delete_db_snapshot
+ :children:
+ Endpoint:
+ :children:
+ Port:
+ :type: :integer
+ AllocatedStorage:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+ BackupRetentionPeriod:
+ :type: :integer
+ DBSecurityGroups:
+ :ignore: true
+ :children:
+ DBSecurityGroup:
+ :rename: :db_security_groups
+ :list: true
+ DBParameterGroups:
+ :ignore: true
+ :children:
+ DBParameterGroup:
+ :rename: :db_parameter_groups
+ :list: true
+ DBSubnetGroup:
+ :children:
+ Subnets:
+ :ignore: true
+ :children:
+ Subnet:
+ :rename: :subnets
+ :list: true
+ PendingModifiedValues:
+ :children:
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ BackupRetentionPeriod:
+ :type: :integer
+ MultiAZ:
+ :type: :boolean
+ LatestRestorableTime:
+ :type: :time
+ MultiAZ:
+ :type: :boolean
+ AutoMinorVersionUpgrade:
+ :type: :boolean
+ ReadReplicaDBInstanceIdentifiers:
+ :ignore: true
+ :children:
+ ReadReplicaDBInstanceIdentifier:
+ :rename: :read_replica_db_instance_identifiers
+ :list: true
+- :name: ResetDBParameterGroup
+ :method: :reset_db_parameter_group
:inputs:
- DBSnapshotIdentifier:
+ DBParameterGroupName:
- :string
- :required
+ ResetAllParameters:
+ - :boolean
+ Parameters:
+ - :membered_list:
+ - :structure:
+ ParameterName:
+ - :string
+ ParameterValue:
+ - :string
+ Description:
+ - :string
+ Source:
+ - :string
+ ApplyType:
+ - :string
+ DataType:
+ - :string
+ AllowedValues:
+ - :string
+ IsModifiable:
+ - :boolean
+ MinimumEngineVersion:
+ - :string
+ ApplyMethod:
+ - :string
:outputs:
:children:
- DeleteDBSnapshotResult:
+ ResetDBParameterGroupResult:
:ignore: true
- :name: RestoreDBInstanceFromDBSnapshot
- :method: restore_db_instance_from_db_snapshot
+ :method: :restore_db_instance_from_db_snapshot
:inputs:
- AutoMinorVersionUpgrade:
- - :boolean
- AvailabilityZone:
- - :string
- DBInstanceClass:
- - :string
DBInstanceIdentifier:
- :string
- :required
- DBName:
- - :string
DBSnapshotIdentifier:
- :string
- :required
- DBSubnetGroupName:
+ DBInstanceClass:
- :string
- Engine:
+ Port:
+ - :integer
+ AvailabilityZone:
- :string
- LicenseModel:
+ DBSubnetGroupName:
- :string
MultiAZ:
- :boolean
+ AutoMinorVersionUpgrade:
+ - :boolean
+ LicenseModel:
+ - :string
+ DBName:
+ - :string
+ Engine:
+ - :string
OptionGroupName:
- :string
- Port:
- - :integer
:outputs:
:children:
RestoreDBInstanceFromDBSnapshotResult:
:ignore: true
:children:
- DBInstance:
+ Endpoint:
:children:
- InstanceCreateTime:
- :type: :time
- LatestRestorableTime:
- :type: :time
- DBSubnetGroup:
- :children:
- Subnets:
- :ignore: true
- :children:
- Subnet:
- :rename: subnets
- :list: true
- DBParameterGroups:
- :ignore: true
- :children:
- DBParameterGroup:
- :rename: db_parameter_groups
- :list: true
- DBSecurityGroups:
+ Port:
+ :type: :integer
+ AllocatedStorage:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+ BackupRetentionPeriod:
+ :type: :integer
+ DBSecurityGroups:
+ :ignore: true
+ :children:
+ DBSecurityGroup:
+ :rename: :db_security_groups
+ :list: true
+ DBParameterGroups:
+ :ignore: true
+ :children:
+ DBParameterGroup:
+ :rename: :db_parameter_groups
+ :list: true
+ DBSubnetGroup:
+ :children:
+ Subnets:
:ignore: true
:children:
- DBSecurityGroup:
- :rename: db_security_groups
+ Subnet:
+ :rename: :subnets
:list: true
-- :name: AddTagsToResource
- :method: add_tags_to_resource
- :inputs:
- ResourceName:
- - :string
- - :required
- Tags:
- - :membered_list:
- - :structure:
- Key:
- - :string
- - :required
- Value:
- - :string
- - :required
- :outputs: {}
-- :name: ListTagsForResource
- :method: list_tags_for_resource
+ PendingModifiedValues:
+ :children:
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ BackupRetentionPeriod:
+ :type: :integer
+ MultiAZ:
+ :type: :boolean
+ LatestRestorableTime:
+ :type: :time
+ MultiAZ:
+ :type: :boolean
+ AutoMinorVersionUpgrade:
+ :type: :boolean
+ ReadReplicaDBInstanceIdentifiers:
+ :ignore: true
+ :children:
+ ReadReplicaDBInstanceIdentifier:
+ :rename: :read_replica_db_instance_identifiers
+ :list: true
+- :name: RestoreDBInstanceToPointInTime
+ :method: :restore_db_instance_to_point_in_time
:inputs:
- ResourceName:
+ SourceDBInstanceIdentifier:
- :string
- :required
- :outputs:
- :children:
- ListTagsForResourceResult:
- :ignore: true
-- :name: RemoveTagsFromResource
- :method: remove_tags_from_resource
- :inputs:
- ResourceName:
+ TargetDBInstanceIdentifier:
- :string
- :required
- Tags:
- - :membered_list:
- - :structure:
- Key:
- - :string
- - :required
- Value:
- - :string
- - :required
- :outputs: {}
-- :name: DescribeReservedDBInstances
- :method: :describe_reserved_db_instances
- :inputs:
+ RestoreTime:
+ - :timestamp
+ UseLatestRestorableTime:
+ - :boolean
DBInstanceClass:
- :string
- Duration:
+ Port:
+ - :integer
+ AvailabilityZone:
- :string
- Marker:
+ DBSubnetGroupName:
- :string
- MaxRecords:
- - :integer
MultiAZ:
+ - :boolean
+ AutoMinorVersionUpgrade:
+ - :boolean
+ LicenseModel:
- :string
- OfferingType:
+ DBName:
- :string
- ProductDescription:
+ Engine:
- :string
- ReservedDBInstanceId:
+ OptionGroupName:
- :string
- ReservedDBInstancesOfferingId:
+ :outputs:
+ :children:
+ RestoreDBInstanceToPointInTimeResult:
+ :ignore: true
+ :children:
+ Endpoint:
+ :children:
+ Port:
+ :type: :integer
+ AllocatedStorage:
+ :type: :integer
+ InstanceCreateTime:
+ :type: :time
+ BackupRetentionPeriod:
+ :type: :integer
+ DBSecurityGroups:
+ :ignore: true
+ :children:
+ DBSecurityGroup:
+ :rename: :db_security_groups
+ :list: true
+ DBParameterGroups:
+ :ignore: true
+ :children:
+ DBParameterGroup:
+ :rename: :db_parameter_groups
+ :list: true
+ DBSubnetGroup:
+ :children:
+ Subnets:
+ :ignore: true
+ :children:
+ Subnet:
+ :rename: :subnets
+ :list: true
+ PendingModifiedValues:
+ :children:
+ AllocatedStorage:
+ :type: :integer
+ Port:
+ :type: :integer
+ BackupRetentionPeriod:
+ :type: :integer
+ MultiAZ:
+ :type: :boolean
+ LatestRestorableTime:
+ :type: :time
+ MultiAZ:
+ :type: :boolean
+ AutoMinorVersionUpgrade:
+ :type: :boolean
+ ReadReplicaDBInstanceIdentifiers:
+ :ignore: true
+ :children:
+ ReadReplicaDBInstanceIdentifier:
+ :rename: :read_replica_db_instance_identifiers
+ :list: true
+- :name: RevokeDBSecurityGroupIngress
+ :method: :revoke_db_security_group_ingress
+ :inputs:
+ DBSecurityGroupName:
+ - :string
+ - :required
+ CIDRIP:
+ - :string
+ EC2SecurityGroupName:
+ - :string
+ EC2SecurityGroupId:
+ - :string
+ EC2SecurityGroupOwnerId:
- :string
:outputs:
:children:
- DescribeReservedDBInstancesResult:
+ RevokeDBSecurityGroupIngressResult:
:ignore: true
:children:
- ReservedDBInstances:
+ EC2SecurityGroups:
:ignore: true
:children:
- ReservedDBInstance:
- :rename: :reserved_db_instances
+ EC2SecurityGroup:
+ :rename: :ec2_security_groups
+ :list: true
+ IPRanges:
+ :ignore: true
+ :children:
+ IPRange:
+ :rename: :ip_ranges
:list: true
View
7 lib/aws/rds.rb
@@ -24,6 +24,8 @@ class RDS
autoload :Errors, 'errors'
autoload :DBInstance, 'db_instance'
autoload :DBInstanceCollection, 'db_instance_collection'
+ autoload :DBSnapshot, 'db_snapshot'
+ autoload :DBSnapshotCollection, 'db_snapshot_collection'
autoload :Request, 'request'
end
@@ -34,5 +36,10 @@ def db_instances
end
alias_method :instances, :db_instances
+ def db_snapshots
+ DBSnapshotCollection.new(:config => config)
+ end
+ alias_method :snapshots, :db_snapshots
+
end
end
View
16 lib/aws/rds/db_instance.rb
@@ -50,6 +50,17 @@ def initialize db_instance_id, options = {}
resp.data[:db_instances].find{|j| j[:db_instance_identifier] == db_instance_identifier }
end
+ def snapshots
+ DBSnapshotCollection.new.db_instance(db_instance_identifier)
+ end
+
+ def create_snapshot name
+ options = {:db_instance_identifier => db_instance_identifier,
+ :db_snapshot_identifier => name}
+ client.create_db_snapshot(options)
+ nil
+ end
+
def reboot options={}
options[:db_instance_identifier] = db_instance_identifier
client.reboot_db_instance(options)
@@ -62,6 +73,11 @@ def delete options={}
nil
end
+ # @return [Boolean] Returns +true+ if the db instance exists.
+ def exists?
+ !get_resource.data[:db_instances].empty?
+ end
+
protected
def resource_identifiers
View
5 lib/aws/rds/db_instance_collection.rb
@@ -28,10 +28,11 @@ def create name, options = {}
protected
- def _each_item marker, max_items, options = {}, &block
+ def _each_item marker, max_records, options = {}, &block
+ options = @filters.merge(options)
options[:marker] = marker if marker
- options[:max_items] = max_items if max_items
+ options[:max_records] = [[20,max_records].max,100].min if max_records
response = client.describe_db_instances(@filters.merge(options))
response.data[:db_instances].each do |details|
View
79 lib/aws/rds/db_snapshot.rb
@@ -0,0 +1,79 @@
+module AWS
+ class RDS
+ class DBSnapshot < Core::Resource
+
+ # @param [String] job_flow_id
+ # @param [Hash] options
+ # @private
+ def initialize db_snapshot_id, options = {}
+ @db_snapshot_identifier = db_snapshot_id
+ super
+ end
+
+ attr_reader :db_snapshot_identifier
+
+ alias_method :id, :db_snapshot_identifier
+
+ attribute :allocated_storage, :static => true
+ alias_method :size, :allocated_storage
+
+ attribute :availability_zone, :static => true
+ attribute :db_instance_id,
+ :from => [:db_instance_identifier], :static => true
+ attribute :engine, :static => true
+ attribute :engine_version, :static => true
+ attribute :license_model, :static => true
+ attribute :master_username, :static => true
+ attribute :port, :static => true
+ attribute :vpc_id, :static => true
+
+ attribute :snapshot_type, :static => true
+ alias_method :type, :snapshot_type
+
+ attribute :status
+ alias_method :db_snapshot_status, :status
+
+ attribute :created_at,
+ :from => [:snapshot_create_time],
+ :static => true,
+ :alias => :created_at
+
+ attribute :instance_create_time, :static => true
+
+ populates_from(:describe_db_snapshots) do |resp|
+ resp.data[:db_snapshots].find{|j| j[:db_snapshot_identifier] == db_snapshot_identifier }
+ end
+
+ def copy name
+ options = {:source_db_snapshot_identifier => db_snapshot_identifier,
+ :target_db_snapshot_identifier => name}
+ client.copy_db_snapshot(options)
+ nil
+ end
+
+ def delete
+ client.delete_db_snapshot(:db_snapshot_identifier => db_snapshot_identifier)
+ nil
+ end
+
+ def restore_instance name, options={}
+ options[:db_snapshot_identifier] = db_snapshot_identifier
+ options[:db_instance_identifier] = name
+ client.restore_db_instance_from_db_snapshot(options)
+ nil
+ end
+
+ protected
+
+ def resource_identifiers
+ [[:db_snapshot_identifier, id]]
+ end
+
+ def get_resource attr = nil
+ client.describe_db_snapshots(:db_snapshot_identifier => db_snapshot_identifier)
+ end
+
+
+ end
+ end
+end
View
66 lib/aws/rds/db_snapshot_collection.rb
@@ -0,0 +1,66 @@
+require 'date'
+require 'time'
+
+module AWS
+ class RDS
+ class DBSnapshotCollection
+
+ include Core::Collection::WithLimitAndNextToken
+
+ # @private
+ def initialize options = {}
+ @filters = options[:filters] || {}
+ super
+ end
+
+ # @param [String] db_snapshot_id
+ # @return [DBSnapshot] Returns a {DBSnapshot} with the given ID.
+ def [] db_snapshot_id
+ DBSnapshot.new(db_snapshot_id, :config => config)
+ end
+
+ def db_instance db_instance_id
+ filter(:db_instance_identifier, db_instance_id)
+ end
+
+ def type snapshot_type
+ filter(:snapshot_type, snapshot_type)
+ end
+
+ # @param [String,Symbol] name
+ # @param [Mixed] value
+ # @return [DBSnapshotCollection]
+ def filter name, value
+ options = {}
+ options[:filters] = @filters.merge(name.to_s.to_sym => value)
+ options[:config] = config
+ DBSnapshotCollection.new(options)
+ end
+
+ protected
+
+ def _each_item marker, max_records, options = {}, &block
+
+ options = @filters.merge(options)
+ options[:marker] = marker if marker
+ options[:max_records] = [[20,max_records].max,100].min if max_records
+
+ response = client.describe_db_snapshots(@filters.merge(options))
+ response.data[:db_snapshots].each do |details|
+
+ db_snapshot = DBSnapshot.new_from(
+ :describe_db_snapshots,
+ details,
+ details[:db_snapshot_identifier],
+ :config => config)
+
+ yield(db_snapshot)
+
+ end
+
+ response.data[:marker]
+ end
+
+ end
+ end
+end
View
0  lib/aws/rds/event_collection.rb
No changes.
Please sign in to comment.
Something went wrong with that request. Please try again.