Skip to content

delete_command async

delete_command(
    command_id: CommandId, *, config_overrides: Optional[AsyncIoTClientConfig] = None
) -> DeleteCommandResponse

Delete a command resource.

Parameters:

  • command_id (CommandId) –

    The unique identifier of the command to be deleted.

Raises:

Source code in docs_src/capo_iot/_services/async_io_t.py
async def delete_command(
    self,
    command_id: "capo_iot.types.command_id.CommandId",
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
) -> "capo_iot.types.delete_command_response.DeleteCommandResponse":
    """<p>Delete a command resource.</p>

    Args:
        command_id: <p>The unique identifier of the command to be deleted.</p>

    Raises:
        capo_iot.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
        capo_iot.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.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot.errors.validation_exception.ValidationException: <p>The request is not valid.</p>
        capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot.types.delete_command_request.DeleteCommandRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot.types.delete_command_response.DeleteCommandResponse"
    ]:
        import capo_iot._operations.aws_iot_service.delete_command

        (
            output,
            http_response,
        ) = await capo_iot._operations.aws_iot_service.delete_command.async_delete_command(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteCommand")
    )
    input_: capo_iot.types.delete_command_request.DeleteCommandRequest = {
        "command_id": command_id
    }

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