You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::CodeCommit::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::CodeCommit::Client
- Defined in:
- (unknown)
Overview
An API client for AWS CodeCommit. To construct a client, you need to configure a :region
and :credentials
.
codecommit = Aws::CodeCommit::Client.new(
region: region_name,
credentials: credentials,
# ...
)
See #initialize for a full list of supported configuration options.
Region
You can configure a default region in the following locations:
ENV['AWS_REGION']
Aws.config[:region]
Go here for a list of supported regions.
Credentials
Default credentials are loaded automatically from the following locations:
ENV['AWS_ACCESS_KEY_ID']
andENV['AWS_SECRET_ACCESS_KEY']
Aws.config[:credentials]
- The shared credentials ini file at
~/.aws/credentials
(more information) - From an instance profile when running on EC2
You can also construct a credentials object from one of the following classes:
Alternatively, you configure credentials with :access_key_id
and
:secret_access_key
:
# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))
Aws::CodeCommit::Client.new(
access_key_id: creds['access_key_id'],
secret_access_key: creds['secret_access_key']
)
Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
Constructor collapse
-
#initialize(options = {}) ⇒ Aws::CodeCommit::Client
constructor
Constructs an API client.
API Operations collapse
-
#associate_approval_rule_template_with_repository(options = {}) ⇒ Struct
Creates an association between an approval rule template and a specified repository.
-
#batch_associate_approval_rule_template_with_repositories(options = {}) ⇒ Types::BatchAssociateApprovalRuleTemplateWithRepositoriesOutput
Creates an association between an approval rule template and one or more specified repositories.
-
#batch_describe_merge_conflicts(options = {}) ⇒ Types::BatchDescribeMergeConflictsOutput
Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.
.
-
#batch_disassociate_approval_rule_template_from_repositories(options = {}) ⇒ Types::BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput
Removes the association between an approval rule template and one or more specified repositories.
-
#batch_get_commits(options = {}) ⇒ Types::BatchGetCommitsOutput
Returns information about the contents of one or more commits in a repository.
.
-
#batch_get_repositories(options = {}) ⇒ Types::BatchGetRepositoriesOutput
Returns information about one or more repositories.
The description field for a repository accepts all HTML characters and all valid Unicode characters.
-
#create_approval_rule_template(options = {}) ⇒ Types::CreateApprovalRuleTemplateOutput
Creates a template for approval rules that can then be associated with one or more repositories in your AWS account.
-
#create_branch(options = {}) ⇒ Struct
Creates a branch in a repository and points the branch to a commit.
Calling the create branch operation does not set a repository's default branch.
-
#create_commit(options = {}) ⇒ Types::CreateCommitOutput
Creates a commit for a repository on the tip of a specified branch.
.
-
#create_pull_request(options = {}) ⇒ Types::CreatePullRequestOutput
Creates a pull request in the specified repository.
.
-
#create_pull_request_approval_rule(options = {}) ⇒ Types::CreatePullRequestApprovalRuleOutput
Creates an approval rule for a pull request.
.
-
#create_repository(options = {}) ⇒ Types::CreateRepositoryOutput
Creates a new, empty repository.
.
-
#create_unreferenced_merge_commit(options = {}) ⇒ Types::CreateUnreferencedMergeCommitOutput
Creates an unreferenced commit that represents the result of merging two branches using a specified merge strategy.
-
#delete_approval_rule_template(options = {}) ⇒ Types::DeleteApprovalRuleTemplateOutput
Deletes a specified approval rule template.
-
#delete_branch(options = {}) ⇒ Types::DeleteBranchOutput
Deletes a branch from a repository, unless that branch is the default branch for the repository.
-
#delete_comment_content(options = {}) ⇒ Types::DeleteCommentContentOutput
Deletes the content of a comment made on a change, file, or commit in a repository.
.
-
#delete_file(options = {}) ⇒ Types::DeleteFileOutput
Deletes a specified file from a specified branch.
-
#delete_pull_request_approval_rule(options = {}) ⇒ Types::DeletePullRequestApprovalRuleOutput
Deletes an approval rule from a specified pull request.
-
#delete_repository(options = {}) ⇒ Types::DeleteRepositoryOutput
Deletes a repository.
-
#describe_merge_conflicts(options = {}) ⇒ Types::DescribeMergeConflictsOutput
Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.
-
#describe_pull_request_events(options = {}) ⇒ Types::DescribePullRequestEventsOutput
Returns information about one or more pull request events.
.
-
#disassociate_approval_rule_template_from_repository(options = {}) ⇒ Struct
Removes the association between a template and a repository so that approval rules based on the template are not automatically created when pull requests are created in the specified repository.
-
#evaluate_pull_request_approval_rules(options = {}) ⇒ Types::EvaluatePullRequestApprovalRulesOutput
Evaluates whether a pull request has met all the conditions specified in its associated approval rules.
.
-
#get_approval_rule_template(options = {}) ⇒ Types::GetApprovalRuleTemplateOutput
Returns information about a specified approval rule template.
.
-
#get_blob(options = {}) ⇒ Types::GetBlobOutput
Returns the base-64 encoded content of an individual blob in a repository.
.
-
#get_branch(options = {}) ⇒ Types::GetBranchOutput
Returns information about a repository branch, including its name and the last commit ID.
.
-
#get_comment(options = {}) ⇒ Types::GetCommentOutput
Returns the content of a comment made on a change, file, or commit in a repository.
-
#get_comment_reactions(options = {}) ⇒ Types::GetCommentReactionsOutput
Returns information about reactions to a specified comment ID.
-
#get_comments_for_compared_commit(options = {}) ⇒ Types::GetCommentsForComparedCommitOutput
Returns information about comments made on the comparison between two commits.
Reaction counts might include numbers from user identities who were deleted after the reaction was made.
-
#get_comments_for_pull_request(options = {}) ⇒ Types::GetCommentsForPullRequestOutput
Returns comments made on a pull request.
Reaction counts might include numbers from user identities who were deleted after the reaction was made.
-
#get_commit(options = {}) ⇒ Types::GetCommitOutput
Returns information about a commit, including commit message and committer information.
.
-
#get_differences(options = {}) ⇒ Types::GetDifferencesOutput
Returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID, or other fully qualified reference).
-
#get_file(options = {}) ⇒ Types::GetFileOutput
Returns the base-64 encoded contents of a specified file and its metadata.
.
-
#get_folder(options = {}) ⇒ Types::GetFolderOutput
Returns the contents of a specified folder in a repository.
.
-
#get_merge_commit(options = {}) ⇒ Types::GetMergeCommitOutput
Returns information about a specified merge commit.
.
-
#get_merge_conflicts(options = {}) ⇒ Types::GetMergeConflictsOutput
Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.
.
-
#get_merge_options(options = {}) ⇒ Types::GetMergeOptionsOutput
Returns information about the merge options available for merging two specified branches.
-
#get_pull_request(options = {}) ⇒ Types::GetPullRequestOutput
Gets information about a pull request in a specified repository.
.
-
#get_pull_request_approval_states(options = {}) ⇒ Types::GetPullRequestApprovalStatesOutput
Gets information about the approval states for a specified pull request.
-
#get_pull_request_override_state(options = {}) ⇒ Types::GetPullRequestOverrideStateOutput
Returns information about whether approval rules have been set aside (overridden) for a pull request, and if so, the Amazon Resource Name (ARN) of the user or identity that overrode the rules and their requirements for the pull request.
.
-
#get_repository(options = {}) ⇒ Types::GetRepositoryOutput
Returns information about a repository.
The description field for a repository accepts all HTML characters and all valid Unicode characters.
-
#get_repository_triggers(options = {}) ⇒ Types::GetRepositoryTriggersOutput
Gets information about triggers configured for a repository.
.
-
#list_approval_rule_templates(options = {}) ⇒ Types::ListApprovalRuleTemplatesOutput
Lists all approval rule templates in the specified AWS Region in your AWS account.
-
#list_associated_approval_rule_templates_for_repository(options = {}) ⇒ Types::ListAssociatedApprovalRuleTemplatesForRepositoryOutput
Lists all approval rule templates that are associated with a specified repository.
.
-
#list_branches(options = {}) ⇒ Types::ListBranchesOutput
Gets information about one or more branches in a repository.
.
-
#list_pull_requests(options = {}) ⇒ Types::ListPullRequestsOutput
Returns a list of pull requests for a specified repository.
-
#list_repositories(options = {}) ⇒ Types::ListRepositoriesOutput
Gets information about one or more repositories.
.
-
#list_repositories_for_approval_rule_template(options = {}) ⇒ Types::ListRepositoriesForApprovalRuleTemplateOutput
Lists all repositories associated with the specified approval rule template.
.
-
#list_tags_for_resource(options = {}) ⇒ Types::ListTagsForResourceOutput
Gets information about AWS tags for a specified Amazon Resource Name (ARN) in AWS CodeCommit.
-
#merge_branches_by_fast_forward(options = {}) ⇒ Types::MergeBranchesByFastForwardOutput
Merges two branches using the fast-forward merge strategy.
.
-
#merge_branches_by_squash(options = {}) ⇒ Types::MergeBranchesBySquashOutput
Merges two branches using the squash merge strategy.
.
-
#merge_branches_by_three_way(options = {}) ⇒ Types::MergeBranchesByThreeWayOutput
Merges two specified branches using the three-way merge strategy.
.
-
#merge_pull_request_by_fast_forward(options = {}) ⇒ Types::MergePullRequestByFastForwardOutput
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the fast-forward merge strategy.
-
#merge_pull_request_by_squash(options = {}) ⇒ Types::MergePullRequestBySquashOutput
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the squash merge strategy.
-
#merge_pull_request_by_three_way(options = {}) ⇒ Types::MergePullRequestByThreeWayOutput
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the three-way merge strategy.
-
#override_pull_request_approval_rules(options = {}) ⇒ Struct
Sets aside (overrides) all approval rule requirements for a specified pull request.
.
-
#post_comment_for_compared_commit(options = {}) ⇒ Types::PostCommentForComparedCommitOutput
Posts a comment on the comparison between two commits.
.
-
#post_comment_for_pull_request(options = {}) ⇒ Types::PostCommentForPullRequestOutput
Posts a comment on a pull request.
.
-
#post_comment_reply(options = {}) ⇒ Types::PostCommentReplyOutput
Posts a comment in reply to an existing comment on a comparison between commits or a pull request.
.
-
#put_comment_reaction(options = {}) ⇒ Struct
Adds or updates a reaction to a specified comment for the user whose identity is used to make the request.
-
#put_file(options = {}) ⇒ Types::PutFileOutput
Adds or updates a file in a branch in an AWS CodeCommit repository, and generates a commit for the addition in the specified branch.
.
-
#put_repository_triggers(options = {}) ⇒ Types::PutRepositoryTriggersOutput
Replaces all triggers for a repository.
-
#tag_resource(options = {}) ⇒ Struct
Adds or updates tags for a resource in AWS CodeCommit.
-
#test_repository_triggers(options = {}) ⇒ Types::TestRepositoryTriggersOutput
Tests the functionality of repository triggers by sending information to the trigger target.
-
#untag_resource(options = {}) ⇒ Struct
Removes tags for a resource in AWS CodeCommit.
-
#update_approval_rule_template_content(options = {}) ⇒ Types::UpdateApprovalRuleTemplateContentOutput
Updates the content of an approval rule template.
-
#update_approval_rule_template_description(options = {}) ⇒ Types::UpdateApprovalRuleTemplateDescriptionOutput
Updates the description for a specified approval rule template.
.
-
#update_approval_rule_template_name(options = {}) ⇒ Types::UpdateApprovalRuleTemplateNameOutput
Updates the name of a specified approval rule template.
.
-
#update_comment(options = {}) ⇒ Types::UpdateCommentOutput
Replaces the contents of a comment.
.
-
#update_default_branch(options = {}) ⇒ Struct
Sets or changes the default branch name for the specified repository.
If you use this operation to change the default branch name to the current default branch name, a success message is returned even though the default branch did not change.
-
#update_pull_request_approval_rule_content(options = {}) ⇒ Types::UpdatePullRequestApprovalRuleContentOutput
Updates the structure of an approval rule created specifically for a pull request.
-
#update_pull_request_approval_state(options = {}) ⇒ Struct
Updates the state of a user's approval on a pull request.
-
#update_pull_request_description(options = {}) ⇒ Types::UpdatePullRequestDescriptionOutput
Replaces the contents of the description of a pull request.
.
-
#update_pull_request_status(options = {}) ⇒ Types::UpdatePullRequestStatusOutput
Updates the status of a pull request.
-
#update_pull_request_title(options = {}) ⇒ Types::UpdatePullRequestTitleOutput
Replaces the title of a pull request.
.
-
#update_repository_description(options = {}) ⇒ Struct
Sets or changes the comment or description for a repository.
The description field for a repository accepts all HTML characters and all valid Unicode characters.
-
#update_repository_name(options = {}) ⇒ Struct
Renames a repository.
Instance Method Summary collapse
-
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
-
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters.
Methods inherited from Seahorse::Client::Base
add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options = {}) ⇒ Aws::CodeCommit::Client
Constructs an API client.
Instance Method Details
#associate_approval_rule_template_with_repository(options = {}) ⇒ Struct
Creates an association between an approval rule template and a specified repository. Then, the next time a pull request is created in the repository where the destination reference (if specified) matches the destination reference (branch) for the pull request, an approval rule that matches the template conditions is automatically created for that pull request. If no destination references are specified in the template, an approval rule that matches the template contents is created for all pull requests in that repository.
#batch_associate_approval_rule_template_with_repositories(options = {}) ⇒ Types::BatchAssociateApprovalRuleTemplateWithRepositoriesOutput
Creates an association between an approval rule template and one or more specified repositories.
#batch_describe_merge_conflicts(options = {}) ⇒ Types::BatchDescribeMergeConflictsOutput
Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.
#batch_disassociate_approval_rule_template_from_repositories(options = {}) ⇒ Types::BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput
Removes the association between an approval rule template and one or more specified repositories.
#batch_get_commits(options = {}) ⇒ Types::BatchGetCommitsOutput
Returns information about the contents of one or more commits in a repository.
#batch_get_repositories(options = {}) ⇒ Types::BatchGetRepositoriesOutput
Returns information about one or more repositories.
The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
#create_approval_rule_template(options = {}) ⇒ Types::CreateApprovalRuleTemplateOutput
Creates a template for approval rules that can then be associated with one or more repositories in your AWS account. When you associate a template with a repository, AWS CodeCommit creates an approval rule that matches the conditions of the template for all pull requests that meet the conditions of the template. For more information, see AssociateApprovalRuleTemplateWithRepository.
#create_branch(options = {}) ⇒ Struct
Creates a branch in a repository and points the branch to a commit.
Calling the create branch operation does not set a repository's default branch. To do this, call the update default branch operation.
#create_commit(options = {}) ⇒ Types::CreateCommitOutput
Creates a commit for a repository on the tip of a specified branch.
#create_pull_request(options = {}) ⇒ Types::CreatePullRequestOutput
Creates a pull request in the specified repository.
#create_pull_request_approval_rule(options = {}) ⇒ Types::CreatePullRequestApprovalRuleOutput
Creates an approval rule for a pull request.
#create_repository(options = {}) ⇒ Types::CreateRepositoryOutput
Creates a new, empty repository.
#create_unreferenced_merge_commit(options = {}) ⇒ Types::CreateUnreferencedMergeCommitOutput
Creates an unreferenced commit that represents the result of merging two branches using a specified merge strategy. This can help you determine the outcome of a potential merge. This API cannot be used with the fast-forward merge strategy because that strategy does not create a merge commit.
This unreferenced merge commit can only be accessed using the GetCommit API or through git commands such as git fetch. To retrieve this commit, you must specify its commit ID or otherwise reference it.
#delete_approval_rule_template(options = {}) ⇒ Types::DeleteApprovalRuleTemplateOutput
Deletes a specified approval rule template. Deleting a template does not remove approval rules on pull requests already created with the template.
#delete_branch(options = {}) ⇒ Types::DeleteBranchOutput
Deletes a branch from a repository, unless that branch is the default branch for the repository.
#delete_comment_content(options = {}) ⇒ Types::DeleteCommentContentOutput
Deletes the content of a comment made on a change, file, or commit in a repository.
#delete_file(options = {}) ⇒ Types::DeleteFileOutput
Deletes a specified file from a specified branch. A commit is created on the branch that contains the revision. The file still exists in the commits earlier to the commit that contains the deletion.
#delete_pull_request_approval_rule(options = {}) ⇒ Types::DeletePullRequestApprovalRuleOutput
Deletes an approval rule from a specified pull request. Approval rules can be deleted from a pull request only if the pull request is open, and if the approval rule was created specifically for a pull request and not generated from an approval rule template associated with the repository where the pull request was created. You cannot delete an approval rule from a merged or closed pull request.
#delete_repository(options = {}) ⇒ Types::DeleteRepositoryOutput
Deletes a repository. If a specified repository was already deleted, a null repository ID is returned.
Deleting a repository also deletes all associated objects and metadata. After a repository is deleted, all future push calls to the deleted repository fail.
#describe_merge_conflicts(options = {}) ⇒ Types::DescribeMergeConflictsOutput
Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy. If the merge option for the attempted merge is specified as FAST_FORWARD_MERGE, an exception is thrown.
#describe_pull_request_events(options = {}) ⇒ Types::DescribePullRequestEventsOutput
Returns information about one or more pull request events.
#disassociate_approval_rule_template_from_repository(options = {}) ⇒ Struct
Removes the association between a template and a repository so that approval rules based on the template are not automatically created when pull requests are created in the specified repository. This does not delete any approval rules previously created for pull requests through the template association.
#evaluate_pull_request_approval_rules(options = {}) ⇒ Types::EvaluatePullRequestApprovalRulesOutput
Evaluates whether a pull request has met all the conditions specified in its associated approval rules.
#get_approval_rule_template(options = {}) ⇒ Types::GetApprovalRuleTemplateOutput
Returns information about a specified approval rule template.
#get_blob(options = {}) ⇒ Types::GetBlobOutput
Returns the base-64 encoded content of an individual blob in a repository.
#get_branch(options = {}) ⇒ Types::GetBranchOutput
Returns information about a repository branch, including its name and the last commit ID.
#get_comment(options = {}) ⇒ Types::GetCommentOutput
Returns the content of a comment made on a change, file, or commit in a repository.
Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.
#get_comment_reactions(options = {}) ⇒ Types::GetCommentReactionsOutput
Returns information about reactions to a specified comment ID. Reactions from users who have been deleted will not be included in the count.
#get_comments_for_compared_commit(options = {}) ⇒ Types::GetCommentsForComparedCommitOutput
Returns information about comments made on the comparison between two commits.
Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.
#get_comments_for_pull_request(options = {}) ⇒ Types::GetCommentsForPullRequestOutput
Returns comments made on a pull request.
Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.
#get_commit(options = {}) ⇒ Types::GetCommitOutput
Returns information about a commit, including commit message and committer information.
#get_differences(options = {}) ⇒ Types::GetDifferencesOutput
Returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID, or other fully qualified reference). Results can be limited to a specified path.
#get_file(options = {}) ⇒ Types::GetFileOutput
Returns the base-64 encoded contents of a specified file and its metadata.
#get_folder(options = {}) ⇒ Types::GetFolderOutput
Returns the contents of a specified folder in a repository.
#get_merge_commit(options = {}) ⇒ Types::GetMergeCommitOutput
Returns information about a specified merge commit.
#get_merge_conflicts(options = {}) ⇒ Types::GetMergeConflictsOutput
Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.
#get_merge_options(options = {}) ⇒ Types::GetMergeOptionsOutput
Returns information about the merge options available for merging two specified branches. For details about why a merge option is not available, use GetMergeConflicts or DescribeMergeConflicts.
#get_pull_request(options = {}) ⇒ Types::GetPullRequestOutput
Gets information about a pull request in a specified repository.
#get_pull_request_approval_states(options = {}) ⇒ Types::GetPullRequestApprovalStatesOutput
Gets information about the approval states for a specified pull request. Approval states only apply to pull requests that have one or more approval rules applied to them.
#get_pull_request_override_state(options = {}) ⇒ Types::GetPullRequestOverrideStateOutput
Returns information about whether approval rules have been set aside (overridden) for a pull request, and if so, the Amazon Resource Name (ARN) of the user or identity that overrode the rules and their requirements for the pull request.
#get_repository(options = {}) ⇒ Types::GetRepositoryOutput
Returns information about a repository.
The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
#get_repository_triggers(options = {}) ⇒ Types::GetRepositoryTriggersOutput
Gets information about triggers configured for a repository.
#list_approval_rule_templates(options = {}) ⇒ Types::ListApprovalRuleTemplatesOutput
Lists all approval rule templates in the specified AWS Region in your AWS account. If an AWS Region is not specified, the AWS Region where you are signed in is used.
#list_associated_approval_rule_templates_for_repository(options = {}) ⇒ Types::ListAssociatedApprovalRuleTemplatesForRepositoryOutput
Lists all approval rule templates that are associated with a specified repository.
#list_branches(options = {}) ⇒ Types::ListBranchesOutput
Gets information about one or more branches in a repository.
#list_pull_requests(options = {}) ⇒ Types::ListPullRequestsOutput
Returns a list of pull requests for a specified repository. The return list can be refined by pull request status or pull request author ARN.
#list_repositories(options = {}) ⇒ Types::ListRepositoriesOutput
Gets information about one or more repositories.
#list_repositories_for_approval_rule_template(options = {}) ⇒ Types::ListRepositoriesForApprovalRuleTemplateOutput
Lists all repositories associated with the specified approval rule template.
#list_tags_for_resource(options = {}) ⇒ Types::ListTagsForResourceOutput
Gets information about AWS tags for a specified Amazon Resource Name (ARN) in AWS CodeCommit. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.
#merge_branches_by_fast_forward(options = {}) ⇒ Types::MergeBranchesByFastForwardOutput
Merges two branches using the fast-forward merge strategy.
#merge_branches_by_squash(options = {}) ⇒ Types::MergeBranchesBySquashOutput
Merges two branches using the squash merge strategy.
#merge_branches_by_three_way(options = {}) ⇒ Types::MergeBranchesByThreeWayOutput
Merges two specified branches using the three-way merge strategy.
#merge_pull_request_by_fast_forward(options = {}) ⇒ Types::MergePullRequestByFastForwardOutput
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the fast-forward merge strategy. If the merge is successful, it closes the pull request.
#merge_pull_request_by_squash(options = {}) ⇒ Types::MergePullRequestBySquashOutput
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the squash merge strategy. If the merge is successful, it closes the pull request.
#merge_pull_request_by_three_way(options = {}) ⇒ Types::MergePullRequestByThreeWayOutput
Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the three-way merge strategy. If the merge is successful, it closes the pull request.
#override_pull_request_approval_rules(options = {}) ⇒ Struct
Sets aside (overrides) all approval rule requirements for a specified pull request.
#post_comment_for_compared_commit(options = {}) ⇒ Types::PostCommentForComparedCommitOutput
Posts a comment on the comparison between two commits.
#post_comment_for_pull_request(options = {}) ⇒ Types::PostCommentForPullRequestOutput
Posts a comment on a pull request.
#post_comment_reply(options = {}) ⇒ Types::PostCommentReplyOutput
Posts a comment in reply to an existing comment on a comparison between commits or a pull request.
#put_comment_reaction(options = {}) ⇒ Struct
Adds or updates a reaction to a specified comment for the user whose identity is used to make the request. You can only add or update a reaction for yourself. You cannot add, modify, or delete a reaction for another user.
#put_file(options = {}) ⇒ Types::PutFileOutput
Adds or updates a file in a branch in an AWS CodeCommit repository, and generates a commit for the addition in the specified branch.
#put_repository_triggers(options = {}) ⇒ Types::PutRepositoryTriggersOutput
Replaces all triggers for a repository. Used to create or delete triggers.
#tag_resource(options = {}) ⇒ Struct
Adds or updates tags for a resource in AWS CodeCommit. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.
#test_repository_triggers(options = {}) ⇒ Types::TestRepositoryTriggersOutput
Tests the functionality of repository triggers by sending information to the trigger target. If real data is available in the repository, the test sends data from the last commit. If no data is available, sample data is generated.
#untag_resource(options = {}) ⇒ Struct
Removes tags for a resource in AWS CodeCommit. For a list of valid resources in AWS CodeCommit, see CodeCommit Resources and Operations in the AWS CodeCommit User Guide.
#update_approval_rule_template_content(options = {}) ⇒ Types::UpdateApprovalRuleTemplateContentOutput
Updates the content of an approval rule template. You can change the number of required approvals, the membership of the approval rule, and whether an approval pool is defined.
#update_approval_rule_template_description(options = {}) ⇒ Types::UpdateApprovalRuleTemplateDescriptionOutput
Updates the description for a specified approval rule template.
#update_approval_rule_template_name(options = {}) ⇒ Types::UpdateApprovalRuleTemplateNameOutput
Updates the name of a specified approval rule template.
#update_comment(options = {}) ⇒ Types::UpdateCommentOutput
Replaces the contents of a comment.
#update_default_branch(options = {}) ⇒ Struct
Sets or changes the default branch name for the specified repository.
If you use this operation to change the default branch name to the current default branch name, a success message is returned even though the default branch did not change.
#update_pull_request_approval_rule_content(options = {}) ⇒ Types::UpdatePullRequestApprovalRuleContentOutput
Updates the structure of an approval rule created specifically for a pull request. For example, you can change the number of required approvers and the approval pool for approvers.
#update_pull_request_approval_state(options = {}) ⇒ Struct
Updates the state of a user's approval on a pull request. The user is derived from the signed-in account when the request is made.
#update_pull_request_description(options = {}) ⇒ Types::UpdatePullRequestDescriptionOutput
Replaces the contents of the description of a pull request.
#update_pull_request_status(options = {}) ⇒ Types::UpdatePullRequestStatusOutput
Updates the status of a pull request.
#update_pull_request_title(options = {}) ⇒ Types::UpdatePullRequestTitleOutput
Replaces the title of a pull request.
#update_repository_description(options = {}) ⇒ Struct
Sets or changes the comment or description for a repository.
The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
#update_repository_name(options = {}) ⇒ Struct
Renames a repository. The repository name must be unique across the calling AWS account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. The suffix .git is prohibited. For more information about the limits on repository names, see Limits in the AWS CodeCommit User Guide.
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
Basic Usage
Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.
# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:
# poll for ~25 seconds
client.wait_until(...) do |w|
w.max_attempts = 5
w.delay = 5
end
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success
or :failure
from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(...) do |w|
# disable max attempts
w.max_attempts = nil
# poll for 1 hour, instead of a number of attempts
w.before_wait do |attempts, response|
throw :failure if Time.now - started_at > 3600
end
end
Handling Errors
When a waiter is successful, it returns true
. When a waiter
fails, it raises an error. All errors raised extend from
Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:
Waiter Name | Client Method | Default Delay: | Default Max Attempts: |
---|