Skip to content

delete_consumable_resource

delete_consumable_resource(
    *,
    config_overrides: Optional[BatchClientConfig] = None,
    consumable_resource: Optional[String] = None,
) -> DeleteConsumableResourceResponse

Deletes the specified consumable resource.

Parameters:

  • consumable_resource (Optional[String], default: None ) –

    The name or ARN of the consumable resource that will be deleted.

Raises:

  • ClientException –

    These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.

  • ServerException –

    These errors are usually caused by a server issue.

  • UnknownServiceError –

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

Examples:

To delete a consumable resource Deletes the specified consumable resource.

>>> client.delete_consumable_resource(consumable_resource='myConsumableResource')
Source code in docs_src/capo_batch/_services/batch.py
def delete_consumable_resource(
    self,
    *,
    config_overrides: Optional[BatchClientConfig] = None,
    consumable_resource: Optional["capo_batch.types.string.String"] = None,
) -> "capo_batch.types.delete_consumable_resource_response.DeleteConsumableResourceResponse":
    """<p>Deletes the specified consumable resource.</p>

    Args:
        consumable_resource: <p>The name or ARN of the consumable resource that will be deleted.</p>

    Raises:
        capo_batch.errors.client_exception.ClientException: <p>These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.</p>
        capo_batch.errors.server_exception.ServerException: <p>These errors are usually caused by a server issue.</p>
        capo_batch.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To delete a consumable resource
        Deletes the specified consumable resource.

        >>> client.delete_consumable_resource(consumable_resource='myConsumableResource')
    """

    def _handler(
        req: "OperationRequest[capo_batch.types.delete_consumable_resource_request.DeleteConsumableResourceRequest]",
    ) -> OperationResponse[
        "capo_batch.types.delete_consumable_resource_response.DeleteConsumableResourceResponse"
    ]:
        import capo_batch._operations.aws_batch_v20160810.delete_consumable_resource

        output, http_response = (
            capo_batch._operations.aws_batch_v20160810.delete_consumable_resource.delete_consumable_resource(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteConsumableResource")
    )
    input_: capo_batch.types.delete_consumable_resource_request.DeleteConsumableResourceRequest = {}
    if consumable_resource is not None:
        input_["consumable_resource"] = consumable_resource

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