lib/aws-sdk-codegurureviewer/client.rb in aws-sdk-codegurureviewer-1.13.0 vs lib/aws-sdk-codegurureviewer/client.rb in aws-sdk-codegurureviewer-1.14.0

- old
+ new

@@ -367,13 +367,26 @@ # and retries. # # **A suitable default value is auto-generated.** You should normally # not need to pass this option.** # + # @option params [Hash<String,String>] :tags + # An array of key-value pairs used to tag an associated repository. A + # tag is a custom attribute label with two parts: + # + # * A *tag key* (for example, `CostCenter`, `Environment`, `Project`, or + # `Secret`). Tag keys are case sensitive. + # + # * An optional field known as a *tag value* (for example, + # `111122223333`, `Production`, or a team name). Omitting the tag + # value is the same as using an empty string. Like tag keys, tag + # values are case sensitive. + # # @return [Types::AssociateRepositoryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: # # * {Types::AssociateRepositoryResponse#repository_association #repository_association} => Types::RepositoryAssociation + # * {Types::AssociateRepositoryResponse#tags #tags} => Hash&lt;String,String&gt; # # @example Request syntax with placeholder values # # resp = client.associate_repository({ # repository: { # required @@ -390,54 +403,70 @@ # connection_arn: "ConnectionArn", # required # owner: "Owner", # required # }, # }, # client_request_token: "ClientRequestToken", + # tags: { + # "TagKey" => "TagValue", + # }, # }) # # @example Response structure # # resp.repository_association.association_id #=> String # resp.repository_association.association_arn #=> String # resp.repository_association.connection_arn #=> String # resp.repository_association.name #=> String # resp.repository_association.owner #=> String # resp.repository_association.provider_type #=> String, one of "CodeCommit", "GitHub", "Bitbucket", "GitHubEnterpriseServer" - # resp.repository_association.state #=> String, one of "Associated", "Associating", "Failed", "Disassociating" + # resp.repository_association.state #=> String, one of "Associated", "Associating", "Failed", "Disassociating", "Disassociated" # resp.repository_association.state_reason #=> String # resp.repository_association.last_updated_time_stamp #=> Time # resp.repository_association.created_time_stamp #=> Time + # resp.tags #=> Hash + # resp.tags["TagKey"] #=> String # # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/AssociateRepository AWS API Documentation # # @overload associate_repository(params = {}) # @param [Hash] params ({}) def associate_repository(params = {}, options = {}) req = build_request(:associate_repository, params) req.send_request(options) end - # Use to create a code review for a repository analysis. + # Use to create a code review with a [ `CodeReviewType` ][1] of + # `RepositoryAnalysis`. This type of code review analyzes all code under + # a specified branch in an associated repository. `PullRequest` code + # reviews are automatically triggered by a pull request so cannot be + # created using this method. # + # + # + # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html + # # @option params [required, String] :name - # The name of the code review. Each code review of the same code review - # type must have a unique name in your AWS account. + # The name of the code review. The name of each code review in your AWS + # account must be unique. # # @option params [required, String] :repository_association_arn # The Amazon Resource Name (ARN) of the [ `RepositoryAssociation` ][1] - # object. You can retrieve this ARN by calling `ListRepositories`. + # object. You can retrieve this ARN by calling [ + # `ListRepositoryAssociations` ][2]. # # A code review can only be created on an associated repository. This is # the ARN of the associated repository. # # # # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html + # [2]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html # # @option params [required, Types::CodeReviewType] :type # The type of code review to create. This is specified using a [ - # `CodeReviewType` ][1] object. + # `CodeReviewType` ][1] object. You can create a code review only of + # type `RepositoryAnalysis`. # # # # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html # @@ -454,11 +483,11 @@ # # @example Request syntax with placeholder values # # resp = client.create_code_review({ # name: "CodeReviewName", # required - # repository_association_arn: "Arn", # required + # repository_association_arn: "AssociationArn", # required # type: { # required # repository_analysis: { # required # repository_head: { # required # branch_name: "BranchName", # required # }, @@ -481,10 +510,11 @@ # resp.code_review.type #=> String, one of "PullRequest", "RepositoryAnalysis" # resp.code_review.pull_request_id #=> String # resp.code_review.source_code_type.commit_diff.source_commit #=> String # resp.code_review.source_code_type.commit_diff.destination_commit #=> String # resp.code_review.source_code_type.repository_head.branch_name #=> String + # resp.code_review.association_arn #=> String # resp.code_review.metrics.metered_lines_of_code_count #=> Integer # resp.code_review.metrics.findings_count #=> Integer # # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/CreateCodeReview AWS API Documentation # @@ -529,10 +559,11 @@ # resp.code_review.type #=> String, one of "PullRequest", "RepositoryAnalysis" # resp.code_review.pull_request_id #=> String # resp.code_review.source_code_type.commit_diff.source_commit #=> String # resp.code_review.source_code_type.commit_diff.destination_commit #=> String # resp.code_review.source_code_type.repository_head.branch_name #=> String + # resp.code_review.association_arn #=> String # resp.code_review.metrics.metered_lines_of_code_count #=> Integer # resp.code_review.metrics.findings_count #=> Integer # # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DescribeCodeReview AWS API Documentation # @@ -608,38 +639,43 @@ # # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html # # @option params [required, String] :association_arn # The Amazon Resource Name (ARN) of the [ `RepositoryAssociation` ][1] - # object. You can retrieve this ARN by calling `ListRepositories`. + # object. You can retrieve this ARN by calling [ + # `ListRepositoryAssociations` ][2]. # # # # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html + # [2]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html # # @return [Types::DescribeRepositoryAssociationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: # # * {Types::DescribeRepositoryAssociationResponse#repository_association #repository_association} => Types::RepositoryAssociation + # * {Types::DescribeRepositoryAssociationResponse#tags #tags} => Hash&lt;String,String&gt; # # @example Request syntax with placeholder values # # resp = client.describe_repository_association({ - # association_arn: "Arn", # required + # association_arn: "AssociationArn", # required # }) # # @example Response structure # # resp.repository_association.association_id #=> String # resp.repository_association.association_arn #=> String # resp.repository_association.connection_arn #=> String # resp.repository_association.name #=> String # resp.repository_association.owner #=> String # resp.repository_association.provider_type #=> String, one of "CodeCommit", "GitHub", "Bitbucket", "GitHubEnterpriseServer" - # resp.repository_association.state #=> String, one of "Associated", "Associating", "Failed", "Disassociating" + # resp.repository_association.state #=> String, one of "Associated", "Associating", "Failed", "Disassociating", "Disassociated" # resp.repository_association.state_reason #=> String # resp.repository_association.last_updated_time_stamp #=> Time # resp.repository_association.created_time_stamp #=> Time + # resp.tags #=> Hash + # resp.tags["TagKey"] #=> String # # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DescribeRepositoryAssociation AWS API Documentation # # @overload describe_repository_association(params = {}) # @param [Hash] params ({}) @@ -651,38 +687,43 @@ # Removes the association between Amazon CodeGuru Reviewer and a # repository. # # @option params [required, String] :association_arn # The Amazon Resource Name (ARN) of the [ `RepositoryAssociation` ][1] - # object. You can retrieve this ARN by calling `ListRepositories`. + # object. You can retrieve this ARN by calling [ + # `ListRepositoryAssociations` ][2]. # # # # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html + # [2]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html # # @return [Types::DisassociateRepositoryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: # # * {Types::DisassociateRepositoryResponse#repository_association #repository_association} => Types::RepositoryAssociation + # * {Types::DisassociateRepositoryResponse#tags #tags} => Hash&lt;String,String&gt; # # @example Request syntax with placeholder values # # resp = client.disassociate_repository({ - # association_arn: "Arn", # required + # association_arn: "AssociationArn", # required # }) # # @example Response structure # # resp.repository_association.association_id #=> String # resp.repository_association.association_arn #=> String # resp.repository_association.connection_arn #=> String # resp.repository_association.name #=> String # resp.repository_association.owner #=> String # resp.repository_association.provider_type #=> String, one of "CodeCommit", "GitHub", "Bitbucket", "GitHubEnterpriseServer" - # resp.repository_association.state #=> String, one of "Associated", "Associating", "Failed", "Disassociating" + # resp.repository_association.state #=> String, one of "Associated", "Associating", "Failed", "Disassociating", "Disassociated" # resp.repository_association.state_reason #=> String # resp.repository_association.last_updated_time_stamp #=> Time # resp.repository_association.created_time_stamp #=> Time + # resp.tags #=> Hash + # resp.tags["TagKey"] #=> String # # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DisassociateRepository AWS API Documentation # # @overload disassociate_repository(params = {}) # @param [Hash] params ({}) @@ -943,10 +984,22 @@ # * **Failed**\: The repository failed to associate or disassociate. # # * **Disassociating**\: CodeGuru Reviewer is removing the repository's # pull request notifications and source code access. # + # * **Disassociated**\: CodeGuru Reviewer successfully disassociated the + # repository. You can create a new association with this repository if + # you want to review source code in it later. You can control access + # to code reviews created in an associated repository with tags after + # it has been disassociated. For more information, see [Using tags to + # control access to associated repositories][1] in the *Amazon + # CodeGuru Reviewer User Guide*. + # + # + # + # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html + # # @option params [Array<String>] :names # List of repository names to use as a filter. # # @option params [Array<String>] :owners # List of owners to use as a filter. For AWS CodeCommit, it is the name @@ -987,11 +1040,11 @@ # # @example Request syntax with placeholder values # # resp = client.list_repository_associations({ # provider_types: ["CodeCommit"], # accepts CodeCommit, GitHub, Bitbucket, GitHubEnterpriseServer - # states: ["Associated"], # accepts Associated, Associating, Failed, Disassociating + # states: ["Associated"], # accepts Associated, Associating, Failed, Disassociating, Disassociated # names: ["Name"], # owners: ["Owner"], # max_results: 1, # next_token: "NextToken", # }) @@ -1004,11 +1057,11 @@ # resp.repository_association_summaries[0].last_updated_time_stamp #=> Time # resp.repository_association_summaries[0].association_id #=> String # resp.repository_association_summaries[0].name #=> String # resp.repository_association_summaries[0].owner #=> String # resp.repository_association_summaries[0].provider_type #=> String, one of "CodeCommit", "GitHub", "Bitbucket", "GitHubEnterpriseServer" - # resp.repository_association_summaries[0].state #=> String, one of "Associated", "Associating", "Failed", "Disassociating" + # resp.repository_association_summaries[0].state #=> String, one of "Associated", "Associating", "Failed", "Disassociating", "Disassociated" # resp.next_token #=> String # # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListRepositoryAssociations AWS API Documentation # # @overload list_repository_associations(params = {}) @@ -1016,10 +1069,47 @@ def list_repository_associations(params = {}, options = {}) req = build_request(:list_repository_associations, params) req.send_request(options) end + # Returns the list of tags associated with an associated repository + # resource. + # + # @option params [required, String] :resource_arn + # The Amazon Resource Name (ARN) of the [ `RepositoryAssociation` ][1] + # object. You can retrieve this ARN by calling [ + # `ListRepositoryAssociations` ][2]. + # + # + # + # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html + # [2]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html + # + # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods: + # + # * {Types::ListTagsForResourceResponse#tags #tags} => Hash&lt;String,String&gt; + # + # @example Request syntax with placeholder values + # + # resp = client.list_tags_for_resource({ + # resource_arn: "AssociationArn", # required + # }) + # + # @example Response structure + # + # resp.tags #=> Hash + # resp.tags["TagKey"] #=> String + # + # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListTagsForResource AWS API Documentation + # + # @overload list_tags_for_resource(params = {}) + # @param [Hash] params ({}) + def list_tags_for_resource(params = {}, options = {}) + req = build_request(:list_tags_for_resource, params) + req.send_request(options) + end + # Stores customer feedback for a CodeGuru Reviewer recommendation. When # this API is called again with different reactions the previous # feedback is overwritten. # # @option params [required, String] :code_review_arn @@ -1054,10 +1144,88 @@ def put_recommendation_feedback(params = {}, options = {}) req = build_request(:put_recommendation_feedback, params) req.send_request(options) end + # Adds one or more tags to an associated repository. + # + # @option params [required, String] :resource_arn + # The Amazon Resource Name (ARN) of the [ `RepositoryAssociation` ][1] + # object. You can retrieve this ARN by calling [ + # `ListRepositoryAssociations` ][2]. + # + # + # + # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html + # [2]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html + # + # @option params [required, Hash<String,String>] :tags + # An array of key-value pairs used to tag an associated repository. A + # tag is a custom attribute label with two parts: + # + # * A *tag key* (for example, `CostCenter`, `Environment`, `Project`, or + # `Secret`). Tag keys are case sensitive. + # + # * An optional field known as a *tag value* (for example, + # `111122223333`, `Production`, or a team name). Omitting the tag + # value is the same as using an empty string. Like tag keys, tag + # values are case sensitive. + # + # @return [Struct] Returns an empty {Seahorse::Client::Response response}. + # + # @example Request syntax with placeholder values + # + # resp = client.tag_resource({ + # resource_arn: "AssociationArn", # required + # tags: { # required + # "TagKey" => "TagValue", + # }, + # }) + # + # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/TagResource AWS API Documentation + # + # @overload tag_resource(params = {}) + # @param [Hash] params ({}) + def tag_resource(params = {}, options = {}) + req = build_request(:tag_resource, params) + req.send_request(options) + end + + # Removes a tag from an associated repository. + # + # @option params [required, String] :resource_arn + # The Amazon Resource Name (ARN) of the [ `RepositoryAssociation` ][1] + # object. You can retrieve this ARN by calling [ + # `ListRepositoryAssociations` ][2]. + # + # + # + # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html + # [2]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html + # + # @option params [required, Array<String>] :tag_keys + # A list of the keys for each tag you want to remove from an associated + # repository. + # + # @return [Struct] Returns an empty {Seahorse::Client::Response response}. + # + # @example Request syntax with placeholder values + # + # resp = client.untag_resource({ + # resource_arn: "AssociationArn", # required + # tag_keys: ["TagKey"], # required + # }) + # + # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/UntagResource AWS API Documentation + # + # @overload untag_resource(params = {}) + # @param [Hash] params ({}) + def untag_resource(params = {}, options = {}) + req = build_request(:untag_resource, params) + req.send_request(options) + end + # @!endgroup # @param params ({}) # @api private def build_request(operation_name, params = {}) @@ -1067,10 +1235,10 @@ operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-codegurureviewer' - context[:gem_version] = '1.13.0' + context[:gem_version] = '1.14.0' Seahorse::Client::Request.new(handlers, context) end # @api private # @deprecated