Skip to content

create_destination

create_destination(
    delivery_destination_arn: DeliveryDestinationArn,
    delivery_destination_type: DeliveryDestinationType,
    name: DestinationName,
    role_arn: DeliveryDestinationRoleArn,
    *,
    config_overrides: Optional[IoTManagedIntegrationsClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    description: Optional[DestinationDescription] = None,
    tags: Optional[TagsMap] = None,
) -> CreateDestinationResponse

Create a notification destination such as Kinesis Data Streams that receive events and notifications from Managed integrations. Managed integrations uses the destination to determine where to deliver notifications.

Parameters:

  • delivery_destination_arn (DeliveryDestinationArn) –

    The Amazon Resource Name (ARN) of the customer-managed destination.

  • delivery_destination_type (DeliveryDestinationType) –

    The destination type for the customer-managed destination.

  • name (DestinationName) –

    The name of the customer-managed destination.

  • role_arn (DeliveryDestinationRoleArn) –

    The Amazon Resource Name (ARN) of the delivery destination role.

  • client_token (Optional[ClientToken], default: None ) –

    An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.

  • description (Optional[DestinationDescription], default: None ) –

    The description of the customer-managed destination.

  • tags (Optional[TagsMap], default: None ) –

    A set of key/value pairs that are used to manage the destination.

Raises:

Source code in docs_src/capo_iot_managed_integrations/_services/io_t_managed_integrations.py
def create_destination(
    self,
    delivery_destination_arn: "capo_iot_managed_integrations.types.delivery_destination_arn.DeliveryDestinationArn",
    delivery_destination_type: "capo_iot_managed_integrations.types.delivery_destination_type.DeliveryDestinationType",
    name: "capo_iot_managed_integrations.types.destination_name.DestinationName",
    role_arn: "capo_iot_managed_integrations.types.delivery_destination_role_arn.DeliveryDestinationRoleArn",
    *,
    config_overrides: Optional[IoTManagedIntegrationsClientConfig] = None,
    client_token: Optional[
        "capo_iot_managed_integrations.types.client_token.ClientToken"
    ] = None,
    description: Optional[
        "capo_iot_managed_integrations.types.destination_description.DestinationDescription"
    ] = None,
    tags: Optional["capo_iot_managed_integrations.types.tags_map.TagsMap"] = None,
) -> "capo_iot_managed_integrations.types.create_destination_response.CreateDestinationResponse":
    """<p> Create a notification destination such as Kinesis Data Streams that receive events and notifications from Managed integrations. Managed integrations uses the destination to determine where to deliver notifications.</p>

    Args:
        delivery_destination_arn: <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
        delivery_destination_type: <p>The destination type for the customer-managed destination.</p>
        name: <p>The name of the customer-managed destination.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
        client_token: <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
        description: <p>The description of the customer-managed destination.</p>
        tags: <p>A set of key/value pairs that are used to manage the destination.</p>

    Raises:
        capo_iot_managed_integrations.errors.access_denied_exception.AccessDeniedException: <p>User is not authorized.</p>
        capo_iot_managed_integrations.errors.conflict_exception.ConflictException: <p>There is a conflict with the request.</p>
        capo_iot_managed_integrations.errors.internal_server_exception.InternalServerException: <p>Internal error from the service that indicates an unexpected error or that the service is unavailable.</p>
        capo_iot_managed_integrations.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot_managed_integrations.errors.validation_exception.ValidationException: <p>A validation error occurred when performing the API request.</p>
        capo_iot_managed_integrations.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iot_managed_integrations.types.create_destination_request.CreateDestinationRequest]",
    ) -> OperationResponse[
        "capo_iot_managed_integrations.types.create_destination_response.CreateDestinationResponse"
    ]:
        import capo_iot_managed_integrations._operations.iot_managed_integrations.create_destination

        output, http_response = (
            capo_iot_managed_integrations._operations.iot_managed_integrations.create_destination.create_destination(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_iot_managed_integrations.types.create_destination_request.CreateDestinationRequest",
    ) -> dict[str, Any]:
        import capo_iot_managed_integrations.types.create_destination_request

        return capo_iot_managed_integrations.types.create_destination_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateDestination", redact_input=_redact_input),
    )
    input_: capo_iot_managed_integrations.types.create_destination_request.CreateDestinationRequest = {
        "delivery_destination_arn": delivery_destination_arn,
        "delivery_destination_type": delivery_destination_type,
        "name": name,
        "role_arn": role_arn,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if description is not None:
        input_["description"] = description
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output