Retrieves the configuration and metadata for a function. For more information about functions, see Working with functions in the MediaTailor User Guide.
Parameters:
-
function_id
(__string)
–
The identifier of the function.
Raises:
Source code in docs_src/capo_mediatailor/_services/async_media_tailor.py
| async def get_function(
self,
function_id: "capo_mediatailor.types.__string.__string",
*,
config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
) -> "capo_mediatailor.types.get_function_response.GetFunctionResponse":
"""<p>Retrieves the configuration and metadata for a function. For more information about functions, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/monetization-functions.html">Working with functions</a> in the <i>MediaTailor User Guide</i>.</p>
Args:
function_id: <p>The identifier of the function.</p>
Raises:
capo_mediatailor.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_mediatailor.types.get_function_request.GetFunctionRequest]",
) -> AsyncOperationResponse[
"capo_mediatailor.types.get_function_response.GetFunctionResponse"
]:
import capo_mediatailor._operations.media_tailor.get_function
(
output,
http_response,
) = await capo_mediatailor._operations.media_tailor.get_function.async_get_function(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetFunction")
)
input_: capo_mediatailor.types.get_function_request.GetFunctionRequest = {
"function_id": function_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|