Skip to content

batch_disassociate_user_stack

batch_disassociate_user_stack(
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    user_stack_associations: Optional[UserStackAssociationList] = None,
) -> BatchDisassociateUserStackResult

Disassociates the specified users from the specified stacks.

Parameters:

Raises:

Source code in docs_src/capo_appstream/_services/app_stream.py
def batch_disassociate_user_stack(
    self,
    *,
    config_overrides: Optional[AppStreamClientConfig] = None,
    user_stack_associations: Optional[
        "capo_appstream.types.user_stack_association_list.UserStackAssociationList"
    ] = None,
) -> "capo_appstream.types.batch_disassociate_user_stack_result.BatchDisassociateUserStackResult":
    """<p>Disassociates the specified users from the specified stacks.</p>

    Args:
        user_stack_associations: <p>The list of UserStackAssociation objects.</p>

    Raises:
        capo_appstream.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Indicates an incorrect combination of parameters, or a missing parameter.</p>
        capo_appstream.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>The attempted operation is not permitted.</p>
        capo_appstream.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_appstream.types.batch_disassociate_user_stack_request.BatchDisassociateUserStackRequest]",
    ) -> OperationResponse[
        "capo_appstream.types.batch_disassociate_user_stack_result.BatchDisassociateUserStackResult"
    ]:
        import capo_appstream._operations.photon_admin_proxy_service.batch_disassociate_user_stack

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

    def _redact_input(
        input_: "capo_appstream.types.batch_disassociate_user_stack_request.BatchDisassociateUserStackRequest",
    ) -> dict[str, Any]:
        import capo_appstream.types.batch_disassociate_user_stack_request

        return capo_appstream.types.batch_disassociate_user_stack_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_appstream.types.batch_disassociate_user_stack_result.BatchDisassociateUserStackResult",
    ) -> dict[str, Any]:
        import capo_appstream.types.batch_disassociate_user_stack_result

        return capo_appstream.types.batch_disassociate_user_stack_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "BatchDisassociateUserStack",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_appstream.types.batch_disassociate_user_stack_request.BatchDisassociateUserStackRequest = {}
    if user_stack_associations is not None:
        input_["user_stack_associations"] = user_stack_associations

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