diff --git a/.changes/next-release/feature-AmazonCodeGuruReviewer-a7b5350.json b/.changes/next-release/feature-AmazonCodeGuruReviewer-a7b5350.json new file mode 100644 index 000000000000..1d899a4e35cb --- /dev/null +++ b/.changes/next-release/feature-AmazonCodeGuruReviewer-a7b5350.json @@ -0,0 +1,6 @@ +{ + "type": "feature", + "category": "Amazon CodeGuru Reviewer", + "contributor": "", + "description": "The Amazon CodeGuru Reviewer API now includes the RuleMetadata data object and a Severity attribute on a RecommendationSummary object. A RuleMetadata object contains information about a rule that generates a recommendation. Severity indicates how severe the issue associated with a recommendation is." +} diff --git a/services/codegurureviewer/src/main/resources/codegen-resources/service-2.json b/services/codegurureviewer/src/main/resources/codegen-resources/service-2.json index 06fd078b1e7f..20b3993fbac5 100644 --- a/services/codegurureviewer/src/main/resources/codegen-resources/service-2.json +++ b/services/codegurureviewer/src/main/resources/codegen-resources/service-2.json @@ -28,7 +28,7 @@ {"shape":"ConflictException"}, {"shape":"ThrottlingException"} ], - "documentation":"

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 or S3 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 Associate a repository 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.

" + "documentation":"

Use to associate an Amazon Web Services CodeCommit repository or a repostory 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.

" }, "CreateCodeReview":{ "name":"CreateCodeReview", @@ -291,7 +291,7 @@ }, "KMSKeyDetails":{ "shape":"KMSKeyDetails", - "documentation":"

A KMSKeyDetails object that contains:

" + "documentation":"

A KMSKeyDetails object that contains:

" } } }, @@ -375,10 +375,10 @@ "members":{ "Name":{ "shape":"Name", - "documentation":"

The name of the AWS CodeCommit repository. For more information, see repositoryName in the AWS CodeCommit API Reference.

" + "documentation":"

The name of the Amazon Web Services CodeCommit repository. For more information, see repositoryName in the Amazon Web Services CodeCommit API Reference.

" } }, - "documentation":"

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.

" + "documentation":"

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.

" }, "CodeReview":{ "type":"structure", @@ -397,7 +397,7 @@ }, "Owner":{ "shape":"Owner", - "documentation":"

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. For an S3 repository, it can be the username or AWS account ID.

" + "documentation":"

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":{ "shape":"ProviderType", @@ -473,7 +473,7 @@ }, "Owner":{ "shape":"Owner", - "documentation":"

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. For an S3 repository, it can be the username or AWS account ID.

" + "documentation":"

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":{ "shape":"ProviderType", @@ -570,7 +570,7 @@ "members":{ "Name":{ "shape":"CodeReviewName", - "documentation":"

The name of the code review. The name of each code review in your AWS account must be unique.

" + "documentation":"

The name of the code review. The name of each code review in your Amazon Web Services account must be unique.

" }, "RepositoryAssociationArn":{ "shape":"AssociationArn", @@ -635,7 +635,7 @@ }, "UserId":{ "shape":"UserId", - "documentation":"

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.

", + "documentation":"

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.

", "location":"querystring", "locationName":"UserId" } @@ -770,14 +770,14 @@ "members":{ "KMSKeyId":{ "shape":"KMSKeyId", - "documentation":"

The ID of the AWS KMS key that is associated with a respository association.

" + "documentation":"

The ID of the Amazon Web Services KMS key that is associated with a respository association.

" }, "EncryptionOption":{ "shape":"EncryptionOption", - "documentation":"

The encryption option for a repository association. It is either owned by AWS Key Management Service (KMS) (AWS_OWNED_CMK) or customer managed (CUSTOMER_MANAGED_CMK).

" + "documentation":"

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).

" } }, - "documentation":"

An object that contains:

" + "documentation":"

An object that contains:

" }, "KMSKeyId":{ "type":"string", @@ -870,7 +870,7 @@ }, "UserIds":{ "shape":"UserIds", - "documentation":"

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.

", + "documentation":"

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.

", "location":"querystring", "locationName":"UserIds" }, @@ -955,7 +955,7 @@ }, "Owners":{ "shape":"Owners", - "documentation":"

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.

", + "documentation":"

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.

", "location":"querystring", "locationName":"Owner" }, @@ -1007,6 +1007,12 @@ } } }, + "LongDescription":{ + "type":"string", + "max":1000, + "min":1, + "pattern":"^\\S(.*\\S)?$" + }, "MaxResults":{ "type":"integer", "max":100, @@ -1018,7 +1024,7 @@ "members":{ "MeteredLinesOfCodeCount":{ "shape":"MeteredLinesOfCodeCount", - "documentation":"

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.

" + "documentation":"

MeteredLinesOfCode 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.

" }, "FindingsCount":{ "shape":"FindingsCount", @@ -1173,7 +1179,7 @@ }, "UserId":{ "shape":"UserId", - "documentation":"

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.

" + "documentation":"

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.

" }, "CreatedTimeStamp":{ "shape":"TimeStamp", @@ -1203,7 +1209,7 @@ }, "UserId":{ "shape":"UserId", - "documentation":"

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.

" + "documentation":"

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.

" } }, "documentation":"

Information about recommendation feedback summaries.

" @@ -1249,6 +1255,14 @@ "RecommendationCategory":{ "shape":"RecommendationCategory", "documentation":"

The type of a recommendation.

" + }, + "RuleMetadata":{ + "shape":"RuleMetadata", + "documentation":"

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":{ + "shape":"Severity", + "documentation":"

The severity of the issue in the code that generated this recommendation.

" } }, "documentation":"

Information about recommendations.

" @@ -1258,7 +1272,7 @@ "members":{ "CodeCommit":{ "shape":"CodeCommitRepository", - "documentation":"

Information about an AWS CodeCommit repository.

" + "documentation":"

Information about an Amazon Web Services CodeCommit repository.

" }, "Bitbucket":{ "shape":"ThirdPartySourceRepository", @@ -1270,7 +1284,7 @@ }, "S3Bucket":{"shape":"S3Repository"} }, - "documentation":"

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.

" + "documentation":"

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.

" }, "RepositoryAnalysis":{ "type":"structure", @@ -1296,7 +1310,7 @@ }, "ConnectionArn":{ "shape":"ConnectionArn", - "documentation":"

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, see Connection in the AWS CodeStar Connections API Reference.

" + "documentation":"

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":{ "shape":"Name", @@ -1304,7 +1318,7 @@ }, "Owner":{ "shape":"Owner", - "documentation":"

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. For an S3 repository, it can be the username or AWS account ID.

" + "documentation":"

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":{ "shape":"ProviderType", @@ -1328,7 +1342,7 @@ }, "KMSKeyDetails":{ "shape":"KMSKeyDetails", - "documentation":"

A KMSKeyDetails object that contains:

" + "documentation":"

A KMSKeyDetails object that contains:

" }, "S3RepositoryDetails":{"shape":"S3RepositoryDetails"} }, @@ -1363,7 +1377,7 @@ }, "ConnectionArn":{ "shape":"ConnectionArn", - "documentation":"

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, see Connection in the AWS CodeStar Connections API Reference.

" + "documentation":"

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":{ "shape":"TimeStamp", @@ -1379,7 +1393,7 @@ }, "Owner":{ "shape":"Owner", - "documentation":"

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. For an S3 repository, it can be the username or AWS account ID.

" + "documentation":"

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":{ "shape":"ProviderType", @@ -1451,6 +1465,56 @@ "error":{"httpStatusCode":404}, "exception":true }, + "RuleId":{ + "type":"string", + "max":64, + "min":1, + "pattern":"^\\S+\\/[a-zA-Z0-9-]+@v\\d+\\.\\d+$" + }, + "RuleMetadata":{ + "type":"structure", + "members":{ + "RuleId":{ + "shape":"RuleId", + "documentation":"

The ID of the rule.

" + }, + "RuleName":{ + "shape":"RuleName", + "documentation":"

The name of the rule.

" + }, + "ShortDescription":{ + "shape":"ShortDescription", + "documentation":"

A short description of the rule.

" + }, + "LongDescription":{ + "shape":"LongDescription", + "documentation":"

A long description of the rule.

" + }, + "RuleTags":{ + "shape":"RuleTags", + "documentation":"

Tags that are associated with the rule.

" + } + }, + "documentation":"

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.

" + }, + "RuleName":{ + "type":"string", + "max":100, + "min":1, + "pattern":"^\\S(.*\\S)?$" + }, + "RuleTag":{ + "type":"string", + "max":50, + "min":1, + "pattern":"^\\S(.*\\S)?$" + }, + "RuleTags":{ + "type":"list", + "member":{"shape":"RuleTag"}, + "max":20, + "min":1 + }, "S3BucketName":{ "type":"string", "max":63, @@ -1504,6 +1568,22 @@ }, "documentation":"

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.

" }, + "Severity":{ + "type":"string", + "enum":[ + "Info", + "Low", + "Medium", + "High", + "Critical" + ] + }, + "ShortDescription":{ + "type":"string", + "max":200, + "min":1, + "pattern":"^\\S(.*\\S)?$" + }, "SourceCodeArtifactsObjectKey":{ "type":"string", "max":1024, @@ -1603,11 +1683,11 @@ }, "ConnectionArn":{ "shape":"ConnectionArn", - "documentation":"

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, see Connection in the AWS CodeStar Connections API Reference.

" + "documentation":"

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.

" }, "Owner":{ "shape":"Owner", - "documentation":"

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 AWS account ID.

" + "documentation":"

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.

" } }, "documentation":"

Information about a third-party source repository connected to CodeGuru Reviewer.

" @@ -1684,5 +1764,5 @@ ] } }, - "documentation":"

This section provides documentation for the Amazon CodeGuru Reviewer API operations. CodeGuru Reviewer is a service that uses program analysis and machine learning to detect potential defects that are difficult for developers to find and recommends fixes in your Java and Python code.

By proactively detecting and providing recommendations for addressing code defects and implementing best practices, CodeGuru Reviewer improves the overall quality and maintainability of your code base during the code review stage. For more information about CodeGuru Reviewer, see the Amazon CodeGuru Reviewer User Guide.

To improve the security of your CodeGuru Reviewer API calls, you can establish a private connection between your VPC and CodeGuru Reviewer by creating an interface VPC endpoint. For more information, see CodeGuru Reviewer and interface VPC endpoints (AWS PrivateLink) in the Amazon CodeGuru Reviewer User Guide.

" + "documentation":"

This section provides documentation for the Amazon CodeGuru Reviewer API operations. CodeGuru Reviewer is a service that uses program analysis and machine learning to detect potential defects that are difficult for developers to find and recommends fixes in your Java and Python code.

By proactively detecting and providing recommendations for addressing code defects and implementing best practices, CodeGuru Reviewer improves the overall quality and maintainability of your code base during the code review stage. For more information about CodeGuru Reviewer, see the Amazon CodeGuru Reviewer User Guide.

To improve the security of your CodeGuru Reviewer API calls, you can establish a private connection between your VPC and CodeGuru Reviewer by creating an interface VPC endpoint. For more information, see CodeGuru Reviewer and interface VPC endpoints (Amazon Web Services PrivateLink) in the Amazon CodeGuru Reviewer User Guide.

" }