DescribeAssessmentRuns
Describes the assessment runs that are specified by the ARNs of the assessment runs.
Request Syntax
{
"assessmentRunArns": [ "string
" ]
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- assessmentRunArns
-
The ARN that specifies the assessment run that you want to describe.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 10 items.
Length Constraints: Minimum length of 1. Maximum length of 300.
Required: Yes
Response Syntax
{
"assessmentRuns": [
{
"arn": "string",
"assessmentTemplateArn": "string",
"completedAt": number,
"createdAt": number,
"dataCollected": boolean,
"durationInSeconds": number,
"findingCounts": {
"string" : number
},
"name": "string",
"notifications": [
{
"date": number,
"error": boolean,
"event": "string",
"message": "string",
"snsPublishStatusCode": "string",
"snsTopicArn": "string"
}
],
"rulesPackageArns": [ "string" ],
"startedAt": number,
"state": "string",
"stateChangedAt": number,
"stateChanges": [
{
"state": "string",
"stateChangedAt": number
}
],
"userAttributesForFindings": [
{
"key": "string",
"value": "string"
}
]
}
],
"failedItems": {
"string" : {
"failureCode": "string",
"retryable": boolean
}
}
}
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.
- assessmentRuns
-
Information about the assessment run.
Type: Array of AssessmentRun objects
Array Members: Minimum number of 0 items. Maximum number of 10 items.
- failedItems
-
Assessment run details that cannot be described. An error code is provided for each failed item.
Type: String to FailedItemDetails object map
Key Length Constraints: Minimum length of 1. Maximum length of 300.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalException
-
Internal server error.
HTTP Status Code: 500
- InvalidInputException
-
The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
HTTP Status Code: 400
Examples
Example
This example illustrates one usage of DescribeAssessmentRuns.
Sample Request
Host: inspector.us-west-2.amazonaws.com
Accept-Encoding: identity
Content-Length: 120
X-Amz-Target: InspectorService.DescribeAssessmentRuns
X-Amz-Date: 20160323T213431Z
User-Agent: aws-cli/1.10.12 Python/2.7.9 Windows/7 botocore/1.4.3
Content-Type: application/x-amz-json-1.1
Authorization: AUTHPARAMS
{
"assessmentRunArns": [
"arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE"
]
}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: 0834f495-f13f-11e5-8a9a-395a36305628
Content-Type: application/x-amz-json-1.1
Content-Length: 1156
Date: Wed, 23 Mar 2016 21:34:32 GMT
{
"assessmentRuns": [
{
"arn": "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE",
"assessmentTemplateArn": "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw",
"completedAt": 1458680301.4,
"createdAt": 1458680170.035,
"dataCollected": true,
"durationInSeconds": 3600,
"name": "Run 1 for ExampleAssessmentTemplate",
"notifications": [],
"rulesPackageArns": [
"arn:aws:inspector:us-west-2:758058086616:rulespackage/0-X1KXtawP"
],
"startedAt": 1458680170.161,
"state": "COMPLETED",
"stateChangedAt": 1458680301.4,
"stateChanges": [
{
"state": "CREATED",
"stateChangedAt": 1458680170.035
},
{
"state": "START_DATA_COLLECTION_PENDING",
"stateChangedAt": 1458680170.065
},
{
"state": "START_DATA_COLLECTION_IN_PROGRESS",
"stateChangedAt": 1458680170.096
},
{
"state": "COLLECTING_DATA",
"stateChangedAt": 1458680170.161
},
{
"state": "STOP_DATA_COLLECTION_PENDING",
"stateChangedAt": 1458680239.883
},
{
"state": "DATA_COLLECTED",
"stateChangedAt": 1458680299.847
},
{
"state": "EVALUATING_RULES",
"stateChangedAt": 1458680300.099
},
{
"state": "COMPLETED",
"stateChangedAt": 1458680301.4
}
],
"userAttributesForFindings": []
}
],
"failedItems": {}
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: