Class: RightAws::RdsInterface::DescribeDbInstancesParser
- Inherits:
-
RightAws::RightAWSParser
- Object
- RightAws::RightAWSParser
- RightAws::RdsInterface::DescribeDbInstancesParser
- Defined in:
- lib/rds/right_rds_interface.rb
Overview
DB Instances
Constant Summary
Constants inherited from RightAws::RightAWSParser
RightAws::RightAWSParser::DEFAULT_XML_LIBRARY
Instance Attribute Summary
Attributes inherited from RightAws::RightAWSParser
#full_tag_name, #result, #tag, #xml_lib, #xmlpath
Instance Method Summary collapse
Methods inherited from RightAws::RightAWSParser
#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagtext, #text, xml_lib, xml_lib=
Constructor Details
This class inherits a constructor from RightAws::RightAWSParser
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RightAws::RightAWSParser
Instance Method Details
#reset ⇒ Object
:nodoc:
1012 1013 1014 |
# File 'lib/rds/right_rds_interface.rb', line 1012 def reset @result = { :db_instances => [] } end |
#tagend(name) ⇒ Object
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 |
# File 'lib/rds/right_rds_interface.rb', line 1023 def tagend(name) case name when 'Marker' then @result[:marker] = @text when 'MaxRecords' then @result[:max_records] = @text.to_i when 'DBInstanceIdentifier' then @item[:aws_id] = @text when 'InstanceCreateTime' then @item[:create_time] = @text when 'Engine' then @item[:engine] = @text when 'DBInstanceStatus' then @item[:status] = @text when 'Address' then @item[:endpoint_address] = @text when 'Port' then @item[:endpoint_port] = @text.to_i when 'MasterUsername' then @item[:master_username] = @text when 'AvailabilityZone' then @item[:availability_zone] = @text when 'LatestRestorableTime' then @item[:latest_restorable_time] = @text when 'ReadReplicaSourceDBInstanceIdentifier' then @item[:read_replica_source_db_instance_identifier] = @text when 'ReadReplicaDBInstanceIdentifier' then @item[:read_replica_db_instance_identifiers] << @text when 'DBSecurityGroupName' then @db_security_group[:name] = @text when 'Status' then @db_security_group[:status] = @text when 'DBParameterGroupName' then @db_parameter_group[:name] = @text when 'ParameterApplyStatus' then @db_parameter_group[:status] = @text when 'DBSecurityGroup' then @item[:db_security_groups] << @db_security_group when 'DBParameterGroup', 'DBParameterGroupStatus' then @item[:db_parameter_group] = @db_parameter_group when 'DBInstance' then @result[:db_instances] << @item else case full_tag_name when %r{DBInstance/DBInstanceClass$} then @item[:instance_class] = @text when %r{DBInstance/AllocatedStorage$} then @item[:allocated_storage] = @text.to_i when %r{DBInstance/MultiAZ$} then @item[:multi_az] = (@text == 'true') when %r{DBInstance/BackupRetentionPeriod$} then @item[:backup_retention_period] = @text.to_i when %r{DBInstance/PreferredMaintenanceWindow$} then @item[:preferred_maintenance_window] = @text when %r{DBInstance/PreferredBackupWindow$} then @item[:preferred_backup_window] = @text when %r{DBInstance/EngineVersion$} then @item[:engine_version] = @text when %r{DBInstance/AutoMinorVersionUpgrade$} then @item[:auto_minor_version_upgrade] = (@text == 'true') when %r{DBInstance/AllowMajorVersionUpgrade$} then @item[:allow_major_version_upgrade] = (@text == 'true') when %r{PendingModifiedValues/DBInstanceClass$} then @item[:pending_modified_values][:instance_class] = @text when %r{PendingModifiedValues/AllocatedStorage$} then @item[:pending_modified_values][:allocated_storage] = @text.to_i when %r{PendingModifiedValues/MasterUserPassword$} then @item[:pending_modified_values][:master_user_password] = @text when %r{PendingModifiedValues/MultiAZ$} then @item[:pending_modified_values][:multi_az] = (@text == 'true') when %r{PendingModifiedValues/BackupRetentionPeriod$} then @item[:pending_modified_values][:backup_retention_period] = @text.to_i when %r{PendingModifiedValues/PreferredMaintenanceWindow$} then @item[:pending_modified_values][:preferred_maintenance_window] = @text when %r{PendingModifiedValues/PreferredBackupWindow$} then @item[:pending_modified_values][:preferred_backup_window] = @text when %r{PendingModifiedValues/EngineVersion$} then @item[:pending_modified_values][:engine_version] = @text when %r{PendingModifiedValues/AutoMinorVersionUpgrade$} then @item[:pending_modified_values][:auto_minor_version_upgrade] = (@text == 'true') when %r{PendingModifiedValues/AllowMajorVersionUpgrade$} then @item[:pending_modified_values][:allow_major_version_upgrade] = (@text == 'true') end end end |
#tagstart(name, attributes) ⇒ Object
1015 1016 1017 1018 1019 1020 1021 1022 |
# File 'lib/rds/right_rds_interface.rb', line 1015 def (name, attributes) case name when 'DBInstance' then @item = { :db_security_groups => [], :pending_modified_values => {}, :read_replica_db_instance_identifiers => [] } when 'DBSecurityGroup' then @db_security_group = {} when 'DBParameterGroup', 'DBParameterGroupStatus' then @db_parameter_group = {} end end |