Class: Aws::RDS::Resource
- Inherits:
-
Object
- Object
- Aws::RDS::Resource
- Defined in:
- lib/aws-sdk-rds/resource.rb
Overview
This class provides a resource oriented interface for RDS. To create a resource object:
resource = Aws::RDS::Resource.new(region: 'us-west-2')
You can supply a client object with custom configuration that will be used for all resource operations. If you do not pass ‘:client`, a default client will be constructed.
client = Aws::RDS::Client.new(region: 'us-west-2')
resource = Aws::RDS::Resource.new(client: client)
Actions collapse
- #create_db_cluster(options = {}) ⇒ DBCluster
- #create_db_cluster_parameter_group(options = {}) ⇒ DBClusterParameterGroup
- #create_db_instance(options = {}) ⇒ DBInstance
- #create_db_parameter_group(options = {}) ⇒ DBParameterGroup
- #create_db_security_group(options = {}) ⇒ DBSecurityGroup
- #create_db_subnet_group(options = {}) ⇒ DBSubnetGroup
- #create_event_subscription(options = {}) ⇒ EventSubscription
- #create_option_group(options = {}) ⇒ OptionGroup
Associations collapse
- #account_quotas(options = {}) ⇒ AccountQuota::Collection
- #certificate(id) ⇒ Certificate
- #certificates(options = {}) ⇒ Certificate::Collection
- #db_cluster(id) ⇒ DBCluster
- #db_cluster_parameter_group(name) ⇒ DBClusterParameterGroup
- #db_cluster_parameter_groups(options = {}) ⇒ DBClusterParameterGroup::Collection
- #db_clusters(options = {}) ⇒ DBCluster::Collection
- #db_engine(name) ⇒ DBEngine
- #db_engine_version(engine_name, version) ⇒ DBEngineVersion
- #db_engine_versions(options = {}) ⇒ DBEngineVersion::Collection
- #db_instance(id) ⇒ DBInstance
- #db_instances(options = {}) ⇒ DBInstance::Collection
- #db_parameter_group(name) ⇒ DBParameterGroup
- #db_parameter_group_family(name) ⇒ DBParameterGroupFamily
- #db_parameter_groups(options = {}) ⇒ DBParameterGroup::Collection
- #db_security_group(name) ⇒ DBSecurityGroup
- #db_security_groups(options = {}) ⇒ DBSecurityGroup::Collection
- #db_snapshots(options = {}) ⇒ DBSnapshot::Collection
- #db_subnet_group(name) ⇒ DBSubnetGroup
- #db_subnet_groups(options = {}) ⇒ DBSubnetGroup::Collection
- #event_category_map(source_type) ⇒ EventCategoryMap
- #event_category_maps(options = {}) ⇒ EventCategoryMap::Collection
- #event_subscription(name) ⇒ EventSubscription
- #event_subscriptions(options = {}) ⇒ EventSubscription::Collection
- #events(options = {}) ⇒ Event::Collection
- #option_group(name) ⇒ OptionGroup
- #option_groups(options = {}) ⇒ OptionGroup::Collection
- #pending_maintenance_action(target_arn, name) ⇒ PendingMaintenanceAction
- #reserved_db_instance(id) ⇒ ReservedDBInstance
- #reserved_db_instances(options = {}) ⇒ ReservedDBInstance::Collection
- #reserved_db_instances_offering(id) ⇒ ReservedDBInstancesOffering
- #reserved_db_instances_offerings(options = {}) ⇒ ReservedDBInstancesOffering::Collection
- #resource_with_pending_maintenance_actions(arn) ⇒ ResourcePendingMaintenanceActionList
- #resources_with_pending_maintenance_actions(options = {}) ⇒ ResourcePendingMaintenanceActionList::Collection
Instance Method Summary collapse
- #client ⇒ Client
-
#initialize(options = {}) ⇒ Resource
constructor
A new instance of Resource.
Constructor Details
Instance Method Details
#account_quotas(options = {}) ⇒ AccountQuota::Collection
2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 |
# File 'lib/aws-sdk-rds/resource.rb', line 2644 def account_quotas( = {}) batches = Enumerator.new do |y| batch = [] resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_account_attributes() end resp.data.account_quotas.each do |a| batch << AccountQuota.new( name: a.account_quota_name, data: a, client: @client ) end y.yield(batch) end AccountQuota::Collection.new(batches) end |
#certificate(id) ⇒ Certificate
2664 2665 2666 2667 2668 2669 |
# File 'lib/aws-sdk-rds/resource.rb', line 2664 def certificate(id) Certificate.new( id: id, client: @client ) end |
#certificates(options = {}) ⇒ Certificate::Collection
2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 |
# File 'lib/aws-sdk-rds/resource.rb', line 2696 def certificates( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_certificates() end resp.each_page do |page| batch = [] page.data.certificates.each do |c| batch << Certificate.new( id: c.certificate_identifier, data: c, client: @client ) end y.yield(batch) end end Certificate::Collection.new(batches) end |
#create_db_cluster(options = {}) ⇒ DBCluster
897 898 899 900 901 902 903 904 905 906 |
# File 'lib/aws-sdk-rds/resource.rb', line 897 def create_db_cluster( = {}) resp = Aws::Plugins::UserAgent.feature('resource') do @client.create_db_cluster() end DBCluster.new( id: [:db_cluster][:db_cluster_identifier], data: resp.data.db_cluster, client: @client ) end |
#create_db_cluster_parameter_group(options = {}) ⇒ DBClusterParameterGroup
988 989 990 991 992 993 994 995 996 997 |
# File 'lib/aws-sdk-rds/resource.rb', line 988 def create_db_cluster_parameter_group( = {}) resp = Aws::Plugins::UserAgent.feature('resource') do @client.create_db_cluster_parameter_group() end DBClusterParameterGroup.new( name: resp.data.db_cluster_parameter_group.db_cluster_parameter_group_name, data: resp.data.db_cluster_parameter_group, client: @client ) end |
#create_db_instance(options = {}) ⇒ DBInstance
2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 |
# File 'lib/aws-sdk-rds/resource.rb', line 2255 def create_db_instance( = {}) resp = Aws::Plugins::UserAgent.feature('resource') do @client.create_db_instance() end DBInstance.new( id: resp.data.db_instance.db_instance_identifier, data: resp.data.db_instance, client: @client ) end |
#create_db_parameter_group(options = {}) ⇒ DBParameterGroup
2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 |
# File 'lib/aws-sdk-rds/resource.rb', line 2350 def create_db_parameter_group( = {}) resp = Aws::Plugins::UserAgent.feature('resource') do @client.create_db_parameter_group() end DBParameterGroup.new( name: resp.data.db_parameter_group.db_parameter_group_name, data: resp.data.db_parameter_group, client: @client ) end |
#create_db_security_group(options = {}) ⇒ DBSecurityGroup
2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 |
# File 'lib/aws-sdk-rds/resource.rb', line 2394 def create_db_security_group( = {}) resp = Aws::Plugins::UserAgent.feature('resource') do @client.create_db_security_group() end DBSecurityGroup.new( name: resp.data.db_security_group.db_security_group_name, data: resp.data.db_security_group, client: @client ) end |
#create_db_subnet_group(options = {}) ⇒ DBSubnetGroup
2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 |
# File 'lib/aws-sdk-rds/resource.rb', line 2440 def create_db_subnet_group( = {}) resp = Aws::Plugins::UserAgent.feature('resource') do @client.create_db_subnet_group() end DBSubnetGroup.new( name: resp.data.db_subnet_group.db_subnet_group_name, data: resp.data.db_subnet_group, client: @client ) end |
#create_event_subscription(options = {}) ⇒ EventSubscription
2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 |
# File 'lib/aws-sdk-rds/resource.rb', line 2550 def create_event_subscription( = {}) resp = Aws::Plugins::UserAgent.feature('resource') do @client.create_event_subscription() end EventSubscription.new( name: resp.data.event_subscription.cust_subscription_id, data: resp.data.event_subscription, client: @client ) end |
#create_option_group(options = {}) ⇒ OptionGroup
2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 |
# File 'lib/aws-sdk-rds/resource.rb', line 2626 def create_option_group( = {}) resp = Aws::Plugins::UserAgent.feature('resource') do @client.create_option_group() end OptionGroup.new( name: resp.data.option_group.option_group_name, data: resp.data.option_group, client: @client ) end |
#db_cluster(id) ⇒ DBCluster
2718 2719 2720 2721 2722 2723 |
# File 'lib/aws-sdk-rds/resource.rb', line 2718 def db_cluster(id) DBCluster.new( id: id, client: @client ) end |
#db_cluster_parameter_group(name) ⇒ DBClusterParameterGroup
2727 2728 2729 2730 2731 2732 |
# File 'lib/aws-sdk-rds/resource.rb', line 2727 def db_cluster_parameter_group(name) DBClusterParameterGroup.new( name: name, client: @client ) end |
#db_cluster_parameter_groups(options = {}) ⇒ DBClusterParameterGroup::Collection
2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 |
# File 'lib/aws-sdk-rds/resource.rb', line 2759 def db_cluster_parameter_groups( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_db_cluster_parameter_groups() end resp.each_page do |page| batch = [] page.data.db_cluster_parameter_groups.each do |d| batch << DBClusterParameterGroup.new( name: d.db_cluster_parameter_group_name, data: d, client: @client ) end y.yield(batch) end end DBClusterParameterGroup::Collection.new(batches) end |
#db_clusters(options = {}) ⇒ DBCluster::Collection
2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 |
# File 'lib/aws-sdk-rds/resource.rb', line 2830 def db_clusters( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_db_clusters() end resp.each_page do |page| batch = [] page.data.db_clusters.each do |d| batch << DBCluster.new( id: d.db_cluster_identifier, data: d, client: @client ) end y.yield(batch) end end DBCluster::Collection.new(batches) end |
#db_engine(name) ⇒ DBEngine
2852 2853 2854 2855 2856 2857 |
# File 'lib/aws-sdk-rds/resource.rb', line 2852 def db_engine(name) DBEngine.new( name: name, client: @client ) end |
#db_engine_version(engine_name, version) ⇒ DBEngineVersion
2862 2863 2864 2865 2866 2867 2868 |
# File 'lib/aws-sdk-rds/resource.rb', line 2862 def db_engine_version(engine_name, version) DBEngineVersion.new( engine_name: engine_name, version: version, client: @client ) end |
#db_engine_versions(options = {}) ⇒ DBEngineVersion::Collection
3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 |
# File 'lib/aws-sdk-rds/resource.rb', line 3001 def db_engine_versions( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_db_engine_versions() end resp.each_page do |page| batch = [] page.data.db_engine_versions.each do |d| batch << DBEngineVersion.new( engine_name: d.engine, version: d.engine_version, data: d, client: @client ) end y.yield(batch) end end DBEngineVersion::Collection.new(batches) end |
#db_instance(id) ⇒ DBInstance
3024 3025 3026 3027 3028 3029 |
# File 'lib/aws-sdk-rds/resource.rb', line 3024 def db_instance(id) DBInstance.new( id: id, client: @client ) end |
#db_instances(options = {}) ⇒ DBInstance::Collection
3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 |
# File 'lib/aws-sdk-rds/resource.rb', line 3079 def db_instances( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_db_instances() end resp.each_page do |page| batch = [] page.data.db_instances.each do |d| batch << DBInstance.new( id: d.db_instance_identifier, data: d, client: @client ) end y.yield(batch) end end DBInstance::Collection.new(batches) end |
#db_parameter_group(name) ⇒ DBParameterGroup
3101 3102 3103 3104 3105 3106 |
# File 'lib/aws-sdk-rds/resource.rb', line 3101 def db_parameter_group(name) DBParameterGroup.new( name: name, client: @client ) end |
#db_parameter_group_family(name) ⇒ DBParameterGroupFamily
3110 3111 3112 3113 3114 3115 |
# File 'lib/aws-sdk-rds/resource.rb', line 3110 def db_parameter_group_family(name) DBParameterGroupFamily.new( name: name, client: @client ) end |
#db_parameter_groups(options = {}) ⇒ DBParameterGroup::Collection
3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 |
# File 'lib/aws-sdk-rds/resource.rb', line 3141 def db_parameter_groups( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_db_parameter_groups() end resp.each_page do |page| batch = [] page.data.db_parameter_groups.each do |d| batch << DBParameterGroup.new( name: d.db_parameter_group_name, data: d, client: @client ) end y.yield(batch) end end DBParameterGroup::Collection.new(batches) end |
#db_security_group(name) ⇒ DBSecurityGroup
3163 3164 3165 3166 3167 3168 |
# File 'lib/aws-sdk-rds/resource.rb', line 3163 def db_security_group(name) DBSecurityGroup.new( name: name, client: @client ) end |
#db_security_groups(options = {}) ⇒ DBSecurityGroup::Collection
3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 |
# File 'lib/aws-sdk-rds/resource.rb', line 3187 def db_security_groups( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_db_security_groups() end resp.each_page do |page| batch = [] page.data.db_security_groups.each do |d| batch << DBSecurityGroup.new( name: d.db_security_group_name, data: d, client: @client ) end y.yield(batch) end end DBSecurityGroup::Collection.new(batches) end |
#db_snapshots(options = {}) ⇒ DBSnapshot::Collection
3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 |
# File 'lib/aws-sdk-rds/resource.rb', line 3320 def db_snapshots( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_db_snapshots() end resp.each_page do |page| batch = [] page.data.db_snapshots.each do |d| batch << DBSnapshot.new( instance_id: d.db_instance_identifier, snapshot_id: d.db_snapshot_identifier, data: d, client: @client ) end y.yield(batch) end end DBSnapshot::Collection.new(batches) end |
#db_subnet_group(name) ⇒ DBSubnetGroup
3343 3344 3345 3346 3347 3348 |
# File 'lib/aws-sdk-rds/resource.rb', line 3343 def db_subnet_group(name) DBSubnetGroup.new( name: name, client: @client ) end |
#db_subnet_groups(options = {}) ⇒ DBSubnetGroup::Collection
3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 |
# File 'lib/aws-sdk-rds/resource.rb', line 3367 def db_subnet_groups( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_db_subnet_groups() end resp.each_page do |page| batch = [] page.data.db_subnet_groups.each do |d| batch << DBSubnetGroup.new( name: d.db_subnet_group_name, data: d, client: @client ) end y.yield(batch) end end DBSubnetGroup::Collection.new(batches) end |
#event_category_map(source_type) ⇒ EventCategoryMap
3389 3390 3391 3392 3393 3394 |
# File 'lib/aws-sdk-rds/resource.rb', line 3389 def event_category_map(source_type) EventCategoryMap.new( source_type: source_type, client: @client ) end |
#event_category_maps(options = {}) ⇒ EventCategoryMap::Collection
3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 |
# File 'lib/aws-sdk-rds/resource.rb', line 3418 def event_category_maps( = {}) batches = Enumerator.new do |y| batch = [] resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_event_categories() end resp.data.event_categories_map_list.each do |e| batch << EventCategoryMap.new( source_type: e.source_type, data: e, client: @client ) end y.yield(batch) end EventCategoryMap::Collection.new(batches) end |
#event_subscription(name) ⇒ EventSubscription
3438 3439 3440 3441 3442 3443 |
# File 'lib/aws-sdk-rds/resource.rb', line 3438 def event_subscription(name) EventSubscription.new( name: name, client: @client ) end |
#event_subscriptions(options = {}) ⇒ EventSubscription::Collection
3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 |
# File 'lib/aws-sdk-rds/resource.rb', line 3463 def event_subscriptions( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_event_subscriptions() end resp.each_page do |page| batch = [] page.data.event_subscriptions_list.each do |e| batch << EventSubscription.new( name: e.cust_subscription_id, data: e, client: @client ) end y.yield(batch) end end EventSubscription::Collection.new(batches) end |
#events(options = {}) ⇒ Event::Collection
3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 |
# File 'lib/aws-sdk-rds/resource.rb', line 3564 def events( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_events() end resp.each_page do |page| batch = [] page.data.events.each do |e| batch << Event.new( source_id: e.source_identifier, date: e.date, data: e, client: @client ) end y.yield(batch) end end Event::Collection.new(batches) end |
#option_group(name) ⇒ OptionGroup
3587 3588 3589 3590 3591 3592 |
# File 'lib/aws-sdk-rds/resource.rb', line 3587 def option_group(name) OptionGroup.new( name: name, client: @client ) end |
#option_groups(options = {}) ⇒ OptionGroup::Collection
3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 |
# File 'lib/aws-sdk-rds/resource.rb', line 3649 def option_groups( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_option_groups() end resp.each_page do |page| batch = [] page.data.option_groups_list.each do |o| batch << OptionGroup.new( name: o.option_group_name, data: o, client: @client ) end y.yield(batch) end end OptionGroup::Collection.new(batches) end |
#pending_maintenance_action(target_arn, name) ⇒ PendingMaintenanceAction
3672 3673 3674 3675 3676 3677 3678 |
# File 'lib/aws-sdk-rds/resource.rb', line 3672 def pending_maintenance_action(target_arn, name) PendingMaintenanceAction.new( target_arn: target_arn, name: name, client: @client ) end |
#reserved_db_instance(id) ⇒ ReservedDBInstance
3682 3683 3684 3685 3686 3687 |
# File 'lib/aws-sdk-rds/resource.rb', line 3682 def reserved_db_instance(id) ReservedDBInstance.new( id: id, client: @client ) end |
#reserved_db_instances(options = {}) ⇒ ReservedDBInstance::Collection
3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 |
# File 'lib/aws-sdk-rds/resource.rb', line 3746 def reserved_db_instances( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_reserved_db_instances() end resp.each_page do |page| batch = [] page.data.reserved_db_instances.each do |r| batch << ReservedDBInstance.new( id: r.reserved_db_instance_id, data: r, client: @client ) end y.yield(batch) end end ReservedDBInstance::Collection.new(batches) end |
#reserved_db_instances_offering(id) ⇒ ReservedDBInstancesOffering
3768 3769 3770 3771 3772 3773 |
# File 'lib/aws-sdk-rds/resource.rb', line 3768 def reserved_db_instances_offering(id) ReservedDBInstancesOffering.new( id: id, client: @client ) end |
#reserved_db_instances_offerings(options = {}) ⇒ ReservedDBInstancesOffering::Collection
3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 |
# File 'lib/aws-sdk-rds/resource.rb', line 3825 def reserved_db_instances_offerings( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_reserved_db_instances_offerings() end resp.each_page do |page| batch = [] page.data.reserved_db_instances_offerings.each do |r| batch << ReservedDBInstancesOffering.new( id: r.reserved_db_instances_offering_id, data: r, client: @client ) end y.yield(batch) end end ReservedDBInstancesOffering::Collection.new(batches) end |
#resource_with_pending_maintenance_actions(arn) ⇒ ResourcePendingMaintenanceActionList
3847 3848 3849 3850 3851 3852 |
# File 'lib/aws-sdk-rds/resource.rb', line 3847 def resource_with_pending_maintenance_actions(arn) ResourcePendingMaintenanceActionList.new( arn: arn, client: @client ) end |
#resources_with_pending_maintenance_actions(options = {}) ⇒ ResourcePendingMaintenanceActionList::Collection
3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 |
# File 'lib/aws-sdk-rds/resource.rb', line 3882 def resources_with_pending_maintenance_actions( = {}) batches = Enumerator.new do |y| resp = Aws::Plugins::UserAgent.feature('resource') do @client.describe_pending_maintenance_actions() end resp.each_page do |page| batch = [] page.data.pending_maintenance_actions.each do |p| batch << ResourcePendingMaintenanceActionList.new( arn: p.resource_identifier, data: p, client: @client ) end y.yield(batch) end end ResourcePendingMaintenanceActionList::Collection.new(batches) end |