The ListPresets operation gets a list of the default presets included with Elastic Transcoder and the presets that you've added in an AWS region.
Parameters:
-
ascending
(Optional[Ascending], default:
None
)
–
To list presets in chronological order by the date and time that they were created, enter true. To list presets in reverse chronological order, enter false.
-
page_token
(Optional[Id], default:
None
)
–
When Elastic Transcoder returns more than one page of results, use pageToken in subsequent GET requests to get each successive page of results.
Raises:
Source code in docs_src/capo_elastic_transcoder/_services/elastic_transcoder.py
| def list_presets(
self,
*,
config_overrides: Optional[ElasticTranscoderClientConfig] = None,
ascending: Optional["capo_elastic_transcoder.types.ascending.Ascending"] = None,
page_token: Optional["capo_elastic_transcoder.types.id.Id"] = None,
) -> "capo_elastic_transcoder.types.list_presets_response.ListPresetsResponse":
"""<p>The ListPresets operation gets a list of the default presets included with Elastic Transcoder and the presets that you've added in an AWS region.</p>
Args:
ascending: <p>To list presets in chronological order by the date and time that they were created, enter <code>true</code>. To list presets in reverse chronological order, enter <code>false</code>.</p>
page_token: <p>When Elastic Transcoder returns more than one page of results, use <code>pageToken</code> in subsequent <code>GET</code> requests to get each successive page of results. </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.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.
"""
def _handler(
req: "OperationRequest[capo_elastic_transcoder.types.list_presets_request.ListPresetsRequest]",
) -> OperationResponse[
"capo_elastic_transcoder.types.list_presets_response.ListPresetsResponse"
]:
import capo_elastic_transcoder._operations.ets_customer_service.list_presets
output, http_response = (
capo_elastic_transcoder._operations.ets_customer_service.list_presets.list_presets(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListPresets")
)
input_: capo_elastic_transcoder.types.list_presets_request.ListPresetsRequest = {}
if ascending is not None:
input_["ascending"] = ascending
if page_token is not None:
input_["page_token"] = page_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|