service.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package redshift
  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. // Overview This is an interface reference for Amazon Redshift. It contains
  13. // documentation for one of the programming or command line interfaces you can
  14. // use to manage Amazon Redshift clusters. Note that Amazon Redshift is asynchronous,
  15. // which means that some interfaces may require techniques, such as polling
  16. // or asynchronous callback handlers, to determine when a command has been applied.
  17. // In this reference, the parameter descriptions indicate whether a change is
  18. // applied immediately, on the next instance reboot, or during the next maintenance
  19. // window. For a summary of the Amazon Redshift cluster management interfaces,
  20. // go to Using the Amazon Redshift Management Interfaces (http://docs.aws.amazon.com/redshift/latest/mgmt/using-aws-sdk.html).
  21. //
  22. // Amazon Redshift manages all the work of setting up, operating, and scaling
  23. // a data warehouse: provisioning capacity, monitoring and backing up the cluster,
  24. // and applying patches and upgrades to the Amazon Redshift engine. You can
  25. // focus on using your data to acquire new insights for your business and customers.
  26. //
  27. // If you are a first-time user of Amazon Redshift, we recommend that you begin
  28. // by reading the The Amazon Redshift Getting Started Guide (http://docs.aws.amazon.com/redshift/latest/gsg/getting-started.html)
  29. //
  30. // If you are a database developer, the Amazon Redshift Database Developer
  31. // Guide (http://docs.aws.amazon.com/redshift/latest/dg/welcome.html) explains
  32. // how to design, build, query, and maintain the databases that make up your
  33. // data warehouse.
  34. type Redshift struct {
  35. *service.Service
  36. }
  37. // Used for custom service initialization logic
  38. var initService func(*service.Service)
  39. // Used for custom request initialization logic
  40. var initRequest func(*request.Request)
  41. // New returns a new Redshift client.
  42. func New(config *aws.Config) *Redshift {
  43. service := &service.Service{
  44. ServiceInfo: serviceinfo.ServiceInfo{
  45. Config: defaults.DefaultConfig.Merge(config),
  46. ServiceName: "redshift",
  47. APIVersion: "2012-12-01",
  48. },
  49. }
  50. service.Initialize()
  51. // Handlers
  52. service.Handlers.Sign.PushBack(v4.Sign)
  53. service.Handlers.Build.PushBack(query.Build)
  54. service.Handlers.Unmarshal.PushBack(query.Unmarshal)
  55. service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
  56. service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
  57. // Run custom service initialization if present
  58. if initService != nil {
  59. initService(service)
  60. }
  61. return &Redshift{service}
  62. }
  63. // newRequest creates a new request for a Redshift operation and runs any
  64. // custom request initialization.
  65. func (c *Redshift) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  66. req := c.NewRequest(op, params, data)
  67. // Run custom request initialization if present
  68. if initRequest != nil {
  69. initRequest(req)
  70. }
  71. return req
  72. }