mirror of https://github.com/databricks/cli.git
Update Go SDK to v0.34.0 (#1256)
## Changes SDK release https://github.com/databricks/databricks-sdk-go/releases/tag/v0.34.0 This incorporates two changes to the generation code: * Use explicit empty check for response types (see https://github.com/databricks/databricks-sdk-go/pull/831) * Support subservices for the settings commands (see https://github.com/databricks/databricks-sdk-go/pull/826) As part of the subservices support, this change also updates how methods are registered with their services. This used to be done with `init` functions and now through inline function calls. This should have a (negligible) positive impact on binary start time because we no longer have to call as many `init` functions. ## Tests tbd
This commit is contained in:
parent
e61f0e1eb9
commit
74b1e05ed7
|
@ -1 +1 @@
|
|||
cdd76a98a4fca7008572b3a94427566dd286c63b
|
||||
d855b30f25a06fe84f25214efa20e7f1fffcdf9e
|
|
@ -7,7 +7,7 @@ package account
|
|||
import (
|
||||
"github.com/databricks/cli/cmd/root"
|
||||
"github.com/spf13/cobra"
|
||||
{{range .Services}}{{if .IsAccounts}}{{if not (in $excludes .KebabName) }}
|
||||
{{range .Services}}{{if and .IsAccounts (not .HasParent)}}{{if not (in $excludes .KebabName) }}
|
||||
{{.SnakeName}} "github.com/databricks/cli/cmd/account/{{(.TrimPrefix "account").KebabName}}"{{end}}{{end}}{{end}}
|
||||
)
|
||||
|
||||
|
@ -17,7 +17,7 @@ func New() *cobra.Command {
|
|||
Short: `Databricks Account Commands`,
|
||||
}
|
||||
|
||||
{{range .Services}}{{if .IsAccounts}}{{if not (in $excludes .KebabName) -}}
|
||||
{{range .Services}}{{if and .IsAccounts (not .HasParent)}}{{if not (in $excludes .KebabName) -}}
|
||||
cmd.AddCommand({{.SnakeName}}.New())
|
||||
{{end}}{{end}}{{end}}
|
||||
|
||||
|
|
|
@ -14,14 +14,14 @@ package workspace
|
|||
|
||||
import (
|
||||
"github.com/databricks/cli/cmd/root"
|
||||
{{range .Services}}{{if not .IsAccounts}}{{if not (in $excludes .KebabName) }}
|
||||
{{range .Services}}{{if and (not .IsAccounts) (not .HasParent)}}{{if not (in $excludes .KebabName) }}
|
||||
{{.SnakeName}} "github.com/databricks/cli/cmd/workspace/{{.KebabName}}"{{end}}{{end}}{{end}}
|
||||
)
|
||||
|
||||
func All() []*cobra.Command {
|
||||
var out []*cobra.Command
|
||||
|
||||
{{range .Services}}{{if not .IsAccounts}}{{if not (in $excludes .KebabName) -}}
|
||||
{{range .Services}}{{if and (not .IsAccounts) (not .HasParent)}}{{if not (in $excludes .KebabName) -}}
|
||||
out = append(out, {{.SnakeName}}.New())
|
||||
{{end}}{{end}}{{end}}
|
||||
|
||||
|
|
|
@ -8,6 +8,10 @@ import (
|
|||
"github.com/databricks/cli/cmd/root"
|
||||
"github.com/databricks/databricks-sdk-go/service/{{.Package.Name}}"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
{{range .Subservices -}}
|
||||
{{.SnakeName}} "github.com/databricks/cli/cmd/{{ if .ParentService.IsAccounts }}account{{ else }}workspace{{ end }}/{{.KebabName}}"
|
||||
{{end}}
|
||||
)
|
||||
|
||||
{{ $excludes :=
|
||||
|
@ -34,6 +38,8 @@ import (
|
|||
]{{end}}{{end}}
|
||||
|
||||
{{define "service"}}
|
||||
{{- $excludeMethods := list "put-secret" -}}
|
||||
|
||||
// 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)
|
||||
|
@ -45,10 +51,12 @@ func New() *cobra.Command {
|
|||
Short: `{{.Summary | without "`"}}`,
|
||||
Long: `{{.Comment " " 80 | without "`"}}`,
|
||||
{{- end }}
|
||||
{{- if not .HasParent }}
|
||||
GroupID: "{{ .Package.Name }}",
|
||||
Annotations: map[string]string{
|
||||
"package": "{{ .Package.Name }}",
|
||||
},
|
||||
{{- end }}
|
||||
{{- if .IsPrivatePreview }}
|
||||
|
||||
// This service is being previewed; hide from help output.
|
||||
|
@ -56,6 +64,23 @@ func New() *cobra.Command {
|
|||
{{- end }}
|
||||
}
|
||||
|
||||
{{ if gt (len .Methods) 0 -}}
|
||||
// Add methods
|
||||
{{- range .Methods}}
|
||||
{{- if in $excludeMethods .KebabName }}
|
||||
{{- continue}}
|
||||
{{- end}}
|
||||
cmd.AddCommand(new{{.PascalName}}())
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
|
||||
{{ if .HasSubservices }}
|
||||
// Add subservices
|
||||
{{- range .Subservices}}
|
||||
cmd.AddCommand({{.SnakeName}}.New())
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -67,8 +92,7 @@ func New() *cobra.Command {
|
|||
{{- $serviceName := .KebabName -}}
|
||||
{{range .Methods}}
|
||||
|
||||
{{- $excludes := list "put-secret" -}}
|
||||
{{if in $excludes .KebabName }}
|
||||
{{if in $excludeMethods .KebabName }}
|
||||
{{continue}}
|
||||
{{end}}
|
||||
// start {{.KebabName}} command
|
||||
|
@ -242,7 +266,7 @@ func new{{.PascalName}}() *cobra.Command {
|
|||
return err
|
||||
}
|
||||
if {{.CamelName}}SkipWait {
|
||||
{{if .Response -}}
|
||||
{{if not .Response.IsEmpty -}}
|
||||
return cmdio.Render(ctx, wait.Response)
|
||||
{{- else -}}
|
||||
return nil
|
||||
|
@ -291,26 +315,29 @@ func new{{.PascalName}}() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(new{{.PascalName}}())
|
||||
})
|
||||
}
|
||||
{{end}}
|
||||
// end service {{.Name}}{{end}}
|
||||
|
||||
{{- define "method-call" -}}
|
||||
{{if .Response -}}
|
||||
{{if not .Response.IsEmpty -}}
|
||||
response{{ if not .Pagination}}, err{{end}} :=
|
||||
{{- else -}}
|
||||
err =
|
||||
{{- end}} {{if .Service.IsAccounts}}a{{else}}w{{end}}.{{(.Service.TrimPrefix "account").PascalName}}.{{.PascalName}}(ctx{{if .Request}}, {{.CamelName}}Req{{end}})
|
||||
{{- end}}
|
||||
{{- if .Service.IsAccounts}}a{{else}}w{{end}}.
|
||||
{{- if .Service.HasParent }}
|
||||
{{- (.Service.ParentService.TrimPrefix "account").PascalName }}.
|
||||
{{- (.Service.TrimPrefix "account").PascalName}}().
|
||||
{{- else}}
|
||||
{{- (.Service.TrimPrefix "account").PascalName}}.
|
||||
{{- end}}
|
||||
{{- .PascalName}}(ctx{{if .Request}}, {{.CamelName}}Req{{end}})
|
||||
{{- if not (and .Response .Pagination) }}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
{{- end}}
|
||||
{{ if .Response -}}
|
||||
{{ if not .Response.IsEmpty -}}
|
||||
{{- if .IsResponseByteStream -}}
|
||||
defer response.{{.ResponseBodyField.PascalName}}.Close()
|
||||
return cmdio.Render{{ if .Pagination}}Iterator{{end}}(ctx, response.{{.ResponseBodyField.PascalName}})
|
||||
|
|
|
@ -4,8 +4,10 @@ cmd/account/billable-usage/billable-usage.go linguist-generated=true
|
|||
cmd/account/budgets/budgets.go linguist-generated=true
|
||||
cmd/account/cmd.go linguist-generated=true
|
||||
cmd/account/credentials/credentials.go linguist-generated=true
|
||||
cmd/account/csp-enablement-account/csp-enablement-account.go linguist-generated=true
|
||||
cmd/account/custom-app-integration/custom-app-integration.go linguist-generated=true
|
||||
cmd/account/encryption-keys/encryption-keys.go linguist-generated=true
|
||||
cmd/account/esm-enablement-account/esm-enablement-account.go linguist-generated=true
|
||||
cmd/account/groups/groups.go linguist-generated=true
|
||||
cmd/account/ip-access-lists/ip-access-lists.go linguist-generated=true
|
||||
cmd/account/log-delivery/log-delivery.go linguist-generated=true
|
||||
|
@ -14,6 +16,7 @@ cmd/account/metastores/metastores.go linguist-generated=true
|
|||
cmd/account/network-connectivity/network-connectivity.go linguist-generated=true
|
||||
cmd/account/networks/networks.go linguist-generated=true
|
||||
cmd/account/o-auth-published-apps/o-auth-published-apps.go linguist-generated=true
|
||||
cmd/account/personal-compute/personal-compute.go linguist-generated=true
|
||||
cmd/account/private-access/private-access.go linguist-generated=true
|
||||
cmd/account/published-app-integration/published-app-integration.go linguist-generated=true
|
||||
cmd/account/service-principal-secrets/service-principal-secrets.go linguist-generated=true
|
||||
|
@ -28,6 +31,7 @@ cmd/account/workspaces/workspaces.go linguist-generated=true
|
|||
cmd/workspace/alerts/alerts.go linguist-generated=true
|
||||
cmd/workspace/apps/apps.go linguist-generated=true
|
||||
cmd/workspace/artifact-allowlists/artifact-allowlists.go linguist-generated=true
|
||||
cmd/workspace/automatic-cluster-update/automatic-cluster-update.go linguist-generated=true
|
||||
cmd/workspace/catalogs/catalogs.go linguist-generated=true
|
||||
cmd/workspace/clean-rooms/clean-rooms.go linguist-generated=true
|
||||
cmd/workspace/cluster-policies/cluster-policies.go linguist-generated=true
|
||||
|
@ -35,10 +39,13 @@ cmd/workspace/clusters/clusters.go linguist-generated=true
|
|||
cmd/workspace/cmd.go linguist-generated=true
|
||||
cmd/workspace/connections/connections.go linguist-generated=true
|
||||
cmd/workspace/credentials-manager/credentials-manager.go linguist-generated=true
|
||||
cmd/workspace/csp-enablement/csp-enablement.go linguist-generated=true
|
||||
cmd/workspace/current-user/current-user.go linguist-generated=true
|
||||
cmd/workspace/dashboard-widgets/dashboard-widgets.go linguist-generated=true
|
||||
cmd/workspace/dashboards/dashboards.go linguist-generated=true
|
||||
cmd/workspace/data-sources/data-sources.go linguist-generated=true
|
||||
cmd/workspace/default-namespace/default-namespace.go linguist-generated=true
|
||||
cmd/workspace/esm-enablement/esm-enablement.go linguist-generated=true
|
||||
cmd/workspace/experiments/experiments.go linguist-generated=true
|
||||
cmd/workspace/external-locations/external-locations.go linguist-generated=true
|
||||
cmd/workspace/functions/functions.go linguist-generated=true
|
||||
|
@ -57,6 +64,7 @@ cmd/workspace/metastores/metastores.go linguist-generated=true
|
|||
cmd/workspace/model-registry/model-registry.go linguist-generated=true
|
||||
cmd/workspace/model-versions/model-versions.go linguist-generated=true
|
||||
cmd/workspace/online-tables/online-tables.go linguist-generated=true
|
||||
cmd/workspace/permission-migration/permission-migration.go linguist-generated=true
|
||||
cmd/workspace/permissions/permissions.go linguist-generated=true
|
||||
cmd/workspace/pipelines/pipelines.go linguist-generated=true
|
||||
cmd/workspace/policy-families/policy-families.go linguist-generated=true
|
||||
|
@ -68,6 +76,7 @@ cmd/workspace/recipient-activation/recipient-activation.go linguist-generated=tr
|
|||
cmd/workspace/recipients/recipients.go linguist-generated=true
|
||||
cmd/workspace/registered-models/registered-models.go linguist-generated=true
|
||||
cmd/workspace/repos/repos.go linguist-generated=true
|
||||
cmd/workspace/restrict-workspace-admins/restrict-workspace-admins.go linguist-generated=true
|
||||
cmd/workspace/schemas/schemas.go linguist-generated=true
|
||||
cmd/workspace/secrets/secrets.go linguist-generated=true
|
||||
cmd/workspace/service-principals/service-principals.go linguist-generated=true
|
||||
|
|
|
@ -193,7 +193,7 @@
|
|||
"description": "An optional continuous property for this job. The continuous property will ensure that there is always one run executing. Only one of `schedule` and `continuous` can be used.",
|
||||
"properties": {
|
||||
"pause_status": {
|
||||
"description": "Indicate whether this schedule is paused or not."
|
||||
"description": "Whether this trigger is paused or not."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -351,13 +351,13 @@
|
|||
"description": "The number of volumes launched for each instance. Users can choose up to 10 volumes.\nThis feature is only enabled for supported node types. Legacy node types cannot specify\ncustom EBS volumes.\nFor node types with no instance store, at least one EBS volume needs to be specified;\notherwise, cluster creation will fail.\n\nThese EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc.\nInstance store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc.\n\nIf EBS volumes are attached, Databricks will configure Spark to use only the EBS volumes for\nscratch storage because heterogenously sized scratch devices can lead to inefficient disk\nutilization. If no EBS volumes are attached, Databricks will configure Spark to use instance\nstore volumes.\n\nPlease note that if EBS volumes are specified, then the Spark configuration `spark.local.dir`\nwill be overridden."
|
||||
},
|
||||
"ebs_volume_iops": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what IOPS to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_size": {
|
||||
"description": "The size of each EBS volume (in GiB) launched for each instance. For general purpose\nSSD, this value must be within the range 100 - 4096. For throughput optimized HDD,\nthis value must be within the range 500 - 4096."
|
||||
},
|
||||
"ebs_volume_throughput": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what throughput to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_type": {
|
||||
"description": ""
|
||||
|
@ -725,7 +725,7 @@
|
|||
"description": "An optional periodic schedule for this job. The default behavior is that the job only runs when triggered by clicking “Run Now” in the Jobs UI or sending an API request to `runNow`.",
|
||||
"properties": {
|
||||
"pause_status": {
|
||||
"description": "Indicate whether this schedule is paused or not."
|
||||
"description": "Whether this trigger is paused or not."
|
||||
},
|
||||
"quartz_cron_expression": {
|
||||
"description": "A Cron expression using Quartz syntax that describes the schedule for a job.\nSee [Cron Trigger](http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html)\nfor details. This field is required.\"\n"
|
||||
|
@ -785,7 +785,7 @@
|
|||
"description": "Optional schema to write to. This parameter is only used when a warehouse_id is also provided. If not provided, the `default` schema is used."
|
||||
},
|
||||
"source": {
|
||||
"description": "Optional location type of the project directory. When set to `WORKSPACE`, the project will be retrieved\nfrom the local \u003cDatabricks\u003e workspace. When set to `GIT`, the project will be retrieved from a Git repository\ndefined in `git_source`. If the value is empty, the task will use `GIT` if `git_source` is defined and `WORKSPACE` otherwise.\n\n* `WORKSPACE`: Project is located in \u003cDatabricks\u003e workspace.\n* `GIT`: Project is located in cloud Git provider.\n"
|
||||
"description": "Optional location type of the Python file. When set to `WORKSPACE` or not specified, the file will be retrieved\nfrom the local \u003cDatabricks\u003e workspace or cloud location (if the `python_file` has a URI format). When set to `GIT`,\nthe Python file will be retrieved from a Git repository defined in `git_source`.\n\n* `WORKSPACE`: The Python file is located in a \u003cDatabricks\u003e workspace or at a cloud filesystem URI.\n* `GIT`: The Python file is located in a remote Git repository.\n"
|
||||
},
|
||||
"warehouse_id": {
|
||||
"description": "ID of the SQL warehouse to connect to. If provided, we automatically generate and provide the profile and connection details to dbt. It can be overridden on a per-command basis by using the `--profiles-dir` command line argument."
|
||||
|
@ -959,13 +959,13 @@
|
|||
"description": "The number of volumes launched for each instance. Users can choose up to 10 volumes.\nThis feature is only enabled for supported node types. Legacy node types cannot specify\ncustom EBS volumes.\nFor node types with no instance store, at least one EBS volume needs to be specified;\notherwise, cluster creation will fail.\n\nThese EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc.\nInstance store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc.\n\nIf EBS volumes are attached, Databricks will configure Spark to use only the EBS volumes for\nscratch storage because heterogenously sized scratch devices can lead to inefficient disk\nutilization. If no EBS volumes are attached, Databricks will configure Spark to use instance\nstore volumes.\n\nPlease note that if EBS volumes are specified, then the Spark configuration `spark.local.dir`\nwill be overridden."
|
||||
},
|
||||
"ebs_volume_iops": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what IOPS to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_size": {
|
||||
"description": "The size of each EBS volume (in GiB) launched for each instance. For general purpose\nSSD, this value must be within the range 100 - 4096. For throughput optimized HDD,\nthis value must be within the range 500 - 4096."
|
||||
},
|
||||
"ebs_volume_throughput": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what throughput to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_type": {
|
||||
"description": ""
|
||||
|
@ -1269,7 +1269,7 @@
|
|||
"description": "The path of the notebook to be run in the Databricks workspace or remote repository.\nFor notebooks stored in the Databricks workspace, the path must be absolute and begin with a slash.\nFor notebooks stored in a remote repository, the path must be relative. This field is required.\n"
|
||||
},
|
||||
"source": {
|
||||
"description": "Optional location type of the project directory. When set to `WORKSPACE`, the project will be retrieved\nfrom the local \u003cDatabricks\u003e workspace. When set to `GIT`, the project will be retrieved from a Git repository\ndefined in `git_source`. If the value is empty, the task will use `GIT` if `git_source` is defined and `WORKSPACE` otherwise.\n\n* `WORKSPACE`: Project is located in \u003cDatabricks\u003e workspace.\n* `GIT`: Project is located in cloud Git provider.\n"
|
||||
"description": "Optional location type of the Python file. When set to `WORKSPACE` or not specified, the file will be retrieved\nfrom the local \u003cDatabricks\u003e workspace or cloud location (if the `python_file` has a URI format). When set to `GIT`,\nthe Python file will be retrieved from a Git repository defined in `git_source`.\n\n* `WORKSPACE`: The Python file is located in a \u003cDatabricks\u003e workspace or at a cloud filesystem URI.\n* `GIT`: The Python file is located in a remote Git repository.\n"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1371,7 +1371,7 @@
|
|||
"description": "The Python file to be executed. Cloud file URIs (such as dbfs:/, s3:/, adls:/, gcs:/) and workspace paths are supported. For python files stored in the Databricks workspace, the path must be absolute and begin with `/`. For files stored in a remote repository, the path must be relative. This field is required."
|
||||
},
|
||||
"source": {
|
||||
"description": "Optional location type of the project directory. When set to `WORKSPACE`, the project will be retrieved\nfrom the local \u003cDatabricks\u003e workspace. When set to `GIT`, the project will be retrieved from a Git repository\ndefined in `git_source`. If the value is empty, the task will use `GIT` if `git_source` is defined and `WORKSPACE` otherwise.\n\n* `WORKSPACE`: Project is located in \u003cDatabricks\u003e workspace.\n* `GIT`: Project is located in cloud Git provider.\n"
|
||||
"description": "Optional location type of the Python file. When set to `WORKSPACE` or not specified, the file will be retrieved\nfrom the local \u003cDatabricks\u003e workspace or cloud location (if the `python_file` has a URI format). When set to `GIT`,\nthe Python file will be retrieved from a Git repository defined in `git_source`.\n\n* `WORKSPACE`: The Python file is located in a \u003cDatabricks\u003e workspace or at a cloud filesystem URI.\n* `GIT`: The Python file is located in a remote Git repository.\n"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1449,7 +1449,7 @@
|
|||
"description": "Path of the SQL file. Must be relative if the source is a remote Git repository and absolute for workspace paths."
|
||||
},
|
||||
"source": {
|
||||
"description": "Optional location type of the project directory. When set to `WORKSPACE`, the project will be retrieved\nfrom the local \u003cDatabricks\u003e workspace. When set to `GIT`, the project will be retrieved from a Git repository\ndefined in `git_source`. If the value is empty, the task will use `GIT` if `git_source` is defined and `WORKSPACE` otherwise.\n\n* `WORKSPACE`: Project is located in \u003cDatabricks\u003e workspace.\n* `GIT`: Project is located in cloud Git provider.\n"
|
||||
"description": "Optional location type of the Python file. When set to `WORKSPACE` or not specified, the file will be retrieved\nfrom the local \u003cDatabricks\u003e workspace or cloud location (if the `python_file` has a URI format). When set to `GIT`,\nthe Python file will be retrieved from a Git repository defined in `git_source`.\n\n* `WORKSPACE`: The Python file is located in a \u003cDatabricks\u003e workspace or at a cloud filesystem URI.\n* `GIT`: The Python file is located in a remote Git repository.\n"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1551,7 +1551,7 @@
|
|||
}
|
||||
},
|
||||
"pause_status": {
|
||||
"description": "Indicate whether this schedule is paused or not."
|
||||
"description": "Whether this trigger is paused or not."
|
||||
},
|
||||
"table": {
|
||||
"description": "Table trigger settings.",
|
||||
|
@ -2061,13 +2061,13 @@
|
|||
"description": "The number of volumes launched for each instance. Users can choose up to 10 volumes.\nThis feature is only enabled for supported node types. Legacy node types cannot specify\ncustom EBS volumes.\nFor node types with no instance store, at least one EBS volume needs to be specified;\notherwise, cluster creation will fail.\n\nThese EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc.\nInstance store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc.\n\nIf EBS volumes are attached, Databricks will configure Spark to use only the EBS volumes for\nscratch storage because heterogenously sized scratch devices can lead to inefficient disk\nutilization. If no EBS volumes are attached, Databricks will configure Spark to use instance\nstore volumes.\n\nPlease note that if EBS volumes are specified, then the Spark configuration `spark.local.dir`\nwill be overridden."
|
||||
},
|
||||
"ebs_volume_iops": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what IOPS to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_size": {
|
||||
"description": "The size of each EBS volume (in GiB) launched for each instance. For general purpose\nSSD, this value must be within the range 100 - 4096. For throughput optimized HDD,\nthis value must be within the range 500 - 4096."
|
||||
},
|
||||
"ebs_volume_throughput": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what throughput to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_type": {
|
||||
"description": ""
|
||||
|
@ -2726,7 +2726,7 @@
|
|||
"description": "An optional continuous property for this job. The continuous property will ensure that there is always one run executing. Only one of `schedule` and `continuous` can be used.",
|
||||
"properties": {
|
||||
"pause_status": {
|
||||
"description": "Indicate whether this schedule is paused or not."
|
||||
"description": "Whether this trigger is paused or not."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2884,13 +2884,13 @@
|
|||
"description": "The number of volumes launched for each instance. Users can choose up to 10 volumes.\nThis feature is only enabled for supported node types. Legacy node types cannot specify\ncustom EBS volumes.\nFor node types with no instance store, at least one EBS volume needs to be specified;\notherwise, cluster creation will fail.\n\nThese EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc.\nInstance store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc.\n\nIf EBS volumes are attached, Databricks will configure Spark to use only the EBS volumes for\nscratch storage because heterogenously sized scratch devices can lead to inefficient disk\nutilization. If no EBS volumes are attached, Databricks will configure Spark to use instance\nstore volumes.\n\nPlease note that if EBS volumes are specified, then the Spark configuration `spark.local.dir`\nwill be overridden."
|
||||
},
|
||||
"ebs_volume_iops": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what IOPS to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_size": {
|
||||
"description": "The size of each EBS volume (in GiB) launched for each instance. For general purpose\nSSD, this value must be within the range 100 - 4096. For throughput optimized HDD,\nthis value must be within the range 500 - 4096."
|
||||
},
|
||||
"ebs_volume_throughput": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what throughput to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_type": {
|
||||
"description": ""
|
||||
|
@ -3258,7 +3258,7 @@
|
|||
"description": "An optional periodic schedule for this job. The default behavior is that the job only runs when triggered by clicking “Run Now” in the Jobs UI or sending an API request to `runNow`.",
|
||||
"properties": {
|
||||
"pause_status": {
|
||||
"description": "Indicate whether this schedule is paused or not."
|
||||
"description": "Whether this trigger is paused or not."
|
||||
},
|
||||
"quartz_cron_expression": {
|
||||
"description": "A Cron expression using Quartz syntax that describes the schedule for a job.\nSee [Cron Trigger](http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html)\nfor details. This field is required.\"\n"
|
||||
|
@ -3318,7 +3318,7 @@
|
|||
"description": "Optional schema to write to. This parameter is only used when a warehouse_id is also provided. If not provided, the `default` schema is used."
|
||||
},
|
||||
"source": {
|
||||
"description": "Optional location type of the project directory. When set to `WORKSPACE`, the project will be retrieved\nfrom the local \u003cDatabricks\u003e workspace. When set to `GIT`, the project will be retrieved from a Git repository\ndefined in `git_source`. If the value is empty, the task will use `GIT` if `git_source` is defined and `WORKSPACE` otherwise.\n\n* `WORKSPACE`: Project is located in \u003cDatabricks\u003e workspace.\n* `GIT`: Project is located in cloud Git provider.\n"
|
||||
"description": "Optional location type of the Python file. When set to `WORKSPACE` or not specified, the file will be retrieved\nfrom the local \u003cDatabricks\u003e workspace or cloud location (if the `python_file` has a URI format). When set to `GIT`,\nthe Python file will be retrieved from a Git repository defined in `git_source`.\n\n* `WORKSPACE`: The Python file is located in a \u003cDatabricks\u003e workspace or at a cloud filesystem URI.\n* `GIT`: The Python file is located in a remote Git repository.\n"
|
||||
},
|
||||
"warehouse_id": {
|
||||
"description": "ID of the SQL warehouse to connect to. If provided, we automatically generate and provide the profile and connection details to dbt. It can be overridden on a per-command basis by using the `--profiles-dir` command line argument."
|
||||
|
@ -3492,13 +3492,13 @@
|
|||
"description": "The number of volumes launched for each instance. Users can choose up to 10 volumes.\nThis feature is only enabled for supported node types. Legacy node types cannot specify\ncustom EBS volumes.\nFor node types with no instance store, at least one EBS volume needs to be specified;\notherwise, cluster creation will fail.\n\nThese EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc.\nInstance store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc.\n\nIf EBS volumes are attached, Databricks will configure Spark to use only the EBS volumes for\nscratch storage because heterogenously sized scratch devices can lead to inefficient disk\nutilization. If no EBS volumes are attached, Databricks will configure Spark to use instance\nstore volumes.\n\nPlease note that if EBS volumes are specified, then the Spark configuration `spark.local.dir`\nwill be overridden."
|
||||
},
|
||||
"ebs_volume_iops": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what IOPS to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_size": {
|
||||
"description": "The size of each EBS volume (in GiB) launched for each instance. For general purpose\nSSD, this value must be within the range 100 - 4096. For throughput optimized HDD,\nthis value must be within the range 500 - 4096."
|
||||
},
|
||||
"ebs_volume_throughput": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what throughput to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_type": {
|
||||
"description": ""
|
||||
|
@ -3802,7 +3802,7 @@
|
|||
"description": "The path of the notebook to be run in the Databricks workspace or remote repository.\nFor notebooks stored in the Databricks workspace, the path must be absolute and begin with a slash.\nFor notebooks stored in a remote repository, the path must be relative. This field is required.\n"
|
||||
},
|
||||
"source": {
|
||||
"description": "Optional location type of the project directory. When set to `WORKSPACE`, the project will be retrieved\nfrom the local \u003cDatabricks\u003e workspace. When set to `GIT`, the project will be retrieved from a Git repository\ndefined in `git_source`. If the value is empty, the task will use `GIT` if `git_source` is defined and `WORKSPACE` otherwise.\n\n* `WORKSPACE`: Project is located in \u003cDatabricks\u003e workspace.\n* `GIT`: Project is located in cloud Git provider.\n"
|
||||
"description": "Optional location type of the Python file. When set to `WORKSPACE` or not specified, the file will be retrieved\nfrom the local \u003cDatabricks\u003e workspace or cloud location (if the `python_file` has a URI format). When set to `GIT`,\nthe Python file will be retrieved from a Git repository defined in `git_source`.\n\n* `WORKSPACE`: The Python file is located in a \u003cDatabricks\u003e workspace or at a cloud filesystem URI.\n* `GIT`: The Python file is located in a remote Git repository.\n"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3904,7 +3904,7 @@
|
|||
"description": "The Python file to be executed. Cloud file URIs (such as dbfs:/, s3:/, adls:/, gcs:/) and workspace paths are supported. For python files stored in the Databricks workspace, the path must be absolute and begin with `/`. For files stored in a remote repository, the path must be relative. This field is required."
|
||||
},
|
||||
"source": {
|
||||
"description": "Optional location type of the project directory. When set to `WORKSPACE`, the project will be retrieved\nfrom the local \u003cDatabricks\u003e workspace. When set to `GIT`, the project will be retrieved from a Git repository\ndefined in `git_source`. If the value is empty, the task will use `GIT` if `git_source` is defined and `WORKSPACE` otherwise.\n\n* `WORKSPACE`: Project is located in \u003cDatabricks\u003e workspace.\n* `GIT`: Project is located in cloud Git provider.\n"
|
||||
"description": "Optional location type of the Python file. When set to `WORKSPACE` or not specified, the file will be retrieved\nfrom the local \u003cDatabricks\u003e workspace or cloud location (if the `python_file` has a URI format). When set to `GIT`,\nthe Python file will be retrieved from a Git repository defined in `git_source`.\n\n* `WORKSPACE`: The Python file is located in a \u003cDatabricks\u003e workspace or at a cloud filesystem URI.\n* `GIT`: The Python file is located in a remote Git repository.\n"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3982,7 +3982,7 @@
|
|||
"description": "Path of the SQL file. Must be relative if the source is a remote Git repository and absolute for workspace paths."
|
||||
},
|
||||
"source": {
|
||||
"description": "Optional location type of the project directory. When set to `WORKSPACE`, the project will be retrieved\nfrom the local \u003cDatabricks\u003e workspace. When set to `GIT`, the project will be retrieved from a Git repository\ndefined in `git_source`. If the value is empty, the task will use `GIT` if `git_source` is defined and `WORKSPACE` otherwise.\n\n* `WORKSPACE`: Project is located in \u003cDatabricks\u003e workspace.\n* `GIT`: Project is located in cloud Git provider.\n"
|
||||
"description": "Optional location type of the Python file. When set to `WORKSPACE` or not specified, the file will be retrieved\nfrom the local \u003cDatabricks\u003e workspace or cloud location (if the `python_file` has a URI format). When set to `GIT`,\nthe Python file will be retrieved from a Git repository defined in `git_source`.\n\n* `WORKSPACE`: The Python file is located in a \u003cDatabricks\u003e workspace or at a cloud filesystem URI.\n* `GIT`: The Python file is located in a remote Git repository.\n"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4084,7 +4084,7 @@
|
|||
}
|
||||
},
|
||||
"pause_status": {
|
||||
"description": "Indicate whether this schedule is paused or not."
|
||||
"description": "Whether this trigger is paused or not."
|
||||
},
|
||||
"table": {
|
||||
"description": "Table trigger settings.",
|
||||
|
@ -4594,13 +4594,13 @@
|
|||
"description": "The number of volumes launched for each instance. Users can choose up to 10 volumes.\nThis feature is only enabled for supported node types. Legacy node types cannot specify\ncustom EBS volumes.\nFor node types with no instance store, at least one EBS volume needs to be specified;\notherwise, cluster creation will fail.\n\nThese EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc.\nInstance store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc.\n\nIf EBS volumes are attached, Databricks will configure Spark to use only the EBS volumes for\nscratch storage because heterogenously sized scratch devices can lead to inefficient disk\nutilization. If no EBS volumes are attached, Databricks will configure Spark to use instance\nstore volumes.\n\nPlease note that if EBS volumes are specified, then the Spark configuration `spark.local.dir`\nwill be overridden."
|
||||
},
|
||||
"ebs_volume_iops": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what IOPS to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_size": {
|
||||
"description": "The size of each EBS volume (in GiB) launched for each instance. For general purpose\nSSD, this value must be within the range 100 - 4096. For throughput optimized HDD,\nthis value must be within the range 500 - 4096."
|
||||
},
|
||||
"ebs_volume_throughput": {
|
||||
"description": "\u003cneeds content added\u003e"
|
||||
"description": "If using gp3 volumes, what throughput to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used."
|
||||
},
|
||||
"ebs_volume_type": {
|
||||
"description": ""
|
||||
|
|
|
@ -29,6 +29,11 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newGetAssignableRolesForResource())
|
||||
cmd.AddCommand(newGetRuleSet())
|
||||
cmd.AddCommand(newUpdateRuleSet())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -97,12 +102,6 @@ func newGetAssignableRolesForResource() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetAssignableRolesForResource())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-rule-set command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -172,12 +171,6 @@ func newGetRuleSet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetRuleSet())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-rule-set command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -239,10 +232,4 @@ func newUpdateRuleSet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdateRuleSet())
|
||||
})
|
||||
}
|
||||
|
||||
// end service AccountAccessControl
|
||||
|
|
|
@ -25,6 +25,9 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newDownload())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -107,10 +110,4 @@ func newDownload() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDownload())
|
||||
})
|
||||
}
|
||||
|
||||
// end service BillableUsage
|
||||
|
|
|
@ -31,6 +31,13 @@ func New() *cobra.Command {
|
|||
Hidden: true,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -98,12 +105,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -174,12 +175,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -251,12 +246,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -297,12 +286,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -372,10 +355,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Budgets
|
||||
|
|
|
@ -31,6 +31,12 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -111,12 +117,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -189,12 +189,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -266,12 +260,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -315,10 +303,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Credentials
|
||||
|
|
|
@ -0,0 +1,159 @@
|
|||
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
|
||||
|
||||
package csp_enablement_account
|
||||
|
||||
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/settings"
|
||||
"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: "csp-enablement-account",
|
||||
Short: `The compliance security profile settings at the account level control whether to enable it for new workspaces.`,
|
||||
Long: `The compliance security profile settings at the account level control whether
|
||||
to enable it for new workspaces. By default, this account-level setting is
|
||||
disabled for new workspaces. After workspace creation, account admins can
|
||||
enable the compliance security profile individually for each workspace.
|
||||
|
||||
This settings can be disabled so that new workspaces do not have compliance
|
||||
security profile enabled by default.`,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start get 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 getOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.GetCspEnablementAccountRequest,
|
||||
)
|
||||
|
||||
func newGet() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var getReq settings.GetCspEnablementAccountRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&getReq.Etag, "etag", getReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "get"
|
||||
cmd.Short = `Get the compliance security profile setting for new workspaces.`
|
||||
cmd.Long = `Get the compliance security profile setting for new workspaces.
|
||||
|
||||
Gets the compliance security profile setting for new workspaces.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustAccountClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
a := root.AccountClient(ctx)
|
||||
|
||||
response, err := a.Settings.CspEnablementAccount().Get(ctx, getReq)
|
||||
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 getOverrides {
|
||||
fn(cmd, &getReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start update 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 updateOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.UpdateCspEnablementAccountSettingRequest,
|
||||
)
|
||||
|
||||
func newUpdate() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var updateReq settings.UpdateCspEnablementAccountSettingRequest
|
||||
var updateJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&updateJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "update"
|
||||
cmd.Short = `Update the compliance security profile setting for new workspaces.`
|
||||
cmd.Long = `Update the compliance security profile setting for new workspaces.
|
||||
|
||||
Updates the value of the compliance security profile setting for new
|
||||
workspaces.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.PreRunE = root.MustAccountClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
a := root.AccountClient(ctx)
|
||||
|
||||
if cmd.Flags().Changed("json") {
|
||||
err = updateJson.Unmarshal(&updateReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := a.Settings.CspEnablementAccount().Update(ctx, updateReq)
|
||||
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 updateOverrides {
|
||||
fn(cmd, &updateReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// end service CSPEnablementAccount
|
|
@ -29,6 +29,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -103,12 +110,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -168,12 +169,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -232,12 +227,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -278,12 +267,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -354,10 +337,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service CustomAppIntegration
|
||||
|
|
|
@ -42,6 +42,12 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -128,12 +134,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -193,12 +193,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -271,12 +265,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -331,10 +319,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service EncryptionKeys
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
|
||||
|
||||
package esm_enablement_account
|
||||
|
||||
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/settings"
|
||||
"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: "esm-enablement-account",
|
||||
Short: `The enhanced security monitoring setting at the account level controls whether to enable the feature on new workspaces.`,
|
||||
Long: `The enhanced security monitoring setting at the account level controls whether
|
||||
to enable the feature on new workspaces. By default, this account-level
|
||||
setting is disabled for new workspaces. After workspace creation, account
|
||||
admins can enable enhanced security monitoring individually for each
|
||||
workspace.`,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start get 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 getOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.GetEsmEnablementAccountRequest,
|
||||
)
|
||||
|
||||
func newGet() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var getReq settings.GetEsmEnablementAccountRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&getReq.Etag, "etag", getReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "get"
|
||||
cmd.Short = `Get the enhanced security monitoring setting for new workspaces.`
|
||||
cmd.Long = `Get the enhanced security monitoring setting for new workspaces.
|
||||
|
||||
Gets the enhanced security monitoring setting for new workspaces.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustAccountClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
a := root.AccountClient(ctx)
|
||||
|
||||
response, err := a.Settings.EsmEnablementAccount().Get(ctx, getReq)
|
||||
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 getOverrides {
|
||||
fn(cmd, &getReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start update 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 updateOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.UpdateEsmEnablementAccountSettingRequest,
|
||||
)
|
||||
|
||||
func newUpdate() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var updateReq settings.UpdateEsmEnablementAccountSettingRequest
|
||||
var updateJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&updateJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "update"
|
||||
cmd.Short = `Update the enhanced security monitoring setting for new workspaces.`
|
||||
cmd.Long = `Update the enhanced security monitoring setting for new workspaces.
|
||||
|
||||
Updates the value of the enhanced security monitoring setting for new
|
||||
workspaces.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.PreRunE = root.MustAccountClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
a := root.AccountClient(ctx)
|
||||
|
||||
if cmd.Flags().Changed("json") {
|
||||
err = updateJson.Unmarshal(&updateReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := a.Settings.EsmEnablementAccount().Update(ctx, updateReq)
|
||||
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 updateOverrides {
|
||||
fn(cmd, &updateReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// end service ESMEnablementAccount
|
|
@ -33,6 +33,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newPatch())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -114,12 +122,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -190,12 +192,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -266,12 +262,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -330,12 +320,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start patch command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -417,12 +401,6 @@ func newPatch() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPatch())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -511,10 +489,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service AccountGroups
|
||||
|
|
|
@ -48,6 +48,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newReplace())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -158,12 +166,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -234,12 +236,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -310,12 +306,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -355,12 +345,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start replace command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -468,12 +452,6 @@ func newReplace() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newReplace())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -570,10 +548,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service AccountIpAccessLists
|
||||
|
|
|
@ -85,6 +85,12 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newPatchStatus())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -181,12 +187,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -258,12 +258,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -319,12 +313,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start patch-status command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -413,10 +401,4 @@ func newPatchStatus() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPatchStatus())
|
||||
})
|
||||
}
|
||||
|
||||
// end service LogDelivery
|
||||
|
|
|
@ -27,6 +27,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -108,12 +115,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -178,12 +179,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -248,12 +243,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -310,12 +299,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -390,10 +373,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service AccountMetastoreAssignments
|
||||
|
|
|
@ -26,6 +26,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -98,12 +105,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -164,12 +165,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -228,12 +223,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -273,12 +262,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -347,10 +330,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service AccountMetastores
|
||||
|
|
|
@ -21,20 +21,23 @@ func New() *cobra.Command {
|
|||
Use: "network-connectivity",
|
||||
Short: `These APIs provide configurations for the network connectivity of your workspaces for serverless compute resources.`,
|
||||
Long: `These APIs provide configurations for the network connectivity of your
|
||||
workspaces for serverless compute resources. This API provides stable subnets
|
||||
for your workspace so that you can configure your firewalls on your Azure
|
||||
Storage accounts to allow access from Databricks. You can also use the API to
|
||||
provision private endpoints for Databricks to privately connect serverless
|
||||
compute resources to your Azure resources using Azure Private Link. See
|
||||
[configure serverless secure connectivity].
|
||||
|
||||
[configure serverless secure connectivity]: https://learn.microsoft.com/azure/databricks/security/network/serverless-network-security`,
|
||||
workspaces for serverless compute resources.`,
|
||||
GroupID: "settings",
|
||||
Annotations: map[string]string{
|
||||
"package": "settings",
|
||||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreateNetworkConnectivityConfiguration())
|
||||
cmd.AddCommand(newCreatePrivateEndpointRule())
|
||||
cmd.AddCommand(newDeleteNetworkConnectivityConfiguration())
|
||||
cmd.AddCommand(newDeletePrivateEndpointRule())
|
||||
cmd.AddCommand(newGetNetworkConnectivityConfiguration())
|
||||
cmd.AddCommand(newGetPrivateEndpointRule())
|
||||
cmd.AddCommand(newListNetworkConnectivityConfigurations())
|
||||
cmd.AddCommand(newListPrivateEndpointRules())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -65,28 +68,13 @@ func newCreateNetworkConnectivityConfiguration() *cobra.Command {
|
|||
cmd.Short = `Create a network connectivity configuration.`
|
||||
cmd.Long = `Create a network connectivity configuration.
|
||||
|
||||
Creates a network connectivity configuration (NCC), which provides stable
|
||||
Azure service subnets when accessing your Azure Storage accounts. You can also
|
||||
use a network connectivity configuration to create Databricks-managed private
|
||||
endpoints so that Databricks serverless compute resources privately access
|
||||
your resources.
|
||||
|
||||
**IMPORTANT**: After you create the network connectivity configuration, you
|
||||
must assign one or more workspaces to the new network connectivity
|
||||
configuration. You can share one network connectivity configuration with
|
||||
multiple workspaces from the same Azure region within the same Databricks
|
||||
account. See [configure serverless secure connectivity].
|
||||
|
||||
[configure serverless secure connectivity]: https://learn.microsoft.com/azure/databricks/security/network/serverless-network-security
|
||||
|
||||
Arguments:
|
||||
NAME: The name of the network connectivity configuration. The name can contain
|
||||
alphanumeric characters, hyphens, and underscores. The length must be
|
||||
between 3 and 30 characters. The name must match the regular expression
|
||||
^[0-9a-zA-Z-_]{3,30}$.
|
||||
REGION: The Azure region for this network connectivity configuration. Only
|
||||
workspaces in the same Azure region can be attached to this network
|
||||
connectivity configuration.`
|
||||
REGION: The region for the network connectivity configuration. Only workspaces in
|
||||
the same region can be attached to the network connectivity configuration.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
|
@ -139,12 +127,6 @@ func newCreateNetworkConnectivityConfiguration() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateNetworkConnectivityConfiguration())
|
||||
})
|
||||
}
|
||||
|
||||
// start create-private-endpoint-rule command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -240,12 +222,6 @@ func newCreatePrivateEndpointRule() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreatePrivateEndpointRule())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-network-connectivity-configuration command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -304,12 +280,6 @@ func newDeleteNetworkConnectivityConfiguration() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteNetworkConnectivityConfiguration())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-private-endpoint-rule command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -374,12 +344,6 @@ func newDeletePrivateEndpointRule() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeletePrivateEndpointRule())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-network-connectivity-configuration command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -438,12 +402,6 @@ func newGetNetworkConnectivityConfiguration() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetNetworkConnectivityConfiguration())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-private-endpoint-rule command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -504,12 +462,6 @@ func newGetPrivateEndpointRule() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPrivateEndpointRule())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-network-connectivity-configurations command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -562,12 +514,6 @@ func newListNetworkConnectivityConfigurations() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListNetworkConnectivityConfigurations())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-private-endpoint-rules command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -625,10 +571,4 @@ func newListPrivateEndpointRules() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListPrivateEndpointRules())
|
||||
})
|
||||
}
|
||||
|
||||
// end service NetworkConnectivity
|
||||
|
|
|
@ -28,6 +28,12 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -119,12 +125,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -200,12 +200,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -277,12 +271,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -329,10 +317,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Networks
|
||||
|
|
|
@ -27,6 +27,9 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -88,10 +91,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service OAuthPublishedApps
|
||||
|
|
|
@ -0,0 +1,219 @@
|
|||
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
|
||||
|
||||
package personal_compute
|
||||
|
||||
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/settings"
|
||||
"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: "personal-compute",
|
||||
Short: `The Personal Compute enablement setting lets you control which users can use the Personal Compute default policy to create compute resources.`,
|
||||
Long: `The Personal Compute enablement setting lets you control which users can use
|
||||
the Personal Compute default policy to create compute resources. By default
|
||||
all users in all workspaces have access (ON), but you can change the setting
|
||||
to instead let individual workspaces configure access control (DELEGATE).
|
||||
|
||||
There is only one instance of this setting per account. Since this setting has
|
||||
a default value, this setting is present on all accounts even though it's
|
||||
never set on a given account. Deletion reverts the value of the setting back
|
||||
to the default value.`,
|
||||
|
||||
// This service is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start delete 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 deleteOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.DeletePersonalComputeRequest,
|
||||
)
|
||||
|
||||
func newDelete() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var deleteReq settings.DeletePersonalComputeRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&deleteReq.Etag, "etag", deleteReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "delete"
|
||||
cmd.Short = `Delete Personal Compute setting.`
|
||||
cmd.Long = `Delete Personal Compute setting.
|
||||
|
||||
Reverts back the Personal Compute setting value to default (ON)`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustAccountClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
a := root.AccountClient(ctx)
|
||||
|
||||
response, err := a.Settings.PersonalCompute().Delete(ctx, deleteReq)
|
||||
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 deleteOverrides {
|
||||
fn(cmd, &deleteReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start get 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 getOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.GetPersonalComputeRequest,
|
||||
)
|
||||
|
||||
func newGet() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var getReq settings.GetPersonalComputeRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&getReq.Etag, "etag", getReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "get"
|
||||
cmd.Short = `Get Personal Compute setting.`
|
||||
cmd.Long = `Get Personal Compute setting.
|
||||
|
||||
Gets the value of the Personal Compute setting.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustAccountClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
a := root.AccountClient(ctx)
|
||||
|
||||
response, err := a.Settings.PersonalCompute().Get(ctx, getReq)
|
||||
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 getOverrides {
|
||||
fn(cmd, &getReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start update 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 updateOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.UpdatePersonalComputeSettingRequest,
|
||||
)
|
||||
|
||||
func newUpdate() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var updateReq settings.UpdatePersonalComputeSettingRequest
|
||||
var updateJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&updateJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "update"
|
||||
cmd.Short = `Update Personal Compute setting.`
|
||||
cmd.Long = `Update Personal Compute setting.
|
||||
|
||||
Updates the value of the Personal Compute setting.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.PreRunE = root.MustAccountClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
a := root.AccountClient(ctx)
|
||||
|
||||
if cmd.Flags().Changed("json") {
|
||||
err = updateJson.Unmarshal(&updateReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := a.Settings.PersonalCompute().Update(ctx, updateReq)
|
||||
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 updateOverrides {
|
||||
fn(cmd, &updateReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// end service PersonalCompute
|
|
@ -27,6 +27,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newReplace())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -133,12 +140,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -216,12 +217,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -299,12 +294,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -348,12 +337,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start replace command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -460,10 +443,4 @@ func newReplace() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newReplace())
|
||||
})
|
||||
}
|
||||
|
||||
// end service PrivateAccess
|
||||
|
|
|
@ -27,6 +27,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -103,12 +110,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -168,12 +169,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -232,12 +227,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -278,12 +267,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -353,10 +336,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service PublishedAppIntegration
|
||||
|
|
|
@ -38,6 +38,11 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -107,12 +112,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -176,12 +175,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -242,10 +235,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service ServicePrincipalSecrets
|
||||
|
|
|
@ -32,6 +32,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newPatch())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -112,12 +120,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -188,12 +190,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -265,12 +261,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -329,12 +319,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start patch command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -417,12 +401,6 @@ func newPatch() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPatch())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -513,10 +491,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service AccountServicePrincipals
|
||||
|
|
|
@ -3,13 +3,11 @@
|
|||
package settings
|
||||
|
||||
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/settings"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
csp_enablement_account "github.com/databricks/cli/cmd/account/csp-enablement-account"
|
||||
esm_enablement_account "github.com/databricks/cli/cmd/account/esm-enablement-account"
|
||||
personal_compute "github.com/databricks/cli/cmd/account/personal-compute"
|
||||
)
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -18,26 +16,20 @@ var cmdOverrides []func(*cobra.Command)
|
|||
|
||||
func New() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "settings",
|
||||
Short: `The Personal Compute enablement setting lets you control which users can use the Personal Compute default policy to create compute resources.`,
|
||||
Long: `The Personal Compute enablement setting lets you control which users can use
|
||||
the Personal Compute default policy to create compute resources. By default
|
||||
all users in all workspaces have access (ON), but you can change the setting
|
||||
to instead let individual workspaces configure access control (DELEGATE).
|
||||
|
||||
There is only one instance of this setting per account. Since this setting has
|
||||
a default value, this setting is present on all accounts even though it's
|
||||
never set on a given account. Deletion reverts the value of the setting back
|
||||
to the default value.`,
|
||||
Use: "settings",
|
||||
Short: `Accounts Settings API allows users to manage settings at the account level.`,
|
||||
Long: `Accounts Settings API allows users to manage settings at the account level.`,
|
||||
GroupID: "settings",
|
||||
Annotations: map[string]string{
|
||||
"package": "settings",
|
||||
},
|
||||
|
||||
// This service is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
// Add subservices
|
||||
cmd.AddCommand(csp_enablement_account.New())
|
||||
cmd.AddCommand(esm_enablement_account.New())
|
||||
cmd.AddCommand(personal_compute.New())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -46,191 +38,4 @@ func New() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
// start delete-personal-compute-setting 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 deletePersonalComputeSettingOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.DeletePersonalComputeSettingRequest,
|
||||
)
|
||||
|
||||
func newDeletePersonalComputeSetting() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var deletePersonalComputeSettingReq settings.DeletePersonalComputeSettingRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&deletePersonalComputeSettingReq.Etag, "etag", deletePersonalComputeSettingReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "delete-personal-compute-setting"
|
||||
cmd.Short = `Delete Personal Compute setting.`
|
||||
cmd.Long = `Delete Personal Compute setting.
|
||||
|
||||
Reverts back the Personal Compute setting value to default (ON)`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustAccountClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
a := root.AccountClient(ctx)
|
||||
|
||||
response, err := a.Settings.DeletePersonalComputeSetting(ctx, deletePersonalComputeSettingReq)
|
||||
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 deletePersonalComputeSettingOverrides {
|
||||
fn(cmd, &deletePersonalComputeSettingReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeletePersonalComputeSetting())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-personal-compute-setting 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 getPersonalComputeSettingOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.GetPersonalComputeSettingRequest,
|
||||
)
|
||||
|
||||
func newGetPersonalComputeSetting() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var getPersonalComputeSettingReq settings.GetPersonalComputeSettingRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&getPersonalComputeSettingReq.Etag, "etag", getPersonalComputeSettingReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "get-personal-compute-setting"
|
||||
cmd.Short = `Get Personal Compute setting.`
|
||||
cmd.Long = `Get Personal Compute setting.
|
||||
|
||||
Gets the value of the Personal Compute setting.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
cmd.PreRunE = root.MustAccountClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
a := root.AccountClient(ctx)
|
||||
|
||||
response, err := a.Settings.GetPersonalComputeSetting(ctx, getPersonalComputeSettingReq)
|
||||
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 getPersonalComputeSettingOverrides {
|
||||
fn(cmd, &getPersonalComputeSettingReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPersonalComputeSetting())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-personal-compute-setting 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 updatePersonalComputeSettingOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.UpdatePersonalComputeSettingRequest,
|
||||
)
|
||||
|
||||
func newUpdatePersonalComputeSetting() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var updatePersonalComputeSettingReq settings.UpdatePersonalComputeSettingRequest
|
||||
var updatePersonalComputeSettingJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&updatePersonalComputeSettingJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "update-personal-compute-setting"
|
||||
cmd.Short = `Update Personal Compute setting.`
|
||||
cmd.Long = `Update Personal Compute setting.
|
||||
|
||||
Updates the value of the Personal Compute setting.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.PreRunE = root.MustAccountClient
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
|
||||
ctx := cmd.Context()
|
||||
a := root.AccountClient(ctx)
|
||||
|
||||
if cmd.Flags().Changed("json") {
|
||||
err = updatePersonalComputeSettingJson.Unmarshal(&updatePersonalComputeSettingReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := a.Settings.UpdatePersonalComputeSetting(ctx, updatePersonalComputeSettingReq)
|
||||
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 updatePersonalComputeSettingOverrides {
|
||||
fn(cmd, &updatePersonalComputeSettingReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePersonalComputeSetting())
|
||||
})
|
||||
}
|
||||
|
||||
// end service AccountSettings
|
||||
|
|
|
@ -25,6 +25,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -107,12 +114,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -176,12 +177,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -244,12 +239,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -309,12 +298,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -387,10 +370,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service AccountStorageCredentials
|
||||
|
|
|
@ -32,6 +32,12 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -108,12 +114,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -185,12 +185,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -261,12 +255,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -310,10 +298,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Storage
|
||||
|
|
|
@ -37,6 +37,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newPatch())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -120,12 +128,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -197,12 +199,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -281,12 +277,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -345,12 +335,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start patch command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -433,12 +417,6 @@ func newPatch() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPatch())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -530,10 +508,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service AccountUsers
|
||||
|
|
|
@ -27,6 +27,12 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -126,12 +132,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -210,12 +210,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -290,12 +284,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -343,10 +331,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service VpcEndpoints
|
||||
|
|
|
@ -28,6 +28,12 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -103,12 +109,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -170,12 +170,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -235,12 +229,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -318,10 +306,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service WorkspaceAssignment
|
||||
|
|
|
@ -35,6 +35,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -166,12 +173,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -252,12 +253,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -344,12 +339,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -396,12 +385,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -429,7 +412,7 @@ func newUpdate() *cobra.Command {
|
|||
cmd.Flags().StringVar(&updateReq.CredentialsId, "credentials-id", updateReq.CredentialsId, `ID of the workspace's credential configuration object.`)
|
||||
// TODO: map via StringToStringVar: custom_tags
|
||||
cmd.Flags().StringVar(&updateReq.ManagedServicesCustomerManagedKeyId, "managed-services-customer-managed-key-id", updateReq.ManagedServicesCustomerManagedKeyId, `The ID of the workspace's managed services encryption key configuration object.`)
|
||||
cmd.Flags().StringVar(&updateReq.NetworkConnectivityConfigId, "network-connectivity-config-id", updateReq.NetworkConnectivityConfigId, `The ID of the network connectivity configuration object, which is the parent resource of this private endpoint rule object.`)
|
||||
cmd.Flags().StringVar(&updateReq.NetworkConnectivityConfigId, "network-connectivity-config-id", updateReq.NetworkConnectivityConfigId, ``)
|
||||
cmd.Flags().StringVar(&updateReq.NetworkId, "network-id", updateReq.NetworkId, `The ID of the workspace's network configuration object.`)
|
||||
cmd.Flags().StringVar(&updateReq.StorageConfigurationId, "storage-configuration-id", updateReq.StorageConfigurationId, `The ID of the workspace's storage configuration object.`)
|
||||
cmd.Flags().StringVar(&updateReq.StorageCustomerManagedKeyId, "storage-customer-managed-key-id", updateReq.StorageCustomerManagedKeyId, `The ID of the key configuration object for workspace storage.`)
|
||||
|
@ -464,7 +447,12 @@ func newUpdate() *cobra.Command {
|
|||
workspace to add support for front-end, back-end, or both types of
|
||||
connectivity. You cannot remove (downgrade) any existing front-end or back-end
|
||||
PrivateLink support on a workspace. - Custom tags. Given you provide an empty
|
||||
custom tags, the update would not be applied.
|
||||
custom tags, the update would not be applied. - Network connectivity
|
||||
configuration ID to add serverless stable IP support. You can add or update
|
||||
the network connectivity configuration ID to ensure the workspace uses the
|
||||
same set of stable IP CIDR blocks to access your resources. You cannot remove
|
||||
a network connectivity configuration from the workspace once attached, you can
|
||||
only switch to another one.
|
||||
|
||||
After calling the PATCH operation to update the workspace configuration,
|
||||
make repeated GET requests with the workspace ID and check the workspace
|
||||
|
@ -476,25 +464,22 @@ func newUpdate() *cobra.Command {
|
|||
### Update a running workspace You can update a Databricks workspace
|
||||
configuration for running workspaces for some fields, but not all fields. For
|
||||
a running workspace, this request supports updating the following fields only:
|
||||
- Credential configuration ID
|
||||
|
||||
- Network configuration ID. Used only if you already use a customer-managed
|
||||
VPC. You cannot convert a running workspace from a Databricks-managed VPC to a
|
||||
customer-managed VPC. You can use a network configuration update in this API
|
||||
for a failed or running workspace to add support for PrivateLink, although you
|
||||
also need to add a private access settings object.
|
||||
|
||||
- Key configuration ID for managed services (control plane storage, such as
|
||||
notebook source and Databricks SQL queries). Databricks does not directly
|
||||
encrypt the data with the customer-managed key (CMK). Databricks uses both the
|
||||
CMK and the Databricks managed key (DMK) that is unique to your workspace to
|
||||
encrypt the Data Encryption Key (DEK). Databricks uses the DEK to encrypt your
|
||||
workspace's managed services persisted data. If the workspace does not already
|
||||
have a CMK for managed services, adding this ID enables managed services
|
||||
encryption for new or updated data. Existing managed services data that
|
||||
existed before adding the key remains not encrypted with the DEK until it is
|
||||
modified. If the workspace already has customer-managed keys for managed
|
||||
services, this request rotates (changes) the CMK keys and the DEK is
|
||||
- Credential configuration ID - Network configuration ID. Used only if you
|
||||
already use a customer-managed VPC. You cannot convert a running workspace
|
||||
from a Databricks-managed VPC to a customer-managed VPC. You can use a network
|
||||
configuration update in this API for a failed or running workspace to add
|
||||
support for PrivateLink, although you also need to add a private access
|
||||
settings object. - Key configuration ID for managed services (control plane
|
||||
storage, such as notebook source and Databricks SQL queries). Databricks does
|
||||
not directly encrypt the data with the customer-managed key (CMK). Databricks
|
||||
uses both the CMK and the Databricks managed key (DMK) that is unique to your
|
||||
workspace to encrypt the Data Encryption Key (DEK). Databricks uses the DEK to
|
||||
encrypt your workspace's managed services persisted data. If the workspace
|
||||
does not already have a CMK for managed services, adding this ID enables
|
||||
managed services encryption for new or updated data. Existing managed services
|
||||
data that existed before adding the key remains not encrypted with the DEK
|
||||
until it is modified. If the workspace already has customer-managed keys for
|
||||
managed services, this request rotates (changes) the CMK keys and the DEK is
|
||||
re-encrypted with the DMK and the new CMK. - Key configuration ID for
|
||||
workspace storage (root S3 bucket and, optionally, EBS volumes). You can set
|
||||
this only if the workspace does not already have a customer-managed key
|
||||
|
@ -503,7 +488,12 @@ func newUpdate() *cobra.Command {
|
|||
upgrade a workspace to add support for front-end, back-end, or both types of
|
||||
connectivity. You cannot remove (downgrade) any existing front-end or back-end
|
||||
PrivateLink support on a workspace. - Custom tags. Given you provide an empty
|
||||
custom tags, the update would not be applied.
|
||||
custom tags, the update would not be applied. - Network connectivity
|
||||
configuration ID to add serverless stable IP support. You can add or update
|
||||
the network connectivity configuration ID to ensure the workspace uses the
|
||||
same set of stable IP CIDR blocks to access your resources. You cannot remove
|
||||
a network connectivity configuration from the workspace once attached, you can
|
||||
only switch to another one.
|
||||
|
||||
**Important**: To update a running workspace, your workspace must have no
|
||||
running compute resources that run in your workspace's VPC in the Classic data
|
||||
|
@ -523,11 +513,9 @@ func newUpdate() *cobra.Command {
|
|||
This results in a total of up to 40 minutes in which you cannot create
|
||||
clusters. If you create or use clusters before this time interval elapses,
|
||||
clusters do not launch successfully, fail, or could cause other unexpected
|
||||
behavior.
|
||||
|
||||
* For workspaces with a customer-managed VPC, the workspace status stays at
|
||||
status RUNNING and the VPC change happens immediately. A change to the
|
||||
storage customer-managed key configuration ID might take a few minutes to
|
||||
behavior. * For workspaces with a customer-managed VPC, the workspace status
|
||||
stays at status RUNNING and the VPC change happens immediately. A change to
|
||||
the storage customer-managed key configuration ID might take a few minutes to
|
||||
update, so continue to check the workspace until you observe that it has been
|
||||
updated. If the update fails, the workspace might revert silently to its
|
||||
original configuration. After the workspace has been updated, you cannot use
|
||||
|
@ -621,10 +609,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Workspaces
|
||||
|
|
|
@ -31,6 +31,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -103,12 +110,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -178,12 +179,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -251,12 +246,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -299,12 +288,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -372,10 +355,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Alerts
|
||||
|
|
|
@ -32,6 +32,14 @@ func New() *cobra.Command {
|
|||
Hidden: true,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDeleteApp())
|
||||
cmd.AddCommand(newGetApp())
|
||||
cmd.AddCommand(newGetAppDeploymentStatus())
|
||||
cmd.AddCommand(newGetApps())
|
||||
cmd.AddCommand(newGetEvents())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -58,7 +66,7 @@ func newCreate() *cobra.Command {
|
|||
// TODO: short flags
|
||||
cmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
// TODO: output-only field
|
||||
// TODO: any: resources
|
||||
|
||||
cmd.Use = "create"
|
||||
cmd.Short = `Create and deploy an application.`
|
||||
|
@ -101,12 +109,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-app command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -165,12 +167,6 @@ func newDeleteApp() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteApp())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-app command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -229,12 +225,6 @@ func newGetApp() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetApp())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-app-deployment-status command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -295,12 +285,6 @@ func newGetAppDeploymentStatus() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetAppDeploymentStatus())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-apps command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -343,12 +327,6 @@ func newGetApps() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetApps())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-events command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -407,10 +385,4 @@ func newGetEvents() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetEvents())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Apps
|
||||
|
|
|
@ -29,6 +29,10 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -99,12 +103,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -178,10 +176,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service ArtifactAllowlists
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
|
||||
|
||||
package automatic_cluster_update
|
||||
|
||||
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/settings"
|
||||
"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: "automatic-cluster-update",
|
||||
Short: `Controls whether automatic cluster update is enabled for the current workspace.`,
|
||||
Long: `Controls whether automatic cluster update is enabled for the current
|
||||
workspace. By default, it is turned off.`,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start get 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 getOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.GetAutomaticClusterUpdateRequest,
|
||||
)
|
||||
|
||||
func newGet() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var getReq settings.GetAutomaticClusterUpdateRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&getReq.Etag, "etag", getReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "get"
|
||||
cmd.Short = `Get the automatic cluster update setting.`
|
||||
cmd.Long = `Get the automatic cluster update setting.
|
||||
|
||||
Gets the automatic cluster update setting.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
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)
|
||||
|
||||
response, err := w.Settings.AutomaticClusterUpdate().Get(ctx, getReq)
|
||||
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 getOverrides {
|
||||
fn(cmd, &getReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start update 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 updateOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.UpdateAutomaticClusterUpdateSettingRequest,
|
||||
)
|
||||
|
||||
func newUpdate() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var updateReq settings.UpdateAutomaticClusterUpdateSettingRequest
|
||||
var updateJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&updateJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "update"
|
||||
cmd.Short = `Update the automatic cluster update setting.`
|
||||
cmd.Long = `Update the automatic cluster update setting.
|
||||
|
||||
Updates the automatic cluster update setting for the workspace. A fresh etag
|
||||
needs to be provided in PATCH requests (as part of the setting field). The
|
||||
etag can be retrieved by making a GET request before the PATCH request. If
|
||||
the setting is updated concurrently, PATCH fails with 409 and the request
|
||||
must be retried by using the fresh etag in the 409 response.`
|
||||
|
||||
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") {
|
||||
err = updateJson.Unmarshal(&updateReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := w.Settings.AutomaticClusterUpdate().Update(ctx, updateReq)
|
||||
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 updateOverrides {
|
||||
fn(cmd, &updateReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// end service AutomaticClusterUpdate
|
|
@ -34,6 +34,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -126,12 +133,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -193,12 +194,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -259,12 +254,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -308,12 +297,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -389,10 +372,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Catalogs
|
||||
|
|
|
@ -35,6 +35,13 @@ func New() *cobra.Command {
|
|||
Hidden: true,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -105,12 +112,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -170,12 +171,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -237,12 +232,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -298,12 +287,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -387,10 +370,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service CleanRooms
|
||||
|
|
|
@ -49,6 +49,17 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newEdit())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -140,12 +151,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -237,12 +242,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start edit command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -331,12 +330,6 @@ func newEdit() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newEdit())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -407,12 +400,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -483,12 +470,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -560,12 +541,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -619,12 +594,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -706,12 +675,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -793,10 +756,4 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// end service ClusterPolicies
|
||||
|
|
|
@ -54,6 +54,28 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newChangeOwner())
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newEdit())
|
||||
cmd.AddCommand(newEvents())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newListNodeTypes())
|
||||
cmd.AddCommand(newListZones())
|
||||
cmd.AddCommand(newPermanentDelete())
|
||||
cmd.AddCommand(newPin())
|
||||
cmd.AddCommand(newResize())
|
||||
cmd.AddCommand(newRestart())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newSparkVersions())
|
||||
cmd.AddCommand(newStart())
|
||||
cmd.AddCommand(newUnpin())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -143,12 +165,6 @@ func newChangeOwner() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newChangeOwner())
|
||||
})
|
||||
}
|
||||
|
||||
// start create command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -293,12 +309,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -409,12 +419,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start edit command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -567,12 +571,6 @@ func newEdit() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newEdit())
|
||||
})
|
||||
}
|
||||
|
||||
// start events command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -669,12 +667,6 @@ func newEvents() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newEvents())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -751,12 +743,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -827,12 +813,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -904,12 +884,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -970,12 +944,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-node-types command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1019,12 +987,6 @@ func newListNodeTypes() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListNodeTypes())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-zones command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1068,12 +1030,6 @@ func newListZones() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListZones())
|
||||
})
|
||||
}
|
||||
|
||||
// start permanent-delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1169,12 +1125,6 @@ func newPermanentDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPermanentDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start pin command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1267,12 +1217,6 @@ func newPin() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPin())
|
||||
})
|
||||
}
|
||||
|
||||
// start resize command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1384,12 +1328,6 @@ func newResize() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newResize())
|
||||
})
|
||||
}
|
||||
|
||||
// start restart command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1500,12 +1438,6 @@ func newRestart() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRestart())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1587,12 +1519,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start spark-versions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1636,12 +1562,6 @@ func newSparkVersions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSparkVersions())
|
||||
})
|
||||
}
|
||||
|
||||
// start start command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1756,12 +1676,6 @@ func newStart() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newStart())
|
||||
})
|
||||
}
|
||||
|
||||
// start unpin command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1854,12 +1768,6 @@ func newUnpin() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUnpin())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1941,10 +1849,4 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Clusters
|
||||
|
|
|
@ -34,6 +34,7 @@ import (
|
|||
model_registry "github.com/databricks/cli/cmd/workspace/model-registry"
|
||||
model_versions "github.com/databricks/cli/cmd/workspace/model-versions"
|
||||
online_tables "github.com/databricks/cli/cmd/workspace/online-tables"
|
||||
permission_migration "github.com/databricks/cli/cmd/workspace/permission-migration"
|
||||
permissions "github.com/databricks/cli/cmd/workspace/permissions"
|
||||
pipelines "github.com/databricks/cli/cmd/workspace/pipelines"
|
||||
policy_families "github.com/databricks/cli/cmd/workspace/policy-families"
|
||||
|
@ -102,6 +103,7 @@ func All() []*cobra.Command {
|
|||
out = append(out, model_registry.New())
|
||||
out = append(out, model_versions.New())
|
||||
out = append(out, online_tables.New())
|
||||
out = append(out, permission_migration.New())
|
||||
out = append(out, permissions.New())
|
||||
out = append(out, pipelines.New())
|
||||
out = append(out, policy_families.New())
|
||||
|
|
|
@ -37,6 +37,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -112,12 +119,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -188,12 +189,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -264,12 +259,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -309,12 +298,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -386,10 +369,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Connections
|
||||
|
|
|
@ -31,6 +31,9 @@ func New() *cobra.Command {
|
|||
Hidden: true,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newExchangeToken())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -99,10 +102,4 @@ func newExchangeToken() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newExchangeToken())
|
||||
})
|
||||
}
|
||||
|
||||
// end service CredentialsManager
|
||||
|
|
|
@ -0,0 +1,160 @@
|
|||
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
|
||||
|
||||
package csp_enablement
|
||||
|
||||
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/settings"
|
||||
"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: "csp-enablement",
|
||||
Short: `Controls whether to enable the compliance security profile for the current workspace.`,
|
||||
Long: `Controls whether to enable the compliance security profile for the current
|
||||
workspace. Enabling it on a workspace is permanent. By default, it is turned
|
||||
off.
|
||||
|
||||
This settings can NOT be disabled once it is enabled.`,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start get 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 getOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.GetCspEnablementRequest,
|
||||
)
|
||||
|
||||
func newGet() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var getReq settings.GetCspEnablementRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&getReq.Etag, "etag", getReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "get"
|
||||
cmd.Short = `Get the compliance security profile setting.`
|
||||
cmd.Long = `Get the compliance security profile setting.
|
||||
|
||||
Gets the compliance security profile setting.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
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)
|
||||
|
||||
response, err := w.Settings.CspEnablement().Get(ctx, getReq)
|
||||
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 getOverrides {
|
||||
fn(cmd, &getReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start update 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 updateOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.UpdateCspEnablementSettingRequest,
|
||||
)
|
||||
|
||||
func newUpdate() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var updateReq settings.UpdateCspEnablementSettingRequest
|
||||
var updateJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&updateJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "update"
|
||||
cmd.Short = `Update the compliance security profile setting.`
|
||||
cmd.Long = `Update the compliance security profile setting.
|
||||
|
||||
Updates the compliance security profile setting for the workspace. A fresh
|
||||
etag needs to be provided in PATCH requests (as part of the setting field).
|
||||
The etag can be retrieved by making a GET request before the PATCH
|
||||
request. If the setting is updated concurrently, PATCH fails with 409 and
|
||||
the request must be retried by using the fresh etag in the 409 response.`
|
||||
|
||||
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") {
|
||||
err = updateJson.Unmarshal(&updateReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := w.Settings.CspEnablement().Update(ctx, updateReq)
|
||||
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 updateOverrides {
|
||||
fn(cmd, &updateReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// end service CSPEnablement
|
|
@ -24,6 +24,9 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newMe())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -74,10 +77,4 @@ func newMe() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newMe())
|
||||
})
|
||||
}
|
||||
|
||||
// end service CurrentUser
|
||||
|
|
|
@ -32,6 +32,11 @@ func New() *cobra.Command {
|
|||
Hidden: true,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -97,12 +102,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -159,12 +158,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -231,10 +224,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service DashboardWidgets
|
||||
|
|
|
@ -32,6 +32,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newRestore())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -97,12 +105,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -171,12 +173,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -245,12 +241,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -309,12 +299,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start restore command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -382,12 +366,6 @@ func newRestore() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRestore())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -469,10 +447,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Dashboards
|
||||
|
|
|
@ -32,6 +32,9 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -84,10 +87,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service DataSources
|
||||
|
|
|
@ -0,0 +1,229 @@
|
|||
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
|
||||
|
||||
package default_namespace
|
||||
|
||||
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/settings"
|
||||
"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: "default-namespace",
|
||||
Short: `The default namespace setting API allows users to configure the default namespace for a Databricks workspace.`,
|
||||
Long: `The default namespace setting API allows users to configure the default
|
||||
namespace for a Databricks workspace.
|
||||
|
||||
Through this API, users can retrieve, set, or modify the default namespace
|
||||
used when queries do not reference a fully qualified three-level name. For
|
||||
example, if you use the API to set 'retail_prod' as the default catalog, then
|
||||
a query 'SELECT * FROM myTable' would reference the object
|
||||
'retail_prod.default.myTable' (the schema 'default' is always assumed).
|
||||
|
||||
This setting requires a restart of clusters and SQL warehouses to take effect.
|
||||
Additionally, the default namespace only applies when using Unity
|
||||
Catalog-enabled compute.`,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start delete 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 deleteOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.DeleteDefaultNamespaceRequest,
|
||||
)
|
||||
|
||||
func newDelete() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var deleteReq settings.DeleteDefaultNamespaceRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&deleteReq.Etag, "etag", deleteReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "delete"
|
||||
cmd.Short = `Delete the default namespace setting.`
|
||||
cmd.Long = `Delete the default namespace setting.
|
||||
|
||||
Deletes the default namespace setting for the workspace. A fresh etag needs to
|
||||
be provided in DELETE requests (as a query parameter). The etag can be
|
||||
retrieved by making a GET request before the DELETE request. If the
|
||||
setting is updated/deleted concurrently, DELETE fails with 409 and the
|
||||
request must be retried by using the fresh etag in the 409 response.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
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)
|
||||
|
||||
response, err := w.Settings.DefaultNamespace().Delete(ctx, deleteReq)
|
||||
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 deleteOverrides {
|
||||
fn(cmd, &deleteReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start get 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 getOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.GetDefaultNamespaceRequest,
|
||||
)
|
||||
|
||||
func newGet() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var getReq settings.GetDefaultNamespaceRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&getReq.Etag, "etag", getReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "get"
|
||||
cmd.Short = `Get the default namespace setting.`
|
||||
cmd.Long = `Get the default namespace setting.
|
||||
|
||||
Gets the default namespace setting.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
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)
|
||||
|
||||
response, err := w.Settings.DefaultNamespace().Get(ctx, getReq)
|
||||
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 getOverrides {
|
||||
fn(cmd, &getReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start update 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 updateOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.UpdateDefaultNamespaceSettingRequest,
|
||||
)
|
||||
|
||||
func newUpdate() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var updateReq settings.UpdateDefaultNamespaceSettingRequest
|
||||
var updateJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&updateJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "update"
|
||||
cmd.Short = `Update the default namespace setting.`
|
||||
cmd.Long = `Update the default namespace setting.
|
||||
|
||||
Updates the default namespace setting for the workspace. A fresh etag needs to
|
||||
be provided in PATCH requests (as part of the setting field). The etag can
|
||||
be retrieved by making a GET request before the PATCH request. Note that
|
||||
if the setting does not exist, GET returns a NOT_FOUND error and the etag is
|
||||
present in the error response, which should be set in the PATCH request. If
|
||||
the setting is updated concurrently, PATCH fails with 409 and the request
|
||||
must be retried by using the fresh etag in the 409 response.`
|
||||
|
||||
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") {
|
||||
err = updateJson.Unmarshal(&updateReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := w.Settings.DefaultNamespace().Update(ctx, updateReq)
|
||||
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 updateOverrides {
|
||||
fn(cmd, &updateReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// end service DefaultNamespace
|
|
@ -0,0 +1,162 @@
|
|||
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
|
||||
|
||||
package esm_enablement
|
||||
|
||||
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/settings"
|
||||
"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: "esm-enablement",
|
||||
Short: `Controls whether enhanced security monitoring is enabled for the current workspace.`,
|
||||
Long: `Controls whether enhanced security monitoring is enabled for the current
|
||||
workspace. If the compliance security profile is enabled, this is
|
||||
automatically enabled. By default, it is disabled. However, if the compliance
|
||||
security profile is enabled, this is automatically enabled.
|
||||
|
||||
If the compliance security profile is disabled, you can enable or disable this
|
||||
setting and it is not permanent.`,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start get 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 getOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.GetEsmEnablementRequest,
|
||||
)
|
||||
|
||||
func newGet() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var getReq settings.GetEsmEnablementRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&getReq.Etag, "etag", getReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "get"
|
||||
cmd.Short = `Get the enhanced security monitoring setting.`
|
||||
cmd.Long = `Get the enhanced security monitoring setting.
|
||||
|
||||
Gets the enhanced security monitoring setting.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
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)
|
||||
|
||||
response, err := w.Settings.EsmEnablement().Get(ctx, getReq)
|
||||
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 getOverrides {
|
||||
fn(cmd, &getReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start update 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 updateOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.UpdateEsmEnablementSettingRequest,
|
||||
)
|
||||
|
||||
func newUpdate() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var updateReq settings.UpdateEsmEnablementSettingRequest
|
||||
var updateJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&updateJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "update"
|
||||
cmd.Short = `Update the enhanced security monitoring setting.`
|
||||
cmd.Long = `Update the enhanced security monitoring setting.
|
||||
|
||||
Updates the enhanced security monitoring setting for the workspace. A fresh
|
||||
etag needs to be provided in PATCH requests (as part of the setting field).
|
||||
The etag can be retrieved by making a GET request before the PATCH
|
||||
request. If the setting is updated concurrently, PATCH fails with 409 and
|
||||
the request must be retried by using the fresh etag in the 409 response.`
|
||||
|
||||
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") {
|
||||
err = updateJson.Unmarshal(&updateReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := w.Settings.EsmEnablement().Update(ctx, updateReq)
|
||||
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 updateOverrides {
|
||||
fn(cmd, &updateReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// end service ESMEnablement
|
|
@ -35,6 +35,38 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreateExperiment())
|
||||
cmd.AddCommand(newCreateRun())
|
||||
cmd.AddCommand(newDeleteExperiment())
|
||||
cmd.AddCommand(newDeleteRun())
|
||||
cmd.AddCommand(newDeleteRuns())
|
||||
cmd.AddCommand(newDeleteTag())
|
||||
cmd.AddCommand(newGetByName())
|
||||
cmd.AddCommand(newGetExperiment())
|
||||
cmd.AddCommand(newGetHistory())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newGetRun())
|
||||
cmd.AddCommand(newListArtifacts())
|
||||
cmd.AddCommand(newListExperiments())
|
||||
cmd.AddCommand(newLogBatch())
|
||||
cmd.AddCommand(newLogInputs())
|
||||
cmd.AddCommand(newLogMetric())
|
||||
cmd.AddCommand(newLogModel())
|
||||
cmd.AddCommand(newLogParam())
|
||||
cmd.AddCommand(newRestoreExperiment())
|
||||
cmd.AddCommand(newRestoreRun())
|
||||
cmd.AddCommand(newRestoreRuns())
|
||||
cmd.AddCommand(newSearchExperiments())
|
||||
cmd.AddCommand(newSearchRuns())
|
||||
cmd.AddCommand(newSetExperimentTag())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newSetTag())
|
||||
cmd.AddCommand(newUpdateExperiment())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
cmd.AddCommand(newUpdateRun())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -126,12 +158,6 @@ func newCreateExperiment() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateExperiment())
|
||||
})
|
||||
}
|
||||
|
||||
// start create-run command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -202,12 +228,6 @@ func newCreateRun() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateRun())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-experiment command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -285,12 +305,6 @@ func newDeleteExperiment() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteExperiment())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-run command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -366,12 +380,6 @@ func newDeleteRun() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteRun())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-runs command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -461,12 +469,6 @@ func newDeleteRuns() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteRuns())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-tag command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -547,12 +549,6 @@ func newDeleteTag() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteTag())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-by-name command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -619,12 +615,6 @@ func newGetByName() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetByName())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-experiment command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -683,12 +673,6 @@ func newGetExperiment() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetExperiment())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-history command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -749,12 +733,6 @@ func newGetHistory() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetHistory())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -813,12 +791,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -878,12 +850,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-run command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -949,12 +915,6 @@ func newGetRun() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetRun())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-artifacts command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1011,12 +971,6 @@ func newListArtifacts() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListArtifacts())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-experiments command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1071,12 +1025,6 @@ func newListExperiments() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListExperiments())
|
||||
})
|
||||
}
|
||||
|
||||
// start log-batch command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1180,12 +1128,6 @@ func newLogBatch() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newLogBatch())
|
||||
})
|
||||
}
|
||||
|
||||
// start log-inputs command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1252,12 +1194,6 @@ func newLogInputs() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newLogInputs())
|
||||
})
|
||||
}
|
||||
|
||||
// start log-metric command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1353,12 +1289,6 @@ func newLogMetric() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newLogMetric())
|
||||
})
|
||||
}
|
||||
|
||||
// start log-model command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1425,12 +1355,6 @@ func newLogModel() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newLogModel())
|
||||
})
|
||||
}
|
||||
|
||||
// start log-param command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1516,12 +1440,6 @@ func newLogParam() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newLogParam())
|
||||
})
|
||||
}
|
||||
|
||||
// start restore-experiment command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1602,12 +1520,6 @@ func newRestoreExperiment() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRestoreExperiment())
|
||||
})
|
||||
}
|
||||
|
||||
// start restore-run command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1683,12 +1595,6 @@ func newRestoreRun() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRestoreRun())
|
||||
})
|
||||
}
|
||||
|
||||
// start restore-runs command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1778,12 +1684,6 @@ func newRestoreRuns() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRestoreRuns())
|
||||
})
|
||||
}
|
||||
|
||||
// start search-experiments command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1849,12 +1749,6 @@ func newSearchExperiments() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSearchExperiments())
|
||||
})
|
||||
}
|
||||
|
||||
// start search-runs command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1923,12 +1817,6 @@ func newSearchRuns() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSearchRuns())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-experiment-tag command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2015,12 +1903,6 @@ func newSetExperimentTag() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetExperimentTag())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2090,12 +1972,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-tag command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2182,12 +2058,6 @@ func newSetTag() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetTag())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-experiment command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2265,12 +2135,6 @@ func newUpdateExperiment() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdateExperiment())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2340,12 +2204,6 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-run command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2413,10 +2271,4 @@ func newUpdateRun() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdateRun())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Experiments
|
||||
|
|
|
@ -39,6 +39,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -138,12 +145,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -205,12 +206,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -271,12 +266,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -335,12 +324,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -420,10 +403,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service ExternalLocations
|
||||
|
|
|
@ -32,6 +32,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -103,12 +110,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -187,12 +188,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -270,12 +265,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -343,12 +332,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -437,10 +420,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Functions
|
||||
|
|
|
@ -32,6 +32,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -123,12 +130,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -202,12 +203,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -281,12 +276,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -327,12 +316,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -418,10 +401,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service GitCredentials
|
||||
|
|
|
@ -35,6 +35,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -125,12 +132,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -201,12 +202,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -277,12 +272,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -325,12 +314,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -416,10 +399,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service GlobalInitScripts
|
||||
|
|
|
@ -37,6 +37,11 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetEffective())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -110,12 +115,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-effective command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -181,12 +180,6 @@ func newGetEffective() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetEffective())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -260,10 +253,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Grants
|
||||
|
|
|
@ -33,6 +33,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newPatch())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -114,12 +122,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -190,12 +192,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -266,12 +262,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -330,12 +320,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start patch command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -417,12 +401,6 @@ func newPatch() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPatch())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -511,10 +489,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Groups
|
||||
|
|
|
@ -44,6 +44,17 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newEdit())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -148,12 +159,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -245,12 +250,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start edit command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -344,12 +343,6 @@ func newEdit() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newEdit())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -420,12 +413,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -496,12 +483,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -573,12 +554,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -618,12 +593,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -705,12 +674,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -792,10 +755,4 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// end service InstancePools
|
||||
|
|
|
@ -32,6 +32,12 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newAdd())
|
||||
cmd.AddCommand(newEdit())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newRemove())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -121,12 +127,6 @@ func newAdd() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newAdd())
|
||||
})
|
||||
}
|
||||
|
||||
// start edit command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -220,12 +220,6 @@ func newEdit() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newEdit())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -267,12 +261,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start remove command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -351,10 +339,4 @@ func newRemove() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRemove())
|
||||
})
|
||||
}
|
||||
|
||||
// end service InstanceProfiles
|
||||
|
|
|
@ -47,6 +47,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newReplace())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -159,12 +167,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -235,12 +237,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -311,12 +307,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -356,12 +346,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start replace command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -471,12 +455,6 @@ func newReplace() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newReplace())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -575,10 +553,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service IpAccessLists
|
||||
|
|
|
@ -45,6 +45,28 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCancelAllRuns())
|
||||
cmd.AddCommand(newCancelRun())
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newDeleteRun())
|
||||
cmd.AddCommand(newExportRun())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newGetRun())
|
||||
cmd.AddCommand(newGetRunOutput())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newListRuns())
|
||||
cmd.AddCommand(newRepairRun())
|
||||
cmd.AddCommand(newReset())
|
||||
cmd.AddCommand(newRunNow())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newSubmit())
|
||||
cmd.AddCommand(newUpdate())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -119,12 +141,6 @@ func newCancelAllRuns() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCancelAllRuns())
|
||||
})
|
||||
}
|
||||
|
||||
// start cancel-run command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -243,12 +259,6 @@ func newCancelRun() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCancelRun())
|
||||
})
|
||||
}
|
||||
|
||||
// start create command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -308,12 +318,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -407,12 +411,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-run command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -506,12 +504,6 @@ func newDeleteRun() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteRun())
|
||||
})
|
||||
}
|
||||
|
||||
// start export-run command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -587,12 +579,6 @@ func newExportRun() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newExportRun())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -667,12 +653,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -743,12 +723,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -820,12 +794,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-run command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -908,12 +876,6 @@ func newGetRun() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetRun())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-run-output command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -996,12 +958,6 @@ func newGetRunOutput() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetRunOutput())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1058,12 +1014,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-runs command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1125,12 +1075,6 @@ func newListRuns() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListRuns())
|
||||
})
|
||||
}
|
||||
|
||||
// start repair-run command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1264,12 +1208,6 @@ func newRepairRun() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRepairRun())
|
||||
})
|
||||
}
|
||||
|
||||
// start reset command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1330,12 +1268,6 @@ func newReset() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newReset())
|
||||
})
|
||||
}
|
||||
|
||||
// start run-now command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1465,12 +1397,6 @@ func newRunNow() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRunNow())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1552,12 +1478,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start submit command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1659,12 +1579,6 @@ func newSubmit() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSubmit())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1762,12 +1676,6 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1849,10 +1757,4 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Jobs
|
||||
|
|
|
@ -34,6 +34,16 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCancelRefresh())
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetRefresh())
|
||||
cmd.AddCommand(newListRefreshes())
|
||||
cmd.AddCommand(newRunRefresh())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -114,12 +124,6 @@ func newCancelRefresh() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCancelRefresh())
|
||||
})
|
||||
}
|
||||
|
||||
// start create command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -146,7 +150,7 @@ func newCreate() *cobra.Command {
|
|||
// TODO: complex arg: schedule
|
||||
cmd.Flags().BoolVar(&createReq.SkipBuiltinDashboard, "skip-builtin-dashboard", createReq.SkipBuiltinDashboard, `Whether to skip creating a default dashboard summarizing data quality metrics.`)
|
||||
// TODO: array: slicing_exprs
|
||||
// TODO: output-only field
|
||||
// TODO: complex arg: snapshot
|
||||
// TODO: complex arg: time_series
|
||||
cmd.Flags().StringVar(&createReq.WarehouseId, "warehouse-id", createReq.WarehouseId, `Optional argument to specify the warehouse for dashboard creation.`)
|
||||
|
||||
|
@ -223,12 +227,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -299,12 +297,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -374,12 +366,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-refresh command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -449,12 +435,6 @@ func newGetRefresh() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetRefresh())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-refreshes command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -523,12 +503,6 @@ func newListRefreshes() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListRefreshes())
|
||||
})
|
||||
}
|
||||
|
||||
// start run-refresh command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -597,12 +571,6 @@ func newRunRefresh() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRunRefresh())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -628,7 +596,7 @@ func newUpdate() *cobra.Command {
|
|||
// TODO: array: notifications
|
||||
// TODO: complex arg: schedule
|
||||
// TODO: array: slicing_exprs
|
||||
// TODO: output-only field
|
||||
// TODO: complex arg: snapshot
|
||||
// TODO: complex arg: time_series
|
||||
|
||||
cmd.Use = "update FULL_NAME OUTPUT_SCHEMA_NAME"
|
||||
|
@ -702,10 +670,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service LakehouseMonitors
|
||||
|
|
|
@ -26,6 +26,9 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newPublish())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -103,10 +106,4 @@ func newPublish() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPublish())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Lakeview
|
||||
|
|
|
@ -46,6 +46,12 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newAllClusterStatuses())
|
||||
cmd.AddCommand(newClusterStatus())
|
||||
cmd.AddCommand(newInstall())
|
||||
cmd.AddCommand(newUninstall())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -98,12 +104,6 @@ func newAllClusterStatuses() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newAllClusterStatuses())
|
||||
})
|
||||
}
|
||||
|
||||
// start cluster-status command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -173,12 +173,6 @@ func newClusterStatus() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newClusterStatus())
|
||||
})
|
||||
}
|
||||
|
||||
// start install command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -243,12 +237,6 @@ func newInstall() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newInstall())
|
||||
})
|
||||
}
|
||||
|
||||
// start uninstall command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -310,10 +298,4 @@ func newUninstall() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUninstall())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Libraries
|
||||
|
|
|
@ -39,6 +39,18 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newAssign())
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newCurrent())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newSummary())
|
||||
cmd.AddCommand(newUnassign())
|
||||
cmd.AddCommand(newUpdate())
|
||||
cmd.AddCommand(newUpdateAssignment())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -133,12 +145,6 @@ func newAssign() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newAssign())
|
||||
})
|
||||
}
|
||||
|
||||
// start create command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -221,12 +227,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start current command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -269,12 +269,6 @@ func newCurrent() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCurrent())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -347,12 +341,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -424,12 +412,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -471,12 +453,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start summary command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -520,12 +496,6 @@ func newSummary() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSummary())
|
||||
})
|
||||
}
|
||||
|
||||
// start unassign command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -589,12 +559,6 @@ func newUnassign() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUnassign())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -683,12 +647,6 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-assignment command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -776,10 +734,4 @@ func newUpdateAssignment() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdateAssignment())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Metastores
|
||||
|
|
|
@ -34,6 +34,44 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newApproveTransitionRequest())
|
||||
cmd.AddCommand(newCreateComment())
|
||||
cmd.AddCommand(newCreateModel())
|
||||
cmd.AddCommand(newCreateModelVersion())
|
||||
cmd.AddCommand(newCreateTransitionRequest())
|
||||
cmd.AddCommand(newCreateWebhook())
|
||||
cmd.AddCommand(newDeleteComment())
|
||||
cmd.AddCommand(newDeleteModel())
|
||||
cmd.AddCommand(newDeleteModelTag())
|
||||
cmd.AddCommand(newDeleteModelVersion())
|
||||
cmd.AddCommand(newDeleteModelVersionTag())
|
||||
cmd.AddCommand(newDeleteTransitionRequest())
|
||||
cmd.AddCommand(newDeleteWebhook())
|
||||
cmd.AddCommand(newGetLatestVersions())
|
||||
cmd.AddCommand(newGetModel())
|
||||
cmd.AddCommand(newGetModelVersion())
|
||||
cmd.AddCommand(newGetModelVersionDownloadUri())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newListModels())
|
||||
cmd.AddCommand(newListTransitionRequests())
|
||||
cmd.AddCommand(newListWebhooks())
|
||||
cmd.AddCommand(newRejectTransitionRequest())
|
||||
cmd.AddCommand(newRenameModel())
|
||||
cmd.AddCommand(newSearchModelVersions())
|
||||
cmd.AddCommand(newSearchModels())
|
||||
cmd.AddCommand(newSetModelTag())
|
||||
cmd.AddCommand(newSetModelVersionTag())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newTestRegistryWebhook())
|
||||
cmd.AddCommand(newTransitionStage())
|
||||
cmd.AddCommand(newUpdateComment())
|
||||
cmd.AddCommand(newUpdateModel())
|
||||
cmd.AddCommand(newUpdateModelVersion())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
cmd.AddCommand(newUpdateWebhook())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -146,12 +184,6 @@ func newApproveTransitionRequest() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newApproveTransitionRequest())
|
||||
})
|
||||
}
|
||||
|
||||
// start create-comment command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -237,12 +269,6 @@ func newCreateComment() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateComment())
|
||||
})
|
||||
}
|
||||
|
||||
// start create-model command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -324,12 +350,6 @@ func newCreateModel() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateModel())
|
||||
})
|
||||
}
|
||||
|
||||
// start create-model-version command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -414,12 +434,6 @@ func newCreateModelVersion() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateModelVersion())
|
||||
})
|
||||
}
|
||||
|
||||
// start create-transition-request command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -516,12 +530,6 @@ func newCreateTransitionRequest() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateTransitionRequest())
|
||||
})
|
||||
}
|
||||
|
||||
// start create-webhook command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -589,12 +597,6 @@ func newCreateWebhook() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateWebhook())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-comment command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -650,12 +652,6 @@ func newDeleteComment() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteComment())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-model command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -714,12 +710,6 @@ func newDeleteModel() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteModel())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-model-tag command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -781,12 +771,6 @@ func newDeleteModelTag() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteModelTag())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-model-version command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -847,12 +831,6 @@ func newDeleteModelVersion() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteModelVersion())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-model-version-tag command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -916,12 +894,6 @@ func newDeleteModelVersionTag() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteModelVersionTag())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-transition-request command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1001,12 +973,6 @@ func newDeleteTransitionRequest() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteTransitionRequest())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-webhook command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1064,12 +1030,6 @@ func newDeleteWebhook() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteWebhook())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-latest-versions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1144,12 +1104,6 @@ func newGetLatestVersions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetLatestVersions())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-model command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1212,12 +1166,6 @@ func newGetModel() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetModel())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-model-version command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1278,12 +1226,6 @@ func newGetModelVersion() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetModelVersion())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-model-version-download-uri command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1344,12 +1286,6 @@ func newGetModelVersionDownloadUri() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetModelVersionDownloadUri())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1408,12 +1344,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1473,12 +1403,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-models command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1533,12 +1457,6 @@ func newListModels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListModels())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-transition-requests command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1596,12 +1514,6 @@ func newListTransitionRequests() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListTransitionRequests())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-webhooks command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1658,12 +1570,6 @@ func newListWebhooks() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListWebhooks())
|
||||
})
|
||||
}
|
||||
|
||||
// start reject-transition-request command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1760,12 +1666,6 @@ func newRejectTransitionRequest() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRejectTransitionRequest())
|
||||
})
|
||||
}
|
||||
|
||||
// start rename-model command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1843,12 +1743,6 @@ func newRenameModel() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRenameModel())
|
||||
})
|
||||
}
|
||||
|
||||
// start search-model-versions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1904,12 +1798,6 @@ func newSearchModelVersions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSearchModelVersions())
|
||||
})
|
||||
}
|
||||
|
||||
// start search-models command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1965,12 +1853,6 @@ func newSearchModels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSearchModels())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-model-tag command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2059,12 +1941,6 @@ func newSetModelTag() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetModelTag())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-model-version-tag command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2157,12 +2033,6 @@ func newSetModelVersionTag() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetModelVersionTag())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2232,12 +2102,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start test-registry-webhook command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2330,12 +2194,6 @@ func newTestRegistryWebhook() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newTestRegistryWebhook())
|
||||
})
|
||||
}
|
||||
|
||||
// start transition-stage command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2444,12 +2302,6 @@ func newTransitionStage() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newTransitionStage())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-comment command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2529,12 +2381,6 @@ func newUpdateComment() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdateComment())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-model command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2612,12 +2458,6 @@ func newUpdateModel() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdateModel())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-model-version command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2699,12 +2539,6 @@ func newUpdateModelVersion() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdateModelVersion())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2774,12 +2608,6 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-webhook command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -2863,10 +2691,4 @@ func newUpdateWebhook() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdateWebhook())
|
||||
})
|
||||
}
|
||||
|
||||
// end service ModelRegistry
|
||||
|
|
|
@ -33,6 +33,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetByAlias())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -110,12 +117,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -184,12 +185,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-by-alias command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -255,12 +250,6 @@ func newGetByAlias() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetByAlias())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -331,12 +320,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -417,10 +400,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service ModelVersions
|
||||
|
|
|
@ -26,6 +26,11 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -99,12 +104,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -165,12 +164,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -229,10 +222,4 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// end service OnlineTables
|
||||
|
|
|
@ -0,0 +1,136 @@
|
|||
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
|
||||
|
||||
package permission_migration
|
||||
|
||||
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: "permission-migration",
|
||||
Short: `This spec contains undocumented permission migration APIs used in https://github.com/databrickslabs/ucx.`,
|
||||
Long: `This spec contains undocumented permission migration APIs used in
|
||||
https://github.com/databrickslabs/ucx.`,
|
||||
GroupID: "iam",
|
||||
Annotations: map[string]string{
|
||||
"package": "iam",
|
||||
},
|
||||
|
||||
// This service is being previewed; hide from help output.
|
||||
Hidden: true,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newMigratePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start migrate-permissions 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 migratePermissionsOverrides []func(
|
||||
*cobra.Command,
|
||||
*iam.PermissionMigrationRequest,
|
||||
)
|
||||
|
||||
func newMigratePermissions() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var migratePermissionsReq iam.PermissionMigrationRequest
|
||||
var migratePermissionsJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&migratePermissionsJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Flags().IntVar(&migratePermissionsReq.Size, "size", migratePermissionsReq.Size, `The maximum number of permissions that will be migrated.`)
|
||||
|
||||
cmd.Use = "migrate-permissions WORKSPACE_ID FROM_WORKSPACE_GROUP_NAME TO_ACCOUNT_GROUP_NAME"
|
||||
cmd.Short = `Migrate Permissions.`
|
||||
cmd.Long = `Migrate Permissions.
|
||||
|
||||
Migrate a batch of permissions from a workspace local group to an account
|
||||
group.
|
||||
|
||||
Arguments:
|
||||
WORKSPACE_ID: WorkspaceId of the associated workspace where the permission migration
|
||||
will occur. Both workspace group and account group must be in this
|
||||
workspace.
|
||||
FROM_WORKSPACE_GROUP_NAME: The name of the workspace group that permissions will be migrated from.
|
||||
TO_ACCOUNT_GROUP_NAME: The name of the account group that permissions will be migrated to.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
if cmd.Flags().Changed("json") {
|
||||
err := cobra.ExactArgs(0)(cmd, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("when --json flag is specified, no positional arguments are required. Provide 'workspace_id', 'from_workspace_group_name', 'to_account_group_name' in your JSON input")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
check := cobra.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)
|
||||
|
||||
if cmd.Flags().Changed("json") {
|
||||
err = migratePermissionsJson.Unmarshal(&migratePermissionsReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if !cmd.Flags().Changed("json") {
|
||||
_, err = fmt.Sscan(args[0], &migratePermissionsReq.WorkspaceId)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid WORKSPACE_ID: %s", args[0])
|
||||
}
|
||||
}
|
||||
if !cmd.Flags().Changed("json") {
|
||||
migratePermissionsReq.FromWorkspaceGroupName = args[1]
|
||||
}
|
||||
if !cmd.Flags().Changed("json") {
|
||||
migratePermissionsReq.ToAccountGroupName = args[2]
|
||||
}
|
||||
|
||||
response, err := w.PermissionMigration.MigratePermissions(ctx, migratePermissionsReq)
|
||||
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 migratePermissionsOverrides {
|
||||
fn(cmd, &migratePermissionsReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// end service PermissionMigration
|
|
@ -71,6 +71,12 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newSet())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -143,12 +149,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -209,12 +209,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start set command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -289,12 +283,6 @@ func newSet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSet())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -369,10 +357,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Permissions
|
||||
|
|
|
@ -41,6 +41,22 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newGetUpdate())
|
||||
cmd.AddCommand(newListPipelineEvents())
|
||||
cmd.AddCommand(newListPipelines())
|
||||
cmd.AddCommand(newListUpdates())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newStartUpdate())
|
||||
cmd.AddCommand(newStop())
|
||||
cmd.AddCommand(newUpdate())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -109,12 +125,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -182,12 +192,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -258,12 +262,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -334,12 +332,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -411,12 +403,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -477,12 +463,6 @@ func newGetUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-pipeline-events command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -552,12 +532,6 @@ func newListPipelineEvents() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListPipelineEvents())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-pipelines command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -613,12 +587,6 @@ func newListPipelines() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListPipelines())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-updates command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -693,12 +661,6 @@ func newListUpdates() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListUpdates())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -780,12 +742,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start start-update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -875,12 +831,6 @@ func newStartUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newStartUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// start stop command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -966,12 +916,6 @@ func newStop() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newStop())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1071,12 +1015,6 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1158,10 +1096,4 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Pipelines
|
||||
|
|
|
@ -32,6 +32,10 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -95,12 +99,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -154,10 +152,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service PolicyFamilies
|
||||
|
|
|
@ -29,6 +29,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newListShares())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -123,12 +131,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -200,12 +202,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -278,12 +274,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -339,12 +329,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-shares command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -414,12 +398,6 @@ func newListShares() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListShares())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -506,10 +484,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Providers
|
||||
|
|
|
@ -30,6 +30,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newRestore())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -105,12 +113,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -180,12 +182,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -254,12 +250,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -319,12 +309,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start restore command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -393,12 +377,6 @@ func newRestore() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRestore())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -483,10 +461,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Queries
|
||||
|
|
|
@ -24,6 +24,9 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -89,10 +92,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service QueryHistory
|
||||
|
|
|
@ -32,6 +32,11 @@ func New() *cobra.Command {
|
|||
Hidden: true,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -97,12 +102,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -159,12 +158,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -231,10 +224,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service QueryVisualizations
|
||||
|
|
|
@ -33,6 +33,10 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newGetActivationUrlInfo())
|
||||
cmd.AddCommand(newRetrieveToken())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -99,12 +103,6 @@ func newGetActivationUrlInfo() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetActivationUrlInfo())
|
||||
})
|
||||
}
|
||||
|
||||
// start retrieve-token command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -164,10 +162,4 @@ func newRetrieveToken() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRetrieveToken())
|
||||
})
|
||||
}
|
||||
|
||||
// end service RecipientActivation
|
||||
|
|
|
@ -43,6 +43,15 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newRotateToken())
|
||||
cmd.AddCommand(newSharePermissions())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -142,12 +151,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -219,12 +222,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -297,12 +294,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -358,12 +349,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start rotate-token command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -448,12 +433,6 @@ func newRotateToken() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRotateToken())
|
||||
})
|
||||
}
|
||||
|
||||
// start share-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -525,12 +504,6 @@ func newSharePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSharePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -617,10 +590,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Recipients
|
||||
|
|
|
@ -55,6 +55,15 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newDeleteAlias())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newSetAlias())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -160,12 +169,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -242,12 +245,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-alias command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -313,12 +310,6 @@ func newDeleteAlias() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteAlias())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -394,12 +385,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -466,12 +451,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-alias command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -559,12 +538,6 @@ func newSetAlias() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetAlias())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -655,10 +628,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service RegisteredModels
|
||||
|
|
|
@ -36,6 +36,17 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newUpdate())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -130,12 +141,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -209,12 +214,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -288,12 +287,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -364,12 +357,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -441,12 +428,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -501,12 +482,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -588,12 +563,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -680,12 +649,6 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -767,10 +730,4 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Repos
|
||||
|
|
|
@ -0,0 +1,227 @@
|
|||
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
|
||||
|
||||
package restrict_workspace_admins
|
||||
|
||||
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/settings"
|
||||
"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: "restrict-workspace-admins",
|
||||
Short: `The Restrict Workspace Admins setting lets you control the capabilities of workspace admins.`,
|
||||
Long: `The Restrict Workspace Admins setting lets you control the capabilities of
|
||||
workspace admins. With the setting status set to ALLOW_ALL, workspace admins
|
||||
can create service principal personal access tokens on behalf of any service
|
||||
principal in their workspace. Workspace admins can also change a job owner to
|
||||
any user in their workspace. And they can change the job run_as setting to any
|
||||
user in their workspace or to a service principal on which they have the
|
||||
Service Principal User role. With the setting status set to
|
||||
RESTRICT_TOKENS_AND_JOB_RUN_AS, workspace admins can only create personal
|
||||
access tokens on behalf of service principals they have the Service Principal
|
||||
User role on. They can also only change a job owner to themselves. And they
|
||||
can change the job run_as setting to themselves or to a service principal on
|
||||
which they have the Service Principal User role.`,
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start delete 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 deleteOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.DeleteRestrictWorkspaceAdminRequest,
|
||||
)
|
||||
|
||||
func newDelete() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var deleteReq settings.DeleteRestrictWorkspaceAdminRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&deleteReq.Etag, "etag", deleteReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "delete"
|
||||
cmd.Short = `Delete the restrict workspace admins setting.`
|
||||
cmd.Long = `Delete the restrict workspace admins setting.
|
||||
|
||||
Reverts the restrict workspace admins setting status for the workspace. A
|
||||
fresh etag needs to be provided in DELETE requests (as a query parameter).
|
||||
The etag can be retrieved by making a GET request before the DELETE request.
|
||||
If the setting is updated/deleted concurrently, DELETE fails with 409 and
|
||||
the request must be retried by using the fresh etag in the 409 response.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
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)
|
||||
|
||||
response, err := w.Settings.RestrictWorkspaceAdmins().Delete(ctx, deleteReq)
|
||||
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 deleteOverrides {
|
||||
fn(cmd, &deleteReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start get 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 getOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.GetRestrictWorkspaceAdminRequest,
|
||||
)
|
||||
|
||||
func newGet() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var getReq settings.GetRestrictWorkspaceAdminRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&getReq.Etag, "etag", getReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "get"
|
||||
cmd.Short = `Get the restrict workspace admins setting.`
|
||||
cmd.Long = `Get the restrict workspace admins setting.
|
||||
|
||||
Gets the restrict workspace admins setting.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
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)
|
||||
|
||||
response, err := w.Settings.RestrictWorkspaceAdmins().Get(ctx, getReq)
|
||||
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 getOverrides {
|
||||
fn(cmd, &getReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// start update 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 updateOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.UpdateRestrictWorkspaceAdminsSettingRequest,
|
||||
)
|
||||
|
||||
func newUpdate() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var updateReq settings.UpdateRestrictWorkspaceAdminsSettingRequest
|
||||
var updateJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&updateJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "update"
|
||||
cmd.Short = `Update the restrict workspace admins setting.`
|
||||
cmd.Long = `Update the restrict workspace admins setting.
|
||||
|
||||
Updates the restrict workspace admins setting for the workspace. A fresh etag
|
||||
needs to be provided in PATCH requests (as part of the setting field). The
|
||||
etag can be retrieved by making a GET request before the PATCH request. If
|
||||
the setting is updated concurrently, PATCH fails with 409 and the request
|
||||
must be retried by using the fresh etag in the 409 response.`
|
||||
|
||||
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") {
|
||||
err = updateJson.Unmarshal(&updateReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := w.Settings.RestrictWorkspaceAdmins().Update(ctx, updateReq)
|
||||
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 updateOverrides {
|
||||
fn(cmd, &updateReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// end service RestrictWorkspaceAdmins
|
|
@ -31,6 +31,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -124,12 +131,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -201,12 +202,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -279,12 +274,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -349,12 +338,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -443,10 +426,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Schemas
|
||||
|
|
|
@ -38,6 +38,18 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreateScope())
|
||||
cmd.AddCommand(newDeleteAcl())
|
||||
cmd.AddCommand(newDeleteScope())
|
||||
cmd.AddCommand(newDeleteSecret())
|
||||
cmd.AddCommand(newGetAcl())
|
||||
cmd.AddCommand(newGetSecret())
|
||||
cmd.AddCommand(newListAcls())
|
||||
cmd.AddCommand(newListScopes())
|
||||
cmd.AddCommand(newListSecrets())
|
||||
cmd.AddCommand(newPutAcl())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -127,12 +139,6 @@ func newCreateScope() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateScope())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-acl command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -217,12 +223,6 @@ func newDeleteAcl() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteAcl())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-scope command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -302,12 +302,6 @@ func newDeleteScope() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteScope())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-secret command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -392,12 +386,6 @@ func newDeleteSecret() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteSecret())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-acl command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -463,12 +451,6 @@ func newGetAcl() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetAcl())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-secret command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -540,12 +522,6 @@ func newGetSecret() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetSecret())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-acls command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -606,12 +582,6 @@ func newListAcls() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListAcls())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-scopes command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -654,12 +624,6 @@ func newListScopes() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListScopes())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-secrets command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -722,12 +686,6 @@ func newListSecrets() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListSecrets())
|
||||
})
|
||||
}
|
||||
|
||||
// start put-acl command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -839,10 +797,4 @@ func newPutAcl() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPutAcl())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Secrets
|
||||
|
|
|
@ -32,6 +32,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newPatch())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -112,12 +120,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -188,12 +190,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -265,12 +261,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -329,12 +319,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start patch command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -417,12 +401,6 @@ func newPatch() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPatch())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -513,10 +491,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service ServicePrincipals
|
||||
|
|
|
@ -40,6 +40,23 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newBuildLogs())
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newExportMetrics())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newLogs())
|
||||
cmd.AddCommand(newPatch())
|
||||
cmd.AddCommand(newPut())
|
||||
cmd.AddCommand(newQuery())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newUpdateConfig())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -111,12 +128,6 @@ func newBuildLogs() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newBuildLogs())
|
||||
})
|
||||
}
|
||||
|
||||
// start create command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -195,12 +206,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -257,12 +262,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start export-metrics command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -323,12 +322,6 @@ func newExportMetrics() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newExportMetrics())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -387,12 +380,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -451,12 +438,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -516,12 +497,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -559,12 +534,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start logs command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -628,12 +597,6 @@ func newLogs() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newLogs())
|
||||
})
|
||||
}
|
||||
|
||||
// start patch command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -705,12 +668,6 @@ func newPatch() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPatch())
|
||||
})
|
||||
}
|
||||
|
||||
// start put command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -781,12 +738,6 @@ func newPut() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPut())
|
||||
})
|
||||
}
|
||||
|
||||
// start query command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -865,12 +816,6 @@ func newQuery() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newQuery())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -940,12 +885,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-config command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1038,12 +977,6 @@ func newUpdateConfig() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdateConfig())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1113,10 +1046,4 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// end service ServingEndpoints
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
package settings
|
||||
|
||||
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/settings"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
automatic_cluster_update "github.com/databricks/cli/cmd/workspace/automatic-cluster-update"
|
||||
csp_enablement "github.com/databricks/cli/cmd/workspace/csp-enablement"
|
||||
default_namespace "github.com/databricks/cli/cmd/workspace/default-namespace"
|
||||
esm_enablement "github.com/databricks/cli/cmd/workspace/esm-enablement"
|
||||
restrict_workspace_admins "github.com/databricks/cli/cmd/workspace/restrict-workspace-admins"
|
||||
)
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -18,26 +18,22 @@ var cmdOverrides []func(*cobra.Command)
|
|||
|
||||
func New() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "settings",
|
||||
Short: `The default namespace setting API allows users to configure the default namespace for a Databricks workspace.`,
|
||||
Long: `The default namespace setting API allows users to configure the default
|
||||
namespace for a Databricks workspace.
|
||||
|
||||
Through this API, users can retrieve, set, or modify the default namespace
|
||||
used when queries do not reference a fully qualified three-level name. For
|
||||
example, if you use the API to set 'retail_prod' as the default catalog, then
|
||||
a query 'SELECT * FROM myTable' would reference the object
|
||||
'retail_prod.default.myTable' (the schema 'default' is always assumed).
|
||||
|
||||
This setting requires a restart of clusters and SQL warehouses to take effect.
|
||||
Additionally, the default namespace only applies when using Unity
|
||||
Catalog-enabled compute.`,
|
||||
Use: "settings",
|
||||
Short: `Workspace Settings API allows users to manage settings at the workspace level.`,
|
||||
Long: `Workspace Settings API allows users to manage settings at the workspace level.`,
|
||||
GroupID: "settings",
|
||||
Annotations: map[string]string{
|
||||
"package": "settings",
|
||||
},
|
||||
}
|
||||
|
||||
// Add subservices
|
||||
cmd.AddCommand(automatic_cluster_update.New())
|
||||
cmd.AddCommand(csp_enablement.New())
|
||||
cmd.AddCommand(default_namespace.New())
|
||||
cmd.AddCommand(esm_enablement.New())
|
||||
cmd.AddCommand(restrict_workspace_admins.New())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -46,396 +42,4 @@ func New() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
// start delete-default-namespace-setting 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 deleteDefaultNamespaceSettingOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.DeleteDefaultNamespaceSettingRequest,
|
||||
)
|
||||
|
||||
func newDeleteDefaultNamespaceSetting() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var deleteDefaultNamespaceSettingReq settings.DeleteDefaultNamespaceSettingRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&deleteDefaultNamespaceSettingReq.Etag, "etag", deleteDefaultNamespaceSettingReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "delete-default-namespace-setting"
|
||||
cmd.Short = `Delete the default namespace setting.`
|
||||
cmd.Long = `Delete the default namespace setting.
|
||||
|
||||
Deletes the default namespace setting for the workspace. A fresh etag needs to
|
||||
be provided in DELETE requests (as a query parameter). The etag can be
|
||||
retrieved by making a GET request before the DELETE request. If the setting is
|
||||
updated/deleted concurrently, DELETE will fail with 409 and the request will
|
||||
need to be retried by using the fresh etag in the 409 response.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
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)
|
||||
|
||||
response, err := w.Settings.DeleteDefaultNamespaceSetting(ctx, deleteDefaultNamespaceSettingReq)
|
||||
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 deleteDefaultNamespaceSettingOverrides {
|
||||
fn(cmd, &deleteDefaultNamespaceSettingReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteDefaultNamespaceSetting())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-restrict-workspace-admins-setting 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 deleteRestrictWorkspaceAdminsSettingOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.DeleteRestrictWorkspaceAdminsSettingRequest,
|
||||
)
|
||||
|
||||
func newDeleteRestrictWorkspaceAdminsSetting() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var deleteRestrictWorkspaceAdminsSettingReq settings.DeleteRestrictWorkspaceAdminsSettingRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&deleteRestrictWorkspaceAdminsSettingReq.Etag, "etag", deleteRestrictWorkspaceAdminsSettingReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "delete-restrict-workspace-admins-setting"
|
||||
cmd.Short = `Delete the restrict workspace admins setting.`
|
||||
cmd.Long = `Delete the restrict workspace admins setting.
|
||||
|
||||
Reverts the restrict workspace admins setting status for the workspace. A
|
||||
fresh etag needs to be provided in DELETE requests (as a query parameter). The
|
||||
etag can be retrieved by making a GET request before the DELETE request. If
|
||||
the setting is updated/deleted concurrently, DELETE will fail with 409 and the
|
||||
request will need to be retried by using the fresh etag in the 409 response.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
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)
|
||||
|
||||
response, err := w.Settings.DeleteRestrictWorkspaceAdminsSetting(ctx, deleteRestrictWorkspaceAdminsSettingReq)
|
||||
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 deleteRestrictWorkspaceAdminsSettingOverrides {
|
||||
fn(cmd, &deleteRestrictWorkspaceAdminsSettingReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteRestrictWorkspaceAdminsSetting())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-default-namespace-setting 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 getDefaultNamespaceSettingOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.GetDefaultNamespaceSettingRequest,
|
||||
)
|
||||
|
||||
func newGetDefaultNamespaceSetting() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var getDefaultNamespaceSettingReq settings.GetDefaultNamespaceSettingRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&getDefaultNamespaceSettingReq.Etag, "etag", getDefaultNamespaceSettingReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "get-default-namespace-setting"
|
||||
cmd.Short = `Get the default namespace setting.`
|
||||
cmd.Long = `Get the default namespace setting.
|
||||
|
||||
Gets the default namespace setting.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
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)
|
||||
|
||||
response, err := w.Settings.GetDefaultNamespaceSetting(ctx, getDefaultNamespaceSettingReq)
|
||||
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 getDefaultNamespaceSettingOverrides {
|
||||
fn(cmd, &getDefaultNamespaceSettingReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetDefaultNamespaceSetting())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-restrict-workspace-admins-setting 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 getRestrictWorkspaceAdminsSettingOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.GetRestrictWorkspaceAdminsSettingRequest,
|
||||
)
|
||||
|
||||
func newGetRestrictWorkspaceAdminsSetting() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var getRestrictWorkspaceAdminsSettingReq settings.GetRestrictWorkspaceAdminsSettingRequest
|
||||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Flags().StringVar(&getRestrictWorkspaceAdminsSettingReq.Etag, "etag", getRestrictWorkspaceAdminsSettingReq.Etag, `etag used for versioning.`)
|
||||
|
||||
cmd.Use = "get-restrict-workspace-admins-setting"
|
||||
cmd.Short = `Get the restrict workspace admins setting.`
|
||||
cmd.Long = `Get the restrict workspace admins setting.
|
||||
|
||||
Gets the restrict workspace admins setting.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(0)
|
||||
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)
|
||||
|
||||
response, err := w.Settings.GetRestrictWorkspaceAdminsSetting(ctx, getRestrictWorkspaceAdminsSettingReq)
|
||||
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 getRestrictWorkspaceAdminsSettingOverrides {
|
||||
fn(cmd, &getRestrictWorkspaceAdminsSettingReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetRestrictWorkspaceAdminsSetting())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-default-namespace-setting 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 updateDefaultNamespaceSettingOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.UpdateDefaultNamespaceSettingRequest,
|
||||
)
|
||||
|
||||
func newUpdateDefaultNamespaceSetting() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var updateDefaultNamespaceSettingReq settings.UpdateDefaultNamespaceSettingRequest
|
||||
var updateDefaultNamespaceSettingJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&updateDefaultNamespaceSettingJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "update-default-namespace-setting"
|
||||
cmd.Short = `Update the default namespace setting.`
|
||||
cmd.Long = `Update the default namespace setting.
|
||||
|
||||
Updates the default namespace setting for the workspace. A fresh etag needs to
|
||||
be provided in PATCH requests (as part of the setting field). The etag can be
|
||||
retrieved by making a GET request before the PATCH request. Note that if the
|
||||
setting does not exist, GET will return a NOT_FOUND error and the etag will be
|
||||
present in the error response, which should be set in the PATCH request. If
|
||||
the setting is updated concurrently, PATCH will fail with 409 and the request
|
||||
will need to be retried by using the fresh etag in the 409 response.`
|
||||
|
||||
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") {
|
||||
err = updateDefaultNamespaceSettingJson.Unmarshal(&updateDefaultNamespaceSettingReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := w.Settings.UpdateDefaultNamespaceSetting(ctx, updateDefaultNamespaceSettingReq)
|
||||
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 updateDefaultNamespaceSettingOverrides {
|
||||
fn(cmd, &updateDefaultNamespaceSettingReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdateDefaultNamespaceSetting())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-restrict-workspace-admins-setting 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 updateRestrictWorkspaceAdminsSettingOverrides []func(
|
||||
*cobra.Command,
|
||||
*settings.UpdateRestrictWorkspaceAdminsSettingRequest,
|
||||
)
|
||||
|
||||
func newUpdateRestrictWorkspaceAdminsSetting() *cobra.Command {
|
||||
cmd := &cobra.Command{}
|
||||
|
||||
var updateRestrictWorkspaceAdminsSettingReq settings.UpdateRestrictWorkspaceAdminsSettingRequest
|
||||
var updateRestrictWorkspaceAdminsSettingJson flags.JsonFlag
|
||||
|
||||
// TODO: short flags
|
||||
cmd.Flags().Var(&updateRestrictWorkspaceAdminsSettingJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "update-restrict-workspace-admins-setting"
|
||||
cmd.Short = `Update the restrict workspace admins setting.`
|
||||
cmd.Long = `Update the restrict workspace admins setting.
|
||||
|
||||
Updates the restrict workspace admins setting for the workspace. A fresh etag
|
||||
needs to be provided in PATCH requests (as part of the setting field). The
|
||||
etag can be retrieved by making a GET request before the PATCH request. If the
|
||||
setting is updated concurrently, PATCH will fail with 409 and the request will
|
||||
need to be retried by using the fresh etag in the 409 response.`
|
||||
|
||||
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") {
|
||||
err = updateRestrictWorkspaceAdminsSettingJson.Unmarshal(&updateRestrictWorkspaceAdminsSettingReq)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
|
||||
response, err := w.Settings.UpdateRestrictWorkspaceAdminsSetting(ctx, updateRestrictWorkspaceAdminsSettingReq)
|
||||
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 updateRestrictWorkspaceAdminsSettingOverrides {
|
||||
fn(cmd, &updateRestrictWorkspaceAdminsSettingReq)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdateRestrictWorkspaceAdminsSetting())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Settings
|
||||
|
|
|
@ -31,6 +31,15 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newSharePermissions())
|
||||
cmd.AddCommand(newUpdate())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -118,12 +127,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -183,12 +186,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -250,12 +247,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -297,12 +288,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start share-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -362,12 +347,6 @@ func newSharePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSharePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -452,12 +431,6 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -530,10 +503,4 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Shares
|
||||
|
|
|
@ -39,6 +39,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newUpdate())
|
||||
cmd.AddCommand(newValidate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -70,7 +78,7 @@ func newCreate() *cobra.Command {
|
|||
// TODO: complex arg: azure_service_principal
|
||||
// TODO: complex arg: cloudflare_api_token
|
||||
cmd.Flags().StringVar(&createReq.Comment, "comment", createReq.Comment, `Comment associated with the credential.`)
|
||||
// TODO: output-only field
|
||||
// TODO: complex arg: databricks_gcp_service_account
|
||||
cmd.Flags().BoolVar(&createReq.ReadOnly, "read-only", createReq.ReadOnly, `Whether the storage credential is only usable for read operations.`)
|
||||
cmd.Flags().BoolVar(&createReq.SkipValidation, "skip-validation", createReq.SkipValidation, `Supplying true to this argument skips validation of the created credential.`)
|
||||
|
||||
|
@ -131,12 +139,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -210,12 +212,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -288,12 +284,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -352,12 +342,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -381,7 +365,7 @@ func newUpdate() *cobra.Command {
|
|||
// TODO: complex arg: azure_service_principal
|
||||
// TODO: complex arg: cloudflare_api_token
|
||||
cmd.Flags().StringVar(&updateReq.Comment, "comment", updateReq.Comment, `Comment associated with the credential.`)
|
||||
// TODO: output-only field
|
||||
// TODO: complex arg: databricks_gcp_service_account
|
||||
cmd.Flags().BoolVar(&updateReq.Force, "force", updateReq.Force, `Force update even if there are dependent external locations or external tables.`)
|
||||
cmd.Flags().StringVar(&updateReq.NewName, "new-name", updateReq.NewName, `New name for the storage credential.`)
|
||||
cmd.Flags().StringVar(&updateReq.Owner, "owner", updateReq.Owner, `Username of current owner of credential.`)
|
||||
|
@ -448,12 +432,6 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// start validate command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -476,10 +454,10 @@ func newValidate() *cobra.Command {
|
|||
// TODO: complex arg: azure_managed_identity
|
||||
// TODO: complex arg: azure_service_principal
|
||||
// TODO: complex arg: cloudflare_api_token
|
||||
// TODO: output-only field
|
||||
// TODO: complex arg: databricks_gcp_service_account
|
||||
cmd.Flags().StringVar(&validateReq.ExternalLocationName, "external-location-name", validateReq.ExternalLocationName, `The name of an existing external location to validate.`)
|
||||
cmd.Flags().BoolVar(&validateReq.ReadOnly, "read-only", validateReq.ReadOnly, `Whether the storage credential is only usable for read operations.`)
|
||||
// TODO: any: storage_credential_name
|
||||
cmd.Flags().StringVar(&validateReq.StorageCredentialName, "storage-credential-name", validateReq.StorageCredentialName, `The name of the storage credential to validate.`)
|
||||
cmd.Flags().StringVar(&validateReq.Url, "url", validateReq.Url, `The external location url to validate.`)
|
||||
|
||||
cmd.Use = "validate"
|
||||
|
@ -537,10 +515,4 @@ func newValidate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newValidate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service StorageCredentials
|
||||
|
|
|
@ -28,6 +28,11 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newDisable())
|
||||
cmd.AddCommand(newEnable())
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -100,12 +105,6 @@ func newDisable() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDisable())
|
||||
})
|
||||
}
|
||||
|
||||
// start enable command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -170,12 +169,6 @@ func newEnable() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newEnable())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -232,10 +225,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service SystemSchemas
|
||||
|
|
|
@ -39,6 +39,10 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -115,12 +119,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -196,10 +194,4 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// end service TableConstraints
|
||||
|
|
|
@ -35,6 +35,14 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newExists())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newListSummaries())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -117,12 +125,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start exists command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -200,12 +202,6 @@ func newExists() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newExists())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -284,12 +280,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -358,12 +348,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-summaries command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -446,12 +430,6 @@ func newListSummaries() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListSummaries())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -539,10 +517,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Tables
|
||||
|
|
|
@ -29,6 +29,16 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreateOboToken())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -130,12 +140,6 @@ func newCreateOboToken() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateOboToken())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -206,12 +210,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -282,12 +280,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -330,12 +322,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -379,12 +365,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -438,12 +418,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -509,12 +483,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -580,10 +548,4 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// end service TokenManagement
|
||||
|
|
|
@ -28,6 +28,11 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newList())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -104,12 +109,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -203,12 +202,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -248,10 +241,4 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Tokens
|
||||
|
|
|
@ -37,6 +37,18 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newPatch())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newUpdate())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -120,12 +132,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -197,12 +203,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -281,12 +281,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -329,12 +323,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -378,12 +366,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -442,12 +424,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start patch command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -530,12 +506,6 @@ func newPatch() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newPatch())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -601,12 +571,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -698,12 +662,6 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -769,10 +727,4 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Users
|
||||
|
|
|
@ -28,6 +28,12 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreateEndpoint())
|
||||
cmd.AddCommand(newDeleteEndpoint())
|
||||
cmd.AddCommand(newGetEndpoint())
|
||||
cmd.AddCommand(newListEndpoints())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -142,12 +148,6 @@ func newCreateEndpoint() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateEndpoint())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-endpoint command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -164,18 +164,17 @@ func newDeleteEndpoint() *cobra.Command {
|
|||
|
||||
// TODO: short flags
|
||||
|
||||
cmd.Use = "delete-endpoint ENDPOINT_NAME NAME"
|
||||
cmd.Use = "delete-endpoint ENDPOINT_NAME"
|
||||
cmd.Short = `Delete an endpoint.`
|
||||
cmd.Long = `Delete an endpoint.
|
||||
|
||||
Arguments:
|
||||
ENDPOINT_NAME: Name of the endpoint
|
||||
NAME: Name of the endpoint to delete`
|
||||
ENDPOINT_NAME: Name of the endpoint`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
||||
cmd.Args = func(cmd *cobra.Command, args []string) error {
|
||||
check := cobra.ExactArgs(2)
|
||||
check := cobra.ExactArgs(1)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
|
@ -185,7 +184,6 @@ func newDeleteEndpoint() *cobra.Command {
|
|||
w := root.WorkspaceClient(ctx)
|
||||
|
||||
deleteEndpointReq.EndpointName = args[0]
|
||||
deleteEndpointReq.Name = args[1]
|
||||
|
||||
err = w.VectorSearchEndpoints.DeleteEndpoint(ctx, deleteEndpointReq)
|
||||
if err != nil {
|
||||
|
@ -206,12 +204,6 @@ func newDeleteEndpoint() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteEndpoint())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-endpoint command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -268,12 +260,6 @@ func newGetEndpoint() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetEndpoint())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-endpoints command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -324,10 +310,4 @@ func newListEndpoints() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListEndpoints())
|
||||
})
|
||||
}
|
||||
|
||||
// end service VectorSearchEndpoints
|
||||
|
|
|
@ -35,6 +35,16 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreateIndex())
|
||||
cmd.AddCommand(newDeleteDataVectorIndex())
|
||||
cmd.AddCommand(newDeleteIndex())
|
||||
cmd.AddCommand(newGetIndex())
|
||||
cmd.AddCommand(newListIndexes())
|
||||
cmd.AddCommand(newQueryIndex())
|
||||
cmd.AddCommand(newSyncIndex())
|
||||
cmd.AddCommand(newUpsertDataVectorIndex())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -63,9 +73,8 @@ func newCreateIndex() *cobra.Command {
|
|||
|
||||
// TODO: complex arg: delta_sync_index_spec
|
||||
// TODO: complex arg: direct_access_index_spec
|
||||
cmd.Flags().StringVar(&createIndexReq.EndpointName, "endpoint-name", createIndexReq.EndpointName, `Name of the endpoint to be used for serving the index.`)
|
||||
|
||||
cmd.Use = "create-index NAME PRIMARY_KEY INDEX_TYPE"
|
||||
cmd.Use = "create-index NAME ENDPOINT_NAME PRIMARY_KEY INDEX_TYPE"
|
||||
cmd.Short = `Create an index.`
|
||||
cmd.Long = `Create an index.
|
||||
|
||||
|
@ -73,6 +82,7 @@ func newCreateIndex() *cobra.Command {
|
|||
|
||||
Arguments:
|
||||
NAME: Name of the index
|
||||
ENDPOINT_NAME: Name of the endpoint to be used for serving the index
|
||||
PRIMARY_KEY: Primary key of the index
|
||||
INDEX_TYPE: There are 2 types of Vector Search indexes:
|
||||
|
||||
|
@ -88,11 +98,11 @@ func newCreateIndex() *cobra.Command {
|
|||
if cmd.Flags().Changed("json") {
|
||||
err := cobra.ExactArgs(0)(cmd, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("when --json flag is specified, no positional arguments are required. Provide 'name', 'primary_key', 'index_type' in your JSON input")
|
||||
return fmt.Errorf("when --json flag is specified, no positional arguments are required. Provide 'name', 'endpoint_name', 'primary_key', 'index_type' in your JSON input")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
check := cobra.ExactArgs(3)
|
||||
check := cobra.ExactArgs(4)
|
||||
return check(cmd, args)
|
||||
}
|
||||
|
||||
|
@ -111,12 +121,15 @@ func newCreateIndex() *cobra.Command {
|
|||
createIndexReq.Name = args[0]
|
||||
}
|
||||
if !cmd.Flags().Changed("json") {
|
||||
createIndexReq.PrimaryKey = args[1]
|
||||
createIndexReq.EndpointName = args[1]
|
||||
}
|
||||
if !cmd.Flags().Changed("json") {
|
||||
_, err = fmt.Sscan(args[2], &createIndexReq.IndexType)
|
||||
createIndexReq.PrimaryKey = args[2]
|
||||
}
|
||||
if !cmd.Flags().Changed("json") {
|
||||
_, err = fmt.Sscan(args[3], &createIndexReq.IndexType)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid INDEX_TYPE: %s", args[2])
|
||||
return fmt.Errorf("invalid INDEX_TYPE: %s", args[3])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -139,12 +152,6 @@ func newCreateIndex() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreateIndex())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-data-vector-index command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -163,14 +170,14 @@ func newDeleteDataVectorIndex() *cobra.Command {
|
|||
// TODO: short flags
|
||||
cmd.Flags().Var(&deleteDataVectorIndexJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "delete-data-vector-index NAME"
|
||||
cmd.Use = "delete-data-vector-index INDEX_NAME"
|
||||
cmd.Short = `Delete data from index.`
|
||||
cmd.Long = `Delete data from index.
|
||||
|
||||
Handles the deletion of data from a specified vector index.
|
||||
|
||||
Arguments:
|
||||
NAME: Name of the vector index where data is to be deleted. Must be a Direct
|
||||
INDEX_NAME: Name of the vector index where data is to be deleted. Must be a Direct
|
||||
Vector Access Index.`
|
||||
|
||||
cmd.Annotations = make(map[string]string)
|
||||
|
@ -193,7 +200,7 @@ func newDeleteDataVectorIndex() *cobra.Command {
|
|||
} else {
|
||||
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
|
||||
}
|
||||
deleteDataVectorIndexReq.Name = args[0]
|
||||
deleteDataVectorIndexReq.IndexName = args[0]
|
||||
|
||||
response, err := w.VectorSearchIndexes.DeleteDataVectorIndex(ctx, deleteDataVectorIndexReq)
|
||||
if err != nil {
|
||||
|
@ -214,12 +221,6 @@ func newDeleteDataVectorIndex() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteDataVectorIndex())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete-index command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -278,12 +279,6 @@ func newDeleteIndex() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDeleteIndex())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-index command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -342,12 +337,6 @@ func newGetIndex() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetIndex())
|
||||
})
|
||||
}
|
||||
|
||||
// start list-indexes command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -405,12 +394,6 @@ func newListIndexes() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newListIndexes())
|
||||
})
|
||||
}
|
||||
|
||||
// start query-index command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -484,12 +467,6 @@ func newQueryIndex() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newQueryIndex())
|
||||
})
|
||||
}
|
||||
|
||||
// start sync-index command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -548,12 +525,6 @@ func newSyncIndex() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSyncIndex())
|
||||
})
|
||||
}
|
||||
|
||||
// start upsert-data-vector-index command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -572,14 +543,14 @@ func newUpsertDataVectorIndex() *cobra.Command {
|
|||
// TODO: short flags
|
||||
cmd.Flags().Var(&upsertDataVectorIndexJson, "json", `either inline JSON string or @path/to/file.json with request body`)
|
||||
|
||||
cmd.Use = "upsert-data-vector-index NAME INPUTS_JSON"
|
||||
cmd.Use = "upsert-data-vector-index INDEX_NAME INPUTS_JSON"
|
||||
cmd.Short = `Upsert data into an index.`
|
||||
cmd.Long = `Upsert data into an index.
|
||||
|
||||
Handles the upserting of data into a specified vector index.
|
||||
|
||||
Arguments:
|
||||
NAME: Name of the vector index where data is to be upserted. Must be a Direct
|
||||
INDEX_NAME: Name of the vector index where data is to be upserted. Must be a Direct
|
||||
Vector Access Index.
|
||||
INPUTS_JSON: JSON string representing the data to be upserted.`
|
||||
|
||||
|
@ -589,7 +560,7 @@ func newUpsertDataVectorIndex() *cobra.Command {
|
|||
if cmd.Flags().Changed("json") {
|
||||
err := cobra.ExactArgs(1)(cmd, args)
|
||||
if err != nil {
|
||||
return fmt.Errorf("when --json flag is specified, provide only NAME as positional arguments. Provide 'inputs_json' in your JSON input")
|
||||
return fmt.Errorf("when --json flag is specified, provide only INDEX_NAME as positional arguments. Provide 'inputs_json' in your JSON input")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -608,7 +579,7 @@ func newUpsertDataVectorIndex() *cobra.Command {
|
|||
return err
|
||||
}
|
||||
}
|
||||
upsertDataVectorIndexReq.Name = args[0]
|
||||
upsertDataVectorIndexReq.IndexName = args[0]
|
||||
if !cmd.Flags().Changed("json") {
|
||||
upsertDataVectorIndexReq.InputsJson = args[1]
|
||||
}
|
||||
|
@ -632,10 +603,4 @@ func newUpsertDataVectorIndex() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpsertDataVectorIndex())
|
||||
})
|
||||
}
|
||||
|
||||
// end service VectorSearchIndexes
|
||||
|
|
|
@ -34,6 +34,13 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newRead())
|
||||
cmd.AddCommand(newUpdate())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -152,12 +159,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -232,12 +233,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -308,12 +303,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start read command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -389,12 +378,6 @@ func newRead() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newRead())
|
||||
})
|
||||
}
|
||||
|
||||
// start update command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -484,10 +467,4 @@ func newUpdate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdate())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Volumes
|
||||
|
|
|
@ -30,6 +30,21 @@ func New() *cobra.Command {
|
|||
},
|
||||
}
|
||||
|
||||
// Add methods
|
||||
cmd.AddCommand(newCreate())
|
||||
cmd.AddCommand(newDelete())
|
||||
cmd.AddCommand(newEdit())
|
||||
cmd.AddCommand(newGet())
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
cmd.AddCommand(newGetWorkspaceWarehouseConfig())
|
||||
cmd.AddCommand(newList())
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
cmd.AddCommand(newSetWorkspaceWarehouseConfig())
|
||||
cmd.AddCommand(newStart())
|
||||
cmd.AddCommand(newStop())
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
|
||||
// Apply optional overrides to this command.
|
||||
for _, fn := range cmdOverrides {
|
||||
fn(cmd)
|
||||
|
@ -138,12 +153,6 @@ func newCreate() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newCreate())
|
||||
})
|
||||
}
|
||||
|
||||
// start delete command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -214,12 +223,6 @@ func newDelete() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newDelete())
|
||||
})
|
||||
}
|
||||
|
||||
// start edit command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -336,12 +339,6 @@ func newEdit() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newEdit())
|
||||
})
|
||||
}
|
||||
|
||||
// start get command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -417,12 +414,6 @@ func newGet() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGet())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permission-levels command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -493,12 +484,6 @@ func newGetPermissionLevels() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissionLevels())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -570,12 +555,6 @@ func newGetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start get-workspace-warehouse-config command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -619,12 +598,6 @@ func newGetWorkspaceWarehouseConfig() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newGetWorkspaceWarehouseConfig())
|
||||
})
|
||||
}
|
||||
|
||||
// start list command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -677,12 +650,6 @@ func newList() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newList())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -764,12 +731,6 @@ func newSetPermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetPermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// start set-workspace-warehouse-config command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -843,12 +804,6 @@ func newSetWorkspaceWarehouseConfig() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newSetWorkspaceWarehouseConfig())
|
||||
})
|
||||
}
|
||||
|
||||
// start start command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -943,12 +898,6 @@ func newStart() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newStart())
|
||||
})
|
||||
}
|
||||
|
||||
// start stop command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1043,12 +992,6 @@ func newStop() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newStop())
|
||||
})
|
||||
}
|
||||
|
||||
// start update-permissions command
|
||||
|
||||
// Slice with functions to override default command behavior.
|
||||
|
@ -1130,10 +1073,4 @@ func newUpdatePermissions() *cobra.Command {
|
|||
return cmd
|
||||
}
|
||||
|
||||
func init() {
|
||||
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
|
||||
cmd.AddCommand(newUpdatePermissions())
|
||||
})
|
||||
}
|
||||
|
||||
// end service Warehouses
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue