Documentation
¶
Overview ¶
These APIs allow you to manage Account Groups, Account Service Principals, Account Users, Current User, Groups, Service Principals, Users, etc.
Index ¶
- type AccountGroupsAPI
- func (a *AccountGroupsAPI) Create(ctx context.Context, request Group) (*Group, error)
- func (a *AccountGroupsAPI) Delete(ctx context.Context, request DeleteGroupRequest) error
- func (a *AccountGroupsAPI) DeleteById(ctx context.Context, id string) error
- func (a *AccountGroupsAPI) Get(ctx context.Context, request GetGroupRequest) (*Group, error)
- func (a *AccountGroupsAPI) GetByDisplayName(ctx context.Context, name string) (*Group, error)
- func (a *AccountGroupsAPI) GetById(ctx context.Context, id string) (*Group, error)
- func (a *AccountGroupsAPI) GroupDisplayNameToIdMap(ctx context.Context, request ListGroupsRequest) (map[string]string, error)
- func (a *AccountGroupsAPI) Impl() AccountGroupsService
- func (a *AccountGroupsAPI) ListAll(ctx context.Context, request ListGroupsRequest) ([]Group, error)
- func (a *AccountGroupsAPI) Patch(ctx context.Context, request PartialUpdate) error
- func (a *AccountGroupsAPI) Update(ctx context.Context, request Group) error
- func (a *AccountGroupsAPI) WithImpl(impl AccountGroupsService) *AccountGroupsAPI
- type AccountGroupsService
- type AccountServicePrincipalsAPI
- func (a *AccountServicePrincipalsAPI) Create(ctx context.Context, request ServicePrincipal) (*ServicePrincipal, error)
- func (a *AccountServicePrincipalsAPI) Delete(ctx context.Context, request DeleteServicePrincipalRequest) error
- func (a *AccountServicePrincipalsAPI) DeleteById(ctx context.Context, id string) error
- func (a *AccountServicePrincipalsAPI) Get(ctx context.Context, request GetServicePrincipalRequest) (*ServicePrincipal, error)
- func (a *AccountServicePrincipalsAPI) GetByDisplayName(ctx context.Context, name string) (*ServicePrincipal, error)
- func (a *AccountServicePrincipalsAPI) GetById(ctx context.Context, id string) (*ServicePrincipal, error)
- func (a *AccountServicePrincipalsAPI) Impl() AccountServicePrincipalsService
- func (a *AccountServicePrincipalsAPI) ListAll(ctx context.Context, request ListServicePrincipalsRequest) ([]ServicePrincipal, error)
- func (a *AccountServicePrincipalsAPI) Patch(ctx context.Context, request PartialUpdate) error
- func (a *AccountServicePrincipalsAPI) ServicePrincipalDisplayNameToIdMap(ctx context.Context, request ListServicePrincipalsRequest) (map[string]string, error)
- func (a *AccountServicePrincipalsAPI) Update(ctx context.Context, request ServicePrincipal) error
- func (a *AccountServicePrincipalsAPI) WithImpl(impl AccountServicePrincipalsService) *AccountServicePrincipalsAPI
- type AccountServicePrincipalsService
- type AccountUsersAPI
- func (a *AccountUsersAPI) Create(ctx context.Context, request User) (*User, error)
- func (a *AccountUsersAPI) Delete(ctx context.Context, request DeleteUserRequest) error
- func (a *AccountUsersAPI) DeleteById(ctx context.Context, id string) error
- func (a *AccountUsersAPI) Get(ctx context.Context, request GetUserRequest) (*User, error)
- func (a *AccountUsersAPI) GetById(ctx context.Context, id string) (*User, error)
- func (a *AccountUsersAPI) GetByUserName(ctx context.Context, name string) (*User, error)
- func (a *AccountUsersAPI) Impl() AccountUsersService
- func (a *AccountUsersAPI) ListAll(ctx context.Context, request ListUsersRequest) ([]User, error)
- func (a *AccountUsersAPI) Patch(ctx context.Context, request PartialUpdate) error
- func (a *AccountUsersAPI) Update(ctx context.Context, request User) error
- func (a *AccountUsersAPI) UserUserNameToIdMap(ctx context.Context, request ListUsersRequest) (map[string]string, error)
- func (a *AccountUsersAPI) WithImpl(impl AccountUsersService) *AccountUsersAPI
- type AccountUsersService
- type ComplexValue
- type CurrentUserAPI
- type CurrentUserService
- type DeleteGroupRequest
- type DeleteServicePrincipalRequest
- type DeleteUserRequest
- type GetGroupRequest
- type GetServicePrincipalRequest
- type GetUserRequest
- type Group
- type GroupsAPI
- func (a *GroupsAPI) Create(ctx context.Context, request Group) (*Group, error)
- func (a *GroupsAPI) Delete(ctx context.Context, request DeleteGroupRequest) error
- func (a *GroupsAPI) DeleteById(ctx context.Context, id string) error
- func (a *GroupsAPI) Get(ctx context.Context, request GetGroupRequest) (*Group, error)
- func (a *GroupsAPI) GetByDisplayName(ctx context.Context, name string) (*Group, error)
- func (a *GroupsAPI) GetById(ctx context.Context, id string) (*Group, error)
- func (a *GroupsAPI) GroupDisplayNameToIdMap(ctx context.Context, request ListGroupsRequest) (map[string]string, error)
- func (a *GroupsAPI) Impl() GroupsService
- func (a *GroupsAPI) ListAll(ctx context.Context, request ListGroupsRequest) ([]Group, error)
- func (a *GroupsAPI) Patch(ctx context.Context, request PartialUpdate) error
- func (a *GroupsAPI) Update(ctx context.Context, request Group) error
- func (a *GroupsAPI) WithImpl(impl GroupsService) *GroupsAPI
- type GroupsService
- type ListGroupsRequest
- type ListGroupsResponse
- type ListServicePrincipalResponse
- type ListServicePrincipalsRequest
- type ListSortOrder
- type ListUsersRequest
- type ListUsersResponse
- type Name
- type PartialUpdate
- type Patch
- type PatchOp
- type ServicePrincipal
- type ServicePrincipalsAPI
- func (a *ServicePrincipalsAPI) Create(ctx context.Context, request ServicePrincipal) (*ServicePrincipal, error)
- func (a *ServicePrincipalsAPI) Delete(ctx context.Context, request DeleteServicePrincipalRequest) error
- func (a *ServicePrincipalsAPI) DeleteById(ctx context.Context, id string) error
- func (a *ServicePrincipalsAPI) Get(ctx context.Context, request GetServicePrincipalRequest) (*ServicePrincipal, error)
- func (a *ServicePrincipalsAPI) GetByDisplayName(ctx context.Context, name string) (*ServicePrincipal, error)
- func (a *ServicePrincipalsAPI) GetById(ctx context.Context, id string) (*ServicePrincipal, error)
- func (a *ServicePrincipalsAPI) Impl() ServicePrincipalsService
- func (a *ServicePrincipalsAPI) ListAll(ctx context.Context, request ListServicePrincipalsRequest) ([]ServicePrincipal, error)
- func (a *ServicePrincipalsAPI) Patch(ctx context.Context, request PartialUpdate) error
- func (a *ServicePrincipalsAPI) ServicePrincipalDisplayNameToIdMap(ctx context.Context, request ListServicePrincipalsRequest) (map[string]string, error)
- func (a *ServicePrincipalsAPI) Update(ctx context.Context, request ServicePrincipal) error
- func (a *ServicePrincipalsAPI) WithImpl(impl ServicePrincipalsService) *ServicePrincipalsAPI
- type ServicePrincipalsService
- type User
- type UsersAPI
- func (a *UsersAPI) Create(ctx context.Context, request User) (*User, error)
- func (a *UsersAPI) Delete(ctx context.Context, request DeleteUserRequest) error
- func (a *UsersAPI) DeleteById(ctx context.Context, id string) error
- func (a *UsersAPI) Get(ctx context.Context, request GetUserRequest) (*User, error)
- func (a *UsersAPI) GetById(ctx context.Context, id string) (*User, error)
- func (a *UsersAPI) GetByUserName(ctx context.Context, name string) (*User, error)
- func (a *UsersAPI) Impl() UsersService
- func (a *UsersAPI) ListAll(ctx context.Context, request ListUsersRequest) ([]User, error)
- func (a *UsersAPI) Patch(ctx context.Context, request PartialUpdate) error
- func (a *UsersAPI) Update(ctx context.Context, request User) error
- func (a *UsersAPI) UserUserNameToIdMap(ctx context.Context, request ListUsersRequest) (map[string]string, error)
- func (a *UsersAPI) WithImpl(impl UsersService) *UsersAPI
- type UsersService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountGroupsAPI ¶
type AccountGroupsAPI struct {
// contains filtered or unexported fields
}
Groups simplify identity management, making it easier to assign access to Databricks Account, data, and other securable objects.
It is best practice to assign access to workspaces and access-control policies in Unity Catalog to groups, instead of to users individually. All Databricks Account identities can be assigned as members of groups, and members inherit permissions that are assigned to their group.
func NewAccountGroups ¶
func NewAccountGroups(client *client.DatabricksClient) *AccountGroupsAPI
func (*AccountGroupsAPI) Create ¶
Create a new group.
Creates a group in the Databricks Account with a unique name, using the supplied group details.
func (*AccountGroupsAPI) Delete ¶
func (a *AccountGroupsAPI) Delete(ctx context.Context, request DeleteGroupRequest) error
Delete a group.
Deletes a group from the Databricks Account.
func (*AccountGroupsAPI) DeleteById ¶
func (a *AccountGroupsAPI) DeleteById(ctx context.Context, id string) error
Delete a group.
Deletes a group from the Databricks Account.
func (*AccountGroupsAPI) Get ¶
func (a *AccountGroupsAPI) Get(ctx context.Context, request GetGroupRequest) (*Group, error)
Get group details.
Gets the information for a specific group in the Databricks Account.
func (*AccountGroupsAPI) GetByDisplayName ¶
GetByDisplayName calls AccountGroupsAPI.GroupDisplayNameToIdMap and returns a single Group.
Returns an error if there's more than one Group with the same .DisplayName.
Note: All Group instances are loaded into memory before returning matching by name.
This method is generated by Databricks SDK Code Generator.
func (*AccountGroupsAPI) GetById ¶
Get group details.
Gets the information for a specific group in the Databricks Account.
func (*AccountGroupsAPI) GroupDisplayNameToIdMap ¶
func (a *AccountGroupsAPI) GroupDisplayNameToIdMap(ctx context.Context, request ListGroupsRequest) (map[string]string, error)
GroupDisplayNameToIdMap calls AccountGroupsAPI.ListAll and creates a map of results with Group.DisplayName as key and Group.Id as value.
Returns an error if there's more than one Group with the same .DisplayName.
Note: All Group instances are loaded into memory before creating a map.
This method is generated by Databricks SDK Code Generator.
func (*AccountGroupsAPI) Impl ¶
func (a *AccountGroupsAPI) Impl() AccountGroupsService
Impl returns low-level AccountGroups API implementation
func (*AccountGroupsAPI) ListAll ¶
func (a *AccountGroupsAPI) ListAll(ctx context.Context, request ListGroupsRequest) ([]Group, error)
List group details.
Gets all details of the groups associated with the Databricks Account.
This method is generated by Databricks SDK Code Generator.
func (*AccountGroupsAPI) Patch ¶
func (a *AccountGroupsAPI) Patch(ctx context.Context, request PartialUpdate) error
Update group details.
Partially updates the details of a group.
func (*AccountGroupsAPI) Update ¶
func (a *AccountGroupsAPI) Update(ctx context.Context, request Group) error
Replace a group.
Updates the details of a group by replacing the entire group entity.
func (*AccountGroupsAPI) WithImpl ¶
func (a *AccountGroupsAPI) WithImpl(impl AccountGroupsService) *AccountGroupsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type AccountGroupsService ¶
type AccountGroupsService interface { // Create a new group. // // Creates a group in the Databricks Account with a unique name, using the // supplied group details. Create(ctx context.Context, request Group) (*Group, error) // Delete a group. // // Deletes a group from the Databricks Account. Delete(ctx context.Context, request DeleteGroupRequest) error // Get group details. // // Gets the information for a specific group in the Databricks Account. Get(ctx context.Context, request GetGroupRequest) (*Group, error) // List group details. // // Gets all details of the groups associated with the Databricks Account. // // Use ListAll() to get all Group instances List(ctx context.Context, request ListGroupsRequest) (*ListGroupsResponse, error) // Update group details. // // Partially updates the details of a group. Patch(ctx context.Context, request PartialUpdate) error // Replace a group. // // Updates the details of a group by replacing the entire group entity. Update(ctx context.Context, request Group) error }
Groups simplify identity management, making it easier to assign access to Databricks Account, data, and other securable objects.
It is best practice to assign access to workspaces and access-control policies in Unity Catalog to groups, instead of to users individually. All Databricks Account identities can be assigned as members of groups, and members inherit permissions that are assigned to their group.
type AccountServicePrincipalsAPI ¶
type AccountServicePrincipalsAPI struct {
// contains filtered or unexported fields
}
Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD platforms. Databricks recommends creating service principals to run production jobs or modify production data. If all processes that act on production data run with service principals, interactive users do not need any write, delete, or modify privileges in production. This eliminates the risk of a user overwriting production data by accident.
func NewAccountServicePrincipals ¶
func NewAccountServicePrincipals(client *client.DatabricksClient) *AccountServicePrincipalsAPI
func (*AccountServicePrincipalsAPI) Create ¶
func (a *AccountServicePrincipalsAPI) Create(ctx context.Context, request ServicePrincipal) (*ServicePrincipal, error)
Create a service principal.
Creates a new service principal in the Databricks Account.
func (*AccountServicePrincipalsAPI) Delete ¶
func (a *AccountServicePrincipalsAPI) Delete(ctx context.Context, request DeleteServicePrincipalRequest) error
Delete a service principal.
Delete a single service principal in the Databricks Account.
func (*AccountServicePrincipalsAPI) DeleteById ¶
func (a *AccountServicePrincipalsAPI) DeleteById(ctx context.Context, id string) error
Delete a service principal.
Delete a single service principal in the Databricks Account.
func (*AccountServicePrincipalsAPI) Get ¶
func (a *AccountServicePrincipalsAPI) Get(ctx context.Context, request GetServicePrincipalRequest) (*ServicePrincipal, error)
Get service principal details.
Gets the details for a single service principal define in the Databricks Account.
func (*AccountServicePrincipalsAPI) GetByDisplayName ¶
func (a *AccountServicePrincipalsAPI) GetByDisplayName(ctx context.Context, name string) (*ServicePrincipal, error)
GetByDisplayName calls AccountServicePrincipalsAPI.ServicePrincipalDisplayNameToIdMap and returns a single ServicePrincipal.
Returns an error if there's more than one ServicePrincipal with the same .DisplayName.
Note: All ServicePrincipal instances are loaded into memory before returning matching by name.
This method is generated by Databricks SDK Code Generator.
func (*AccountServicePrincipalsAPI) GetById ¶
func (a *AccountServicePrincipalsAPI) GetById(ctx context.Context, id string) (*ServicePrincipal, error)
Get service principal details.
Gets the details for a single service principal define in the Databricks Account.
func (*AccountServicePrincipalsAPI) Impl ¶
func (a *AccountServicePrincipalsAPI) Impl() AccountServicePrincipalsService
Impl returns low-level AccountServicePrincipals API implementation
func (*AccountServicePrincipalsAPI) ListAll ¶
func (a *AccountServicePrincipalsAPI) ListAll(ctx context.Context, request ListServicePrincipalsRequest) ([]ServicePrincipal, error)
List service principals.
Gets the set of service principals associated with a Databricks Account.
This method is generated by Databricks SDK Code Generator.
func (*AccountServicePrincipalsAPI) Patch ¶
func (a *AccountServicePrincipalsAPI) Patch(ctx context.Context, request PartialUpdate) error
Update service principal details.
Partially updates the details of a single service principal in the Databricks Account.
func (*AccountServicePrincipalsAPI) ServicePrincipalDisplayNameToIdMap ¶
func (a *AccountServicePrincipalsAPI) ServicePrincipalDisplayNameToIdMap(ctx context.Context, request ListServicePrincipalsRequest) (map[string]string, error)
ServicePrincipalDisplayNameToIdMap calls AccountServicePrincipalsAPI.ListAll and creates a map of results with ServicePrincipal.DisplayName as key and ServicePrincipal.Id as value.
Returns an error if there's more than one ServicePrincipal with the same .DisplayName.
Note: All ServicePrincipal instances are loaded into memory before creating a map.
This method is generated by Databricks SDK Code Generator.
func (*AccountServicePrincipalsAPI) Update ¶
func (a *AccountServicePrincipalsAPI) Update(ctx context.Context, request ServicePrincipal) error
Replace service principal.
Updates the details of a single service principal.
This action replaces the existing service principal with the same name.
func (*AccountServicePrincipalsAPI) WithImpl ¶
func (a *AccountServicePrincipalsAPI) WithImpl(impl AccountServicePrincipalsService) *AccountServicePrincipalsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type AccountServicePrincipalsService ¶
type AccountServicePrincipalsService interface { // Create a service principal. // // Creates a new service principal in the Databricks Account. Create(ctx context.Context, request ServicePrincipal) (*ServicePrincipal, error) // Delete a service principal. // // Delete a single service principal in the Databricks Account. Delete(ctx context.Context, request DeleteServicePrincipalRequest) error // Get service principal details. // // Gets the details for a single service principal define in the Databricks // Account. Get(ctx context.Context, request GetServicePrincipalRequest) (*ServicePrincipal, error) // List service principals. // // Gets the set of service principals associated with a Databricks Account. // // Use ListAll() to get all ServicePrincipal instances List(ctx context.Context, request ListServicePrincipalsRequest) (*ListServicePrincipalResponse, error) // Update service principal details. // // Partially updates the details of a single service principal in the // Databricks Account. Patch(ctx context.Context, request PartialUpdate) error // Replace service principal. // // Updates the details of a single service principal. // // This action replaces the existing service principal with the same name. Update(ctx context.Context, request ServicePrincipal) error }
Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD platforms. Databricks recommends creating service principals to run production jobs or modify production data. If all processes that act on production data run with service principals, interactive users do not need any write, delete, or modify privileges in production. This eliminates the risk of a user overwriting production data by accident.
type AccountUsersAPI ¶
type AccountUsersAPI struct {
// contains filtered or unexported fields
}
User identities recognized by Databricks and represented by email addresses.
Databricks recommends using SCIM provisioning to sync users and groups automatically from your identity provider to your Databricks Account. SCIM streamlines onboarding a new employee or team by using your identity provider to create users and groups in Databricks Account and give them the proper level of access. When a user leaves your organization or no longer needs access to Databricks Account, admins can terminate the user in your identity provider and that user’s account will also be removed from Databricks Account. This ensures a consistent offboarding process and prevents unauthorized users from accessing sensitive data.
func NewAccountUsers ¶
func NewAccountUsers(client *client.DatabricksClient) *AccountUsersAPI
func (*AccountUsersAPI) Create ¶
Create a new user.
Creates a new user in the Databricks Account. This new user will also be added to the Databricks account.
func (*AccountUsersAPI) Delete ¶
func (a *AccountUsersAPI) Delete(ctx context.Context, request DeleteUserRequest) error
Delete a user.
Deletes a user. Deleting a user from a Databricks Account also removes objects associated with the user.
func (*AccountUsersAPI) DeleteById ¶
func (a *AccountUsersAPI) DeleteById(ctx context.Context, id string) error
Delete a user.
Deletes a user. Deleting a user from a Databricks Account also removes objects associated with the user.
func (*AccountUsersAPI) Get ¶
func (a *AccountUsersAPI) Get(ctx context.Context, request GetUserRequest) (*User, error)
Get user details.
Gets information for a specific user in Databricks Account.
func (*AccountUsersAPI) GetById ¶
Get user details.
Gets information for a specific user in Databricks Account.
func (*AccountUsersAPI) GetByUserName ¶
GetByUserName calls AccountUsersAPI.UserUserNameToIdMap and returns a single User.
Returns an error if there's more than one User with the same .UserName.
Note: All User instances are loaded into memory before returning matching by name.
This method is generated by Databricks SDK Code Generator.
func (*AccountUsersAPI) Impl ¶
func (a *AccountUsersAPI) Impl() AccountUsersService
Impl returns low-level AccountUsers API implementation
func (*AccountUsersAPI) ListAll ¶
func (a *AccountUsersAPI) ListAll(ctx context.Context, request ListUsersRequest) ([]User, error)
List users.
Gets details for all the users associated with a Databricks Account.
This method is generated by Databricks SDK Code Generator.
func (*AccountUsersAPI) Patch ¶
func (a *AccountUsersAPI) Patch(ctx context.Context, request PartialUpdate) error
Update user details.
Partially updates a user resource by applying the supplied operations on specific user attributes.
func (*AccountUsersAPI) Update ¶
func (a *AccountUsersAPI) Update(ctx context.Context, request User) error
Replace a user.
Replaces a user's information with the data supplied in request.
func (*AccountUsersAPI) UserUserNameToIdMap ¶
func (a *AccountUsersAPI) UserUserNameToIdMap(ctx context.Context, request ListUsersRequest) (map[string]string, error)
UserUserNameToIdMap calls AccountUsersAPI.ListAll and creates a map of results with User.UserName as key and User.Id as value.
Returns an error if there's more than one User with the same .UserName.
Note: All User instances are loaded into memory before creating a map.
This method is generated by Databricks SDK Code Generator.
func (*AccountUsersAPI) WithImpl ¶
func (a *AccountUsersAPI) WithImpl(impl AccountUsersService) *AccountUsersAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type AccountUsersService ¶
type AccountUsersService interface { // Create a new user. // // Creates a new user in the Databricks Account. This new user will also be // added to the Databricks account. Create(ctx context.Context, request User) (*User, error) // Delete a user. // // Deletes a user. Deleting a user from a Databricks Account also removes // objects associated with the user. Delete(ctx context.Context, request DeleteUserRequest) error // Get user details. // // Gets information for a specific user in Databricks Account. Get(ctx context.Context, request GetUserRequest) (*User, error) // List users. // // Gets details for all the users associated with a Databricks Account. // // Use ListAll() to get all User instances List(ctx context.Context, request ListUsersRequest) (*ListUsersResponse, error) // Update user details. // // Partially updates a user resource by applying the supplied operations on // specific user attributes. Patch(ctx context.Context, request PartialUpdate) error // Replace a user. // // Replaces a user's information with the data supplied in request. Update(ctx context.Context, request User) error }
User identities recognized by Databricks and represented by email addresses.
Databricks recommends using SCIM provisioning to sync users and groups automatically from your identity provider to your Databricks Account. SCIM streamlines onboarding a new employee or team by using your identity provider to create users and groups in Databricks Account and give them the proper level of access. When a user leaves your organization or no longer needs access to Databricks Account, admins can terminate the user in your identity provider and that user’s account will also be removed from Databricks Account. This ensures a consistent offboarding process and prevents unauthorized users from accessing sensitive data.
type ComplexValue ¶
type CurrentUserAPI ¶
type CurrentUserAPI struct {
// contains filtered or unexported fields
}
This API allows retrieving information about currently authenticated user or service principal.
func NewCurrentUser ¶
func NewCurrentUser(client *client.DatabricksClient) *CurrentUserAPI
func (*CurrentUserAPI) Impl ¶
func (a *CurrentUserAPI) Impl() CurrentUserService
Impl returns low-level CurrentUser API implementation
func (*CurrentUserAPI) Me ¶
func (a *CurrentUserAPI) Me(ctx context.Context) (*User, error)
Get current user info.
Get details about the current method caller's identity.
func (*CurrentUserAPI) WithImpl ¶
func (a *CurrentUserAPI) WithImpl(impl CurrentUserService) *CurrentUserAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type CurrentUserService ¶
type CurrentUserService interface { // Get current user info. // // Get details about the current method caller's identity. Me(ctx context.Context) (*User, error) }
This API allows retrieving information about currently authenticated user or service principal.
type DeleteGroupRequest ¶
type DeleteGroupRequest struct { // Unique ID for a group in the Databricks Account. Id string `json:"-" url:"-"` }
Delete a group
type DeleteServicePrincipalRequest ¶
type DeleteServicePrincipalRequest struct { // Unique ID for a service principal in the Databricks Account. Id string `json:"-" url:"-"` }
Delete a service principal
type DeleteUserRequest ¶
type DeleteUserRequest struct { // Unique ID for a user in the Databricks Account. Id string `json:"-" url:"-"` }
Delete a user
type GetGroupRequest ¶
type GetGroupRequest struct { // Unique ID for a group in the Databricks Account. Id string `json:"-" url:"-"` }
Get group details
type GetServicePrincipalRequest ¶
type GetServicePrincipalRequest struct { // Unique ID for a service principal in the Databricks Account. Id string `json:"-" url:"-"` }
Get service principal details
type GetUserRequest ¶
type GetUserRequest struct { // Unique ID for a user in the Databricks Account. Id string `json:"-" url:"-"` }
Get user details
type Group ¶
type Group struct { // String that represents a human-readable group name DisplayName string `json:"displayName,omitempty"` Entitlements []ComplexValue `json:"entitlements,omitempty"` ExternalId string `json:"externalId,omitempty"` Groups []ComplexValue `json:"groups,omitempty"` // Databricks group ID Id string `json:"id,omitempty" url:"-"` Members []ComplexValue `json:"members,omitempty"` Roles []ComplexValue `json:"roles,omitempty"` }
type GroupsAPI ¶
type GroupsAPI struct {
// contains filtered or unexported fields
}
Groups simplify identity management, making it easier to assign access to Databricks Workspace, data, and other securable objects.
It is best practice to assign access to workspaces and access-control policies in Unity Catalog to groups, instead of to users individually. All Databricks Workspace identities can be assigned as members of groups, and members inherit permissions that are assigned to their group.
func NewGroups ¶
func NewGroups(client *client.DatabricksClient) *GroupsAPI
func (*GroupsAPI) Create ¶
Create a new group.
Creates a group in the Databricks Workspace with a unique name, using the supplied group details.
func (*GroupsAPI) Delete ¶
func (a *GroupsAPI) Delete(ctx context.Context, request DeleteGroupRequest) error
Delete a group.
Deletes a group from the Databricks Workspace.
func (*GroupsAPI) Get ¶
Get group details.
Gets the information for a specific group in the Databricks Workspace.
func (*GroupsAPI) GetByDisplayName ¶
GetByDisplayName calls GroupsAPI.GroupDisplayNameToIdMap and returns a single Group.
Returns an error if there's more than one Group with the same .DisplayName.
Note: All Group instances are loaded into memory before returning matching by name.
This method is generated by Databricks SDK Code Generator.
func (*GroupsAPI) GetById ¶
Get group details.
Gets the information for a specific group in the Databricks Workspace.
func (*GroupsAPI) GroupDisplayNameToIdMap ¶
func (a *GroupsAPI) GroupDisplayNameToIdMap(ctx context.Context, request ListGroupsRequest) (map[string]string, error)
GroupDisplayNameToIdMap calls GroupsAPI.ListAll and creates a map of results with Group.DisplayName as key and Group.Id as value.
Returns an error if there's more than one Group with the same .DisplayName.
Note: All Group instances are loaded into memory before creating a map.
This method is generated by Databricks SDK Code Generator.
func (*GroupsAPI) Impl ¶
func (a *GroupsAPI) Impl() GroupsService
Impl returns low-level Groups API implementation
func (*GroupsAPI) ListAll ¶
List group details.
Gets all details of the groups associated with the Databricks Workspace.
This method is generated by Databricks SDK Code Generator.
func (*GroupsAPI) Patch ¶
func (a *GroupsAPI) Patch(ctx context.Context, request PartialUpdate) error
Update group details.
Partially updates the details of a group.
func (*GroupsAPI) Update ¶
Replace a group.
Updates the details of a group by replacing the entire group entity.
func (*GroupsAPI) WithImpl ¶
func (a *GroupsAPI) WithImpl(impl GroupsService) *GroupsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type GroupsService ¶
type GroupsService interface { // Create a new group. // // Creates a group in the Databricks Workspace with a unique name, using the // supplied group details. Create(ctx context.Context, request Group) (*Group, error) // Delete a group. // // Deletes a group from the Databricks Workspace. Delete(ctx context.Context, request DeleteGroupRequest) error // Get group details. // // Gets the information for a specific group in the Databricks Workspace. Get(ctx context.Context, request GetGroupRequest) (*Group, error) // List group details. // // Gets all details of the groups associated with the Databricks Workspace. // // Use ListAll() to get all Group instances List(ctx context.Context, request ListGroupsRequest) (*ListGroupsResponse, error) // Update group details. // // Partially updates the details of a group. Patch(ctx context.Context, request PartialUpdate) error // Replace a group. // // Updates the details of a group by replacing the entire group entity. Update(ctx context.Context, request Group) error }
Groups simplify identity management, making it easier to assign access to Databricks Workspace, data, and other securable objects.
It is best practice to assign access to workspaces and access-control policies in Unity Catalog to groups, instead of to users individually. All Databricks Workspace identities can be assigned as members of groups, and members inherit permissions that are assigned to their group.
type ListGroupsRequest ¶
type ListGroupsRequest struct { // Comma-separated list of attributes to return in response. Attributes string `json:"-" url:"attributes,omitempty"` // Desired number of results per page. Count int `json:"-" url:"count,omitempty"` // Comma-separated list of attributes to exclude in response. ExcludedAttributes string `json:"-" url:"excludedAttributes,omitempty"` // Query by which the results have to be filtered. Supported operators are // equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). // Additionally, simple expressions can be formed using logical operators - // `and` and `or`. The [SCIM RFC] has more details but we currently only // support simple expressions. // // [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 Filter string `json:"-" url:"filter,omitempty"` // Attribute to sort the results. SortBy string `json:"-" url:"sortBy,omitempty"` // The order to sort the results. SortOrder ListSortOrder `json:"-" url:"sortOrder,omitempty"` // Specifies the index of the first result. First item is number 1. StartIndex int `json:"-" url:"startIndex,omitempty"` }
List group details
type ListGroupsResponse ¶
type ListGroupsResponse struct { // Total results returned in the response. ItemsPerPage int64 `json:"itemsPerPage,omitempty"` // User objects returned in the response. Resources []Group `json:"Resources,omitempty"` // Starting index of all the results that matched the request filters. First // item is number 1. StartIndex int64 `json:"startIndex,omitempty"` // Total results that match the request filters. TotalResults int64 `json:"totalResults,omitempty"` }
type ListServicePrincipalResponse ¶
type ListServicePrincipalResponse struct { // Total results returned in the response. ItemsPerPage int64 `json:"itemsPerPage,omitempty"` // User objects returned in the response. Resources []ServicePrincipal `json:"Resources,omitempty"` // Starting index of all the results that matched the request filters. First // item is number 1. StartIndex int64 `json:"startIndex,omitempty"` // Total results that match the request filters. TotalResults int64 `json:"totalResults,omitempty"` }
type ListServicePrincipalsRequest ¶
type ListServicePrincipalsRequest struct { // Comma-separated list of attributes to return in response. Attributes string `json:"-" url:"attributes,omitempty"` // Desired number of results per page. Count int `json:"-" url:"count,omitempty"` // Comma-separated list of attributes to exclude in response. ExcludedAttributes string `json:"-" url:"excludedAttributes,omitempty"` // Query by which the results have to be filtered. Supported operators are // equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). // Additionally, simple expressions can be formed using logical operators - // `and` and `or`. The [SCIM RFC] has more details but we currently only // support simple expressions. // // [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 Filter string `json:"-" url:"filter,omitempty"` // Attribute to sort the results. SortBy string `json:"-" url:"sortBy,omitempty"` // The order to sort the results. SortOrder ListSortOrder `json:"-" url:"sortOrder,omitempty"` // Specifies the index of the first result. First item is number 1. StartIndex int `json:"-" url:"startIndex,omitempty"` }
List service principals
type ListSortOrder ¶
type ListSortOrder string
const ListSortOrderAscending ListSortOrder = `ascending`
const ListSortOrderDescending ListSortOrder = `descending`
func (*ListSortOrder) Set ¶ added in v0.2.0
func (lso *ListSortOrder) Set(v string) error
Set raw string value and validate it against allowed values
func (*ListSortOrder) String ¶ added in v0.2.0
func (lso *ListSortOrder) String() string
String representation for fmt.Print
func (*ListSortOrder) Type ¶ added in v0.2.0
func (lso *ListSortOrder) Type() string
Type always returns ListSortOrder to satisfy [pflag.Value] interface
type ListUsersRequest ¶
type ListUsersRequest struct { // Comma-separated list of attributes to return in response. Attributes string `json:"-" url:"attributes,omitempty"` // Desired number of results per page. Count int `json:"-" url:"count,omitempty"` // Comma-separated list of attributes to exclude in response. ExcludedAttributes string `json:"-" url:"excludedAttributes,omitempty"` // Query by which the results have to be filtered. Supported operators are // equals(`eq`), contains(`co`), starts with(`sw`) and not equals(`ne`). // Additionally, simple expressions can be formed using logical operators - // `and` and `or`. The [SCIM RFC] has more details but we currently only // support simple expressions. // // [SCIM RFC]: https://tools.ietf.org/html/rfc7644#section-3.4.2.2 Filter string `json:"-" url:"filter,omitempty"` // Attribute to sort the results. Multi-part paths are supported. For // example, `userName`, `name.givenName`, and `emails`. SortBy string `json:"-" url:"sortBy,omitempty"` // The order to sort the results. SortOrder ListSortOrder `json:"-" url:"sortOrder,omitempty"` // Specifies the index of the first result. First item is number 1. StartIndex int `json:"-" url:"startIndex,omitempty"` }
List users
type ListUsersResponse ¶
type ListUsersResponse struct { // Total results returned in the response. ItemsPerPage int64 `json:"itemsPerPage,omitempty"` // User objects returned in the response. Resources []User `json:"Resources,omitempty"` // Starting index of all the results that matched the request filters. First // item is number 1. StartIndex int64 `json:"startIndex,omitempty"` // Total results that match the request filters. TotalResults int64 `json:"totalResults,omitempty"` }
type PartialUpdate ¶
type PatchOp ¶
type PatchOp string
Type of patch operation.
const PatchOpAdd PatchOp = `add`
const PatchOpRemove PatchOp = `remove`
const PatchOpReplace PatchOp = `replace`
type ServicePrincipal ¶
type ServicePrincipal struct { // If this user is active Active bool `json:"active,omitempty"` // UUID relating to the service principal ApplicationId string `json:"applicationId,omitempty"` // String that represents a concatenation of given and family names. DisplayName string `json:"displayName,omitempty"` Entitlements []ComplexValue `json:"entitlements,omitempty"` ExternalId string `json:"externalId,omitempty"` Groups []ComplexValue `json:"groups,omitempty"` // Databricks service principal ID. Id string `json:"id,omitempty" url:"-"` Roles []ComplexValue `json:"roles,omitempty"` }
type ServicePrincipalsAPI ¶
type ServicePrincipalsAPI struct {
// contains filtered or unexported fields
}
Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD platforms. Databricks recommends creating service principals to run production jobs or modify production data. If all processes that act on production data run with service principals, interactive users do not need any write, delete, or modify privileges in production. This eliminates the risk of a user overwriting production data by accident.
func NewServicePrincipals ¶
func NewServicePrincipals(client *client.DatabricksClient) *ServicePrincipalsAPI
func (*ServicePrincipalsAPI) Create ¶
func (a *ServicePrincipalsAPI) Create(ctx context.Context, request ServicePrincipal) (*ServicePrincipal, error)
Create a service principal.
Creates a new service principal in the Databricks Workspace.
func (*ServicePrincipalsAPI) Delete ¶
func (a *ServicePrincipalsAPI) Delete(ctx context.Context, request DeleteServicePrincipalRequest) error
Delete a service principal.
Delete a single service principal in the Databricks Workspace.
func (*ServicePrincipalsAPI) DeleteById ¶
func (a *ServicePrincipalsAPI) DeleteById(ctx context.Context, id string) error
Delete a service principal.
Delete a single service principal in the Databricks Workspace.
func (*ServicePrincipalsAPI) Get ¶
func (a *ServicePrincipalsAPI) Get(ctx context.Context, request GetServicePrincipalRequest) (*ServicePrincipal, error)
Get service principal details.
Gets the details for a single service principal define in the Databricks Workspace.
func (*ServicePrincipalsAPI) GetByDisplayName ¶
func (a *ServicePrincipalsAPI) GetByDisplayName(ctx context.Context, name string) (*ServicePrincipal, error)
GetByDisplayName calls ServicePrincipalsAPI.ServicePrincipalDisplayNameToIdMap and returns a single ServicePrincipal.
Returns an error if there's more than one ServicePrincipal with the same .DisplayName.
Note: All ServicePrincipal instances are loaded into memory before returning matching by name.
This method is generated by Databricks SDK Code Generator.
func (*ServicePrincipalsAPI) GetById ¶
func (a *ServicePrincipalsAPI) GetById(ctx context.Context, id string) (*ServicePrincipal, error)
Get service principal details.
Gets the details for a single service principal define in the Databricks Workspace.
func (*ServicePrincipalsAPI) Impl ¶
func (a *ServicePrincipalsAPI) Impl() ServicePrincipalsService
Impl returns low-level ServicePrincipals API implementation
func (*ServicePrincipalsAPI) ListAll ¶
func (a *ServicePrincipalsAPI) ListAll(ctx context.Context, request ListServicePrincipalsRequest) ([]ServicePrincipal, error)
List service principals.
Gets the set of service principals associated with a Databricks Workspace.
This method is generated by Databricks SDK Code Generator.
func (*ServicePrincipalsAPI) Patch ¶
func (a *ServicePrincipalsAPI) Patch(ctx context.Context, request PartialUpdate) error
Update service principal details.
Partially updates the details of a single service principal in the Databricks Workspace.
func (*ServicePrincipalsAPI) ServicePrincipalDisplayNameToIdMap ¶
func (a *ServicePrincipalsAPI) ServicePrincipalDisplayNameToIdMap(ctx context.Context, request ListServicePrincipalsRequest) (map[string]string, error)
ServicePrincipalDisplayNameToIdMap calls ServicePrincipalsAPI.ListAll and creates a map of results with ServicePrincipal.DisplayName as key and ServicePrincipal.Id as value.
Returns an error if there's more than one ServicePrincipal with the same .DisplayName.
Note: All ServicePrincipal instances are loaded into memory before creating a map.
This method is generated by Databricks SDK Code Generator.
func (*ServicePrincipalsAPI) Update ¶
func (a *ServicePrincipalsAPI) Update(ctx context.Context, request ServicePrincipal) error
Replace service principal.
Updates the details of a single service principal.
This action replaces the existing service principal with the same name.
func (*ServicePrincipalsAPI) WithImpl ¶
func (a *ServicePrincipalsAPI) WithImpl(impl ServicePrincipalsService) *ServicePrincipalsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type ServicePrincipalsService ¶
type ServicePrincipalsService interface { // Create a service principal. // // Creates a new service principal in the Databricks Workspace. Create(ctx context.Context, request ServicePrincipal) (*ServicePrincipal, error) // Delete a service principal. // // Delete a single service principal in the Databricks Workspace. Delete(ctx context.Context, request DeleteServicePrincipalRequest) error // Get service principal details. // // Gets the details for a single service principal define in the Databricks // Workspace. Get(ctx context.Context, request GetServicePrincipalRequest) (*ServicePrincipal, error) // List service principals. // // Gets the set of service principals associated with a Databricks // Workspace. // // Use ListAll() to get all ServicePrincipal instances List(ctx context.Context, request ListServicePrincipalsRequest) (*ListServicePrincipalResponse, error) // Update service principal details. // // Partially updates the details of a single service principal in the // Databricks Workspace. Patch(ctx context.Context, request PartialUpdate) error // Replace service principal. // // Updates the details of a single service principal. // // This action replaces the existing service principal with the same name. Update(ctx context.Context, request ServicePrincipal) error }
Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD platforms. Databricks recommends creating service principals to run production jobs or modify production data. If all processes that act on production data run with service principals, interactive users do not need any write, delete, or modify privileges in production. This eliminates the risk of a user overwriting production data by accident.
type User ¶
type User struct { // If this user is active Active bool `json:"active,omitempty"` // String that represents a concatenation of given and family names. For // example `John Smith`. DisplayName string `json:"displayName,omitempty"` // All the emails associated with the Databricks user. Emails []ComplexValue `json:"emails,omitempty"` Entitlements []ComplexValue `json:"entitlements,omitempty"` ExternalId string `json:"externalId,omitempty"` Groups []ComplexValue `json:"groups,omitempty"` // Databricks user ID. Id string `json:"id,omitempty" url:"-"` Name *Name `json:"name,omitempty"` Roles []ComplexValue `json:"roles,omitempty"` // Email address of the Databricks user. UserName string `json:"userName,omitempty"` }
type UsersAPI ¶
type UsersAPI struct {
// contains filtered or unexported fields
}
User identities recognized by Databricks and represented by email addresses.
Databricks recommends using SCIM provisioning to sync users and groups automatically from your identity provider to your Databricks Workspace. SCIM streamlines onboarding a new employee or team by using your identity provider to create users and groups in Databricks Workspace and give them the proper level of access. When a user leaves your organization or no longer needs access to Databricks Workspace, admins can terminate the user in your identity provider and that user’s account will also be removed from Databricks Workspace. This ensures a consistent offboarding process and prevents unauthorized users from accessing sensitive data.
func NewUsers ¶
func NewUsers(client *client.DatabricksClient) *UsersAPI
func (*UsersAPI) Create ¶
Create a new user.
Creates a new user in the Databricks Workspace. This new user will also be added to the Databricks account.
func (*UsersAPI) Delete ¶
func (a *UsersAPI) Delete(ctx context.Context, request DeleteUserRequest) error
Delete a user.
Deletes a user. Deleting a user from a Databricks Workspace also removes objects associated with the user.
func (*UsersAPI) DeleteById ¶
Delete a user.
Deletes a user. Deleting a user from a Databricks Workspace also removes objects associated with the user.
func (*UsersAPI) Get ¶
Get user details.
Gets information for a specific user in Databricks Workspace.
func (*UsersAPI) GetById ¶
Get user details.
Gets information for a specific user in Databricks Workspace.
func (*UsersAPI) GetByUserName ¶
GetByUserName calls UsersAPI.UserUserNameToIdMap and returns a single User.
Returns an error if there's more than one User with the same .UserName.
Note: All User instances are loaded into memory before returning matching by name.
This method is generated by Databricks SDK Code Generator.
func (*UsersAPI) Impl ¶
func (a *UsersAPI) Impl() UsersService
Impl returns low-level Users API implementation
func (*UsersAPI) ListAll ¶
List users.
Gets details for all the users associated with a Databricks Workspace.
This method is generated by Databricks SDK Code Generator.
func (*UsersAPI) Patch ¶
func (a *UsersAPI) Patch(ctx context.Context, request PartialUpdate) error
Update user details.
Partially updates a user resource by applying the supplied operations on specific user attributes.
func (*UsersAPI) Update ¶
Replace a user.
Replaces a user's information with the data supplied in request.
func (*UsersAPI) UserUserNameToIdMap ¶
func (a *UsersAPI) UserUserNameToIdMap(ctx context.Context, request ListUsersRequest) (map[string]string, error)
UserUserNameToIdMap calls UsersAPI.ListAll and creates a map of results with User.UserName as key and User.Id as value.
Returns an error if there's more than one User with the same .UserName.
Note: All User instances are loaded into memory before creating a map.
This method is generated by Databricks SDK Code Generator.
func (*UsersAPI) WithImpl ¶
func (a *UsersAPI) WithImpl(impl UsersService) *UsersAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type UsersService ¶
type UsersService interface { // Create a new user. // // Creates a new user in the Databricks Workspace. This new user will also // be added to the Databricks account. Create(ctx context.Context, request User) (*User, error) // Delete a user. // // Deletes a user. Deleting a user from a Databricks Workspace also removes // objects associated with the user. Delete(ctx context.Context, request DeleteUserRequest) error // Get user details. // // Gets information for a specific user in Databricks Workspace. Get(ctx context.Context, request GetUserRequest) (*User, error) // List users. // // Gets details for all the users associated with a Databricks Workspace. // // Use ListAll() to get all User instances List(ctx context.Context, request ListUsersRequest) (*ListUsersResponse, error) // Update user details. // // Partially updates a user resource by applying the supplied operations on // specific user attributes. Patch(ctx context.Context, request PartialUpdate) error // Replace a user. // // Replaces a user's information with the data supplied in request. Update(ctx context.Context, request User) error }
User identities recognized by Databricks and represented by email addresses.
Databricks recommends using SCIM provisioning to sync users and groups automatically from your identity provider to your Databricks Workspace. SCIM streamlines onboarding a new employee or team by using your identity provider to create users and groups in Databricks Workspace and give them the proper level of access. When a user leaves your organization or no longer needs access to Databricks Workspace, admins can terminate the user in your identity provider and that user’s account will also be removed from Databricks Workspace. This ensures a consistent offboarding process and prevents unauthorized users from accessing sensitive data.