Skip to content

delete_label

delete_label(
    label_group_name: LabelGroupName,
    label_id: LabelId,
    *,
    config_overrides: Optional[LookoutEquipmentClientConfig] = None,
) -> None

Deletes a label.

Parameters:

  • label_group_name (LabelGroupName) –

    The name of the label group that contains the label that you want to delete. Data in this field will be retained for service usage. Follow best practices for the security of your data.

  • label_id (LabelId) –

    The ID of the label that you want to delete.

Raises:

  • AccessDeniedException –

    The request could not be completed because you do not have access to the resource.

  • ConflictException –

    The request could not be completed due to a conflict with the current state of the target resource.

  • InternalServerException –

    Processing of the request has failed because of an unknown error, exception or failure.

  • ResourceNotFoundException –

    The resource requested could not be found. Verify the resource ID and retry your request.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related Amazon Web Services service that's being utilized.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_lookoutequipment/_services/lookout_equipment.py
def delete_label(
    self,
    label_group_name: "capo_lookoutequipment.types.label_group_name.LabelGroupName",
    label_id: "capo_lookoutequipment.types.label_id.LabelId",
    *,
    config_overrides: Optional[LookoutEquipmentClientConfig] = None,
) -> None:
    """<p> Deletes a label. </p>

    Args:
        label_group_name: <p> The name of the label group that contains the label that you want to delete. Data in this field will be retained for service usage. Follow best practices for the security of your data. </p>
        label_id: <p> The ID of the label that you want to delete. </p>

    Raises:
        capo_lookoutequipment.errors.access_denied_exception.AccessDeniedException: <p>The request could not be completed because you do not have access to the resource. </p>
        capo_lookoutequipment.errors.conflict_exception.ConflictException: <p> The request could not be completed due to a conflict with the current state of the target resource. </p>
        capo_lookoutequipment.errors.internal_server_exception.InternalServerException: <p> Processing of the request has failed because of an unknown error, exception or failure. </p>
        capo_lookoutequipment.errors.resource_not_found_exception.ResourceNotFoundException: <p> The resource requested could not be found. Verify the resource ID and retry your request. </p>
        capo_lookoutequipment.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_lookoutequipment.errors.validation_exception.ValidationException: <p> The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related Amazon Web Services service that's being utilized. </p>
        capo_lookoutequipment.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_lookoutequipment.types.delete_label_request.DeleteLabelRequest]",
    ) -> OperationResponse[None]:
        import capo_lookoutequipment._operations.aws_lookout_equipment_frontend_service.delete_label

        output, http_response = (
            capo_lookoutequipment._operations.aws_lookout_equipment_frontend_service.delete_label.delete_label(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteLabel")
    )
    input_: capo_lookoutequipment.types.delete_label_request.DeleteLabelRequest = {
        "label_group_name": label_group_name,
        "label_id": label_id,
    }

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