Creates a topic rule destination. The destination must be confirmed prior to use.
Requires permission to access the CreateTopicRuleDestination action.
Parameters:
Raises:
Source code in docs_src/capo_iot/_services/io_t.py
| def create_topic_rule_destination(
self,
destination_configuration: "capo_iot.types.topic_rule_destination_configuration.TopicRuleDestinationConfiguration",
*,
config_overrides: Optional[IoTClientConfig] = None,
) -> "capo_iot.types.create_topic_rule_destination_response.CreateTopicRuleDestinationResponse":
"""<p>Creates a topic rule destination. The destination must be confirmed prior to use.</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">CreateTopicRuleDestination</a> action.</p>
Args:
destination_configuration: <p>The topic rule destination configuration.</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.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The resource already exists.</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.create_topic_rule_destination_request.CreateTopicRuleDestinationRequest]",
) -> OperationResponse[
"capo_iot.types.create_topic_rule_destination_response.CreateTopicRuleDestinationResponse"
]:
import capo_iot._operations.aws_iot_service.create_topic_rule_destination
output, http_response = (
capo_iot._operations.aws_iot_service.create_topic_rule_destination.create_topic_rule_destination(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateTopicRuleDestination")
)
input_: capo_iot.types.create_topic_rule_destination_request.CreateTopicRuleDestinationRequest = {
"destination_configuration": destination_configuration
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|