Skip to content

list_brand_profiles async

list_brand_profiles(
    *,
    config_overrides: Optional[AsyncEndUserMessagingClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListBrandProfilesOutput

Retrieves a paginated list of the brand profiles in your account. Use the nextToken parameter to retrieve additional results.

Parameters:

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

    The token to retrieve the next page of results. This value is returned when more results are available, and is null when there are no more results to return.

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

    The maximum number of results to return per page.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • InternalServerException –

    An unexpected error occurred during the processing of the request.

  • ThrottlingException –

    The request was denied because it exceeded the allowed request rate.

  • ValidationException –

    A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.

  • UnknownServiceError –

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

Examples:

List brand profiles

>>> await client.list_brand_profiles(max_results=10)
Source code in docs_src/capo_endusermessaging/_services/async_end_user_messaging.py
async def list_brand_profiles(
    self,
    *,
    config_overrides: Optional[AsyncEndUserMessagingClientConfig] = None,
    next_token: Optional["capo_endusermessaging.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_endusermessaging.types.max_results.MaxResults"
    ] = None,
) -> (
    "capo_endusermessaging.types.list_brand_profiles_output.ListBrandProfilesOutput"
):
    """<p>Retrieves a paginated list of the brand profiles in your account. Use the nextToken parameter to retrieve additional results.</p>

    Args:
        next_token: <p>The token to retrieve the next page of results. This value is returned when more results are available, and is null when there are no more results to return.</p>
        max_results: <p>The maximum number of results to return per page.</p>

    Raises:
        capo_endusermessaging.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_endusermessaging.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of the request.</p>
        capo_endusermessaging.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded the allowed request rate.</p>
        capo_endusermessaging.errors.validation_exception.ValidationException: A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
        capo_endusermessaging.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List brand profiles

        >>> await client.list_brand_profiles(max_results=10)
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_endusermessaging.types.list_brand_profiles_input.ListBrandProfilesInput]",
    ) -> AsyncOperationResponse[
        "capo_endusermessaging.types.list_brand_profiles_output.ListBrandProfilesOutput"
    ]:
        import capo_endusermessaging._operations.end_user_messaging.list_brand_profiles

        (
            output,
            http_response,
        ) = await capo_endusermessaging._operations.end_user_messaging.list_brand_profiles.async_list_brand_profiles(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListBrandProfiles")
    )
    input_: capo_endusermessaging.types.list_brand_profiles_input.ListBrandProfilesInput = {}
    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