Gateway operations

Secrets

MLFlowClient.creategatewaysecretFunction
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: MLFlow configuration.
  • 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.

source
MLFlowClient.getgatewaysecretinfoFunction
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: MLFlow configuration.
  • secret_id: Either secretid or secretname must be provided.
  • secret_name: Either secretid or secretname must be provided.

Returns

An instance of type GatewaySecretInfo.

source
MLFlowClient.updategatewaysecretFunction
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: MLFlow configuration.
  • 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.

source
MLFlowClient.deletegatewaysecretFunction
deletegatewaysecret(instance::MLFlow, secret_id::String)

Delete a secret.

Arguments

  • instance: MLFlow configuration.
  • secret_id: ID of the secret to delete.

Returns

true if successful. Otherwise, raises exception.

source
MLFlowClient.listgatewaysecretinfosFunction
listgatewaysecretinfos(instance::MLFlow; provider::Union{String,Missing}=missing)

List all secrets with optional filtering by provider.

Arguments

  • instance: MLFlow configuration.
  • provider: Optional filter by provider (e.g., "openai", "anthropic").

Returns

Vector of GatewaySecretInfo entities.

source

Model Definitions

MLFlowClient.creategatewaymodeldefinitionFunction
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: MLFlow configuration.
  • 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.

source
MLFlowClient.updategatewaymodeldefinitionFunction
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: MLFlow configuration.
  • 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.

source
MLFlowClient.deletegatewaymodeldefinitionFunction
deletegatewaymodeldefinition(instance::MLFlow, model_definition_id::String)

Delete a model definition.

Arguments

  • instance: MLFlow configuration.
  • model_definition_id: ID of the model definition to delete.

Returns

true if successful. Otherwise, raises exception.

source

Endpoints

MLFlowClient.creategatewayendpointFunction
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: MLFlow configuration.
  • name: Name of the endpoint.
  • model_configs: Array of model configurations. Each config should have:
    • model_definition_id: ID of the model definition
    • linkage_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.

source
MLFlowClient.updategatewayendpointFunction
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: MLFlow configuration.
  • 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.

source
MLFlowClient.deletegatewayendpointFunction
deletegatewayendpoint(instance::MLFlow, endpoint_id::String)

Delete a gateway endpoint.

Arguments

  • instance: MLFlow configuration.
  • endpoint_id: ID of the endpoint to delete.

Returns

true if successful. Otherwise, raises exception.

source
MLFlowClient.listgatewayendpointsFunction
listgatewayendpoints(instance::MLFlow; endpoint_type::Union{String,Missing}=missing)

List all gateway endpoints with optional filters.

Arguments

  • instance: MLFlow configuration.
  • endpoint_type: Optional filter by endpoint type.

Returns

Vector of GatewayEndpoint entities.

source
MLFlowClient.attachmodeltogatewayendpointFunction
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: MLFlow configuration.
  • endpoint_id: ID of the endpoint.
  • model_config: Configuration for the model to attach. Should include:
    • model_definition_id: ID of the model definition
    • linkage_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.

source
MLFlowClient.detachmodelfromgatewayendpointFunction
detachmodelfromgatewayendpoint(instance::MLFlow, endpoint_id::String,
    model_definition_id::String)

Detach a model from a gateway endpoint.

Arguments

  • instance: MLFlow configuration.
  • endpoint_id: ID of the endpoint.
  • model_definition_id: ID of the model definition to detach.

Returns

true if successful. Otherwise, raises exception.

source
MLFlowClient.setgatewayendpointtagFunction
setgatewayendpointtag(instance::MLFlow, endpoint_id::String, key::String, value::String)

Set a tag on an endpoint.

Arguments

  • instance: MLFlow configuration.
  • 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.

source
MLFlowClient.deletegatewayendpointtagFunction
deletegatewayendpointtag(instance::MLFlow, endpoint_id::String, key::String)

Delete a tag from an endpoint.

Arguments

  • instance: MLFlow configuration.
  • endpoint_id: ID of the endpoint to delete tag from.
  • key: Tag key to delete.

Returns

true if successful. Otherwise, raises exception.

source

Endpoint Bindings

MLFlowClient.creategatewayendpointbindingFunction
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: MLFlow configuration.
  • 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.

source
MLFlowClient.deletegatewayendpointbindingFunction
deletegatewayendpointbinding(instance::MLFlow, endpoint_id::String,
    resource_type::String, resource_id::String)

Delete a binding between an endpoint and a resource.

Arguments

  • instance: MLFlow configuration.
  • 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.

source
MLFlowClient.listgatewayendpointbindingsFunction
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: MLFlow configuration.
  • 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.

source

Budgets

MLFlowClient.creategatewaybudgetFunction
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: MLFlow configuration.
  • budget_unit: Budget measurement unit (e.g., "USD").
  • budget_amount: Budget amount.
  • duration: Budget duration configuration with unit and value fields.
  • 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.

source
MLFlowClient.updategatewaybudgetFunction
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: MLFlow configuration.
  • 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.

source
MLFlowClient.deletegatewaybudgetFunction
deletegatewaybudget(instance::MLFlow, budget_policy_id::String)

Delete a budget policy.

Arguments

  • instance: MLFlow configuration.
  • budget_policy_id: ID of the budget policy to delete.

Returns

true if successful. Otherwise, raises exception.

source