Skip to content

update_packaging_group async

update_packaging_group(
    id: __string,
    *,
    config_overrides: Optional[AsyncMediaPackageVodClientConfig] = None,
    authorization: Optional[Authorization] = None,
) -> UpdatePackagingGroupResponse

Updates a specific packaging group. You can't change the id attribute or any other system-generated attributes.

Parameters:

  • id (__string) –

    The ID of a MediaPackage VOD PackagingGroup resource.

Raises:

Source code in docs_src/capo_mediapackage_vod/_services/async_media_package_vod.py
async def update_packaging_group(
    self,
    id: "capo_mediapackage_vod.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMediaPackageVodClientConfig] = None,
    authorization: Optional[
        "capo_mediapackage_vod.types.authorization.Authorization"
    ] = None,
) -> "capo_mediapackage_vod.types.update_packaging_group_response.UpdatePackagingGroupResponse":
    """Updates a specific packaging group. You can't change the id attribute or any other system-generated attributes.

    Args:
        id: The ID of a MediaPackage VOD PackagingGroup resource.

    Raises:
        capo_mediapackage_vod.errors.forbidden_exception.ForbiddenException: The client is not authorized to access the requested resource.
        capo_mediapackage_vod.errors.internal_server_error_exception.InternalServerErrorException: An unexpected error occurred.
        capo_mediapackage_vod.errors.not_found_exception.NotFoundException: The requested resource does not exist.
        capo_mediapackage_vod.errors.service_unavailable_exception.ServiceUnavailableException: An unexpected error occurred.
        capo_mediapackage_vod.errors.too_many_requests_exception.TooManyRequestsException: The client has exceeded their resource or throttling limits.
        capo_mediapackage_vod.errors.unprocessable_entity_exception.UnprocessableEntityException: The parameters sent in the request are not valid.
        capo_mediapackage_vod.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediapackage_vod.types.update_packaging_group_request.UpdatePackagingGroupRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediapackage_vod.types.update_packaging_group_response.UpdatePackagingGroupResponse"
    ]:
        import capo_mediapackage_vod._operations.media_package_vod.update_packaging_group

        (
            output,
            http_response,
        ) = await capo_mediapackage_vod._operations.media_package_vod.update_packaging_group.async_update_packaging_group(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePackagingGroup")
    )
    input_: capo_mediapackage_vod.types.update_packaging_group_request.UpdatePackagingGroupRequest = {
        "id": id
    }
    if authorization is not None:
        input_["authorization"] = authorization

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