async def batch_disassociate_user_stack(
self,
*,
config_overrides: Optional[AsyncAppStreamClientConfig] = 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_appstream.types.batch_disassociate_user_stack_request.BatchDisassociateUserStackRequest]",
) -> AsyncOperationResponse[
"capo_appstream.types.batch_disassociate_user_stack_result.BatchDisassociateUserStackResult"
]:
import capo_appstream._operations.photon_admin_proxy_service.batch_disassociate_user_stack
(
output,
http_response,
) = await capo_appstream._operations.photon_admin_proxy_service.batch_disassociate_user_stack.async_batch_disassociate_user_stack(
req.options, req.input
)
return AsyncOperationResponse(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 = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output