service.go 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package codepipeline
  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 CodePipeline API Reference. This guide provides
  13. // descriptions of the actions and data types for AWS CodePipeline. Some functionality
  14. // for your pipeline is only configurable through the API. For additional information,
  15. // see the AWS CodePipeline User Guide (http://docs.aws.amazon.com/pipelines/latest/userguide/welcome.html).
  16. //
  17. // You can use the AWS CodePipeline API to work with pipelines, stages, actions,
  18. // gates, and transitions, as described below.
  19. //
  20. // Pipelines are models of automated release processes. Each pipeline is uniquely
  21. // named, and consists of actions, gates, and stages.
  22. //
  23. // You can work with pipelines by calling: CreatePipeline, which creates
  24. // a uniquely-named pipeline. DeletePipeline, which deletes the specified pipeline.
  25. // GetPipeline, which returns information about a pipeline structure. GetPipelineState,
  26. // which returns information about the current state of the stages and actions
  27. // of a pipeline. ListPipelines, which gets a summary of all of the pipelines
  28. // associated with your account. StartPipelineExecution, which runs the the
  29. // most recent revision of an artifact through the pipeline. UpdatePipeline,
  30. // which updates a pipeline with edits or changes to the structure of the pipeline.
  31. // Pipelines include stages, which are which are logical groupings of gates
  32. // and actions. Each stage contains one or more actions that must complete before
  33. // the next stage begins. A stage will result in success or failure. If a stage
  34. // fails, then the pipeline stops at that stage and will remain stopped until
  35. // either a new version of an artifact appears in the source location, or a
  36. // user takes action to re-run the most recent artifact through the pipeline.
  37. // You can call GetPipelineState, which displays the status of a pipeline, including
  38. // the status of stages in the pipeline, or GetPipeline, which returns the entire
  39. // structure of the pipeline, including the stages of that pipeline. For more
  40. // information about the structure of stages and actions, also refer to the
  41. // AWS CodePipeline Pipeline Structure Reference.
  42. //
  43. // Pipeline stages include actions, which are categorized into categories
  44. // such as source or build actions performed within a stage of a pipeline. For
  45. // example, you can use a source action to import artifacts into a pipeline
  46. // from a source such as Amazon S3. Like stages, you do not work with actions
  47. // directly in most cases, but you do define and interact with actions when
  48. // working with pipeline operations such as CreatePipeline and GetPipelineState.
  49. //
  50. // Pipelines also include transitions, which allow the transition of artifacts
  51. // from one stage to the next in a pipeline after the actions in one stage complete.
  52. //
  53. // You can work with transitions by calling:
  54. //
  55. // DisableStageTransition, which prevents artifacts from transitioning to
  56. // the next stage in a pipeline. EnableStageTransition, which enables transition
  57. // of artifacts between stages in a pipeline. Using the API to integrate with
  58. // AWS CodePipeline
  59. //
  60. // For third-party integrators or developers who want to create their own integrations
  61. // with AWS CodePipeline, the expected sequence varies from the standard API
  62. // user. In order to integrate with AWS CodePipeline, developers will need to
  63. // work with the following items:
  64. //
  65. // Jobs, which are instances of an action. For example, a job for a source
  66. // action might import a revision of an artifact from a source. You can work
  67. // with jobs by calling:
  68. //
  69. // AcknowledgeJob, which confirms whether a job worker has received the specified
  70. // job, GetJobDetails, which returns the details of a job, PollForJobs, which
  71. // determines whether there are any jobs to act upon, PutJobFailureResult,
  72. // which provides details of a job failure, and PutJobSuccessResult, which
  73. // provides details of a job success. Third party jobs, which are instances
  74. // of an action created by a partner action and integrated into AWS CodePipeline.
  75. // Partner actions are created by members of the AWS Partner Network. You can
  76. // work with third party jobs by calling:
  77. //
  78. // AcknowledgeThirdPartyJob, which confirms whether a job worker has received
  79. // the specified job, GetThirdPartyJobDetails, which requests the details of
  80. // a job for a partner action, PollForThirdPartyJobs, which determines whether
  81. // there are any jobs to act upon, PutThirdPartyJobFailureResult, which provides
  82. // details of a job failure, and PutThirdPartyJobSuccessResult, which provides
  83. // details of a job success.
  84. type CodePipeline struct {
  85. *service.Service
  86. }
  87. // Used for custom service initialization logic
  88. var initService func(*service.Service)
  89. // Used for custom request initialization logic
  90. var initRequest func(*request.Request)
  91. // New returns a new CodePipeline client.
  92. func New(config *aws.Config) *CodePipeline {
  93. service := &service.Service{
  94. ServiceInfo: serviceinfo.ServiceInfo{
  95. Config: defaults.DefaultConfig.Merge(config),
  96. ServiceName: "codepipeline",
  97. APIVersion: "2015-07-09",
  98. JSONVersion: "1.1",
  99. TargetPrefix: "CodePipeline_20150709",
  100. },
  101. }
  102. service.Initialize()
  103. // Handlers
  104. service.Handlers.Sign.PushBack(v4.Sign)
  105. service.Handlers.Build.PushBack(jsonrpc.Build)
  106. service.Handlers.Unmarshal.PushBack(jsonrpc.Unmarshal)
  107. service.Handlers.UnmarshalMeta.PushBack(jsonrpc.UnmarshalMeta)
  108. service.Handlers.UnmarshalError.PushBack(jsonrpc.UnmarshalError)
  109. // Run custom service initialization if present
  110. if initService != nil {
  111. initService(service)
  112. }
  113. return &CodePipeline{service}
  114. }
  115. // newRequest creates a new request for a CodePipeline operation and runs any
  116. // custom request initialization.
  117. func (c *CodePipeline) newRequest(op *request.Operation, params, data interface{}) *request.Request {
  118. req := c.NewRequest(op, params, data)
  119. // Run custom request initialization if present
  120. if initRequest != nil {
  121. initRequest(req)
  122. }
  123. return req
  124. }