create_presigned_domain_url
¶
create_presigned_domain_url(
*,
config_overrides: Optional[SageMakerClientConfig] = None,
domain_id: Optional[DomainId] = None,
user_profile_name: Optional[UserProfileName] = None,
session_expiration_duration_in_seconds: Optional[
SessionExpirationDurationInSeconds
] = None,
expires_in_seconds: Optional[ExpiresInSeconds] = None,
space_name: Optional[SpaceName] = None,
landing_uri: Optional[LandingUri] = None,
) -> CreatePresignedDomainUrlResponse
Creates a URL for a specified UserProfile in a Domain. When accessed in a web browser, the user will be automatically signed in to the domain, and granted access to all of the Apps and files associated with the Domain's Amazon Elastic File System volume. This operation can only be called when the authentication mode equals IAM.
The IAM role or user passed to this API defines the permissions to access the app. Once the presigned URL is created, no additional permission is required to access this URL. IAM authorization policies for this API are also enforced for every HTTP request and WebSocket frame that attempts to connect to the app.
You can restrict access to this API and to the URL that it returns to a list of IP addresses, Amazon VPCs or Amazon VPC Endpoints that you specify. For more information, see Connect to Amazon SageMaker AI Studio Through an Interface VPC Endpoint .
-
The URL that you get from a call to
CreatePresignedDomainUrlhas a default timeout of 5 minutes. You can configure this value usingExpiresInSeconds. If you try to use the URL after the timeout limit expires, you are directed to the Amazon Web Services console sign-in page. -
The JupyterLab session default expiration time is 12 hours. You can configure this value using SessionExpirationDurationInSeconds.
Parameters:
-
domain_id(Optional[DomainId], default:None) –The domain ID.
-
user_profile_name(Optional[UserProfileName], default:None) –The name of the UserProfile to sign-in as.
-
session_expiration_duration_in_seconds(Optional[SessionExpirationDurationInSeconds], default:None) –The session expiration duration in seconds. This value defaults to 43200.
-
expires_in_seconds(Optional[ExpiresInSeconds], default:None) –The number of seconds until the pre-signed URL expires. This value defaults to 300.
-
space_name(Optional[SpaceName], default:None) –The name of the space.
-
landing_uri(Optional[LandingUri], default:None) –The landing page that the user is directed to when accessing the presigned URL. Using this value, users can access Studio or Studio Classic, even if it is not the default experience for the domain. The supported values are:
-
studio::relative/path: Directs users to the relative path in Studio. -
app:JupyterServer:relative/path: Directs users to the relative path in the Studio Classic application. -
app:JupyterLab:relative/path: Directs users to the relative path in the JupyterLab application. -
app:RStudioServerPro:relative/path: Directs users to the relative path in the RStudio application. -
app:CodeEditor:relative/path: Directs users to the relative path in the Code Editor, based on Code-OSS, Visual Studio Code - Open Source application. -
app:Canvas:relative/path: Directs users to the relative path in the Canvas application.
-
Raises:
-
ResourceNotFound–Resource being access is not found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_sagemaker/_services/sage_maker.py
6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 | |