Client library for Amazon CodeGuru Reviewer
npm install --save @datafire/amazonaws_codeguru_reviewer
let amazonaws_codeguru_reviewer = require('@datafire/amazonaws_codeguru_reviewer').create({
accessKeyId: "",
secretAccessKey: "",
region: ""
});
.then(data => {
console.log(data);
});
This section provides documentation for the Amazon CodeGuru Reviewer API operations. CodeGuru Reviewer is a service that uses program analysis and machine learning to detect potential defects that are difficult for developers to find and recommends fixes in your Java code.
By proactively detecting and providing recommendations for addressing code defects and implementing best practices, CodeGuru Reviewer improves the overall quality and maintainability of your code base during the code review stage. For more information about CodeGuru Reviewer, see the Amazon CodeGuru Reviewer User Guide.
To improve the security of your CodeGuru Reviewer API calls, you can establish a private connection between your VPC and CodeGuru Reviewer by creating an interface VPC endpoint. For more information, see CodeGuru Reviewer and interface VPC endpoints (AWS PrivateLink) in the Amazon CodeGuru Reviewer User Guide.
amazonaws_codeguru_reviewer.ListRepositoryAssociations({}, context)
- input
object
- ProviderType
array
- State
array
- Name
array
- Owner
array
- MaxResults
integer
- NextToken
string
- ProviderType
amazonaws_codeguru_reviewer.AssociateRepository({
"Repository": {}
}, context)
- input
object
- ClientRequestToken
string
: Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate repository associations if there are failures and retries. - Repository required
object
: Information about an associated AWS CodeCommit repository or an associated repository that is managed by AWS CodeStar Connections (for example, Bitbucket). ThisRepository
object is not used if your source code is in an associated GitHub repository.- Bitbucket
- ConnectionArn required
- Name required
- Owner required
- CodeCommit
- Name required
- GitHubEnterpriseServer
- ConnectionArn required
- Name required
- Owner required
- Bitbucket
- Tags
object
: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.
-
- ClientRequestToken
- output AssociateRepositoryResponse
amazonaws_codeguru_reviewer.DisassociateRepository({
"AssociationArn": ""
}, context)
- input
object
- AssociationArn required
string
- AssociationArn required
amazonaws_codeguru_reviewer.DescribeRepositoryAssociation({
"AssociationArn": ""
}, context)
- input
object
- AssociationArn required
string
- AssociationArn required
amazonaws_codeguru_reviewer.CreateCodeReview({
"Name": "",
"RepositoryAssociationArn": "",
"Type": {}
}, context)
- input
object
- ClientRequestToken
string
: Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate code reviews if there are failures and retries. - Name required
string
: The name of the code review. The name of each code review in your AWS account must be unique. - RepositoryAssociationArn required
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
object
: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
.
- RepositoryAnalysis
- RepositoryHead required
- BranchName required
- RepositoryHead required
-
- ClientRequestToken
- output CreateCodeReviewResponse
amazonaws_codeguru_reviewer.ListCodeReviews({
"Type": ""
}, context)
- input
object
- ProviderTypes
array
- States
array
- RepositoryNames
array
- Type required
string
- MaxResults
integer
- NextToken
string
- ProviderTypes
- output ListCodeReviewsResponse
amazonaws_codeguru_reviewer.DescribeCodeReview({
"CodeReviewArn": ""
}, context)
- input
object
- CodeReviewArn required
string
- CodeReviewArn required
- output DescribeCodeReviewResponse
amazonaws_codeguru_reviewer.ListRecommendations({
"CodeReviewArn": ""
}, context)
- input
object
- NextToken
string
- MaxResults
integer
- CodeReviewArn required
string
- NextToken
- output ListRecommendationsResponse
amazonaws_codeguru_reviewer.PutRecommendationFeedback({
"CodeReviewArn": "",
"RecommendationId": "",
"Reactions": []
}, context)
- input
object
- CodeReviewArn required
string
: The Amazon Resource Name (ARN) of theCodeReview
object. - Reactions required
array
: List for storing reactions. Reactions are utf-8 text code for emojis. If you send an empty list it clears all your feedback.- items Reaction
- RecommendationId required
string
: The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.
- CodeReviewArn required
amazonaws_codeguru_reviewer.DescribeRecommendationFeedback({
"CodeReviewArn": "",
"RecommendationId": ""
}, context)
- input
object
- CodeReviewArn required
string
- RecommendationId required
string
- UserId
string
- CodeReviewArn required
amazonaws_codeguru_reviewer.ListRecommendationFeedback({
"CodeReviewArn": ""
}, context)
- input
object
- NextToken
string
- MaxResults
integer
- CodeReviewArn required
string
- UserIds
array
- RecommendationIds
array
- NextToken
amazonaws_codeguru_reviewer.ListTagsForResource({
"resourceArn": ""
}, context)
- input
object
- resourceArn required
string
- resourceArn required
- output ListTagsForResourceResponse
amazonaws_codeguru_reviewer.TagResource({
"resourceArn": "",
"Tags": {}
}, context)
- input
object
- resourceArn required
string
- Tags required
object
: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
- output TagResourceResponse
amazonaws_codeguru_reviewer.UntagResource({
"resourceArn": "",
"tagKeys": []
}, context)
- input
object
- resourceArn required
string
- tagKeys required
array
- resourceArn required
- output UntagResourceResponse
- Arn
string
- AssociateRepositoryRequest
object
- ClientRequestToken
- Repository required
- Bitbucket
- ConnectionArn required
- Name required
- Owner required
- CodeCommit
- Name required
- GitHubEnterpriseServer
- ConnectionArn required
- Name required
- Owner required
- Bitbucket
- Tags
- AssociateRepositoryResponse
object
- RepositoryAssociation
- AssociationArn
- AssociationId
- ConnectionArn
- CreatedTimeStamp
- LastUpdatedTimeStamp
- Name
- Owner
- ProviderType
- State
- StateReason
- Tags
- RepositoryAssociation
- AssociationArn
string
- AssociationId
string
- BranchName
string
- ClientRequestToken
string
- CodeCommitRepository
object
: 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.- Name required
- CodeReview
object
: Information about a code review. A code review belongs to the associated repository that contains the reviewed code.- AssociationArn
- CodeReviewArn
- CreatedTimeStamp
- LastUpdatedTimeStamp
- Metrics
- FindingsCount
- MeteredLinesOfCodeCount
- Name
- Owner
- ProviderType
- PullRequestId
- RepositoryName
- SourceCodeType
- CommitDiff
- DestinationCommit
- SourceCommit
- RepositoryHead RepositoryHeadSourceCodeType
- CommitDiff
- State
- StateReason
- Type
- CodeReviewName
string
- CodeReviewSummaries
array
- items CodeReviewSummary
- CodeReviewSummary
object
: Information about the summary of the code review.- CodeReviewArn
- CreatedTimeStamp
- LastUpdatedTimeStamp
- MetricsSummary
- FindingsCount
- MeteredLinesOfCodeCount
- Name
- Owner
- ProviderType
- PullRequestId
- RepositoryName
- State
- Type
- CodeReviewType
object
: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
.
- RepositoryAnalysis required
- RepositoryHead required
- BranchName required
- RepositoryHead required
-
- CommitDiffSourceCodeType
object
: A type ofSourceCodeType
that specifies the commit diff for a pull request on an associated repository.- DestinationCommit
- SourceCommit
- CommitId
string
- ConnectionArn
string
- CreateCodeReviewRequest
object
- ClientRequestToken
- Name required
- RepositoryAssociationArn required
- Type required
- RepositoryAnalysis required
- RepositoryHead required
- BranchName required
- RepositoryHead required
- RepositoryAnalysis required
- CreateCodeReviewResponse
object
- CodeReview CodeReview
- DescribeCodeReviewRequest
object
- DescribeCodeReviewResponse
object
- CodeReview
- AssociationArn
- CodeReviewArn
- CreatedTimeStamp
- LastUpdatedTimeStamp
- Metrics
- FindingsCount
- MeteredLinesOfCodeCount
- Name
- Owner
- ProviderType
- PullRequestId
- RepositoryName
- SourceCodeType
- CommitDiff
- DestinationCommit
- SourceCommit
- RepositoryHead RepositoryHeadSourceCodeType
- CommitDiff
- State
- StateReason
- Type
- CodeReview
- DescribeRecommendationFeedbackRequest
object
- DescribeRecommendationFeedbackResponse
object
- RecommendationFeedback
- CodeReviewArn
- CreatedTimeStamp
- LastUpdatedTimeStamp
- Reactions
- items Reaction
- RecommendationId
- UserId
- RecommendationFeedback
- DescribeRepositoryAssociationRequest
object
- DescribeRepositoryAssociationResponse
object
- RepositoryAssociation
- AssociationArn
- AssociationId
- ConnectionArn
- CreatedTimeStamp
- LastUpdatedTimeStamp
- Name
- Owner
- ProviderType
- State
- StateReason
- Tags
- RepositoryAssociation
- DisassociateRepositoryRequest
object
- DisassociateRepositoryResponse
object
- RepositoryAssociation
- AssociationArn
- AssociationId
- ConnectionArn
- CreatedTimeStamp
- LastUpdatedTimeStamp
- Name
- Owner
- ProviderType
- State
- StateReason
- Tags
- RepositoryAssociation
- FilePath
string
- FindingsCount
integer
- JobState
string
(values: Completed, Pending, Failed, Deleting)
- JobStates
array
- items JobState
- LineNumber
integer
- ListCodeReviewsMaxResults
integer
- ListCodeReviewsRequest
object
- ListCodeReviewsResponse
object
- CodeReviewSummaries
- items CodeReviewSummary
- NextToken
- CodeReviewSummaries
- ListRecommendationFeedbackRequest
object
- ListRecommendationFeedbackResponse
object
- NextToken
- RecommendationFeedbackSummaries
- ListRecommendationsRequest
object
- ListRecommendationsResponse
object
- NextToken
- RecommendationSummaries
- items RecommendationSummary
- ListRepositoryAssociationsRequest
object
- ListRepositoryAssociationsResponse
object
- NextToken
- RepositoryAssociationSummaries
- ListTagsForResourceRequest
object
- ListTagsForResourceResponse
object
- Tags
- MaxResults
integer
- MeteredLinesOfCodeCount
integer
- Metrics
object
: Information about the statistics from the code review.- FindingsCount
- MeteredLinesOfCodeCount
- MetricsSummary
object
: Information about metrics summaries.- FindingsCount
- MeteredLinesOfCodeCount
- Name
string
- Names
array
- items Name
- NextToken
string
- Owner
string
- Owners
array
- items Owner
- ProviderType
string
(values: CodeCommit, GitHub, Bitbucket, GitHubEnterpriseServer)
- ProviderTypes
array
- items ProviderType
- PullRequestId
string
- PutRecommendationFeedbackRequest
object
- CodeReviewArn required
- Reactions required
- items Reaction
- RecommendationId required
- PutRecommendationFeedbackResponse
object
- Reaction
string
(values: ThumbsUp, ThumbsDown)
- Reactions
array
- items Reaction
- RecommendationFeedback
object
: Information about the recommendation feedback.- CodeReviewArn
- CreatedTimeStamp
- LastUpdatedTimeStamp
- Reactions
- items Reaction
- RecommendationId
- UserId
- RecommendationFeedbackSummaries
array
- RecommendationFeedbackSummary
object
: Information about recommendation feedback summaries.- Reactions
- items Reaction
- RecommendationId
- UserId
- Reactions
- RecommendationId
string
- RecommendationIds
array
- items RecommendationId
- RecommendationSummaries
array
- items RecommendationSummary
- RecommendationSummary
object
: Information about recommendations.- Description
- EndLine
- FilePath
- RecommendationId
- StartLine
- Repository
object
: Information about an associated AWS CodeCommit repository or an associated repository that is managed by AWS CodeStar Connections (for example, Bitbucket). ThisRepository
object is not used if your source code is in an associated GitHub repository.- Bitbucket
- ConnectionArn required
- Name required
- Owner required
- CodeCommit
- Name required
- GitHubEnterpriseServer
- ConnectionArn required
- Name required
- Owner required
- Bitbucket
- RepositoryAnalysis
object
: 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 callCreateCodeReview
.- RepositoryHead required
- BranchName required
- RepositoryHead required
- RepositoryAssociation
object
: Information about a repository association. TheDescribeRepositoryAssociation
operation returns aRepositoryAssociation
object.- AssociationArn
- AssociationId
- ConnectionArn
- CreatedTimeStamp
- LastUpdatedTimeStamp
- Name
- Owner
- ProviderType
- State
- StateReason
- RepositoryAssociationState
string
(values: Associated, Associating, Failed, Disassociating, Disassociated)
- RepositoryAssociationStates
array
- RepositoryAssociationSummaries
array
- RepositoryAssociationSummary
object
: Summary information about a repository association. TheListRepositoryAssociations
operation returns a list ofRepositoryAssociationSummary
objects.- AssociationArn
- AssociationId
- ConnectionArn
- LastUpdatedTimeStamp
- Name
- Owner
- ProviderType
- State
- RepositoryHeadSourceCodeType
object
: ASourceCodeType
that specifies the tip of a branch in an associated repository.- BranchName required
- RepositoryNames
array
- items Name
- SourceCodeType
object
: 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.- CommitDiff
- DestinationCommit
- SourceCommit
- RepositoryHead RepositoryHeadSourceCodeType
- CommitDiff
- StateReason
string
- TagKey
string
- TagKeyList
array
- items TagKey
- TagMap
object
- TagResourceRequest
object
- Tags required
- TagResourceResponse
object
- TagValue
string
- Text
string
- ThirdPartySourceRepository
object
: Information about a third-party source repository connected to CodeGuru Reviewer.- ConnectionArn required
- Name required
- Owner required
- TimeStamp
string
- Type
string
(values: PullRequest, RepositoryAnalysis)
- UntagResourceRequest
object
- UntagResourceResponse
object
- UserId
string
- UserIds
array
- items UserId