service.go 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package opsworks
  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. // Welcome to the AWS OpsWorks API Reference. This guide provides descriptions,
  13. // syntax, and usage examples about AWS OpsWorks actions and data types, including
  14. // common parameters and error codes.
  15. //
  16. // AWS OpsWorks is an application management service that provides an integrated
  17. // experience for overseeing the complete application lifecycle. For information
  18. // about this product, go to the AWS OpsWorks (http://aws.amazon.com/opsworks/)
  19. // details page.
  20. //
  21. // SDKs and CLI
  22. //
  23. // The most common way to use the AWS OpsWorks API is by using the AWS Command
  24. // Line Interface (CLI) or by using one of the AWS SDKs to implement applications
  25. // in your preferred language. For more information, see:
  26. //
  27. // AWS CLI (http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html)
  28. // AWS SDK for Java (http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/opsworks/AWSOpsWorksClient.html)
  29. // AWS SDK for .NET (http://docs.aws.amazon.com/sdkfornet/latest/apidocs/html/N_Amazon_OpsWorks.htm)
  30. // AWS SDK for PHP 2 (http://docs.aws.amazon.com/aws-sdk-php-2/latest/class-Aws.OpsWorks.OpsWorksClient.html)
  31. // AWS SDK for Ruby (http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/OpsWorks/Client.html)
  32. // AWS SDK for Node.js (http://aws.amazon.com/documentation/sdkforjavascript/)
  33. // AWS SDK for Python(Boto) (http://docs.pythonboto.org/en/latest/ref/opsworks.html)
  34. // Endpoints
  35. //
  36. // AWS OpsWorks supports only one endpoint, opsworks.us-east-1.amazonaws.com
  37. // (HTTPS), so you must connect to that endpoint. You can then use the API to
  38. // direct AWS OpsWorks to create stacks in any AWS Region.
  39. //
  40. // Chef Versions
  41. //
  42. // When you call CreateStack, CloneStack, or UpdateStack we recommend you use
  43. // the ConfigurationManager parameter to specify the Chef version. The recommended
  44. // value for Linux stacks, which is also the default value, is currently 11.10.
  45. // Windows stacks use Chef 12.2. For more information, see Chef Versions (http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-chef11.html).
  46. //
  47. // You can also specify Chef 11.4 or Chef 0.9 for your Linux stack. However,
  48. // Chef 0.9 has been deprecated. We do not recommend using Chef 0.9 for new
  49. // stacks, and we recommend migrating your existing Chef 0.9 stacks to Chef
  50. // 11.10 as soon as possible.
  51. type OpsWorks struct {
  52. *service.Service
  53. }
  54. // Used for custom service initialization logic
  55. var initService func(*service.Service)
  56. // Used for custom request initialization logic
  57. var initRequest func(*request.Request)
  58. // New returns a new OpsWorks client.
  59. func New(config *aws.Config) *OpsWorks {
  60. service := &service.Service{
  61. ServiceInfo: serviceinfo.ServiceInfo{
  62. Config: defaults.DefaultConfig.Merge(config),
  63. ServiceName: "opsworks",
  64. APIVersion: "2013-02-18",
  65. JSONVersion: "1.1",
  66. TargetPrefix: "OpsWorks_20130218",
  67. },
  68. }
  69. service.Initialize()
  70. // Handlers
  71. service.Handlers.Sign.PushBack(v4.Sign)
  72. service.Handlers.Build.PushBack(jsonrpc.Build)
  73. service.Handlers.Unmarshal.PushBack(jsonrpc.Unmarshal)
  74. service.Handlers.UnmarshalMeta.PushBack(jsonrpc.UnmarshalMeta)
  75. service.Handlers.UnmarshalError.PushBack(jsonrpc.UnmarshalError)
  76. // Run custom service initialization if present
  77. if initService != nil {
  78. initService(service)
  79. }
  80. return &OpsWorks{service}
  81. }
  82. // newRequest creates a new request for a OpsWorks operation and runs any
  83. // custom request initialization.
  84. func (c *OpsWorks) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  85. req := c.NewRequest(op, params, data)
  86. // Run custom request initialization if present
  87. if initRequest != nil {
  88. initRequest(req)
  89. }
  90. return req
  91. }