Deletes the rule.
Requires permission to access the DeleteTopicRule action.
Parameters:
Raises:
Source code in docs_src/capo_iot/_services/io_t.py
| def delete_topic_rule(
self,
rule_name: "capo_iot.types.rule_name.RuleName",
*,
config_overrides: Optional[IoTClientConfig] = None,
) -> None:
"""<p>Deletes the rule.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">DeleteTopicRule</a> action.</p>
Args:
rule_name: <p>The name of the rule.</p>
Raises:
capo_iot.errors.conflicting_resource_update_exception.ConflictingResourceUpdateException: <p>A conflicting resource update exception. This exception is thrown when two pending updates cause a conflict.</p>
capo_iot.errors.internal_exception.InternalException: <p>An unexpected error has occurred.</p>
capo_iot.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
capo_iot.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
capo_iot.errors.unauthorized_exception.UnauthorizedException: <p>You are not authorized to perform this operation.</p>
capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iot.types.delete_topic_rule_request.DeleteTopicRuleRequest]",
) -> OperationResponse[None]:
import capo_iot._operations.aws_iot_service.delete_topic_rule
output, http_response = (
capo_iot._operations.aws_iot_service.delete_topic_rule.delete_topic_rule(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteTopicRule")
)
input_: capo_iot.types.delete_topic_rule_request.DeleteTopicRuleRequest = {
"rule_name": rule_name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|