DescribeCodeReviewCommand

Returns the metadata associated with the code review along with its status.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { CodeGuruReviewerClient, DescribeCodeReviewCommand } from "@aws-sdk/client-codeguru-reviewer"; // ES Modules import
// const { CodeGuruReviewerClient, DescribeCodeReviewCommand } = require("@aws-sdk/client-codeguru-reviewer"); // CommonJS import
const client = new CodeGuruReviewerClient(config);
const input = { // DescribeCodeReviewRequest
  CodeReviewArn: "STRING_VALUE", // required
};
const command = new DescribeCodeReviewCommand(input);
const response = await client.send(command);
// { // DescribeCodeReviewResponse
//   CodeReview: { // CodeReview
//     Name: "STRING_VALUE",
//     CodeReviewArn: "STRING_VALUE",
//     RepositoryName: "STRING_VALUE",
//     Owner: "STRING_VALUE",
//     ProviderType: "CodeCommit" || "GitHub" || "Bitbucket" || "GitHubEnterpriseServer" || "S3Bucket",
//     State: "Completed" || "Pending" || "Failed" || "Deleting",
//     StateReason: "STRING_VALUE",
//     CreatedTimeStamp: new Date("TIMESTAMP"),
//     LastUpdatedTimeStamp: new Date("TIMESTAMP"),
//     Type: "PullRequest" || "RepositoryAnalysis",
//     PullRequestId: "STRING_VALUE",
//     SourceCodeType: { // SourceCodeType
//       CommitDiff: { // CommitDiffSourceCodeType
//         SourceCommit: "STRING_VALUE",
//         DestinationCommit: "STRING_VALUE",
//         MergeBaseCommit: "STRING_VALUE",
//       },
//       RepositoryHead: { // RepositoryHeadSourceCodeType
//         BranchName: "STRING_VALUE", // required
//       },
//       BranchDiff: { // BranchDiffSourceCodeType
//         SourceBranchName: "STRING_VALUE", // required
//         DestinationBranchName: "STRING_VALUE", // required
//       },
//       S3BucketRepository: { // S3BucketRepository
//         Name: "STRING_VALUE", // required
//         Details: { // S3RepositoryDetails
//           BucketName: "STRING_VALUE",
//           CodeArtifacts: { // CodeArtifacts
//             SourceCodeArtifactsObjectKey: "STRING_VALUE", // required
//             BuildArtifactsObjectKey: "STRING_VALUE",
//           },
//         },
//       },
//       RequestMetadata: { // RequestMetadata
//         RequestId: "STRING_VALUE",
//         Requester: "STRING_VALUE",
//         EventInfo: { // EventInfo
//           Name: "STRING_VALUE",
//           State: "STRING_VALUE",
//         },
//         VendorName: "GitHub" || "GitLab" || "NativeS3",
//       },
//     },
//     AssociationArn: "STRING_VALUE",
//     Metrics: { // Metrics
//       MeteredLinesOfCodeCount: Number("long"),
//       SuppressedLinesOfCodeCount: Number("long"),
//       FindingsCount: Number("long"),
//     },
//     AnalysisTypes: [ // AnalysisTypes
//       "Security" || "CodeQuality",
//     ],
//     ConfigFileState: "Present" || "Absent" || "PresentWithErrors",
//   },
// };

DescribeCodeReviewCommand Input

See DescribeCodeReviewCommandInput for more details

Parameter
Type
Description
CodeReviewArn
Required
string | undefined

The Amazon Resource Name (ARN) of the CodeReview  object.

DescribeCodeReviewCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
CodeReview
CodeReview | undefined

Information about the code review.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

InternalServerException
server

The server encountered an internal error and is unable to complete the request.

ResourceNotFoundException
client

The resource specified in the request was not found.

ThrottlingException
client

The request was denied due to request throttling.

ValidationException
client

The input fails to satisfy the specified constraints.

CodeGuruReviewerServiceException
Base exception class for all service exceptions from CodeGuruReviewer service.