Skip to content

list_profiles

list_profiles(
    *,
    config_overrides: Optional[Route53ProfilesClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListProfilesResponse

Lists all the Route 53 Profiles associated with your Amazon Web Services account.

Parameters:

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

    The maximum number of objects that you want to return for this request. If more objects are available, in the response, a NextToken value, which you can use in a subsequent call to get the next batch of objects, is provided.

    If you don't specify a value for MaxResults, up to 100 objects are returned.

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

    For the first call to this list request, omit this value.

    When you request a list of objects, at most the number of objects specified by MaxResults is returned. If more objects are available for retrieval, a NextToken value is returned in the response. To retrieve the next batch of objects, use the token that was returned for the prior request in your next request.

Raises:

Source code in docs_src/capo_route53profiles/_services/route53_profiles.py
def list_profiles(
    self,
    *,
    config_overrides: Optional[Route53ProfilesClientConfig] = None,
    max_results: Optional[
        "capo_route53profiles.types.max_results.MaxResults"
    ] = None,
    next_token: Optional["capo_route53profiles.types.next_token.NextToken"] = None,
) -> "capo_route53profiles.types.list_profiles_response.ListProfilesResponse":
    """<p> Lists all the Route 53 Profiles associated with your Amazon Web Services account. </p>

    Args:
        max_results: <p> The maximum number of objects that you want to return for this request. If more objects are available, in the response, a <code>NextToken</code> value, which you can use in a subsequent call to get the next batch of objects, is provided.</p> <p> If you don't specify a value for <code>MaxResults</code>, up to 100 objects are returned. </p>
        next_token: <p> For the first call to this list request, omit this value. </p> <p>When you request a list of objects, at most the number of objects specified by <code>MaxResults</code> is returned. If more objects are available for retrieval, a <code>NextToken</code> value is returned in the response. To retrieve the next batch of objects, use the token that was returned for the prior request in your next request.</p>

    Raises:
        capo_route53profiles.errors.access_denied_exception.AccessDeniedException: <p> The current account doesn't have the IAM permissions required to perform the specified operation. </p>
        capo_route53profiles.errors.invalid_next_token_exception.InvalidNextTokenException: <p> The <code>NextToken</code> you provided isn;t valid. </p>
        capo_route53profiles.errors.invalid_parameter_exception.InvalidParameterException: <p> One or more parameters in this request are not valid. </p>
        capo_route53profiles.errors.throttling_exception.ThrottlingException: <p> The request was throttled. Try again in a few minutes. </p>
        capo_route53profiles.errors.validation_exception.ValidationException: <p> You have provided an invalid command. </p>
        capo_route53profiles.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route53profiles.types.list_profiles_request.ListProfilesRequest]",
    ) -> OperationResponse[
        "capo_route53profiles.types.list_profiles_response.ListProfilesResponse"
    ]:
        import capo_route53profiles._operations.route53_profiles.list_profiles

        output, http_response = (
            capo_route53profiles._operations.route53_profiles.list_profiles.list_profiles(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListProfiles")
    )
    input_: capo_route53profiles.types.list_profiles_request.ListProfilesRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output