CreateCodeReview
Creates a new code review configuration in an agent space. A code review defines the parameters for automated security-focused code analysis.
Request Syntax
POST /CreateCodeReview HTTP/1.1
Content-type: application/json
{
"agentSpaceId": "string",
"assets": {
"actors": [
{
"authentication": {
"providerType": "string",
"value": "string"
},
"description": "string",
"identifier": "string",
"uris": [ "string" ]
}
],
"documents": [
{
"artifactId": "string",
"s3Location": "string"
}
],
"endpoints": [
{
"uri": "string"
}
],
"integratedRepositories": [
{
"integrationId": "string",
"providerResourceId": "string"
}
],
"sourceCode": [
{
"s3Location": "string"
}
]
},
"codeRemediationStrategy": "string",
"logConfig": {
"logGroup": "string",
"logStream": "string"
},
"serviceRole": "string",
"title": "string"
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- agentSpaceId
-
The unique identifier of the agent space to create the code review in.
Type: String
Required: Yes
- assets
-
The assets to include in the code review, such as documents and source code.
Type: Assets object
Required: Yes
- codeRemediationStrategy
-
The code remediation strategy for the code review. Valid values are AUTOMATIC and DISABLED.
Type: String
Valid Values:
AUTOMATIC | DISABLEDRequired: No
- logConfig
-
The CloudWatch Logs configuration for the code review.
Type: CloudWatchLog object
Required: No
- serviceRole
-
The IAM service role to use for the code review.
Type: String
Required: No
- title
-
The title of the code review.
Type: String
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"agentSpaceId": "string",
"assets": {
"actors": [
{
"authentication": {
"providerType": "string",
"value": "string"
},
"description": "string",
"identifier": "string",
"uris": [ "string" ]
}
],
"documents": [
{
"artifactId": "string",
"s3Location": "string"
}
],
"endpoints": [
{
"uri": "string"
}
],
"integratedRepositories": [
{
"integrationId": "string",
"providerResourceId": "string"
}
],
"sourceCode": [
{
"s3Location": "string"
}
]
},
"codeRemediationStrategy": "string",
"codeReviewId": "string",
"createdAt": "string",
"logConfig": {
"logGroup": "string",
"logStream": "string"
},
"serviceRole": "string",
"title": "string",
"updatedAt": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- agentSpaceId
-
The unique identifier of the agent space that contains the code review.
Type: String
- assets
-
The assets included in the code review.
Type: Assets object
- codeRemediationStrategy
-
The code remediation strategy for the code review.
Type: String
Valid Values:
AUTOMATIC | DISABLED - codeReviewId
-
The unique identifier of the created code review.
Type: String
- createdAt
-
The date and time the code review was created, in UTC format.
Type: Timestamp
- logConfig
-
The CloudWatch Logs configuration for the code review.
Type: CloudWatchLog object
- serviceRole
-
The IAM service role used for the code review.
Type: String
- title
-
The title of the code review.
Type: String
- updatedAt
-
The date and time the code review was last updated, in UTC format.
Type: Timestamp
Errors
For information about the errors that are common to all actions, see Common Error Types.
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: