Gateway operations
Secrets
MLFlowClient.creategatewaysecret — Function
creategatewaysecret(instance::MLFlow, secret_name::String, secret_value::Array{Dict{String,String}};
provider::Union{String,Missing}=missing, auth_config::Union{Array{Dict{String,String}},Missing}=missing,
created_by::Union{String,Missing}=missing)Create a new encrypted secret for LLM provider authentication.
Arguments
instance:MLFlowconfiguration.secret_name: User-friendly name for the secret (must be unique).secret_value: The secret value(s) to encrypt as an array of key-value pairs. Example:[Dict("key" => "api_key", "value" => "sk-xxx")]provider: Optional LLM provider (e.g., "openai", "anthropic").auth_config: Optional provider-specific auth configuration as an array of key-value pairs.created_by: Username of the creator.
Returns
An instance of type GatewaySecretInfo.
MLFlowClient.getgatewaysecretinfo — Function
getgatewaysecretinfo(instance::MLFlow; secret_id::Union{String,Missing}=missing,
secret_name::Union{String,Missing}=missing)Get metadata about a secret (does not include the encrypted value).
Arguments
instance:MLFlowconfiguration.secret_id: Either secretid or secretname must be provided.secret_name: Either secretid or secretname must be provided.
Returns
An instance of type GatewaySecretInfo.
MLFlowClient.updategatewaysecret — Function
updategatewaysecret(instance::MLFlow, secret_id::String;
secret_value::Union{Array{<:AbstractDict},Missing}=missing,
auth_config::Union{Array{<:AbstractDict},Missing}=missing,
updated_by::Union{String,Missing}=missing)Update an existing secret's value or auth configuration.
Arguments
instance:MLFlowconfiguration.secret_id: ID of the secret to update.secret_value: Optional new secret value(s) as an array of key-value pairs.auth_config: Optional new auth configuration as an array of key-value pairs.updated_by: Username of the updater.
Returns
An instance of type GatewaySecretInfo.
MLFlowClient.deletegatewaysecret — Function
deletegatewaysecret(instance::MLFlow, secret_id::String)Delete a secret.
Arguments
instance:MLFlowconfiguration.secret_id: ID of the secret to delete.
Returns
true if successful. Otherwise, raises exception.
MLFlowClient.listgatewaysecretinfos — Function
listgatewaysecretinfos(instance::MLFlow; provider::Union{String,Missing}=missing)List all secrets with optional filtering by provider.
Arguments
instance:MLFlowconfiguration.provider: Optional filter by provider (e.g., "openai", "anthropic").
Returns
Vector of GatewaySecretInfo entities.
Model Definitions
MLFlowClient.creategatewaymodeldefinition — Function
creategatewaymodeldefinition(instance::MLFlow, name::String, secret_id::String,
provider::String, model_name::String; created_by::Union{String,Missing}=missing)Create a reusable model definition.
Arguments
instance:MLFlowconfiguration.name: User-friendly name for the model definition (must be unique).secret_id: ID of the secret containing authentication credentials.provider: LLM provider (e.g., "openai", "anthropic").model_name: Provider-specific model identifier.created_by: Username of the creator.
Returns
An instance of type GatewayModelDefinition.
MLFlowClient.getgatewaymodeldefinition — Function
getgatewaymodeldefinition(instance::MLFlow, model_definition_id::String)Get a model definition by ID.
Arguments
instance:MLFlowconfiguration.model_definition_id: ID of the model definition to retrieve.
Returns
An instance of type GatewayModelDefinition.
MLFlowClient.listgatewaymodeldefinitions — Function
listgatewaymodeldefinitions(instance::MLFlow; provider::Union{String,Missing}=missing)List all model definitions with optional filters.
Arguments
instance:MLFlowconfiguration.provider: Optional filter by provider.
Returns
Vector of GatewayModelDefinition entities.
MLFlowClient.updategatewaymodeldefinition — Function
updategatewaymodeldefinition(instance::MLFlow, model_definition_id::String;
name::Union{String,Missing}=missing, secret_id::Union{String,Missing}=missing,
model_name::Union{String,Missing}=missing, provider::Union{String,Missing}=missing,
updated_by::Union{String,Missing}=missing)Update a model definition.
Arguments
instance:MLFlowconfiguration.model_definition_id: ID of the model definition to update.name: Optional new name.secret_id: Optional new secret ID.model_name: Optional new model name.provider: Optional new provider.updated_by: Username of the updater.
Returns
An instance of type GatewayModelDefinition.
MLFlowClient.deletegatewaymodeldefinition — Function
deletegatewaymodeldefinition(instance::MLFlow, model_definition_id::String)Delete a model definition.
Arguments
instance:MLFlowconfiguration.model_definition_id: ID of the model definition to delete.
Returns
true if successful. Otherwise, raises exception.
Endpoints
MLFlowClient.creategatewayendpoint — Function
creategatewayendpoint(instance::MLFlow, name::String, model_configs::Array;
created_by::Union{String,Missing}=missing, routing_strategy::Union{String,Missing}=missing,
fallback_config::Union{Dict,Missing}=missing, experiment_id::Union{String,Missing}=missing,
usage_tracking::Union{Bool,Missing}=missing)Create a gateway endpoint.
Arguments
instance:MLFlowconfiguration.name: Name of the endpoint.model_configs: Array of model configurations. Each config should have:model_definition_id: ID of the model definitionlinkage_type: Type of linkage (e.g., "PRIMARY", "FALLBACK")weight: Routing weight (optional)fallback_order: Order for fallback (optional)
created_by: Username of the creator.routing_strategy: Optional routing strategy for the endpoint.fallback_config: Optional fallback configuration.experiment_id: Optional experiment ID for tracing.usage_tracking: Whether to enable usage tracking (defaults to false).
Returns
An instance of type GatewayEndpoint.
MLFlowClient.getgatewayendpoint — Function
getgatewayendpoint(instance::MLFlow, endpoint_id::String)Get a gateway endpoint by ID.
Arguments
instance:MLFlowconfiguration.endpoint_id: ID of the endpoint to retrieve.
Returns
An instance of type GatewayEndpoint.
MLFlowClient.updategatewayendpoint — Function
updategatewayendpoint(instance::MLFlow, endpoint_id::String;
name::Union{String,Missing}=missing,
model_configs::Union{Array,Missing}=missing,
routing_strategy::Union{String,Missing}=missing,
fallback_config::Union{Dict,Missing}=missing,
experiment_id::Union{String,Missing}=missing,
usage_tracking::Union{Bool,Missing}=missing,
updated_by::Union{String,Missing}=missing)Update a gateway endpoint.
Arguments
instance:MLFlowconfiguration.endpoint_id: ID of the endpoint to update.name: Optional new name for the endpoint.model_configs: Optional new list of model configurations (replaces all existing).routing_strategy: Optional new routing strategy.fallback_config: Optional fallback configuration.experiment_id: Optional experiment ID for tracing.usage_tracking: Whether to enable usage tracking.updated_by: Username of the updater.
Returns
An instance of type GatewayEndpoint.
MLFlowClient.deletegatewayendpoint — Function
deletegatewayendpoint(instance::MLFlow, endpoint_id::String)Delete a gateway endpoint.
Arguments
instance:MLFlowconfiguration.endpoint_id: ID of the endpoint to delete.
Returns
true if successful. Otherwise, raises exception.
MLFlowClient.listgatewayendpoints — Function
listgatewayendpoints(instance::MLFlow; endpoint_type::Union{String,Missing}=missing)List all gateway endpoints with optional filters.
Arguments
instance:MLFlowconfiguration.endpoint_type: Optional filter by endpoint type.
Returns
Vector of GatewayEndpoint entities.
MLFlowClient.attachmodeltogatewayendpoint — Function
attachmodeltogatewayendpoint(instance::MLFlow, endpoint_id::String,
model_config::Dict{String,Any}; created_by::Union{String,Missing}=missing)Attach a model to a gateway endpoint.
Arguments
instance:MLFlowconfiguration.endpoint_id: ID of the endpoint.model_config: Configuration for the model to attach. Should include:model_definition_id: ID of the model definitionlinkage_type: Type of linkage (e.g., "PRIMARY", "FALLBACK")weight: Routing weight (optional)fallback_order: Order for fallback (optional)
created_by: Username of the creator.
Returns
An instance of type GatewayEndpointModelMapping.
MLFlowClient.detachmodelfromgatewayendpoint — Function
detachmodelfromgatewayendpoint(instance::MLFlow, endpoint_id::String,
model_definition_id::String)Detach a model from a gateway endpoint.
Arguments
instance:MLFlowconfiguration.endpoint_id: ID of the endpoint.model_definition_id: ID of the model definition to detach.
Returns
true if successful. Otherwise, raises exception.
MLFlowClient.setgatewayendpointtag — Function
setgatewayendpointtag(instance::MLFlow, endpoint_id::String, key::String, value::String)Set a tag on an endpoint.
Arguments
instance:MLFlowconfiguration.endpoint_id: ID of the endpoint to set tag on.key: Tag key to set.value: Tag value to set.
Returns
true if successful. Otherwise, raises exception.
MLFlowClient.deletegatewayendpointtag — Function
deletegatewayendpointtag(instance::MLFlow, endpoint_id::String, key::String)Delete a tag from an endpoint.
Arguments
instance:MLFlowconfiguration.endpoint_id: ID of the endpoint to delete tag from.key: Tag key to delete.
Returns
true if successful. Otherwise, raises exception.
Endpoint Bindings
MLFlowClient.creategatewayendpointbinding — Function
creategatewayendpointbinding(instance::MLFlow, endpoint_id::String,
resource_type::String, resource_id::String; created_by::Union{String,Missing}=missing)Create a binding between an endpoint and an MLflow resource.
Arguments
instance:MLFlowconfiguration.endpoint_id: ID of the endpoint to bind.resource_type: Type of MLflow resource.resource_id: ID of the MLflow resource.created_by: Username of the creator.
Returns
An instance of type GatewayEndpointBinding.
MLFlowClient.deletegatewayendpointbinding — Function
deletegatewayendpointbinding(instance::MLFlow, endpoint_id::String,
resource_type::String, resource_id::String)Delete a binding between an endpoint and a resource.
Arguments
instance:MLFlowconfiguration.endpoint_id: ID of the endpoint.resource_type: Type of resource bound to the endpoint.resource_id: ID of the resource.
Returns
true if successful. Otherwise, raises exception.
MLFlowClient.listgatewayendpointbindings — Function
listgatewayendpointbindings(instance::MLFlow, endpoint_id::String;
resource_type::Union{String,Missing}=missing, resource_id::Union{String,Missing}=missing)List all bindings for an endpoint.
Arguments
instance:MLFlowconfiguration.endpoint_id: ID of the endpoint to list bindings for.resource_type: Type of resource to filter bindings by.resource_id: ID of the resource to filter bindings by.
Returns
Vector of GatewayEndpointBinding entities.
Budgets
MLFlowClient.creategatewaybudget — Function
creategatewaybudget(instance::MLFlow, budget_unit::String, budget_amount::Float64,
duration::Dict{String,Any}, target_scope::String, budget_action::String;
created_by::Union{String,Missing}=missing)Create a new budget policy.
Arguments
instance:MLFlowconfiguration.budget_unit: Budget measurement unit (e.g., "USD").budget_amount: Budget amount.duration: Budget duration configuration withunitandvaluefields.target_scope: Target scope for the budget policy (e.g., "GLOBAL", "WORKSPACE").budget_action: Action to take when budget is exceeded (e.g., "ALERT", "REJECT").created_by: Username of the creator.
Returns
An instance of type GatewayBudgetPolicy.
MLFlowClient.getgatewaybudget — Function
getgatewaybudget(instance::MLFlow, budget_policy_id::String)Get a budget policy by ID.
Arguments
instance:MLFlowconfiguration.budget_policy_id: ID of the budget policy to retrieve.
Returns
An instance of type GatewayBudgetPolicy.
MLFlowClient.updategatewaybudget — Function
updategatewaybudget(instance::MLFlow, budget_policy_id::String;
budget_amount::Union{Float64,Missing}=missing, duration::Union{Dict{String,Any},Missing}=missing,
target_scope::Union{String,Missing}=missing, budget_action::Union{String,Missing}=missing,
updated_by::Union{String,Missing}=missing)Update a budget policy.
Arguments
instance:MLFlowconfiguration.budget_policy_id: ID of the budget policy to update.budget_amount: Optional new budget amount.duration: Optional new duration configuration.target_scope: Optional new target scope.budget_action: Optional new budget action.updated_by: Username of the updater.
Returns
An instance of type GatewayBudgetPolicy.
MLFlowClient.deletegatewaybudget — Function
deletegatewaybudget(instance::MLFlow, budget_policy_id::String)Delete a budget policy.
Arguments
instance:MLFlowconfiguration.budget_policy_id: ID of the budget policy to delete.
Returns
true if successful. Otherwise, raises exception.
MLFlowClient.listgatewaybudgets — Function
listgatewaybudgets(instance::MLFlow)List all budget policies.
Arguments
instance:MLFlowconfiguration.
Returns
Vector of GatewayBudgetPolicy entities.
MLFlowClient.listgatewaybudgetwindows — Function
listgatewaybudgetwindows(instance::MLFlow)List all available budget windows.
Arguments
instance:MLFlowconfiguration.
Returns
Vector of GatewayBudgetWindow entities.