Skip to content

update_flow_entitlement async

update_flow_entitlement(
    entitlement_arn: str,
    flow_arn: FlowArn,
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    description: Optional[str] = None,
    encryption: Optional[UpdateEncryption] = None,
    entitlement_status: Optional[EntitlementStatus] = None,
    subscribers: Optional[__listOfString] = None,
) -> UpdateFlowEntitlementResponse

Updates an entitlement. You can change an entitlement's description, subscribers, and encryption. If you change the subscribers, the service will remove the outputs that are are used by the subscribers that are removed.

Parameters:

  • description (Optional[str], default: None ) –

    A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.

  • encryption (Optional[UpdateEncryption], default: None ) –

    The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.

  • entitlement_arn (str) –

    The Amazon Resource Name (ARN) of the entitlement that you want to update.

  • entitlement_status (Optional[EntitlementStatus], default: None ) –

    An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the entitlementStatus field in your request, MediaConnect leaves the value unchanged.

  • flow_arn (FlowArn) –

    The ARN of the flow that is associated with the entitlement that you want to update.

  • subscribers (Optional[__listOfString], default: None ) –

    The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.

Raises:

Source code in docs_src/capo_mediaconnect/_services/async_media_connect.py
async def update_flow_entitlement(
    self,
    entitlement_arn: str,
    flow_arn: "capo_mediaconnect.types.flow_arn.FlowArn",
    *,
    config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
    description: Optional[str] = None,
    encryption: Optional[
        "capo_mediaconnect.types.update_encryption.UpdateEncryption"
    ] = None,
    entitlement_status: Optional[
        "capo_mediaconnect.types.entitlement_status.EntitlementStatus"
    ] = None,
    subscribers: Optional[
        "capo_mediaconnect.types.__list_of_string.__listOfString"
    ] = None,
) -> "capo_mediaconnect.types.update_flow_entitlement_response.UpdateFlowEntitlementResponse":
    """<p> Updates an entitlement. You can change an entitlement's description, subscribers, and encryption. If you change the subscribers, the service will remove the outputs that are are used by the subscribers that are removed.</p>

    Args:
        description: <p> A description of the entitlement. This description appears only on the MediaConnect console and will not be seen by the subscriber or end user.</p>
        encryption: <p> The type of encryption that will be used on the output associated with this entitlement. Allowable encryption types: static-key, speke.</p>
        entitlement_arn: <p> The Amazon Resource Name (ARN) of the entitlement that you want to update.</p>
        entitlement_status: <p> An indication of whether you want to enable the entitlement to allow access, or disable it to stop streaming content to the subscriber’s flow temporarily. If you don’t specify the <code>entitlementStatus</code> field in your request, MediaConnect leaves the value unchanged.</p>
        flow_arn: <p> The ARN of the flow that is associated with the entitlement that you want to update.</p>
        subscribers: <p> The Amazon Web Services account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.</p>

    Raises:
        capo_mediaconnect.errors.bad_request_exception.BadRequestException: <p>This exception is thrown if the request contains a semantic error. The precise meaning depends on the API, and is documented in the error message. </p>
        capo_mediaconnect.errors.forbidden_exception.ForbiddenException: <p>You do not have sufficient access to perform this action. </p>
        capo_mediaconnect.errors.internal_server_error_exception.InternalServerErrorException: <p>The server encountered an internal error and is unable to complete the request. </p>
        capo_mediaconnect.errors.not_found_exception.NotFoundException: <p>One or more of the resources in the request does not exist in the system. </p>
        capo_mediaconnect.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable or busy. </p>
        capo_mediaconnect.errors.too_many_requests_exception.TooManyRequestsException: <p>The request was denied due to request throttling. </p>
        capo_mediaconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediaconnect.types.update_flow_entitlement_request.UpdateFlowEntitlementRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediaconnect.types.update_flow_entitlement_response.UpdateFlowEntitlementResponse"
    ]:
        import capo_mediaconnect._operations.media_connect.update_flow_entitlement

        (
            output,
            http_response,
        ) = await capo_mediaconnect._operations.media_connect.update_flow_entitlement.async_update_flow_entitlement(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFlowEntitlement")
    )
    input_: capo_mediaconnect.types.update_flow_entitlement_request.UpdateFlowEntitlementRequest = {
        "entitlement_arn": entitlement_arn,
        "flow_arn": flow_arn,
    }
    if description is not None:
        input_["description"] = description
    if encryption is not None:
        input_["encryption"] = encryption
    if entitlement_status is not None:
        input_["entitlement_status"] = entitlement_status
    if subscribers is not None:
        input_["subscribers"] = subscribers

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