Switch to using the dep tool and update all the dependencies

This commit is contained in:
Nick Craig-Wood 2017-05-11 15:39:54 +01:00
parent 5135ff73cb
commit 98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,233 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package codedeployiface provides an interface to enable mocking the AWS CodeDeploy service client
// for testing your code.
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters.
package codedeployiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/codedeploy"
)
// CodeDeployAPI provides an interface to enable mocking the
// codedeploy.CodeDeploy service client's API operation,
// paginators, and waiters. This make unit testing your code that calls out
// to the SDK's service client's calls easier.
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // AWS CodeDeploy.
// func myFunc(svc codedeployiface.CodeDeployAPI) bool {
// // Make svc.AddTagsToOnPremisesInstances request
// }
//
// func main() {
// sess := session.New()
// svc := codedeploy.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockCodeDeployClient struct {
// codedeployiface.CodeDeployAPI
// }
// func (m *mockCodeDeployClient) AddTagsToOnPremisesInstances(input *codedeploy.AddTagsToOnPremisesInstancesInput) (*codedeploy.AddTagsToOnPremisesInstancesOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockCodeDeployClient{}
//
// myfunc(mockSvc)
//
// // Verify myFunc's functionality
// }
//
// It is important to note that this interface will have breaking changes
// when the service model is updated and adds new API operations, paginators,
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type CodeDeployAPI interface {
AddTagsToOnPremisesInstances(*codedeploy.AddTagsToOnPremisesInstancesInput) (*codedeploy.AddTagsToOnPremisesInstancesOutput, error)
AddTagsToOnPremisesInstancesWithContext(aws.Context, *codedeploy.AddTagsToOnPremisesInstancesInput, ...request.Option) (*codedeploy.AddTagsToOnPremisesInstancesOutput, error)
AddTagsToOnPremisesInstancesRequest(*codedeploy.AddTagsToOnPremisesInstancesInput) (*request.Request, *codedeploy.AddTagsToOnPremisesInstancesOutput)
BatchGetApplicationRevisions(*codedeploy.BatchGetApplicationRevisionsInput) (*codedeploy.BatchGetApplicationRevisionsOutput, error)
BatchGetApplicationRevisionsWithContext(aws.Context, *codedeploy.BatchGetApplicationRevisionsInput, ...request.Option) (*codedeploy.BatchGetApplicationRevisionsOutput, error)
BatchGetApplicationRevisionsRequest(*codedeploy.BatchGetApplicationRevisionsInput) (*request.Request, *codedeploy.BatchGetApplicationRevisionsOutput)
BatchGetApplications(*codedeploy.BatchGetApplicationsInput) (*codedeploy.BatchGetApplicationsOutput, error)
BatchGetApplicationsWithContext(aws.Context, *codedeploy.BatchGetApplicationsInput, ...request.Option) (*codedeploy.BatchGetApplicationsOutput, error)
BatchGetApplicationsRequest(*codedeploy.BatchGetApplicationsInput) (*request.Request, *codedeploy.BatchGetApplicationsOutput)
BatchGetDeploymentGroups(*codedeploy.BatchGetDeploymentGroupsInput) (*codedeploy.BatchGetDeploymentGroupsOutput, error)
BatchGetDeploymentGroupsWithContext(aws.Context, *codedeploy.BatchGetDeploymentGroupsInput, ...request.Option) (*codedeploy.BatchGetDeploymentGroupsOutput, error)
BatchGetDeploymentGroupsRequest(*codedeploy.BatchGetDeploymentGroupsInput) (*request.Request, *codedeploy.BatchGetDeploymentGroupsOutput)
BatchGetDeploymentInstances(*codedeploy.BatchGetDeploymentInstancesInput) (*codedeploy.BatchGetDeploymentInstancesOutput, error)
BatchGetDeploymentInstancesWithContext(aws.Context, *codedeploy.BatchGetDeploymentInstancesInput, ...request.Option) (*codedeploy.BatchGetDeploymentInstancesOutput, error)
BatchGetDeploymentInstancesRequest(*codedeploy.BatchGetDeploymentInstancesInput) (*request.Request, *codedeploy.BatchGetDeploymentInstancesOutput)
BatchGetDeployments(*codedeploy.BatchGetDeploymentsInput) (*codedeploy.BatchGetDeploymentsOutput, error)
BatchGetDeploymentsWithContext(aws.Context, *codedeploy.BatchGetDeploymentsInput, ...request.Option) (*codedeploy.BatchGetDeploymentsOutput, error)
BatchGetDeploymentsRequest(*codedeploy.BatchGetDeploymentsInput) (*request.Request, *codedeploy.BatchGetDeploymentsOutput)
BatchGetOnPremisesInstances(*codedeploy.BatchGetOnPremisesInstancesInput) (*codedeploy.BatchGetOnPremisesInstancesOutput, error)
BatchGetOnPremisesInstancesWithContext(aws.Context, *codedeploy.BatchGetOnPremisesInstancesInput, ...request.Option) (*codedeploy.BatchGetOnPremisesInstancesOutput, error)
BatchGetOnPremisesInstancesRequest(*codedeploy.BatchGetOnPremisesInstancesInput) (*request.Request, *codedeploy.BatchGetOnPremisesInstancesOutput)
ContinueDeployment(*codedeploy.ContinueDeploymentInput) (*codedeploy.ContinueDeploymentOutput, error)
ContinueDeploymentWithContext(aws.Context, *codedeploy.ContinueDeploymentInput, ...request.Option) (*codedeploy.ContinueDeploymentOutput, error)
ContinueDeploymentRequest(*codedeploy.ContinueDeploymentInput) (*request.Request, *codedeploy.ContinueDeploymentOutput)
CreateApplication(*codedeploy.CreateApplicationInput) (*codedeploy.CreateApplicationOutput, error)
CreateApplicationWithContext(aws.Context, *codedeploy.CreateApplicationInput, ...request.Option) (*codedeploy.CreateApplicationOutput, error)
CreateApplicationRequest(*codedeploy.CreateApplicationInput) (*request.Request, *codedeploy.CreateApplicationOutput)
CreateDeployment(*codedeploy.CreateDeploymentInput) (*codedeploy.CreateDeploymentOutput, error)
CreateDeploymentWithContext(aws.Context, *codedeploy.CreateDeploymentInput, ...request.Option) (*codedeploy.CreateDeploymentOutput, error)
CreateDeploymentRequest(*codedeploy.CreateDeploymentInput) (*request.Request, *codedeploy.CreateDeploymentOutput)
CreateDeploymentConfig(*codedeploy.CreateDeploymentConfigInput) (*codedeploy.CreateDeploymentConfigOutput, error)
CreateDeploymentConfigWithContext(aws.Context, *codedeploy.CreateDeploymentConfigInput, ...request.Option) (*codedeploy.CreateDeploymentConfigOutput, error)
CreateDeploymentConfigRequest(*codedeploy.CreateDeploymentConfigInput) (*request.Request, *codedeploy.CreateDeploymentConfigOutput)
CreateDeploymentGroup(*codedeploy.CreateDeploymentGroupInput) (*codedeploy.CreateDeploymentGroupOutput, error)
CreateDeploymentGroupWithContext(aws.Context, *codedeploy.CreateDeploymentGroupInput, ...request.Option) (*codedeploy.CreateDeploymentGroupOutput, error)
CreateDeploymentGroupRequest(*codedeploy.CreateDeploymentGroupInput) (*request.Request, *codedeploy.CreateDeploymentGroupOutput)
DeleteApplication(*codedeploy.DeleteApplicationInput) (*codedeploy.DeleteApplicationOutput, error)
DeleteApplicationWithContext(aws.Context, *codedeploy.DeleteApplicationInput, ...request.Option) (*codedeploy.DeleteApplicationOutput, error)
DeleteApplicationRequest(*codedeploy.DeleteApplicationInput) (*request.Request, *codedeploy.DeleteApplicationOutput)
DeleteDeploymentConfig(*codedeploy.DeleteDeploymentConfigInput) (*codedeploy.DeleteDeploymentConfigOutput, error)
DeleteDeploymentConfigWithContext(aws.Context, *codedeploy.DeleteDeploymentConfigInput, ...request.Option) (*codedeploy.DeleteDeploymentConfigOutput, error)
DeleteDeploymentConfigRequest(*codedeploy.DeleteDeploymentConfigInput) (*request.Request, *codedeploy.DeleteDeploymentConfigOutput)
DeleteDeploymentGroup(*codedeploy.DeleteDeploymentGroupInput) (*codedeploy.DeleteDeploymentGroupOutput, error)
DeleteDeploymentGroupWithContext(aws.Context, *codedeploy.DeleteDeploymentGroupInput, ...request.Option) (*codedeploy.DeleteDeploymentGroupOutput, error)
DeleteDeploymentGroupRequest(*codedeploy.DeleteDeploymentGroupInput) (*request.Request, *codedeploy.DeleteDeploymentGroupOutput)
DeregisterOnPremisesInstance(*codedeploy.DeregisterOnPremisesInstanceInput) (*codedeploy.DeregisterOnPremisesInstanceOutput, error)
DeregisterOnPremisesInstanceWithContext(aws.Context, *codedeploy.DeregisterOnPremisesInstanceInput, ...request.Option) (*codedeploy.DeregisterOnPremisesInstanceOutput, error)
DeregisterOnPremisesInstanceRequest(*codedeploy.DeregisterOnPremisesInstanceInput) (*request.Request, *codedeploy.DeregisterOnPremisesInstanceOutput)
GetApplication(*codedeploy.GetApplicationInput) (*codedeploy.GetApplicationOutput, error)
GetApplicationWithContext(aws.Context, *codedeploy.GetApplicationInput, ...request.Option) (*codedeploy.GetApplicationOutput, error)
GetApplicationRequest(*codedeploy.GetApplicationInput) (*request.Request, *codedeploy.GetApplicationOutput)
GetApplicationRevision(*codedeploy.GetApplicationRevisionInput) (*codedeploy.GetApplicationRevisionOutput, error)
GetApplicationRevisionWithContext(aws.Context, *codedeploy.GetApplicationRevisionInput, ...request.Option) (*codedeploy.GetApplicationRevisionOutput, error)
GetApplicationRevisionRequest(*codedeploy.GetApplicationRevisionInput) (*request.Request, *codedeploy.GetApplicationRevisionOutput)
GetDeployment(*codedeploy.GetDeploymentInput) (*codedeploy.GetDeploymentOutput, error)
GetDeploymentWithContext(aws.Context, *codedeploy.GetDeploymentInput, ...request.Option) (*codedeploy.GetDeploymentOutput, error)
GetDeploymentRequest(*codedeploy.GetDeploymentInput) (*request.Request, *codedeploy.GetDeploymentOutput)
GetDeploymentConfig(*codedeploy.GetDeploymentConfigInput) (*codedeploy.GetDeploymentConfigOutput, error)
GetDeploymentConfigWithContext(aws.Context, *codedeploy.GetDeploymentConfigInput, ...request.Option) (*codedeploy.GetDeploymentConfigOutput, error)
GetDeploymentConfigRequest(*codedeploy.GetDeploymentConfigInput) (*request.Request, *codedeploy.GetDeploymentConfigOutput)
GetDeploymentGroup(*codedeploy.GetDeploymentGroupInput) (*codedeploy.GetDeploymentGroupOutput, error)
GetDeploymentGroupWithContext(aws.Context, *codedeploy.GetDeploymentGroupInput, ...request.Option) (*codedeploy.GetDeploymentGroupOutput, error)
GetDeploymentGroupRequest(*codedeploy.GetDeploymentGroupInput) (*request.Request, *codedeploy.GetDeploymentGroupOutput)
GetDeploymentInstance(*codedeploy.GetDeploymentInstanceInput) (*codedeploy.GetDeploymentInstanceOutput, error)
GetDeploymentInstanceWithContext(aws.Context, *codedeploy.GetDeploymentInstanceInput, ...request.Option) (*codedeploy.GetDeploymentInstanceOutput, error)
GetDeploymentInstanceRequest(*codedeploy.GetDeploymentInstanceInput) (*request.Request, *codedeploy.GetDeploymentInstanceOutput)
GetOnPremisesInstance(*codedeploy.GetOnPremisesInstanceInput) (*codedeploy.GetOnPremisesInstanceOutput, error)
GetOnPremisesInstanceWithContext(aws.Context, *codedeploy.GetOnPremisesInstanceInput, ...request.Option) (*codedeploy.GetOnPremisesInstanceOutput, error)
GetOnPremisesInstanceRequest(*codedeploy.GetOnPremisesInstanceInput) (*request.Request, *codedeploy.GetOnPremisesInstanceOutput)
ListApplicationRevisions(*codedeploy.ListApplicationRevisionsInput) (*codedeploy.ListApplicationRevisionsOutput, error)
ListApplicationRevisionsWithContext(aws.Context, *codedeploy.ListApplicationRevisionsInput, ...request.Option) (*codedeploy.ListApplicationRevisionsOutput, error)
ListApplicationRevisionsRequest(*codedeploy.ListApplicationRevisionsInput) (*request.Request, *codedeploy.ListApplicationRevisionsOutput)
ListApplicationRevisionsPages(*codedeploy.ListApplicationRevisionsInput, func(*codedeploy.ListApplicationRevisionsOutput, bool) bool) error
ListApplicationRevisionsPagesWithContext(aws.Context, *codedeploy.ListApplicationRevisionsInput, func(*codedeploy.ListApplicationRevisionsOutput, bool) bool, ...request.Option) error
ListApplications(*codedeploy.ListApplicationsInput) (*codedeploy.ListApplicationsOutput, error)
ListApplicationsWithContext(aws.Context, *codedeploy.ListApplicationsInput, ...request.Option) (*codedeploy.ListApplicationsOutput, error)
ListApplicationsRequest(*codedeploy.ListApplicationsInput) (*request.Request, *codedeploy.ListApplicationsOutput)
ListApplicationsPages(*codedeploy.ListApplicationsInput, func(*codedeploy.ListApplicationsOutput, bool) bool) error
ListApplicationsPagesWithContext(aws.Context, *codedeploy.ListApplicationsInput, func(*codedeploy.ListApplicationsOutput, bool) bool, ...request.Option) error
ListDeploymentConfigs(*codedeploy.ListDeploymentConfigsInput) (*codedeploy.ListDeploymentConfigsOutput, error)
ListDeploymentConfigsWithContext(aws.Context, *codedeploy.ListDeploymentConfigsInput, ...request.Option) (*codedeploy.ListDeploymentConfigsOutput, error)
ListDeploymentConfigsRequest(*codedeploy.ListDeploymentConfigsInput) (*request.Request, *codedeploy.ListDeploymentConfigsOutput)
ListDeploymentConfigsPages(*codedeploy.ListDeploymentConfigsInput, func(*codedeploy.ListDeploymentConfigsOutput, bool) bool) error
ListDeploymentConfigsPagesWithContext(aws.Context, *codedeploy.ListDeploymentConfigsInput, func(*codedeploy.ListDeploymentConfigsOutput, bool) bool, ...request.Option) error
ListDeploymentGroups(*codedeploy.ListDeploymentGroupsInput) (*codedeploy.ListDeploymentGroupsOutput, error)
ListDeploymentGroupsWithContext(aws.Context, *codedeploy.ListDeploymentGroupsInput, ...request.Option) (*codedeploy.ListDeploymentGroupsOutput, error)
ListDeploymentGroupsRequest(*codedeploy.ListDeploymentGroupsInput) (*request.Request, *codedeploy.ListDeploymentGroupsOutput)
ListDeploymentGroupsPages(*codedeploy.ListDeploymentGroupsInput, func(*codedeploy.ListDeploymentGroupsOutput, bool) bool) error
ListDeploymentGroupsPagesWithContext(aws.Context, *codedeploy.ListDeploymentGroupsInput, func(*codedeploy.ListDeploymentGroupsOutput, bool) bool, ...request.Option) error
ListDeploymentInstances(*codedeploy.ListDeploymentInstancesInput) (*codedeploy.ListDeploymentInstancesOutput, error)
ListDeploymentInstancesWithContext(aws.Context, *codedeploy.ListDeploymentInstancesInput, ...request.Option) (*codedeploy.ListDeploymentInstancesOutput, error)
ListDeploymentInstancesRequest(*codedeploy.ListDeploymentInstancesInput) (*request.Request, *codedeploy.ListDeploymentInstancesOutput)
ListDeploymentInstancesPages(*codedeploy.ListDeploymentInstancesInput, func(*codedeploy.ListDeploymentInstancesOutput, bool) bool) error
ListDeploymentInstancesPagesWithContext(aws.Context, *codedeploy.ListDeploymentInstancesInput, func(*codedeploy.ListDeploymentInstancesOutput, bool) bool, ...request.Option) error
ListDeployments(*codedeploy.ListDeploymentsInput) (*codedeploy.ListDeploymentsOutput, error)
ListDeploymentsWithContext(aws.Context, *codedeploy.ListDeploymentsInput, ...request.Option) (*codedeploy.ListDeploymentsOutput, error)
ListDeploymentsRequest(*codedeploy.ListDeploymentsInput) (*request.Request, *codedeploy.ListDeploymentsOutput)
ListDeploymentsPages(*codedeploy.ListDeploymentsInput, func(*codedeploy.ListDeploymentsOutput, bool) bool) error
ListDeploymentsPagesWithContext(aws.Context, *codedeploy.ListDeploymentsInput, func(*codedeploy.ListDeploymentsOutput, bool) bool, ...request.Option) error
ListOnPremisesInstances(*codedeploy.ListOnPremisesInstancesInput) (*codedeploy.ListOnPremisesInstancesOutput, error)
ListOnPremisesInstancesWithContext(aws.Context, *codedeploy.ListOnPremisesInstancesInput, ...request.Option) (*codedeploy.ListOnPremisesInstancesOutput, error)
ListOnPremisesInstancesRequest(*codedeploy.ListOnPremisesInstancesInput) (*request.Request, *codedeploy.ListOnPremisesInstancesOutput)
RegisterApplicationRevision(*codedeploy.RegisterApplicationRevisionInput) (*codedeploy.RegisterApplicationRevisionOutput, error)
RegisterApplicationRevisionWithContext(aws.Context, *codedeploy.RegisterApplicationRevisionInput, ...request.Option) (*codedeploy.RegisterApplicationRevisionOutput, error)
RegisterApplicationRevisionRequest(*codedeploy.RegisterApplicationRevisionInput) (*request.Request, *codedeploy.RegisterApplicationRevisionOutput)
RegisterOnPremisesInstance(*codedeploy.RegisterOnPremisesInstanceInput) (*codedeploy.RegisterOnPremisesInstanceOutput, error)
RegisterOnPremisesInstanceWithContext(aws.Context, *codedeploy.RegisterOnPremisesInstanceInput, ...request.Option) (*codedeploy.RegisterOnPremisesInstanceOutput, error)
RegisterOnPremisesInstanceRequest(*codedeploy.RegisterOnPremisesInstanceInput) (*request.Request, *codedeploy.RegisterOnPremisesInstanceOutput)
RemoveTagsFromOnPremisesInstances(*codedeploy.RemoveTagsFromOnPremisesInstancesInput) (*codedeploy.RemoveTagsFromOnPremisesInstancesOutput, error)
RemoveTagsFromOnPremisesInstancesWithContext(aws.Context, *codedeploy.RemoveTagsFromOnPremisesInstancesInput, ...request.Option) (*codedeploy.RemoveTagsFromOnPremisesInstancesOutput, error)
RemoveTagsFromOnPremisesInstancesRequest(*codedeploy.RemoveTagsFromOnPremisesInstancesInput) (*request.Request, *codedeploy.RemoveTagsFromOnPremisesInstancesOutput)
SkipWaitTimeForInstanceTermination(*codedeploy.SkipWaitTimeForInstanceTerminationInput) (*codedeploy.SkipWaitTimeForInstanceTerminationOutput, error)
SkipWaitTimeForInstanceTerminationWithContext(aws.Context, *codedeploy.SkipWaitTimeForInstanceTerminationInput, ...request.Option) (*codedeploy.SkipWaitTimeForInstanceTerminationOutput, error)
SkipWaitTimeForInstanceTerminationRequest(*codedeploy.SkipWaitTimeForInstanceTerminationInput) (*request.Request, *codedeploy.SkipWaitTimeForInstanceTerminationOutput)
StopDeployment(*codedeploy.StopDeploymentInput) (*codedeploy.StopDeploymentOutput, error)
StopDeploymentWithContext(aws.Context, *codedeploy.StopDeploymentInput, ...request.Option) (*codedeploy.StopDeploymentOutput, error)
StopDeploymentRequest(*codedeploy.StopDeploymentInput) (*request.Request, *codedeploy.StopDeploymentOutput)
UpdateApplication(*codedeploy.UpdateApplicationInput) (*codedeploy.UpdateApplicationOutput, error)
UpdateApplicationWithContext(aws.Context, *codedeploy.UpdateApplicationInput, ...request.Option) (*codedeploy.UpdateApplicationOutput, error)
UpdateApplicationRequest(*codedeploy.UpdateApplicationInput) (*request.Request, *codedeploy.UpdateApplicationOutput)
UpdateDeploymentGroup(*codedeploy.UpdateDeploymentGroupInput) (*codedeploy.UpdateDeploymentGroupOutput, error)
UpdateDeploymentGroupWithContext(aws.Context, *codedeploy.UpdateDeploymentGroupInput, ...request.Option) (*codedeploy.UpdateDeploymentGroupOutput, error)
UpdateDeploymentGroupRequest(*codedeploy.UpdateDeploymentGroupInput) (*request.Request, *codedeploy.UpdateDeploymentGroupOutput)
WaitUntilDeploymentSuccessful(*codedeploy.GetDeploymentInput) error
WaitUntilDeploymentSuccessfulWithContext(aws.Context, *codedeploy.GetDeploymentInput, ...request.WaiterOption) error
}
var _ CodeDeployAPI = (*codedeploy.CodeDeploy)(nil)

View file

@ -0,0 +1,132 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package codedeploy provides the client and types for making API
// requests to AWS CodeDeploy.
//
// Overview
//
// This reference guide provides descriptions of the AWS CodeDeploy APIs. For
// more information about AWS CodeDeploy, see the AWS CodeDeploy User Guide
// (http://docs.aws.amazon.com/codedeploy/latest/userguide).
//
// Using the APIs
//
// You can use the AWS CodeDeploy APIs to work with the following:
//
// * Applications are unique identifiers used by AWS CodeDeploy to ensure
// the correct combinations of revisions, deployment configurations, and
// deployment groups are being referenced during deployments.
//
// You can use the AWS CodeDeploy APIs to create, delete, get, list, and update
// applications.
//
// * Deployment configurations are sets of deployment rules and success and
// failure conditions used by AWS CodeDeploy during deployments.
//
// You can use the AWS CodeDeploy APIs to create, delete, get, and list deployment
// configurations.
//
// * Deployment groups are groups of instances to which application revisions
// can be deployed.
//
// You can use the AWS CodeDeploy APIs to create, delete, get, list, and update
// deployment groups.
//
// * Instances represent Amazon EC2 instances to which application revisions
// are deployed. Instances are identified by their Amazon EC2 tags or Auto
// Scaling group names. Instances belong to deployment groups.
//
// You can use the AWS CodeDeploy APIs to get and list instance.
//
// * Deployments represent the process of deploying revisions to instances.
//
// You can use the AWS CodeDeploy APIs to create, get, list, and stop deployments.
//
// * Application revisions are archive files stored in Amazon S3 buckets
// or GitHub repositories. These revisions contain source content (such as
// source code, web pages, executable files, and deployment scripts) along
// with an application specification (AppSpec) file. (The AppSpec file is
// unique to AWS CodeDeploy; it defines the deployment actions you want AWS
// CodeDeploy to execute.) For application revisions stored in Amazon S3
// buckets, an application revision is uniquely identified by its Amazon
// S3 object key and its ETag, version, or both. For application revisions
// stored in GitHub repositories, an application revision is uniquely identified
// by its repository name and commit ID. Application revisions are deployed
// through deployment groups.
//
// You can use the AWS CodeDeploy APIs to get, list, and register application
// revisions.
//
// See https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06 for more information on this service.
//
// See codedeploy package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/codedeploy/
//
// Using the Client
//
// To use the client for AWS CodeDeploy you will first need
// to create a new instance of it.
//
// When creating a client for an AWS service you'll first need to have a Session
// already created. The Session provides configuration that can be shared
// between multiple service clients. Additional configuration can be applied to
// the Session and service's client when they are constructed. The aws package's
// Config type contains several fields such as Region for the AWS Region the
// client should make API requests too. The optional Config value can be provided
// as the variadic argument for Sessions and client creation.
//
// Once the service's client is created you can use it to make API requests the
// AWS service. These clients are safe to use concurrently.
//
// // Create a session to share configuration, and load external configuration.
// sess := session.Must(session.NewSession())
//
// // Create the service's client with the session.
// svc := codedeploy.New(sess)
//
// See the SDK's documentation for more information on how to use service clients.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
// See aws package's Config type for more information on configuration options.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the AWS CodeDeploy client CodeDeploy for more
// information on creating the service's client.
// https://docs.aws.amazon.com/sdk-for-go/api/service/codedeploy/#New
//
// Once the client is created you can make an API request to the service.
// Each API method takes a input parameter, and returns the service response
// and an error.
//
// The API method will document which error codes the service can be returned
// by the operation if the service models the API operation's errors. These
// errors will also be available as const strings prefixed with "ErrCode".
//
// result, err := svc.AddTagsToOnPremisesInstances(params)
// if err != nil {
// // Cast err to awserr.Error to handle specific error codes.
// aerr, ok := err.(awserr.Error)
// if ok && aerr.Code() == <error code to check for> {
// // Specific error code handling
// }
// return err
// }
//
// fmt.Println("AddTagsToOnPremisesInstances result:")
// fmt.Println(result)
//
// Using the Client with Context
//
// The service's client also provides methods to make API requests with a Context
// value. This allows you to control the timeout, and cancellation of pending
// requests. These methods also take request Option as variadic parameter to apply
// additional configuration to the API request.
//
// ctx := context.Background()
//
// result, err := svc.AddTagsToOnPremisesInstancesWithContext(ctx, params)
//
// See the request package documentation for more information on using Context pattern
// with the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package codedeploy

View file

@ -0,0 +1,495 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package codedeploy
const (
// ErrCodeAlarmsLimitExceededException for service response error code
// "AlarmsLimitExceededException".
//
// The maximum number of alarms for a deployment group (10) was exceeded.
ErrCodeAlarmsLimitExceededException = "AlarmsLimitExceededException"
// ErrCodeApplicationAlreadyExistsException for service response error code
// "ApplicationAlreadyExistsException".
//
// An application with the specified name already exists with the applicable
// IAM user or AWS account.
ErrCodeApplicationAlreadyExistsException = "ApplicationAlreadyExistsException"
// ErrCodeApplicationDoesNotExistException for service response error code
// "ApplicationDoesNotExistException".
//
// The application does not exist with the applicable IAM user or AWS account.
ErrCodeApplicationDoesNotExistException = "ApplicationDoesNotExistException"
// ErrCodeApplicationLimitExceededException for service response error code
// "ApplicationLimitExceededException".
//
// More applications were attempted to be created than are allowed.
ErrCodeApplicationLimitExceededException = "ApplicationLimitExceededException"
// ErrCodeApplicationNameRequiredException for service response error code
// "ApplicationNameRequiredException".
//
// The minimum number of required application names was not specified.
ErrCodeApplicationNameRequiredException = "ApplicationNameRequiredException"
// ErrCodeBatchLimitExceededException for service response error code
// "BatchLimitExceededException".
//
// The maximum number of names or IDs allowed for this request (100) was exceeded.
ErrCodeBatchLimitExceededException = "BatchLimitExceededException"
// ErrCodeBucketNameFilterRequiredException for service response error code
// "BucketNameFilterRequiredException".
//
// A bucket name is required, but was not provided.
ErrCodeBucketNameFilterRequiredException = "BucketNameFilterRequiredException"
// ErrCodeDeploymentAlreadyCompletedException for service response error code
// "DeploymentAlreadyCompletedException".
//
// The deployment is already complete.
ErrCodeDeploymentAlreadyCompletedException = "DeploymentAlreadyCompletedException"
// ErrCodeDeploymentConfigAlreadyExistsException for service response error code
// "DeploymentConfigAlreadyExistsException".
//
// A deployment configuration with the specified name already exists with the
// applicable IAM user or AWS account.
ErrCodeDeploymentConfigAlreadyExistsException = "DeploymentConfigAlreadyExistsException"
// ErrCodeDeploymentConfigDoesNotExistException for service response error code
// "DeploymentConfigDoesNotExistException".
//
// The deployment configuration does not exist with the applicable IAM user
// or AWS account.
ErrCodeDeploymentConfigDoesNotExistException = "DeploymentConfigDoesNotExistException"
// ErrCodeDeploymentConfigInUseException for service response error code
// "DeploymentConfigInUseException".
//
// The deployment configuration is still in use.
ErrCodeDeploymentConfigInUseException = "DeploymentConfigInUseException"
// ErrCodeDeploymentConfigLimitExceededException for service response error code
// "DeploymentConfigLimitExceededException".
//
// The deployment configurations limit was exceeded.
ErrCodeDeploymentConfigLimitExceededException = "DeploymentConfigLimitExceededException"
// ErrCodeDeploymentConfigNameRequiredException for service response error code
// "DeploymentConfigNameRequiredException".
//
// The deployment configuration name was not specified.
ErrCodeDeploymentConfigNameRequiredException = "DeploymentConfigNameRequiredException"
// ErrCodeDeploymentDoesNotExistException for service response error code
// "DeploymentDoesNotExistException".
//
// The deployment does not exist with the applicable IAM user or AWS account.
ErrCodeDeploymentDoesNotExistException = "DeploymentDoesNotExistException"
// ErrCodeDeploymentGroupAlreadyExistsException for service response error code
// "DeploymentGroupAlreadyExistsException".
//
// A deployment group with the specified name already exists with the applicable
// IAM user or AWS account.
ErrCodeDeploymentGroupAlreadyExistsException = "DeploymentGroupAlreadyExistsException"
// ErrCodeDeploymentGroupDoesNotExistException for service response error code
// "DeploymentGroupDoesNotExistException".
//
// The named deployment group does not exist with the applicable IAM user or
// AWS account.
ErrCodeDeploymentGroupDoesNotExistException = "DeploymentGroupDoesNotExistException"
// ErrCodeDeploymentGroupLimitExceededException for service response error code
// "DeploymentGroupLimitExceededException".
//
// The deployment groups limit was exceeded.
ErrCodeDeploymentGroupLimitExceededException = "DeploymentGroupLimitExceededException"
// ErrCodeDeploymentGroupNameRequiredException for service response error code
// "DeploymentGroupNameRequiredException".
//
// The deployment group name was not specified.
ErrCodeDeploymentGroupNameRequiredException = "DeploymentGroupNameRequiredException"
// ErrCodeDeploymentIdRequiredException for service response error code
// "DeploymentIdRequiredException".
//
// At least one deployment ID must be specified.
ErrCodeDeploymentIdRequiredException = "DeploymentIdRequiredException"
// ErrCodeDeploymentIsNotInReadyStateException for service response error code
// "DeploymentIsNotInReadyStateException".
//
// The deployment does not have a status of Ready and can't continue yet.
ErrCodeDeploymentIsNotInReadyStateException = "DeploymentIsNotInReadyStateException"
// ErrCodeDeploymentLimitExceededException for service response error code
// "DeploymentLimitExceededException".
//
// The number of allowed deployments was exceeded.
ErrCodeDeploymentLimitExceededException = "DeploymentLimitExceededException"
// ErrCodeDeploymentNotStartedException for service response error code
// "DeploymentNotStartedException".
//
// The specified deployment has not started.
ErrCodeDeploymentNotStartedException = "DeploymentNotStartedException"
// ErrCodeDescriptionTooLongException for service response error code
// "DescriptionTooLongException".
//
// The description is too long.
ErrCodeDescriptionTooLongException = "DescriptionTooLongException"
// ErrCodeIamArnRequiredException for service response error code
// "IamArnRequiredException".
//
// No IAM ARN was included in the request. You must use an IAM session ARN or
// IAM user ARN in the request.
ErrCodeIamArnRequiredException = "IamArnRequiredException"
// ErrCodeIamSessionArnAlreadyRegisteredException for service response error code
// "IamSessionArnAlreadyRegisteredException".
//
// The request included an IAM session ARN that has already been used to register
// a different instance.
ErrCodeIamSessionArnAlreadyRegisteredException = "IamSessionArnAlreadyRegisteredException"
// ErrCodeIamUserArnAlreadyRegisteredException for service response error code
// "IamUserArnAlreadyRegisteredException".
//
// The specified IAM user ARN is already registered with an on-premises instance.
ErrCodeIamUserArnAlreadyRegisteredException = "IamUserArnAlreadyRegisteredException"
// ErrCodeIamUserArnRequiredException for service response error code
// "IamUserArnRequiredException".
//
// An IAM user ARN was not specified.
ErrCodeIamUserArnRequiredException = "IamUserArnRequiredException"
// ErrCodeInstanceDoesNotExistException for service response error code
// "InstanceDoesNotExistException".
//
// The specified instance does not exist in the deployment group.
ErrCodeInstanceDoesNotExistException = "InstanceDoesNotExistException"
// ErrCodeInstanceIdRequiredException for service response error code
// "InstanceIdRequiredException".
//
// The instance ID was not specified.
ErrCodeInstanceIdRequiredException = "InstanceIdRequiredException"
// ErrCodeInstanceLimitExceededException for service response error code
// "InstanceLimitExceededException".
//
// The maximum number of allowed on-premises instances in a single call was
// exceeded.
ErrCodeInstanceLimitExceededException = "InstanceLimitExceededException"
// ErrCodeInstanceNameAlreadyRegisteredException for service response error code
// "InstanceNameAlreadyRegisteredException".
//
// The specified on-premises instance name is already registered.
ErrCodeInstanceNameAlreadyRegisteredException = "InstanceNameAlreadyRegisteredException"
// ErrCodeInstanceNameRequiredException for service response error code
// "InstanceNameRequiredException".
//
// An on-premises instance name was not specified.
ErrCodeInstanceNameRequiredException = "InstanceNameRequiredException"
// ErrCodeInstanceNotRegisteredException for service response error code
// "InstanceNotRegisteredException".
//
// The specified on-premises instance is not registered.
ErrCodeInstanceNotRegisteredException = "InstanceNotRegisteredException"
// ErrCodeInvalidAlarmConfigException for service response error code
// "InvalidAlarmConfigException".
//
// The format of the alarm configuration is invalid. Possible causes include:
//
// * The alarm list is null.
//
// * The alarm object is null.
//
// * The alarm name is empty or null or exceeds the 255 character limit.
//
// * Two alarms with the same name have been specified.
//
// * The alarm configuration is enabled but the alarm list is empty.
ErrCodeInvalidAlarmConfigException = "InvalidAlarmConfigException"
// ErrCodeInvalidApplicationNameException for service response error code
// "InvalidApplicationNameException".
//
// The application name was specified in an invalid format.
ErrCodeInvalidApplicationNameException = "InvalidApplicationNameException"
// ErrCodeInvalidAutoRollbackConfigException for service response error code
// "InvalidAutoRollbackConfigException".
//
// The automatic rollback configuration was specified in an invalid format.
// For example, automatic rollback is enabled but an invalid triggering event
// type or no event types were listed.
ErrCodeInvalidAutoRollbackConfigException = "InvalidAutoRollbackConfigException"
// ErrCodeInvalidAutoScalingGroupException for service response error code
// "InvalidAutoScalingGroupException".
//
// The Auto Scaling group was specified in an invalid format or does not exist.
ErrCodeInvalidAutoScalingGroupException = "InvalidAutoScalingGroupException"
// ErrCodeInvalidBlueGreenDeploymentConfigurationException for service response error code
// "InvalidBlueGreenDeploymentConfigurationException".
//
// The configuration for the blue/green deployment group was provided in an
// invalid format. For information about deployment configuration format, see
// CreateDeploymentConfig.
ErrCodeInvalidBlueGreenDeploymentConfigurationException = "InvalidBlueGreenDeploymentConfigurationException"
// ErrCodeInvalidBucketNameFilterException for service response error code
// "InvalidBucketNameFilterException".
//
// The bucket name either doesn't exist or was specified in an invalid format.
ErrCodeInvalidBucketNameFilterException = "InvalidBucketNameFilterException"
// ErrCodeInvalidDeployedStateFilterException for service response error code
// "InvalidDeployedStateFilterException".
//
// The deployed state filter was specified in an invalid format.
ErrCodeInvalidDeployedStateFilterException = "InvalidDeployedStateFilterException"
// ErrCodeInvalidDeploymentConfigNameException for service response error code
// "InvalidDeploymentConfigNameException".
//
// The deployment configuration name was specified in an invalid format.
ErrCodeInvalidDeploymentConfigNameException = "InvalidDeploymentConfigNameException"
// ErrCodeInvalidDeploymentGroupNameException for service response error code
// "InvalidDeploymentGroupNameException".
//
// The deployment group name was specified in an invalid format.
ErrCodeInvalidDeploymentGroupNameException = "InvalidDeploymentGroupNameException"
// ErrCodeInvalidDeploymentIdException for service response error code
// "InvalidDeploymentIdException".
//
// At least one of the deployment IDs was specified in an invalid format.
ErrCodeInvalidDeploymentIdException = "InvalidDeploymentIdException"
// ErrCodeInvalidDeploymentStatusException for service response error code
// "InvalidDeploymentStatusException".
//
// The specified deployment status doesn't exist or cannot be determined.
ErrCodeInvalidDeploymentStatusException = "InvalidDeploymentStatusException"
// ErrCodeInvalidDeploymentStyleException for service response error code
// "InvalidDeploymentStyleException".
//
// An invalid deployment style was specified. Valid deployment types include
// "IN_PLACE" and "BLUE_GREEN". Valid deployment options for blue/green deployments
// include "WITH_TRAFFIC_CONTROL" and "WITHOUT_TRAFFIC_CONTROL".
ErrCodeInvalidDeploymentStyleException = "InvalidDeploymentStyleException"
// ErrCodeInvalidEC2TagException for service response error code
// "InvalidEC2TagException".
//
// The tag was specified in an invalid format.
ErrCodeInvalidEC2TagException = "InvalidEC2TagException"
// ErrCodeInvalidIamSessionArnException for service response error code
// "InvalidIamSessionArnException".
//
// The IAM session ARN was specified in an invalid format.
ErrCodeInvalidIamSessionArnException = "InvalidIamSessionArnException"
// ErrCodeInvalidIamUserArnException for service response error code
// "InvalidIamUserArnException".
//
// The IAM user ARN was specified in an invalid format.
ErrCodeInvalidIamUserArnException = "InvalidIamUserArnException"
// ErrCodeInvalidInstanceNameException for service response error code
// "InvalidInstanceNameException".
//
// The specified on-premises instance name was specified in an invalid format.
ErrCodeInvalidInstanceNameException = "InvalidInstanceNameException"
// ErrCodeInvalidInstanceStatusException for service response error code
// "InvalidInstanceStatusException".
//
// The specified instance status does not exist.
ErrCodeInvalidInstanceStatusException = "InvalidInstanceStatusException"
// ErrCodeInvalidInstanceTypeException for service response error code
// "InvalidInstanceTypeException".
//
// An invalid instance type was specified for instances in a blue/green deployment.
// Valid values include "Blue" for an original environment and "Green" for a
// replacement environment.
ErrCodeInvalidInstanceTypeException = "InvalidInstanceTypeException"
// ErrCodeInvalidKeyPrefixFilterException for service response error code
// "InvalidKeyPrefixFilterException".
//
// The specified key prefix filter was specified in an invalid format.
ErrCodeInvalidKeyPrefixFilterException = "InvalidKeyPrefixFilterException"
// ErrCodeInvalidLoadBalancerInfoException for service response error code
// "InvalidLoadBalancerInfoException".
//
// An invalid load balancer name, or no load balancer name, was specified.
ErrCodeInvalidLoadBalancerInfoException = "InvalidLoadBalancerInfoException"
// ErrCodeInvalidMinimumHealthyHostValueException for service response error code
// "InvalidMinimumHealthyHostValueException".
//
// The minimum healthy instance value was specified in an invalid format.
ErrCodeInvalidMinimumHealthyHostValueException = "InvalidMinimumHealthyHostValueException"
// ErrCodeInvalidNextTokenException for service response error code
// "InvalidNextTokenException".
//
// The next token was specified in an invalid format.
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
// ErrCodeInvalidOperationException for service response error code
// "InvalidOperationException".
//
// An invalid operation was detected.
ErrCodeInvalidOperationException = "InvalidOperationException"
// ErrCodeInvalidRegistrationStatusException for service response error code
// "InvalidRegistrationStatusException".
//
// The registration status was specified in an invalid format.
ErrCodeInvalidRegistrationStatusException = "InvalidRegistrationStatusException"
// ErrCodeInvalidRevisionException for service response error code
// "InvalidRevisionException".
//
// The revision was specified in an invalid format.
ErrCodeInvalidRevisionException = "InvalidRevisionException"
// ErrCodeInvalidRoleException for service response error code
// "InvalidRoleException".
//
// The service role ARN was specified in an invalid format. Or, if an Auto Scaling
// group was specified, the specified service role does not grant the appropriate
// permissions to Auto Scaling.
ErrCodeInvalidRoleException = "InvalidRoleException"
// ErrCodeInvalidSortByException for service response error code
// "InvalidSortByException".
//
// The column name to sort by is either not present or was specified in an invalid
// format.
ErrCodeInvalidSortByException = "InvalidSortByException"
// ErrCodeInvalidSortOrderException for service response error code
// "InvalidSortOrderException".
//
// The sort order was specified in an invalid format.
ErrCodeInvalidSortOrderException = "InvalidSortOrderException"
// ErrCodeInvalidTagException for service response error code
// "InvalidTagException".
//
// The specified tag was specified in an invalid format.
ErrCodeInvalidTagException = "InvalidTagException"
// ErrCodeInvalidTagFilterException for service response error code
// "InvalidTagFilterException".
//
// The specified tag filter was specified in an invalid format.
ErrCodeInvalidTagFilterException = "InvalidTagFilterException"
// ErrCodeInvalidTargetInstancesException for service response error code
// "InvalidTargetInstancesException".
//
// The target instance configuration is invalid. Possible causes include:
//
// * Configuration data for target instances was entered for an in-place
// deployment.
//
// * The limit of 10 tags for a tag type was exceeded.
//
// * The combined length of the tag names exceeded the limit.
//
// * A specified tag is not currently applied to any instances.
ErrCodeInvalidTargetInstancesException = "InvalidTargetInstancesException"
// ErrCodeInvalidTimeRangeException for service response error code
// "InvalidTimeRangeException".
//
// The specified time range was specified in an invalid format.
ErrCodeInvalidTimeRangeException = "InvalidTimeRangeException"
// ErrCodeInvalidTriggerConfigException for service response error code
// "InvalidTriggerConfigException".
//
// The trigger was specified in an invalid format.
ErrCodeInvalidTriggerConfigException = "InvalidTriggerConfigException"
// ErrCodeLifecycleHookLimitExceededException for service response error code
// "LifecycleHookLimitExceededException".
//
// The limit for lifecycle hooks was exceeded.
ErrCodeLifecycleHookLimitExceededException = "LifecycleHookLimitExceededException"
// ErrCodeMultipleIamArnsProvidedException for service response error code
// "MultipleIamArnsProvidedException".
//
// Both an IAM user ARN and an IAM session ARN were included in the request.
// Use only one ARN type.
ErrCodeMultipleIamArnsProvidedException = "MultipleIamArnsProvidedException"
// ErrCodeRevisionDoesNotExistException for service response error code
// "RevisionDoesNotExistException".
//
// The named revision does not exist with the applicable IAM user or AWS account.
ErrCodeRevisionDoesNotExistException = "RevisionDoesNotExistException"
// ErrCodeRevisionRequiredException for service response error code
// "RevisionRequiredException".
//
// The revision ID was not specified.
ErrCodeRevisionRequiredException = "RevisionRequiredException"
// ErrCodeRoleRequiredException for service response error code
// "RoleRequiredException".
//
// The role ID was not specified.
ErrCodeRoleRequiredException = "RoleRequiredException"
// ErrCodeTagLimitExceededException for service response error code
// "TagLimitExceededException".
//
// The maximum allowed number of tags was exceeded.
ErrCodeTagLimitExceededException = "TagLimitExceededException"
// ErrCodeTagRequiredException for service response error code
// "TagRequiredException".
//
// A tag was not specified.
ErrCodeTagRequiredException = "TagRequiredException"
// ErrCodeTriggerTargetsLimitExceededException for service response error code
// "TriggerTargetsLimitExceededException".
//
// The maximum allowed number of triggers was exceeded.
ErrCodeTriggerTargetsLimitExceededException = "TriggerTargetsLimitExceededException"
// ErrCodeUnsupportedActionForDeploymentTypeException for service response error code
// "UnsupportedActionForDeploymentTypeException".
//
// A call was submitted that is not supported for the specified deployment type.
ErrCodeUnsupportedActionForDeploymentTypeException = "UnsupportedActionForDeploymentTypeException"
)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,95 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package codedeploy
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// CodeDeploy provides the API operation methods for making requests to
// AWS CodeDeploy. See this package's package overview docs
// for details on the service.
//
// CodeDeploy methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type CodeDeploy struct {
*client.Client
}
// Used for custom client initialization logic
var initClient func(*client.Client)
// Used for custom request initialization logic
var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "codedeploy" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)
// New creates a new instance of the CodeDeploy client with a session.
// If additional configuration is needed for the client instance use the optional
// aws.Config parameter to add your extra config.
//
// Example:
// // Create a CodeDeploy client from just a session.
// svc := codedeploy.New(mySession)
//
// // Create a CodeDeploy client with additional configuration
// svc := codedeploy.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CodeDeploy {
c := p.ClientConfig(EndpointsID, cfgs...)
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CodeDeploy {
svc := &CodeDeploy{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2014-10-06",
JSONVersion: "1.1",
TargetPrefix: "CodeDeploy_20141006",
},
handlers,
),
}
// Handlers
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
// Run custom client initialization if present
if initClient != nil {
initClient(svc.Client)
}
return svc
}
// newRequest creates a new request for a CodeDeploy operation and runs any
// custom request initialization.
func (c *CodeDeploy) newRequest(op *request.Operation, params, data interface{}) *request.Request {
req := c.NewRequest(op, params, data)
// Run custom request initialization if present
if initRequest != nil {
initRequest(req)
}
return req
}

View file

@ -0,0 +1,66 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package codedeploy
import (
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
)
// WaitUntilDeploymentSuccessful uses the CodeDeploy API operation
// GetDeployment to wait for a condition to be met before returning.
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *CodeDeploy) WaitUntilDeploymentSuccessful(input *GetDeploymentInput) error {
return c.WaitUntilDeploymentSuccessfulWithContext(aws.BackgroundContext(), input)
}
// WaitUntilDeploymentSuccessfulWithContext is an extended version of WaitUntilDeploymentSuccessful.
// With the support for passing in a context and options to configure the
// Waiter and the underlying request options.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CodeDeploy) WaitUntilDeploymentSuccessfulWithContext(ctx aws.Context, input *GetDeploymentInput, opts ...request.WaiterOption) error {
w := request.Waiter{
Name: "WaitUntilDeploymentSuccessful",
MaxAttempts: 120,
Delay: request.ConstantWaiterDelay(15 * time.Second),
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
Matcher: request.PathWaiterMatch, Argument: "deploymentInfo.status",
Expected: "Succeeded",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "deploymentInfo.status",
Expected: "Failed",
},
{
State: request.FailureWaiterState,
Matcher: request.PathWaiterMatch, Argument: "deploymentInfo.status",
Expected: "Stopped",
},
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
var inCpy *GetDeploymentInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.GetDeploymentRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
w.ApplyOptions(opts...)
return w.WaitWithContext(ctx)
}