Documentation ¶
Index ¶
- func DataSourceCurrentUser() *schema.Resource
- func DataSourceGroup() *schema.Resource
- func DataSourceServicePrincipal() *schema.Resource
- func DataSourceServicePrincipals() *schema.Resource
- func DataSourceUser() *schema.Resource
- func PatchRequest(op, path, value string) patchRequest
- func PatchRequestComplexValue(operations []patchOperation) patchRequest
- func ResourceEntitlements() *schema.Resource
- func ResourceGroup() *schema.Resource
- func ResourceGroupMember() *schema.Resource
- func ResourceGroupRole() *schema.Resource
- func ResourceServicePrincipal() *schema.Resource
- func ResourceUser() *schema.Resource
- type ComplexValue
- type ComplexValues
- type Group
- type GroupList
- type GroupsAPI
- func (a GroupsAPI) Create(scimGroupRequest Group) (group Group, err error)
- func (a GroupsAPI) Delete(groupID string) error
- func (a GroupsAPI) Filter(filter string) (GroupList, error)
- func (a GroupsAPI) Patch(groupID string, r patchRequest) error
- func (a GroupsAPI) Read(groupID, attributes string) (group Group, err error)
- func (a GroupsAPI) ReadByDisplayName(displayName, attributes string) (group Group, err error)
- func (a GroupsAPI) UpdateEntitlements(groupID string, entitlements patchRequest) error
- func (a GroupsAPI) UpdateNameAndEntitlements(groupID string, name string, externalID string, e entitlements) error
- type ServicePrincipalsAPI
- func (a ServicePrincipalsAPI) Create(rsp User) (sp User, err error)
- func (a ServicePrincipalsAPI) Delete(servicePrincipalID string) error
- func (a ServicePrincipalsAPI) Filter(filter string, excludeRoles bool) (u []User, err error)
- func (a ServicePrincipalsAPI) Patch(servicePrincipalID string, r patchRequest) error
- func (a ServicePrincipalsAPI) Read(servicePrincipalID string) (sp User, err error)
- func (a ServicePrincipalsAPI) Update(servicePrincipalID string, updateRequest User) error
- func (a ServicePrincipalsAPI) UpdateEntitlements(servicePrincipalID string, entitlements patchRequest) error
- type URN
- type User
- type UserList
- type UsersAPI
- func (a UsersAPI) Create(ru User) (user User, err error)
- func (a UsersAPI) Delete(userID string) error
- func (a UsersAPI) Filter(filter string, excludeRoles bool) (u []User, err error)
- func (a UsersAPI) Me() (User, error)
- func (a UsersAPI) Patch(userID string, r patchRequest) error
- func (a UsersAPI) Read(userID, attributes string) (User, error)
- func (a UsersAPI) Update(userID, attributes string, updateRequest User) error
- func (a UsersAPI) UpdateEntitlements(userID string, entitlements patchRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataSourceCurrentUser ¶
DataSourceCurrentUser returns information about caller identity
func DataSourceGroup ¶
DataSourceGroup returns information about group specified by display name
func DataSourceServicePrincipal ¶
DataSourceServicePrincipal returns information about the spn specified by the application_id
func DataSourceServicePrincipals ¶
DataSourceServicePrincipals searches for service principals based on display_name
func DataSourceUser ¶
DataSourceUser returns information about user specified by user name
func PatchRequest ¶
func PatchRequest(op, path, value string) patchRequest
func PatchRequestComplexValue ¶ added in v1.3.0
func PatchRequestComplexValue(operations []patchOperation) patchRequest
func ResourceEntitlements ¶ added in v1.3.0
ResourceGroup manages user groups
func ResourceGroupMember ¶
ResourceGroupMember bind group with member
func ResourceGroupRole ¶ added in v1.3.0
ResourceGroupRole bind group with role
func ResourceServicePrincipal ¶
ResourceServicePrincipal manages service principals within workspace
func ResourceUser ¶
ResourceUser manages users within workspace
Types ¶
type ComplexValue ¶
type ComplexValue struct { Value string `json:"value,omitempty"` Display string `json:"display,omitempty"` Ref string `json:"$ref,omitempty"` // https://tools.ietf.org/html/rfc7643#page-64 Type string `json:"type,omitempty"` }
Generalisation of most common complex values from SCIM protocol Details at https://datatracker.ietf.org/doc/html/rfc7643#section-2.3.8
type ComplexValues ¶
type ComplexValues []ComplexValue
func (ComplexValues) HasValue ¶
func (cv ComplexValues) HasValue(value string) bool
type Group ¶
type Group struct { ID string `json:"id,omitempty"` Schemas []URN `json:"schemas,omitempty"` DisplayName string `json:"displayName,omitempty"` Members []ComplexValue `json:"members,omitempty"` Groups []ComplexValue `json:"groups,omitempty"` Roles []ComplexValue `json:"roles,omitempty"` Entitlements entitlements `json:"entitlements,omitempty"` ExternalID string `json:"externalId,omitempty"` }
Group contains information about the SCIM group
type GroupList ¶
type GroupList struct { TotalResults int32 `json:"totalResults,omitempty"` StartIndex int32 `json:"startIndex,omitempty"` ItemsPerPage int32 `json:"itemsPerPage,omitempty"` Schemas []URN `json:"schemas,omitempty"` Resources []Group `json:"resources,omitempty"` }
GroupList contains a list of groups fetched from a list api call from SCIM api
type GroupsAPI ¶
type GroupsAPI struct {
// contains filtered or unexported fields
}
GroupsAPI exposes the scim groups API
func NewGroupsAPI ¶
NewGroupsAPI creates GroupsAPI instance from provider meta
func (GroupsAPI) ReadByDisplayName ¶
func (GroupsAPI) UpdateEntitlements ¶ added in v1.3.0
type ServicePrincipalsAPI ¶
type ServicePrincipalsAPI struct {
// contains filtered or unexported fields
}
ServicePrincipalsAPI exposes the scim servicePrincipal API
func NewServicePrincipalsAPI ¶
func NewServicePrincipalsAPI(ctx context.Context, m any) ServicePrincipalsAPI
NewServicePrincipalsAPI creates ServicePrincipalsAPI instance from provider meta
func (ServicePrincipalsAPI) Create ¶
func (a ServicePrincipalsAPI) Create(rsp User) (sp User, err error)
CreateR ..
func (ServicePrincipalsAPI) Delete ¶
func (a ServicePrincipalsAPI) Delete(servicePrincipalID string) error
Delete will delete the servicePrincipal given the servicePrincipal id
func (ServicePrincipalsAPI) Filter ¶ added in v1.7.0
func (a ServicePrincipalsAPI) Filter(filter string, excludeRoles bool) (u []User, err error)
func (ServicePrincipalsAPI) Patch ¶
func (a ServicePrincipalsAPI) Patch(servicePrincipalID string, r patchRequest) error
Patch updates resource-friendly entity
func (ServicePrincipalsAPI) Read ¶
func (a ServicePrincipalsAPI) Read(servicePrincipalID string) (sp User, err error)
func (ServicePrincipalsAPI) Update ¶
func (a ServicePrincipalsAPI) Update(servicePrincipalID string, updateRequest User) error
Update replaces resource-friendly-entity
func (ServicePrincipalsAPI) UpdateEntitlements ¶ added in v1.3.0
func (a ServicePrincipalsAPI) UpdateEntitlements(servicePrincipalID string, entitlements patchRequest) error
type URN ¶
type URN string
URN is a custom type for the SCIM spec for the schema
const ( UserSchema URN = "urn:ietf:params:scim:schemas:core:2.0:User" ServicePrincipalSchema URN = "urn:ietf:params:scim:schemas:core:2.0:ServicePrincipal" WorkspaceUserSchema URN = "urn:ietf:params:scim:schemas:extension:workspace:2.0:User" PatchOp URN = "urn:ietf:params:scim:api:messages:2.0:PatchOp" GroupSchema URN = "urn:ietf:params:scim:schemas:core:2.0:Group" )
Possible schema URNs for the Databricks SCIM api
type User ¶
type User struct { ID string `json:"id,omitempty"` Emails []email `json:"emails,omitempty"` DisplayName string `json:"displayName,omitempty" tf:"alias:display_name"` Active bool `json:"active"` Schemas []URN `json:"schemas,omitempty"` UserName string `json:"userName,omitempty" tf:"alias:user_name"` ApplicationID string `json:"applicationId,omitempty" tf:"alias:application_id"` Groups []ComplexValue `json:"groups,omitempty"` Name map[string]string `json:"name,omitempty"` Roles []ComplexValue `json:"roles,omitempty"` Entitlements entitlements `json:"entitlements,omitempty"` ExternalID string `json:"externalId,omitempty"` }
User is a struct that contains all the information about a SCIM user
type UserList ¶
type UserList struct { TotalResults int32 `json:"totalResults,omitempty"` StartIndex int32 `json:"startIndex,omitempty"` ItemsPerPage int32 `json:"itemsPerPage,omitempty"` Schemas []URN `json:"schemas,omitempty"` Resources []User `json:"resources,omitempty"` }
UserList contains a list of Users fetched from a list api call from SCIM api
type UsersAPI ¶
type UsersAPI struct {
// contains filtered or unexported fields
}
UsersAPI exposes the scim user API
func NewUsersAPI ¶
NewUsersAPI creates UsersAPI instance from provider meta