class_docstr: An Amazon SageMaker endpoint context, which is part of a SageMaker lineage.
class_docstr_tok: ["An","Amazon","SageMaker","endpoint","context",",","which","is","part","of","a","SageMaker","lineage","."]
docstr: Use Lineage API to get all models deployed by this endpoint.
  
  Returns:
      list of Associations: Associations that destination represents an endpoint's model.
docstr_tok: ["Use","Lineage","API","to","get","all","models","deployed","by","this","endpoint",".","Returns",":","list","of","Associations",":","Associations","that","destination","represents","an","endpoint","'s","model","."]
code: def models(self) -> List[association.Association]:
      """Use Lineage API to get all models deployed by this endpoint.
  
      Returns:
          list of Associations: Associations that destination represents an endpoint's model.
      """
      endpoint_actions: Iterator = association.Association.list(
          sagemaker_session=self.sagemaker_session,
          source_arn=self.context_arn,
          destination_type="ModelDeployment",
      )
  
      model_list: list = [
          model
          for endpoint_action in endpoint_actions
          for model in association.Association.list(
              source_arn=endpoint_action.destination_arn,
              destination_type="Model",
              sagemaker_session=self.sagemaker_session,
          )
      ]
      return model_list
  
imports: from __future__ import absolute_import
  from datetime import datetime
  from typing import Iterator, Optional, List
  from sagemaker.apiutils import _base_types
  from sagemaker.lineage import _api_types, _utils, association
  from sagemaker.lineage._api_types import ContextSummary
  from sagemaker.lineage.query import LineageQuery, LineageFilter, LineageSourceEnum, LineageEntityEnum, LineageQueryDirectionEnum
  from sagemaker.lineage.artifact import Artifact
  from sagemaker.lineage.action import Action
  from sagemaker.lineage.lineage_trial_component import LineageTrialComponent
  from sagemaker.utils import format_tags
label_desc: Use image node_id 1 for calling the EndpointContext obj's underlying member method code with example usage: obj.models() and returns: model_list