class_docstr: Exception raised when trying to access a JumpStart model specs flagged as vulnerable.
  
  Raise this exception only if the scope of attributes accessed in the specifications have
  vulnerabilities. For example, a model training script may have vulnerabilities, but not
  the hosting scripts. In such a case, raise a ``VulnerableJumpStartModelError`` only when
  accessing the training specifications.
class_docstr_tok: ["Exception","raised","when","trying","to","access","a","JumpStart","model","specs","flagged","as","vulnerable",".","Raise","this","exception","only","if","the","scope","of","attributes","accessed","in","the","specifications","have","vulnerabilities",".","For","example",",","a","model","training","script","may","have","vulnerabilities",",","but","not","the","hosting","scripts",".","In","such","a","case",",","raise","a","``","VulnerableJumpStartModelError","``","only","when","accessing","the","training","specifications","."]
docstr: Instantiates VulnerableJumpStartModelError exception.
  
  Args:
      model_id (Optional[str]): model ID of vulnerable JumpStart model.
          (Default: None).
      version (Optional[str]): version of vulnerable JumpStart model.
          (Default: None).
      vulnerabilities (Optional[List[str]]): vulnerabilities associated with
          model. (Default: None).
docstr_tok: ["Instantiates","VulnerableJumpStartModelError","exception",".","Args",":","model_id","(","Optional","[","str","]",")",":","model","ID","of","vulnerable","JumpStart","model",".","(","Default",":","None",")",".","version","(","Optional","[","str","]",")",":","version","of","vulnerable","JumpStart","model",".","(","Default",":","None",")",".","vulnerabilities","(","Optional","[","List","[","str","]","]",")",":","vulnerabilities","associated","with","model",".","(","Default",":","None",")","."]
code: def __init__(
      self,
      model_id: Optional[str] = None,
      version: Optional[str] = None,
      vulnerabilities: Optional[List[str]] = None,
      scope: Optional[JumpStartScriptScope] = None,
      message: Optional[str] = None,
  ):
      """Instantiates VulnerableJumpStartModelError exception.
  
      Args:
          model_id (Optional[str]): model ID of vulnerable JumpStart model.
              (Default: None).
          version (Optional[str]): version of vulnerable JumpStart model.
              (Default: None).
          vulnerabilities (Optional[List[str]]): vulnerabilities associated with
              model. (Default: None).
  
      """
      if message:
          self.message = message
      else:
          if None in [model_id, version, vulnerabilities, scope]:
              raise RuntimeError(
                  "Must specify `model_id`, `version`, `vulnerabilities`, "
                  "and scope arguments."
              )
          if scope == JumpStartScriptScope.INFERENCE:
              self.message = (
                  f"Version '{version}' of JumpStart model '{model_id}' "  # type: ignore
                  "has at least 1 vulnerable dependency in the inference script. "
                  f"{_VULNERABLE_DEPRECATED_ERROR_RECOMMENDATION} "
                  "List of vulnerabilities: "
                  f"{', '.join(vulnerabilities)}"  # type: ignore
              )
          elif scope == JumpStartScriptScope.TRAINING:
              self.message = (
                  f"Version '{version}' of JumpStart model '{model_id}' "  # type: ignore
                  "has at least 1 vulnerable dependency in the training script. "
                  f"{_VULNERABLE_DEPRECATED_ERROR_RECOMMENDATION} "
                  "List of vulnerabilities: "
                  f"{', '.join(vulnerabilities)}"  # type: ignore
              )
          else:
              raise NotImplementedError(
                  "Unsupported scope for VulnerableJumpStartModelError: "  # type: ignore
                  f"'{scope.value}'"
              )
  
      super().__init__(self.message)
  
file_path: sagemaker-python-sdk/src/sagemaker/jumpstart/exceptions.py
imports: from __future__ import absolute_import
  from typing import List, Optional
  from sagemaker.jumpstart.constants import MODEL_ID_LIST_WEB_URL, JumpStartScriptScope
label_desc: Use image node_id 1 to create a new VulnerableJumpStartModelError object from inherited base classes: ValueError with example: obj = VulnerableJumpStartModelError(model_id, version, vulnerabilities, scope, message)