Skip to content

create_mlflow_app

create_mlflow_app(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    name: Optional[MlflowAppName] = None,
    artifact_store_uri: Optional[S3Uri] = None,
    role_arn: Optional[RoleArn] = None,
    kms_key_id: Optional[KmsKeyId] = None,
    model_registration_mode: Optional[ModelRegistrationMode] = None,
    weekly_maintenance_window_start: Optional[WeeklyMaintenanceWindowStart] = None,
    account_default_status: Optional[AccountDefaultStatus] = None,
    default_domain_id_list: Optional[DefaultDomainIdList] = None,
    tags: Optional[TagList] = None,
) -> CreateMlflowAppResponse

Creates an MLflow Tracking Server using a general purpose Amazon S3 bucket as the artifact store.

Parameters:

  • name (Optional[MlflowAppName], default: None ) –

    A string identifying the MLflow app name. This string is not part of the tracking server ARN.

  • artifact_store_uri (Optional[S3Uri], default: None ) –

    The S3 URI for a general purpose bucket to use as the MLflow App artifact store.

  • role_arn (Optional[RoleArn], default: None ) –

    The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow App uses to access the artifact store in Amazon S3. The role should have the AmazonS3FullAccess permission.

  • kms_key_id (Optional[KmsKeyId], default: None ) –

    The ID of the Amazon Web Services KMS key used to encrypt the data at rest associated with the MLflow App. If you don't specify a value, the MLflow App is not encrypted with a customer-managed key.

  • model_registration_mode (Optional[ModelRegistrationMode], default: None ) –

    Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to AutoModelRegistrationEnabled. To disable automatic model registration, set this value to AutoModelRegistrationDisabled. If not specified, AutomaticModelRegistration defaults to AutoModelRegistrationDisabled.

  • weekly_maintenance_window_start (Optional[WeeklyMaintenanceWindowStart], default: None ) –

    The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30.

  • account_default_status (Optional[AccountDefaultStatus], default: None ) –

    Indicates whether this MLflow app is the default for the entire account.

  • default_domain_id_list (Optional[DefaultDomainIdList], default: None ) –

    List of SageMaker domain IDs for which this MLflow App is used as the default.

  • tags (Optional[TagList], default: None ) –

    Tags consisting of key-value pairs used to manage metadata for the MLflow App.

Raises:

  • ResourceLimitExceeded –

    You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def create_mlflow_app(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    name: Optional["capo_sagemaker.types.mlflow_app_name.MlflowAppName"] = None,
    artifact_store_uri: Optional["capo_sagemaker.types.s3_uri.S3Uri"] = None,
    role_arn: Optional["capo_sagemaker.types.role_arn.RoleArn"] = None,
    kms_key_id: Optional["capo_sagemaker.types.kms_key_id.KmsKeyId"] = None,
    model_registration_mode: Optional[
        "capo_sagemaker.types.model_registration_mode.ModelRegistrationMode"
    ] = None,
    weekly_maintenance_window_start: Optional[
        "capo_sagemaker.types.weekly_maintenance_window_start.WeeklyMaintenanceWindowStart"
    ] = None,
    account_default_status: Optional[
        "capo_sagemaker.types.account_default_status.AccountDefaultStatus"
    ] = None,
    default_domain_id_list: Optional[
        "capo_sagemaker.types.default_domain_id_list.DefaultDomainIdList"
    ] = None,
    tags: Optional["capo_sagemaker.types.tag_list.TagList"] = None,
) -> "capo_sagemaker.types.create_mlflow_app_response.CreateMlflowAppResponse":
    """<p>Creates an MLflow Tracking Server using a general purpose Amazon S3 bucket as the artifact store.</p>

    Args:
        name: <p>A string identifying the MLflow app name. This string is not part of the tracking server ARN.</p>
        artifact_store_uri: <p>The S3 URI for a general purpose bucket to use as the MLflow App artifact store.</p>
        role_arn: <p>The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow App uses to access the artifact store in Amazon S3. The role should have the <code>AmazonS3FullAccess</code> permission.</p>
        kms_key_id: <p>The ID of the Amazon Web Services KMS key used to encrypt the data at rest associated with the MLflow App. If you don't specify a value, the MLflow App is not encrypted with a customer-managed key.</p>
        model_registration_mode: <p>Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to <code>AutoModelRegistrationEnabled</code>. To disable automatic model registration, set this value to <code>AutoModelRegistrationDisabled</code>. If not specified, <code>AutomaticModelRegistration</code> defaults to <code>AutoModelRegistrationDisabled</code>.</p>
        weekly_maintenance_window_start: <p>The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30.</p>
        account_default_status: <p>Indicates whether this MLflow app is the default for the entire account.</p>
        default_domain_id_list: <p>List of SageMaker domain IDs for which this MLflow App is used as the default.</p>
        tags: <p>Tags consisting of key-value pairs used to manage metadata for the MLflow App.</p>

    Raises:
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.create_mlflow_app_request.CreateMlflowAppRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.create_mlflow_app_response.CreateMlflowAppResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.create_mlflow_app

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateMlflowApp")
    )
    input_: capo_sagemaker.types.create_mlflow_app_request.CreateMlflowAppRequest = {}
    if name is not None:
        input_["name"] = name
    if artifact_store_uri is not None:
        input_["artifact_store_uri"] = artifact_store_uri
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id
    if model_registration_mode is not None:
        input_["model_registration_mode"] = model_registration_mode
    if weekly_maintenance_window_start is not None:
        input_["weekly_maintenance_window_start"] = weekly_maintenance_window_start
    if account_default_status is not None:
        input_["account_default_status"] = account_default_status
    if default_domain_id_list is not None:
        input_["default_domain_id_list"] = default_domain_id_list
    if tags is not None:
        input_["tags"] = tags

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