Skip to content

describe_application_associations async

describe_application_associations(
    application_id: WorkSpaceApplicationId,
    associated_resource_types: ApplicationAssociatedResourceTypeList,
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    max_results: Optional[Limit] = None,
    next_token: Optional[PaginationToken] = None,
) -> DescribeApplicationAssociationsResult

Describes the associations between the application and the specified associated resources.

Parameters:

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

    The maximum number of associations to return.

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

    If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.

  • application_id (WorkSpaceApplicationId) –

    The identifier of the specified application.

  • associated_resource_types (ApplicationAssociatedResourceTypeList) –

    The resource type of the associated resources.

Raises:

Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
async def describe_application_associations(
    self,
    application_id: "capo_workspaces.types.work_space_application_id.WorkSpaceApplicationId",
    associated_resource_types: "capo_workspaces.types.application_associated_resource_type_list.ApplicationAssociatedResourceTypeList",
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    max_results: Optional["capo_workspaces.types.limit.Limit"] = None,
    next_token: Optional[
        "capo_workspaces.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_workspaces.types.describe_application_associations_result.DescribeApplicationAssociationsResult":
    """<p>Describes the associations between the application and the specified associated resources.</p>

    Args:
        max_results: <p>The maximum number of associations to return.</p>
        next_token: <p>If you received a <code>NextToken</code> from a previous call that was paginated, provide this token to receive the next set of results.</p>
        application_id: <p>The identifier of the specified application.</p>
        associated_resource_types: <p>The resource type of the associated resources.</p>

    Raises:
        capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
        capo_workspaces.errors.invalid_parameter_values_exception.InvalidParameterValuesException: <p>One or more parameter values are not valid.</p>
        capo_workspaces.errors.operation_not_supported_exception.OperationNotSupportedException: <p>This operation is not supported.</p>
        capo_workspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workspaces.types.describe_application_associations_request.DescribeApplicationAssociationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces.types.describe_application_associations_result.DescribeApplicationAssociationsResult"
    ]:
        import capo_workspaces._operations.workspaces_service.describe_application_associations

        (
            output,
            http_response,
        ) = await capo_workspaces._operations.workspaces_service.describe_application_associations.async_describe_application_associations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeApplicationAssociations")
    )
    input_: capo_workspaces.types.describe_application_associations_request.DescribeApplicationAssociationsRequest = {
        "application_id": application_id,
        "associated_resource_types": associated_resource_types,
    }
    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