service.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package cloudwatchlogs
  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/jsonrpc"
  10. "github.com/aws/aws-sdk-go/internal/signer/v4"
  11. )
  12. // This is the Amazon CloudWatch Logs API Reference. Amazon CloudWatch Logs
  13. // enables you to monitor, store, and access your system, application, and custom
  14. // log files. This guide provides detailed information about Amazon CloudWatch
  15. // Logs actions, data types, parameters, and errors. For detailed information
  16. // about Amazon CloudWatch Logs features and their associated API calls, go
  17. // to the Amazon CloudWatch Developer Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide).
  18. //
  19. // Use the following links to get started using the Amazon CloudWatch Logs
  20. // API Reference:
  21. //
  22. // Actions (http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_Operations.html):
  23. // An alphabetical list of all Amazon CloudWatch Logs actions. Data Types (http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_Types.html):
  24. // An alphabetical list of all Amazon CloudWatch Logs data types. Common Parameters
  25. // (http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/CommonParameters.html):
  26. // Parameters that all Query actions can use. Common Errors (http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/CommonErrors.html):
  27. // Client and server errors that all actions can return. Regions and Endpoints
  28. // (http://docs.aws.amazon.com/general/latest/gr/index.html?rande.html): Itemized
  29. // regions and endpoints for all AWS products. In addition to using the Amazon
  30. // CloudWatch Logs API, you can also use the following SDKs and third-party
  31. // libraries to access Amazon CloudWatch Logs programmatically.
  32. //
  33. // AWS SDK for Java Documentation (http://aws.amazon.com/documentation/sdkforjava/)
  34. // AWS SDK for .NET Documentation (http://aws.amazon.com/documentation/sdkfornet/)
  35. // AWS SDK for PHP Documentation (http://aws.amazon.com/documentation/sdkforphp/)
  36. // AWS SDK for Ruby Documentation (http://aws.amazon.com/documentation/sdkforruby/)
  37. // Developers in the AWS developer community also provide their own libraries,
  38. // which you can find at the following AWS developer centers:
  39. //
  40. // AWS Java Developer Center (http://aws.amazon.com/java/) AWS PHP Developer
  41. // Center (http://aws.amazon.com/php/) AWS Python Developer Center (http://aws.amazon.com/python/)
  42. // AWS Ruby Developer Center (http://aws.amazon.com/ruby/) AWS Windows and .NET
  43. // Developer Center (http://aws.amazon.com/net/)
  44. type CloudWatchLogs struct {
  45. *service.Service
  46. }
  47. // Used for custom service initialization logic
  48. var initService func(*service.Service)
  49. // Used for custom request initialization logic
  50. var initRequest func(*request.Request)
  51. // New returns a new CloudWatchLogs client.
  52. func New(config *aws.Config) *CloudWatchLogs {
  53. service := &service.Service{
  54. ServiceInfo: serviceinfo.ServiceInfo{
  55. Config: defaults.DefaultConfig.Merge(config),
  56. ServiceName: "logs",
  57. APIVersion: "2014-03-28",
  58. JSONVersion: "1.1",
  59. TargetPrefix: "Logs_20140328",
  60. },
  61. }
  62. service.Initialize()
  63. // Handlers
  64. service.Handlers.Sign.PushBack(v4.Sign)
  65. service.Handlers.Build.PushBack(jsonrpc.Build)
  66. service.Handlers.Unmarshal.PushBack(jsonrpc.Unmarshal)
  67. service.Handlers.UnmarshalMeta.PushBack(jsonrpc.UnmarshalMeta)
  68. service.Handlers.UnmarshalError.PushBack(jsonrpc.UnmarshalError)
  69. // Run custom service initialization if present
  70. if initService != nil {
  71. initService(service)
  72. }
  73. return &CloudWatchLogs{service}
  74. }
  75. // newRequest creates a new request for a CloudWatchLogs operation and runs any
  76. // custom request initialization.
  77. func (c *CloudWatchLogs) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  78. req := c.NewRequest(op, params, data)
  79. // Run custom request initialization if present
  80. if initRequest != nil {
  81. initRequest(req)
  82. }
  83. return req
  84. }