service.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package codedeploy
  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. // Overview This is the AWS CodeDeploy API Reference. This guide provides descriptions
  13. // of the AWS CodeDeploy APIs. For additional information, see the AWS CodeDeploy
  14. // User Guide (http://docs.aws.amazon.com/codedeploy/latest/userguide).
  15. //
  16. // Using the APIs You can use the AWS CodeDeploy APIs to work with the following
  17. // items:
  18. //
  19. // Applications are unique identifiers that AWS CodeDeploy uses to ensure
  20. // that the correct combinations of revisions, deployment configurations, and
  21. // deployment groups are being referenced during deployments.
  22. //
  23. // You can use the AWS CodeDeploy APIs to create, delete, get, list, and update
  24. // applications.
  25. //
  26. // Deployment configurations are sets of deployment rules and deployment
  27. // success and failure conditions that AWS CodeDeploy uses during deployments.
  28. //
  29. // You can use the AWS CodeDeploy APIs to create, delete, get, and list deployment
  30. // configurations.
  31. //
  32. // Deployment groups are groups of instances to which application revisions
  33. // can be deployed.
  34. //
  35. // You can use the AWS CodeDeploy APIs to create, delete, get, list, and update
  36. // deployment groups.
  37. //
  38. // Instances represent Amazon EC2 instances to which application revisions
  39. // are deployed. Instances are identified by their Amazon EC2 tags or Auto Scaling
  40. // group names. Instances belong to deployment groups.
  41. //
  42. // You can use the AWS CodeDeploy APIs to get and list instances.
  43. //
  44. // Deployments represent the process of deploying revisions to instances.
  45. //
  46. // You can use the AWS CodeDeploy APIs to create, get, list, and stop deployments.
  47. //
  48. // Application revisions are archive files that are stored in Amazon S3 buckets
  49. // or GitHub repositories. These revisions contain source content (such as source
  50. // code, web pages, executable files, any deployment scripts, and similar) along
  51. // with an Application Specification file (AppSpec file). (The AppSpec file
  52. // is unique to AWS CodeDeploy; it defines a series of deployment actions that
  53. // you want AWS CodeDeploy to execute.) An application revision is uniquely
  54. // identified by its Amazon S3 object key and its ETag, version, or both (for
  55. // application revisions that are stored in Amazon S3 buckets) or by its repository
  56. // name and commit ID (for applications revisions that are stored in GitHub
  57. // repositories). Application revisions are deployed through deployment groups.
  58. //
  59. // You can use the AWS CodeDeploy APIs to get, list, and register application
  60. // revisions.
  61. type CodeDeploy struct {
  62. *service.Service
  63. }
  64. // Used for custom service initialization logic
  65. var initService func(*service.Service)
  66. // Used for custom request initialization logic
  67. var initRequest func(*request.Request)
  68. // New returns a new CodeDeploy client.
  69. func New(config *aws.Config) *CodeDeploy {
  70. service := &service.Service{
  71. ServiceInfo: serviceinfo.ServiceInfo{
  72. Config: defaults.DefaultConfig.Merge(config),
  73. ServiceName: "codedeploy",
  74. APIVersion: "2014-10-06",
  75. JSONVersion: "1.1",
  76. TargetPrefix: "CodeDeploy_20141006",
  77. },
  78. }
  79. service.Initialize()
  80. // Handlers
  81. service.Handlers.Sign.PushBack(v4.Sign)
  82. service.Handlers.Build.PushBack(jsonrpc.Build)
  83. service.Handlers.Unmarshal.PushBack(jsonrpc.Unmarshal)
  84. service.Handlers.UnmarshalMeta.PushBack(jsonrpc.UnmarshalMeta)
  85. service.Handlers.UnmarshalError.PushBack(jsonrpc.UnmarshalError)
  86. // Run custom service initialization if present
  87. if initService != nil {
  88. initService(service)
  89. }
  90. return &CodeDeploy{service}
  91. }
  92. // newRequest creates a new request for a CodeDeploy operation and runs any
  93. // custom request initialization.
  94. func (c *CodeDeploy) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  95. req := c.NewRequest(op, params, data)
  96. // Run custom request initialization if present
  97. if initRequest != nil {
  98. initRequest(req)
  99. }
  100. return req
  101. }