Skip to content

list_entities async

list_entities(
    catalog: Catalog,
    entity_type: EntityType,
    *,
    config_overrides: Optional[AsyncMarketplaceCatalogClientConfig] = None,
    filter_list: Optional[FilterList] = None,
    sort: Optional[Sort] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[ListEntitiesMaxResultInteger] = None,
    ownership_type: Optional[OwnershipType] = None,
    entity_type_filters: Optional[EntityTypeFilters] = None,
    entity_type_sort: Optional[EntityTypeSort] = None,
) -> ListEntitiesResponse

Provides the list of entities of a given type.

Parameters:

  • catalog (Catalog) –

    The catalog related to the request. Fixed value: AWSMarketplace

  • entity_type (EntityType) –

    The type of entities to retrieve. Valid values are: AmiProduct, ContainerProduct, DataProduct, SaaSProduct, ProcurementPolicy, Experience, Audience, BrandingSettings, Offer, OfferSet, Seller, ResaleAuthorization, Solution.

  • filter_list (Optional[FilterList], default: None ) –

    An array of filter objects. Each filter object contains two attributes, filterName and filterValues.

  • sort (Optional[Sort], default: None ) –

    An object that contains two attributes, SortBy and SortOrder.

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

    The value of the next token, if it exists. Null if there are no more results.

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

    Specifies the upper limit of the elements on a single page. If a value isn't provided, the default value is 20.

  • ownership_type (Optional[OwnershipType], default: None ) –

    Filters the returned set of entities based on their owner. The default is SELF. To list entities shared with you through AWS Resource Access Manager (AWS RAM), set to SHARED. Entities shared through the AWS Marketplace Catalog API PutResourcePolicy operation can't be discovered through the SHARED parameter.

  • entity_type_filters (Optional[EntityTypeFilters], default: None ) –

    A Union object containing filter shapes for all EntityTypes. Each EntityTypeFilter shape will have filters applicable for that EntityType that can be used to search or filter entities.

  • entity_type_sort (Optional[EntityTypeSort], default: None ) –

    A Union object containing Sort shapes for all EntityTypes. Each EntityTypeSort shape will have SortBy and SortOrder applicable for fields on that EntityType. This can be used to sort the results of the filter query.

Raises:

Source code in docs_src/capo_marketplace_catalog/_services/async_marketplace_catalog.py
async def list_entities(
    self,
    catalog: "capo_marketplace_catalog.types.catalog.Catalog",
    entity_type: "capo_marketplace_catalog.types.entity_type.EntityType",
    *,
    config_overrides: Optional[AsyncMarketplaceCatalogClientConfig] = None,
    filter_list: Optional[
        "capo_marketplace_catalog.types.filter_list.FilterList"
    ] = None,
    sort: Optional["capo_marketplace_catalog.types.sort.Sort"] = None,
    next_token: Optional[
        "capo_marketplace_catalog.types.next_token.NextToken"
    ] = None,
    max_results: Optional[
        "capo_marketplace_catalog.types.list_entities_max_result_integer.ListEntitiesMaxResultInteger"
    ] = None,
    ownership_type: Optional[
        "capo_marketplace_catalog.types.ownership_type.OwnershipType"
    ] = None,
    entity_type_filters: Optional[
        "capo_marketplace_catalog.types.entity_type_filters.EntityTypeFilters"
    ] = None,
    entity_type_sort: Optional[
        "capo_marketplace_catalog.types.entity_type_sort.EntityTypeSort"
    ] = None,
) -> "capo_marketplace_catalog.types.list_entities_response.ListEntitiesResponse":
    """<p>Provides the list of entities of a given type.</p>

    Args:
        catalog: <p>The catalog related to the request. Fixed value: <code>AWSMarketplace</code> </p>
        entity_type: <p>The type of entities to retrieve. Valid values are: <code>AmiProduct</code>, <code>ContainerProduct</code>, <code>DataProduct</code>, <code>SaaSProduct</code>, <code>ProcurementPolicy</code>, <code>Experience</code>, <code>Audience</code>, <code>BrandingSettings</code>, <code>Offer</code>, <code>OfferSet</code>, <code>Seller</code>, <code>ResaleAuthorization</code>, <code>Solution</code>.</p>
        filter_list: <p>An array of filter objects. Each filter object contains two attributes, <code>filterName</code> and <code>filterValues</code>.</p>
        sort: <p>An object that contains two attributes, <code>SortBy</code> and <code>SortOrder</code>.</p>
        next_token: <p>The value of the next token, if it exists. Null if there are no more results.</p>
        max_results: <p>Specifies the upper limit of the elements on a single page. If a value isn't provided, the default value is 20.</p>
        ownership_type: <p>Filters the returned set of entities based on their owner. The default is <code>SELF</code>. To list entities shared with you through AWS Resource Access Manager (AWS RAM), set to <code>SHARED</code>. Entities shared through the AWS Marketplace Catalog API <code>PutResourcePolicy</code> operation can't be discovered through the <code>SHARED</code> parameter.</p>
        entity_type_filters: <p>A Union object containing filter shapes for all <code>EntityType</code>s. Each <code>EntityTypeFilter</code> shape will have filters applicable for that <code>EntityType</code> that can be used to search or filter entities.</p>
        entity_type_sort: <p>A Union object containing <code>Sort</code> shapes for all <code>EntityType</code>s. Each <code>EntityTypeSort</code> shape will have <code>SortBy</code> and <code>SortOrder</code> applicable for fields on that <code>EntityType</code>. This can be used to sort the results of the filter query.</p>

    Raises:
        capo_marketplace_catalog.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p> <p>HTTP status code: 403</p>
        capo_marketplace_catalog.errors.internal_service_exception.InternalServiceException: <p>There was an internal service exception.</p> <p>HTTP status code: 500</p>
        capo_marketplace_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource wasn't found.</p> <p>HTTP status code: 404</p>
        capo_marketplace_catalog.errors.throttling_exception.ThrottlingException: <p>Too many requests.</p> <p>HTTP status code: 429</p>
        capo_marketplace_catalog.errors.validation_exception.ValidationException: <p>An error occurred during validation.</p> <p>HTTP status code: 422</p>
        capo_marketplace_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_marketplace_catalog.types.list_entities_request.ListEntitiesRequest]",
    ) -> AsyncOperationResponse[
        "capo_marketplace_catalog.types.list_entities_response.ListEntitiesResponse"
    ]:
        import capo_marketplace_catalog._operations.awsmp_seymour.list_entities

        (
            output,
            http_response,
        ) = await capo_marketplace_catalog._operations.awsmp_seymour.list_entities.async_list_entities(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListEntities")
    )
    input_: capo_marketplace_catalog.types.list_entities_request.ListEntitiesRequest = {
        "catalog": catalog,
        "entity_type": entity_type,
    }
    if filter_list is not None:
        input_["filter_list"] = filter_list
    if sort is not None:
        input_["sort"] = sort
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if ownership_type is not None:
        input_["ownership_type"] = ownership_type
    if entity_type_filters is not None:
        input_["entity_type_filters"] = entity_type_filters
    if entity_type_sort is not None:
        input_["entity_type_sort"] = entity_type_sort

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