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 AWS CodeCommit repository or a repostory managed by AWS 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:
Operations
AssociateRepository
$result = $client->associateRepository
([/* ... */]); $promise = $client->associateRepositoryAsync
([/* ... */]);
Use to associate an AWS CodeCommit repository or a repostory managed by AWS 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 repository, it must be in the same AWS Region and AWS account where its CodeGuru Reviewer code reviews are configured.
Bitbucket and GitHub Enterprise Server repositories are managed by AWS CodeStar Connections to connect to CodeGuru Reviewer. For more information, see Connect to a repository source provider in the Amazon CodeGuru Reviewer User Guide.
You cannot use the CodeGuru Reviewer SDK or the AWS 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>', '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 ], ], '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.
- 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>, 'LastUpdatedTimeStamp' => <DateTime>, 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer', '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
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
You do not have sufficient access to perform this action.
-
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.
-
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 so cannot be created using this method.
Parameter Syntax
$result = $client->createCodeReview([ 'ClientRequestToken' => '<string>', 'Name' => '<string>', // REQUIRED 'RepositoryAssociationArn' => '<string>', // REQUIRED 'Type' => [ // REQUIRED 'RepositoryAnalysis' => [ // REQUIRED 'RepositoryHead' => [ // REQUIRED 'BranchName' => '<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 AWS account must be unique.
- RepositoryAssociationArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the
RepositoryAssociation
object. You can retrieve this ARN by callingListRepositoryAssociations
.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 typeRepositoryAnalysis
.
Result Syntax
[ 'CodeReview' => [ 'AssociationArn' => '<string>', 'CodeReviewArn' => '<string>', 'CreatedTimeStamp' => <DateTime>, 'LastUpdatedTimeStamp' => <DateTime>, 'Metrics' => [ 'FindingsCount' => <integer>, 'MeteredLinesOfCodeCount' => <integer>, ], 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer', 'PullRequestId' => '<string>', 'RepositoryName' => '<string>', 'SourceCodeType' => [ 'CommitDiff' => [ 'DestinationCommit' => '<string>', 'SourceCommit' => '<string>', ], 'RepositoryHead' => [ 'BranchName' => '<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
-
The resource specified in the request was not found.
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
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.
-
You do not have sufficient access to perform this action.
-
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' => [ 'AssociationArn' => '<string>', 'CodeReviewArn' => '<string>', 'CreatedTimeStamp' => <DateTime>, 'LastUpdatedTimeStamp' => <DateTime>, 'Metrics' => [ 'FindingsCount' => <integer>, 'MeteredLinesOfCodeCount' => <integer>, ], 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer', 'PullRequestId' => '<string>', 'RepositoryName' => '<string>', 'SourceCodeType' => [ 'CommitDiff' => [ 'DestinationCommit' => '<string>', 'SourceCommit' => '<string>', ], 'RepositoryHead' => [ 'BranchName' => '<string>', ], ], 'State' => 'Completed|Pending|Failed|Deleting', 'StateReason' => '<string>', 'Type' => 'PullRequest|RepositoryAnalysis', ], ]
Result Details
Members
- CodeReview
-
- Type: CodeReview structure
Information about the code review.
Errors
-
The resource specified in the request was not found.
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
You do not have sufficient access to perform this action.
-
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 AWS account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the AWS 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
-
The resource specified in the request was not found.
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
You do not have sufficient access to perform this action.
-
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 callingListRepositoryAssociations
.
Result Syntax
[ 'RepositoryAssociation' => [ 'AssociationArn' => '<string>', 'AssociationId' => '<string>', 'ConnectionArn' => '<string>', 'CreatedTimeStamp' => <DateTime>, 'LastUpdatedTimeStamp' => <DateTime>, 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer', '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
-
The resource specified in the request was not found.
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
You do not have sufficient access to perform this action.
-
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 callingListRepositoryAssociations
.
Result Syntax
[ 'RepositoryAssociation' => [ 'AssociationArn' => '<string>', 'AssociationId' => '<string>', 'ConnectionArn' => '<string>', 'CreatedTimeStamp' => <DateTime>, 'LastUpdatedTimeStamp' => <DateTime>, 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer', '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
-
The resource specified in the request was not found.
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
You do not have sufficient access to perform this action.
-
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.
-
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 of nextToken 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>, ], 'Name' => '<string>', 'Owner' => '<string>', 'ProviderType' => 'CodeCommit|GitHub|Bitbucket|GitHubEnterpriseServer', 'PullRequestId' => '<string>', 'RepositoryName' => '<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
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
The request was denied due to request throttling.
-
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 of nextToken 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 AWS 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 AWS account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the AWS 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 of nextToken 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
-
The resource specified in the request was not found.
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
You do not have sufficient access to perform this action.
-
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>', 'RecommendationId' => '<string>', '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
-
The resource specified in the request was not found.
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
You do not have sufficient access to perform this action.
-
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 AWS 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 an associated 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', '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
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
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 callingListRepositoryAssociations
.
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
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
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
-
The resource specified in the request was not found.
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
You do not have sufficient access to perform this action.
-
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 callingListRepositoryAssociations
.
Result Syntax
[]
Result Details
Errors
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
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 callingListRepositoryAssociations
.
Result Syntax
[]
Result Details
Errors
-
The server encountered an internal error and is unable to complete the request.
-
The input fails to satisfy the specified constraints.
-
The resource specified in the request was not found.
Shapes
AccessDeniedException
CodeCommitRepository
Description
Information about an AWS CodeCommit repository. The CodeCommit repository must be in the same AWS Region and AWS account where its CodeGuru Reviewer code reviews are configured.
Members
- Name
-
- Required: Yes
- Type: string
The name of the AWS CodeCommit repository. For more information, see repositoryName in the AWS CodeCommit API Reference.
CodeReview
Description
Information about a code review. A code review belongs to the associated repository that contains the reviewed code.
Members
- AssociationArn
-
- Type: string
The Amazon Resource Name (ARN) of the
RepositoryAssociation
that contains the reviewed source code. You can retrieve associated repository ARNs by callingListRepositoryAssociations
. - 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.
- 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 AWS CodeCommit repository, this is the AWS 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.
- 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 AWS CodeCommit repository, this is the AWS 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.
- 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.
- 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 assocaited repository. Because this type of code review is automatically generated, you cannot specify this code review type usingCreateCodeReview
. -
RepositoryAnalysis
- A code review that analyzes all code under a specified branch in an associated respository. The assocated repository is specified using its ARN inCreateCodeReview
.
Members
- RepositoryAnalysis
-
- Required: Yes
- Type: RepositoryAnalysis structure
A code review that analyzes all code under a specified branch in an associated respository. The assocated 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.
Members
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
InternalServerException
Description
The server encountered an internal error and is unable to complete the request.
Members
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)
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.
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.
NotFoundException
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 AWS account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the AWS 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 AWS account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the AWS 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.
- 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.
- StartLine
-
- Type: int
Start line from where the recommendation is applicable in the source commit or source branch.
Repository
Description
Information about an associated AWS CodeCommit repository or an associated repository that is managed by AWS 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 AWS CodeCommit repository.
- GitHubEnterpriseServer
-
- Type: ThirdPartySourceRepository structure
Information about a GitHub Enterprise Server repository.
RepositoryAnalysis
Description
A code review type that analyzes all code under a specified branch in an associated respository. The assocated repository is specified using its ARN when you call CreateCodeReview
.
Members
- RepositoryHead
-
- Required: Yes
- Type: RepositoryHeadSourceCodeType structure
A
SourceCodeType
that specifies the tip of a branch in an associated repository.
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 AWS CodeStar Connections connection. Its format is
arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id
. For more information, seeConnection
in the AWS 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.
- 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 AWS CodeCommit repository, this is the AWS 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.
- 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 an associated 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 callingListRepositoryAssociations
. - AssociationId
-
- Type: string
The repository association ID.
- ConnectionArn
-
- Type: string
The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is
arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id
. For more information, seeConnection
in the AWS 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 AWS CodeCommit repository, this is the AWS 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.
- 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 an associated 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
ResourceNotFoundException
SourceCodeType
Description
Specifies the source code that is analyzed in a code review. A code review can analyze the source code that is specified using a pull request diff or a branch in an associated repository.
Members
- 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.
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 AWS CodeStar Connections connection. Its format is
arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id
. For more information, seeConnection
in the AWS 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.