list_automation_rule_preview
¶
list_automation_rule_preview(
rule_type: RuleType,
recommended_action_types: RecommendedActionTypeList,
*,
config_overrides: Optional[ComputeOptimizerAutomationClientConfig] = None,
organization_scope: Optional[OrganizationScope] = None,
criteria: Optional[Criteria] = None,
max_results: Optional[int] = None,
next_token: Optional[NextToken] = None,
) -> ListAutomationRulePreviewResponse
Returns a preview of the recommended actions that match your Automation rule's configuration and criteria.
Parameters:
-
rule_type(RuleType) –The type of rule.
Only the management account or a delegated administrator can set the ruleType to be OrganizationRule.
-
organization_scope(Optional[OrganizationScope], default:None) –The organizational scope for the rule preview.
-
recommended_action_types(RecommendedActionTypeList) –The types of recommended actions to include in the preview.
-
criteria(Optional[Criteria], default:None) –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.
-
max_results(Optional[int], default:None) –The maximum number of automation rule preview results to return in a single response. Valid range is 1-1000.
-
next_token(Optional[NextToken], default:None) –A token used for pagination to retrieve the next set of results when the response is truncated.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
ForbiddenException–You are not authorized to perform this action.
-
InternalServerException–An internal error occurred while processing the request.
-
InvalidParameterValueException–One or more parameter values are not valid.
-
OptInRequiredException–The account must be opted in to Compute Optimizer Automation before performing this action.
-
ServiceUnavailableException–The service is temporarily unavailable.
-
ThrottlingException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_compute_optimizer_automation/_services/compute_optimizer_automation.py
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 | |