Skip to content

list_domain_associations

list_domain_associations(
    app_id: AppId,
    *,
    config_overrides: Optional[AmplifyClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListDomainAssociationsResult

Returns the domain associations for an Amplify app.

Parameters:

  • app_id (AppId) –

    The unique ID for an Amplify app.

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

    A pagination token. Set to null to start listing apps from the start. If non-null, a pagination token is returned in a result. Pass its value in here to list more projects.

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

    The maximum number of records to list in a single response.

Raises:

Source code in docs_src/capo_amplify/_services/amplify.py
def list_domain_associations(
    self,
    app_id: "capo_amplify.types.app_id.AppId",
    *,
    config_overrides: Optional[AmplifyClientConfig] = None,
    next_token: Optional["capo_amplify.types.next_token.NextToken"] = None,
    max_results: Optional["capo_amplify.types.max_results.MaxResults"] = None,
) -> "capo_amplify.types.list_domain_associations_result.ListDomainAssociationsResult":
    """<p>Returns the domain associations for an Amplify app. </p>

    Args:
        app_id: <p> The unique ID for an Amplify app. </p>
        next_token: <p> A pagination token. Set to null to start listing apps from the start. If non-null, a pagination token is returned in a result. Pass its value in here to list more projects. </p>
        max_results: <p> The maximum number of records to list in a single response. </p>

    Raises:
        capo_amplify.errors.bad_request_exception.BadRequestException: <p>A request contains unexpected data. </p>
        capo_amplify.errors.internal_failure_exception.InternalFailureException: <p>The service failed to perform an operation due to an internal issue. </p>
        capo_amplify.errors.unauthorized_exception.UnauthorizedException: <p>An operation failed due to a lack of access. </p>
        capo_amplify.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_amplify.types.list_domain_associations_request.ListDomainAssociationsRequest]",
    ) -> OperationResponse[
        "capo_amplify.types.list_domain_associations_result.ListDomainAssociationsResult"
    ]:
        import capo_amplify._operations.amplify.list_domain_associations

        output, http_response = (
            capo_amplify._operations.amplify.list_domain_associations.list_domain_associations(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDomainAssociations")
    )
    input_: capo_amplify.types.list_domain_associations_request.ListDomainAssociationsRequest = {
        "app_id": app_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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