Bump github.com/databricks/databricks-sdk-go from 0.24.0 to 0.25.0 (#980)

Bumps
[github.com/databricks/databricks-sdk-go](https://github.com/databricks/databricks-sdk-go)
from 0.24.0 to 0.25.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/databricks/databricks-sdk-go/blob/main/CHANGELOG.md">github.com/databricks/databricks-sdk-go's
changelog</a>.</em></p>
<blockquote>
<h2>0.25.0</h2>
<ul>
<li>Make sure path parameters are first in order in RequiredFields (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/669">#669</a>).</li>
<li>Added Field.IsRequestBodyField method for code generation (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/670">#670</a>).</li>
<li>Added regressions question to the issue template (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/676">#676</a>).</li>
<li>Added telemetry for CI/CD platform to useragent (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/665">#665</a>).</li>
<li>Skiped GCP Integration Tests using Statement Execution API (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/678">#678</a>).</li>
<li>Added more detailed error message on default credentials not found
error (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/679">#679</a>).</li>
<li>Updated SDK to latest OpenAPI Spec (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/685">#685</a>).</li>
</ul>
<p>API Changes:</p>
<ul>
<li>Changed <code>Create</code> method for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#FunctionsAPI">w.Functions</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#MetastoresAPI">w.Metastores</a>
workspace-level service with new required argument order.</li>
<li>Changed <code>InputParams</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CreateFunction">catalog.CreateFunction</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#FunctionInfo">catalog.FunctionInfo</a>
to <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#FunctionParameterInfos">catalog.FunctionParameterInfos</a>.</li>
<li>Changed <code>Properties</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CreateFunction">catalog.CreateFunction</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#FunctionInfo">catalog.FunctionInfo</a>
to <code>string</code>.</li>
<li>Changed <code>ReturnParams</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CreateFunction">catalog.CreateFunction</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#FunctionInfo">catalog.FunctionInfo</a>
to <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#FunctionParameterInfos">catalog.FunctionParameterInfos</a></li>
<li>Changed <code>StorageRoot</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CreateMetastore">catalog.CreateMetastore</a>
to no longer be required.</li>
<li>Added <code>SkipValidation</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateExternalLocation">catalog.UpdateExternalLocation</a>.</li>
<li>Added <code>Libraries</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#CreatePolicy">compute.CreatePolicy</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#EditPolicy">compute.EditPolicy</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#Policy">compute.Policy</a>.</li>
<li>Added <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#InitScriptEventDetails">compute.InitScriptEventDetails</a>.</li>
<li>Added <code>InitScripts</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#EventDetails">compute.EventDetails</a>.</li>
<li>Added <code>File</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#InitScriptInfo">compute.InitScriptInfo</a>.</li>
<li>Added <code>ZoneId</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#InstancePoolGcpAttributes">compute.InstancePoolGcpAttributes</a>.</li>
<li>Added <code>IncludeResolvedValues</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#GetRunRequest">jobs.GetRunRequest</a>.</li>
<li>Added <code>EditMode</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#CreateJob">jobs.CreateJob</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#JobSettings">jobs.JobSettings</a>.</li>
<li>Added <code>NetworkConnectivityConfigId</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/provisioning#UpdateWorkspaceRequest">provisioning.UpdateWorkspaceRequest</a>.</li>
<li>Added <code>ContainerLogs</code> and <code>ExtraInfo</code> field
for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#DeploymentStatus">serving.DeploymentStatus</a>.</li>
<li>Added <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CreateFunctionRequest">catalog.CreateFunctionRequest</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#DependencyList">catalog.DependencyList</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#FunctionParameterInfos">catalog.FunctionParameterInfos</a>.</li>
<li>Added <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#InitScriptExecutionDetails">compute.InitScriptExecutionDetails</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#InitScriptExecutionDetailsStatus">compute.InitScriptExecutionDetailsStatus</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#InitScriptInfoAndExecutionDetails">compute.InitScriptInfoAndExecutionDetails</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#LocalFileInfo">compute.LocalFileInfo</a>.</li>
<li>Added <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#CreateJobEditMode">jobs.CreateJobEditMode</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#JobSettingsEditMode">jobs.JobSettingsEditMode</a>.</li>
<li>Added <code>DeleteApp</code>, <code>GetApp</code>,
<code>GetAppDeploymentStatus</code>, <code>GetApps</code> and
<code>GetEvents</code> method for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppsAPI">w.Apps</a>
workspace-level service.</li>
<li>Added <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppEvents">serving.AppEvents</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppServiceStatus">serving.AppServiceStatus</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#DeleteAppResponse">serving.DeleteAppResponse</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#GetAppDeploymentStatusRequest">serving.GetAppDeploymentStatusRequest</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#GetAppResponse">serving.GetAppResponse</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#GetEventsRequest">serving.GetEventsRequest</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ListAppEventsResponse">serving.ListAppEventsResponse</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#ListAppsResponse">serving.ListAppsResponse</a>.</li>
<li>Added <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NetworkConnectivityAPI">a.NetworkConnectivity</a>
account-level service.</li>
<li>Added <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#CreateNetworkConnectivityConfigRequest">settings.CreateNetworkConnectivityConfigRequest</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#CreatePrivateEndpointRuleRequest">settings.CreatePrivateEndpointRuleRequest</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#CreatePrivateEndpointRuleRequestGroupId">settings.CreatePrivateEndpointRuleRequestGroupId</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#DeleteNetworkConnectivityConfigurationRequest">settings.DeleteNetworkConnectivityConfigurationRequest</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#DeletePrivateEndpointRuleRequest">settings.DeletePrivateEndpointRuleRequest</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#GetNetworkConnectivityConfigurationRequest">settings.GetNetworkConnectivityConfigurationRequest</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#GetPrivateEndpointRuleRequest">settings.GetPrivateEndpointRuleRequest</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccAzurePrivateEndpointRule">settings.NccAzurePrivateEndpointRule</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccAzurePrivateEndpointRuleConnectionState">settings.NccAzurePrivateEndpointRuleConnectionState</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccAzurePrivateEndpointRuleGroupId">settings.NccAzurePrivateEndpointRuleGroupId</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccAzureServiceEndpointRule">settings.NccAzureServiceEndpointRule</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccEgressConfig">settings.NccEgressConfig</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccEgressDefaultRules">settings.NccEgressDefaultRules</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccEgressTargetRules">settings.NccEgressTargetRules</a>,
<a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NetworkConnectivityConfiguration">settings.NetworkConnectivityConfiguration</a>.</li>
<li>Removed <code>Delete</code>, <code>Get</code>, method for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#AppsAPI">w.Apps</a>
workspace-level service.</li>
<li>Removed <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#JobSettingsUiState">jobs.JobSettingsUiState</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#CreateJobUiState">jobs.CreateJobUiState</a>.</li>
<li>Removed <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#OAuthEnrollmentAPI">a.OAuthEnrollment</a>
account-level service.</li>
<li>Removed <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#CreateOAuthEnrollment">oauth2.CreateOAuthEnrollment</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#OAuthEnrollmentStatus">oauth2.OAuthEnrollmentStatus</a>.</li>
<li>Removed <code>UiState</code> field for <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#CreateJob">jobs.CreateJob</a>
and <a
href="https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#JobSettings">jobs.JobSettings</a>.</li>
</ul>
<p>OpenAPI SHA: e7b127cb07af8dd4d8c61c7cc045c8910cdbb02a, Date:
2023-11-08
Dependency updates:</p>
<ul>
<li>Bump google.golang.org/api from 0.146.0 to 0.150.0 (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/683">#683</a>).</li>
<li>Bump golang.org/x/mod from 0.13.0 to 0.14.0 (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/681">#681</a>).</li>
<li>Bump google.golang.org/grpc from 1.58.2 to 1.58.3 in /examples/slog
(<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/672">#672</a>).</li>
<li>Bump google.golang.org/grpc to 1.58.3 in /examples/zerolog (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/684">#684</a>).</li>
<li>Bump golang.org/x/time from 0.3.0 to 0.4.0 (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/680">#680</a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="03b614c890"><code>03b614c</code></a>
Release v0.25.0 (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/687">#687</a>)</li>
<li><a
href="16970dfeb3"><code>16970df</code></a>
Update SDK to latest OpenAPI Spec (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/685">#685</a>)</li>
<li><a
href="712fcfed33"><code>712fcfe</code></a>
Bump golang.org/x/time from 0.3.0 to 0.4.0 (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/680">#680</a>)</li>
<li><a
href="3215e790ed"><code>3215e79</code></a>
Bump google.golang.org/grpc from 1.58.2 to 1.58.3 in /examples/zerolog
(<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/684">#684</a>)</li>
<li><a
href="f06dd7330c"><code>f06dd73</code></a>
Bump google.golang.org/grpc from 1.58.2 to 1.58.3 in /examples/slog (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/672">#672</a>)</li>
<li><a
href="2bb6c8de98"><code>2bb6c8d</code></a>
Bump google.golang.org/grpc from 1.57.0 to 1.57.1 in /examples/zerolog
(<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/674">#674</a>)</li>
<li><a
href="e045c01326"><code>e045c01</code></a>
Bump golang.org/x/mod from 0.13.0 to 0.14.0 (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/681">#681</a>)</li>
<li><a
href="7e28d29f91"><code>7e28d29</code></a>
Bump google.golang.org/api from 0.146.0 to 0.150.0 (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/683">#683</a>)</li>
<li><a
href="6e2bb1def4"><code>6e2bb1d</code></a>
Add more detailed error message on default credentials not found error
(<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/679">#679</a>)</li>
<li><a
href="33c1c8718f"><code>33c1c87</code></a>
Skip GCP Integration Tests using Statement Execution API (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/678">#678</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/databricks/databricks-sdk-go/compare/v0.24.0...v0.25.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/databricks/databricks-sdk-go&package-manager=go_modules&previous-version=0.24.0&new-version=0.25.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Nester <andrew.nester@databricks.com>
This commit is contained in:
dependabot[bot] 2023-11-13 16:38:35 +01:00 committed by GitHub
parent b2055ed49e
commit c3ced68c60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 735 additions and 356 deletions

View File

@ -1 +1 @@
5903bb39137fd76ac384b2044e425f9c56840e00 e7b127cb07af8dd4d8c61c7cc045c8910cdbb02a

2
.gitattributes vendored
View File

@ -10,9 +10,9 @@ cmd/account/ip-access-lists/ip-access-lists.go linguist-generated=true
cmd/account/log-delivery/log-delivery.go linguist-generated=true cmd/account/log-delivery/log-delivery.go linguist-generated=true
cmd/account/metastore-assignments/metastore-assignments.go linguist-generated=true cmd/account/metastore-assignments/metastore-assignments.go linguist-generated=true
cmd/account/metastores/metastores.go linguist-generated=true cmd/account/metastores/metastores.go linguist-generated=true
cmd/account/network-connectivity/network-connectivity.go linguist-generated=true
cmd/account/network-policy/network-policy.go linguist-generated=true cmd/account/network-policy/network-policy.go linguist-generated=true
cmd/account/networks/networks.go linguist-generated=true cmd/account/networks/networks.go linguist-generated=true
cmd/account/o-auth-enrollment/o-auth-enrollment.go linguist-generated=true
cmd/account/o-auth-published-apps/o-auth-published-apps.go linguist-generated=true cmd/account/o-auth-published-apps/o-auth-published-apps.go linguist-generated=true
cmd/account/private-access/private-access.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/published-app-integration/published-app-integration.go linguist-generated=true

4
cmd/account/cmd.go generated
View File

@ -16,9 +16,9 @@ import (
log_delivery "github.com/databricks/cli/cmd/account/log-delivery" log_delivery "github.com/databricks/cli/cmd/account/log-delivery"
account_metastore_assignments "github.com/databricks/cli/cmd/account/metastore-assignments" account_metastore_assignments "github.com/databricks/cli/cmd/account/metastore-assignments"
account_metastores "github.com/databricks/cli/cmd/account/metastores" account_metastores "github.com/databricks/cli/cmd/account/metastores"
network_connectivity "github.com/databricks/cli/cmd/account/network-connectivity"
account_network_policy "github.com/databricks/cli/cmd/account/network-policy" account_network_policy "github.com/databricks/cli/cmd/account/network-policy"
networks "github.com/databricks/cli/cmd/account/networks" networks "github.com/databricks/cli/cmd/account/networks"
o_auth_enrollment "github.com/databricks/cli/cmd/account/o-auth-enrollment"
o_auth_published_apps "github.com/databricks/cli/cmd/account/o-auth-published-apps" o_auth_published_apps "github.com/databricks/cli/cmd/account/o-auth-published-apps"
private_access "github.com/databricks/cli/cmd/account/private-access" private_access "github.com/databricks/cli/cmd/account/private-access"
published_app_integration "github.com/databricks/cli/cmd/account/published-app-integration" published_app_integration "github.com/databricks/cli/cmd/account/published-app-integration"
@ -50,9 +50,9 @@ func New() *cobra.Command {
cmd.AddCommand(log_delivery.New()) cmd.AddCommand(log_delivery.New())
cmd.AddCommand(account_metastore_assignments.New()) cmd.AddCommand(account_metastore_assignments.New())
cmd.AddCommand(account_metastores.New()) cmd.AddCommand(account_metastores.New())
cmd.AddCommand(network_connectivity.New())
cmd.AddCommand(account_network_policy.New()) cmd.AddCommand(account_network_policy.New())
cmd.AddCommand(networks.New()) cmd.AddCommand(networks.New())
cmd.AddCommand(o_auth_enrollment.New())
cmd.AddCommand(o_auth_published_apps.New()) cmd.AddCommand(o_auth_published_apps.New())
cmd.AddCommand(private_access.New()) cmd.AddCommand(private_access.New())
cmd.AddCommand(published_app_integration.New()) cmd.AddCommand(published_app_integration.New())

View File

@ -0,0 +1,483 @@
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package network_connectivity
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: "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`,
GroupID: "settings",
Annotations: map[string]string{
"package": "settings",
},
}
// Apply optional overrides to this command.
for _, fn := range cmdOverrides {
fn(cmd)
}
return cmd
}
// start create-network-connectivity-configuration 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 createNetworkConnectivityConfigurationOverrides []func(
*cobra.Command,
*settings.CreateNetworkConnectivityConfigRequest,
)
func newCreateNetworkConnectivityConfiguration() *cobra.Command {
cmd := &cobra.Command{}
var createNetworkConnectivityConfigurationReq settings.CreateNetworkConnectivityConfigRequest
var createNetworkConnectivityConfigurationJson flags.JsonFlag
// TODO: short flags
cmd.Flags().Var(&createNetworkConnectivityConfigurationJson, "json", `either inline JSON string or @path/to/file.json with request body`)
cmd.Use = "create-network-connectivity-configuration NAME REGION"
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`
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 'name', 'region' in your JSON input")
}
return nil
}
check := cobra.ExactArgs(2)
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)
if cmd.Flags().Changed("json") {
err = createNetworkConnectivityConfigurationJson.Unmarshal(&createNetworkConnectivityConfigurationReq)
if err != nil {
return err
}
}
if !cmd.Flags().Changed("json") {
createNetworkConnectivityConfigurationReq.Name = args[0]
}
if !cmd.Flags().Changed("json") {
createNetworkConnectivityConfigurationReq.Region = args[1]
}
response, err := a.NetworkConnectivity.CreateNetworkConnectivityConfiguration(ctx, createNetworkConnectivityConfigurationReq)
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 createNetworkConnectivityConfigurationOverrides {
fn(cmd, &createNetworkConnectivityConfigurationReq)
}
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.
// Functions can be added from the `init()` function in manually curated files in this directory.
var createPrivateEndpointRuleOverrides []func(
*cobra.Command,
*settings.CreatePrivateEndpointRuleRequest,
)
func newCreatePrivateEndpointRule() *cobra.Command {
cmd := &cobra.Command{}
var createPrivateEndpointRuleReq settings.CreatePrivateEndpointRuleRequest
var createPrivateEndpointRuleJson flags.JsonFlag
// TODO: short flags
cmd.Flags().Var(&createPrivateEndpointRuleJson, "json", `either inline JSON string or @path/to/file.json with request body`)
cmd.Use = "create-private-endpoint-rule NETWORK_CONNECTIVITY_CONFIG_ID RESOURCE_ID GROUP_ID"
cmd.Short = `Create a private endpoint rule.`
cmd.Long = `Create a private endpoint rule.
Create a private endpoint rule for the specified network connectivity config
object. Once the object is created, Databricks asynchronously provisions a new
Azure private endpoint to your specified Azure resource.
**IMPORTANT**: You must use Azure portal or other Azure tools to approve the
private endpoint to complete the connection. To get the information of the
private endpoint created, make a GET request on the new private endpoint
rule. See [serverless private link].
[serverless private link]: https://learn.microsoft.com/azure/databricks/security/network/serverless-network-security/serverless-private-link`
cmd.Annotations = make(map[string]string)
cmd.Args = func(cmd *cobra.Command, args []string) error {
if cmd.Flags().Changed("json") {
err := cobra.ExactArgs(1)(cmd, args)
if err != nil {
return fmt.Errorf("when --json flag is specified, provide only NETWORK_CONNECTIVITY_CONFIG_ID as positional arguments. Provide 'resource_id', 'group_id' in your JSON input")
}
return nil
}
check := cobra.ExactArgs(3)
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)
if cmd.Flags().Changed("json") {
err = createPrivateEndpointRuleJson.Unmarshal(&createPrivateEndpointRuleReq)
if err != nil {
return err
}
}
createPrivateEndpointRuleReq.NetworkConnectivityConfigId = args[0]
if !cmd.Flags().Changed("json") {
createPrivateEndpointRuleReq.ResourceId = args[1]
}
if !cmd.Flags().Changed("json") {
_, err = fmt.Sscan(args[2], &createPrivateEndpointRuleReq.GroupId)
if err != nil {
return fmt.Errorf("invalid GROUP_ID: %s", args[2])
}
}
response, err := a.NetworkConnectivity.CreatePrivateEndpointRule(ctx, createPrivateEndpointRuleReq)
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 createPrivateEndpointRuleOverrides {
fn(cmd, &createPrivateEndpointRuleReq)
}
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.
// Functions can be added from the `init()` function in manually curated files in this directory.
var deleteNetworkConnectivityConfigurationOverrides []func(
*cobra.Command,
*settings.DeleteNetworkConnectivityConfigurationRequest,
)
func newDeleteNetworkConnectivityConfiguration() *cobra.Command {
cmd := &cobra.Command{}
var deleteNetworkConnectivityConfigurationReq settings.DeleteNetworkConnectivityConfigurationRequest
// TODO: short flags
cmd.Use = "delete-network-connectivity-configuration NETWORK_CONNECTIVITY_CONFIG_ID"
cmd.Short = `Delete a network connectivity configuration.`
cmd.Long = `Delete a network connectivity configuration.
Deletes a network connectivity configuration.`
cmd.Annotations = make(map[string]string)
cmd.Args = func(cmd *cobra.Command, args []string) error {
check := cobra.ExactArgs(1)
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)
deleteNetworkConnectivityConfigurationReq.NetworkConnectivityConfigId = args[0]
err = a.NetworkConnectivity.DeleteNetworkConnectivityConfiguration(ctx, deleteNetworkConnectivityConfigurationReq)
if err != nil {
return err
}
return nil
}
// 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 deleteNetworkConnectivityConfigurationOverrides {
fn(cmd, &deleteNetworkConnectivityConfigurationReq)
}
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.
// Functions can be added from the `init()` function in manually curated files in this directory.
var deletePrivateEndpointRuleOverrides []func(
*cobra.Command,
*settings.DeletePrivateEndpointRuleRequest,
)
func newDeletePrivateEndpointRule() *cobra.Command {
cmd := &cobra.Command{}
var deletePrivateEndpointRuleReq settings.DeletePrivateEndpointRuleRequest
// TODO: short flags
cmd.Use = "delete-private-endpoint-rule NETWORK_CONNECTIVITY_CONFIG_ID PRIVATE_ENDPOINT_RULE_ID"
cmd.Short = `Delete a private endpoint rule.`
cmd.Long = `Delete a private endpoint rule.
Initiates deleting a private endpoint rule. The private endpoint will be
deactivated and will be purged after seven days of deactivation. When a
private endpoint is in deactivated state, deactivated field is set to true
and the private endpoint is not available to your serverless compute
resources.`
cmd.Annotations = make(map[string]string)
cmd.Args = func(cmd *cobra.Command, args []string) error {
check := cobra.ExactArgs(2)
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)
deletePrivateEndpointRuleReq.NetworkConnectivityConfigId = args[0]
deletePrivateEndpointRuleReq.PrivateEndpointRuleId = args[1]
response, err := a.NetworkConnectivity.DeletePrivateEndpointRule(ctx, deletePrivateEndpointRuleReq)
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 deletePrivateEndpointRuleOverrides {
fn(cmd, &deletePrivateEndpointRuleReq)
}
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.
// Functions can be added from the `init()` function in manually curated files in this directory.
var getNetworkConnectivityConfigurationOverrides []func(
*cobra.Command,
*settings.GetNetworkConnectivityConfigurationRequest,
)
func newGetNetworkConnectivityConfiguration() *cobra.Command {
cmd := &cobra.Command{}
var getNetworkConnectivityConfigurationReq settings.GetNetworkConnectivityConfigurationRequest
// TODO: short flags
cmd.Use = "get-network-connectivity-configuration NETWORK_CONNECTIVITY_CONFIG_ID"
cmd.Short = `Get a network connectivity configuration.`
cmd.Long = `Get a network connectivity configuration.
Gets a network connectivity configuration.`
cmd.Annotations = make(map[string]string)
cmd.Args = func(cmd *cobra.Command, args []string) error {
check := cobra.ExactArgs(1)
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)
getNetworkConnectivityConfigurationReq.NetworkConnectivityConfigId = args[0]
response, err := a.NetworkConnectivity.GetNetworkConnectivityConfiguration(ctx, getNetworkConnectivityConfigurationReq)
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 getNetworkConnectivityConfigurationOverrides {
fn(cmd, &getNetworkConnectivityConfigurationReq)
}
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.
// Functions can be added from the `init()` function in manually curated files in this directory.
var getPrivateEndpointRuleOverrides []func(
*cobra.Command,
*settings.GetPrivateEndpointRuleRequest,
)
func newGetPrivateEndpointRule() *cobra.Command {
cmd := &cobra.Command{}
var getPrivateEndpointRuleReq settings.GetPrivateEndpointRuleRequest
// TODO: short flags
cmd.Use = "get-private-endpoint-rule NETWORK_CONNECTIVITY_CONFIG_ID PRIVATE_ENDPOINT_RULE_ID"
cmd.Short = `Get a private endpoint rule.`
cmd.Long = `Get a private endpoint rule.
Gets the private endpoint rule.`
cmd.Annotations = make(map[string]string)
cmd.Args = func(cmd *cobra.Command, args []string) error {
check := cobra.ExactArgs(2)
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)
getPrivateEndpointRuleReq.NetworkConnectivityConfigId = args[0]
getPrivateEndpointRuleReq.PrivateEndpointRuleId = args[1]
response, err := a.NetworkConnectivity.GetPrivateEndpointRule(ctx, getPrivateEndpointRuleReq)
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 getPrivateEndpointRuleOverrides {
fn(cmd, &getPrivateEndpointRuleReq)
}
return cmd
}
func init() {
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
cmd.AddCommand(newGetPrivateEndpointRule())
})
}
// end service NetworkConnectivity

View File

@ -1,169 +0,0 @@
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package o_auth_enrollment
import (
"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/oauth2"
"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: "o-auth-enrollment",
Short: `These APIs enable administrators to enroll OAuth for their accounts, which is required for adding/using any OAuth published/custom application integration.`,
Long: `These APIs enable administrators to enroll OAuth for their accounts, which is
required for adding/using any OAuth published/custom application integration.
**Note:** Your account must be on the E2 version to use these APIs, this is
because OAuth is only supported on the E2 version.`,
GroupID: "oauth2",
Annotations: map[string]string{
"package": "oauth2",
},
}
// Apply optional overrides to this command.
for _, fn := range cmdOverrides {
fn(cmd)
}
return cmd
}
// start create 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 createOverrides []func(
*cobra.Command,
*oauth2.CreateOAuthEnrollment,
)
func newCreate() *cobra.Command {
cmd := &cobra.Command{}
var createReq oauth2.CreateOAuthEnrollment
var createJson flags.JsonFlag
// TODO: short flags
cmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
cmd.Flags().BoolVar(&createReq.EnableAllPublishedApps, "enable-all-published-apps", createReq.EnableAllPublishedApps, `If true, enable OAuth for all the published applications in the account.`)
cmd.Use = "create"
cmd.Short = `Create OAuth Enrollment request.`
cmd.Long = `Create OAuth Enrollment request.
Create an OAuth Enrollment request to enroll OAuth for this account and
optionally enable the OAuth integration for all the partner applications in
the account.
The parter applications are: - Power BI - Tableau Desktop - Databricks CLI
The enrollment is executed asynchronously, so the API will return 204
immediately. The actual enrollment take a few minutes, you can check the
status via API :method:OAuthEnrollment/get.`
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)
if cmd.Flags().Changed("json") {
err = createJson.Unmarshal(&createReq)
if err != nil {
return err
}
}
err = a.OAuthEnrollment.Create(ctx, createReq)
if err != nil {
return err
}
return nil
}
// 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 createOverrides {
fn(cmd, &createReq)
}
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.
// Functions can be added from the `init()` function in manually curated files in this directory.
var getOverrides []func(
*cobra.Command,
)
func newGet() *cobra.Command {
cmd := &cobra.Command{}
cmd.Use = "get"
cmd.Short = `Get OAuth enrollment status.`
cmd.Long = `Get OAuth enrollment status.
Gets the OAuth enrollment status for this Account.
You can only add/use the OAuth published/custom application integrations when
OAuth enrollment status is enabled.`
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)
response, err := a.OAuthEnrollment.Get(ctx)
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)
}
return cmd
}
func init() {
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
cmd.AddCommand(newGet())
})
}
// end service OAuthEnrollment

View File

@ -1,107 +0,0 @@
package o_auth_enrollment
import (
"context"
"fmt"
"time"
"github.com/databricks/cli/libs/cmdio"
"github.com/databricks/databricks-sdk-go"
"github.com/databricks/databricks-sdk-go/retries"
"github.com/databricks/databricks-sdk-go/service/oauth2"
"github.com/spf13/cobra"
)
func promptForBasicAccountConfig(ctx context.Context) (*databricks.Config, error) {
if !cmdio.IsInTTY(ctx) {
return nil, fmt.Errorf("this command requires a TTY")
}
// OAuth Enrollment only works on AWS
host, err := cmdio.DefaultPrompt(ctx, "Host", "https://accounts.cloud.databricks.com")
if err != nil {
return nil, fmt.Errorf("host: %w", err)
}
accountID, err := cmdio.SimplePrompt(ctx, "Account ID")
if err != nil {
return nil, fmt.Errorf("account: %w", err)
}
username, err := cmdio.SimplePrompt(ctx, "Username")
if err != nil {
return nil, fmt.Errorf("username: %w", err)
}
password, err := cmdio.Secret(ctx, "Password")
if err != nil {
return nil, fmt.Errorf("password: %w", err)
}
return &databricks.Config{
Host: host,
AccountID: accountID,
Username: username,
Password: password,
}, nil
}
func enableOAuthForAccount(ctx context.Context, cfg *databricks.Config) error {
ac, err := databricks.NewAccountClient(cfg)
if err != nil {
return fmt.Errorf("failed to instantiate account client: %w", err)
}
// The enrollment is executed asynchronously, so the API returns HTTP 204 immediately
err = ac.OAuthEnrollment.Create(ctx, oauth2.CreateOAuthEnrollment{
EnableAllPublishedApps: true,
})
if err != nil {
return fmt.Errorf("failed to create oauth enrollment: %w", err)
}
enableSpinner := cmdio.Spinner(ctx)
// The actual enrollment take a few minutes
err = retries.Wait(ctx, 10*time.Minute, func() *retries.Err {
status, err := ac.OAuthEnrollment.Get(ctx)
if err != nil {
return retries.Halt(err)
}
if !status.IsEnabled {
msg := "Enabling OAuth..."
enableSpinner <- msg
return retries.Continues(msg)
}
enableSpinner <- "OAuth is enabled"
close(enableSpinner)
return nil
})
if err != nil {
return fmt.Errorf("wait for enrollment: %w", err)
}
// enable Databricks CLI, so that `databricks auth login` works
_, err = ac.PublishedAppIntegration.Create(ctx, oauth2.CreatePublishedAppIntegration{
AppId: "databricks-cli",
})
if err != nil {
return fmt.Errorf("failed to enable databricks CLI: %w", err)
}
return nil
}
func newEnable() *cobra.Command {
return &cobra.Command{
Use: "enable",
Short: "Enable Databricks CLI, Tableau Desktop, and PowerBI for this account.",
Long: `Before you can do 'databricks auth login', you have to enable OAuth for this account.
This command prompts you for Account ID, username, and password and waits until OAuth is enabled.`,
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
cfg, err := promptForBasicAccountConfig(ctx)
if err != nil {
return fmt.Errorf("account config: %w", err)
}
return enableOAuthForAccount(ctx, cfg)
},
}
}
func init() {
cmdOverrides = append(cmdOverrides, func(c *cobra.Command) {
c.AddCommand(newEnable())
})
}

View File

@ -67,7 +67,7 @@ func newCreate() *cobra.Command {
cmd.Flags().StringVar(&createReq.DisplayName, "display-name", createReq.DisplayName, `String that represents a concatenation of given and family names.`) cmd.Flags().StringVar(&createReq.DisplayName, "display-name", createReq.DisplayName, `String that represents a concatenation of given and family names.`)
// TODO: array: emails // TODO: array: emails
// TODO: array: entitlements // TODO: array: entitlements
cmd.Flags().StringVar(&createReq.ExternalId, "external-id", createReq.ExternalId, ``) cmd.Flags().StringVar(&createReq.ExternalId, "external-id", createReq.ExternalId, `External ID is not currently supported.`)
// TODO: array: groups // TODO: array: groups
cmd.Flags().StringVar(&createReq.Id, "id", createReq.Id, `Databricks user ID.`) cmd.Flags().StringVar(&createReq.Id, "id", createReq.Id, `Databricks user ID.`)
// TODO: complex arg: name // TODO: complex arg: name
@ -455,7 +455,7 @@ func newUpdate() *cobra.Command {
cmd.Flags().StringVar(&updateReq.DisplayName, "display-name", updateReq.DisplayName, `String that represents a concatenation of given and family names.`) cmd.Flags().StringVar(&updateReq.DisplayName, "display-name", updateReq.DisplayName, `String that represents a concatenation of given and family names.`)
// TODO: array: emails // TODO: array: emails
// TODO: array: entitlements // TODO: array: entitlements
cmd.Flags().StringVar(&updateReq.ExternalId, "external-id", updateReq.ExternalId, ``) cmd.Flags().StringVar(&updateReq.ExternalId, "external-id", updateReq.ExternalId, `External ID is not currently supported.`)
// TODO: array: groups // TODO: array: groups
cmd.Flags().StringVar(&updateReq.Id, "id", updateReq.Id, `Databricks user ID.`) cmd.Flags().StringVar(&updateReq.Id, "id", updateReq.Id, `Databricks user ID.`)
// TODO: complex arg: name // TODO: complex arg: name

View File

@ -413,6 +413,7 @@ func newUpdate() *cobra.Command {
cmd.Flags().StringVar(&updateReq.CredentialsId, "credentials-id", updateReq.CredentialsId, `ID of the workspace's credential configuration object.`) cmd.Flags().StringVar(&updateReq.CredentialsId, "credentials-id", updateReq.CredentialsId, `ID of the workspace's credential configuration object.`)
// TODO: map via StringToStringVar: custom_tags // 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.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.NetworkId, "network-id", updateReq.NetworkId, `The ID of the workspace's network configuration object.`) 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.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.`) cmd.Flags().StringVar(&updateReq.StorageCustomerManagedKeyId, "storage-customer-managed-key-id", updateReq.StorageCustomerManagedKeyId, `The ID of the key configuration object for workspace storage.`)

View File

@ -107,23 +107,23 @@ func init() {
}) })
} }
// start delete command // start delete-app command
// Slice with functions to override default command behavior. // Slice with functions to override default command behavior.
// Functions can be added from the `init()` function in manually curated files in this directory. // Functions can be added from the `init()` function in manually curated files in this directory.
var deleteOverrides []func( var deleteAppOverrides []func(
*cobra.Command, *cobra.Command,
*serving.DeleteAppRequest, *serving.DeleteAppRequest,
) )
func newDelete() *cobra.Command { func newDeleteApp() *cobra.Command {
cmd := &cobra.Command{} cmd := &cobra.Command{}
var deleteReq serving.DeleteAppRequest var deleteAppReq serving.DeleteAppRequest
// TODO: short flags // TODO: short flags
cmd.Use = "delete NAME" cmd.Use = "delete-app NAME"
cmd.Short = `Delete an application.` cmd.Short = `Delete an application.`
cmd.Long = `Delete an application. cmd.Long = `Delete an application.
@ -141,13 +141,13 @@ func newDelete() *cobra.Command {
ctx := cmd.Context() ctx := cmd.Context()
w := root.WorkspaceClient(ctx) w := root.WorkspaceClient(ctx)
deleteReq.Name = args[0] deleteAppReq.Name = args[0]
err = w.Apps.Delete(ctx, deleteReq) response, err := w.Apps.DeleteApp(ctx, deleteAppReq)
if err != nil { if err != nil {
return err return err
} }
return nil return cmdio.Render(ctx, response)
} }
// Disable completions since they are not applicable. // Disable completions since they are not applicable.
@ -155,8 +155,8 @@ func newDelete() *cobra.Command {
cmd.ValidArgsFunction = cobra.NoFileCompletions cmd.ValidArgsFunction = cobra.NoFileCompletions
// Apply optional overrides to this command. // Apply optional overrides to this command.
for _, fn := range deleteOverrides { for _, fn := range deleteAppOverrides {
fn(cmd, &deleteReq) fn(cmd, &deleteAppReq)
} }
return cmd return cmd
@ -164,27 +164,27 @@ func newDelete() *cobra.Command {
func init() { func init() {
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) { cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
cmd.AddCommand(newDelete()) cmd.AddCommand(newDeleteApp())
}) })
} }
// start get command // start get-app command
// Slice with functions to override default command behavior. // Slice with functions to override default command behavior.
// Functions can be added from the `init()` function in manually curated files in this directory. // Functions can be added from the `init()` function in manually curated files in this directory.
var getOverrides []func( var getAppOverrides []func(
*cobra.Command, *cobra.Command,
*serving.GetAppRequest, *serving.GetAppRequest,
) )
func newGet() *cobra.Command { func newGetApp() *cobra.Command {
cmd := &cobra.Command{} cmd := &cobra.Command{}
var getReq serving.GetAppRequest var getAppReq serving.GetAppRequest
// TODO: short flags // TODO: short flags
cmd.Use = "get NAME" cmd.Use = "get-app NAME"
cmd.Short = `Get definition for an application.` cmd.Short = `Get definition for an application.`
cmd.Long = `Get definition for an application. cmd.Long = `Get definition for an application.
@ -202,13 +202,13 @@ func newGet() *cobra.Command {
ctx := cmd.Context() ctx := cmd.Context()
w := root.WorkspaceClient(ctx) w := root.WorkspaceClient(ctx)
getReq.Name = args[0] getAppReq.Name = args[0]
err = w.Apps.Get(ctx, getReq) response, err := w.Apps.GetApp(ctx, getAppReq)
if err != nil { if err != nil {
return err return err
} }
return nil return cmdio.Render(ctx, response)
} }
// Disable completions since they are not applicable. // Disable completions since they are not applicable.
@ -216,8 +216,8 @@ func newGet() *cobra.Command {
cmd.ValidArgsFunction = cobra.NoFileCompletions cmd.ValidArgsFunction = cobra.NoFileCompletions
// Apply optional overrides to this command. // Apply optional overrides to this command.
for _, fn := range getOverrides { for _, fn := range getAppOverrides {
fn(cmd, &getReq) fn(cmd, &getAppReq)
} }
return cmd return cmd
@ -225,7 +225,179 @@ func newGet() *cobra.Command {
func init() { func init() {
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) { cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
cmd.AddCommand(newGet()) cmd.AddCommand(newGetApp())
})
}
// start get-app-deployment-status 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 getAppDeploymentStatusOverrides []func(
*cobra.Command,
*serving.GetAppDeploymentStatusRequest,
)
func newGetAppDeploymentStatus() *cobra.Command {
cmd := &cobra.Command{}
var getAppDeploymentStatusReq serving.GetAppDeploymentStatusRequest
// TODO: short flags
cmd.Flags().StringVar(&getAppDeploymentStatusReq.IncludeAppLog, "include-app-log", getAppDeploymentStatusReq.IncludeAppLog, `Boolean flag to include application logs.`)
cmd.Use = "get-app-deployment-status DEPLOYMENT_ID"
cmd.Short = `Get deployment status for an application.`
cmd.Long = `Get deployment status for an application.
Get deployment status for an application`
cmd.Annotations = make(map[string]string)
cmd.Args = func(cmd *cobra.Command, args []string) error {
check := cobra.ExactArgs(1)
return check(cmd, args)
}
cmd.PreRunE = root.MustWorkspaceClient
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
ctx := cmd.Context()
w := root.WorkspaceClient(ctx)
getAppDeploymentStatusReq.DeploymentId = args[0]
response, err := w.Apps.GetAppDeploymentStatus(ctx, getAppDeploymentStatusReq)
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 getAppDeploymentStatusOverrides {
fn(cmd, &getAppDeploymentStatusReq)
}
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.
// Functions can be added from the `init()` function in manually curated files in this directory.
var getAppsOverrides []func(
*cobra.Command,
)
func newGetApps() *cobra.Command {
cmd := &cobra.Command{}
cmd.Use = "get-apps"
cmd.Short = `List all applications.`
cmd.Long = `List all applications.
List all available applications`
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)
response, err := w.Apps.GetApps(ctx)
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 getAppsOverrides {
fn(cmd)
}
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.
// Functions can be added from the `init()` function in manually curated files in this directory.
var getEventsOverrides []func(
*cobra.Command,
*serving.GetEventsRequest,
)
func newGetEvents() *cobra.Command {
cmd := &cobra.Command{}
var getEventsReq serving.GetEventsRequest
// TODO: short flags
cmd.Use = "get-events NAME"
cmd.Short = `Get deployment events for an application.`
cmd.Long = `Get deployment events for an application.
Get deployment events for an application`
cmd.Annotations = make(map[string]string)
cmd.Args = func(cmd *cobra.Command, args []string) error {
check := cobra.ExactArgs(1)
return check(cmd, args)
}
cmd.PreRunE = root.MustWorkspaceClient
cmd.RunE = func(cmd *cobra.Command, args []string) (err error) {
ctx := cmd.Context()
w := root.WorkspaceClient(ctx)
getEventsReq.Name = args[0]
response, err := w.Apps.GetEvents(ctx, getEventsReq)
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 getEventsOverrides {
fn(cmd, &getEventsReq)
}
return cmd
}
func init() {
cmdOverrides = append(cmdOverrides, func(cmd *cobra.Command) {
cmd.AddCommand(newGetEvents())
}) })
} }

View File

@ -19,29 +19,27 @@ var cmdOverrides []func(*cobra.Command)
func New() *cobra.Command { func New() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "cluster-policies", Use: "cluster-policies",
Short: `Cluster policy limits the ability to configure clusters based on a set of rules.`, Short: `You can use cluster policies to control users' ability to configure clusters based on a set of rules.`,
Long: `Cluster policy limits the ability to configure clusters based on a set of Long: `You can use cluster policies to control users' ability to configure clusters
rules. The policy rules limit the attributes or attribute values available for based on a set of rules. These rules specify which attributes or attribute
cluster creation. Cluster policies have ACLs that limit their use to specific values can be used during cluster creation. Cluster policies have ACLs that
users and groups. limit their use to specific users and groups.
Cluster policies let you limit users to create clusters with prescribed With cluster policies, you can: - Auto-install cluster libraries on the next
settings, simplify the user interface and enable more users to create their restart by listing them in the policy's "libraries" field. - Limit users to
own clusters (by fixing and hiding some values), control cost by limiting per creating clusters with the prescribed settings. - Simplify the user interface,
cluster maximum cost (by setting limits on attributes whose values contribute enabling more users to create clusters, by fixing and hiding some fields. -
to hourly price). Manage costs by setting limits on attributes that impact the hourly rate.
Cluster policy permissions limit which policies a user can select in the Cluster policy permissions limit which policies a user can select in the
Policy drop-down when the user creates a cluster: - A user who has cluster Policy drop-down when the user creates a cluster: - A user who has
create permission can select the Unrestricted policy and create unrestricted cluster create permission can select the Unrestricted policy and
fully-configurable clusters. - A user who has both cluster create permission create fully-configurable clusters. - A user who has both unrestricted cluster
and access to cluster policies can select the Unrestricted policy and policies create permission and access to cluster policies can select the Unrestricted
they have access to. - A user that has access to only cluster policies, can policy and policies they have access to. - A user that has access to only
select the policies they have access to. cluster policies, can select the policies they have access to.
If no policies have been created in the workspace, the Policy drop-down does
not display.
If no policies exist in the workspace, the Policy drop-down doesn't appear.
Only admin users can create, edit, and delete policies. Admin users also have Only admin users can create, edit, and delete policies. Admin users also have
access to all policies.`, access to all policies.`,
GroupID: "compute", GroupID: "compute",
@ -78,6 +76,7 @@ func newCreate() *cobra.Command {
cmd.Flags().StringVar(&createReq.Definition, "definition", createReq.Definition, `Policy definition document expressed in Databricks Cluster Policy Definition Language.`) cmd.Flags().StringVar(&createReq.Definition, "definition", createReq.Definition, `Policy definition document expressed in Databricks Cluster Policy Definition Language.`)
cmd.Flags().StringVar(&createReq.Description, "description", createReq.Description, `Additional human-readable description of the cluster policy.`) cmd.Flags().StringVar(&createReq.Description, "description", createReq.Description, `Additional human-readable description of the cluster policy.`)
// TODO: array: libraries
cmd.Flags().Int64Var(&createReq.MaxClustersPerUser, "max-clusters-per-user", createReq.MaxClustersPerUser, `Max number of clusters per user that can be active using this policy.`) cmd.Flags().Int64Var(&createReq.MaxClustersPerUser, "max-clusters-per-user", createReq.MaxClustersPerUser, `Max number of clusters per user that can be active using this policy.`)
cmd.Flags().StringVar(&createReq.PolicyFamilyDefinitionOverrides, "policy-family-definition-overrides", createReq.PolicyFamilyDefinitionOverrides, `Policy definition JSON document expressed in Databricks Policy Definition Language.`) cmd.Flags().StringVar(&createReq.PolicyFamilyDefinitionOverrides, "policy-family-definition-overrides", createReq.PolicyFamilyDefinitionOverrides, `Policy definition JSON document expressed in Databricks Policy Definition Language.`)
cmd.Flags().StringVar(&createReq.PolicyFamilyId, "policy-family-id", createReq.PolicyFamilyId, `ID of the policy family.`) cmd.Flags().StringVar(&createReq.PolicyFamilyId, "policy-family-id", createReq.PolicyFamilyId, `ID of the policy family.`)
@ -245,6 +244,7 @@ func newEdit() *cobra.Command {
cmd.Flags().StringVar(&editReq.Definition, "definition", editReq.Definition, `Policy definition document expressed in Databricks Cluster Policy Definition Language.`) cmd.Flags().StringVar(&editReq.Definition, "definition", editReq.Definition, `Policy definition document expressed in Databricks Cluster Policy Definition Language.`)
cmd.Flags().StringVar(&editReq.Description, "description", editReq.Description, `Additional human-readable description of the cluster policy.`) cmd.Flags().StringVar(&editReq.Description, "description", editReq.Description, `Additional human-readable description of the cluster policy.`)
// TODO: array: libraries
cmd.Flags().Int64Var(&editReq.MaxClustersPerUser, "max-clusters-per-user", editReq.MaxClustersPerUser, `Max number of clusters per user that can be active using this policy.`) cmd.Flags().Int64Var(&editReq.MaxClustersPerUser, "max-clusters-per-user", editReq.MaxClustersPerUser, `Max number of clusters per user that can be active using this policy.`)
cmd.Flags().StringVar(&editReq.PolicyFamilyDefinitionOverrides, "policy-family-definition-overrides", editReq.PolicyFamilyDefinitionOverrides, `Policy definition JSON document expressed in Databricks Policy Definition Language.`) cmd.Flags().StringVar(&editReq.PolicyFamilyDefinitionOverrides, "policy-family-definition-overrides", editReq.PolicyFamilyDefinitionOverrides, `Policy definition JSON document expressed in Databricks Policy Definition Language.`)
cmd.Flags().StringVar(&editReq.PolicyFamilyId, "policy-family-id", editReq.PolicyFamilyId, `ID of the policy family.`) cmd.Flags().StringVar(&editReq.PolicyFamilyId, "policy-family-id", editReq.PolicyFamilyId, `ID of the policy family.`)

View File

@ -343,6 +343,7 @@ func newUpdate() *cobra.Command {
cmd.Flags().StringVar(&updateReq.Name, "name", updateReq.Name, `Name of the external location.`) cmd.Flags().StringVar(&updateReq.Name, "name", updateReq.Name, `Name of the external location.`)
cmd.Flags().StringVar(&updateReq.Owner, "owner", updateReq.Owner, `The owner of the external location.`) cmd.Flags().StringVar(&updateReq.Owner, "owner", updateReq.Owner, `The owner of the external location.`)
cmd.Flags().BoolVar(&updateReq.ReadOnly, "read-only", updateReq.ReadOnly, `Indicates whether the external location is read-only.`) cmd.Flags().BoolVar(&updateReq.ReadOnly, "read-only", updateReq.ReadOnly, `Indicates whether the external location is read-only.`)
cmd.Flags().BoolVar(&updateReq.SkipValidation, "skip-validation", updateReq.SkipValidation, `Skips validation of the storage credential associated with the external location.`)
cmd.Flags().StringVar(&updateReq.Url, "url", updateReq.Url, `Path URL of the external location.`) cmd.Flags().StringVar(&updateReq.Url, "url", updateReq.Url, `Path URL of the external location.`)
cmd.Use = "update NAME" cmd.Use = "update NAME"

View File

@ -46,24 +46,18 @@ func New() *cobra.Command {
// Functions can be added from the `init()` function in manually curated files in this directory. // Functions can be added from the `init()` function in manually curated files in this directory.
var createOverrides []func( var createOverrides []func(
*cobra.Command, *cobra.Command,
*catalog.CreateFunction, *catalog.CreateFunctionRequest,
) )
func newCreate() *cobra.Command { func newCreate() *cobra.Command {
cmd := &cobra.Command{} cmd := &cobra.Command{}
var createReq catalog.CreateFunction var createReq catalog.CreateFunctionRequest
var createJson flags.JsonFlag var createJson flags.JsonFlag
// TODO: short flags // TODO: short flags
cmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`) cmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
cmd.Flags().StringVar(&createReq.Comment, "comment", createReq.Comment, `User-provided free-form text description.`)
cmd.Flags().StringVar(&createReq.ExternalLanguage, "external-language", createReq.ExternalLanguage, `External function language.`)
cmd.Flags().StringVar(&createReq.ExternalName, "external-name", createReq.ExternalName, `External function name.`)
// TODO: map via StringToStringVar: properties
cmd.Flags().StringVar(&createReq.SqlPath, "sql-path", createReq.SqlPath, `List of schemes whose objects can be referenced without qualification.`)
cmd.Use = "create" cmd.Use = "create"
cmd.Short = `Create a function.` cmd.Short = `Create a function.`
cmd.Long = `Create a function. cmd.Long = `Create a function.

View File

@ -793,6 +793,7 @@ func newGetRun() *cobra.Command {
// TODO: short flags // TODO: short flags
cmd.Flags().BoolVar(&getRunReq.IncludeHistory, "include-history", getRunReq.IncludeHistory, `Whether to include the repair history in the response.`) cmd.Flags().BoolVar(&getRunReq.IncludeHistory, "include-history", getRunReq.IncludeHistory, `Whether to include the repair history in the response.`)
cmd.Flags().BoolVar(&getRunReq.IncludeResolvedValues, "include-resolved-values", getRunReq.IncludeResolvedValues, `Whether to include resolved parameter values in the response.`)
cmd.Use = "get-run RUN_ID" cmd.Use = "get-run RUN_ID"
cmd.Short = `Get a single job run.` cmd.Short = `Get a single job run.`

View File

@ -153,12 +153,17 @@ func newCreate() *cobra.Command {
cmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`) cmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
cmd.Flags().StringVar(&createReq.Region, "region", createReq.Region, `Cloud region which the metastore serves (e.g., us-west-2, westus).`) cmd.Flags().StringVar(&createReq.Region, "region", createReq.Region, `Cloud region which the metastore serves (e.g., us-west-2, westus).`)
cmd.Flags().StringVar(&createReq.StorageRoot, "storage-root", createReq.StorageRoot, `The storage root URL for metastore.`)
cmd.Use = "create NAME STORAGE_ROOT" cmd.Use = "create NAME"
cmd.Short = `Create a metastore.` cmd.Short = `Create a metastore.`
cmd.Long = `Create a metastore. cmd.Long = `Create a metastore.
Creates a new metastore based on a provided name and storage root path.` Creates a new metastore based on a provided name and optional storage root
path. By default (if the __owner__ field is not set), the owner of the new
metastore is the user calling the __createMetastore__ API. If the __owner__
field is set to the empty string (**""**), the ownership is assigned to the
System User instead.`
cmd.Annotations = make(map[string]string) cmd.Annotations = make(map[string]string)
@ -166,11 +171,11 @@ func newCreate() *cobra.Command {
if cmd.Flags().Changed("json") { if cmd.Flags().Changed("json") {
err := cobra.ExactArgs(0)(cmd, args) err := cobra.ExactArgs(0)(cmd, args)
if err != nil { if err != nil {
return fmt.Errorf("when --json flag is specified, no positional arguments are required. Provide 'name', 'storage_root' in your JSON input") return fmt.Errorf("when --json flag is specified, no positional arguments are required. Provide 'name' in your JSON input")
} }
return nil return nil
} }
check := cobra.ExactArgs(2) check := cobra.ExactArgs(1)
return check(cmd, args) return check(cmd, args)
} }
@ -188,9 +193,6 @@ func newCreate() *cobra.Command {
if !cmd.Flags().Changed("json") { if !cmd.Flags().Changed("json") {
createReq.Name = args[0] createReq.Name = args[0]
} }
if !cmd.Flags().Changed("json") {
createReq.StorageRoot = args[1]
}
response, err := w.Metastores.Create(ctx, createReq) response, err := w.Metastores.Create(ctx, createReq)
if err != nil { if err != nil {
@ -696,7 +698,8 @@ func newUpdate() *cobra.Command {
cmd.Long = `Update a metastore. cmd.Long = `Update a metastore.
Updates information for a specific metastore. The caller must be a metastore Updates information for a specific metastore. The caller must be a metastore
admin.` admin. If the __owner__ field is set to the empty string (**""**), the
ownership is updated to the System User.`
cmd.Annotations = make(map[string]string) cmd.Annotations = make(map[string]string)

View File

@ -67,7 +67,7 @@ func newCreate() *cobra.Command {
cmd.Flags().StringVar(&createReq.DisplayName, "display-name", createReq.DisplayName, `String that represents a concatenation of given and family names.`) cmd.Flags().StringVar(&createReq.DisplayName, "display-name", createReq.DisplayName, `String that represents a concatenation of given and family names.`)
// TODO: array: emails // TODO: array: emails
// TODO: array: entitlements // TODO: array: entitlements
cmd.Flags().StringVar(&createReq.ExternalId, "external-id", createReq.ExternalId, ``) cmd.Flags().StringVar(&createReq.ExternalId, "external-id", createReq.ExternalId, `External ID is not currently supported.`)
// TODO: array: groups // TODO: array: groups
cmd.Flags().StringVar(&createReq.Id, "id", createReq.Id, `Databricks user ID.`) cmd.Flags().StringVar(&createReq.Id, "id", createReq.Id, `Databricks user ID.`)
// TODO: complex arg: name // TODO: complex arg: name
@ -623,7 +623,7 @@ func newUpdate() *cobra.Command {
cmd.Flags().StringVar(&updateReq.DisplayName, "display-name", updateReq.DisplayName, `String that represents a concatenation of given and family names.`) cmd.Flags().StringVar(&updateReq.DisplayName, "display-name", updateReq.DisplayName, `String that represents a concatenation of given and family names.`)
// TODO: array: emails // TODO: array: emails
// TODO: array: entitlements // TODO: array: entitlements
cmd.Flags().StringVar(&updateReq.ExternalId, "external-id", updateReq.ExternalId, ``) cmd.Flags().StringVar(&updateReq.ExternalId, "external-id", updateReq.ExternalId, `External ID is not currently supported.`)
// TODO: array: groups // TODO: array: groups
cmd.Flags().StringVar(&updateReq.Id, "id", updateReq.Id, `Databricks user ID.`) cmd.Flags().StringVar(&updateReq.Id, "id", updateReq.Id, `Databricks user ID.`)
// TODO: complex arg: name // TODO: complex arg: name

10
go.mod
View File

@ -4,7 +4,7 @@ go 1.21
require ( require (
github.com/briandowns/spinner v1.23.0 // Apache 2.0 github.com/briandowns/spinner v1.23.0 // Apache 2.0
github.com/databricks/databricks-sdk-go v0.24.0 // Apache 2.0 github.com/databricks/databricks-sdk-go v0.25.0 // Apache 2.0
github.com/fatih/color v1.16.0 // MIT github.com/fatih/color v1.16.0 // MIT
github.com/ghodss/yaml v1.0.0 // MIT + NOTICE github.com/ghodss/yaml v1.0.0 // MIT + NOTICE
github.com/google/uuid v1.4.0 // BSD-3-Clause github.com/google/uuid v1.4.0 // BSD-3-Clause
@ -55,11 +55,11 @@ require (
golang.org/x/crypto v0.15.0 // indirect golang.org/x/crypto v0.15.0 // indirect
golang.org/x/net v0.18.0 // indirect golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect golang.org/x/sys v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect golang.org/x/time v0.4.0 // indirect
google.golang.org/api v0.148.0 // indirect google.golang.org/api v0.150.0 // indirect
google.golang.org/appengine v1.6.8 // indirect google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/grpc v1.58.3 // indirect google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect
) )

20
go.sum
View File

@ -31,8 +31,8 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
github.com/databricks/databricks-sdk-go v0.24.0 h1:fx34MOGYXVc72QBSFnKuDa/H3ekDMqZYH4jKZF8mrXk= github.com/databricks/databricks-sdk-go v0.25.0 h1:qEpYHQ18HHqLIsIXXHhixakTtt6Q0tT3m34xws6BuZ8=
github.com/databricks/databricks-sdk-go v0.24.0/go.mod h1:a6rErRNh5bz+IJbO07nwW70iGyvtWidy1p/S5thepXI= github.com/databricks/databricks-sdk-go v0.25.0/go.mod h1:s3/f2T8UGyKkcMywIyporj/Kb/lsiWkiksT/C84Swrs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@ -234,8 +234,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@ -248,8 +248,8 @@ golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.148.0 h1:HBq4TZlN4/1pNcu0geJZ/Q50vIwIXT532UIMYoo0vOs= google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE=
google.golang.org/api v0.148.0/go.mod h1:8/TBgwaKjfqTdacOJrOv2+2Q6fBDU1uHKK06oGSkxzU= google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
@ -257,15 +257,15 @@ google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJ
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a h1:a2MQQVoTo96JC9PMGtGBymLp7+/RzpFc2yX/9WfFg1c= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=