Skip to content

list_associated_resources async

list_associated_resources(
    application: ApplicationSpecifier,
    *,
    config_overrides: Optional[AsyncServiceCatalogAppRegistryClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListAssociatedResourcesResponse

Lists all of the resources that are associated with the specified application. Results are paginated.

If you share an application, and a consumer account associates a tag query to the application, all of the users who can access the application can also view the tag values in all accounts that are associated with it using this API.

Parameters:

  • application (ApplicationSpecifier) –

    The name, ID, or ARN of the application.

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

    The token to use to get the next page of results after a previous API call.

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

    The upper bound of the number of results to return (cannot exceed 25). If this parameter is omitted, it defaults to 25. This value is optional.

Raises:

Source code in docs_src/capo_service_catalog_appregistry/_services/async_service_catalog_app_registry.py
async def list_associated_resources(
    self,
    application: "capo_service_catalog_appregistry.types.application_specifier.ApplicationSpecifier",
    *,
    config_overrides: Optional[AsyncServiceCatalogAppRegistryClientConfig] = None,
    next_token: Optional[
        "capo_service_catalog_appregistry.types.next_token.NextToken"
    ] = None,
    max_results: Optional[
        "capo_service_catalog_appregistry.types.max_results.MaxResults"
    ] = None,
) -> "capo_service_catalog_appregistry.types.list_associated_resources_response.ListAssociatedResourcesResponse":
    """<p> Lists all of the resources that are associated with the specified application. Results are paginated. </p> <note> <p> If you share an application, and a consumer account associates a tag query to the application, all of the users who can access the application can also view the tag values in all accounts that are associated with it using this API. </p> </note>

    Args:
        application: <p> The name, ID, or ARN of the application. </p>
        next_token: <p>The token to use to get the next page of results after a previous API call. </p>
        max_results: <p>The upper bound of the number of results to return (cannot exceed 25). If this parameter is omitted, it defaults to 25. This value is optional.</p>

    Raises:
        capo_service_catalog_appregistry.errors.internal_server_exception.InternalServerException: <p>The service is experiencing internal problems.</p>
        capo_service_catalog_appregistry.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_service_catalog_appregistry.errors.validation_exception.ValidationException: <p>The request has invalid or missing parameters.</p>
        capo_service_catalog_appregistry.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_service_catalog_appregistry.types.list_associated_resources_request.ListAssociatedResourcesRequest]",
    ) -> AsyncOperationResponse[
        "capo_service_catalog_appregistry.types.list_associated_resources_response.ListAssociatedResourcesResponse"
    ]:
        import capo_service_catalog_appregistry._operations.aws242_app_registry.list_associated_resources

        (
            output,
            http_response,
        ) = await capo_service_catalog_appregistry._operations.aws242_app_registry.list_associated_resources.async_list_associated_resources(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAssociatedResources")
    )
    input_: capo_service_catalog_appregistry.types.list_associated_resources_request.ListAssociatedResourcesRequest = {
        "application": application
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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