mirror of https://github.com/databricks/cli.git
This reverts commit 798189eb96
.
This commit is contained in:
parent
ddd45e25ee
commit
6153423c56
|
@ -1 +1 @@
|
|||
0be1b914249781b5e903b7676fd02255755bc851
|
||||
779817ed8d63031f5ea761fbd25ee84f38feec0d
|
|
@ -109,19 +109,16 @@ var {{.CamelName}}Overrides []func(
|
|||
{{- end }}
|
||||
)
|
||||
|
||||
{{- $excludeFromJson := list "http-request"}}
|
||||
|
||||
func new{{.PascalName}}() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
{{- $canUseJson := and .CanUseJson (not (in $excludeFromJson .KebabName )) -}}
|
||||
{{- if .Request}}
|
||||
|
||||
var {{.CamelName}}Req {{.Service.Package.Name}}.{{.Request.PascalName}}
|
||||
{{- if .RequestBodyField }}
|
||||
{{.CamelName}}Req.{{.RequestBodyField.PascalName}} = &{{.Service.Package.Name}}.{{.RequestBodyField.Entity.PascalName}}{}
|
||||
{{- end }}
|
||||
{{- if $canUseJson}}
|
||||
{{- if .CanUseJson}}
|
||||
var {{.CamelName}}Json flags.JsonFlag
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
|
@ -138,7 +135,7 @@ func new{{.PascalName}}() *cobra.Command {
|
|||
{{- $request = .RequestBodyField.Entity -}}
|
||||
{{- end -}}
|
||||
{{if $request }}// TODO: short flags
|
||||
{{- if $canUseJson}}
|
||||
{{- if .CanUseJson}}
|
||||
cmd.Flags().Var(&{{.CamelName}}Json, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
{{- end}}
|
||||
{{$method := .}}
|
||||
|
@ -180,7 +177,7 @@ func new{{.PascalName}}() *cobra.Command {
|
|||
{{- $hasRequiredArgs := and (not $hasIdPrompt) $hasPosArgs -}}
|
||||
{{- $hasSingleRequiredRequestBodyFieldWithPrompt := and (and $hasIdPrompt $request) (eq 1 (len $request.RequiredRequestBodyFields)) -}}
|
||||
{{- $onlyPathArgsRequiredAsPositionalArguments := and $request (eq (len .RequiredPositionalArguments) (len $request.RequiredPathFields)) -}}
|
||||
{{- $hasDifferentArgsWithJsonFlag := and (not $onlyPathArgsRequiredAsPositionalArguments) (and $canUseJson (or $request.HasRequiredRequestBodyFields )) -}}
|
||||
{{- $hasDifferentArgsWithJsonFlag := and (not $onlyPathArgsRequiredAsPositionalArguments) (and .CanUseJson (or $request.HasRequiredRequestBodyFields )) -}}
|
||||
{{- $hasCustomArgHandler := or $hasRequiredArgs $hasDifferentArgsWithJsonFlag -}}
|
||||
|
||||
{{- $atleastOneArgumentWithDescription := false -}}
|
||||
|
@ -242,7 +239,7 @@ func new{{.PascalName}}() *cobra.Command {
|
|||
ctx := cmd.Context()
|
||||
{{if .Service.IsAccounts}}a := root.AccountClient(ctx){{else}}w := root.WorkspaceClient(ctx){{end}}
|
||||
{{- if .Request }}
|
||||
{{ if $canUseJson }}
|
||||
{{ if .CanUseJson }}
|
||||
if cmd.Flags().Changed("json") {
|
||||
diags := {{.CamelName}}Json.Unmarshal(&{{.CamelName}}Req{{ if .RequestBodyField }}.{{.RequestBodyField.PascalName}}{{ end }})
|
||||
if diags.HasError() {
|
||||
|
@ -258,7 +255,7 @@ func new{{.PascalName}}() *cobra.Command {
|
|||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}{{- end}}
|
||||
{{- if $hasPosArgs }}
|
||||
{{- if and $canUseJson $hasSingleRequiredRequestBodyFieldWithPrompt }} else {
|
||||
{{- if and .CanUseJson $hasSingleRequiredRequestBodyFieldWithPrompt }} else {
|
||||
{{- end}}
|
||||
{{- if $hasIdPrompt}}
|
||||
if len(args) == 0 {
|
||||
|
@ -282,9 +279,9 @@ func new{{.PascalName}}() *cobra.Command {
|
|||
|
||||
{{$method := .}}
|
||||
{{- range $arg, $field := .RequiredPositionalArguments}}
|
||||
{{- template "args-scan" (dict "Arg" $arg "Field" $field "Method" $method "HasIdPrompt" $hasIdPrompt "ExcludeFromJson" $excludeFromJson)}}
|
||||
{{- template "args-scan" (dict "Arg" $arg "Field" $field "Method" $method "HasIdPrompt" $hasIdPrompt)}}
|
||||
{{- end -}}
|
||||
{{- if and $canUseJson $hasSingleRequiredRequestBodyFieldWithPrompt }}
|
||||
{{- if and .CanUseJson $hasSingleRequiredRequestBodyFieldWithPrompt }}
|
||||
}
|
||||
{{- end}}
|
||||
|
||||
|
@ -395,8 +392,7 @@ func new{{.PascalName}}() *cobra.Command {
|
|||
{{- $method := .Method -}}
|
||||
{{- $arg := .Arg -}}
|
||||
{{- $hasIdPrompt := .HasIdPrompt -}}
|
||||
{{ $canUseJson := and $method.CanUseJson (not (in .ExcludeFromJson $method.KebabName)) }}
|
||||
{{- $optionalIfJsonIsUsed := and (not $hasIdPrompt) (and $field.IsRequestBodyField $canUseJson) }}
|
||||
{{- $optionalIfJsonIsUsed := and (not $hasIdPrompt) (and $field.IsRequestBodyField $method.CanUseJson) }}
|
||||
{{- if $optionalIfJsonIsUsed }}
|
||||
if !cmd.Flags().Changed("json") {
|
||||
{{- end }}
|
||||
|
|
|
@ -31,7 +31,6 @@ cmd/account/users/users.go linguist-generated=true
|
|||
cmd/account/vpc-endpoints/vpc-endpoints.go linguist-generated=true
|
||||
cmd/account/workspace-assignment/workspace-assignment.go linguist-generated=true
|
||||
cmd/account/workspaces/workspaces.go linguist-generated=true
|
||||
cmd/workspace/access-control/access-control.go linguist-generated=true
|
||||
cmd/workspace/aibi-dashboard-embedding-access-policy/aibi-dashboard-embedding-access-policy.go linguist-generated=true
|
||||
cmd/workspace/aibi-dashboard-embedding-approved-domains/aibi-dashboard-embedding-approved-domains.go linguist-generated=true
|
||||
cmd/workspace/alerts-legacy/alerts-legacy.go linguist-generated=true
|
||||
|
|
|
@ -419,7 +419,7 @@ func TestBundleToTerraformModelServing(t *testing.T) {
|
|||
src := resources.ModelServingEndpoint{
|
||||
CreateServingEndpoint: &serving.CreateServingEndpoint{
|
||||
Name: "name",
|
||||
Config: &serving.EndpointCoreConfigInput{
|
||||
Config: serving.EndpointCoreConfigInput{
|
||||
ServedModels: []serving.ServedModelInput{
|
||||
{
|
||||
ModelName: "model_name",
|
||||
|
@ -474,7 +474,7 @@ func TestBundleToTerraformModelServingPermissions(t *testing.T) {
|
|||
// and as such observed the `omitempty` tag.
|
||||
// The new method leverages [dyn.Value] where any field that is not
|
||||
// explicitly set is not part of the value.
|
||||
Config: &serving.EndpointCoreConfigInput{
|
||||
Config: serving.EndpointCoreConfigInput{
|
||||
ServedModels: []serving.ServedModelInput{
|
||||
{
|
||||
ModelName: "model_name",
|
||||
|
|
|
@ -17,7 +17,7 @@ func TestConvertModelServingEndpoint(t *testing.T) {
|
|||
src := resources.ModelServingEndpoint{
|
||||
CreateServingEndpoint: &serving.CreateServingEndpoint{
|
||||
Name: "name",
|
||||
Config: &serving.EndpointCoreConfigInput{
|
||||
Config: serving.EndpointCoreConfigInput{
|
||||
ServedModels: []serving.ServedModelInput{
|
||||
{
|
||||
ModelName: "model_name",
|
||||
|
|
|
@ -353,12 +353,12 @@ github.com/databricks/cli/bundle/config/resources.MlflowModel:
|
|||
github.com/databricks/cli/bundle/config/resources.ModelServingEndpoint:
|
||||
"ai_gateway":
|
||||
"description": |-
|
||||
The AI Gateway configuration for the serving endpoint. NOTE: Only external model and provisioned throughput endpoints are currently supported.
|
||||
The AI Gateway configuration for the serving endpoint. NOTE: only external model endpoints are supported as of now.
|
||||
"config":
|
||||
"description": |-
|
||||
The core config of the serving endpoint.
|
||||
"name":
|
||||
"description": |-
|
||||
"description": |
|
||||
The name of the serving endpoint. This field is required and must be unique across a Databricks workspace.
|
||||
An endpoint name can consist of alphanumeric characters, dashes, and underscores.
|
||||
"rate_limits":
|
||||
|
@ -1974,9 +1974,6 @@ github.com/databricks/databricks-sdk-go/service/jobs.SparkJarTask:
|
|||
Parameters passed to the main method.
|
||||
|
||||
Use [Task parameter variables](https://docs.databricks.com/jobs.html#parameter-variables) to set parameters containing information about job runs.
|
||||
"run_as_repl":
|
||||
"description": |-
|
||||
Deprecated. A value of `false` is no longer supported.
|
||||
github.com/databricks/databricks-sdk-go/service/jobs.SparkPythonTask:
|
||||
"parameters":
|
||||
"description": |-
|
||||
|
@ -2687,36 +2684,27 @@ github.com/databricks/databricks-sdk-go/service/pipelines.TableSpecificConfigScd
|
|||
github.com/databricks/databricks-sdk-go/service/serving.Ai21LabsConfig:
|
||||
"ai21labs_api_key":
|
||||
"description": |-
|
||||
The Databricks secret key reference for an AI21 Labs API key. If you
|
||||
prefer to paste your API key directly, see `ai21labs_api_key_plaintext`.
|
||||
You must provide an API key using one of the following fields:
|
||||
`ai21labs_api_key` or `ai21labs_api_key_plaintext`.
|
||||
The Databricks secret key reference for an AI21 Labs API key. If you prefer to paste your API key directly, see `ai21labs_api_key_plaintext`. You must provide an API key using one of the following fields: `ai21labs_api_key` or `ai21labs_api_key_plaintext`.
|
||||
"ai21labs_api_key_plaintext":
|
||||
"description": |-
|
||||
An AI21 Labs API key provided as a plaintext string. If you prefer to
|
||||
reference your key using Databricks Secrets, see `ai21labs_api_key`. You
|
||||
must provide an API key using one of the following fields:
|
||||
`ai21labs_api_key` or `ai21labs_api_key_plaintext`.
|
||||
An AI21 Labs API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `ai21labs_api_key`. You must provide an API key using one of the following fields: `ai21labs_api_key` or `ai21labs_api_key_plaintext`.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.AiGatewayConfig:
|
||||
"guardrails":
|
||||
"description": |-
|
||||
Configuration for AI Guardrails to prevent unwanted data and unsafe data in requests and responses.
|
||||
"inference_table_config":
|
||||
"description": |-
|
||||
Configuration for payload logging using inference tables.
|
||||
Use these tables to monitor and audit data being sent to and received from model APIs and to improve model quality.
|
||||
Configuration for payload logging using inference tables. Use these tables to monitor and audit data being sent to and received from model APIs and to improve model quality.
|
||||
"rate_limits":
|
||||
"description": |-
|
||||
Configuration for rate limits which can be set to limit endpoint traffic.
|
||||
"usage_tracking_config":
|
||||
"description": |-
|
||||
Configuration to enable usage tracking using system tables.
|
||||
These tables allow you to monitor operational usage on endpoints and their associated costs.
|
||||
Configuration to enable usage tracking using system tables. These tables allow you to monitor operational usage on endpoints and their associated costs.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrailParameters:
|
||||
"invalid_keywords":
|
||||
"description": |-
|
||||
List of invalid keywords.
|
||||
AI guardrail uses keyword or string matching to decide if the keyword exists in the request or response content.
|
||||
List of invalid keywords. AI guardrail uses keyword or string matching to decide if the keyword exists in the request or response content.
|
||||
"pii":
|
||||
"description": |-
|
||||
Configuration for guardrail PII filter.
|
||||
|
@ -2725,14 +2713,15 @@ github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrailParame
|
|||
Indicates whether the safety filter is enabled.
|
||||
"valid_topics":
|
||||
"description": |-
|
||||
The list of allowed topics.
|
||||
Given a chat request, this guardrail flags the request if its topic is not in the allowed topics.
|
||||
The list of allowed topics. Given a chat request, this guardrail flags the request if its topic is not in the allowed topics.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrailPiiBehavior:
|
||||
"behavior":
|
||||
"description": |-
|
||||
Configuration for input guardrail filters.
|
||||
Behavior for PII filter. Currently only 'BLOCK' is supported. If 'BLOCK' is set for the input guardrail and the request contains PII, the request is not sent to the model server and 400 status code is returned; if 'BLOCK' is set for the output guardrail and the model response contains PII, the PII info in the response is redacted and 400 status code is returned.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrailPiiBehaviorBehavior:
|
||||
"_":
|
||||
"description": |-
|
||||
Behavior for PII filter. Currently only 'BLOCK' is supported. If 'BLOCK' is set for the input guardrail and the request contains PII, the request is not sent to the model server and 400 status code is returned; if 'BLOCK' is set for the output guardrail and the model response contains PII, the PII info in the response is redacted and 400 status code is returned.
|
||||
"enum":
|
||||
- |-
|
||||
NONE
|
||||
|
@ -2748,32 +2737,30 @@ github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrails:
|
|||
github.com/databricks/databricks-sdk-go/service/serving.AiGatewayInferenceTableConfig:
|
||||
"catalog_name":
|
||||
"description": |-
|
||||
The name of the catalog in Unity Catalog. Required when enabling inference tables.
|
||||
NOTE: On update, you have to disable inference table first in order to change the catalog name.
|
||||
The name of the catalog in Unity Catalog. Required when enabling inference tables. NOTE: On update, you have to disable inference table first in order to change the catalog name.
|
||||
"enabled":
|
||||
"description": |-
|
||||
Indicates whether the inference table is enabled.
|
||||
"schema_name":
|
||||
"description": |-
|
||||
The name of the schema in Unity Catalog. Required when enabling inference tables.
|
||||
NOTE: On update, you have to disable inference table first in order to change the schema name.
|
||||
The name of the schema in Unity Catalog. Required when enabling inference tables. NOTE: On update, you have to disable inference table first in order to change the schema name.
|
||||
"table_name_prefix":
|
||||
"description": |-
|
||||
The prefix of the table in Unity Catalog.
|
||||
NOTE: On update, you have to disable inference table first in order to change the prefix name.
|
||||
The prefix of the table in Unity Catalog. NOTE: On update, you have to disable inference table first in order to change the prefix name.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimit:
|
||||
"calls":
|
||||
"description": |-
|
||||
Used to specify how many calls are allowed for a key within the renewal_period.
|
||||
"key":
|
||||
"description": |-
|
||||
Key field for a rate limit. Currently, only 'user' and 'endpoint' are supported,
|
||||
with 'endpoint' being the default if not specified.
|
||||
Key field for a rate limit. Currently, only 'user' and 'endpoint' are supported, with 'endpoint' being the default if not specified.
|
||||
"renewal_period":
|
||||
"description": |-
|
||||
Renewal period field for a rate limit. Currently, only 'minute' is supported.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimitKey:
|
||||
"_":
|
||||
"description": |-
|
||||
Key field for a rate limit. Currently, only 'user' and 'endpoint' are supported, with 'endpoint' being the default if not specified.
|
||||
"enum":
|
||||
- |-
|
||||
user
|
||||
|
@ -2781,6 +2768,8 @@ github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimitKey:
|
|||
endpoint
|
||||
github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimitRenewalPeriod:
|
||||
"_":
|
||||
"description": |-
|
||||
Renewal period field for a rate limit. Currently, only 'minute' is supported.
|
||||
"enum":
|
||||
- |-
|
||||
minute
|
||||
|
@ -2791,43 +2780,26 @@ github.com/databricks/databricks-sdk-go/service/serving.AiGatewayUsageTrackingCo
|
|||
github.com/databricks/databricks-sdk-go/service/serving.AmazonBedrockConfig:
|
||||
"aws_access_key_id":
|
||||
"description": |-
|
||||
The Databricks secret key reference for an AWS access key ID with
|
||||
permissions to interact with Bedrock services. If you prefer to paste
|
||||
your API key directly, see `aws_access_key_id_plaintext`. You must provide an API
|
||||
key using one of the following fields: `aws_access_key_id` or
|
||||
`aws_access_key_id_plaintext`.
|
||||
The Databricks secret key reference for an AWS access key ID with permissions to interact with Bedrock services. If you prefer to paste your API key directly, see `aws_access_key_id`. You must provide an API key using one of the following fields: `aws_access_key_id` or `aws_access_key_id_plaintext`.
|
||||
"aws_access_key_id_plaintext":
|
||||
"description": |-
|
||||
An AWS access key ID with permissions to interact with Bedrock services
|
||||
provided as a plaintext string. If you prefer to reference your key using
|
||||
Databricks Secrets, see `aws_access_key_id`. You must provide an API key
|
||||
using one of the following fields: `aws_access_key_id` or
|
||||
`aws_access_key_id_plaintext`.
|
||||
An AWS access key ID with permissions to interact with Bedrock services provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `aws_access_key_id`. You must provide an API key using one of the following fields: `aws_access_key_id` or `aws_access_key_id_plaintext`.
|
||||
"aws_region":
|
||||
"description": |-
|
||||
The AWS region to use. Bedrock has to be enabled there.
|
||||
"aws_secret_access_key":
|
||||
"description": |-
|
||||
The Databricks secret key reference for an AWS secret access key paired
|
||||
with the access key ID, with permissions to interact with Bedrock
|
||||
services. If you prefer to paste your API key directly, see
|
||||
`aws_secret_access_key_plaintext`. You must provide an API key using one
|
||||
of the following fields: `aws_secret_access_key` or
|
||||
`aws_secret_access_key_plaintext`.
|
||||
The Databricks secret key reference for an AWS secret access key paired with the access key ID, with permissions to interact with Bedrock services. If you prefer to paste your API key directly, see `aws_secret_access_key_plaintext`. You must provide an API key using one of the following fields: `aws_secret_access_key` or `aws_secret_access_key_plaintext`.
|
||||
"aws_secret_access_key_plaintext":
|
||||
"description": |-
|
||||
An AWS secret access key paired with the access key ID, with permissions
|
||||
to interact with Bedrock services provided as a plaintext string. If you
|
||||
prefer to reference your key using Databricks Secrets, see
|
||||
`aws_secret_access_key`. You must provide an API key using one of the
|
||||
following fields: `aws_secret_access_key` or
|
||||
`aws_secret_access_key_plaintext`.
|
||||
An AWS secret access key paired with the access key ID, with permissions to interact with Bedrock services provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `aws_secret_access_key`. You must provide an API key using one of the following fields: `aws_secret_access_key` or `aws_secret_access_key_plaintext`.
|
||||
"bedrock_provider":
|
||||
"description": |-
|
||||
The underlying provider in Amazon Bedrock. Supported values (case
|
||||
insensitive) include: Anthropic, Cohere, AI21Labs, Amazon.
|
||||
The underlying provider in Amazon Bedrock. Supported values (case insensitive) include: Anthropic, Cohere, AI21Labs, Amazon.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.AmazonBedrockConfigBedrockProvider:
|
||||
"_":
|
||||
"description": |-
|
||||
The underlying provider in Amazon Bedrock. Supported values (case insensitive) include: Anthropic, Cohere, AI21Labs, Amazon.
|
||||
"enum":
|
||||
- |-
|
||||
anthropic
|
||||
|
@ -2840,16 +2812,10 @@ github.com/databricks/databricks-sdk-go/service/serving.AmazonBedrockConfigBedro
|
|||
github.com/databricks/databricks-sdk-go/service/serving.AnthropicConfig:
|
||||
"anthropic_api_key":
|
||||
"description": |-
|
||||
The Databricks secret key reference for an Anthropic API key. If you
|
||||
prefer to paste your API key directly, see `anthropic_api_key_plaintext`.
|
||||
You must provide an API key using one of the following fields:
|
||||
`anthropic_api_key` or `anthropic_api_key_plaintext`.
|
||||
The Databricks secret key reference for an Anthropic API key. If you prefer to paste your API key directly, see `anthropic_api_key_plaintext`. You must provide an API key using one of the following fields: `anthropic_api_key` or `anthropic_api_key_plaintext`.
|
||||
"anthropic_api_key_plaintext":
|
||||
"description": |-
|
||||
The Anthropic API key provided as a plaintext string. If you prefer to
|
||||
reference your key using Databricks Secrets, see `anthropic_api_key`. You
|
||||
must provide an API key using one of the following fields:
|
||||
`anthropic_api_key` or `anthropic_api_key_plaintext`.
|
||||
The Anthropic API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `anthropic_api_key`. You must provide an API key using one of the following fields: `anthropic_api_key` or `anthropic_api_key_plaintext`.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.AutoCaptureConfigInput:
|
||||
"catalog_name":
|
||||
"description": |-
|
||||
|
@ -2865,58 +2831,42 @@ github.com/databricks/databricks-sdk-go/service/serving.AutoCaptureConfigInput:
|
|||
The prefix of the table in Unity Catalog. NOTE: On update, you cannot change the prefix name if the inference table is already enabled.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.CohereConfig:
|
||||
"cohere_api_base":
|
||||
"description": |-
|
||||
This is an optional field to provide a customized base URL for the Cohere
|
||||
API. If left unspecified, the standard Cohere base URL is used.
|
||||
"description": "This is an optional field to provide a customized base URL for the Cohere API. \nIf left unspecified, the standard Cohere base URL is used.\n"
|
||||
"cohere_api_key":
|
||||
"description": |-
|
||||
The Databricks secret key reference for a Cohere API key. If you prefer
|
||||
to paste your API key directly, see `cohere_api_key_plaintext`. You must
|
||||
provide an API key using one of the following fields: `cohere_api_key` or
|
||||
`cohere_api_key_plaintext`.
|
||||
The Databricks secret key reference for a Cohere API key. If you prefer to paste your API key directly, see `cohere_api_key_plaintext`. You must provide an API key using one of the following fields: `cohere_api_key` or `cohere_api_key_plaintext`.
|
||||
"cohere_api_key_plaintext":
|
||||
"description": |-
|
||||
The Cohere API key provided as a plaintext string. If you prefer to
|
||||
reference your key using Databricks Secrets, see `cohere_api_key`. You
|
||||
must provide an API key using one of the following fields:
|
||||
`cohere_api_key` or `cohere_api_key_plaintext`.
|
||||
The Cohere API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `cohere_api_key`. You must provide an API key using one of the following fields: `cohere_api_key` or `cohere_api_key_plaintext`.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.DatabricksModelServingConfig:
|
||||
"databricks_api_token":
|
||||
"description": |-
|
||||
The Databricks secret key reference for a Databricks API token that
|
||||
corresponds to a user or service principal with Can Query access to the
|
||||
model serving endpoint pointed to by this external model. If you prefer
|
||||
to paste your API key directly, see `databricks_api_token_plaintext`. You
|
||||
must provide an API key using one of the following fields:
|
||||
`databricks_api_token` or `databricks_api_token_plaintext`.
|
||||
"description": |
|
||||
The Databricks secret key reference for a Databricks API token that corresponds to a user or service
|
||||
principal with Can Query access to the model serving endpoint pointed to by this external model.
|
||||
If you prefer to paste your API key directly, see `databricks_api_token_plaintext`.
|
||||
You must provide an API key using one of the following fields: `databricks_api_token` or `databricks_api_token_plaintext`.
|
||||
"databricks_api_token_plaintext":
|
||||
"description": |-
|
||||
The Databricks API token that corresponds to a user or service principal
|
||||
with Can Query access to the model serving endpoint pointed to by this
|
||||
external model provided as a plaintext string. If you prefer to reference
|
||||
your key using Databricks Secrets, see `databricks_api_token`. You must
|
||||
provide an API key using one of the following fields:
|
||||
`databricks_api_token` or `databricks_api_token_plaintext`.
|
||||
"description": |
|
||||
The Databricks API token that corresponds to a user or service
|
||||
principal with Can Query access to the model serving endpoint pointed to by this external model provided as a plaintext string.
|
||||
If you prefer to reference your key using Databricks Secrets, see `databricks_api_token`.
|
||||
You must provide an API key using one of the following fields: `databricks_api_token` or `databricks_api_token_plaintext`.
|
||||
"databricks_workspace_url":
|
||||
"description": |-
|
||||
The URL of the Databricks workspace containing the model serving endpoint
|
||||
pointed to by this external model.
|
||||
"description": |
|
||||
The URL of the Databricks workspace containing the model serving endpoint pointed to by this external model.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.EndpointCoreConfigInput:
|
||||
"auto_capture_config":
|
||||
"description": |-
|
||||
Configuration for Inference Tables which automatically logs requests and responses to Unity Catalog.
|
||||
Note: this field is deprecated for creating new provisioned throughput endpoints,
|
||||
or updating existing provisioned throughput endpoints that never have inference table configured;
|
||||
in these cases please use AI Gateway to manage inference tables.
|
||||
"served_entities":
|
||||
"description": |-
|
||||
The list of served entities under the serving endpoint config.
|
||||
A list of served entities for the endpoint to serve. A serving endpoint can have up to 15 served entities.
|
||||
"served_models":
|
||||
"description": |-
|
||||
(Deprecated, use served_entities instead) The list of served models under the serving endpoint config.
|
||||
(Deprecated, use served_entities instead) A list of served models for the endpoint to serve. A serving endpoint can have up to 15 served models.
|
||||
"traffic_config":
|
||||
"description": |-
|
||||
The traffic configuration associated with the serving endpoint config.
|
||||
The traffic config defining how invocations to the serving endpoint should be routed.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.EndpointTag:
|
||||
"key":
|
||||
"description": |-
|
||||
|
@ -2953,13 +2903,17 @@ github.com/databricks/databricks-sdk-go/service/serving.ExternalModel:
|
|||
"description": |-
|
||||
PaLM Config. Only required if the provider is 'palm'.
|
||||
"provider":
|
||||
"description": |-
|
||||
The name of the provider for the external model. Currently, the supported providers are 'ai21labs', 'anthropic', 'amazon-bedrock', 'cohere', 'databricks-model-serving', 'google-cloud-vertex-ai', 'openai', and 'palm'.
|
||||
"description": |
|
||||
The name of the provider for the external model. Currently, the supported providers are 'ai21labs', 'anthropic',
|
||||
'amazon-bedrock', 'cohere', 'databricks-model-serving', 'google-cloud-vertex-ai', 'openai', and 'palm'.",
|
||||
"task":
|
||||
"description": |-
|
||||
The task type of the external model.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.ExternalModelProvider:
|
||||
"_":
|
||||
"description": |
|
||||
The name of the provider for the external model. Currently, the supported providers are 'ai21labs', 'anthropic',
|
||||
'amazon-bedrock', 'cohere', 'databricks-model-serving', 'google-cloud-vertex-ai', 'openai', and 'palm'.",
|
||||
"enum":
|
||||
- |-
|
||||
ai21labs
|
||||
|
@ -2980,114 +2934,70 @@ github.com/databricks/databricks-sdk-go/service/serving.ExternalModelProvider:
|
|||
github.com/databricks/databricks-sdk-go/service/serving.GoogleCloudVertexAiConfig:
|
||||
"private_key":
|
||||
"description": |-
|
||||
The Databricks secret key reference for a private key for the service
|
||||
account which has access to the Google Cloud Vertex AI Service. See [Best
|
||||
practices for managing service account keys]. If you prefer to paste your
|
||||
API key directly, see `private_key_plaintext`. You must provide an API
|
||||
key using one of the following fields: `private_key` or
|
||||
`private_key_plaintext`
|
||||
|
||||
[Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys
|
||||
The Databricks secret key reference for a private key for the service account which has access to the Google Cloud Vertex AI Service. See [Best practices for managing service account keys](https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys). If you prefer to paste your API key directly, see `private_key_plaintext`. You must provide an API key using one of the following fields: `private_key` or `private_key_plaintext`
|
||||
"private_key_plaintext":
|
||||
"description": |-
|
||||
The private key for the service account which has access to the Google
|
||||
Cloud Vertex AI Service provided as a plaintext secret. See [Best
|
||||
practices for managing service account keys]. If you prefer to reference
|
||||
your key using Databricks Secrets, see `private_key`. You must provide an
|
||||
API key using one of the following fields: `private_key` or
|
||||
`private_key_plaintext`.
|
||||
|
||||
[Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys
|
||||
The private key for the service account which has access to the Google Cloud Vertex AI Service provided as a plaintext secret. See [Best practices for managing service account keys](https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys). If you prefer to reference your key using Databricks Secrets, see `private_key`. You must provide an API key using one of the following fields: `private_key` or `private_key_plaintext`.
|
||||
"project_id":
|
||||
"description": |-
|
||||
This is the Google Cloud project id that the service account is
|
||||
associated with.
|
||||
This is the Google Cloud project id that the service account is associated with.
|
||||
"region":
|
||||
"description": |-
|
||||
This is the region for the Google Cloud Vertex AI Service. See [supported
|
||||
regions] for more details. Some models are only available in specific
|
||||
regions.
|
||||
|
||||
[supported regions]: https://cloud.google.com/vertex-ai/docs/general/locations
|
||||
This is the region for the Google Cloud Vertex AI Service. See [supported regions](https://cloud.google.com/vertex-ai/docs/general/locations) for more details. Some models are only available in specific regions.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.OpenAiConfig:
|
||||
"_":
|
||||
"description": |-
|
||||
Configs needed to create an OpenAI model route.
|
||||
"microsoft_entra_client_id":
|
||||
"description": |-
|
||||
This field is only required for Azure AD OpenAI and is the Microsoft
|
||||
Entra Client ID.
|
||||
"description": |
|
||||
This field is only required for Azure AD OpenAI and is the Microsoft Entra Client ID.
|
||||
"microsoft_entra_client_secret":
|
||||
"description": |-
|
||||
The Databricks secret key reference for a client secret used for
|
||||
Microsoft Entra ID authentication. If you prefer to paste your client
|
||||
secret directly, see `microsoft_entra_client_secret_plaintext`. You must
|
||||
provide an API key using one of the following fields:
|
||||
`microsoft_entra_client_secret` or
|
||||
`microsoft_entra_client_secret_plaintext`.
|
||||
"description": |
|
||||
The Databricks secret key reference for a client secret used for Microsoft Entra ID authentication.
|
||||
If you prefer to paste your client secret directly, see `microsoft_entra_client_secret_plaintext`.
|
||||
You must provide an API key using one of the following fields: `microsoft_entra_client_secret` or `microsoft_entra_client_secret_plaintext`.
|
||||
"microsoft_entra_client_secret_plaintext":
|
||||
"description": |-
|
||||
The client secret used for Microsoft Entra ID authentication provided as
|
||||
a plaintext string. If you prefer to reference your key using Databricks
|
||||
Secrets, see `microsoft_entra_client_secret`. You must provide an API key
|
||||
using one of the following fields: `microsoft_entra_client_secret` or
|
||||
`microsoft_entra_client_secret_plaintext`.
|
||||
"description": |
|
||||
The client secret used for Microsoft Entra ID authentication provided as a plaintext string.
|
||||
If you prefer to reference your key using Databricks Secrets, see `microsoft_entra_client_secret`.
|
||||
You must provide an API key using one of the following fields: `microsoft_entra_client_secret` or `microsoft_entra_client_secret_plaintext`.
|
||||
"microsoft_entra_tenant_id":
|
||||
"description": |-
|
||||
This field is only required for Azure AD OpenAI and is the Microsoft
|
||||
Entra Tenant ID.
|
||||
"description": |
|
||||
This field is only required for Azure AD OpenAI and is the Microsoft Entra Tenant ID.
|
||||
"openai_api_base":
|
||||
"description": |-
|
||||
This is a field to provide a customized base URl for the OpenAI API. For
|
||||
Azure OpenAI, this field is required, and is the base URL for the Azure
|
||||
OpenAI API service provided by Azure. For other OpenAI API types, this
|
||||
field is optional, and if left unspecified, the standard OpenAI base URL
|
||||
is used.
|
||||
"description": |
|
||||
This is a field to provide a customized base URl for the OpenAI API.
|
||||
For Azure OpenAI, this field is required, and is the base URL for the Azure OpenAI API service
|
||||
provided by Azure.
|
||||
For other OpenAI API types, this field is optional, and if left unspecified, the standard OpenAI base URL is used.
|
||||
"openai_api_key":
|
||||
"description": |-
|
||||
The Databricks secret key reference for an OpenAI API key using the
|
||||
OpenAI or Azure service. If you prefer to paste your API key directly,
|
||||
see `openai_api_key_plaintext`. You must provide an API key using one of
|
||||
the following fields: `openai_api_key` or `openai_api_key_plaintext`.
|
||||
The Databricks secret key reference for an OpenAI API key using the OpenAI or Azure service. If you prefer to paste your API key directly, see `openai_api_key_plaintext`. You must provide an API key using one of the following fields: `openai_api_key` or `openai_api_key_plaintext`.
|
||||
"openai_api_key_plaintext":
|
||||
"description": |-
|
||||
The OpenAI API key using the OpenAI or Azure service provided as a
|
||||
plaintext string. If you prefer to reference your key using Databricks
|
||||
Secrets, see `openai_api_key`. You must provide an API key using one of
|
||||
the following fields: `openai_api_key` or `openai_api_key_plaintext`.
|
||||
The OpenAI API key using the OpenAI or Azure service provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `openai_api_key`. You must provide an API key using one of the following fields: `openai_api_key` or `openai_api_key_plaintext`.
|
||||
"openai_api_type":
|
||||
"description": |-
|
||||
This is an optional field to specify the type of OpenAI API to use. For
|
||||
Azure OpenAI, this field is required, and adjust this parameter to
|
||||
represent the preferred security access validation protocol. For access
|
||||
token validation, use azure. For authentication using Azure Active
|
||||
"description": |
|
||||
This is an optional field to specify the type of OpenAI API to use.
|
||||
For Azure OpenAI, this field is required, and adjust this parameter to represent the preferred security
|
||||
access validation protocol. For access token validation, use azure. For authentication using Azure Active
|
||||
Directory (Azure AD) use, azuread.
|
||||
"openai_api_version":
|
||||
"description": |-
|
||||
This is an optional field to specify the OpenAI API version. For Azure
|
||||
OpenAI, this field is required, and is the version of the Azure OpenAI
|
||||
service to utilize, specified by a date.
|
||||
"description": |
|
||||
This is an optional field to specify the OpenAI API version.
|
||||
For Azure OpenAI, this field is required, and is the version of the Azure OpenAI service to
|
||||
utilize, specified by a date.
|
||||
"openai_deployment_name":
|
||||
"description": |-
|
||||
This field is only required for Azure OpenAI and is the name of the
|
||||
deployment resource for the Azure OpenAI service.
|
||||
"description": |
|
||||
This field is only required for Azure OpenAI and is the name of the deployment resource for the
|
||||
Azure OpenAI service.
|
||||
"openai_organization":
|
||||
"description": |-
|
||||
This is an optional field to specify the organization in OpenAI or Azure
|
||||
OpenAI.
|
||||
"description": |
|
||||
This is an optional field to specify the organization in OpenAI or Azure OpenAI.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.PaLmConfig:
|
||||
"palm_api_key":
|
||||
"description": |-
|
||||
The Databricks secret key reference for a PaLM API key. If you prefer to
|
||||
paste your API key directly, see `palm_api_key_plaintext`. You must
|
||||
provide an API key using one of the following fields: `palm_api_key` or
|
||||
`palm_api_key_plaintext`.
|
||||
The Databricks secret key reference for a PaLM API key. If you prefer to paste your API key directly, see `palm_api_key_plaintext`. You must provide an API key using one of the following fields: `palm_api_key` or `palm_api_key_plaintext`.
|
||||
"palm_api_key_plaintext":
|
||||
"description": |-
|
||||
The PaLM API key provided as a plaintext string. If you prefer to
|
||||
reference your key using Databricks Secrets, see `palm_api_key`. You must
|
||||
provide an API key using one of the following fields: `palm_api_key` or
|
||||
`palm_api_key_plaintext`.
|
||||
The PaLM API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `palm_api_key`. You must provide an API key using one of the following fields: `palm_api_key` or `palm_api_key_plaintext`.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.RateLimit:
|
||||
"calls":
|
||||
"description": |-
|
||||
|
@ -3100,6 +3010,8 @@ github.com/databricks/databricks-sdk-go/service/serving.RateLimit:
|
|||
Renewal period field for a serving endpoint rate limit. Currently, only 'minute' is supported.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.RateLimitKey:
|
||||
"_":
|
||||
"description": |-
|
||||
Key field for a serving endpoint rate limit. Currently, only 'user' and 'endpoint' are supported, with 'endpoint' being the default if not specified.
|
||||
"enum":
|
||||
- |-
|
||||
user
|
||||
|
@ -3107,6 +3019,8 @@ github.com/databricks/databricks-sdk-go/service/serving.RateLimitKey:
|
|||
endpoint
|
||||
github.com/databricks/databricks-sdk-go/service/serving.RateLimitRenewalPeriod:
|
||||
"_":
|
||||
"description": |-
|
||||
Renewal period field for a serving endpoint rate limit. Currently, only 'minute' is supported.
|
||||
"enum":
|
||||
- |-
|
||||
minute
|
||||
|
@ -3119,15 +3033,21 @@ github.com/databricks/databricks-sdk-go/service/serving.Route:
|
|||
The percentage of endpoint traffic to send to this route. It must be an integer between 0 and 100 inclusive.
|
||||
github.com/databricks/databricks-sdk-go/service/serving.ServedEntityInput:
|
||||
"entity_name":
|
||||
"description": |
|
||||
The name of the entity to be served. The entity may be a model in the Databricks Model Registry, a model in the Unity Catalog (UC),
|
||||
or a function of type FEATURE_SPEC in the UC. If it is a UC object, the full name of the object should be given in the form of
|
||||
__catalog_name__.__schema_name__.__model_name__.
|
||||
"entity_version":
|
||||
"description": |-
|
||||
The name of the entity to be served. The entity may be a model in the Databricks Model Registry, a model in the Unity Catalog (UC), or a function of type FEATURE_SPEC in the UC. If it is a UC object, the full name of the object should be given in the form of **catalog_name.schema_name.model_name**.
|
||||
"entity_version": {}
|
||||
The version of the model in Databricks Model Registry to be served or empty if the entity is a FEATURE_SPEC.
|
||||
"environment_vars":
|
||||
"description": |-
|
||||
An object containing a set of optional, user-specified environment variable key-value pairs used for serving this entity. Note: this is an experimental feature and subject to change. Example entity environment variables that refer to Databricks secrets: `{"OPENAI_API_KEY": "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": "{{secrets/my_scope2/my_key2}}"}`
|
||||
"description": "An object containing a set of optional, user-specified environment variable key-value pairs used for serving this entity.\nNote: this is an experimental feature and subject to change. \nExample entity environment variables that refer to Databricks secrets: `{\"OPENAI_API_KEY\": \"{{secrets/my_scope/my_key}}\", \"DATABRICKS_TOKEN\": \"{{secrets/my_scope2/my_key2}}\"}`"
|
||||
"external_model":
|
||||
"description": |-
|
||||
The external model to be served. NOTE: Only one of external_model and (entity_name, entity_version, workload_size, workload_type, and scale_to_zero_enabled) can be specified with the latter set being used for custom model serving for a Databricks registered model. For an existing endpoint with external_model, it cannot be updated to an endpoint without external_model. If the endpoint is created without external_model, users cannot update it to add external_model later. The task type of all external models within an endpoint must be the same.
|
||||
"description": |
|
||||
The external model to be served. NOTE: Only one of external_model and (entity_name, entity_version, workload_size, workload_type, and scale_to_zero_enabled)
|
||||
can be specified with the latter set being used for custom model serving for a Databricks registered model. For an existing endpoint with external_model,
|
||||
it cannot be updated to an endpoint without external_model. If the endpoint is created without external_model, users cannot update it to add external_model later.
|
||||
The task type of all external models within an endpoint must be the same.
|
||||
"instance_profile_arn":
|
||||
"description": |-
|
||||
ARN of the instance profile that the served entity uses to access AWS resources.
|
||||
|
@ -3138,46 +3058,68 @@ github.com/databricks/databricks-sdk-go/service/serving.ServedEntityInput:
|
|||
"description": |-
|
||||
The minimum tokens per second that the endpoint can scale down to.
|
||||
"name":
|
||||
"description": |-
|
||||
The name of a served entity. It must be unique across an endpoint. A served entity name can consist of alphanumeric characters, dashes, and underscores. If not specified for an external model, this field defaults to external_model.name, with '.' and ':' replaced with '-', and if not specified for other entities, it defaults to entity_name-entity_version.
|
||||
"description": |
|
||||
The name of a served entity. It must be unique across an endpoint. A served entity name can consist of alphanumeric characters, dashes, and underscores.
|
||||
If not specified for an external model, this field defaults to external_model.name, with '.' and ':' replaced with '-', and if not specified for other
|
||||
entities, it defaults to <entity-name>-<entity-version>.
|
||||
"scale_to_zero_enabled":
|
||||
"description": |-
|
||||
Whether the compute resources for the served entity should scale down to zero.
|
||||
"workload_size":
|
||||
"description": |-
|
||||
The workload size of the served entity. The workload size corresponds to a range of provisioned concurrency that the compute autoscales between. A single unit of provisioned concurrency can process one request at a time. Valid workload sizes are "Small" (4 - 4 provisioned concurrency), "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 provisioned concurrency). If scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size is 0.
|
||||
"description": |
|
||||
The workload size of the served entity. The workload size corresponds to a range of provisioned concurrency that the compute autoscales between.
|
||||
A single unit of provisioned concurrency can process one request at a time.
|
||||
Valid workload sizes are "Small" (4 - 4 provisioned concurrency), "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 provisioned concurrency).
|
||||
If scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size is 0.
|
||||
"workload_type":
|
||||
"description": |-
|
||||
The workload type of the served entity. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is "CPU". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others. See the available [GPU types](https://docs.databricks.com/en/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types).
|
||||
"description": |
|
||||
The workload type of the served entity. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is
|
||||
"CPU". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others.
|
||||
See the available [GPU types](https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types).
|
||||
github.com/databricks/databricks-sdk-go/service/serving.ServedModelInput:
|
||||
"environment_vars":
|
||||
"description": |-
|
||||
An object containing a set of optional, user-specified environment variable key-value pairs used for serving this entity. Note: this is an experimental feature and subject to change. Example entity environment variables that refer to Databricks secrets: `{"OPENAI_API_KEY": "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": "{{secrets/my_scope2/my_key2}}"}`
|
||||
"description": "An object containing a set of optional, user-specified environment variable key-value pairs used for serving this model.\nNote: this is an experimental feature and subject to change. \nExample model environment variables that refer to Databricks secrets: `{\"OPENAI_API_KEY\": \"{{secrets/my_scope/my_key}}\", \"DATABRICKS_TOKEN\": \"{{secrets/my_scope2/my_key2}}\"}`"
|
||||
"instance_profile_arn":
|
||||
"description": |-
|
||||
ARN of the instance profile that the served entity uses to access AWS resources.
|
||||
ARN of the instance profile that the served model will use to access AWS resources.
|
||||
"max_provisioned_throughput":
|
||||
"description": |-
|
||||
The maximum tokens per second that the endpoint can scale up to.
|
||||
"min_provisioned_throughput":
|
||||
"description": |-
|
||||
The minimum tokens per second that the endpoint can scale down to.
|
||||
"model_name": {}
|
||||
"model_version": {}
|
||||
"name":
|
||||
"model_name":
|
||||
"description": |
|
||||
The name of the model in Databricks Model Registry to be served or if the model resides in Unity Catalog, the full name of model,
|
||||
in the form of __catalog_name__.__schema_name__.__model_name__.
|
||||
"model_version":
|
||||
"description": |-
|
||||
The name of a served entity. It must be unique across an endpoint. A served entity name can consist of alphanumeric characters, dashes, and underscores. If not specified for an external model, this field defaults to external_model.name, with '.' and ':' replaced with '-', and if not specified for other entities, it defaults to entity_name-entity_version.
|
||||
The version of the model in Databricks Model Registry or Unity Catalog to be served.
|
||||
"name":
|
||||
"description": |
|
||||
The name of a served model. It must be unique across an endpoint. If not specified, this field will default to <model-name>-<model-version>.
|
||||
A served model name can consist of alphanumeric characters, dashes, and underscores.
|
||||
"scale_to_zero_enabled":
|
||||
"description": |-
|
||||
Whether the compute resources for the served entity should scale down to zero.
|
||||
Whether the compute resources for the served model should scale down to zero.
|
||||
"workload_size":
|
||||
"description": |-
|
||||
The workload size of the served entity. The workload size corresponds to a range of provisioned concurrency that the compute autoscales between. A single unit of provisioned concurrency can process one request at a time. Valid workload sizes are "Small" (4 - 4 provisioned concurrency), "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 provisioned concurrency). If scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size is 0.
|
||||
"description": |
|
||||
The workload size of the served model. The workload size corresponds to a range of provisioned concurrency that the compute will autoscale between.
|
||||
A single unit of provisioned concurrency can process one request at a time.
|
||||
Valid workload sizes are "Small" (4 - 4 provisioned concurrency), "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 provisioned concurrency).
|
||||
If scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size will be 0.
|
||||
"workload_type":
|
||||
"description": |-
|
||||
The workload type of the served entity. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is "CPU". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others. See the available [GPU types](https://docs.databricks.com/en/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types).
|
||||
"description": |
|
||||
The workload type of the served model. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is
|
||||
"CPU". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others.
|
||||
See the available [GPU types](https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types).
|
||||
github.com/databricks/databricks-sdk-go/service/serving.ServedModelInputWorkloadSize:
|
||||
"_":
|
||||
"description": |
|
||||
The workload size of the served model. The workload size corresponds to a range of provisioned concurrency that the compute will autoscale between.
|
||||
A single unit of provisioned concurrency can process one request at a time.
|
||||
Valid workload sizes are "Small" (4 - 4 provisioned concurrency), "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 provisioned concurrency).
|
||||
If scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size will be 0.
|
||||
"enum":
|
||||
- |-
|
||||
Small
|
||||
|
@ -3187,26 +3129,17 @@ github.com/databricks/databricks-sdk-go/service/serving.ServedModelInputWorkload
|
|||
Large
|
||||
github.com/databricks/databricks-sdk-go/service/serving.ServedModelInputWorkloadType:
|
||||
"_":
|
||||
"description": |
|
||||
The workload type of the served model. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is
|
||||
"CPU". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others.
|
||||
See the available [GPU types](https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types).
|
||||
"enum":
|
||||
- |-
|
||||
CPU
|
||||
- |-
|
||||
GPU_MEDIUM
|
||||
- |-
|
||||
GPU_SMALL
|
||||
- |-
|
||||
GPU_LARGE
|
||||
- |-
|
||||
MULTIGPU_MEDIUM
|
||||
github.com/databricks/databricks-sdk-go/service/serving.ServingModelWorkloadType:
|
||||
"_":
|
||||
"enum":
|
||||
- |-
|
||||
CPU
|
||||
- |-
|
||||
GPU_MEDIUM
|
||||
- |-
|
||||
GPU_SMALL
|
||||
- |-
|
||||
GPU_LARGE
|
||||
- |-
|
||||
|
|
|
@ -197,14 +197,3 @@ github.com/databricks/databricks-sdk-go/service/pipelines.PipelineTrigger:
|
|||
"manual":
|
||||
"description": |-
|
||||
PLACEHOLDER
|
||||
github.com/databricks/databricks-sdk-go/service/serving.ServedEntityInput:
|
||||
"entity_version":
|
||||
"description": |-
|
||||
PLACEHOLDER
|
||||
github.com/databricks/databricks-sdk-go/service/serving.ServedModelInput:
|
||||
"model_name":
|
||||
"description": |-
|
||||
PLACEHOLDER
|
||||
"model_version":
|
||||
"description": |-
|
||||
PLACEHOLDER
|
||||
|
|
|
@ -546,7 +546,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"ai_gateway": {
|
||||
"description": "The AI Gateway configuration for the serving endpoint. NOTE: Only external model and provisioned throughput endpoints are currently supported.",
|
||||
"description": "The AI Gateway configuration for the serving endpoint. NOTE: only external model endpoints are supported as of now.",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.AiGatewayConfig"
|
||||
},
|
||||
"config": {
|
||||
|
@ -554,7 +554,7 @@
|
|||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.EndpointCoreConfigInput"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the serving endpoint. This field is required and must be unique across a Databricks workspace.\nAn endpoint name can consist of alphanumeric characters, dashes, and underscores.",
|
||||
"description": "The name of the serving endpoint. This field is required and must be unique across a Databricks workspace.\nAn endpoint name can consist of alphanumeric characters, dashes, and underscores.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"permissions": {
|
||||
|
@ -575,6 +575,7 @@
|
|||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"config",
|
||||
"name"
|
||||
]
|
||||
},
|
||||
|
@ -4141,10 +4142,6 @@
|
|||
"parameters": {
|
||||
"description": "Parameters passed to the main method.\n\nUse [Task parameter variables](https://docs.databricks.com/jobs.html#parameter-variables) to set parameters containing information about job runs.",
|
||||
"$ref": "#/$defs/slice/string"
|
||||
},
|
||||
"run_as_repl": {
|
||||
"description": "Deprecated. A value of `false` is no longer supported.",
|
||||
"$ref": "#/$defs/bool"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
@ -5505,11 +5502,11 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"ai21labs_api_key": {
|
||||
"description": "The Databricks secret key reference for an AI21 Labs API key. If you\nprefer to paste your API key directly, see `ai21labs_api_key_plaintext`.\nYou must provide an API key using one of the following fields:\n`ai21labs_api_key` or `ai21labs_api_key_plaintext`.",
|
||||
"description": "The Databricks secret key reference for an AI21 Labs API key. If you prefer to paste your API key directly, see `ai21labs_api_key_plaintext`. You must provide an API key using one of the following fields: `ai21labs_api_key` or `ai21labs_api_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"ai21labs_api_key_plaintext": {
|
||||
"description": "An AI21 Labs API key provided as a plaintext string. If you prefer to\nreference your key using Databricks Secrets, see `ai21labs_api_key`. You\nmust provide an API key using one of the following fields:\n`ai21labs_api_key` or `ai21labs_api_key_plaintext`.",
|
||||
"description": "An AI21 Labs API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `ai21labs_api_key`. You must provide an API key using one of the following fields: `ai21labs_api_key` or `ai21labs_api_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
}
|
||||
},
|
||||
|
@ -5531,7 +5528,7 @@
|
|||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrails"
|
||||
},
|
||||
"inference_table_config": {
|
||||
"description": "Configuration for payload logging using inference tables.\nUse these tables to monitor and audit data being sent to and received from model APIs and to improve model quality.",
|
||||
"description": "Configuration for payload logging using inference tables. Use these tables to monitor and audit data being sent to and received from model APIs and to improve model quality.",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.AiGatewayInferenceTableConfig"
|
||||
},
|
||||
"rate_limits": {
|
||||
|
@ -5539,7 +5536,7 @@
|
|||
"$ref": "#/$defs/slice/github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimit"
|
||||
},
|
||||
"usage_tracking_config": {
|
||||
"description": "Configuration to enable usage tracking using system tables.\nThese tables allow you to monitor operational usage on endpoints and their associated costs.",
|
||||
"description": "Configuration to enable usage tracking using system tables. These tables allow you to monitor operational usage on endpoints and their associated costs.",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.AiGatewayUsageTrackingConfig"
|
||||
}
|
||||
},
|
||||
|
@ -5557,7 +5554,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"invalid_keywords": {
|
||||
"description": "List of invalid keywords.\nAI guardrail uses keyword or string matching to decide if the keyword exists in the request or response content.",
|
||||
"description": "List of invalid keywords. AI guardrail uses keyword or string matching to decide if the keyword exists in the request or response content.",
|
||||
"$ref": "#/$defs/slice/string"
|
||||
},
|
||||
"pii": {
|
||||
|
@ -5569,7 +5566,7 @@
|
|||
"$ref": "#/$defs/bool"
|
||||
},
|
||||
"valid_topics": {
|
||||
"description": "The list of allowed topics.\nGiven a chat request, this guardrail flags the request if its topic is not in the allowed topics.",
|
||||
"description": "The list of allowed topics. Given a chat request, this guardrail flags the request if its topic is not in the allowed topics.",
|
||||
"$ref": "#/$defs/slice/string"
|
||||
}
|
||||
},
|
||||
|
@ -5587,11 +5584,14 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"behavior": {
|
||||
"description": "Configuration for input guardrail filters.",
|
||||
"description": "Behavior for PII filter. Currently only 'BLOCK' is supported. If 'BLOCK' is set for the input guardrail and the request contains PII, the request is not sent to the model server and 400 status code is returned; if 'BLOCK' is set for the output guardrail and the model response contains PII, the PII info in the response is redacted and 400 status code is returned.",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrailPiiBehaviorBehavior"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"behavior"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -5603,6 +5603,7 @@
|
|||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Behavior for PII filter. Currently only 'BLOCK' is supported. If 'BLOCK' is set for the input guardrail and the request contains PII, the request is not sent to the model server and 400 status code is returned; if 'BLOCK' is set for the output guardrail and the model response contains PII, the PII info in the response is redacted and 400 status code is returned.",
|
||||
"enum": [
|
||||
"NONE",
|
||||
"BLOCK"
|
||||
|
@ -5642,7 +5643,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"catalog_name": {
|
||||
"description": "The name of the catalog in Unity Catalog. Required when enabling inference tables.\nNOTE: On update, you have to disable inference table first in order to change the catalog name.",
|
||||
"description": "The name of the catalog in Unity Catalog. Required when enabling inference tables. NOTE: On update, you have to disable inference table first in order to change the catalog name.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"enabled": {
|
||||
|
@ -5650,11 +5651,11 @@
|
|||
"$ref": "#/$defs/bool"
|
||||
},
|
||||
"schema_name": {
|
||||
"description": "The name of the schema in Unity Catalog. Required when enabling inference tables.\nNOTE: On update, you have to disable inference table first in order to change the schema name.",
|
||||
"description": "The name of the schema in Unity Catalog. Required when enabling inference tables. NOTE: On update, you have to disable inference table first in order to change the schema name.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"table_name_prefix": {
|
||||
"description": "The prefix of the table in Unity Catalog.\nNOTE: On update, you have to disable inference table first in order to change the prefix name.",
|
||||
"description": "The prefix of the table in Unity Catalog. NOTE: On update, you have to disable inference table first in order to change the prefix name.",
|
||||
"$ref": "#/$defs/string"
|
||||
}
|
||||
},
|
||||
|
@ -5673,10 +5674,10 @@
|
|||
"properties": {
|
||||
"calls": {
|
||||
"description": "Used to specify how many calls are allowed for a key within the renewal_period.",
|
||||
"$ref": "#/$defs/int64"
|
||||
"$ref": "#/$defs/int"
|
||||
},
|
||||
"key": {
|
||||
"description": "Key field for a rate limit. Currently, only 'user' and 'endpoint' are supported,\nwith 'endpoint' being the default if not specified.",
|
||||
"description": "Key field for a rate limit. Currently, only 'user' and 'endpoint' are supported, with 'endpoint' being the default if not specified.",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimitKey"
|
||||
},
|
||||
"renewal_period": {
|
||||
|
@ -5700,6 +5701,7 @@
|
|||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Key field for a rate limit. Currently, only 'user' and 'endpoint' are supported, with 'endpoint' being the default if not specified.",
|
||||
"enum": [
|
||||
"user",
|
||||
"endpoint"
|
||||
|
@ -5715,6 +5717,7 @@
|
|||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Renewal period field for a rate limit. Currently, only 'minute' is supported.",
|
||||
"enum": [
|
||||
"minute"
|
||||
]
|
||||
|
@ -5749,11 +5752,11 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"aws_access_key_id": {
|
||||
"description": "The Databricks secret key reference for an AWS access key ID with\npermissions to interact with Bedrock services. If you prefer to paste\nyour API key directly, see `aws_access_key_id_plaintext`. You must provide an API\nkey using one of the following fields: `aws_access_key_id` or\n`aws_access_key_id_plaintext`.",
|
||||
"description": "The Databricks secret key reference for an AWS access key ID with permissions to interact with Bedrock services. If you prefer to paste your API key directly, see `aws_access_key_id`. You must provide an API key using one of the following fields: `aws_access_key_id` or `aws_access_key_id_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"aws_access_key_id_plaintext": {
|
||||
"description": "An AWS access key ID with permissions to interact with Bedrock services\nprovided as a plaintext string. If you prefer to reference your key using\nDatabricks Secrets, see `aws_access_key_id`. You must provide an API key\nusing one of the following fields: `aws_access_key_id` or\n`aws_access_key_id_plaintext`.",
|
||||
"description": "An AWS access key ID with permissions to interact with Bedrock services provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `aws_access_key_id`. You must provide an API key using one of the following fields: `aws_access_key_id` or `aws_access_key_id_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"aws_region": {
|
||||
|
@ -5761,15 +5764,15 @@
|
|||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"aws_secret_access_key": {
|
||||
"description": "The Databricks secret key reference for an AWS secret access key paired\nwith the access key ID, with permissions to interact with Bedrock\nservices. If you prefer to paste your API key directly, see\n`aws_secret_access_key_plaintext`. You must provide an API key using one\nof the following fields: `aws_secret_access_key` or\n`aws_secret_access_key_plaintext`.",
|
||||
"description": "The Databricks secret key reference for an AWS secret access key paired with the access key ID, with permissions to interact with Bedrock services. If you prefer to paste your API key directly, see `aws_secret_access_key_plaintext`. You must provide an API key using one of the following fields: `aws_secret_access_key` or `aws_secret_access_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"aws_secret_access_key_plaintext": {
|
||||
"description": "An AWS secret access key paired with the access key ID, with permissions\nto interact with Bedrock services provided as a plaintext string. If you\nprefer to reference your key using Databricks Secrets, see\n`aws_secret_access_key`. You must provide an API key using one of the\nfollowing fields: `aws_secret_access_key` or\n`aws_secret_access_key_plaintext`.",
|
||||
"description": "An AWS secret access key paired with the access key ID, with permissions to interact with Bedrock services provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `aws_secret_access_key`. You must provide an API key using one of the following fields: `aws_secret_access_key` or `aws_secret_access_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"bedrock_provider": {
|
||||
"description": "The underlying provider in Amazon Bedrock. Supported values (case\ninsensitive) include: Anthropic, Cohere, AI21Labs, Amazon.",
|
||||
"description": "The underlying provider in Amazon Bedrock. Supported values (case insensitive) include: Anthropic, Cohere, AI21Labs, Amazon.",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.AmazonBedrockConfigBedrockProvider"
|
||||
}
|
||||
},
|
||||
|
@ -5789,6 +5792,7 @@
|
|||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The underlying provider in Amazon Bedrock. Supported values (case insensitive) include: Anthropic, Cohere, AI21Labs, Amazon.",
|
||||
"enum": [
|
||||
"anthropic",
|
||||
"cohere",
|
||||
|
@ -5808,11 +5812,11 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"anthropic_api_key": {
|
||||
"description": "The Databricks secret key reference for an Anthropic API key. If you\nprefer to paste your API key directly, see `anthropic_api_key_plaintext`.\nYou must provide an API key using one of the following fields:\n`anthropic_api_key` or `anthropic_api_key_plaintext`.",
|
||||
"description": "The Databricks secret key reference for an Anthropic API key. If you prefer to paste your API key directly, see `anthropic_api_key_plaintext`. You must provide an API key using one of the following fields: `anthropic_api_key` or `anthropic_api_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"anthropic_api_key_plaintext": {
|
||||
"description": "The Anthropic API key provided as a plaintext string. If you prefer to\nreference your key using Databricks Secrets, see `anthropic_api_key`. You\nmust provide an API key using one of the following fields:\n`anthropic_api_key` or `anthropic_api_key_plaintext`.",
|
||||
"description": "The Anthropic API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `anthropic_api_key`. You must provide an API key using one of the following fields: `anthropic_api_key` or `anthropic_api_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
}
|
||||
},
|
||||
|
@ -5860,15 +5864,15 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"cohere_api_base": {
|
||||
"description": "This is an optional field to provide a customized base URL for the Cohere\nAPI. If left unspecified, the standard Cohere base URL is used.",
|
||||
"description": "This is an optional field to provide a customized base URL for the Cohere API. \nIf left unspecified, the standard Cohere base URL is used.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"cohere_api_key": {
|
||||
"description": "The Databricks secret key reference for a Cohere API key. If you prefer\nto paste your API key directly, see `cohere_api_key_plaintext`. You must\nprovide an API key using one of the following fields: `cohere_api_key` or\n`cohere_api_key_plaintext`.",
|
||||
"description": "The Databricks secret key reference for a Cohere API key. If you prefer to paste your API key directly, see `cohere_api_key_plaintext`. You must provide an API key using one of the following fields: `cohere_api_key` or `cohere_api_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"cohere_api_key_plaintext": {
|
||||
"description": "The Cohere API key provided as a plaintext string. If you prefer to\nreference your key using Databricks Secrets, see `cohere_api_key`. You\nmust provide an API key using one of the following fields:\n`cohere_api_key` or `cohere_api_key_plaintext`.",
|
||||
"description": "The Cohere API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `cohere_api_key`. You must provide an API key using one of the following fields: `cohere_api_key` or `cohere_api_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
}
|
||||
},
|
||||
|
@ -5886,15 +5890,15 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"databricks_api_token": {
|
||||
"description": "The Databricks secret key reference for a Databricks API token that\ncorresponds to a user or service principal with Can Query access to the\nmodel serving endpoint pointed to by this external model. If you prefer\nto paste your API key directly, see `databricks_api_token_plaintext`. You\nmust provide an API key using one of the following fields:\n`databricks_api_token` or `databricks_api_token_plaintext`.",
|
||||
"description": "The Databricks secret key reference for a Databricks API token that corresponds to a user or service\nprincipal with Can Query access to the model serving endpoint pointed to by this external model.\nIf you prefer to paste your API key directly, see `databricks_api_token_plaintext`.\nYou must provide an API key using one of the following fields: `databricks_api_token` or `databricks_api_token_plaintext`.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"databricks_api_token_plaintext": {
|
||||
"description": "The Databricks API token that corresponds to a user or service principal\nwith Can Query access to the model serving endpoint pointed to by this\nexternal model provided as a plaintext string. If you prefer to reference\nyour key using Databricks Secrets, see `databricks_api_token`. You must\nprovide an API key using one of the following fields:\n`databricks_api_token` or `databricks_api_token_plaintext`.",
|
||||
"description": "The Databricks API token that corresponds to a user or service\nprincipal with Can Query access to the model serving endpoint pointed to by this external model provided as a plaintext string.\nIf you prefer to reference your key using Databricks Secrets, see `databricks_api_token`.\nYou must provide an API key using one of the following fields: `databricks_api_token` or `databricks_api_token_plaintext`.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"databricks_workspace_url": {
|
||||
"description": "The URL of the Databricks workspace containing the model serving endpoint\npointed to by this external model.",
|
||||
"description": "The URL of the Databricks workspace containing the model serving endpoint pointed to by this external model.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
}
|
||||
},
|
||||
|
@ -5915,19 +5919,19 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"auto_capture_config": {
|
||||
"description": "Configuration for Inference Tables which automatically logs requests and responses to Unity Catalog.\nNote: this field is deprecated for creating new provisioned throughput endpoints,\nor updating existing provisioned throughput endpoints that never have inference table configured;\nin these cases please use AI Gateway to manage inference tables.",
|
||||
"description": "Configuration for Inference Tables which automatically logs requests and responses to Unity Catalog.",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.AutoCaptureConfigInput"
|
||||
},
|
||||
"served_entities": {
|
||||
"description": "The list of served entities under the serving endpoint config.",
|
||||
"description": "A list of served entities for the endpoint to serve. A serving endpoint can have up to 15 served entities.",
|
||||
"$ref": "#/$defs/slice/github.com/databricks/databricks-sdk-go/service/serving.ServedEntityInput"
|
||||
},
|
||||
"served_models": {
|
||||
"description": "(Deprecated, use served_entities instead) The list of served models under the serving endpoint config.",
|
||||
"description": "(Deprecated, use served_entities instead) A list of served models for the endpoint to serve. A serving endpoint can have up to 15 served models.",
|
||||
"$ref": "#/$defs/slice/github.com/databricks/databricks-sdk-go/service/serving.ServedModelInput"
|
||||
},
|
||||
"traffic_config": {
|
||||
"description": "The traffic configuration associated with the serving endpoint config.",
|
||||
"description": "The traffic config defining how invocations to the serving endpoint should be routed.",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.TrafficConfig"
|
||||
}
|
||||
},
|
||||
|
@ -6006,7 +6010,7 @@
|
|||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.PaLmConfig"
|
||||
},
|
||||
"provider": {
|
||||
"description": "The name of the provider for the external model. Currently, the supported providers are 'ai21labs', 'anthropic', 'amazon-bedrock', 'cohere', 'databricks-model-serving', 'google-cloud-vertex-ai', 'openai', and 'palm'.",
|
||||
"description": "The name of the provider for the external model. Currently, the supported providers are 'ai21labs', 'anthropic',\n'amazon-bedrock', 'cohere', 'databricks-model-serving', 'google-cloud-vertex-ai', 'openai', and 'palm'.\",\n",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.ExternalModelProvider"
|
||||
},
|
||||
"task": {
|
||||
|
@ -6031,6 +6035,7 @@
|
|||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The name of the provider for the external model. Currently, the supported providers are 'ai21labs', 'anthropic',\n'amazon-bedrock', 'cohere', 'databricks-model-serving', 'google-cloud-vertex-ai', 'openai', and 'palm'.\",\n",
|
||||
"enum": [
|
||||
"ai21labs",
|
||||
"anthropic",
|
||||
|
@ -6054,27 +6059,23 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"private_key": {
|
||||
"description": "The Databricks secret key reference for a private key for the service\naccount which has access to the Google Cloud Vertex AI Service. See [Best\npractices for managing service account keys]. If you prefer to paste your\nAPI key directly, see `private_key_plaintext`. You must provide an API\nkey using one of the following fields: `private_key` or\n`private_key_plaintext`\n\n[Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys",
|
||||
"description": "The Databricks secret key reference for a private key for the service account which has access to the Google Cloud Vertex AI Service. See [Best practices for managing service account keys](https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys). If you prefer to paste your API key directly, see `private_key_plaintext`. You must provide an API key using one of the following fields: `private_key` or `private_key_plaintext`",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"private_key_plaintext": {
|
||||
"description": "The private key for the service account which has access to the Google\nCloud Vertex AI Service provided as a plaintext secret. See [Best\npractices for managing service account keys]. If you prefer to reference\nyour key using Databricks Secrets, see `private_key`. You must provide an\nAPI key using one of the following fields: `private_key` or\n`private_key_plaintext`.\n\n[Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys",
|
||||
"description": "The private key for the service account which has access to the Google Cloud Vertex AI Service provided as a plaintext secret. See [Best practices for managing service account keys](https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys). If you prefer to reference your key using Databricks Secrets, see `private_key`. You must provide an API key using one of the following fields: `private_key` or `private_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"project_id": {
|
||||
"description": "This is the Google Cloud project id that the service account is\nassociated with.",
|
||||
"description": "This is the Google Cloud project id that the service account is associated with.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"region": {
|
||||
"description": "This is the region for the Google Cloud Vertex AI Service. See [supported\nregions] for more details. Some models are only available in specific\nregions.\n\n[supported regions]: https://cloud.google.com/vertex-ai/docs/general/locations",
|
||||
"description": "This is the region for the Google Cloud Vertex AI Service. See [supported regions](https://cloud.google.com/vertex-ai/docs/general/locations) for more details. Some models are only available in specific regions.",
|
||||
"$ref": "#/$defs/string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"project_id",
|
||||
"region"
|
||||
]
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -6086,50 +6087,49 @@
|
|||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"description": "Configs needed to create an OpenAI model route.",
|
||||
"properties": {
|
||||
"microsoft_entra_client_id": {
|
||||
"description": "This field is only required for Azure AD OpenAI and is the Microsoft\nEntra Client ID.",
|
||||
"description": "This field is only required for Azure AD OpenAI and is the Microsoft Entra Client ID.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"microsoft_entra_client_secret": {
|
||||
"description": "The Databricks secret key reference for a client secret used for\nMicrosoft Entra ID authentication. If you prefer to paste your client\nsecret directly, see `microsoft_entra_client_secret_plaintext`. You must\nprovide an API key using one of the following fields:\n`microsoft_entra_client_secret` or\n`microsoft_entra_client_secret_plaintext`.",
|
||||
"description": "The Databricks secret key reference for a client secret used for Microsoft Entra ID authentication.\nIf you prefer to paste your client secret directly, see `microsoft_entra_client_secret_plaintext`.\nYou must provide an API key using one of the following fields: `microsoft_entra_client_secret` or `microsoft_entra_client_secret_plaintext`.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"microsoft_entra_client_secret_plaintext": {
|
||||
"description": "The client secret used for Microsoft Entra ID authentication provided as\na plaintext string. If you prefer to reference your key using Databricks\nSecrets, see `microsoft_entra_client_secret`. You must provide an API key\nusing one of the following fields: `microsoft_entra_client_secret` or\n`microsoft_entra_client_secret_plaintext`.",
|
||||
"description": "The client secret used for Microsoft Entra ID authentication provided as a plaintext string.\nIf you prefer to reference your key using Databricks Secrets, see `microsoft_entra_client_secret`.\nYou must provide an API key using one of the following fields: `microsoft_entra_client_secret` or `microsoft_entra_client_secret_plaintext`.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"microsoft_entra_tenant_id": {
|
||||
"description": "This field is only required for Azure AD OpenAI and is the Microsoft\nEntra Tenant ID.",
|
||||
"description": "This field is only required for Azure AD OpenAI and is the Microsoft Entra Tenant ID.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"description": "This is a field to provide a customized base URl for the OpenAI API. For\nAzure OpenAI, this field is required, and is the base URL for the Azure\nOpenAI API service provided by Azure. For other OpenAI API types, this\nfield is optional, and if left unspecified, the standard OpenAI base URL\nis used.",
|
||||
"description": "This is a field to provide a customized base URl for the OpenAI API.\nFor Azure OpenAI, this field is required, and is the base URL for the Azure OpenAI API service\nprovided by Azure.\nFor other OpenAI API types, this field is optional, and if left unspecified, the standard OpenAI base URL is used.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"openai_api_key": {
|
||||
"description": "The Databricks secret key reference for an OpenAI API key using the\nOpenAI or Azure service. If you prefer to paste your API key directly,\nsee `openai_api_key_plaintext`. You must provide an API key using one of\nthe following fields: `openai_api_key` or `openai_api_key_plaintext`.",
|
||||
"description": "The Databricks secret key reference for an OpenAI API key using the OpenAI or Azure service. If you prefer to paste your API key directly, see `openai_api_key_plaintext`. You must provide an API key using one of the following fields: `openai_api_key` or `openai_api_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"openai_api_key_plaintext": {
|
||||
"description": "The OpenAI API key using the OpenAI or Azure service provided as a\nplaintext string. If you prefer to reference your key using Databricks\nSecrets, see `openai_api_key`. You must provide an API key using one of\nthe following fields: `openai_api_key` or `openai_api_key_plaintext`.",
|
||||
"description": "The OpenAI API key using the OpenAI or Azure service provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `openai_api_key`. You must provide an API key using one of the following fields: `openai_api_key` or `openai_api_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"openai_api_type": {
|
||||
"description": "This is an optional field to specify the type of OpenAI API to use. For\nAzure OpenAI, this field is required, and adjust this parameter to\nrepresent the preferred security access validation protocol. For access\ntoken validation, use azure. For authentication using Azure Active\nDirectory (Azure AD) use, azuread.",
|
||||
"description": "This is an optional field to specify the type of OpenAI API to use.\nFor Azure OpenAI, this field is required, and adjust this parameter to represent the preferred security\naccess validation protocol. For access token validation, use azure. For authentication using Azure Active\nDirectory (Azure AD) use, azuread.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"openai_api_version": {
|
||||
"description": "This is an optional field to specify the OpenAI API version. For Azure\nOpenAI, this field is required, and is the version of the Azure OpenAI\nservice to utilize, specified by a date.",
|
||||
"description": "This is an optional field to specify the OpenAI API version.\nFor Azure OpenAI, this field is required, and is the version of the Azure OpenAI service to\nutilize, specified by a date.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"openai_deployment_name": {
|
||||
"description": "This field is only required for Azure OpenAI and is the name of the\ndeployment resource for the Azure OpenAI service.",
|
||||
"description": "This field is only required for Azure OpenAI and is the name of the deployment resource for the\nAzure OpenAI service.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"openai_organization": {
|
||||
"description": "This is an optional field to specify the organization in OpenAI or Azure\nOpenAI.",
|
||||
"description": "This is an optional field to specify the organization in OpenAI or Azure OpenAI.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
}
|
||||
},
|
||||
|
@ -6147,11 +6147,11 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"palm_api_key": {
|
||||
"description": "The Databricks secret key reference for a PaLM API key. If you prefer to\npaste your API key directly, see `palm_api_key_plaintext`. You must\nprovide an API key using one of the following fields: `palm_api_key` or\n`palm_api_key_plaintext`.",
|
||||
"description": "The Databricks secret key reference for a PaLM API key. If you prefer to paste your API key directly, see `palm_api_key_plaintext`. You must provide an API key using one of the following fields: `palm_api_key` or `palm_api_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"palm_api_key_plaintext": {
|
||||
"description": "The PaLM API key provided as a plaintext string. If you prefer to\nreference your key using Databricks Secrets, see `palm_api_key`. You must\nprovide an API key using one of the following fields: `palm_api_key` or\n`palm_api_key_plaintext`.",
|
||||
"description": "The PaLM API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `palm_api_key`. You must provide an API key using one of the following fields: `palm_api_key` or `palm_api_key_plaintext`.",
|
||||
"$ref": "#/$defs/string"
|
||||
}
|
||||
},
|
||||
|
@ -6170,7 +6170,7 @@
|
|||
"properties": {
|
||||
"calls": {
|
||||
"description": "Used to specify how many calls are allowed for a key within the renewal_period.",
|
||||
"$ref": "#/$defs/int64"
|
||||
"$ref": "#/$defs/int"
|
||||
},
|
||||
"key": {
|
||||
"description": "Key field for a serving endpoint rate limit. Currently, only 'user' and 'endpoint' are supported, with 'endpoint' being the default if not specified.",
|
||||
|
@ -6197,6 +6197,7 @@
|
|||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Key field for a serving endpoint rate limit. Currently, only 'user' and 'endpoint' are supported, with 'endpoint' being the default if not specified.",
|
||||
"enum": [
|
||||
"user",
|
||||
"endpoint"
|
||||
|
@ -6212,6 +6213,7 @@
|
|||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Renewal period field for a serving endpoint rate limit. Currently, only 'minute' is supported.",
|
||||
"enum": [
|
||||
"minute"
|
||||
]
|
||||
|
@ -6254,18 +6256,19 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"entity_name": {
|
||||
"description": "The name of the entity to be served. The entity may be a model in the Databricks Model Registry, a model in the Unity Catalog (UC), or a function of type FEATURE_SPEC in the UC. If it is a UC object, the full name of the object should be given in the form of **catalog_name.schema_name.model_name**.",
|
||||
"description": "The name of the entity to be served. The entity may be a model in the Databricks Model Registry, a model in the Unity Catalog (UC),\nor a function of type FEATURE_SPEC in the UC. If it is a UC object, the full name of the object should be given in the form of\n__catalog_name__.__schema_name__.__model_name__.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"entity_version": {
|
||||
"description": "The version of the model in Databricks Model Registry to be served or empty if the entity is a FEATURE_SPEC.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"environment_vars": {
|
||||
"description": "An object containing a set of optional, user-specified environment variable key-value pairs used for serving this entity. Note: this is an experimental feature and subject to change. Example entity environment variables that refer to Databricks secrets: `{\"OPENAI_API_KEY\": \"{{secrets/my_scope/my_key}}\", \"DATABRICKS_TOKEN\": \"{{secrets/my_scope2/my_key2}}\"}`",
|
||||
"description": "An object containing a set of optional, user-specified environment variable key-value pairs used for serving this entity.\nNote: this is an experimental feature and subject to change. \nExample entity environment variables that refer to Databricks secrets: `{\"OPENAI_API_KEY\": \"{{secrets/my_scope/my_key}}\", \"DATABRICKS_TOKEN\": \"{{secrets/my_scope2/my_key2}}\"}`",
|
||||
"$ref": "#/$defs/map/string"
|
||||
},
|
||||
"external_model": {
|
||||
"description": "The external model to be served. NOTE: Only one of external_model and (entity_name, entity_version, workload_size, workload_type, and scale_to_zero_enabled) can be specified with the latter set being used for custom model serving for a Databricks registered model. For an existing endpoint with external_model, it cannot be updated to an endpoint without external_model. If the endpoint is created without external_model, users cannot update it to add external_model later. The task type of all external models within an endpoint must be the same.",
|
||||
"description": "The external model to be served. NOTE: Only one of external_model and (entity_name, entity_version, workload_size, workload_type, and scale_to_zero_enabled)\ncan be specified with the latter set being used for custom model serving for a Databricks registered model. For an existing endpoint with external_model,\nit cannot be updated to an endpoint without external_model. If the endpoint is created without external_model, users cannot update it to add external_model later.\nThe task type of all external models within an endpoint must be the same.\n",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.ExternalModel"
|
||||
},
|
||||
"instance_profile_arn": {
|
||||
|
@ -6281,7 +6284,7 @@
|
|||
"$ref": "#/$defs/int"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of a served entity. It must be unique across an endpoint. A served entity name can consist of alphanumeric characters, dashes, and underscores. If not specified for an external model, this field defaults to external_model.name, with '.' and ':' replaced with '-', and if not specified for other entities, it defaults to entity_name-entity_version.",
|
||||
"description": "The name of a served entity. It must be unique across an endpoint. A served entity name can consist of alphanumeric characters, dashes, and underscores.\nIf not specified for an external model, this field defaults to external_model.name, with '.' and ':' replaced with '-', and if not specified for other\nentities, it defaults to \u003centity-name\u003e-\u003centity-version\u003e.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"scale_to_zero_enabled": {
|
||||
|
@ -6289,12 +6292,12 @@
|
|||
"$ref": "#/$defs/bool"
|
||||
},
|
||||
"workload_size": {
|
||||
"description": "The workload size of the served entity. The workload size corresponds to a range of provisioned concurrency that the compute autoscales between. A single unit of provisioned concurrency can process one request at a time. Valid workload sizes are \"Small\" (4 - 4 provisioned concurrency), \"Medium\" (8 - 16 provisioned concurrency), and \"Large\" (16 - 64 provisioned concurrency). If scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size is 0.",
|
||||
"description": "The workload size of the served entity. The workload size corresponds to a range of provisioned concurrency that the compute autoscales between.\nA single unit of provisioned concurrency can process one request at a time.\nValid workload sizes are \"Small\" (4 - 4 provisioned concurrency), \"Medium\" (8 - 16 provisioned concurrency), and \"Large\" (16 - 64 provisioned concurrency).\nIf scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size is 0.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"workload_type": {
|
||||
"description": "The workload type of the served entity. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is \"CPU\". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others. See the available [GPU types](https://docs.databricks.com/en/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types).",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.ServingModelWorkloadType"
|
||||
"description": "The workload type of the served entity. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is\n\"CPU\". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others.\nSee the available [GPU types](https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types).\n",
|
||||
"$ref": "#/$defs/string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
@ -6311,11 +6314,11 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"environment_vars": {
|
||||
"description": "An object containing a set of optional, user-specified environment variable key-value pairs used for serving this entity. Note: this is an experimental feature and subject to change. Example entity environment variables that refer to Databricks secrets: `{\"OPENAI_API_KEY\": \"{{secrets/my_scope/my_key}}\", \"DATABRICKS_TOKEN\": \"{{secrets/my_scope2/my_key2}}\"}`",
|
||||
"description": "An object containing a set of optional, user-specified environment variable key-value pairs used for serving this model.\nNote: this is an experimental feature and subject to change. \nExample model environment variables that refer to Databricks secrets: `{\"OPENAI_API_KEY\": \"{{secrets/my_scope/my_key}}\", \"DATABRICKS_TOKEN\": \"{{secrets/my_scope2/my_key2}}\"}`",
|
||||
"$ref": "#/$defs/map/string"
|
||||
},
|
||||
"instance_profile_arn": {
|
||||
"description": "ARN of the instance profile that the served entity uses to access AWS resources.",
|
||||
"description": "ARN of the instance profile that the served model will use to access AWS resources.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"max_provisioned_throughput": {
|
||||
|
@ -6327,25 +6330,27 @@
|
|||
"$ref": "#/$defs/int"
|
||||
},
|
||||
"model_name": {
|
||||
"description": "The name of the model in Databricks Model Registry to be served or if the model resides in Unity Catalog, the full name of model,\nin the form of __catalog_name__.__schema_name__.__model_name__.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"model_version": {
|
||||
"description": "The version of the model in Databricks Model Registry or Unity Catalog to be served.",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of a served entity. It must be unique across an endpoint. A served entity name can consist of alphanumeric characters, dashes, and underscores. If not specified for an external model, this field defaults to external_model.name, with '.' and ':' replaced with '-', and if not specified for other entities, it defaults to entity_name-entity_version.",
|
||||
"description": "The name of a served model. It must be unique across an endpoint. If not specified, this field will default to \u003cmodel-name\u003e-\u003cmodel-version\u003e.\nA served model name can consist of alphanumeric characters, dashes, and underscores.\n",
|
||||
"$ref": "#/$defs/string"
|
||||
},
|
||||
"scale_to_zero_enabled": {
|
||||
"description": "Whether the compute resources for the served entity should scale down to zero.",
|
||||
"description": "Whether the compute resources for the served model should scale down to zero.",
|
||||
"$ref": "#/$defs/bool"
|
||||
},
|
||||
"workload_size": {
|
||||
"description": "The workload size of the served entity. The workload size corresponds to a range of provisioned concurrency that the compute autoscales between. A single unit of provisioned concurrency can process one request at a time. Valid workload sizes are \"Small\" (4 - 4 provisioned concurrency), \"Medium\" (8 - 16 provisioned concurrency), and \"Large\" (16 - 64 provisioned concurrency). If scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size is 0.",
|
||||
"description": "The workload size of the served model. The workload size corresponds to a range of provisioned concurrency that the compute will autoscale between.\nA single unit of provisioned concurrency can process one request at a time.\nValid workload sizes are \"Small\" (4 - 4 provisioned concurrency), \"Medium\" (8 - 16 provisioned concurrency), and \"Large\" (16 - 64 provisioned concurrency).\nIf scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size will be 0.\n",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.ServedModelInputWorkloadSize"
|
||||
},
|
||||
"workload_type": {
|
||||
"description": "The workload type of the served entity. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is \"CPU\". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others. See the available [GPU types](https://docs.databricks.com/en/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types).",
|
||||
"description": "The workload type of the served model. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is\n\"CPU\". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others.\nSee the available [GPU types](https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types).\n",
|
||||
"$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/serving.ServedModelInputWorkloadType"
|
||||
}
|
||||
},
|
||||
|
@ -6366,6 +6371,7 @@
|
|||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The workload size of the served model. The workload size corresponds to a range of provisioned concurrency that the compute will autoscale between.\nA single unit of provisioned concurrency can process one request at a time.\nValid workload sizes are \"Small\" (4 - 4 provisioned concurrency), \"Medium\" (8 - 16 provisioned concurrency), and \"Large\" (16 - 64 provisioned concurrency).\nIf scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size will be 0.\n",
|
||||
"enum": [
|
||||
"Small",
|
||||
"Medium",
|
||||
|
@ -6382,28 +6388,11 @@
|
|||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "The workload type of the served model. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is\n\"CPU\". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others.\nSee the available [GPU types](https://docs.databricks.com/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types).\n",
|
||||
"enum": [
|
||||
"CPU",
|
||||
"GPU_MEDIUM",
|
||||
"GPU_SMALL",
|
||||
"GPU_LARGE",
|
||||
"MULTIGPU_MEDIUM"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "\\$\\{(var(\\.[a-zA-Z]+([-_]?[a-zA-Z0-9]+)*(\\[[0-9]+\\])*)+)\\}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"serving.ServingModelWorkloadType": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"CPU",
|
||||
"GPU_MEDIUM",
|
||||
"GPU_SMALL",
|
||||
"GPU_LARGE",
|
||||
"MULTIGPU_MEDIUM"
|
||||
]
|
||||
|
|
|
@ -307,7 +307,6 @@ func newUpdate() *cobra.Command {
|
|||
cmd.Flags().Var(&updateJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
// TODO: array: redirect_urls
|
||||
// TODO: array: scopes
|
||||
// TODO: complex arg: token_access_policy
|
||||
|
||||
cmd.Use = "update INTEGRATION_ID"
|
||||
|
|
|
@ -62,7 +62,7 @@ func makeCommand(method string) *cobra.Command {
|
|||
|
||||
var response any
|
||||
headers := map[string]string{"Content-Type": "application/json"}
|
||||
err = api.Do(cmd.Context(), method, path, headers, nil, request, &response)
|
||||
err = api.Do(cmd.Context(), method, path, headers, request, &response)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -1,109 +0,0 @@
|
|||
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
|
||||
|
||||
package access_control
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/databricks/cli/cmd/root"
|
||||
"github.com/databricks/cli/libs/cmdio"
|
||||
"github.com/databricks/cli/libs/flags"
|
||||
"github.com/databricks/databricks-sdk-go/service/iam"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
// Functions can be added from the `init()` function in manually curated files in this directory.
|
||||
var cmdOverrides []func(*cobra.Command)
|
||||
|
||||
func New() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "access-control",
|
||||
Short: `Rule based Access Control for Databricks Resources.`,
|
||||
Long: `Rule based Access Control for Databricks Resources.`,
|
||||
GroupID: "iam",
|
||||
Annotations: map[string]string{
|
||||
"package": "iam",
|
||||
},
|
||||
|
||||
// This service is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCheckPolicy())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start check-policy command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
// Functions can be added from the `init()` function in manually curated files in this directory.
|
||||
var checkPolicyOverrides []func(
|
||||
*cobra.Command,
|
||||
*iam.CheckPolicyRequest,
|
||||
)
|
||||
|
||||
func newCheckPolicy() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var checkPolicyReq iam.CheckPolicyRequest
|
||||
var checkPolicyJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&checkPolicyJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
// TODO: complex arg: resource_info
|
||||
|
||||
cmd.Use = "check-policy"
|
||||
cmd.Short = `Check access policy to a resource.`
|
||||
cmd.Long = `Check access policy to a resource.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.PreRunE = root.MustWorkspaceClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
w := root.WorkspaceClient(ctx)
|
||||
|
||||
if cmd.Flags().Changed("json") {
|
||||
diags := checkPolicyJson.Unmarshal(&checkPolicyReq)
|
||||
if diags.HasError() {
|
||||
return diags.Error()
|
||||
}
|
||||
if len(diags) > 0 {
|
||||
err := cmdio.RenderDiagnosticsToErrorOut(ctx, diags)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := w.AccessControl.CheckPolicy(ctx, checkPolicyReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return cmdio.Render(ctx, response)
|
||||
}
|
||||
|
||||
// Disable completions since they are not applicable.
|
||||
// Can be overridden by manual implementation in `override.go`.
|
||||
cmd.ValidArgsFunction = cobra.NoFileCompletions
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range checkPolicyOverrides {
|
||||
fn(cmd, &checkPolicyReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// end service AccessControl
|
|
@ -3,7 +3,6 @@
|
|||
package workspace
|
||||
|
||||
import (
|
||||
access_control "github.com/databricks/cli/cmd/workspace/access-control"
|
||||
alerts "github.com/databricks/cli/cmd/workspace/alerts"
|
||||
alerts_legacy "github.com/databricks/cli/cmd/workspace/alerts-legacy"
|
||||
apps "github.com/databricks/cli/cmd/workspace/apps"
|
||||
|
@ -97,7 +96,6 @@ import (
|
|||
func All() []*cobra.Command {
|
||||
var out []*cobra.Command
|
||||
|
||||
out = append(out, access_control.New())
|
||||
out = append(out, alerts.New())
|
||||
out = append(out, alerts_legacy.New())
|
||||
out = append(out, apps.New())
|
||||
|
|
|
@ -64,7 +64,7 @@ func newCreate() *cobra.Command {
|
|||
cmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Flags().StringVar(&createReq.Comment, "comment", createReq.Comment, `Description about the provider.`)
|
||||
cmd.Flags().StringVar(&createReq.RecipientProfileStr, "recipient-profile-str", createReq.RecipientProfileStr, `This field is required when the __authentication_type__ is **TOKEN**, **OAUTH_CLIENT_CREDENTIALS** or not provided.`)
|
||||
cmd.Flags().StringVar(&createReq.RecipientProfileStr, "recipient-profile-str", createReq.RecipientProfileStr, `This field is required when the __authentication_type__ is **TOKEN** or not provided.`)
|
||||
|
||||
cmd.Use = "create NAME AUTHENTICATION_TYPE"
|
||||
cmd.Short = `Create an auth provider.`
|
||||
|
@ -430,7 +430,7 @@ func newUpdate() *cobra.Command {
|
|||
cmd.Flags().StringVar(&updateReq.Comment, "comment", updateReq.Comment, `Description about the provider.`)
|
||||
cmd.Flags().StringVar(&updateReq.NewName, "new-name", updateReq.NewName, `New name for the provider.`)
|
||||
cmd.Flags().StringVar(&updateReq.Owner, "owner", updateReq.Owner, `Username of Provider owner.`)
|
||||
cmd.Flags().StringVar(&updateReq.RecipientProfileStr, "recipient-profile-str", updateReq.RecipientProfileStr, `This field is required when the __authentication_type__ is **TOKEN**, **OAUTH_CLIENT_CREDENTIALS** or not provided.`)
|
||||
cmd.Flags().StringVar(&updateReq.RecipientProfileStr, "recipient-profile-str", updateReq.RecipientProfileStr, `This field is required when the __authentication_type__ is **TOKEN** or not provided.`)
|
||||
|
||||
cmd.Use = "update NAME"
|
||||
cmd.Short = `Update a provider.`
|
||||
|
|
|
@ -91,7 +91,7 @@ func newCreate() *cobra.Command {
|
|||
cmd.Long = `Create a share recipient.
|
||||
|
||||
Creates a new recipient with the delta sharing authentication type in the
|
||||
metastore. The caller must be a metastore admin or have the
|
||||
metastore. The caller must be a metastore admin or has the
|
||||
**CREATE_RECIPIENT** privilege on the metastore.
|
||||
|
||||
Arguments:
|
||||
|
@ -186,16 +186,28 @@ func newDelete() *cobra.Command {
|
|||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := root.ExactArgs(1)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustWorkspaceClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
w := root.WorkspaceClient(ctx)
|
||||
|
||||
if len(args) == 0 {
|
||||
promptSpinner := cmdio.Spinner(ctx)
|
||||
promptSpinner <- "No NAME argument specified. Loading names for Recipients drop-down."
|
||||
names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{})
|
||||
close(promptSpinner)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to load names for Recipients drop-down. Please manually specify required arguments. Original error: %w", err)
|
||||
}
|
||||
id, err := cmdio.Select(ctx, names, "Name of the recipient")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
args = append(args, id)
|
||||
}
|
||||
if len(args) != 1 {
|
||||
return fmt.Errorf("expected to have name of the recipient")
|
||||
}
|
||||
deleteReq.Name = args[0]
|
||||
|
||||
err = w.Recipients.Delete(ctx, deleteReq)
|
||||
|
@ -246,16 +258,28 @@ func newGet() *cobra.Command {
|
|||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := root.ExactArgs(1)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustWorkspaceClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
w := root.WorkspaceClient(ctx)
|
||||
|
||||
if len(args) == 0 {
|
||||
promptSpinner := cmdio.Spinner(ctx)
|
||||
promptSpinner <- "No NAME argument specified. Loading names for Recipients drop-down."
|
||||
names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{})
|
||||
close(promptSpinner)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to load names for Recipients drop-down. Please manually specify required arguments. Original error: %w", err)
|
||||
}
|
||||
id, err := cmdio.Select(ctx, names, "Name of the recipient")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
args = append(args, id)
|
||||
}
|
||||
if len(args) != 1 {
|
||||
return fmt.Errorf("expected to have name of the recipient")
|
||||
}
|
||||
getReq.Name = args[0]
|
||||
|
||||
response, err := w.Recipients.Get(ctx, getReq)
|
||||
|
@ -360,7 +384,7 @@ func newRotateToken() *cobra.Command {
|
|||
the provided token info. The caller must be the owner of the recipient.
|
||||
|
||||
Arguments:
|
||||
NAME: The name of the Recipient.
|
||||
NAME: The name of the recipient.
|
||||
EXISTING_TOKEN_EXPIRE_IN_SECONDS: The expiration time of the bearer token in ISO 8601 format. This will set
|
||||
the expiration_time of existing token only to a smaller timestamp, it
|
||||
cannot extend the expiration_time. Use 0 to expire the existing token
|
||||
|
@ -455,16 +479,28 @@ func newSharePermissions() *cobra.Command {
|
|||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := root.ExactArgs(1)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustWorkspaceClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
w := root.WorkspaceClient(ctx)
|
||||
|
||||
if len(args) == 0 {
|
||||
promptSpinner := cmdio.Spinner(ctx)
|
||||
promptSpinner <- "No NAME argument specified. Loading names for Recipients drop-down."
|
||||
names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{})
|
||||
close(promptSpinner)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to load names for Recipients drop-down. Please manually specify required arguments. Original error: %w", err)
|
||||
}
|
||||
id, err := cmdio.Select(ctx, names, "The name of the Recipient")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
args = append(args, id)
|
||||
}
|
||||
if len(args) != 1 {
|
||||
return fmt.Errorf("expected to have the name of the recipient")
|
||||
}
|
||||
sharePermissionsReq.Name = args[0]
|
||||
|
||||
response, err := w.Recipients.SharePermissions(ctx, sharePermissionsReq)
|
||||
|
@ -524,11 +560,6 @@ func newUpdate() *cobra.Command {
|
|||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := root.ExactArgs(1)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustWorkspaceClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
|
@ -546,13 +577,30 @@ func newUpdate() *cobra.Command {
|
|||
}
|
||||
}
|
||||
}
|
||||
if len(args) == 0 {
|
||||
promptSpinner := cmdio.Spinner(ctx)
|
||||
promptSpinner <- "No NAME argument specified. Loading names for Recipients drop-down."
|
||||
names, err := w.Recipients.RecipientInfoNameToMetastoreIdMap(ctx, sharing.ListRecipientsRequest{})
|
||||
close(promptSpinner)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to load names for Recipients drop-down. Please manually specify required arguments. Original error: %w", err)
|
||||
}
|
||||
id, err := cmdio.Select(ctx, names, "Name of the recipient")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
args = append(args, id)
|
||||
}
|
||||
if len(args) != 1 {
|
||||
return fmt.Errorf("expected to have name of the recipient")
|
||||
}
|
||||
updateReq.Name = args[0]
|
||||
|
||||
response, err := w.Recipients.Update(ctx, updateReq)
|
||||
err = w.Recipients.Update(ctx, updateReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return cmdio.Render(ctx, response)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Disable completions since they are not applicable.
|
||||
|
|
|
@ -49,7 +49,6 @@ func New() *cobra.Command {
|
|||
cmd.AddCommand(newGetOpenApi())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newHttpRequest())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newLogs())
|
||||
cmd.AddCommand(newPatch())
|
||||
|
@ -154,34 +153,16 @@ func newCreate() *cobra.Command {
|
|||
cmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
// TODO: complex arg: ai_gateway
|
||||
// TODO: complex arg: config
|
||||
// TODO: array: rate_limits
|
||||
cmd.Flags().BoolVar(&createReq.RouteOptimized, "route-optimized", createReq.RouteOptimized, `Enable route optimization for the serving endpoint.`)
|
||||
// TODO: array: tags
|
||||
|
||||
cmd.Use = "create NAME"
|
||||
cmd.Use = "create"
|
||||
cmd.Short = `Create a new serving endpoint.`
|
||||
cmd.Long = `Create a new serving endpoint.
|
||||
|
||||
Arguments:
|
||||
NAME: The name of the serving endpoint. This field is required and must be
|
||||
unique across a Databricks workspace. An endpoint name can consist of
|
||||
alphanumeric characters, dashes, and underscores.`
|
||||
cmd.Long = `Create a new serving endpoint.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
if cmd.Flags().Changed("json") {
|
||||
err := root.ExactArgs(0)(cmd, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("when --json flag is specified, no positional arguments are required. Provide 'name' in your JSON input")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
check := root.ExactArgs(1)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustWorkspaceClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
|
@ -198,9 +179,8 @@ func newCreate() *cobra.Command {
|
|||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
if !cmd.Flags().Changed("json") {
|
||||
createReq.Name = args[0]
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
wait, err := w.ServingEndpoints.Create(ctx, createReq)
|
||||
|
@ -253,7 +233,10 @@ func newDelete() *cobra.Command {
|
|||
|
||||
cmd.Use = "delete NAME"
|
||||
cmd.Short = `Delete a serving endpoint.`
|
||||
cmd.Long = `Delete a serving endpoint.`
|
||||
cmd.Long = `Delete a serving endpoint.
|
||||
|
||||
Arguments:
|
||||
NAME: The name of the serving endpoint. This field is required.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
|
@ -449,12 +432,11 @@ func newGetOpenApi() *cobra.Command {
|
|||
|
||||
getOpenApiReq.Name = args[0]
|
||||
|
||||
response, err := w.ServingEndpoints.GetOpenApi(ctx, getOpenApiReq)
|
||||
err = w.ServingEndpoints.GetOpenApi(ctx, getOpenApiReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer response.Contents.Close()
|
||||
return cmdio.Render(ctx, response.Contents)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Disable completions since they are not applicable.
|
||||
|
@ -586,77 +568,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
// start http-request command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
// Functions can be added from the `init()` function in manually curated files in this directory.
|
||||
var httpRequestOverrides []func(
|
||||
*cobra.Command,
|
||||
*serving.ExternalFunctionRequest,
|
||||
)
|
||||
|
||||
func newHttpRequest() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var httpRequestReq serving.ExternalFunctionRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&httpRequestReq.Headers, "headers", httpRequestReq.Headers, `Additional headers for the request.`)
|
||||
cmd.Flags().StringVar(&httpRequestReq.Json, "json", httpRequestReq.Json, `The JSON payload to send in the request body.`)
|
||||
cmd.Flags().StringVar(&httpRequestReq.Params, "params", httpRequestReq.Params, `Query parameters for the request.`)
|
||||
|
||||
cmd.Use = "http-request CONNECTION_NAME METHOD PATH"
|
||||
cmd.Short = `Make external services call using the credentials stored in UC Connection.`
|
||||
cmd.Long = `Make external services call using the credentials stored in UC Connection.
|
||||
|
||||
Arguments:
|
||||
CONNECTION_NAME: The connection name to use. This is required to identify the external
|
||||
connection.
|
||||
METHOD: The HTTP method to use (e.g., 'GET', 'POST').
|
||||
PATH: The relative path for the API endpoint. This is required.`
|
||||
|
||||
// This command is being previewed; hide from help output.
|
||||
cmd.Hidden = true
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := root.ExactArgs(3)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustWorkspaceClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
w := root.WorkspaceClient(ctx)
|
||||
|
||||
httpRequestReq.ConnectionName = args[0]
|
||||
_, err = fmt.Sscan(args[1], &httpRequestReq.Method)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid METHOD: %s", args[1])
|
||||
}
|
||||
httpRequestReq.Path = args[2]
|
||||
|
||||
response, err := w.ServingEndpoints.HttpRequest(ctx, httpRequestReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return cmdio.Render(ctx, response)
|
||||
}
|
||||
|
||||
// Disable completions since they are not applicable.
|
||||
// Can be overridden by manual implementation in `override.go`.
|
||||
cmd.ValidArgsFunction = cobra.NoFileCompletions
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range httpRequestOverrides {
|
||||
fn(cmd, &httpRequestReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -938,7 +849,7 @@ func newPutAiGateway() *cobra.Command {
|
|||
cmd.Long = `Update AI Gateway of a serving endpoint.
|
||||
|
||||
Used to update the AI Gateway of a serving endpoint. NOTE: Only external model
|
||||
and provisioned throughput endpoints are currently supported.
|
||||
endpoints are currently supported.
|
||||
|
||||
Arguments:
|
||||
NAME: The name of the serving endpoint whose AI Gateway is being updated. This
|
||||
|
|
2
go.mod
2
go.mod
|
@ -7,7 +7,7 @@ toolchain go1.23.4
|
|||
require (
|
||||
github.com/Masterminds/semver/v3 v3.3.1 // MIT
|
||||
github.com/briandowns/spinner v1.23.1 // Apache 2.0
|
||||
github.com/databricks/databricks-sdk-go v0.56.0 // Apache 2.0
|
||||
github.com/databricks/databricks-sdk-go v0.55.0 // Apache 2.0
|
||||
github.com/fatih/color v1.18.0 // MIT
|
||||
github.com/google/uuid v1.6.0 // BSD-3-Clause
|
||||
github.com/hashicorp/go-version v1.7.0 // MPL 2.0
|
||||
|
|
|
@ -32,8 +32,8 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
|
|||
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo=
|
||||
github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
|
||||
github.com/databricks/databricks-sdk-go v0.56.0 h1:8BsqjrSLbm2ET+/SLCN8qD+v+HFvs891dzi1OaiyRfc=
|
||||
github.com/databricks/databricks-sdk-go v0.56.0/go.mod h1:JpLizplEs+up9/Z4Xf2x++o3sM9eTTWFGzIXAptKJzI=
|
||||
github.com/databricks/databricks-sdk-go v0.55.0 h1:ReziD6spzTDltM0ml80LggKo27F3oUjgTinCFDJDnak=
|
||||
github.com/databricks/databricks-sdk-go v0.55.0/go.mod h1:JpLizplEs+up9/Z4Xf2x++o3sM9eTTWFGzIXAptKJzI=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
|
|
@ -158,7 +158,7 @@ func (a *syncTest) remoteFileContent(ctx context.Context, relativePath, expected
|
|||
|
||||
var res []byte
|
||||
a.c.Eventually(func() bool {
|
||||
err = apiClient.Do(ctx, http.MethodGet, urlPath, nil, nil, nil, &res)
|
||||
err = apiClient.Do(ctx, http.MethodGet, urlPath, nil, nil, &res)
|
||||
require.NoError(a.t, err)
|
||||
actualContent := string(res)
|
||||
return actualContent == expectedContent
|
||||
|
|
|
@ -148,7 +148,7 @@ func (w *FilesClient) Write(ctx context.Context, name string, reader io.Reader,
|
|||
overwrite := slices.Contains(mode, OverwriteIfExists)
|
||||
urlPath = fmt.Sprintf("%s?overwrite=%t", urlPath, overwrite)
|
||||
headers := map[string]string{"Content-Type": "application/octet-stream"}
|
||||
err = w.apiClient.Do(ctx, http.MethodPut, urlPath, headers, nil, reader, nil)
|
||||
err = w.apiClient.Do(ctx, http.MethodPut, urlPath, headers, reader, nil)
|
||||
|
||||
// Return early on success.
|
||||
if err == nil {
|
||||
|
@ -176,7 +176,7 @@ func (w *FilesClient) Read(ctx context.Context, name string) (io.ReadCloser, err
|
|||
}
|
||||
|
||||
var reader io.ReadCloser
|
||||
err = w.apiClient.Do(ctx, http.MethodGet, urlPath, nil, nil, nil, &reader)
|
||||
err = w.apiClient.Do(ctx, http.MethodGet, urlPath, nil, nil, &reader)
|
||||
|
||||
// Return early on success.
|
||||
if err == nil {
|
||||
|
|
|
@ -106,7 +106,7 @@ func (info *wsfsFileInfo) MarshalJSON() ([]byte, error) {
|
|||
// as an interface to allow for mocking in tests.
|
||||
type apiClient interface {
|
||||
Do(ctx context.Context, method, path string,
|
||||
headers map[string]string, queryParams map[string]any, request, response any,
|
||||
headers map[string]string, request, response any,
|
||||
visitors ...func(*http.Request) error) error
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ func (w *WorkspaceFilesClient) Write(ctx context.Context, name string, reader io
|
|||
return err
|
||||
}
|
||||
|
||||
err = w.apiClient.Do(ctx, http.MethodPost, urlPath, nil, nil, body, nil)
|
||||
err = w.apiClient.Do(ctx, http.MethodPost, urlPath, nil, body, nil)
|
||||
|
||||
// Return early on success.
|
||||
if err == nil {
|
||||
|
@ -341,7 +341,6 @@ func (w *WorkspaceFilesClient) Stat(ctx context.Context, name string) (fs.FileIn
|
|||
http.MethodGet,
|
||||
"/api/2.0/workspace/get-status",
|
||||
nil,
|
||||
nil,
|
||||
map[string]string{
|
||||
"path": absPath,
|
||||
"return_export_info": "true",
|
||||
|
|
|
@ -17,7 +17,7 @@ type mockApiClient struct {
|
|||
}
|
||||
|
||||
func (m *mockApiClient) Do(ctx context.Context, method, path string,
|
||||
headers map[string]string, queryParams map[string]any, request, response any,
|
||||
headers map[string]string, request, response any,
|
||||
visitors ...func(*http.Request) error,
|
||||
) error {
|
||||
args := m.Called(ctx, method, path, headers, request, response, visitors)
|
||||
|
|
|
@ -66,7 +66,6 @@ func fetchRepositoryInfoAPI(ctx context.Context, path string, w *databricks.Work
|
|||
http.MethodGet,
|
||||
apiEndpoint,
|
||||
nil,
|
||||
nil,
|
||||
map[string]string{
|
||||
"path": path,
|
||||
"return_git_info": "true",
|
||||
|
|
Loading…
Reference in New Issue