service.go 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package rds
  3. import (
  4. "github.com/aws/aws-sdk-go/aws"
  5. "github.com/aws/aws-sdk-go/aws/defaults"
  6. "github.com/aws/aws-sdk-go/aws/request"
  7. "github.com/aws/aws-sdk-go/aws/service"
  8. "github.com/aws/aws-sdk-go/aws/service/serviceinfo"
  9. "github.com/aws/aws-sdk-go/internal/protocol/query"
  10. "github.com/aws/aws-sdk-go/internal/signer/v4"
  11. )
  12. // Amazon Relational Database Service (Amazon RDS) is a web service that makes
  13. // it easier to set up, operate, and scale a relational database in the cloud.
  14. // It provides cost-efficient, resizeable capacity for an industry-standard
  15. // relational database and manages common database administration tasks, freeing
  16. // up developers to focus on what makes their applications and businesses unique.
  17. //
  18. // Amazon RDS gives you access to the capabilities of a MySQL, PostgreSQL,
  19. // Microsoft SQL Server, Oracle, or Aurora database server. This means the code,
  20. // applications, and tools you already use today with your existing databases
  21. // work with Amazon RDS without modification. Amazon RDS automatically backs
  22. // up your database and maintains the database software that powers your DB
  23. // instance. Amazon RDS is flexible: you can scale your database instance's
  24. // compute resources and storage capacity to meet your application's demand.
  25. // As with all Amazon Web Services, there are no up-front investments, and you
  26. // pay only for the resources you use.
  27. //
  28. // This is an interface reference for Amazon RDS. It contains documentation
  29. // for a programming or command line interface you can use to manage Amazon
  30. // RDS. Note that Amazon RDS is asynchronous, which means that some interfaces
  31. // might require techniques such as polling or callback functions to determine
  32. // when a command has been applied. In this reference, the parameter descriptions
  33. // indicate whether a command is applied immediately, on the next instance reboot,
  34. // or during the maintenance window. For a summary of the Amazon RDS interfaces,
  35. // go to Available RDS Interfaces (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html#Welcome.Interfaces).
  36. type RDS struct {
  37. *service.Service
  38. }
  39. // Used for custom service initialization logic
  40. var initService func(*service.Service)
  41. // Used for custom request initialization logic
  42. var initRequest func(*request.Request)
  43. // New returns a new RDS client.
  44. func New(config *aws.Config) *RDS {
  45. service := &service.Service{
  46. ServiceInfo: serviceinfo.ServiceInfo{
  47. Config: defaults.DefaultConfig.Merge(config),
  48. ServiceName: "rds",
  49. APIVersion: "2014-10-31",
  50. },
  51. }
  52. service.Initialize()
  53. // Handlers
  54. service.Handlers.Sign.PushBack(v4.Sign)
  55. service.Handlers.Build.PushBack(query.Build)
  56. service.Handlers.Unmarshal.PushBack(query.Unmarshal)
  57. service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
  58. service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
  59. // Run custom service initialization if present
  60. if initService != nil {
  61. initService(service)
  62. }
  63. return &RDS{service}
  64. }
  65. // newRequest creates a new request for a RDS operation and runs any
  66. // custom request initialization.
  67. func (c *RDS) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  68. req := c.NewRequest(op, params, data)
  69. // Run custom request initialization if present
  70. if initRequest != nil {
  71. initRequest(req)
  72. }
  73. return req
  74. }