Skip to content

delete_preset async

delete_preset(
    id: Id, *, config_overrides: Optional[AsyncElasticTranscoderClientConfig] = None
) -> DeletePresetResponse

The DeletePreset operation removes a preset that you've added in an AWS region.

You can't delete the default presets that are included with Elastic Transcoder.

Parameters:

  • id (Id) –

    The identifier of the preset for which you want to get detailed information.

Raises:

  • AccessDeniedException –

    General authentication failure. The request was not signed correctly.

  • InternalServiceException –

    Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.

  • ResourceNotFoundException –

    The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.

  • ValidationException –

    One or more required parameter values were not provided in the request.

  • UnknownServiceError –

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

Source code in docs_src/capo_elastic_transcoder/_services/async_elastic_transcoder.py
async def delete_preset(
    self,
    id: "capo_elastic_transcoder.types.id.Id",
    *,
    config_overrides: Optional[AsyncElasticTranscoderClientConfig] = None,
) -> "capo_elastic_transcoder.types.delete_preset_response.DeletePresetResponse":
    """<p>The DeletePreset operation removes a preset that you've added in an AWS region.</p> <note> <p>You can't delete the default presets that are included with Elastic Transcoder.</p> </note>

    Args:
        id: <p>The identifier of the preset for which you want to get detailed information.</p>

    Raises:
        capo_elastic_transcoder.errors.access_denied_exception.AccessDeniedException: <p>General authentication failure. The request was not signed correctly.</p>
        capo_elastic_transcoder.errors.incompatible_version_exception.IncompatibleVersionException
        capo_elastic_transcoder.errors.internal_service_exception.InternalServiceException: <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
        capo_elastic_transcoder.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
        capo_elastic_transcoder.errors.validation_exception.ValidationException: <p>One or more required parameter values were not provided in the request.</p>
        capo_elastic_transcoder.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elastic_transcoder.types.delete_preset_request.DeletePresetRequest]",
    ) -> AsyncOperationResponse[
        "capo_elastic_transcoder.types.delete_preset_response.DeletePresetResponse"
    ]:
        import capo_elastic_transcoder._operations.ets_customer_service.delete_preset

        (
            output,
            http_response,
        ) = await capo_elastic_transcoder._operations.ets_customer_service.delete_preset.async_delete_preset(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeletePreset")
    )
    input_: capo_elastic_transcoder.types.delete_preset_request.DeletePresetRequest = {
        "id": id
    }

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