Skip to content

create_presigned_mlflow_app_url

create_presigned_mlflow_app_url(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    arn: Optional[MlflowAppArn] = None,
    expires_in_seconds: Optional[ExpiresInSeconds] = None,
    session_expiration_duration_in_seconds: Optional[
        SessionExpirationDurationInSeconds
    ] = None,
) -> CreatePresignedMlflowAppUrlResponse

Returns a presigned URL that you can use to connect to the MLflow UI attached to your MLflow App. For more information, see Launch the MLflow UI using a presigned URL.

Parameters:

  • arn (Optional[MlflowAppArn], default: None ) –

    The ARN of the MLflow App to connect to your MLflow UI.

  • expires_in_seconds (Optional[ExpiresInSeconds], default: None ) –

    The duration in seconds that your presigned URL is valid. The presigned URL can be used only once.

  • session_expiration_duration_in_seconds (Optional[SessionExpirationDurationInSeconds], default: None ) –

    The duration in seconds that your presigned URL is valid. The presigned URL can be used only once.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def create_presigned_mlflow_app_url(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    arn: Optional["capo_sagemaker.types.mlflow_app_arn.MlflowAppArn"] = None,
    expires_in_seconds: Optional[
        "capo_sagemaker.types.expires_in_seconds.ExpiresInSeconds"
    ] = None,
    session_expiration_duration_in_seconds: Optional[
        "capo_sagemaker.types.session_expiration_duration_in_seconds.SessionExpirationDurationInSeconds"
    ] = None,
) -> "capo_sagemaker.types.create_presigned_mlflow_app_url_response.CreatePresignedMlflowAppUrlResponse":
    """<p>Returns a presigned URL that you can use to connect to the MLflow UI attached to your MLflow App. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/mlflow-launch-ui.html">Launch the MLflow UI using a presigned URL</a>.</p>

    Args:
        arn: <p>The ARN of the MLflow App to connect to your MLflow UI.</p>
        expires_in_seconds: <p>The duration in seconds that your presigned URL is valid. The presigned URL can be used only once.</p>
        session_expiration_duration_in_seconds: <p>The duration in seconds that your presigned URL is valid. The presigned URL can be used only once.</p>

    Raises:
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.create_presigned_mlflow_app_url_request.CreatePresignedMlflowAppUrlRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.create_presigned_mlflow_app_url_response.CreatePresignedMlflowAppUrlResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.create_presigned_mlflow_app_url

        output, http_response = (
            capo_sagemaker._operations.sage_maker.create_presigned_mlflow_app_url.create_presigned_mlflow_app_url(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePresignedMlflowAppUrl")
    )
    input_: capo_sagemaker.types.create_presigned_mlflow_app_url_request.CreatePresignedMlflowAppUrlRequest = {}
    if arn is not None:
        input_["arn"] = arn
    if expires_in_seconds is not None:
        input_["expires_in_seconds"] = expires_in_seconds
    if session_expiration_duration_in_seconds is not None:
        input_["session_expiration_duration_in_seconds"] = (
            session_expiration_duration_in_seconds
        )

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output