Update Go AWS SDK to the latest version

This commit is contained in:
Andrey Smirnov
2019-07-13 00:03:55 +03:00
committed by Andrey Smirnov
parent d08be990ef
commit 94a72b23ff
2183 changed files with 885887 additions and 228114 deletions
File diff suppressed because it is too large Load Diff
@@ -26,7 +26,7 @@ import (
// // myFunc uses an SDK service client to make a request to
// // AWS CodeCommit.
// func myFunc(svc codecommitiface.CodeCommitAPI) bool {
// // Make svc.BatchGetRepositories request
// // Make svc.BatchDescribeMergeConflicts request
// }
//
// func main() {
@@ -42,7 +42,7 @@ import (
// type mockCodeCommitClient struct {
// codecommitiface.CodeCommitAPI
// }
// func (m *mockCodeCommitClient) BatchGetRepositories(input *codecommit.BatchGetRepositoriesInput) (*codecommit.BatchGetRepositoriesOutput, error) {
// func (m *mockCodeCommitClient) BatchDescribeMergeConflicts(input *codecommit.BatchDescribeMergeConflictsInput) (*codecommit.BatchDescribeMergeConflictsOutput, error) {
// // mock response/functionality
// }
//
@@ -60,6 +60,10 @@ import (
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type CodeCommitAPI interface {
BatchDescribeMergeConflicts(*codecommit.BatchDescribeMergeConflictsInput) (*codecommit.BatchDescribeMergeConflictsOutput, error)
BatchDescribeMergeConflictsWithContext(aws.Context, *codecommit.BatchDescribeMergeConflictsInput, ...request.Option) (*codecommit.BatchDescribeMergeConflictsOutput, error)
BatchDescribeMergeConflictsRequest(*codecommit.BatchDescribeMergeConflictsInput) (*request.Request, *codecommit.BatchDescribeMergeConflictsOutput)
BatchGetRepositories(*codecommit.BatchGetRepositoriesInput) (*codecommit.BatchGetRepositoriesOutput, error)
BatchGetRepositoriesWithContext(aws.Context, *codecommit.BatchGetRepositoriesInput, ...request.Option) (*codecommit.BatchGetRepositoriesOutput, error)
BatchGetRepositoriesRequest(*codecommit.BatchGetRepositoriesInput) (*request.Request, *codecommit.BatchGetRepositoriesOutput)
@@ -68,6 +72,10 @@ type CodeCommitAPI interface {
CreateBranchWithContext(aws.Context, *codecommit.CreateBranchInput, ...request.Option) (*codecommit.CreateBranchOutput, error)
CreateBranchRequest(*codecommit.CreateBranchInput) (*request.Request, *codecommit.CreateBranchOutput)
CreateCommit(*codecommit.CreateCommitInput) (*codecommit.CreateCommitOutput, error)
CreateCommitWithContext(aws.Context, *codecommit.CreateCommitInput, ...request.Option) (*codecommit.CreateCommitOutput, error)
CreateCommitRequest(*codecommit.CreateCommitInput) (*request.Request, *codecommit.CreateCommitOutput)
CreatePullRequest(*codecommit.CreatePullRequestInput) (*codecommit.CreatePullRequestOutput, error)
CreatePullRequestWithContext(aws.Context, *codecommit.CreatePullRequestInput, ...request.Option) (*codecommit.CreatePullRequestOutput, error)
CreatePullRequestRequest(*codecommit.CreatePullRequestInput) (*request.Request, *codecommit.CreatePullRequestOutput)
@@ -76,6 +84,10 @@ type CodeCommitAPI interface {
CreateRepositoryWithContext(aws.Context, *codecommit.CreateRepositoryInput, ...request.Option) (*codecommit.CreateRepositoryOutput, error)
CreateRepositoryRequest(*codecommit.CreateRepositoryInput) (*request.Request, *codecommit.CreateRepositoryOutput)
CreateUnreferencedMergeCommit(*codecommit.CreateUnreferencedMergeCommitInput) (*codecommit.CreateUnreferencedMergeCommitOutput, error)
CreateUnreferencedMergeCommitWithContext(aws.Context, *codecommit.CreateUnreferencedMergeCommitInput, ...request.Option) (*codecommit.CreateUnreferencedMergeCommitOutput, error)
CreateUnreferencedMergeCommitRequest(*codecommit.CreateUnreferencedMergeCommitInput) (*request.Request, *codecommit.CreateUnreferencedMergeCommitOutput)
DeleteBranch(*codecommit.DeleteBranchInput) (*codecommit.DeleteBranchOutput, error)
DeleteBranchWithContext(aws.Context, *codecommit.DeleteBranchInput, ...request.Option) (*codecommit.DeleteBranchOutput, error)
DeleteBranchRequest(*codecommit.DeleteBranchInput) (*request.Request, *codecommit.DeleteBranchOutput)
@@ -84,10 +96,21 @@ type CodeCommitAPI interface {
DeleteCommentContentWithContext(aws.Context, *codecommit.DeleteCommentContentInput, ...request.Option) (*codecommit.DeleteCommentContentOutput, error)
DeleteCommentContentRequest(*codecommit.DeleteCommentContentInput) (*request.Request, *codecommit.DeleteCommentContentOutput)
DeleteFile(*codecommit.DeleteFileInput) (*codecommit.DeleteFileOutput, error)
DeleteFileWithContext(aws.Context, *codecommit.DeleteFileInput, ...request.Option) (*codecommit.DeleteFileOutput, error)
DeleteFileRequest(*codecommit.DeleteFileInput) (*request.Request, *codecommit.DeleteFileOutput)
DeleteRepository(*codecommit.DeleteRepositoryInput) (*codecommit.DeleteRepositoryOutput, error)
DeleteRepositoryWithContext(aws.Context, *codecommit.DeleteRepositoryInput, ...request.Option) (*codecommit.DeleteRepositoryOutput, error)
DeleteRepositoryRequest(*codecommit.DeleteRepositoryInput) (*request.Request, *codecommit.DeleteRepositoryOutput)
DescribeMergeConflicts(*codecommit.DescribeMergeConflictsInput) (*codecommit.DescribeMergeConflictsOutput, error)
DescribeMergeConflictsWithContext(aws.Context, *codecommit.DescribeMergeConflictsInput, ...request.Option) (*codecommit.DescribeMergeConflictsOutput, error)
DescribeMergeConflictsRequest(*codecommit.DescribeMergeConflictsInput) (*request.Request, *codecommit.DescribeMergeConflictsOutput)
DescribeMergeConflictsPages(*codecommit.DescribeMergeConflictsInput, func(*codecommit.DescribeMergeConflictsOutput, bool) bool) error
DescribeMergeConflictsPagesWithContext(aws.Context, *codecommit.DescribeMergeConflictsInput, func(*codecommit.DescribeMergeConflictsOutput, bool) bool, ...request.Option) error
DescribePullRequestEvents(*codecommit.DescribePullRequestEventsInput) (*codecommit.DescribePullRequestEventsOutput, error)
DescribePullRequestEventsWithContext(aws.Context, *codecommit.DescribePullRequestEventsInput, ...request.Option) (*codecommit.DescribePullRequestEventsOutput, error)
DescribePullRequestEventsRequest(*codecommit.DescribePullRequestEventsInput) (*request.Request, *codecommit.DescribePullRequestEventsOutput)
@@ -132,10 +155,29 @@ type CodeCommitAPI interface {
GetDifferencesPages(*codecommit.GetDifferencesInput, func(*codecommit.GetDifferencesOutput, bool) bool) error
GetDifferencesPagesWithContext(aws.Context, *codecommit.GetDifferencesInput, func(*codecommit.GetDifferencesOutput, bool) bool, ...request.Option) error
GetFile(*codecommit.GetFileInput) (*codecommit.GetFileOutput, error)
GetFileWithContext(aws.Context, *codecommit.GetFileInput, ...request.Option) (*codecommit.GetFileOutput, error)
GetFileRequest(*codecommit.GetFileInput) (*request.Request, *codecommit.GetFileOutput)
GetFolder(*codecommit.GetFolderInput) (*codecommit.GetFolderOutput, error)
GetFolderWithContext(aws.Context, *codecommit.GetFolderInput, ...request.Option) (*codecommit.GetFolderOutput, error)
GetFolderRequest(*codecommit.GetFolderInput) (*request.Request, *codecommit.GetFolderOutput)
GetMergeCommit(*codecommit.GetMergeCommitInput) (*codecommit.GetMergeCommitOutput, error)
GetMergeCommitWithContext(aws.Context, *codecommit.GetMergeCommitInput, ...request.Option) (*codecommit.GetMergeCommitOutput, error)
GetMergeCommitRequest(*codecommit.GetMergeCommitInput) (*request.Request, *codecommit.GetMergeCommitOutput)
GetMergeConflicts(*codecommit.GetMergeConflictsInput) (*codecommit.GetMergeConflictsOutput, error)
GetMergeConflictsWithContext(aws.Context, *codecommit.GetMergeConflictsInput, ...request.Option) (*codecommit.GetMergeConflictsOutput, error)
GetMergeConflictsRequest(*codecommit.GetMergeConflictsInput) (*request.Request, *codecommit.GetMergeConflictsOutput)
GetMergeConflictsPages(*codecommit.GetMergeConflictsInput, func(*codecommit.GetMergeConflictsOutput, bool) bool) error
GetMergeConflictsPagesWithContext(aws.Context, *codecommit.GetMergeConflictsInput, func(*codecommit.GetMergeConflictsOutput, bool) bool, ...request.Option) error
GetMergeOptions(*codecommit.GetMergeOptionsInput) (*codecommit.GetMergeOptionsOutput, error)
GetMergeOptionsWithContext(aws.Context, *codecommit.GetMergeOptionsInput, ...request.Option) (*codecommit.GetMergeOptionsOutput, error)
GetMergeOptionsRequest(*codecommit.GetMergeOptionsInput) (*request.Request, *codecommit.GetMergeOptionsOutput)
GetPullRequest(*codecommit.GetPullRequestInput) (*codecommit.GetPullRequestOutput, error)
GetPullRequestWithContext(aws.Context, *codecommit.GetPullRequestInput, ...request.Option) (*codecommit.GetPullRequestOutput, error)
GetPullRequestRequest(*codecommit.GetPullRequestInput) (*request.Request, *codecommit.GetPullRequestOutput)
@@ -169,10 +211,34 @@ type CodeCommitAPI interface {
ListRepositoriesPages(*codecommit.ListRepositoriesInput, func(*codecommit.ListRepositoriesOutput, bool) bool) error
ListRepositoriesPagesWithContext(aws.Context, *codecommit.ListRepositoriesInput, func(*codecommit.ListRepositoriesOutput, bool) bool, ...request.Option) error
ListTagsForResource(*codecommit.ListTagsForResourceInput) (*codecommit.ListTagsForResourceOutput, error)
ListTagsForResourceWithContext(aws.Context, *codecommit.ListTagsForResourceInput, ...request.Option) (*codecommit.ListTagsForResourceOutput, error)
ListTagsForResourceRequest(*codecommit.ListTagsForResourceInput) (*request.Request, *codecommit.ListTagsForResourceOutput)
MergeBranchesByFastForward(*codecommit.MergeBranchesByFastForwardInput) (*codecommit.MergeBranchesByFastForwardOutput, error)
MergeBranchesByFastForwardWithContext(aws.Context, *codecommit.MergeBranchesByFastForwardInput, ...request.Option) (*codecommit.MergeBranchesByFastForwardOutput, error)
MergeBranchesByFastForwardRequest(*codecommit.MergeBranchesByFastForwardInput) (*request.Request, *codecommit.MergeBranchesByFastForwardOutput)
MergeBranchesBySquash(*codecommit.MergeBranchesBySquashInput) (*codecommit.MergeBranchesBySquashOutput, error)
MergeBranchesBySquashWithContext(aws.Context, *codecommit.MergeBranchesBySquashInput, ...request.Option) (*codecommit.MergeBranchesBySquashOutput, error)
MergeBranchesBySquashRequest(*codecommit.MergeBranchesBySquashInput) (*request.Request, *codecommit.MergeBranchesBySquashOutput)
MergeBranchesByThreeWay(*codecommit.MergeBranchesByThreeWayInput) (*codecommit.MergeBranchesByThreeWayOutput, error)
MergeBranchesByThreeWayWithContext(aws.Context, *codecommit.MergeBranchesByThreeWayInput, ...request.Option) (*codecommit.MergeBranchesByThreeWayOutput, error)
MergeBranchesByThreeWayRequest(*codecommit.MergeBranchesByThreeWayInput) (*request.Request, *codecommit.MergeBranchesByThreeWayOutput)
MergePullRequestByFastForward(*codecommit.MergePullRequestByFastForwardInput) (*codecommit.MergePullRequestByFastForwardOutput, error)
MergePullRequestByFastForwardWithContext(aws.Context, *codecommit.MergePullRequestByFastForwardInput, ...request.Option) (*codecommit.MergePullRequestByFastForwardOutput, error)
MergePullRequestByFastForwardRequest(*codecommit.MergePullRequestByFastForwardInput) (*request.Request, *codecommit.MergePullRequestByFastForwardOutput)
MergePullRequestBySquash(*codecommit.MergePullRequestBySquashInput) (*codecommit.MergePullRequestBySquashOutput, error)
MergePullRequestBySquashWithContext(aws.Context, *codecommit.MergePullRequestBySquashInput, ...request.Option) (*codecommit.MergePullRequestBySquashOutput, error)
MergePullRequestBySquashRequest(*codecommit.MergePullRequestBySquashInput) (*request.Request, *codecommit.MergePullRequestBySquashOutput)
MergePullRequestByThreeWay(*codecommit.MergePullRequestByThreeWayInput) (*codecommit.MergePullRequestByThreeWayOutput, error)
MergePullRequestByThreeWayWithContext(aws.Context, *codecommit.MergePullRequestByThreeWayInput, ...request.Option) (*codecommit.MergePullRequestByThreeWayOutput, error)
MergePullRequestByThreeWayRequest(*codecommit.MergePullRequestByThreeWayInput) (*request.Request, *codecommit.MergePullRequestByThreeWayOutput)
PostCommentForComparedCommit(*codecommit.PostCommentForComparedCommitInput) (*codecommit.PostCommentForComparedCommitOutput, error)
PostCommentForComparedCommitWithContext(aws.Context, *codecommit.PostCommentForComparedCommitInput, ...request.Option) (*codecommit.PostCommentForComparedCommitOutput, error)
PostCommentForComparedCommitRequest(*codecommit.PostCommentForComparedCommitInput) (*request.Request, *codecommit.PostCommentForComparedCommitOutput)
@@ -193,10 +259,18 @@ type CodeCommitAPI interface {
PutRepositoryTriggersWithContext(aws.Context, *codecommit.PutRepositoryTriggersInput, ...request.Option) (*codecommit.PutRepositoryTriggersOutput, error)
PutRepositoryTriggersRequest(*codecommit.PutRepositoryTriggersInput) (*request.Request, *codecommit.PutRepositoryTriggersOutput)
TagResource(*codecommit.TagResourceInput) (*codecommit.TagResourceOutput, error)
TagResourceWithContext(aws.Context, *codecommit.TagResourceInput, ...request.Option) (*codecommit.TagResourceOutput, error)
TagResourceRequest(*codecommit.TagResourceInput) (*request.Request, *codecommit.TagResourceOutput)
TestRepositoryTriggers(*codecommit.TestRepositoryTriggersInput) (*codecommit.TestRepositoryTriggersOutput, error)
TestRepositoryTriggersWithContext(aws.Context, *codecommit.TestRepositoryTriggersInput, ...request.Option) (*codecommit.TestRepositoryTriggersOutput, error)
TestRepositoryTriggersRequest(*codecommit.TestRepositoryTriggersInput) (*request.Request, *codecommit.TestRepositoryTriggersOutput)
UntagResource(*codecommit.UntagResourceInput) (*codecommit.UntagResourceOutput, error)
UntagResourceWithContext(aws.Context, *codecommit.UntagResourceInput, ...request.Option) (*codecommit.UntagResourceOutput, error)
UntagResourceRequest(*codecommit.UntagResourceInput) (*request.Request, *codecommit.UntagResourceOutput)
UpdateComment(*codecommit.UpdateCommentInput) (*codecommit.UpdateCommentOutput, error)
UpdateCommentWithContext(aws.Context, *codecommit.UpdateCommentInput, ...request.Option) (*codecommit.UpdateCommentOutput, error)
UpdateCommentRequest(*codecommit.UpdateCommentInput) (*request.Request, *codecommit.UpdateCommentOutput)
+63 -8
View File
@@ -45,14 +45,23 @@
//
// Files, by calling the following:
//
// * PutFile, which adds or modifies a file in a specified repository and
// * DeleteFile, which deletes the content of a specified file from a specified
// branch.
//
// Information about committed code in a repository, by calling the following:
//
// * GetBlob, which returns the base-64 encoded content of an individual
// Git blob object within a repository.
//
// * GetFile, which returns the base-64 encoded content of a specified file.
//
// * GetFolder, which returns the contents of a specified folder or directory.
//
// * PutFile, which adds or modifies a single file in a specified repository
// and branch.
//
// Commits, by calling the following:
//
// * CreateCommit, which creates a commit for changes to a repository.
//
// * GetCommit, which returns information about a commit, including commit
// messages and author and committer information.
//
@@ -60,6 +69,37 @@
// valid commit specifier (such as a branch, tag, HEAD, commit ID or other
// fully qualified reference).
//
// Merges, by calling the following:
//
// * BatchDescribeMergeConflicts, which returns information about conflicts
// in a merge between commits in a repository.
//
// * CreateUnreferencedMergeCommit, which creates an unreferenced commit
// between two branches or commits for the purpose of comparing them and
// identifying any potential conflicts.
//
// * DescribeMergeConflicts, which returns information about merge conflicts
// between the base, source, and destination versions of a file in a potential
// merge.
//
// * GetMergeCommit, which returns information about the merge between a
// source and destination commit.
//
// * GetMergeConflicts, which returns information about merge conflicts between
// the source and destination branch in a pull request.
//
// * GetMergeOptions, which returns information about the available merge
// options between two branches or commit specifiers.
//
// * MergeBranchesByFastForward, which merges two branches using the fast-forward
// merge option.
//
// * MergeBranchesBySquash, which merges two branches using the squash merge
// option.
//
// * MergeBranchesByThreeWay, which merges two branches using the three-way
// merge option.
//
// Pull requests, by calling the following:
//
// * CreatePullRequest, which creates a pull request in a specified repository.
@@ -70,9 +110,6 @@
// * GetCommentsForPullRequest, which returns information about comments
// on a specified pull request.
//
// * GetMergeConflicts, which returns information about merge conflicts between
// the source and destination branch in a pull request.
//
// * GetPullRequest, which returns information about a specified pull request.
//
// * ListPullRequests, which lists all pull requests for a repository.
@@ -81,6 +118,14 @@
// of a pull request into the specified destination branch for that pull
// request using the fast-forward merge option.
//
// * MergePullRequestBySquash, which merges the source destination branch
// of a pull request into the specified destination branch for that pull
// request using the squash merge option.
//
// * MergePullRequestByThreeWay. which merges the source destination branch
// of a pull request into the specified destination branch for that pull
// request using the three-way merge option.
//
// * PostCommentForPullRequest, which posts a comment to a pull request at
// the specified line, file, or request.
//
@@ -91,7 +136,7 @@
//
// * UpdatePullRequestTitle, which updates the title of a pull request.
//
// Information about comments in a repository, by calling the following:
// Comments in a repository, by calling the following:
//
// * DeleteCommentContent, which deletes the content of a comment on a commit
// in a repository.
@@ -109,6 +154,16 @@
// * UpdateComment, which updates the content of a comment on a commit in
// a repository.
//
// Tags used to tag resources in AWS CodeCommit (not Git tags), by calling the
// following:
//
// * ListTagsForResource, which gets information about AWS tags for a specified
// Amazon Resource Name (ARN) in AWS CodeCommit.
//
// * TagResource, which adds or updates tags for a resource in AWS CodeCommit.
//
// * UntagResource, which removes tags for a resource in AWS CodeCommit.
//
// Triggers, by calling the following:
//
// * GetRepositoryTriggers, which returns information about triggers configured
@@ -121,7 +176,7 @@
// trigger by sending data to the trigger target.
//
// For information about how to use AWS CodeCommit, see the AWS CodeCommit User
// Guide (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html).
// Guide (https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html).
//
// See https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13 for more information on this service.
//
+263 -12
View File
@@ -189,6 +189,14 @@ const (
// The encryption key is not available.
ErrCodeEncryptionKeyUnavailableException = "EncryptionKeyUnavailableException"
// ErrCodeFileContentAndSourceFileSpecifiedException for service response error code
// "FileContentAndSourceFileSpecifiedException".
//
// The commit cannot be created because both a source file and file content
// have been specified for the same file. You cannot provide both. Either specify
// a source file, or provide the file content directly.
ErrCodeFileContentAndSourceFileSpecifiedException = "FileContentAndSourceFileSpecifiedException"
// ErrCodeFileContentRequiredException for service response error code
// "FileContentRequiredException".
//
@@ -200,10 +208,31 @@ const (
// "FileContentSizeLimitExceededException".
//
// The file cannot be added because it is too large. The maximum file size that
// can be added using PutFile is 6 MB. For files larger than 6 MB but smaller
// than 2 GB, add them using a Git client.
// can be added is 6 MB, and the combined file content change size is 7 MB.
// Consider making these changes using a Git client.
ErrCodeFileContentSizeLimitExceededException = "FileContentSizeLimitExceededException"
// ErrCodeFileDoesNotExistException for service response error code
// "FileDoesNotExistException".
//
// The specified file does not exist. Verify that you have provided the correct
// name of the file, including its full path and extension.
ErrCodeFileDoesNotExistException = "FileDoesNotExistException"
// ErrCodeFileEntryRequiredException for service response error code
// "FileEntryRequiredException".
//
// The commit cannot be created because no files have been specified as added,
// updated, or changed (PutFile or DeleteFile) for the commit.
ErrCodeFileEntryRequiredException = "FileEntryRequiredException"
// ErrCodeFileModeRequiredException for service response error code
// "FileModeRequiredException".
//
// The commit cannot be created because a file mode is required to update mode
// permissions for an existing file, but no file mode has been specified.
ErrCodeFileModeRequiredException = "FileModeRequiredException"
// ErrCodeFileNameConflictsWithDirectoryNameException for service response error code
// "FileNameConflictsWithDirectoryNameException".
//
@@ -213,14 +242,38 @@ const (
// file name.
ErrCodeFileNameConflictsWithDirectoryNameException = "FileNameConflictsWithDirectoryNameException"
// ErrCodeFilePathConflictsWithSubmodulePathException for service response error code
// "FilePathConflictsWithSubmodulePathException".
//
// The commit cannot be created because a specified file path points to a submodule.
// Verify that the destination files have valid file paths that do not point
// to a submodule.
ErrCodeFilePathConflictsWithSubmodulePathException = "FilePathConflictsWithSubmodulePathException"
// ErrCodeFileTooLargeException for service response error code
// "FileTooLargeException".
//
// The specified file exceeds the file size limit for AWS CodeCommit. For more
// information about limits in AWS CodeCommit, see AWS CodeCommit User Guide
// (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html).
// (https://docs.aws.amazon.com/codecommit/latest/userguide/limits.html).
ErrCodeFileTooLargeException = "FileTooLargeException"
// ErrCodeFolderContentSizeLimitExceededException for service response error code
// "FolderContentSizeLimitExceededException".
//
// The commit cannot be created because at least one of the overall changes
// in the commit results in a folder whose contents exceed the limit of 6 MB.
// Either reduce the number and size of your changes, or split the changes across
// multiple folders.
ErrCodeFolderContentSizeLimitExceededException = "FolderContentSizeLimitExceededException"
// ErrCodeFolderDoesNotExistException for service response error code
// "FolderDoesNotExistException".
//
// The specified folder does not exist. Either the folder name is not correct,
// or you did not provide the full path to the folder.
ErrCodeFolderDoesNotExistException = "FolderDoesNotExistException"
// ErrCodeIdempotencyParameterMismatchException for service response error code
// "IdempotencyParameterMismatchException".
//
@@ -280,12 +333,36 @@ const (
// The specified commit ID is not valid.
ErrCodeInvalidCommitIdException = "InvalidCommitIdException"
// ErrCodeInvalidConflictDetailLevelException for service response error code
// "InvalidConflictDetailLevelException".
//
// The specified conflict detail level is not valid.
ErrCodeInvalidConflictDetailLevelException = "InvalidConflictDetailLevelException"
// ErrCodeInvalidConflictResolutionException for service response error code
// "InvalidConflictResolutionException".
//
// The specified conflict resolution list is not valid.
ErrCodeInvalidConflictResolutionException = "InvalidConflictResolutionException"
// ErrCodeInvalidConflictResolutionStrategyException for service response error code
// "InvalidConflictResolutionStrategyException".
//
// The specified conflict resolution strategy is not valid.
ErrCodeInvalidConflictResolutionStrategyException = "InvalidConflictResolutionStrategyException"
// ErrCodeInvalidContinuationTokenException for service response error code
// "InvalidContinuationTokenException".
//
// The specified continuation token is not valid.
ErrCodeInvalidContinuationTokenException = "InvalidContinuationTokenException"
// ErrCodeInvalidDeletionParameterException for service response error code
// "InvalidDeletionParameterException".
//
// The specified deletion parameter is not valid.
ErrCodeInvalidDeletionParameterException = "InvalidDeletionParameterException"
// ErrCodeInvalidDescriptionException for service response error code
// "InvalidDescriptionException".
//
@@ -329,6 +406,18 @@ const (
// of the file you want to comment on.
ErrCodeInvalidFilePositionException = "InvalidFilePositionException"
// ErrCodeInvalidMaxConflictFilesException for service response error code
// "InvalidMaxConflictFilesException".
//
// The specified value for the number of conflict files to return is not valid.
ErrCodeInvalidMaxConflictFilesException = "InvalidMaxConflictFilesException"
// ErrCodeInvalidMaxMergeHunksException for service response error code
// "InvalidMaxMergeHunksException".
//
// The specified value for the number of merge hunks to return is not valid.
ErrCodeInvalidMaxMergeHunksException = "InvalidMaxMergeHunksException"
// ErrCodeInvalidMaxResultsException for service response error code
// "InvalidMaxResultsException".
//
@@ -338,7 +427,8 @@ const (
// ErrCodeInvalidMergeOptionException for service response error code
// "InvalidMergeOptionException".
//
// The specified merge option is not valid. The only valid value is FAST_FORWARD_MERGE.
// The specified merge option is not valid for this operation. Not all merge
// strategies are supported for all operations.
ErrCodeInvalidMergeOptionException = "InvalidMergeOptionException"
// ErrCodeInvalidOrderException for service response error code
@@ -405,6 +495,20 @@ const (
// is not valid in respect to the current file version.
ErrCodeInvalidRelativeFileVersionEnumException = "InvalidRelativeFileVersionEnumException"
// ErrCodeInvalidReplacementContentException for service response error code
// "InvalidReplacementContentException".
//
// Automerge was specified for resolving the conflict, but the replacement type
// is not valid or content is missing.
ErrCodeInvalidReplacementContentException = "InvalidReplacementContentException"
// ErrCodeInvalidReplacementTypeException for service response error code
// "InvalidReplacementTypeException".
//
// Automerge was specified for resolving the conflict, but the specified replacement
// type is not valid.
ErrCodeInvalidReplacementTypeException = "InvalidReplacementTypeException"
// ErrCodeInvalidRepositoryDescriptionException for service response error code
// "InvalidRepositoryDescriptionException".
//
@@ -461,6 +565,14 @@ const (
// Triggers must be created in the same region as the target for the trigger.
ErrCodeInvalidRepositoryTriggerRegionException = "InvalidRepositoryTriggerRegionException"
// ErrCodeInvalidResourceArnException for service response error code
// "InvalidResourceArnException".
//
// The value for the resource ARN is not valid. For more information about resources
// in AWS CodeCommit, see CodeCommit Resources and Operations (https://docs.aws.amazon.com/codecommit/latest/userguide/auth-and-access-control-iam-access-control-identity-based.html#arn-formats)
// in the AWS CodeCommit User Guide.
ErrCodeInvalidResourceArnException = "InvalidResourceArnException"
// ErrCodeInvalidSortByException for service response error code
// "InvalidSortByException".
//
@@ -474,6 +586,30 @@ const (
// name, tag, or full commit ID.
ErrCodeInvalidSourceCommitSpecifierException = "InvalidSourceCommitSpecifierException"
// ErrCodeInvalidSystemTagUsageException for service response error code
// "InvalidSystemTagUsageException".
//
// The specified tag is not valid. Key names cannot be prefixed with aws:.
ErrCodeInvalidSystemTagUsageException = "InvalidSystemTagUsageException"
// ErrCodeInvalidTagKeysListException for service response error code
// "InvalidTagKeysListException".
//
// The list of tags is not valid.
ErrCodeInvalidTagKeysListException = "InvalidTagKeysListException"
// ErrCodeInvalidTagsMapException for service response error code
// "InvalidTagsMapException".
//
// The map of tags is not valid.
ErrCodeInvalidTagsMapException = "InvalidTagsMapException"
// ErrCodeInvalidTargetBranchException for service response error code
// "InvalidTargetBranchException".
//
// The specified target branch is not valid.
ErrCodeInvalidTargetBranchException = "InvalidTargetBranchException"
// ErrCodeInvalidTargetException for service response error code
// "InvalidTargetException".
//
@@ -511,6 +647,33 @@ const (
// The number of branches for the trigger was exceeded.
ErrCodeMaximumBranchesExceededException = "MaximumBranchesExceededException"
// ErrCodeMaximumConflictResolutionEntriesExceededException for service response error code
// "MaximumConflictResolutionEntriesExceededException".
//
// The number of allowed conflict resolution entries was exceeded.
ErrCodeMaximumConflictResolutionEntriesExceededException = "MaximumConflictResolutionEntriesExceededException"
// ErrCodeMaximumFileContentToLoadExceededException for service response error code
// "MaximumFileContentToLoadExceededException".
//
// The number of files to load exceeds the allowed limit.
ErrCodeMaximumFileContentToLoadExceededException = "MaximumFileContentToLoadExceededException"
// ErrCodeMaximumFileEntriesExceededException for service response error code
// "MaximumFileEntriesExceededException".
//
// The number of specified files to change as part of this commit exceeds the
// maximum number of files that can be changed in a single commit. Consider
// using a Git client for these changes.
ErrCodeMaximumFileEntriesExceededException = "MaximumFileEntriesExceededException"
// ErrCodeMaximumItemsToCompareExceededException for service response error code
// "MaximumItemsToCompareExceededException".
//
// The maximum number of items to compare between the source or destination
// branches and the merge base has exceeded the maximum allowed.
ErrCodeMaximumItemsToCompareExceededException = "MaximumItemsToCompareExceededException"
// ErrCodeMaximumOpenPullRequestsExceededException for service response error code
// "MaximumOpenPullRequestsExceededException".
//
@@ -538,6 +701,13 @@ const (
// A merge option or stategy is required, and none was provided.
ErrCodeMergeOptionRequiredException = "MergeOptionRequiredException"
// ErrCodeMultipleConflictResolutionEntriesException for service response error code
// "MultipleConflictResolutionEntriesException".
//
// More than one conflict resolution entries exists for the conflict. A conflict
// can have only one conflict resolution entry.
ErrCodeMultipleConflictResolutionEntriesException = "MultipleConflictResolutionEntriesException"
// ErrCodeMultipleRepositoriesInPullRequestException for service response error code
// "MultipleRepositoriesInPullRequestException".
//
@@ -549,16 +719,22 @@ const (
// ErrCodeNameLengthExceededException for service response error code
// "NameLengthExceededException".
//
// The file name is not valid because it has exceeded the character limit for
// file names. File names, including the path to the file, cannot exceed the
// character limit.
// The user name is not valid because it has exceeded the character limit for
// author names.
ErrCodeNameLengthExceededException = "NameLengthExceededException"
// ErrCodeNoChangeException for service response error code
// "NoChangeException".
//
// The commit cannot be created because no changes will be made to the repository
// as a result of this commit. A commit must contain at least one change.
ErrCodeNoChangeException = "NoChangeException"
// ErrCodeParentCommitDoesNotExistException for service response error code
// "ParentCommitDoesNotExistException".
//
// The parent commit ID is not valid. The specified parent commit ID does not
// exist in the specified branch of the repository.
// The parent commit ID is not valid because it does not exist. The specified
// parent commit ID does not exist in the specified branch of the repository.
ErrCodeParentCommitDoesNotExistException = "ParentCommitDoesNotExistException"
// ErrCodeParentCommitIdOutdatedException for service response error code
@@ -586,7 +762,7 @@ const (
// ErrCodePathRequiredException for service response error code
// "PathRequiredException".
//
// The filePath for a location cannot be empty or null.
// The folderPath for a location cannot be null.
ErrCodePathRequiredException = "PathRequiredException"
// ErrCodePullRequestAlreadyClosedException for service response error code
@@ -614,6 +790,13 @@ const (
// A pull request status is required, but none was provided.
ErrCodePullRequestStatusRequiredException = "PullRequestStatusRequiredException"
// ErrCodePutFileEntryConflictException for service response error code
// "PutFileEntryConflictException".
//
// The commit cannot be created because one or more files specified in the commit
// reference both a file and a folder.
ErrCodePutFileEntryConflictException = "PutFileEntryConflictException"
// ErrCodeReferenceDoesNotExistException for service response error code
// "ReferenceDoesNotExistException".
//
@@ -632,6 +815,18 @@ const (
// The specified reference is not a supported type.
ErrCodeReferenceTypeNotSupportedException = "ReferenceTypeNotSupportedException"
// ErrCodeReplacementContentRequiredException for service response error code
// "ReplacementContentRequiredException".
//
// USE_NEW_CONTENT was specified but no replacement content has been provided.
ErrCodeReplacementContentRequiredException = "ReplacementContentRequiredException"
// ErrCodeReplacementTypeRequiredException for service response error code
// "ReplacementTypeRequiredException".
//
// A replacement type is required.
ErrCodeReplacementTypeRequiredException = "ReplacementTypeRequiredException"
// ErrCodeRepositoryDoesNotExistException for service response error code
// "RepositoryDoesNotExistException".
//
@@ -666,8 +861,8 @@ const (
// "RepositoryNotAssociatedWithPullRequestException".
//
// The repository does not contain any pull requests with that pull request
// ID. Check to make sure you have provided the correct repository name for
// the pull request.
// ID. Use GetPullRequest to verify the correct repository name for the pull
// request ID.
ErrCodeRepositoryNotAssociatedWithPullRequestException = "RepositoryNotAssociatedWithPullRequestException"
// ErrCodeRepositoryTriggerBranchNameListRequiredException for service response error code
@@ -702,6 +897,22 @@ const (
// The list of triggers for the repository is required but was not specified.
ErrCodeRepositoryTriggersListRequiredException = "RepositoryTriggersListRequiredException"
// ErrCodeResourceArnRequiredException for service response error code
// "ResourceArnRequiredException".
//
// A valid Amazon Resource Name (ARN) for an AWS CodeCommit resource is required.
// For a list of valid resources in AWS CodeCommit, see CodeCommit Resources
// and Operations (https://docs.aws.amazon.com/codecommit/latest/userguide/auth-and-access-control-iam-access-control-identity-based.html#arn-formats)
// in the AWS CodeCommit User Guide.
ErrCodeResourceArnRequiredException = "ResourceArnRequiredException"
// ErrCodeRestrictedSourceFileException for service response error code
// "RestrictedSourceFileException".
//
// The commit cannot be created because one of the changes specifies copying
// or moving a .gitkeep file.
ErrCodeRestrictedSourceFileException = "RestrictedSourceFileException"
// ErrCodeSameFileContentException for service response error code
// "SameFileContentException".
//
@@ -710,6 +921,15 @@ const (
// specified.
ErrCodeSameFileContentException = "SameFileContentException"
// ErrCodeSamePathRequestException for service response error code
// "SamePathRequestException".
//
// The commit cannot be created because one or more changes in this commit duplicate
// actions in the same file path. For example, you cannot make the same delete
// request to the same file in the same file path twice, or make a delete request
// and a move request to the same file as part of the same commit.
ErrCodeSamePathRequestException = "SamePathRequestException"
// ErrCodeSourceAndDestinationAreSameException for service response error code
// "SourceAndDestinationAreSameException".
//
@@ -717,6 +937,31 @@ const (
// same. You must specify different branches for the source and destination.
ErrCodeSourceAndDestinationAreSameException = "SourceAndDestinationAreSameException"
// ErrCodeSourceFileOrContentRequiredException for service response error code
// "SourceFileOrContentRequiredException".
//
// The commit cannot be created because no source files or file content have
// been specified for the commit.
ErrCodeSourceFileOrContentRequiredException = "SourceFileOrContentRequiredException"
// ErrCodeTagKeysListRequiredException for service response error code
// "TagKeysListRequiredException".
//
// A list of tag keys is required. The list cannot be empty or null.
ErrCodeTagKeysListRequiredException = "TagKeysListRequiredException"
// ErrCodeTagPolicyException for service response error code
// "TagPolicyException".
//
// The tag policy is not valid.
ErrCodeTagPolicyException = "TagPolicyException"
// ErrCodeTagsMapRequiredException for service response error code
// "TagsMapRequiredException".
//
// A map of tags is required.
ErrCodeTagsMapRequiredException = "TagsMapRequiredException"
// ErrCodeTargetRequiredException for service response error code
// "TargetRequiredException".
//
@@ -752,4 +997,10 @@ const (
//
// A pull request title is required. It cannot be empty or null.
ErrCodeTitleRequiredException = "TitleRequiredException"
// ErrCodeTooManyTagsException for service response error code
// "TooManyTagsException".
//
// The maximum number of tags for an AWS CodeCommit resource has been exceeded.
ErrCodeTooManyTagsException = "TooManyTagsException"
)
+58
View File
@@ -0,0 +1,58 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// +build go1.10,integration
package codecommit_test
import (
"context"
"testing"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/awstesting/integration"
"github.com/aws/aws-sdk-go/service/codecommit"
)
var _ aws.Config
var _ awserr.Error
var _ request.Request
func TestInteg_00_ListRepositories(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-west-2")
svc := codecommit.New(sess)
params := &codecommit.ListRepositoriesInput{}
_, err := svc.ListRepositoriesWithContext(ctx, params)
if err != nil {
t.Errorf("expect no error, got %v", err)
}
}
func TestInteg_01_ListBranches(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-west-2")
svc := codecommit.New(sess)
params := &codecommit.ListBranchesInput{
RepositoryName: aws.String("fake-repo"),
}
_, err := svc.ListBranchesWithContext(ctx, params)
if err == nil {
t.Fatalf("expect request to fail")
}
aerr, ok := err.(awserr.RequestFailure)
if !ok {
t.Fatalf("expect awserr, was %T", err)
}
if len(aerr.Code()) == 0 {
t.Errorf("expect non-empty error code")
}
if v := aerr.Code(); v == request.ErrCodeSerialization {
t.Errorf("expect API error code got serialization failure")
}
}
+4 -2
View File
@@ -29,8 +29,9 @@ var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "codecommit" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
ServiceName = "codecommit" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "CodeCommit" // ServiceID is a unique identifer of a specific service.
)
// New creates a new instance of the CodeCommit client with a session.
@@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,