Skip to content

list_associated_fleets async

list_associated_fleets(
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    stack_name: Optional[String] = None,
    next_token: Optional[String] = None,
) -> ListAssociatedFleetsResult

Retrieves the name of the fleet that is associated with the specified stack.

Parameters:

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

    The name of the stack.

  • 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 list_associated_fleets(
    self,
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    stack_name: Optional["capo_appstream.types.string.String"] = None,
    next_token: Optional["capo_appstream.types.string.String"] = None,
) -> (
    "capo_appstream.types.list_associated_fleets_result.ListAssociatedFleetsResult"
):
    """<p>Retrieves the name of the fleet that is associated with the specified stack.</p>

    Args:
        stack_name: <p>The name of the stack.</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.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appstream.types.list_associated_fleets_request.ListAssociatedFleetsRequest]",
    ) -> AsyncOperationResponse[
        "capo_appstream.types.list_associated_fleets_result.ListAssociatedFleetsResult"
    ]:
        import capo_appstream._operations.photon_admin_proxy_service.list_associated_fleets

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAssociatedFleets")
    )
    input_: capo_appstream.types.list_associated_fleets_request.ListAssociatedFleetsRequest = {}
    if stack_name is not None:
        input_["stack_name"] = stack_name
    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