Skip to content

get_api_association async

get_api_association(
    domain_name: DomainName,
    *,
    config_overrides: Optional[AsyncAppSyncClientConfig] = None,
) -> GetApiAssociationResponse

Retrieves an ApiAssociation object.

Parameters:

Raises:

  • AccessDeniedException –

    You don't have access to perform this operation on this resource.

  • BadRequestException –

    The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

  • InternalFailureException –

    An internal AppSync error occurred. Try your request again.

  • NotFoundException –

    The resource specified in the request was not found. Check the resource, and then try again.

  • UnknownServiceError –

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

Source code in docs_src/capo_appsync/_services/async_app_sync.py
async def get_api_association(
    self,
    domain_name: "capo_appsync.types.domain_name.DomainName",
    *,
    config_overrides: Optional[AsyncAppSyncClientConfig] = None,
) -> "capo_appsync.types.get_api_association_response.GetApiAssociationResponse":
    """<p>Retrieves an <code>ApiAssociation</code> object.</p>

    Args:
        domain_name: <p>The domain name.</p>

    Raises:
        capo_appsync.errors.access_denied_exception.AccessDeniedException: <p>You don't have access to perform this operation on this resource.</p>
        capo_appsync.errors.bad_request_exception.BadRequestException: <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.</p>
        capo_appsync.errors.internal_failure_exception.InternalFailureException: <p>An internal AppSync error occurred. Try your request again.</p>
        capo_appsync.errors.not_found_exception.NotFoundException: <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
        capo_appsync.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appsync.types.get_api_association_request.GetApiAssociationRequest]",
    ) -> AsyncOperationResponse[
        "capo_appsync.types.get_api_association_response.GetApiAssociationResponse"
    ]:
        import capo_appsync._operations.aws_deepdish_control_plane_service.get_api_association

        (
            output,
            http_response,
        ) = await capo_appsync._operations.aws_deepdish_control_plane_service.get_api_association.async_get_api_association(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetApiAssociation")
    )
    input_: capo_appsync.types.get_api_association_request.GetApiAssociationRequest = {
        "domain_name": domain_name
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output