Skip to content

describe_user_stack_associations async

describe_user_stack_associations(
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    stack_name: Optional[String] = None,
    user_name: Optional[Username] = None,
    authentication_type: Optional[AuthenticationType] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[String] = None,
) -> DescribeUserStackAssociationsResult

Retrieves a list that describes the UserStackAssociation objects. You must specify either or both of the following:

  • The stack name

  • The user name (email address of the user associated with the stack) and the authentication type for the user

Parameters:

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

    The name of the stack that is associated with the user.

  • user_name (Optional[Username], default: None ) –

    The email address of the user who is associated with the stack.

    Users' email addresses are case-sensitive.

  • authentication_type (Optional[AuthenticationType], default: None ) –

    The authentication type for the user who is associated with the stack. You must specify USERPOOL.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum size of each page of results.

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

    The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

Raises:

Source code in docs_src/capo_appstream/_services/async_app_stream.py
async def describe_user_stack_associations(
    self,
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    stack_name: Optional["capo_appstream.types.string.String"] = None,
    user_name: Optional["capo_appstream.types.username.Username"] = None,
    authentication_type: Optional[
        "capo_appstream.types.authentication_type.AuthenticationType"
    ] = None,
    max_results: Optional["capo_appstream.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_appstream.types.string.String"] = None,
) -> "capo_appstream.types.describe_user_stack_associations_result.DescribeUserStackAssociationsResult":
    """<p>Retrieves a list that describes the UserStackAssociation objects. You must specify either or both of the following:</p> <ul> <li> <p>The stack name</p> </li> <li> <p>The user name (email address of the user associated with the stack) and the authentication type for the user</p> </li> </ul>

    Args:
        stack_name: <p>The name of the stack that is associated with the user.</p>
        user_name: <p>The email address of the user who is associated with the stack.</p> <note> <p>Users' email addresses are case-sensitive.</p> </note>
        authentication_type: <p>The authentication type for the user who is associated with the stack. You must specify USERPOOL.</p>
        max_results: <p>The maximum size of each page of results.</p>
        next_token: <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</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.describe_user_stack_associations_request.DescribeUserStackAssociationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_appstream.types.describe_user_stack_associations_result.DescribeUserStackAssociationsResult"
    ]:
        import capo_appstream._operations.photon_admin_proxy_service.describe_user_stack_associations

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

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

        return capo_appstream.types.describe_user_stack_associations_request.redact_sensitive(
            input_
        )

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

        return capo_appstream.types.describe_user_stack_associations_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DescribeUserStackAssociations",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_appstream.types.describe_user_stack_associations_request.DescribeUserStackAssociationsRequest = {}
    if stack_name is not None:
        input_["stack_name"] = stack_name
    if user_name is not None:
        input_["user_name"] = user_name
    if authentication_type is not None:
        input_["authentication_type"] = authentication_type
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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