Skip to content

list_profile_resource_associations async

list_profile_resource_associations(
    profile_id: ResourceId,
    *,
    config_overrides: Optional[AsyncRoute53ProfilesClientConfig] = None,
    resource_type: Optional[String] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListProfileResourceAssociationsResponse

Lists all the resource associations for the specified Route 53 Profile.

Parameters:

  • profile_id (ResourceId) –

    The ID of the Profile.

  • resource_type (Optional[String], default: None ) –

    ID of a resource if you want information on only one type.

  • 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/async_route53_profiles.py
async def list_profile_resource_associations(
    self,
    profile_id: "capo_route53profiles.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[AsyncRoute53ProfilesClientConfig] = None,
    resource_type: Optional["capo_route53profiles.types.string.String"] = 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_profile_resource_associations_response.ListProfileResourceAssociationsResponse":
    """<p> Lists all the resource associations for the specified Route 53 Profile. </p>

    Args:
        profile_id: <p> The ID of the Profile. </p>
        resource_type: <p> ID of a resource if you want information on only one type. </p>
        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.internal_service_error_exception.InternalServiceErrorException: <p> An internal server error occured. Retry your request. </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.resource_not_found_exception.ResourceNotFoundException: <p> The resource you are associating is not found. </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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route53profiles.types.list_profile_resource_associations_request.ListProfileResourceAssociationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_route53profiles.types.list_profile_resource_associations_response.ListProfileResourceAssociationsResponse"
    ]:
        import capo_route53profiles._operations.route53_profiles.list_profile_resource_associations

        (
            output,
            http_response,
        ) = await capo_route53profiles._operations.route53_profiles.list_profile_resource_associations.async_list_profile_resource_associations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListProfileResourceAssociations")
    )
    input_: capo_route53profiles.types.list_profile_resource_associations_request.ListProfileResourceAssociationsRequest = {
        "profile_id": profile_id
    }
    if resource_type is not None:
        input_["resource_type"] = resource_type
    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