Skip to content

list_benefit_applications async

list_benefit_applications(
    catalog: CatalogName,
    *,
    config_overrides: Optional[AsyncPartnerCentralBenefitsClientConfig] = None,
    programs: Optional[Programs] = None,
    fulfillment_types: Optional[FulfillmentTypes] = None,
    benefit_identifiers: Optional[BenefitIdentifiers] = None,
    status: Optional[Statuses] = None,
    stages: Optional[Stages] = None,
    associated_resources: Optional[AssociatedResources] = None,
    associated_resource_arns: Optional[Arns] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> ListBenefitApplicationsOutput

Retrieves a paginated list of benefit applications based on specified filter criteria.

Parameters:

  • catalog (CatalogName) –

    The catalog identifier to filter benefit applications by catalog.

  • programs (Optional[Programs], default: None ) –

    Filter benefit applications by specific AWS partner programs.

  • fulfillment_types (Optional[FulfillmentTypes], default: None ) –

    Filter benefit applications by specific fulfillment types.

  • benefit_identifiers (Optional[BenefitIdentifiers], default: None ) –

    Filter benefit applications by specific benefit identifiers.

  • status (Optional[Statuses], default: None ) –

    Filter benefit applications by their current processing status.

  • stages (Optional[Stages], default: None ) –

    Filter benefit applications by their current processing stage.

  • associated_resources (Optional[AssociatedResources], default: None ) –

    Filter benefit applications by associated AWS resources.

  • associated_resource_arns (Optional[Arns], default: None ) –

    Filter benefit applications by specific AWS resource ARNs.

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

    The maximum number of benefit applications to return in a single response.

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

    A pagination token to retrieve the next set of results from a previous request.

Raises:

  • AccessDeniedException –

    Thrown when the caller does not have sufficient permissions to perform the requested operation.

  • InternalServerException –

    Thrown when an unexpected error occurs on the server side during request processing.

  • ResourceNotFoundException –

    Thrown when the requested resource cannot be found or does not exist.

  • ThrottlingException –

    Thrown when the request rate exceeds the allowed limits and the request is being throttled.

  • ValidationException –

    Thrown when the request contains invalid parameters or fails input validation requirements.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_partnercentral_benefits/_services/async_partner_central_benefits.py
async def list_benefit_applications(
    self,
    catalog: "capo_partnercentral_benefits.types.catalog_name.CatalogName",
    *,
    config_overrides: Optional[AsyncPartnerCentralBenefitsClientConfig] = None,
    programs: Optional[
        "capo_partnercentral_benefits.types.programs.Programs"
    ] = None,
    fulfillment_types: Optional[
        "capo_partnercentral_benefits.types.fulfillment_types.FulfillmentTypes"
    ] = None,
    benefit_identifiers: Optional[
        "capo_partnercentral_benefits.types.benefit_identifiers.BenefitIdentifiers"
    ] = None,
    status: Optional["capo_partnercentral_benefits.types.statuses.Statuses"] = None,
    stages: Optional["capo_partnercentral_benefits.types.stages.Stages"] = None,
    associated_resources: Optional[
        "capo_partnercentral_benefits.types.associated_resources.AssociatedResources"
    ] = None,
    associated_resource_arns: Optional[
        "capo_partnercentral_benefits.types.arns.Arns"
    ] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> "capo_partnercentral_benefits.types.list_benefit_applications_output.ListBenefitApplicationsOutput":
    """<p>Retrieves a paginated list of benefit applications based on specified filter criteria.</p>

    Args:
        catalog: <p>The catalog identifier to filter benefit applications by catalog.</p>
        programs: <p>Filter benefit applications by specific AWS partner programs.</p>
        fulfillment_types: <p>Filter benefit applications by specific fulfillment types.</p>
        benefit_identifiers: <p>Filter benefit applications by specific benefit identifiers.</p>
        status: <p>Filter benefit applications by their current processing status.</p>
        stages: <p>Filter benefit applications by their current processing stage.</p>
        associated_resources: <p>Filter benefit applications by associated AWS resources.</p>
        associated_resource_arns: <p>Filter benefit applications by specific AWS resource ARNs.</p>
        max_results: <p>The maximum number of benefit applications to return in a single response.</p>
        next_token: <p>A pagination token to retrieve the next set of results from a previous request.</p>

    Raises:
        capo_partnercentral_benefits.errors.access_denied_exception.AccessDeniedException: <p>Thrown when the caller does not have sufficient permissions to perform the requested operation.</p>
        capo_partnercentral_benefits.errors.internal_server_exception.InternalServerException: <p>Thrown when an unexpected error occurs on the server side during request processing.</p>
        capo_partnercentral_benefits.errors.resource_not_found_exception.ResourceNotFoundException: <p>Thrown when the requested resource cannot be found or does not exist.</p>
        capo_partnercentral_benefits.errors.throttling_exception.ThrottlingException: <p>Thrown when the request rate exceeds the allowed limits and the request is being throttled.</p>
        capo_partnercentral_benefits.errors.validation_exception.ValidationException: <p>Thrown when the request contains invalid parameters or fails input validation requirements.</p>
        capo_partnercentral_benefits.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_partnercentral_benefits.types.list_benefit_applications_input.ListBenefitApplicationsInput]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_benefits.types.list_benefit_applications_output.ListBenefitApplicationsOutput"
    ]:
        import capo_partnercentral_benefits._operations.partner_central_benefits_service.list_benefit_applications

        (
            output,
            http_response,
        ) = await capo_partnercentral_benefits._operations.partner_central_benefits_service.list_benefit_applications.async_list_benefit_applications(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListBenefitApplications")
    )
    input_: capo_partnercentral_benefits.types.list_benefit_applications_input.ListBenefitApplicationsInput = {
        "catalog": catalog
    }
    if programs is not None:
        input_["programs"] = programs
    if fulfillment_types is not None:
        input_["fulfillment_types"] = fulfillment_types
    if benefit_identifiers is not None:
        input_["benefit_identifiers"] = benefit_identifiers
    if status is not None:
        input_["status"] = status
    if stages is not None:
        input_["stages"] = stages
    if associated_resources is not None:
        input_["associated_resources"] = associated_resources
    if associated_resource_arns is not None:
        input_["associated_resource_arns"] = associated_resource_arns
    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