Skip to content

update_destination async

update_destination(
    name: DestinationName,
    *,
    config_overrides: Optional[AsyncIoTWirelessClientConfig] = None,
    expression_type: Optional[ExpressionType] = None,
    expression: Optional[Expression] = None,
    description: Optional[Description] = None,
    role_arn: Optional[RoleArn] = None,
) -> UpdateDestinationResponse

Updates properties of a destination.

Parameters:

  • name (DestinationName) –

    The new name of the resource.

  • expression_type (Optional[ExpressionType], default: None ) –

    The type of value in Expression.

  • expression (Optional[Expression], default: None ) –

    The new rule name or topic rule to send messages to.

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

    A new description of the resource.

  • role_arn (Optional[RoleArn], default: None ) –

    The ARN of the IAM Role that authorizes the destination.

Raises:

Source code in docs_src/capo_iot_wireless/_services/async_io_t_wireless.py
async def update_destination(
    self,
    name: "capo_iot_wireless.types.destination_name.DestinationName",
    *,
    config_overrides: Optional[AsyncIoTWirelessClientConfig] = None,
    expression_type: Optional[
        "capo_iot_wireless.types.expression_type.ExpressionType"
    ] = None,
    expression: Optional["capo_iot_wireless.types.expression.Expression"] = None,
    description: Optional["capo_iot_wireless.types.description.Description"] = None,
    role_arn: Optional["capo_iot_wireless.types.role_arn.RoleArn"] = None,
) -> (
    "capo_iot_wireless.types.update_destination_response.UpdateDestinationResponse"
):
    """<p>Updates properties of a destination.</p>

    Args:
        name: <p>The new name of the resource.</p>
        expression_type: <p>The type of value in <code>Expression</code>.</p>
        expression: <p>The new rule name or topic rule to send messages to.</p>
        description: <p>A new description of the resource.</p>
        role_arn: <p>The ARN of the IAM Role that authorizes the destination.</p>

    Raises:
        capo_iot_wireless.errors.access_denied_exception.AccessDeniedException: <p>User does not have permission to perform this action.</p>
        capo_iot_wireless.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing a request.</p>
        capo_iot_wireless.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource does not exist.</p>
        capo_iot_wireless.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded the allowed API request rate.</p>
        capo_iot_wireless.errors.validation_exception.ValidationException: <p>The input did not meet the specified constraints.</p>
        capo_iot_wireless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot_wireless.types.update_destination_request.UpdateDestinationRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot_wireless.types.update_destination_response.UpdateDestinationResponse"
    ]:
        import capo_iot_wireless._operations.iotwireless.update_destination

        (
            output,
            http_response,
        ) = await capo_iot_wireless._operations.iotwireless.update_destination.async_update_destination(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output