Skip to content

update_destination

update_destination(
    name: DestinationName,
    *,
    config_overrides: Optional[IoTManagedIntegrationsClientConfig] = None,
    delivery_destination_arn: Optional[DeliveryDestinationArn] = None,
    delivery_destination_type: Optional[DeliveryDestinationType] = None,
    role_arn: Optional[DeliveryDestinationRoleArn] = None,
    description: Optional[DestinationDescription] = None,
) -> None

Update a destination specified by name.

Parameters:

Raises:

Source code in docs_src/capo_iot_managed_integrations/_services/io_t_managed_integrations.py
def update_destination(
    self,
    name: "capo_iot_managed_integrations.types.destination_name.DestinationName",
    *,
    config_overrides: Optional[IoTManagedIntegrationsClientConfig] = None,
    delivery_destination_arn: Optional[
        "capo_iot_managed_integrations.types.delivery_destination_arn.DeliveryDestinationArn"
    ] = None,
    delivery_destination_type: Optional[
        "capo_iot_managed_integrations.types.delivery_destination_type.DeliveryDestinationType"
    ] = None,
    role_arn: Optional[
        "capo_iot_managed_integrations.types.delivery_destination_role_arn.DeliveryDestinationRoleArn"
    ] = None,
    description: Optional[
        "capo_iot_managed_integrations.types.destination_description.DestinationDescription"
    ] = None,
) -> None:
    """<p> Update a destination specified by name. </p>

    Args:
        name: <p>The name of the customer-managed destination.</p>
        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>
        role_arn: <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
        description: <p>The description of the customer-managed destination.</p>

    Raises:
        capo_iot_managed_integrations.errors.access_denied_exception.AccessDeniedException: <p>User is not authorized.</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.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</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.update_destination_request.UpdateDestinationRequest]",
    ) -> OperationResponse[None]:
        import capo_iot_managed_integrations._operations.iot_managed_integrations.update_destination

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDestination")
    )
    input_: capo_iot_managed_integrations.types.update_destination_request.UpdateDestinationRequest = {
        "name": name
    }
    if delivery_destination_arn is not None:
        input_["delivery_destination_arn"] = delivery_destination_arn
    if delivery_destination_type is not None:
        input_["delivery_destination_type"] = delivery_destination_type
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if description is not None:
        input_["description"] = description

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