@@ -59,7 +59,14 @@ def details(self, value: JobDetails):
5959 @property
6060 def container_name (self ):
6161 """Job input/output data container name"""
62- return f"job-{ self .id } "
62+
63+ if self ._details .container_uri is None :
64+ return f"job-{ self .id } "
65+ else :
66+ container_uri = self ._details .container_uri
67+ path = urlparse (container_uri ).path
68+ container_name = path .split ("/" )[1 ]
69+ return container_name
6370
6471 @classmethod
6572 def from_input_data (
@@ -323,7 +330,10 @@ def upload_attachment(
323330
324331 # Use Job's default container if not specified
325332 if container_uri is None :
326- container_uri = self .workspace .get_container_uri (job_id = self .id )
333+ if self ._details .container_uri is None :
334+ container_uri = self .workspace .get_container_uri (job_id = self .id )
335+ else :
336+ container_uri = self ._details .container_uri
327337
328338 uploaded_blob_uri = self .upload_input_data (
329339 container_uri = container_uri ,
@@ -353,7 +363,10 @@ def download_attachment(
353363
354364 # Use Job's default container if not specified
355365 if container_uri is None :
356- container_uri = self .workspace .get_container_uri (job_id = self .id )
366+ if self ._details .container_uri is None :
367+ container_uri = self .workspace .get_container_uri (job_id = self .id )
368+ else :
369+ container_uri = self ._details .container_uri
357370
358371 container_client = ContainerClient .from_container_url (container_uri )
359372 blob_client = container_client .get_blob_client (name )
0 commit comments