Amazon CodeGuru Reviewer 2019-09-19
- Client: Aws\CodeGuruReviewer\CodeGuruReviewerClient
- Service ID: codeguru-reviewer
- Version: 2019-09-19
This page describes the parameters and results for the operations of the Amazon CodeGuru Reviewer (2019-09-19), and shows how to use the Aws\CodeGuruReviewer\CodeGuruReviewerClient object to call the described operations. This documentation is specific to the 2019-09-19 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- AssociateRepository ( array $params = [] )
- Use to associate an Amazon Web Services CodeCommit repository or a repository managed by Amazon Web Services CodeStar Connections with Amazon CodeGuru Reviewer.
- CreateCodeReview ( array $params = [] )
- Use to create a code review with a CodeReviewType of RepositoryAnalysis.
- DescribeCodeReview ( array $params = [] )
- Returns the metadata associated with the code review along with its status.
- DescribeRecommendationFeedback ( array $params = [] )
- Describes the customer feedback for a CodeGuru Reviewer recommendation.
- DescribeRepositoryAssociation ( array $params = [] )
- Returns a RepositoryAssociation object that contains information about the requested repository association.
- DisassociateRepository ( array $params = [] )
- Removes the association between Amazon CodeGuru Reviewer and a repository.
- ListCodeReviews ( array $params = [] )
- Lists all the code reviews that the customer has created in the past 90 days.
- ListRecommendationFeedback ( array $params = [] )
- Returns a list of RecommendationFeedbackSummary objects that contain customer recommendation feedback for all CodeGuru Reviewer users.
- ListRecommendations ( array $params = [] )
- Returns the list of all recommendations for a completed code review.
- ListRepositoryAssociations ( array $params = [] )
- Returns a list of RepositoryAssociationSummary objects that contain summary information about a repository association.
- ListTagsForResource ( array $params = [] )
- Returns the list of tags associated with an associated repository resource.
- PutRecommendationFeedback ( array $params = [] )
- Stores customer feedback for a CodeGuru Reviewer recommendation.
- TagResource ( array $params = [] )
- Adds one or more tags to an associated repository.
- UntagResource ( array $params = [] )
- Removes a tag from an associated repository.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
Waiters
Waiters allow you to poll a resource until it enters into a desired state. A waiter has a name used to describe what it does, and is associated with an API operation. When creating a waiter, you can provide the API operation parameters associated with the corresponding operation. Waiters can be accessed using the getWaiter($waiterName, $operationParameters) method of a client object. This client supports the following waiters:
Waiter name | API Operation | Delay | Max Attempts |
---|---|---|---|
RepositoryAssociationSucceeded | DescribeRepositoryAssociation | 10 | 30 |
CodeReviewCompleted | DescribeCodeReview | 10 | 180 |
Operations
AssociateRepository
$result = $client->associateRepository
([/* ... */]); $promise = $client->associateRepositoryAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->associateRepository([ 'ClientRequestToken' => '<string>', 'KMSKeyDetails' => [ 'EncryptionOption' => 'AWS_OWNED_CMK|CUSTOMER_MANAGED_CMK', 'KMSKeyId' => '<string>', ], 'Repository' => [ // REQUIRED 'Bitbucket' => [ 'ConnectionArn' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Owner' => '<string>', // REQUIRED ], 'CodeCommit' => [ 'Name' => '<string>', // REQUIRED ], 'GitHubEnterpriseServer' => [ 'ConnectionArn' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Owner' => '<string>', // REQUIRED ], 'S3Bucket' => [ 'BucketName' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED ], ], 'Tags' => ['<string>', ...], ]);
Parameter Details
Members
- ClientRequestToken
-
- Type: string
Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate repository associations if there are failures and retries.
- KMSKeyDetails
-
- Type: KMSKeyDetails structure
A
KMSKeyDetails
object that contains:-
The encryption option for this repository association. It is either owned by Amazon Web Services Key Management Service (KMS) (
AWS_OWNED_CMK
) or customer managed (CUSTOMER_MANAGED_CMK
). -
The ID of the Amazon Web Services KMS key that is associated with this repository association.
- Repository
-
- Required: Yes
- Type: Repository structure
The repository to associate.
- Tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
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
, orSecret
). 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.
Result Syntax
[ 'RepositoryAssociation' => [ 'AssociationArn' => '<string>', 'AssociationId' => '<string>', 'ConnectionArn' => '<string>', 'CreatedTimeStamp' => <DateTime>, 'KMSKeyDetails' => [ 'EncryptionOption' => 'AWS_OWNED_CMK|CUSTOMER_MANAGED_CMK', 'KMSKeyId' => '<string>', ], 'LastUpdatedTimeStamp' => <DateTime>, 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer|S3Bucket', 'S3RepositoryDetails' => [ 'BucketName' => '<string>', 'CodeArtifacts' => [ 'BuildArtifactsObjectKey' => '<string>', 'SourceCodeArtifactsObjectKey' => '<string>', ], ], 'State' => 'Associated|Associating|Failed|Disassociating|Disassociated', 'StateReason' => '<string>', ], 'Tags' => ['<string>', ...], ]
Result Details
Members
- RepositoryAssociation
-
- Type: RepositoryAssociation structure
Information about the repository association.
- Tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
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
, orSecret
). 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.
Errors
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- AccessDeniedException:
You do not have sufficient access to perform this action.
- 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.
- ThrottlingException:
The request was denied due to request throttling.
CreateCodeReview
$result = $client->createCodeReview
([/* ... */]); $promise = $client->createCodeReviewAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->createCodeReview([ 'ClientRequestToken' => '<string>', 'Name' => '<string>', // REQUIRED 'RepositoryAssociationArn' => '<string>', // REQUIRED 'Type' => [ // REQUIRED 'AnalysisTypes' => ['<string>', ...], 'RepositoryAnalysis' => [ // REQUIRED 'RepositoryHead' => [ 'BranchName' => '<string>', // REQUIRED ], 'SourceCodeType' => [ 'BranchDiff' => [ 'DestinationBranchName' => '<string>', // REQUIRED 'SourceBranchName' => '<string>', // REQUIRED ], 'CommitDiff' => [ 'DestinationCommit' => '<string>', 'MergeBaseCommit' => '<string>', 'SourceCommit' => '<string>', ], 'RepositoryHead' => [ 'BranchName' => '<string>', // REQUIRED ], 'RequestMetadata' => [ 'EventInfo' => [ 'Name' => '<string>', 'State' => '<string>', ], 'RequestId' => '<string>', 'Requester' => '<string>', 'VendorName' => 'GitHub|GitLab|NativeS3', ], 'S3BucketRepository' => [ 'Details' => [ 'BucketName' => '<string>', 'CodeArtifacts' => [ 'BuildArtifactsObjectKey' => '<string>', 'SourceCodeArtifactsObjectKey' => '<string>', // REQUIRED ], ], 'Name' => '<string>', // REQUIRED ], ], ], ], ]);
Parameter Details
Members
- ClientRequestToken
-
- Type: string
Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate code reviews if there are failures and retries.
- Name
-
- Required: Yes
- Type: string
The name of the code review. The name of each code review in your Amazon Web Services account must be unique.
- RepositoryAssociationArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations.
A code review can only be created on an associated repository. This is the ARN of the associated repository.
- Type
-
- Required: Yes
- Type: CodeReviewType structure
The type of code review to create. This is specified using a CodeReviewType object. You can create a code review only of type
RepositoryAnalysis
.
Result Syntax
[ 'CodeReview' => [ 'AnalysisTypes' => ['<string>', ...], 'AssociationArn' => '<string>', 'CodeReviewArn' => '<string>', 'ConfigFileState' => 'Present|Absent|PresentWithErrors', 'CreatedTimeStamp' => <DateTime>, 'LastUpdatedTimeStamp' => <DateTime>, 'Metrics' => [ 'FindingsCount' => <integer>, 'MeteredLinesOfCodeCount' => <integer>, 'SuppressedLinesOfCodeCount' => <integer>, ], 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer|S3Bucket', 'PullRequestId' => '<string>', 'RepositoryName' => '<string>', 'SourceCodeType' => [ 'BranchDiff' => [ 'DestinationBranchName' => '<string>', 'SourceBranchName' => '<string>', ], 'CommitDiff' => [ 'DestinationCommit' => '<string>', 'MergeBaseCommit' => '<string>', 'SourceCommit' => '<string>', ], 'RepositoryHead' => [ 'BranchName' => '<string>', ], 'RequestMetadata' => [ 'EventInfo' => [ 'Name' => '<string>', 'State' => '<string>', ], 'RequestId' => '<string>', 'Requester' => '<string>', 'VendorName' => 'GitHub|GitLab|NativeS3', ], 'S3BucketRepository' => [ 'Details' => [ 'BucketName' => '<string>', 'CodeArtifacts' => [ 'BuildArtifactsObjectKey' => '<string>', 'SourceCodeArtifactsObjectKey' => '<string>', ], ], 'Name' => '<string>', ], ], 'State' => 'Completed|Pending|Failed|Deleting', 'StateReason' => '<string>', 'Type' => 'PullRequest|RepositoryAnalysis', ], ]
Result Details
Members
- CodeReview
-
- Type: CodeReview structure
Information about a code review. A code review belongs to the associated repository that contains the reviewed code.
Errors
- ResourceNotFoundException:
The resource specified in the request was not found.
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- 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.
- AccessDeniedException:
You do not have sufficient access to perform this action.
- ThrottlingException:
The request was denied due to request throttling.
DescribeCodeReview
$result = $client->describeCodeReview
([/* ... */]); $promise = $client->describeCodeReviewAsync
([/* ... */]);
Returns the metadata associated with the code review along with its status.
Parameter Syntax
$result = $client->describeCodeReview([ 'CodeReviewArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- CodeReviewArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the CodeReview object.
Result Syntax
[ 'CodeReview' => [ 'AnalysisTypes' => ['<string>', ...], 'AssociationArn' => '<string>', 'CodeReviewArn' => '<string>', 'ConfigFileState' => 'Present|Absent|PresentWithErrors', 'CreatedTimeStamp' => <DateTime>, 'LastUpdatedTimeStamp' => <DateTime>, 'Metrics' => [ 'FindingsCount' => <integer>, 'MeteredLinesOfCodeCount' => <integer>, 'SuppressedLinesOfCodeCount' => <integer>, ], 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer|S3Bucket', 'PullRequestId' => '<string>', 'RepositoryName' => '<string>', 'SourceCodeType' => [ 'BranchDiff' => [ 'DestinationBranchName' => '<string>', 'SourceBranchName' => '<string>', ], 'CommitDiff' => [ 'DestinationCommit' => '<string>', 'MergeBaseCommit' => '<string>', 'SourceCommit' => '<string>', ], 'RepositoryHead' => [ 'BranchName' => '<string>', ], 'RequestMetadata' => [ 'EventInfo' => [ 'Name' => '<string>', 'State' => '<string>', ], 'RequestId' => '<string>', 'Requester' => '<string>', 'VendorName' => 'GitHub|GitLab|NativeS3', ], 'S3BucketRepository' => [ 'Details' => [ 'BucketName' => '<string>', 'CodeArtifacts' => [ 'BuildArtifactsObjectKey' => '<string>', 'SourceCodeArtifactsObjectKey' => '<string>', ], ], 'Name' => '<string>', ], ], 'State' => 'Completed|Pending|Failed|Deleting', 'StateReason' => '<string>', 'Type' => 'PullRequest|RepositoryAnalysis', ], ]
Result Details
Members
- CodeReview
-
- Type: CodeReview structure
Information about the code review.
Errors
- ResourceNotFoundException:
The resource specified in the request was not found.
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- AccessDeniedException:
You do not have sufficient access to perform this action.
- ThrottlingException:
The request was denied due to request throttling.
DescribeRecommendationFeedback
$result = $client->describeRecommendationFeedback
([/* ... */]); $promise = $client->describeRecommendationFeedbackAsync
([/* ... */]);
Describes the customer feedback for a CodeGuru Reviewer recommendation.
Parameter Syntax
$result = $client->describeRecommendationFeedback([ 'CodeReviewArn' => '<string>', // REQUIRED 'RecommendationId' => '<string>', // REQUIRED 'UserId' => '<string>', ]);
Parameter Details
Members
- CodeReviewArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the CodeReview object.
- RecommendationId
-
- Required: Yes
- Type: string
The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.
- UserId
-
- Type: string
Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request.
The
UserId
is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide.
Result Syntax
[ 'RecommendationFeedback' => [ 'CodeReviewArn' => '<string>', 'CreatedTimeStamp' => <DateTime>, 'LastUpdatedTimeStamp' => <DateTime>, 'Reactions' => ['<string>', ...], 'RecommendationId' => '<string>', 'UserId' => '<string>', ], ]
Result Details
Members
- RecommendationFeedback
-
- Type: RecommendationFeedback structure
The recommendation feedback given by the user.
Errors
- ResourceNotFoundException:
The resource specified in the request was not found.
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- AccessDeniedException:
You do not have sufficient access to perform this action.
- ThrottlingException:
The request was denied due to request throttling.
DescribeRepositoryAssociation
$result = $client->describeRepositoryAssociation
([/* ... */]); $promise = $client->describeRepositoryAssociationAsync
([/* ... */]);
Returns a RepositoryAssociation object that contains information about the requested repository association.
Parameter Syntax
$result = $client->describeRepositoryAssociation([ 'AssociationArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- AssociationArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations.
Result Syntax
[ 'RepositoryAssociation' => [ 'AssociationArn' => '<string>', 'AssociationId' => '<string>', 'ConnectionArn' => '<string>', 'CreatedTimeStamp' => <DateTime>, 'KMSKeyDetails' => [ 'EncryptionOption' => 'AWS_OWNED_CMK|CUSTOMER_MANAGED_CMK', 'KMSKeyId' => '<string>', ], 'LastUpdatedTimeStamp' => <DateTime>, 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer|S3Bucket', 'S3RepositoryDetails' => [ 'BucketName' => '<string>', 'CodeArtifacts' => [ 'BuildArtifactsObjectKey' => '<string>', 'SourceCodeArtifactsObjectKey' => '<string>', ], ], 'State' => 'Associated|Associating|Failed|Disassociating|Disassociated', 'StateReason' => '<string>', ], 'Tags' => ['<string>', ...], ]
Result Details
Members
- RepositoryAssociation
-
- Type: RepositoryAssociation structure
Information about the repository association.
- Tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
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
, orSecret
). 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.
Errors
- NotFoundException:
The resource specified in the request was not found.
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- AccessDeniedException:
You do not have sufficient access to perform this action.
- ThrottlingException:
The request was denied due to request throttling.
DisassociateRepository
$result = $client->disassociateRepository
([/* ... */]); $promise = $client->disassociateRepositoryAsync
([/* ... */]);
Removes the association between Amazon CodeGuru Reviewer and a repository.
Parameter Syntax
$result = $client->disassociateRepository([ 'AssociationArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- AssociationArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations.
Result Syntax
[ 'RepositoryAssociation' => [ 'AssociationArn' => '<string>', 'AssociationId' => '<string>', 'ConnectionArn' => '<string>', 'CreatedTimeStamp' => <DateTime>, 'KMSKeyDetails' => [ 'EncryptionOption' => 'AWS_OWNED_CMK|CUSTOMER_MANAGED_CMK', 'KMSKeyId' => '<string>', ], 'LastUpdatedTimeStamp' => <DateTime>, 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer|S3Bucket', 'S3RepositoryDetails' => [ 'BucketName' => '<string>', 'CodeArtifacts' => [ 'BuildArtifactsObjectKey' => '<string>', 'SourceCodeArtifactsObjectKey' => '<string>', ], ], 'State' => 'Associated|Associating|Failed|Disassociating|Disassociated', 'StateReason' => '<string>', ], 'Tags' => ['<string>', ...], ]
Result Details
Members
- RepositoryAssociation
-
- Type: RepositoryAssociation structure
Information about the disassociated repository.
- Tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
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
, orSecret
). 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.
Errors
- NotFoundException:
The resource specified in the request was not found.
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- AccessDeniedException:
You do not have sufficient access to perform this action.
- 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.
- ThrottlingException:
The request was denied due to request throttling.
ListCodeReviews
$result = $client->listCodeReviews
([/* ... */]); $promise = $client->listCodeReviewsAsync
([/* ... */]);
Lists all the code reviews that the customer has created in the past 90 days.
Parameter Syntax
$result = $client->listCodeReviews([ 'MaxResults' => <integer>, 'NextToken' => '<string>', 'ProviderTypes' => ['<string>', ...], 'RepositoryNames' => ['<string>', ...], 'States' => ['<string>', ...], 'Type' => 'PullRequest|RepositoryAnalysis', // REQUIRED ]);
Parameter Details
Members
- MaxResults
-
- Type: int
The maximum number of results that are returned per call. The default is 100.
- NextToken
-
- Type: string
If
nextToken
is returned, there are more results available. The value ofnextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. - ProviderTypes
-
- Type: Array of strings
List of provider types for filtering that needs to be applied before displaying the result. For example,
providerTypes=[GitHub]
lists code reviews from GitHub. - RepositoryNames
-
- Type: Array of strings
List of repository names for filtering that needs to be applied before displaying the result.
- States
-
- Type: Array of strings
List of states for filtering that needs to be applied before displaying the result. For example,
states=[Pending]
lists code reviews in the Pending state.The valid code review states are:
-
Completed
: The code review is complete. -
Pending
: The code review started and has not completed or failed. -
Failed
: The code review failed. -
Deleting
: The code review is being deleted.
- Type
-
- Required: Yes
- Type: string
The type of code reviews to list in the response.
Result Syntax
[ 'CodeReviewSummaries' => [ [ 'CodeReviewArn' => '<string>', 'CreatedTimeStamp' => <DateTime>, 'LastUpdatedTimeStamp' => <DateTime>, 'MetricsSummary' => [ 'FindingsCount' => <integer>, 'MeteredLinesOfCodeCount' => <integer>, 'SuppressedLinesOfCodeCount' => <integer>, ], 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer|S3Bucket', 'PullRequestId' => '<string>', 'RepositoryName' => '<string>', 'SourceCodeType' => [ 'BranchDiff' => [ 'DestinationBranchName' => '<string>', 'SourceBranchName' => '<string>', ], 'CommitDiff' => [ 'DestinationCommit' => '<string>', 'MergeBaseCommit' => '<string>', 'SourceCommit' => '<string>', ], 'RepositoryHead' => [ 'BranchName' => '<string>', ], 'RequestMetadata' => [ 'EventInfo' => [ 'Name' => '<string>', 'State' => '<string>', ], 'RequestId' => '<string>', 'Requester' => '<string>', 'VendorName' => 'GitHub|GitLab|NativeS3', ], 'S3BucketRepository' => [ 'Details' => [ 'BucketName' => '<string>', 'CodeArtifacts' => [ 'BuildArtifactsObjectKey' => '<string>', 'SourceCodeArtifactsObjectKey' => '<string>', ], ], 'Name' => '<string>', ], ], 'State' => 'Completed|Pending|Failed|Deleting', 'Type' => 'PullRequest|RepositoryAnalysis', ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- CodeReviewSummaries
-
- Type: Array of CodeReviewSummary structures
A list of code reviews that meet the criteria of the request.
- NextToken
-
- Type: string
Pagination token.
Errors
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- ThrottlingException:
The request was denied due to request throttling.
- AccessDeniedException:
You do not have sufficient access to perform this action.
ListRecommendationFeedback
$result = $client->listRecommendationFeedback
([/* ... */]); $promise = $client->listRecommendationFeedbackAsync
([/* ... */]);
Returns a list of RecommendationFeedbackSummary objects that contain customer recommendation feedback for all CodeGuru Reviewer users.
Parameter Syntax
$result = $client->listRecommendationFeedback([ 'CodeReviewArn' => '<string>', // REQUIRED 'MaxResults' => <integer>, 'NextToken' => '<string>', 'RecommendationIds' => ['<string>', ...], 'UserIds' => ['<string>', ...], ]);
Parameter Details
Members
- CodeReviewArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the CodeReview object.
- MaxResults
-
- Type: int
The maximum number of results that are returned per call. The default is 100.
- NextToken
-
- Type: string
If
nextToken
is returned, there are more results available. The value ofnextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. - RecommendationIds
-
- Type: Array of strings
Used to query the recommendation feedback for a given recommendation.
- UserIds
-
- Type: Array of strings
An Amazon Web Services user's account ID or Amazon Resource Name (ARN). Use this ID to query the recommendation feedback for a code review from that user.
The
UserId
is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide.
Result Syntax
[ 'NextToken' => '<string>', 'RecommendationFeedbackSummaries' => [ [ 'Reactions' => ['<string>', ...], 'RecommendationId' => '<string>', 'UserId' => '<string>', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
If
nextToken
is returned, there are more results available. The value ofnextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. - RecommendationFeedbackSummaries
-
- Type: Array of RecommendationFeedbackSummary structures
Recommendation feedback summaries corresponding to the code review ARN.
Errors
- ResourceNotFoundException:
The resource specified in the request was not found.
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- AccessDeniedException:
You do not have sufficient access to perform this action.
- ThrottlingException:
The request was denied due to request throttling.
ListRecommendations
$result = $client->listRecommendations
([/* ... */]); $promise = $client->listRecommendationsAsync
([/* ... */]);
Returns the list of all recommendations for a completed code review.
Parameter Syntax
$result = $client->listRecommendations([ 'CodeReviewArn' => '<string>', // REQUIRED 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- CodeReviewArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the CodeReview object.
- MaxResults
-
- Type: int
The maximum number of results that are returned per call. The default is 100.
- NextToken
-
- Type: string
Pagination token.
Result Syntax
[ 'NextToken' => '<string>', 'RecommendationSummaries' => [ [ 'Description' => '<string>', 'EndLine' => <integer>, 'FilePath' => '<string>', 'RecommendationCategory' => 'AWSBestPractices|AWSCloudFormationIssues|DuplicateCode|CodeMaintenanceIssues|ConcurrencyIssues|InputValidations|PythonBestPractices|JavaBestPractices|ResourceLeaks|SecurityIssues|CodeInconsistencies', 'RecommendationId' => '<string>', 'RuleMetadata' => [ 'LongDescription' => '<string>', 'RuleId' => '<string>', 'RuleName' => '<string>', 'RuleTags' => ['<string>', ...], 'ShortDescription' => '<string>', ], 'Severity' => 'Info|Low|Medium|High|Critical', 'StartLine' => <integer>, ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
Pagination token.
- RecommendationSummaries
-
- Type: Array of RecommendationSummary structures
List of recommendations for the requested code review.
Errors
- ResourceNotFoundException:
The resource specified in the request was not found.
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- AccessDeniedException:
You do not have sufficient access to perform this action.
- ThrottlingException:
The request was denied due to request throttling.
ListRepositoryAssociations
$result = $client->listRepositoryAssociations
([/* ... */]); $promise = $client->listRepositoryAssociationsAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->listRepositoryAssociations([ 'MaxResults' => <integer>, 'Names' => ['<string>', ...], 'NextToken' => '<string>', 'Owners' => ['<string>', ...], 'ProviderTypes' => ['<string>', ...], 'States' => ['<string>', ...], ]);
Parameter Details
Members
- MaxResults
-
- Type: int
The maximum number of repository association results returned by
ListRepositoryAssociations
in paginated output. When this parameter is used,ListRepositoryAssociations
only returnsmaxResults
results in a single page with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListRepositoryAssociations
request with the returnednextToken
value. This value can be between 1 and 100. If this parameter is not used,ListRepositoryAssociations
returns up to 100 results and anextToken
value if applicable. - Names
-
- Type: Array of strings
List of repository names to use as a filter.
- NextToken
-
- Type: string
The
nextToken
value returned from a previous paginatedListRepositoryAssociations
request wheremaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextToken
value.Treat this token as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
- Owners
-
- Type: Array of strings
List of owners to use as a filter. For Amazon Web Services CodeCommit, it is the name of the CodeCommit account that was used to associate the repository. For other repository source providers, such as Bitbucket and GitHub Enterprise Server, this is name of the account that was used to associate the repository.
- ProviderTypes
-
- Type: Array of strings
List of provider types to use as a filter.
- States
-
- Type: Array of strings
List of repository association states to use as a filter.
The valid repository association states are:
-
Associated: The repository association is complete.
-
Associating: CodeGuru Reviewer is:
-
Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.
If your repository
ProviderType
isGitHub
,GitHub Enterprise Server
, orBitbucket
, CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered. -
Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.
-
-
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 anassociated repository with tags after it has been disassociated. For more information, see Using tags to control access to associated repositories in the Amazon CodeGuru Reviewer User Guide.
Result Syntax
[ 'NextToken' => '<string>', 'RepositoryAssociationSummaries' => [ [ 'AssociationArn' => '<string>', 'AssociationId' => '<string>', 'ConnectionArn' => '<string>', 'LastUpdatedTimeStamp' => <DateTime>, 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer|S3Bucket', 'State' => 'Associated|Associating|Failed|Disassociating|Disassociated', ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: string
The
nextToken
value to include in a futureListRecommendations
request. When the results of aListRecommendations
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return. - RepositoryAssociationSummaries
-
- Type: Array of RepositoryAssociationSummary structures
A list of repository associations that meet the criteria of the request.
Errors
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- ThrottlingException:
The request was denied due to request throttling.
ListTagsForResource
$result = $client->listTagsForResource
([/* ... */]); $promise = $client->listTagsForResourceAsync
([/* ... */]);
Returns the list of tags associated with an associated repository resource.
Parameter Syntax
$result = $client->listTagsForResource([ 'resourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations.
Result Syntax
[ 'Tags' => ['<string>', ...], ]
Result Details
Members
- Tags
-
- Type: Associative array of custom strings keys (TagKey) to strings
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
, orSecret
). 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.
Errors
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- ResourceNotFoundException:
The resource specified in the request was not found.
PutRecommendationFeedback
$result = $client->putRecommendationFeedback
([/* ... */]); $promise = $client->putRecommendationFeedbackAsync
([/* ... */]);
Stores customer feedback for a CodeGuru Reviewer recommendation. When this API is called again with different reactions the previous feedback is overwritten.
Parameter Syntax
$result = $client->putRecommendationFeedback([ 'CodeReviewArn' => '<string>', // REQUIRED 'Reactions' => ['<string>', ...], // REQUIRED 'RecommendationId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- CodeReviewArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the CodeReview object.
- Reactions
-
- Required: Yes
- Type: Array of strings
List for storing reactions. Reactions are utf-8 text code for emojis. If you send an empty list it clears all your feedback.
- RecommendationId
-
- Required: Yes
- Type: string
The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.
Result Syntax
[]
Result Details
Errors
- ResourceNotFoundException:
The resource specified in the request was not found.
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- AccessDeniedException:
You do not have sufficient access to perform this action.
- ThrottlingException:
The request was denied due to request throttling.
TagResource
$result = $client->tagResource
([/* ... */]); $promise = $client->tagResourceAsync
([/* ... */]);
Adds one or more tags to an associated repository.
Parameter Syntax
$result = $client->tagResource([ 'Tags' => ['<string>', ...], // REQUIRED 'resourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Tags
-
- Required: Yes
- Type: Associative array of custom strings keys (TagKey) to strings
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
, orSecret
). 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.
- resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations.
Result Syntax
[]
Result Details
Errors
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- ResourceNotFoundException:
The resource specified in the request was not found.
UntagResource
$result = $client->untagResource
([/* ... */]); $promise = $client->untagResourceAsync
([/* ... */]);
Removes a tag from an associated repository.
Parameter Syntax
$result = $client->untagResource([ 'TagKeys' => ['<string>', ...], // REQUIRED 'resourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- TagKeys
-
- Required: Yes
- Type: Array of strings
A list of the keys for each tag you want to remove from an associated repository.
- resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations.
Result Syntax
[]
Result Details
Errors
- InternalServerException:
The server encountered an internal error and is unable to complete the request.
- ValidationException:
The input fails to satisfy the specified constraints.
- ResourceNotFoundException:
The resource specified in the request was not found.
Shapes
AccessDeniedException
Description
You do not have sufficient access to perform this action.
Members
- Message
-
- Type: string
BranchDiffSourceCodeType
Description
A type of SourceCodeType that specifies a code diff between a source and destination branch in an associated repository.
Members
- DestinationBranchName
-
- Required: Yes
- Type: string
The destination branch for a diff in an associated repository.
- SourceBranchName
-
- Required: Yes
- Type: string
The source branch for a diff in an associated repository.
CodeArtifacts
Description
Code artifacts are source code artifacts and build artifacts used in a repository analysis or a pull request review.
-
Source code artifacts are source code files in a Git repository that are compressed into a .zip file.
-
Build artifacts are .jar or .class files that are compressed in a .zip file.
Members
- BuildArtifactsObjectKey
-
- Type: string
The S3 object key for a build artifacts .zip file that contains .jar or .class files. This is required for a code review with security analysis. For more information, see Create code reviews with GitHub Actions in the Amazon CodeGuru Reviewer User Guide.
- SourceCodeArtifactsObjectKey
-
- Required: Yes
- Type: string
The S3 object key for a source code .zip file. This is required for all code reviews.
CodeCommitRepository
Description
Information about an Amazon Web Services CodeCommit repository. The CodeCommit repository must be in the same Amazon Web Services Region and Amazon Web Services account where its CodeGuru Reviewer code reviews are configured.
Members
- Name
-
- Required: Yes
- Type: string
The name of the Amazon Web Services CodeCommit repository. For more information, see repositoryName in the Amazon Web Services CodeCommit API Reference.
CodeReview
Description
Information about a code review. A code review belongs to the associated repository that contains the reviewed code.
Members
- AnalysisTypes
-
- Type: Array of strings
The types of analysis performed during a repository analysis or a pull request review. You can specify either
Security
,CodeQuality
, or both. - AssociationArn
-
- Type: string
The Amazon Resource Name (ARN) of the RepositoryAssociation that contains the reviewed source code. You can retrieve associated repository ARNs by calling ListRepositoryAssociations.
- CodeReviewArn
-
- Type: string
The Amazon Resource Name (ARN) of the CodeReview object.
- ConfigFileState
-
- Type: string
The state of the
aws-codeguru-reviewer.yml
configuration file that allows the configuration of the CodeGuru Reviewer analysis. The file either exists, doesn't exist, or exists with errors at the root directory of your repository. - CreatedTimeStamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time, in milliseconds since the epoch, when the code review was created.
- LastUpdatedTimeStamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time, in milliseconds since the epoch, when the code review was last updated.
- Metrics
-
- Type: Metrics structure
The statistics from the code review.
- Name
-
- Type: string
The name of the code review.
- Owner
-
- Type: string
The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, it can be the username or Amazon Web Services account ID.
- ProviderType
-
- Type: string
The type of repository that contains the reviewed code (for example, GitHub or Bitbucket).
- PullRequestId
-
- Type: string
The pull request ID for the code review.
- RepositoryName
-
- Type: string
The name of the repository.
- SourceCodeType
-
- Type: SourceCodeType structure
The type of the source code for the code review.
- State
-
- Type: string
The valid code review states are:
-
Completed
: The code review is complete. -
Pending
: The code review started and has not completed or failed. -
Failed
: The code review failed. -
Deleting
: The code review is being deleted.
- StateReason
-
- Type: string
The reason for the state of the code review.
- Type
-
- Type: string
The type of code review.
CodeReviewSummary
Description
Information about the summary of the code review.
Members
- CodeReviewArn
-
- Type: string
The Amazon Resource Name (ARN) of the CodeReview object.
- CreatedTimeStamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time, in milliseconds since the epoch, when the code review was created.
- LastUpdatedTimeStamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time, in milliseconds since the epoch, when the code review was last updated.
- MetricsSummary
-
- Type: MetricsSummary structure
The statistics from the code review.
- Name
-
- Type: string
The name of the code review.
- Owner
-
- Type: string
The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, it can be the username or Amazon Web Services account ID.
- ProviderType
-
- Type: string
The provider type of the repository association.
- PullRequestId
-
- Type: string
The pull request ID for the code review.
- RepositoryName
-
- Type: string
The name of the repository.
- SourceCodeType
-
- Type: SourceCodeType structure
Specifies the source code that is analyzed in a code review.
- State
-
- Type: string
The state of the code review.
The valid code review states are:
-
Completed
: The code review is complete. -
Pending
: The code review started and has not completed or failed. -
Failed
: The code review failed. -
Deleting
: The code review is being deleted.
- Type
-
- Type: string
The type of the code review.
CodeReviewType
Description
The type of a code review. There are two code review types:
-
PullRequest
- A code review that is automatically triggered by a pull request on an associated repository. -
RepositoryAnalysis
- A code review that analyzes all code under a specified branch in an associated repository. The associated repository is specified using its ARN in CreateCodeReview.
Members
- AnalysisTypes
-
- Type: Array of strings
They types of analysis performed during a repository analysis or a pull request review. You can specify either
Security
,CodeQuality
, or both. - RepositoryAnalysis
-
- Required: Yes
- Type: RepositoryAnalysis structure
A code review that analyzes all code under a specified branch in an associated repository. The associated repository is specified using its ARN in CreateCodeReview.
CommitDiffSourceCodeType
Description
A type of SourceCodeType that specifies the commit diff for a pull request on an associated repository. The SourceCommit
and DestinationCommit
fields are required to do a pull request code review.
Members
- DestinationCommit
-
- Type: string
The SHA of the destination commit used to generate a commit diff. This field is required for a pull request code review.
- MergeBaseCommit
-
- Type: string
The SHA of the merge base of a commit.
- SourceCommit
-
- Type: string
The SHA of the source commit used to generate a commit diff. This field is required for a pull request code review.
ConflictException
Description
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.
Members
- Message
-
- Type: string
EventInfo
Description
Information about an event. The event might be a push, pull request, scheduled request, or another type of event.
Members
- Name
-
- Type: string
The name of the event. The possible names are
pull_request
,workflow_dispatch
,schedule
, andpush
- State
-
- Type: string
The state of an event. The state might be open, closed, or another state.
InternalServerException
Description
The server encountered an internal error and is unable to complete the request.
Members
- Message
-
- Type: string
KMSKeyDetails
Description
An object that contains:
-
The encryption option for a repository association. It is either owned by Amazon Web Services Key Management Service (KMS) (
AWS_OWNED_CMK
) or customer managed (CUSTOMER_MANAGED_CMK
). -
The ID of the Amazon Web Services KMS key that is associated with a repository association.
Members
- EncryptionOption
-
- Type: string
The encryption option for a repository association. It is either owned by Amazon Web Services Key Management Service (KMS) (
AWS_OWNED_CMK
) or customer managed (CUSTOMER_MANAGED_CMK
). - KMSKeyId
-
- Type: string
The ID of the Amazon Web Services KMS key that is associated with a repository association.
Metrics
Description
Information about the statistics from the code review.
Members
- FindingsCount
-
- Type: long (int|float)
Total number of recommendations found in the code review.
- MeteredLinesOfCodeCount
-
- Type: long (int|float)
MeteredLinesOfCodeCount
is the number of lines of code in the repository where the code review happened. This does not include non-code lines such as comments and blank lines. - SuppressedLinesOfCodeCount
-
- Type: long (int|float)
SuppressedLinesOfCodeCount
is the number of lines of code in the repository where the code review happened that CodeGuru Reviewer did not analyze. The lines suppressed in the analysis is based on theexcludeFiles
variable in theaws-codeguru-reviewer.yml
file. This number does not include non-code lines such as comments and blank lines.
MetricsSummary
Description
Information about metrics summaries.
Members
- FindingsCount
-
- Type: long (int|float)
Total number of recommendations found in the code review.
- MeteredLinesOfCodeCount
-
- Type: long (int|float)
Lines of code metered in the code review. For the initial code review pull request and all subsequent revisions, this includes all lines of code in the files added to the pull request. In subsequent revisions, for files that already existed in the pull request, this includes only the changed lines of code. In both cases, this does not include non-code lines such as comments and import statements. For example, if you submit a pull request containing 5 files, each with 500 lines of code, and in a subsequent revision you added a new file with 200 lines of code, and also modified a total of 25 lines across the initial 5 files,
MeteredLinesOfCodeCount
includes the first 5 files (5 * 500 = 2,500 lines), the new file (200 lines) and the 25 changed lines of code for a total of 2,725 lines of code. - SuppressedLinesOfCodeCount
-
- Type: long (int|float)
Lines of code suppressed in the code review based on the
excludeFiles
element in theaws-codeguru-reviewer.yml
file. For full repository analyses, this number includes all lines of code in the files that are suppressed. For pull requests, this number only includes the changed lines of code that are suppressed. In both cases, this number does not include non-code lines such as comments and import statements. For example, if you initiate a full repository analysis on a repository containing 5 files, each file with 100 lines of code, and 2 files are listed as excluded in theaws-codeguru-reviewer.yml
file, thenSuppressedLinesOfCodeCount
returns 200 (2 * 100) as the total number of lines of code suppressed. However, if you submit a pull request for the same repository, thenSuppressedLinesOfCodeCount
only includes the lines in the 2 files that changed. If only 1 of the 2 files changed in the pull request, thenSuppressedLinesOfCodeCount
returns 100 (1 * 100) as the total number of lines of code suppressed.
NotFoundException
Description
The resource specified in the request was not found.
Members
- Message
-
- Type: string
RecommendationFeedback
Description
Information about the recommendation feedback.
Members
- CodeReviewArn
-
- Type: string
The Amazon Resource Name (ARN) of the CodeReview object.
- CreatedTimeStamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time at which the feedback was created.
- LastUpdatedTimeStamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time at which the feedback was last updated.
- Reactions
-
- Type: Array of strings
List for storing reactions. Reactions are utf-8 text code for emojis. You can send an empty list to clear off all your feedback.
- RecommendationId
-
- Type: string
The recommendation ID that can be used to track the provided recommendations. Later on it can be used to collect the feedback.
- UserId
-
- Type: string
The ID of the user that made the API call.
The
UserId
is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide.
RecommendationFeedbackSummary
Description
Information about recommendation feedback summaries.
Members
- Reactions
-
- Type: Array of strings
List for storing reactions. Reactions are utf-8 text code for emojis.
- RecommendationId
-
- Type: string
The recommendation ID that can be used to track the provided recommendations. Later on it can be used to collect the feedback.
- UserId
-
- Type: string
The ID of the user that gave the feedback.
The
UserId
is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide.
RecommendationSummary
Description
Information about recommendations.
Members
- Description
-
- Type: string
A description of the recommendation generated by CodeGuru Reviewer for the lines of code between the start line and the end line.
- EndLine
-
- Type: int
Last line where the recommendation is applicable in the source commit or source branch. For a single line comment the start line and end line values are the same.
- FilePath
-
- Type: string
Name of the file on which a recommendation is provided.
- RecommendationCategory
-
- Type: string
The type of a recommendation.
- RecommendationId
-
- Type: string
The recommendation ID that can be used to track the provided recommendations. Later on it can be used to collect the feedback.
- RuleMetadata
-
- Type: RuleMetadata structure
Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a short and long description. CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is included in analysis results if code is detected that violates the rule.
- Severity
-
- Type: string
The severity of the issue in the code that generated this recommendation.
- StartLine
-
- Type: int
Start line from where the recommendation is applicable in the source commit or source branch.
Repository
Description
Information about an associated Amazon Web Services CodeCommit repository or an associated repository that is managed by Amazon Web Services CodeStar Connections (for example, Bitbucket). This Repository
object is not used if your source code is in an associated GitHub repository.
Members
- Bitbucket
-
- Type: ThirdPartySourceRepository structure
Information about a Bitbucket repository.
- CodeCommit
-
- Type: CodeCommitRepository structure
Information about an Amazon Web Services CodeCommit repository.
- GitHubEnterpriseServer
-
- Type: ThirdPartySourceRepository structure
Information about a GitHub Enterprise Server repository.
- S3Bucket
-
- Type: S3Repository structure
Information about a repository in an S3 bucket.
RepositoryAnalysis
Description
A code review type that analyzes all code under a specified branch in an associated repository. The associated repository is specified using its ARN when you call CreateCodeReview.
Members
- RepositoryHead
-
- Type: RepositoryHeadSourceCodeType structure
A SourceCodeType that specifies the tip of a branch in an associated repository.
- SourceCodeType
-
- Type: SourceCodeType structure
Specifies the source code that is analyzed in a code review.
RepositoryAssociation
Description
Information about a repository association. The DescribeRepositoryAssociation operation returns a RepositoryAssociation
object.
Members
- AssociationArn
-
- Type: string
The Amazon Resource Name (ARN) identifying the repository association.
- AssociationId
-
- Type: string
The ID of the repository association.
- ConnectionArn
-
- Type: string
The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is
arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id
. For more information, see Connection in the Amazon Web Services CodeStar Connections API Reference. - CreatedTimeStamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time, in milliseconds since the epoch, when the repository association was created.
- KMSKeyDetails
-
- Type: KMSKeyDetails structure
A
KMSKeyDetails
object that contains:-
The encryption option for this repository association. It is either owned by Amazon Web Services Key Management Service (KMS) (
AWS_OWNED_CMK
) or customer managed (CUSTOMER_MANAGED_CMK
). -
The ID of the Amazon Web Services KMS key that is associated with this repository association.
- LastUpdatedTimeStamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time, in milliseconds since the epoch, when the repository association was last updated.
- Name
-
- Type: string
The name of the repository.
- Owner
-
- Type: string
The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, it can be the username or Amazon Web Services account ID.
- ProviderType
-
- Type: string
The provider type of the repository association.
- S3RepositoryDetails
-
- Type: S3RepositoryDetails structure
Specifies the name of an S3 bucket and a
CodeArtifacts
object that contains the S3 object keys for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files. - State
-
- Type: string
The state of the repository association.
The valid repository association states are:
-
Associated: The repository association is complete.
-
Associating: CodeGuru Reviewer is:
-
Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.
If your repository
ProviderType
isGitHub
,GitHub Enterprise Server
, orBitbucket
, CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered. -
Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.
-
-
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 anassociated repository with tags after it has been disassociated. For more information, see Using tags to control access to associated repositories in the Amazon CodeGuru Reviewer User Guide.
- StateReason
-
- Type: string
A description of why the repository association is in the current state.
RepositoryAssociationSummary
Description
Summary information about a repository association. The ListRepositoryAssociations operation returns a list of RepositoryAssociationSummary
objects.
Members
- AssociationArn
-
- Type: string
The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations.
- AssociationId
-
- Type: string
The repository association ID.
- ConnectionArn
-
- Type: string
The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is
arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id
. For more information, see Connection in the Amazon Web Services CodeStar Connections API Reference. - LastUpdatedTimeStamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time, in milliseconds since the epoch, since the repository association was last updated.
- Name
-
- Type: string
The name of the repository association.
- Owner
-
- Type: string
The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, it can be the username or Amazon Web Services account ID.
- ProviderType
-
- Type: string
The provider type of the repository association.
- State
-
- Type: string
The state of the repository association.
The valid repository association states are:
-
Associated: The repository association is complete.
-
Associating: CodeGuru Reviewer is:
-
Setting up pull request notifications. This is required for pull requests to trigger a CodeGuru Reviewer review.
If your repository
ProviderType
isGitHub
,GitHub Enterprise Server
, orBitbucket
, CodeGuru Reviewer creates webhooks in your repository to trigger CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code in your repository cannot be triggered. -
Setting up source code access. This is required for CodeGuru Reviewer to securely clone code in your repository.
-
-
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 anassociated repository with tags after it has been disassociated. For more information, see Using tags to control access to associated repositories in the Amazon CodeGuru Reviewer User Guide.
RepositoryHeadSourceCodeType
Description
A SourceCodeType that specifies the tip of a branch in an associated repository.
Members
- BranchName
-
- Required: Yes
- Type: string
The name of the branch in an associated repository. The
RepositoryHeadSourceCodeType
specifies the tip of this branch.
RequestMetadata
Description
Metadata that is associated with a code review. This applies to both pull request and repository analysis code reviews.
Members
- EventInfo
-
- Type: EventInfo structure
Information about the event associated with a code review.
- RequestId
-
- Type: string
The ID of the request. This is required for a pull request code review.
- Requester
-
- Type: string
An identifier, such as a name or account ID, that is associated with the requester. The
Requester
is used to capture theauthor/actor
name of the event request. - VendorName
-
- Type: string
The name of the repository vendor used to upload code to an S3 bucket for a CI/CD code review. For example, if code and artifacts are uploaded to an S3 bucket for a CI/CD code review by GitHub scripts from a GitHub repository, then the repository association's
ProviderType
isS3Bucket
and the CI/CD repository vendor name is GitHub. For more information, see the definition forProviderType
in RepositoryAssociation.
ResourceNotFoundException
Description
The resource specified in the request was not found.
Members
- Message
-
- Type: string
RuleMetadata
Description
Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a short and long description. CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is included in analysis results if code is detected that violates the rule.
Members
- LongDescription
-
- Type: string
A long description of the rule.
- RuleId
-
- Type: string
The ID of the rule.
- RuleName
-
- Type: string
The name of the rule.
- RuleTags
-
- Type: Array of strings
Tags that are associated with the rule.
- ShortDescription
-
- Type: string
A short description of the rule.
S3BucketRepository
Description
Information about an associated repository in an S3 bucket. The associated repository contains a source code .zip file and a build artifacts .zip file that contains .jar or .class files.
Members
- Details
-
- Type: S3RepositoryDetails structure
An
S3RepositoryDetails
object that specifies the name of an S3 bucket and aCodeArtifacts
object. TheCodeArtifacts
object includes the S3 object keys for a source code .zip file and for a build artifacts .zip file. - Name
-
- Required: Yes
- Type: string
The name of the repository when the
ProviderType
isS3Bucket
.
S3Repository
Description
Information about a repository in an S3 bucket.
Members
- BucketName
-
- Required: Yes
- Type: string
The name of the S3 bucket used for associating a new S3 repository. It must begin with
codeguru-reviewer-
. - Name
-
- Required: Yes
- Type: string
The name of the repository in the S3 bucket.
S3RepositoryDetails
Description
Specifies the name of an S3 bucket and a CodeArtifacts
object that contains the S3 object keys for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files.
Members
- BucketName
-
- Type: string
The name of the S3 bucket used for associating a new S3 repository. It must begin with
codeguru-reviewer-
. - CodeArtifacts
-
- Type: CodeArtifacts structure
A
CodeArtifacts
object. TheCodeArtifacts
object includes the S3 object key for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files.
SourceCodeType
Description
Specifies the source code that is analyzed in a code review.
Members
- BranchDiff
-
- Type: BranchDiffSourceCodeType structure
A type of SourceCodeType that specifies a source branch name and a destination branch name in an associated repository.
- CommitDiff
-
- Type: CommitDiffSourceCodeType structure
A SourceCodeType that specifies a commit diff created by a pull request on an associated repository.
- RepositoryHead
-
- Type: RepositoryHeadSourceCodeType structure
A SourceCodeType that specifies the tip of a branch in an associated repository.
- RequestMetadata
-
- Type: RequestMetadata structure
Metadata that is associated with a code review. This applies to any type of code review supported by CodeGuru Reviewer. The
RequestMetadaa
field captures any event metadata. For example, it might capture metadata associated with an event trigger, such as a push or a pull request. - S3BucketRepository
-
- Type: S3BucketRepository structure
Information about an associated repository in an S3 bucket that includes its name and an
S3RepositoryDetails
object. TheS3RepositoryDetails
object includes the name of an S3 bucket, an S3 key for a source code .zip file, and an S3 key for a build artifacts .zip file.S3BucketRepository
is required in SourceCodeType forS3BucketRepository
based code reviews.
ThirdPartySourceRepository
Description
Information about a third-party source repository connected to CodeGuru Reviewer.
Members
- ConnectionArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is
arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id
. For more information, see Connection in the Amazon Web Services CodeStar Connections API Reference. - Name
-
- Required: Yes
- Type: string
The name of the third party source repository.
- Owner
-
- Required: Yes
- Type: string
The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, this can be the username or Amazon Web Services account ID
ThrottlingException
Description
The request was denied due to request throttling.
Members
- Message
-
- Type: string
ValidationException
Description
The input fails to satisfy the specified constraints.
Members
- Message
-
- Type: string