Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

389 řádky
25 KiB

  1. package rds
  2. // AvailabilityZone contains Availability Zone information
  3. // See http://goo.gl/GWF4zF for more details.
  4. type AvailabilityZone struct {
  5. Name string `xml:"Name"`
  6. ProvisionedIopsCapable bool `xml:"ProvisionedIopsCapable"`
  7. }
  8. // CharacterSet represents a character set used by a Database Engine
  9. // See http://goo.gl/0BXwFp for more details.
  10. type CharacterSet struct {
  11. Name string `xml:"CharacterSetName"`
  12. Description string `xml:"CharacterSetDescription"`
  13. }
  14. // DBEngineVersion describes a version of a Database Engine
  15. // See http://goo.gl/a5l6cv for more details.
  16. type DBEngineVersion struct {
  17. DBEngineDescription string `xml:"DBEngineDescription"` // The description of the database engine
  18. DBEngineVersionDescription string `xml:"DBEngineVersionDescription"` // The description of the database engine version
  19. DBParameterGroupFamily string `xml:"DBParameterGroupFamily"` // The name of the DB parameter group family for the database engine
  20. DefaultCharacterSet CharacterSet `xml:"DefaultCharacterSet"` // The default character set for new instances of this engine version, if the CharacterSetName parameter of the CreateDBInstance API is not specified
  21. Engine string `xml:"Engine"` // The name of the database engine
  22. EngineVersion string `xml:"EngineVersion"` // The version number of the database engine
  23. SupportedCharacterSets []CharacterSet `xml:"SupportedCharacterSets"` // A list of the character sets supported by this engine for the CharacterSetName parameter of the CreateDBInstance API
  24. }
  25. // DBInstance encapsulates an instance of a Database
  26. // See http://goo.gl/rQFpAe for more details.
  27. type DBInstance struct {
  28. AllocatedStorage int `xml:"AllocatedStorage"` // Specifies the allocated storage size specified in gigabytes.
  29. AutoMinorVersionUpgrade bool `xml:"AutoMinorVersionUpgrade"` // Indicates that minor version patches are applied automatically.
  30. AvailabilityZone string `xml:"AvailabilityZone"` // Specifies the name of the Availability Zone the DB instance is located in.
  31. BackupRetentionPeriod int `xml:"BackupRetentionPeriod"` // Specifies the number of days for which automatic DB snapshots are retained.
  32. CharacterSetName string `xml:"CharacterSetName"` // If present, specifies the name of the character set that this instance is associated with.
  33. DBInstanceClass string `xml:"DBInstanceClass"` // Contains the name of the compute and memory capacity class of the DB instance.
  34. DBInstanceIdentifier string `xml:"DBInstanceIdentifier"` // Contains a user-supplied database identifier. This is the unique key that identifies a DB instance.
  35. DBInstanceStatus string `xml:"DBInstanceStatus"` // Specifies the current state of this database.
  36. DBName string `xml:"DBName"` // The meaning of this parameter differs according to the database engine you use.
  37. DBParameterGroups []DBParameterGroupStatus `xml:"DBParameterGroups>DBParameterGroup"` // Provides the list of DB parameter groups applied to this DB instance.
  38. DBSecurityGroups []DBSecurityGroupMembership `xml:"DBSecurityGroups>DBSecurityGroup"` // Provides List of DB security group elements containing only DBSecurityGroup.Name and DBSecurityGroup.Status subelements.
  39. DBSubnetGroup DBSubnetGroup `xml:"DBSubnetGroup"` // Specifies information on the subnet group associated with the DB instance, including the name, description, and subnets in the subnet group.
  40. Endpoint Endpoint `xml:"Endpoint"` // Specifies the connection endpoint.
  41. Engine string `xml:"Engine"` // Provides the name of the database engine to be used for this DB instance.
  42. EngineVersion string `xml:"EngineVersion"` // Indicates the database engine version.
  43. InstanceCreateTime string `xml:"InstanceCreateTime"` // Provides the date and time the DB instance was created.
  44. Iops int `xml:"Iops"` // Specifies the Provisioned IOPS (I/O operations per second) value.
  45. LatestRestorableTime string `xml:"LatestRestorableTime"` // Specifies the latest time to which a database can be restored with point-in-time restore.
  46. LicenseModel string `xml:"LicenseModel"` // License model information for this DB instance.
  47. MasterUsername string `xml:"MasterUsername"` // Contains the master username for the DB instance.
  48. MultiAZ bool `xml:"MultiAZ"` // Specifies if the DB instance is a Multi-AZ deployment.
  49. OptionGroupMemberships []OptionGroupMembership `xml:"OptionGroupMemberships>OptionGroupMembership"` // Provides the list of option group memberships for this DB instance.
  50. PendingModifiedValues PendingModifiedValues `xml:"PendingModifiedValues"` // Specifies that changes to the DB instance are pending. This element is only included when changes are pending. Specific changes are identified by subelements.
  51. PreferredBackupWindow string `xml:"PreferredBackupWindow"` // Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod.
  52. PreferredMaintenanceWindow string `xml:"PreferredMaintenanceWindow"` // Specifies the weekly time range (in UTC) during which system maintenance can occur.
  53. PubliclyAccessible bool `xml:"PubliclyAccessible"` // Specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.
  54. ReadReplicaDBInstanceIdentifiers []string `xml:"ReadReplicaDBInstanceIdentifiers"` // Contains one or more identifiers of the read replicas associated with this DB instance.
  55. ReadReplicaSourceDBInstanceIdentifier string `xml:"ReadReplicaSourceDBInstanceIdentifier"` // Contains the identifier of the source DB instance if this DB instance is a read replica.
  56. SecondaryAvailabilityZone string `xml:"SecondaryAvailabilityZone"` // If present, specifies the name of the secondary Availability Zone for a DB instance with multi-AZ support.
  57. StatusInfos []DBInstanceStatusInfo `xml:"StatusInfos"` // The status of a read replica. If the instance is not a read replica, this will be blank.
  58. VpcSecurityGroups []VpcSecurityGroupMembership `xml:"VpcSecurityGroups"` // Provides List of VPC security group elements that the DB instance belongs to.
  59. }
  60. // DBInstanceStatusInfo provides a list of status information for a DB instance
  61. // See http://goo.gl/WuePdz for more details.
  62. type DBInstanceStatusInfo struct {
  63. Message string `xml:"Message"` // Details of the error if there is an error for the instance. If the instance is not in an error state, this value is blank.
  64. Normal bool `xml:"Normal"` // Boolean value that is true if the instance is operating normally, or false if the instance is in an error state.
  65. Status string `xml:"Status"` // Status of the DB instance. For a StatusType of read replica, the values can be replicating, error, stopped, or terminated.
  66. StatusType string `xml:"StatusType"` // This value is currently "read replication."
  67. }
  68. // DBParameterGroup contains the result of a successful invocation of the CreateDBParameterGroup action
  69. // See http://goo.gl/a8BCTy for more details.
  70. type DBParameterGroup struct {
  71. Name string `xml:"DBParameterGroupName"`
  72. Description string `xml:"Description"`
  73. Family string `xml:"DBParameterGroupFamily"`
  74. }
  75. // DBParameterGroupStatus represents the status of the DB parameter group
  76. // See http://goo.gl/X318cI for more details.
  77. type DBParameterGroupStatus struct {
  78. Name string `xml:"DBParameterGroupName"`
  79. Status string `xml:"ParameterApplyStatus"`
  80. }
  81. // DBSecurityGroup represents a RDS DB Security Group which controls network access to a DB instance that is not inside a VPC
  82. // See http://goo.gl/JF5oJy for more details.
  83. type DBSecurityGroup struct {
  84. Name string `xml:"DBSecurityGroupName"`
  85. Description string `xml:"DBSecurityGroupDescription"`
  86. EC2SecurityGroups []EC2SecurityGroup `xml:"EC2SecurityGroups"`
  87. IPRanges []IPRange `xml:"IPRanges"`
  88. OwnerId string `xml:"OwnerId"`
  89. VpcId string `xml:"VpcId"`
  90. }
  91. // DBSecurityGroupMembership represents a DBSecurityGroup which a Database Instance belongs to
  92. // See http://goo.gl/QjTK0b for more details.
  93. type DBSecurityGroupMembership struct {
  94. Name string `xml:"DBSecurityGroupName"`
  95. Status string `xml:"Status"`
  96. }
  97. // DBSnapshot represents a snapshot of a Database (a backup of the Instance data)
  98. // See http://goo.gl/wkf0L9 for more details.
  99. type DBSnapshot struct {
  100. AllocatedStorage int `xml:"AllocatedStorage"` // Specifies the allocated storage size in gigabytes (GB)
  101. AvailabilityZone string `xml:"AvailabilityZone"`
  102. DBInstanceIdentifier string `xml:"DBInstanceIdentifier"`
  103. DBSnapshotIdentifier string `xml:"DBSnapshotIdentifier"`
  104. Engine string `xml:"Engine"`
  105. EngineVersion string `xml:"EngineVersion"`
  106. InstanceCreateTime string `xml:"InstanceCreateTime"`
  107. Iops int `xml:"Iops"`
  108. LicenseModel string `xml:"LicenseModel"`
  109. MasterUsername string `xml:"MasterUsername"`
  110. OptionGroupName string `xml:"OptionGroupName"`
  111. PercentProgress int `xml:"PercentProgress"`
  112. Port int `xml:"Port"`
  113. SnapshotCreateTime string `xml:"SnapshotCreateTime"`
  114. SnapshotType string `xml:"SnapshotType"`
  115. SourceRegion string `xml:"SourceRegion"`
  116. Status string `xml:"Status"`
  117. VpcId string `xml:"VpcId"`
  118. }
  119. // DBSubnetGroup is a collection of subnets that is designated for an RDS DB Instance in a VPC
  120. // See http://goo.gl/8vMPkE for more details.
  121. type DBSubnetGroup struct {
  122. Name string `xml:"DBSubnetGroupName"`
  123. Description string `xml:"DBSubnetGroupDescription"`
  124. Status string `xml:"SubnetGroupStatus"`
  125. Subnets []Subnet `xml:"Subnets>Subnet"`
  126. VpcId string `xml:"VpcId"`
  127. }
  128. // EC2SecurityGroup a standard EC2 Security Group which can be assigned to a DB Instance
  129. // See http://goo.gl/AWavZ2 for more details.
  130. type EC2SecurityGroup struct {
  131. Id string `xml:"EC2SecurityGroupId"`
  132. Name string `xml:"EC2SecurityGroupName"`
  133. OwnerId string `xml:"EC2SecurityGroupOwnerId"` // The AWS ID of the owner of the EC2 security group
  134. Status string `xml:"Status"` // Status can be "authorizing", "authorized", "revoking", and "revoked"
  135. }
  136. // Endpoint encapsulates the connection endpoint for a DB Instance
  137. // See http://goo.gl/jefsJ4 for more details.
  138. type Endpoint struct {
  139. Address string `xml:"Address"`
  140. Port int `xml:"Port"`
  141. }
  142. // EngineDefaults describes the system parameter information for a given database engine
  143. // See http://goo.gl/XFy7Wv for more details.
  144. type EngineDefaults struct {
  145. DBParameterGroupFamily string `xml:"DBParameterGroupFamily"`
  146. Marker string `xml:"Marker"`
  147. Parameters []Parameter `xml:"Parameters"`
  148. }
  149. // Event encapsulates events related to DB instances, DB security groups, DB snapshots, and DB parameter groups
  150. // See http://goo.gl/6fUQow for more details.
  151. type Event struct {
  152. Date string `xml:"Date"` // Specifies the date and time of the event
  153. EventCategories []string `xml:"EventCategories"` // Specifies the category for the event
  154. Message string `xml:"Message"` // Provides the text of this event
  155. SourceIdentifier string `xml:"SourceIdentifier"` // Provides the identifier for the source of the event
  156. SourceType string `xml:"SourceType"` // Valid Values: db-instance | db-parameter-group | db-security-group | db-snapshot
  157. }
  158. // EventCategoriesMap encapsulates event categories for the specified source type
  159. // See http://goo.gl/9VY3aS for more details.
  160. type EventCategoriesMap struct {
  161. EventCategories []string `xml:"EventCategories"`
  162. SourceType string `xml:"SourceType"`
  163. }
  164. // EventSubscription describes a subscription, for a customer account, to a series of events
  165. // See http://goo.gl/zgNdXw for more details.
  166. type EventSubscription struct {
  167. CustSubscriptionId string `xml:"CustSubscriptionId"` // The RDS event notification subscription Id
  168. CustomerAwsId string `xml:"CustomerAwsId"` // The AWS customer account associated with the RDS event notification subscription
  169. Enabled bool `xml:"Enabled"` // True indicates the subscription is enabled
  170. EventCategoriesList []string `xml:"EventCategoriesList"` // A list of event categories for the RDS event notification subscription
  171. SnsTopicArn string `xml:"SnsTopicArn"` // The topic ARN of the RDS event notification subscription
  172. SourceIdsList []string `xml:"SourceIdsList"` // A list of source Ids for the RDS event notification subscription
  173. SourceType string `xml:"SourceType"` // The source type for the RDS event notification subscription
  174. Status string `xml:"Status"` // Can be one of the following: creating | modifying | deleting | active | no-permission | topic-not-exist
  175. SubscriptionCreationTime string `xml:"SubscriptionCreationTime"` // The time the RDS event notification subscription was created
  176. }
  177. // IPRange encapsulates an IP range (and its status) used by a DB Security Group
  178. // See http://goo.gl/VfntNm for more details.
  179. type IPRange struct {
  180. CIDRIP string `xml:"CIDRIP"`
  181. Status string `xml:"Status"` // Specifies the status of the IP range. Status can be "authorizing", "authorized", "revoking", and "revoked".
  182. }
  183. // Option describes a feature available for an RDS instance along with any settings applicable to it
  184. // See http://goo.gl/8DYY0J for more details.
  185. type Option struct {
  186. Name string `xml:"OptionName"`
  187. Description string `xml:"OptionDescription"`
  188. Settings []OptionSetting `xml:"OptionSettings"`
  189. Permanent bool `xml:"Permanent"`
  190. Persistent bool `xml:"Persistent"`
  191. Port int `xml:"Port"`
  192. DBSecurityGroupMemberships []DBSecurityGroupMembership `xml:"DBSecurityGroupMemberships"` // If the option requires access to a port, then this DB security group allows access to the port
  193. VpcSecurityGroupMemberships []VpcSecurityGroupMembership `xml:"VpcSecurityGroupMemberships"` // If the option requires access to a port, then this VPC security group allows access to the port
  194. }
  195. // OptionConfiguration is a list of all available options
  196. // See http://goo.gl/kkEzw1 for more details.
  197. type OptionConfiguration struct {
  198. OptionName string `xml:"OptionName"`
  199. OptionSettings []OptionSetting `xml:"OptionSettings"`
  200. Port int `xml:"Port"`
  201. DBSecurityGroupMemberships []string `xml:"DBSecurityGroupMemberships"`
  202. VpcSecurityGroupMemberships []string `xml:"VpcSecurityGroupMemberships"`
  203. }
  204. // OptionGroup represents a set of features, called options, that are available for a particular Amazon RDS DB instance
  205. // See http://goo.gl/NedBJl for more details.
  206. type OptionGroup struct {
  207. Name string `xml:"OptionGroupName"`
  208. Description string `xml:"OptionGroupDescription"`
  209. VpcId string `xml:"VpcId"`
  210. AllowsVpcAndNonVpcInstanceMemberships bool `xml:"AllowsVpcAndNonVpcInstanceMemberships"`
  211. EngineName string `xml:"EngineName"`
  212. MajorEngineVersion string `xml:"MajorEngineVersion"`
  213. Options []Option `xml:"Options"`
  214. }
  215. // OptionGroupMembership provides information on the option groups the DB instance is a member of
  216. // See http://goo.gl/XBW6j4 for more details.
  217. type OptionGroupMembership struct {
  218. Name string `xml:"OptionGroupName"` // The name of the option group that the instance belongs to
  219. Status string `xml:"Status"` // The status of the option group membership, e.g. in-sync, pending, pending-maintenance, applying
  220. }
  221. // OptionGroupOption represents an option within an option group
  222. // See http://goo.gl/jQYL0U for more details.
  223. type OptionGroupOption struct {
  224. DefaultPort int `xml:"DefaultPort"`
  225. Description string `xml:"Description"`
  226. EngineName string `xml:"EngineName"`
  227. MajorEngineVersion string `xml:"MajorEngineVersion"`
  228. MinimumRequiredMinorEngineVersion string `xml:"MinimumRequiredMinorEngineVersion"`
  229. Name string `xml:"Name"`
  230. OptionGroupOptionSettings []OptionGroupOptionSetting `xml:"OptionGroupOptionSettings"`
  231. OptionsDependedOn string `xml:"OptionsDependedOn"`
  232. Permanent bool `xml:"Permanent"`
  233. Persistent bool `xml:"Persistent"`
  234. PortRequired bool `xml:"PortRequired"`
  235. }
  236. // OptionGroupOptionSetting are used to display settings available for each option with their default values and other information
  237. // See http://goo.gl/9aIwNX for more details.
  238. type OptionGroupOptionSetting struct {
  239. AllowedValues string `xml:"AllowedValues"`
  240. ApplyType string `xml:"ApplyType"`
  241. DefaultValue string `xml:"DefaultValue"`
  242. IsModifiable bool `xml:"IsModifiable"`
  243. SettingDescription string `xml:"SettingDescription"`
  244. SettingName string `xml:"SettingName"`
  245. }
  246. // OptionSetting encapsulates modifiable settings for a particular option (a feature available for a Database Instance)
  247. // See http://goo.gl/VjOJmW for more details.
  248. type OptionSetting struct {
  249. Name string `xml:"Name"`
  250. Value string `xml:"Value"`
  251. Description string `xml:"Description"`
  252. AllowedValues string `xml:"AllowedValues"`
  253. ApplyType string `xml:"ApplyType"`
  254. DataType string `xml:"DataType"`
  255. DefaultValue string `xml:"DefaultValue"`
  256. IsCollection bool `xml:"IsCollection"`
  257. IsModifiable bool `xml:"IsModifiable"`
  258. }
  259. // OrderableDBInstanceOption contains a list of available options for a DB instance
  260. // See http://goo.gl/FVPeVC for more details.
  261. type OrderableDBInstanceOption struct {
  262. AvailabilityZones []AvailabilityZone `xml:"AvailabilityZones"`
  263. DBInstanceClass string `xml:"DBInstanceClass"`
  264. Engine string `xml:"Engine"`
  265. EngineVersion string `xml:"EngineVersion"`
  266. LicenseModel string `xml:"LicenseModel"`
  267. MultiAZCapable bool `xml:"MultiAZCapable"`
  268. ReadReplicaCapable bool `xml:"ReadReplicaCapable"`
  269. Vpc bool `xml:"Vpc"`
  270. }
  271. // Parameter is used as a request parameter in various actions
  272. // See http://goo.gl/cJmvVT for more details.
  273. type Parameter struct {
  274. AllowedValues string `xml:"AllowedValues"`
  275. ApplyMethod string `xml:"ApplyMethod"` // Valid Values: immediate | pending-reboot
  276. ApplyType string `xml:"ApplyType"`
  277. DataType string `xml:"DataType"`
  278. Description string `xml:"Description"`
  279. IsModifiable bool `xml:"IsModifiable"`
  280. MinimumEngineVersion string `xml:"MinimumEngineVersion"`
  281. ParameterName string `xml:"ParameterName"`
  282. ParameterValue string `xml:"ParameterValue"`
  283. Source string `xml:"Source"`
  284. }
  285. // PendingModifiedValues represents values modified in a ModifyDBInstance action
  286. // See http://goo.gl/UoXhLH for more details.
  287. type PendingModifiedValues struct {
  288. AllocatedStorage int `xml:"AllocatedStorage"`
  289. BackupRetentionPeriod int `xml:"BackupRetentionPeriod"`
  290. DBInstanceClass string `xml:"DBInstanceClass"`
  291. DBInstanceIdentifier string `xml:"DBInstanceIdentifier"`
  292. EngineVersion string `xml:"EngineVersion"`
  293. Iops int `xml:"Iops"`
  294. MasterUserPassword string `xml:"MasterUserPassword"`
  295. MultiAZ bool `xml:"MultiAZ"`
  296. Port string `xml:"Port"`
  297. }
  298. // RecurringCharge describes an amount that will be charged on a recurring basis with a given frequency
  299. // See http://goo.gl/3GDplh for more details.
  300. type RecurringCharge struct {
  301. Amount float64 `xml:"RecurringChargeAmount"`
  302. Frequency string `xml:"RecurringChargeFrequency"`
  303. }
  304. // ReservedDBInstance encapsulates a reserved Database Instance
  305. // See http://goo.gl/mjLhNI for more details.
  306. type ReservedDBInstance struct {
  307. CurrencyCode string `xml:"CurrencyCode"`
  308. DBInstanceClass string `xml:"DBInstanceClass"`
  309. DBInstanceCount int `xml:"DBInstanceCount"`
  310. Duration int `xml:"Duration"`
  311. FixedPrice float64 `xml:"FixedPrice"`
  312. MultiAZ bool `xml:"MultiAZ"`
  313. OfferingType string `xml:"OfferingType"`
  314. ProductDescription string `xml:"ProductDescription"`
  315. RecurringCharges []RecurringCharge `xml:"RecurringCharges"`
  316. ReservedDBInstanceId string `xml:"ReservedDBInstanceId"`
  317. ReservedDBInstancesOfferingId string `xml:"ReservedDBInstancesOfferingId"`
  318. StartTime string `xml:"StartTime"`
  319. State string `xml:"State"`
  320. UsagePrice float64 `xml:"UsagePrice"`
  321. }
  322. // ReservedDBInstancesOffering describes an available Reserved DB instance offering which can be purchased
  323. // See http://goo.gl/h5s8e6 for more details.
  324. type ReservedDBInstancesOffering struct {
  325. CurrencyCode string `xml:"CurrencyCode"`
  326. DBInstanceClass string `xml:"DBInstanceClass"`
  327. Duration int `xml:"Duration"`
  328. FixedPrice float64 `xml:"FixedPrice"`
  329. MultiAZ bool `xml:"MultiAZ"`
  330. OfferingType string `xml:"OfferingType"`
  331. ProductDescription string `xml:"ProductDescription"`
  332. RecurringCharges []RecurringCharge `xml:"RecurringCharges"`
  333. ReservedDBInstancesOfferingId string `xml:"ReservedDBInstancesOfferingId"`
  334. UsagePrice float64 `xml:"UsagePrice"`
  335. }
  336. // Subnet describes an EC2 subnet, along with its status and location
  337. // See http://goo.gl/Nc8ymd for more details.
  338. type Subnet struct {
  339. Id string `xml:"SubnetIdentifier"`
  340. Status string `xml:"SubnetStatus"`
  341. AvailabilityZone AvailabilityZone `xml:"SubnetAvailabilityZone"`
  342. }
  343. // Tag represents metadata assigned to an Amazon RDS resource consisting of a key-value pair
  344. // See http://goo.gl/YnXRrE for more details.
  345. type Tag struct {
  346. Key string `xml:"Key"`
  347. Value string `xml:"Value"`
  348. }
  349. // VpcSecurityGroupMembership describes a standard VPC Security Group which has been assigned to a DB Instance located in a VPC
  350. // See http://goo.gl/UIvmlS for more details.
  351. type VpcSecurityGroupMembership struct {
  352. Id string `xml:"VpcSecurityGroupId"`
  353. Status string `xml:"Status"`
  354. }