Skip to content

delete_command

delete_command(
    command_id: CommandId, *, config_overrides: Optional[IoTClientConfig] = 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/io_t.py
def delete_command(
    self,
    command_id: "capo_iot.types.command_id.CommandId",
    *,
    config_overrides: Optional[IoTClientConfig] = 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.
    """

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

        output, http_response = (
            capo_iot._operations.aws_iot_service.delete_command.delete_command(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output