mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
236 lines
6.6 KiB
Ruby
236 lines
6.6 KiB
Ruby
class AWS
|
|
|
|
module RDS
|
|
|
|
module Formats
|
|
|
|
BASIC = {
|
|
'ResponseMetadata' => {'RequestId' => String}
|
|
}
|
|
|
|
DB_PARAMETER_GROUP = {
|
|
'DBParameterGroupFamily' => String,
|
|
'DBParameterGroupName'=> String,
|
|
'Description'=> String
|
|
}
|
|
CREATE_DB_PARAMETER_GROUP = {
|
|
'ResponseMetadata' => {'RequestId' => String},
|
|
'CreateDBParameterGroupResult' => {
|
|
'DBParameterGroup' => DB_PARAMETER_GROUP
|
|
}
|
|
}
|
|
|
|
DB_SECURITY_GROUP = {
|
|
'DBSecurityGroupDescription' => String,
|
|
'DBSecurityGroupName' => String,
|
|
'EC2SecurityGroups' => [Fog::Nullable::Hash],
|
|
'IPRanges' => [Fog::Nullable::Hash],
|
|
'OwnerId' => Fog::Nullable::String
|
|
}
|
|
|
|
CREATE_DB_SECURITY_GROUP = BASIC.merge({
|
|
'CreateDBSecurityGroupResult' => {
|
|
'DBSecurityGroup' => DB_SECURITY_GROUP
|
|
}
|
|
})
|
|
|
|
AUTHORIZE_DB_SECURITY_GROUP = BASIC.merge({
|
|
'AuthorizeDBSecurityGroupIngressResult' => {
|
|
'DBSecurityGroup' => DB_SECURITY_GROUP
|
|
}
|
|
})
|
|
|
|
REVOKE_DB_SECURITY_GROUP = BASIC.merge({
|
|
'RevokeDBSecurityGroupIngressResult' => {
|
|
'DBSecurityGroup' => DB_SECURITY_GROUP
|
|
}
|
|
})
|
|
|
|
DESCRIBE_DB_SECURITY_GROUP = BASIC.merge({
|
|
'DescribeDBSecurityGroupsResult' => {
|
|
'DBSecurityGroups' => [DB_SECURITY_GROUP]
|
|
}
|
|
})
|
|
|
|
DB_SUBNET_GROUP = {
|
|
'DBSubnetGroupName' => String,
|
|
'DBSubnetGroupDescription' => String,
|
|
'SubnetGroupStatus' => String,
|
|
'VpcId' => String,
|
|
'Subnets' => [String]
|
|
}
|
|
|
|
CREATE_DB_SUBNET_GROUP = BASIC.merge({
|
|
'CreateDBSubnetGroupResult' => {
|
|
'DBSubnetGroup' => DB_SUBNET_GROUP
|
|
}
|
|
})
|
|
|
|
DESCRIBE_DB_SUBNET_GROUPS = BASIC.merge({
|
|
'DescribeDBSubnetGroupsResult' => {
|
|
'DBSubnetGroups' => [DB_SUBNET_GROUP]
|
|
}
|
|
})
|
|
|
|
DESCRIBE_DB_PARAMETER_GROUP = {
|
|
'ResponseMetadata' => {'RequestId' => String},
|
|
'DescribeDBParameterGroupsResult' =>{
|
|
'DBParameterGroups' => [DB_PARAMETER_GROUP]
|
|
}
|
|
}
|
|
|
|
MODIFY_PARAMETER_GROUP = BASIC.merge({
|
|
'ModifyDBParameterGroupResult' => {
|
|
'DBParameterGroupName' => String
|
|
}
|
|
})
|
|
|
|
|
|
DB_PARAMETER = {
|
|
'ParameterValue' => Fog::Nullable::String,
|
|
'DataType' => String,
|
|
'AllowedValues' => Fog::Nullable::String,
|
|
'Source' => String,
|
|
'IsModifiable' => Fog::Boolean,
|
|
'Description' => String,
|
|
'ParameterName' => String,
|
|
'ApplyType' => String
|
|
}
|
|
|
|
DESCRIBE_DB_PARAMETERS = BASIC.merge({
|
|
'DescribeDBParametersResult' => {
|
|
'Marker' => Fog::Nullable::String,
|
|
'Parameters' => [DB_PARAMETER]
|
|
}
|
|
|
|
})
|
|
|
|
SNAPSHOT={
|
|
'AllocatedStorage' => Integer,
|
|
'AvailabilityZone' => String,
|
|
'DBInstanceIdentifier' => String,
|
|
'DBSnapshotIdentifier' => String,
|
|
'EngineVersion' => String,
|
|
'Engine' => String,
|
|
'InstanceCreateTime' => Time,
|
|
'MasterUsername' => String,
|
|
'Port' => Integer,
|
|
'SnapshotCreateTime' => Fog::Nullable::Time,
|
|
'Status' => String,
|
|
'SnapshotType' => String
|
|
}
|
|
INSTANCE = {
|
|
'AllocatedStorage' => Integer,
|
|
'AutoMinorVersionUpgrade' => Fog::Boolean,
|
|
'AvailabilityZone' => Fog::Nullable::String,
|
|
'BackupRetentionPeriod' => Integer,
|
|
'DBInstanceClass' => String,
|
|
'DBInstanceIdentifier' => String,
|
|
'DBInstanceStatus' => String,
|
|
'DBName' => Fog::Nullable::String,
|
|
'DBParameterGroups' => [{
|
|
'ParameterApplyStatus' => String,
|
|
'DBParameterGroupName' => String
|
|
}],
|
|
'DBSecurityGroups' => [{
|
|
'Status' => String,
|
|
'DBSecurityGroupName' => String
|
|
}],
|
|
'DBSubnetGroupName' => Fog::Nullable::String,
|
|
'Endpoint' => {
|
|
'Address' => Fog::Nullable::String,
|
|
'Port' => Fog::Nullable::Integer
|
|
},
|
|
'Engine' => String,
|
|
'EngineVersion' => String,
|
|
'InstanceCreateTime' => Fog::Nullable::Time,
|
|
'LatestRestorableTime' => Fog::Nullable::Time,
|
|
'LicenseModel' => String,
|
|
'MasterUsername' => String,
|
|
'MultiAZ' => Fog::Boolean,
|
|
'PendingModifiedValues' => {
|
|
'BackupRetentionPeriod' => Fog::Nullable::Integer,
|
|
'DBInstanceClass' => Fog::Nullable::String,
|
|
'EngineVersion' => Fog::Nullable::String,
|
|
'MasterUserPassword' => Fog::Nullable::String,
|
|
'MultiAZ' => Fog::Nullable::String,
|
|
'AllocatedStorage' => Fog::Nullable::Integer,
|
|
'Port' => Fog::Nullable::Integer
|
|
},
|
|
'PreferredBackupWindow'=> String,
|
|
'PreferredMaintenanceWindow'=> String,
|
|
'ReadReplicaDBInstanceIdentifiers'=> [Fog::Nullable::String]
|
|
}
|
|
|
|
REPLICA_INSTANCE = INSTANCE.merge({
|
|
'BackupRetentionPeriod' => Fog::Nullable::String,
|
|
'PreferredBackupWindow' => Fog::Nullable::String,
|
|
'ReadReplicaSourceDBInstanceIdentifier'=> String
|
|
})
|
|
|
|
CREATE_DB_INSTANCE = BASIC.merge({
|
|
'CreateDBInstanceResult' => {
|
|
'DBInstance' => INSTANCE
|
|
}
|
|
})
|
|
|
|
DESCRIBE_DB_INSTANCES = BASIC.merge({
|
|
'DescribeDBInstancesResult' => {
|
|
'Marker' => Fog::Nullable::String,
|
|
'DBInstances' => [INSTANCE]
|
|
}
|
|
})
|
|
|
|
MODIFY_DB_INSTANCE = BASIC.merge({
|
|
'ModifyDBInstanceResult' => {
|
|
'DBInstance' => INSTANCE
|
|
}
|
|
})
|
|
|
|
DELETE_DB_INSTANCE = BASIC.merge({
|
|
'DeleteDBInstanceResult' => {
|
|
'DBInstance' => INSTANCE
|
|
}
|
|
})
|
|
|
|
REBOOT_DB_INSTANCE = BASIC.merge({
|
|
'RebootDBInstanceResult' => {
|
|
'DBInstance' => INSTANCE
|
|
}
|
|
})
|
|
|
|
CREATE_READ_REPLICA = BASIC.merge({
|
|
'CreateDBInstanceReadReplicaResult' => {
|
|
'DBInstance' => REPLICA_INSTANCE
|
|
}
|
|
})
|
|
|
|
CREATE_DB_SNAPSHOT = BASIC.merge({
|
|
'CreateDBSnapshotResult' => {
|
|
'DBSnapshot' => SNAPSHOT
|
|
}
|
|
})
|
|
|
|
DESCRIBE_DB_SNAPSHOTS = BASIC.merge({
|
|
'DescribeDBSnapshotsResult' => {
|
|
'Marker' => Fog::Nullable::String,
|
|
'DBSnapshots' => [SNAPSHOT]
|
|
}
|
|
})
|
|
DELETE_DB_SNAPSHOT = BASIC.merge({
|
|
'DeleteDBSnapshotResult' => {
|
|
'DBSnapshot' => SNAPSHOT
|
|
}
|
|
})
|
|
|
|
LIST_TAGS_FOR_RESOURCE = {
|
|
'ListTagsForResourceResult' => {
|
|
'TagList' => Fog::Nullable::Hash
|
|
}
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|