Skip to content

disassociate_application_from_entitlement

disassociate_application_from_entitlement(
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    stack_name: Optional[Name] = None,
    entitlement_name: Optional[Name] = None,
    application_identifier: Optional[String] = None,
) -> DisassociateApplicationFromEntitlementResult

Deletes the specified application from the specified entitlement.

Parameters:

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

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

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

    The name of the entitlement.

  • application_identifier (Optional[String], default: None ) –

    The identifier of the application to remove from the entitlement.

Raises:

Source code in docs_src/capo_appstream/_services/app_stream.py
def disassociate_application_from_entitlement(
    self,
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    stack_name: Optional["capo_appstream.types.name.Name"] = None,
    entitlement_name: Optional["capo_appstream.types.name.Name"] = None,
    application_identifier: Optional["capo_appstream.types.string.String"] = None,
) -> "capo_appstream.types.disassociate_application_from_entitlement_result.DisassociateApplicationFromEntitlementResult":
    """<p>Deletes the specified application from the specified entitlement.</p>

    Args:
        stack_name: <p>The name of the stack with which the entitlement is associated.</p>
        entitlement_name: <p>The name of the entitlement.</p>
        application_identifier: <p>The identifier of the application to remove from the entitlement.</p>

    Raises:
        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.
    """

    def _handler(
        req: "OperationRequest[capo_appstream.types.disassociate_application_from_entitlement_request.DisassociateApplicationFromEntitlementRequest]",
    ) -> OperationResponse[
        "capo_appstream.types.disassociate_application_from_entitlement_result.DisassociateApplicationFromEntitlementResult"
    ]:
        import capo_appstream._operations.photon_admin_proxy_service.disassociate_application_from_entitlement

        output, http_response = (
            capo_appstream._operations.photon_admin_proxy_service.disassociate_application_from_entitlement.disassociate_application_from_entitlement(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateApplicationFromEntitlement")
    )
    input_: capo_appstream.types.disassociate_application_from_entitlement_request.DisassociateApplicationFromEntitlementRequest = {}
    if stack_name is not None:
        input_["stack_name"] = stack_name
    if entitlement_name is not None:
        input_["entitlement_name"] = entitlement_name
    if application_identifier is not None:
        input_["application_identifier"] = application_identifier

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output