class_docstr: Class for creating/accessing a DetailProfiler app hosted on SageMaker.
class_docstr_tok: ["Class","for","creating\/accessing","a","DetailProfiler","app","hosted","on","SageMaker","."]
docstr: Get an unsigned URL for DetailProfiler app hosted on SageMaker.
  
     For users that are already in SM Studio notebook instance, the method tries to
     get domain id and user profile from the Studio environment. If succeeded, the
     generated URL will direct to SM DetailProfiler app. Otherwise it will direct to
     DetailProfiler landing page on SageMaker console. For non Studio users, the
     URL will direct to the DetailProfiler landing page on SageMaker console.
  
  Args:
      training_job_name (str): Optional. The name of the training job to pre-load in
          DetailProfiler.
          If not provided, no job will be automatically loaded when the URL is opened.
  
  Returns:
      str: An unsigned URL for DetailProfiler hosted on SageMaker.
docstr_tok: ["Get","an","unsigned","URL","for","DetailProfiler","app","hosted","on","SageMaker",".","For","users","that","are","already","in","SM","Studio","notebook","instance",",","the","method","tries","to","get","domain","id","and","user","profile","from","the","Studio","environment",".","If","succeeded",",","the","generated","URL","will","direct","to","SM","DetailProfiler","app",".","Otherwise","it","will","direct","to","DetailProfiler","landing","page","on","SageMaker","console",".","For","non","Studio","users",",","the","URL","will","direct","to","the","DetailProfiler","landing","page","on","SageMaker","console",".","Args",":","training_job_name","(","str",")",":","Optional",".","The","name","of","the","training","job","to","pre-load","in","DetailProfiler",".","If","not","provided",",","no","job","will","be","automatically","loaded","when","the","URL","is","opened",".","Returns",":","str",":","An","unsigned","URL","for","DetailProfiler","hosted","on","SageMaker","."]
code: def get_app_url(self, training_job_name: Optional[str] = None):
      """Get an unsigned URL for DetailProfiler app hosted on SageMaker.
  
         For users that are already in SM Studio notebook instance, the method tries to
         get domain id and user profile from the Studio environment. If succeeded, the
         generated URL will direct to SM DetailProfiler app. Otherwise it will direct to
         DetailProfiler landing page on SageMaker console. For non Studio users, the
         URL will direct to the DetailProfiler landing page on SageMaker console.
  
      Args:
          training_job_name (str): Optional. The name of the training job to pre-load in
              DetailProfiler.
              If not provided, no job will be automatically loaded when the URL is opened.
  
      Returns:
          str: An unsigned URL for DetailProfiler hosted on SageMaker.
      """
      if self._valid_domain_and_user:
          url = f"https://{self._domain_id}.studio.{self.region}.sagemaker.aws/profiler/default"
          if training_job_name is not None:
              self._validate_job_name(training_job_name)
              url += f"/#!/welcome?profile={training_job_name}"
      else:
          dp = "profiler-landing"
          url = "https://{region}.console.aws.amazon.com/sagemaker/home?region={region}#/{dp}".format(
              region=self.region, dp=dp
          )
  
      return url
  
file_path: sagemaker-python-sdk/src/sagemaker/interactive_apps/detail_profiler_app.py
imports: from __future__ import absolute_import
  import json
  import logging
  import os
  import re
  from typing import Optional
  from sagemaker.session import Session, NOTEBOOK_METADATA_FILE
label_desc: Use image node_id 4 for calling the DetailProfilerApp obj's underlying member method code with example usage: obj.get_app_url(training_job_name) and returns: url