ListAutomationRulePreviewSummaries
Returns a summary of the recommended actions that match your rule preview configuration and criteria.
Request Syntax
{
"criteria": {
"ebsVolumeSizeInGib": [
{
"comparison": "string",
"values": [ number ]
}
],
"ebsVolumeType": [
{
"comparison": "string",
"values": [ "string" ]
}
],
"estimatedMonthlySavings": [
{
"comparison": "string",
"values": [ number ]
}
],
"lookBackPeriodInDays": [
{
"comparison": "string",
"values": [ number ]
}
],
"region": [
{
"comparison": "string",
"values": [ "string" ]
}
],
"resourceArn": [
{
"comparison": "string",
"values": [ "string" ]
}
],
"resourceTag": [
{
"comparison": "string",
"key": "string",
"values": [ "string" ]
}
],
"restartNeeded": [
{
"comparison": "string",
"values": [ "string" ]
}
]
},
"maxResults": number,
"nextToken": "string",
"organizationScope": {
"accountIds": [ "string" ]
},
"recommendedActionTypes": [ "string" ],
"ruleType": "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.
- criteria
-
A set of conditions that specify which recommended action qualify for implementation. When a rule is active and a recommended action matches these criteria, Compute Optimizer implements the action at the scheduled run time. You can specify up to 20 conditions per filter criteria and 20 values per condition.
Type: Criteria object
Required: No
- maxResults
-
The maximum number of automation rule preview summaries to return in a single response. Valid range is 1-1000.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 100.
Required: No
- nextToken
-
A token used for pagination to retrieve the next set of results when the response is truncated.
Type: String
Pattern:
[A-Za-z0-9+/=]+Required: No
- organizationScope
-
The organizational scope for the rule preview.
Type: OrganizationScope object
Required: No
- recommendedActionTypes
-
The types of recommended actions to include in the preview.
Type: Array of strings
Valid Values:
SnapshotAndDeleteUnattachedEbsVolume | UpgradeEbsVolumeTypeRequired: Yes
- ruleType
-
The type of rule.
Type: String
Valid Values:
OrganizationRule | AccountRuleRequired: Yes
Response Syntax
{
"nextToken": "string",
"previewResultSummaries": [
{
"key": "string",
"total": {
"estimatedMonthlySavings": {
"afterDiscountSavings": number,
"beforeDiscountSavings": number,
"currency": "string",
"savingsEstimationMode": "string"
},
"recommendedActionCount": number
}
}
]
}
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.
- nextToken
-
A token used for pagination. If present, indicates there are more results available and can be used in subsequent requests.
Type: String
Pattern:
[A-Za-z0-9+/=]+ - previewResultSummaries
-
The list of automation rule preview summaries that match the specified criteria.
Type: Array of PreviewResultSummary objects
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You do not have sufficient permissions to perform this action.
HTTP Status Code: 400
- ForbiddenException
-
You are not authorized to perform this action.
HTTP Status Code: 400
- InternalServerException
-
An internal error occurred while processing the request.
HTTP Status Code: 500
- InvalidParameterValueException
-
One or more parameter values are not valid.
HTTP Status Code: 400
- OptInRequiredException
-
The account must be opted in to Compute Optimizer Automation before performing this action.
HTTP Status Code: 400
- ServiceUnavailableException
-
The service is temporarily unavailable.
HTTP Status Code: 500
- ThrottlingException
-
The request was denied due to request throttling.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: