com.amazonaws.services.codegurureviewer.AmazonCodeGuruReviewer Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codegurureviewer Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.codegurureviewer;
import javax.annotation.Generated;
import com.amazonaws.*;
import com.amazonaws.regions.*;
import com.amazonaws.services.codegurureviewer.model.*;
import com.amazonaws.services.codegurureviewer.waiters.AmazonCodeGuruReviewerWaiters;
/**
* Interface for accessing CodeGuruReviewer.
*
* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
* {@link com.amazonaws.services.codegurureviewer.AbstractAmazonCodeGuruReviewer} instead.
*
*
*
* This section provides documentation for the Amazon CodeGuru Reviewer API operations. CodeGuru Reviewer is a service
* that uses program analysis and machine learning to detect potential defects that are difficult for developers to find
* and recommends fixes in your Java and Python code.
*
*
* By proactively detecting and providing recommendations for addressing code defects and implementing best practices,
* CodeGuru Reviewer improves the overall quality and maintainability of your code base during the code review stage.
* For more information about CodeGuru Reviewer, see the Amazon CodeGuru Reviewer User
* Guide.
*
*
* To improve the security of your CodeGuru Reviewer API calls, you can establish a private connection between your VPC
* and CodeGuru Reviewer by creating an interface VPC endpoint. For more information, see CodeGuru Reviewer and
* interface VPC endpoints (Amazon Web Services PrivateLink) in the Amazon CodeGuru Reviewer User Guide.
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public interface AmazonCodeGuruReviewer {
/**
* The region metadata service name for computing region endpoints. You can use this value to retrieve metadata
* (such as supported regions) of the service.
*
* @see RegionUtils#getRegionsForService(String)
*/
String ENDPOINT_PREFIX = "codeguru-reviewer";
/**
*
* Use to associate an Amazon Web Services CodeCommit repository or a repository managed by Amazon Web Services
* CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a repository, CodeGuru Reviewer reviews
* source code changes in the repository's pull requests and provides automatic recommendations. You can view
* recommendations using the CodeGuru Reviewer console. For more information, see Recommendations in Amazon
* CodeGuru Reviewer in the Amazon CodeGuru Reviewer User Guide.
*
*
* If you associate a CodeCommit or S3 repository, it must be in the same Amazon Web Services Region and Amazon Web
* Services account where its CodeGuru Reviewer code reviews are configured.
*
*
* Bitbucket and GitHub Enterprise Server repositories are managed by Amazon Web Services CodeStar Connections to
* connect to CodeGuru Reviewer. For more information, see Associate a repository in the Amazon CodeGuru Reviewer User Guide.
*
*
*
* You cannot use the CodeGuru Reviewer SDK or the Amazon Web Services CLI to associate a GitHub repository with
* Amazon CodeGuru Reviewer. To associate a GitHub repository, use the console. For more information, see Getting started
* with CodeGuru Reviewer in the CodeGuru Reviewer User Guide.
*
*
*
* @param associateRepositoryRequest
* @return Result of the AssociateRepository operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AmazonCodeGuruReviewer.AssociateRepository
* @see AWS API Documentation
*/
AssociateRepositoryResult associateRepository(AssociateRepositoryRequest associateRepositoryRequest);
/**
*
* Use to create a code review with a CodeReviewType 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.
*
*
* @param createCodeReviewRequest
* @return Result of the CreateCodeReview operation returned by the service.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AmazonCodeGuruReviewer.CreateCodeReview
* @see AWS API Documentation
*/
CreateCodeReviewResult createCodeReview(CreateCodeReviewRequest createCodeReviewRequest);
/**
*
* Returns the metadata associated with the code review along with its status.
*
*
* @param describeCodeReviewRequest
* @return Result of the DescribeCodeReview operation returned by the service.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AmazonCodeGuruReviewer.DescribeCodeReview
* @see AWS API Documentation
*/
DescribeCodeReviewResult describeCodeReview(DescribeCodeReviewRequest describeCodeReviewRequest);
/**
*
* Describes the customer feedback for a CodeGuru Reviewer recommendation.
*
*
* @param describeRecommendationFeedbackRequest
* @return Result of the DescribeRecommendationFeedback operation returned by the service.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AmazonCodeGuruReviewer.DescribeRecommendationFeedback
* @see AWS API Documentation
*/
DescribeRecommendationFeedbackResult describeRecommendationFeedback(DescribeRecommendationFeedbackRequest describeRecommendationFeedbackRequest);
/**
*
* Returns a
* RepositoryAssociation object that contains information about the requested repository association.
*
*
* @param describeRepositoryAssociationRequest
* @return Result of the DescribeRepositoryAssociation operation returned by the service.
* @throws NotFoundException
* The resource specified in the request was not found.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AmazonCodeGuruReviewer.DescribeRepositoryAssociation
* @see AWS API Documentation
*/
DescribeRepositoryAssociationResult describeRepositoryAssociation(DescribeRepositoryAssociationRequest describeRepositoryAssociationRequest);
/**
*
* Removes the association between Amazon CodeGuru Reviewer and a repository.
*
*
* @param disassociateRepositoryRequest
* @return Result of the DisassociateRepository operation returned by the service.
* @throws NotFoundException
* The resource specified in the request was not found.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ConflictException
* The requested operation would cause a conflict with the current state of a service resource associated
* with the request. Resolve the conflict before retrying this request.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AmazonCodeGuruReviewer.DisassociateRepository
* @see AWS API Documentation
*/
DisassociateRepositoryResult disassociateRepository(DisassociateRepositoryRequest disassociateRepositoryRequest);
/**
*
* Lists all the code reviews that the customer has created in the past 90 days.
*
*
* @param listCodeReviewsRequest
* @return Result of the ListCodeReviews operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @sample AmazonCodeGuruReviewer.ListCodeReviews
* @see AWS API Documentation
*/
ListCodeReviewsResult listCodeReviews(ListCodeReviewsRequest listCodeReviewsRequest);
/**
*
* Returns a list of RecommendationFeedbackSummary objects that contain customer recommendation feedback for all CodeGuru
* Reviewer users.
*
*
* @param listRecommendationFeedbackRequest
* @return Result of the ListRecommendationFeedback operation returned by the service.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AmazonCodeGuruReviewer.ListRecommendationFeedback
* @see AWS API Documentation
*/
ListRecommendationFeedbackResult listRecommendationFeedback(ListRecommendationFeedbackRequest listRecommendationFeedbackRequest);
/**
*
* Returns the list of all recommendations for a completed code review.
*
*
* @param listRecommendationsRequest
* @return Result of the ListRecommendations operation returned by the service.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AmazonCodeGuruReviewer.ListRecommendations
* @see AWS API Documentation
*/
ListRecommendationsResult listRecommendations(ListRecommendationsRequest listRecommendationsRequest);
/**
*
* Returns a list of RepositoryAssociationSummary objects that contain summary information about a repository association. You
* can filter the returned list by ProviderType, Name, State, and Owner.
*
*
* @param listRepositoryAssociationsRequest
* @return Result of the ListRepositoryAssociations operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AmazonCodeGuruReviewer.ListRepositoryAssociations
* @see AWS API Documentation
*/
ListRepositoryAssociationsResult listRepositoryAssociations(ListRepositoryAssociationsRequest listRepositoryAssociationsRequest);
/**
*
* Returns the list of tags associated with an associated repository resource.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @sample AmazonCodeGuruReviewer.ListTagsForResource
* @see AWS API Documentation
*/
ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest);
/**
*
* Stores customer feedback for a CodeGuru Reviewer recommendation. When this API is called again with different
* reactions the previous feedback is overwritten.
*
*
* @param putRecommendationFeedbackRequest
* @return Result of the PutRecommendationFeedback operation returned by the service.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws AccessDeniedException
* You do not have sufficient access to perform this action.
* @throws ThrottlingException
* The request was denied due to request throttling.
* @sample AmazonCodeGuruReviewer.PutRecommendationFeedback
* @see AWS API Documentation
*/
PutRecommendationFeedbackResult putRecommendationFeedback(PutRecommendationFeedbackRequest putRecommendationFeedbackRequest);
/**
*
* Adds one or more tags to an associated repository.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @sample AmazonCodeGuruReviewer.TagResource
* @see AWS
* API Documentation
*/
TagResourceResult tagResource(TagResourceRequest tagResourceRequest);
/**
*
* Removes a tag from an associated repository.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws InternalServerException
* The server encountered an internal error and is unable to complete the request.
* @throws ValidationException
* The input fails to satisfy the specified constraints.
* @throws ResourceNotFoundException
* The resource specified in the request was not found.
* @sample AmazonCodeGuruReviewer.UntagResource
* @see AWS API Documentation
*/
UntagResourceResult untagResource(UntagResourceRequest untagResourceRequest);
/**
* Shuts down this client object, releasing any resources that might be held open. This is an optional method, and
* callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client
* has been shutdown, it should not be used to make any more requests.
*/
void shutdown();
/**
* Returns additional metadata for a previously executed successful request, typically used for debugging issues
* where a service isn't acting as expected. This data isn't considered part of the result data returned by an
* operation, so it's available through this separate, diagnostic interface.
*
* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
* information for an executed request, you should use this method to retrieve it as soon as possible after
* executing a request.
*
* @param request
* The originally executed request.
*
* @return The response metadata for the specified request, or null if none is available.
*/
ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request);
AmazonCodeGuruReviewerWaiters waiters();
}