Skip to content

get_domain_association

get_domain_association(
    app_id: AppId,
    domain_name: DomainName,
    *,
    config_overrides: Optional[AmplifyClientConfig] = None,
) -> GetDomainAssociationResult

Returns the domain information for an Amplify app.

Parameters:

  • app_id (AppId) –

    The unique id for an Amplify app.

  • domain_name (DomainName) –

    The name of the domain.

Raises:

Source code in docs_src/capo_amplify/_services/amplify.py
def get_domain_association(
    self,
    app_id: "capo_amplify.types.app_id.AppId",
    domain_name: "capo_amplify.types.domain_name.DomainName",
    *,
    config_overrides: Optional[AmplifyClientConfig] = None,
) -> "capo_amplify.types.get_domain_association_result.GetDomainAssociationResult":
    """<p>Returns the domain information for an Amplify app. </p>

    Args:
        app_id: <p> The unique id for an Amplify app. </p>
        domain_name: <p> The name of the domain. </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.not_found_exception.NotFoundException: <p>An entity was not found during an operation. </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.get_domain_association_request.GetDomainAssociationRequest]",
    ) -> OperationResponse[
        "capo_amplify.types.get_domain_association_result.GetDomainAssociationResult"
    ]:
        import capo_amplify._operations.amplify.get_domain_association

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDomainAssociation")
    )
    input_: capo_amplify.types.get_domain_association_request.GetDomainAssociationRequest = {
        "app_id": app_id,
        "domain_name": domain_name,
    }

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