Permanently deletes the specified Contributor Insights rules.
If you create a rule, delete it, and then re-create it with the same name, historical data from the first time the rule was created might not be available.
Parameters:
Raises:
Source code in docs_src/capo_cloudwatch/_services/cloud_watch.py
| def delete_insight_rules(
self,
*,
config_overrides: Optional[CloudWatchClientConfig] = None,
rule_names: Optional[
"capo_cloudwatch.types.insight_rule_names.InsightRuleNames"
] = None,
) -> "capo_cloudwatch.types.delete_insight_rules_output.DeleteInsightRulesOutput":
"""<p>Permanently deletes the specified Contributor Insights rules.</p> <p>If you create a rule, delete it, and then re-create it with the same name, historical data from the first time the rule was created might not be available.</p>
Args:
rule_names: <p>An array of the rule names to delete. If you need to find out the names of your rules, use <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html">DescribeInsightRules</a>.</p>
Raises:
capo_cloudwatch.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value of an input parameter is bad or out-of-range.</p>
capo_cloudwatch.errors.missing_required_parameter_exception.MissingRequiredParameterException: <p>An input parameter that is required is missing.</p>
capo_cloudwatch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudwatch.types.delete_insight_rules_input.DeleteInsightRulesInput]",
) -> OperationResponse[
"capo_cloudwatch.types.delete_insight_rules_output.DeleteInsightRulesOutput"
]:
import capo_cloudwatch._operations.granite_service_version20100801.delete_insight_rules
output, http_response = (
capo_cloudwatch._operations.granite_service_version20100801.delete_insight_rules.delete_insight_rules(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteInsightRules")
)
input_: capo_cloudwatch.types.delete_insight_rules_input.DeleteInsightRulesInput = {}
if rule_names is not None:
input_["rule_names"] = rule_names
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|