Skip to content

update_entitlement async

update_entitlement(
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    name: Optional[Name] = None,
    stack_name: Optional[Name] = None,
    description: Optional[Description] = None,
    app_visibility: Optional[AppVisibility] = None,
    attributes: Optional[EntitlementAttributeList] = None,
) -> UpdateEntitlementResult

Updates the specified entitlement.

Parameters:

  • name (Optional[Name], default: None ) –

    The name of the entitlement.

  • stack_name (Optional[Name], default: None ) –

    The name of the stack with which the entitlement is associated.

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

    The description of the entitlement.

  • app_visibility (Optional[AppVisibility], default: None ) –

    Specifies whether all or only selected apps are entitled.

  • attributes (Optional[EntitlementAttributeList], default: None ) –

    The attributes of the entitlement.

Raises:

Source code in docs_src/capo_appstream/_services/async_app_stream.py
async def update_entitlement(
    self,
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    name: Optional["capo_appstream.types.name.Name"] = None,
    stack_name: Optional["capo_appstream.types.name.Name"] = None,
    description: Optional["capo_appstream.types.description.Description"] = None,
    app_visibility: Optional[
        "capo_appstream.types.app_visibility.AppVisibility"
    ] = None,
    attributes: Optional[
        "capo_appstream.types.entitlement_attribute_list.EntitlementAttributeList"
    ] = None,
) -> "capo_appstream.types.update_entitlement_result.UpdateEntitlementResult":
    """<p>Updates the specified entitlement.</p>

    Args:
        name: <p>The name of the entitlement.</p>
        stack_name: <p>The name of the stack with which the entitlement is associated.</p>
        description: <p>The description of the entitlement.</p>
        app_visibility: <p>Specifies whether all or only selected apps are entitled.</p>
        attributes: <p>The attributes of the entitlement.</p>

    Raises:
        capo_appstream.errors.concurrent_modification_exception.ConcurrentModificationException: <p>An API error occurred. Wait a few minutes and try again.</p>
        capo_appstream.errors.entitlement_not_found_exception.EntitlementNotFoundException: <p>The entitlement can't be found.</p>
        capo_appstream.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>The attempted operation is not permitted.</p>
        capo_appstream.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_appstream.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appstream.types.update_entitlement_request.UpdateEntitlementRequest]",
    ) -> AsyncOperationResponse[
        "capo_appstream.types.update_entitlement_result.UpdateEntitlementResult"
    ]:
        import capo_appstream._operations.photon_admin_proxy_service.update_entitlement

        (
            output,
            http_response,
        ) = await capo_appstream._operations.photon_admin_proxy_service.update_entitlement.async_update_entitlement(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateEntitlement")
    )
    input_: capo_appstream.types.update_entitlement_request.UpdateEntitlementRequest = {}
    if name is not None:
        input_["name"] = name
    if stack_name is not None:
        input_["stack_name"] = stack_name
    if description is not None:
        input_["description"] = description
    if app_visibility is not None:
        input_["app_visibility"] = app_visibility
    if attributes is not None:
        input_["attributes"] = attributes

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