removed x-databricks-cli-json-only from scim

This commit is contained in:
Andrew Nester 2023-06-20 10:49:23 +02:00
parent 91e1da0f52
commit 74a2f40f54
No known key found for this signature in database
GPG Key ID: 12BC628A44B7DA57
6 changed files with 56 additions and 6 deletions

View File

@ -37,6 +37,14 @@ func init() {
// TODO: short flags
createCmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
createCmd.Flags().StringVar(&createReq.DisplayName, "display-name", createReq.DisplayName, `String that represents a human-readable group name.`)
// TODO: array: entitlements
createCmd.Flags().StringVar(&createReq.ExternalId, "external-id", createReq.ExternalId, ``)
// TODO: array: groups
createCmd.Flags().StringVar(&createReq.Id, "id", createReq.Id, `Databricks group ID.`)
// TODO: array: members
// TODO: array: roles
}
var createCmd = &cobra.Command{
@ -65,7 +73,6 @@ var createCmd = &cobra.Command{
return err
}
} else {
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
}
response, err := a.Groups.Create(ctx, createReq)

View File

@ -36,6 +36,15 @@ func init() {
// TODO: short flags
createCmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
createCmd.Flags().BoolVar(&createReq.Active, "active", createReq.Active, `If this user is active.`)
createCmd.Flags().StringVar(&createReq.ApplicationId, "application-id", createReq.ApplicationId, `UUID relating to the service principal.`)
createCmd.Flags().StringVar(&createReq.DisplayName, "display-name", createReq.DisplayName, `String that represents a concatenation of given and family names.`)
// TODO: array: entitlements
createCmd.Flags().StringVar(&createReq.ExternalId, "external-id", createReq.ExternalId, ``)
// TODO: array: groups
createCmd.Flags().StringVar(&createReq.Id, "id", createReq.Id, `Databricks service principal ID.`)
// TODO: array: roles
}
var createCmd = &cobra.Command{
@ -63,7 +72,6 @@ var createCmd = &cobra.Command{
return err
}
} else {
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
}
response, err := a.ServicePrincipals.Create(ctx, createReq)

View File

@ -41,6 +41,17 @@ func init() {
// TODO: short flags
createCmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
createCmd.Flags().BoolVar(&createReq.Active, "active", createReq.Active, `If this user is active.`)
createCmd.Flags().StringVar(&createReq.DisplayName, "display-name", createReq.DisplayName, `String that represents a concatenation of given and family names.`)
// TODO: array: emails
// TODO: array: entitlements
createCmd.Flags().StringVar(&createReq.ExternalId, "external-id", createReq.ExternalId, ``)
// TODO: array: groups
createCmd.Flags().StringVar(&createReq.Id, "id", createReq.Id, `Databricks user ID.`)
// TODO: complex arg: name
// TODO: array: roles
createCmd.Flags().StringVar(&createReq.UserName, "user-name", createReq.UserName, `Email address of the Databricks user.`)
}
var createCmd = &cobra.Command{
@ -69,7 +80,6 @@ var createCmd = &cobra.Command{
return err
}
} else {
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
}
response, err := a.Users.Create(ctx, createReq)

View File

@ -37,6 +37,14 @@ func init() {
// TODO: short flags
createCmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
createCmd.Flags().StringVar(&createReq.DisplayName, "display-name", createReq.DisplayName, `String that represents a human-readable group name.`)
// TODO: array: entitlements
createCmd.Flags().StringVar(&createReq.ExternalId, "external-id", createReq.ExternalId, ``)
// TODO: array: groups
createCmd.Flags().StringVar(&createReq.Id, "id", createReq.Id, `Databricks group ID.`)
// TODO: array: members
// TODO: array: roles
}
var createCmd = &cobra.Command{
@ -65,7 +73,6 @@ var createCmd = &cobra.Command{
return err
}
} else {
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
}
response, err := w.Groups.Create(ctx, createReq)

View File

@ -36,6 +36,15 @@ func init() {
// TODO: short flags
createCmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
createCmd.Flags().BoolVar(&createReq.Active, "active", createReq.Active, `If this user is active.`)
createCmd.Flags().StringVar(&createReq.ApplicationId, "application-id", createReq.ApplicationId, `UUID relating to the service principal.`)
createCmd.Flags().StringVar(&createReq.DisplayName, "display-name", createReq.DisplayName, `String that represents a concatenation of given and family names.`)
// TODO: array: entitlements
createCmd.Flags().StringVar(&createReq.ExternalId, "external-id", createReq.ExternalId, ``)
// TODO: array: groups
createCmd.Flags().StringVar(&createReq.Id, "id", createReq.Id, `Databricks service principal ID.`)
// TODO: array: roles
}
var createCmd = &cobra.Command{
@ -63,7 +72,6 @@ var createCmd = &cobra.Command{
return err
}
} else {
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
}
response, err := w.ServicePrincipals.Create(ctx, createReq)

View File

@ -41,6 +41,17 @@ func init() {
// TODO: short flags
createCmd.Flags().Var(&createJson, "json", `either inline JSON string or @path/to/file.json with request body`)
createCmd.Flags().BoolVar(&createReq.Active, "active", createReq.Active, `If this user is active.`)
createCmd.Flags().StringVar(&createReq.DisplayName, "display-name", createReq.DisplayName, `String that represents a concatenation of given and family names.`)
// TODO: array: emails
// TODO: array: entitlements
createCmd.Flags().StringVar(&createReq.ExternalId, "external-id", createReq.ExternalId, ``)
// TODO: array: groups
createCmd.Flags().StringVar(&createReq.Id, "id", createReq.Id, `Databricks user ID.`)
// TODO: complex arg: name
// TODO: array: roles
createCmd.Flags().StringVar(&createReq.UserName, "user-name", createReq.UserName, `Email address of the Databricks user.`)
}
var createCmd = &cobra.Command{
@ -69,7 +80,6 @@ var createCmd = &cobra.Command{
return err
}
} else {
return fmt.Errorf("please provide command input in JSON format by specifying the --json flag")
}
response, err := w.Users.Create(ctx, createReq)