Documentation
¶
Overview ¶
These APIs allow you to manage Account Iam V2, Workspace Iam V2, etc.
Index ¶
- type AccountIamV2API
- func (a *AccountIamV2API) CreateWorkspaceAssignmentDetail(ctx context.Context, request CreateWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
- func (a *AccountIamV2API) DeleteWorkspaceAssignmentDetail(ctx context.Context, request DeleteWorkspaceAssignmentDetailRequest) error
- func (a *AccountIamV2API) GetWorkspaceAccessDetail(ctx context.Context, request GetWorkspaceAccessDetailRequest) (*WorkspaceAccessDetail, error)
- func (a *AccountIamV2API) GetWorkspaceAssignmentDetail(ctx context.Context, request GetWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
- func (a *AccountIamV2API) ListWorkspaceAssignmentDetails(ctx context.Context, request ListWorkspaceAssignmentDetailsRequest) (*ListWorkspaceAssignmentDetailsResponse, error)
- func (a *AccountIamV2API) ResolveGroup(ctx context.Context, request ResolveGroupRequest) (*ResolveGroupResponse, error)
- func (a *AccountIamV2API) ResolveServicePrincipal(ctx context.Context, request ResolveServicePrincipalRequest) (*ResolveServicePrincipalResponse, error)
- func (a *AccountIamV2API) ResolveUser(ctx context.Context, request ResolveUserRequest) (*ResolveUserResponse, error)
- func (a *AccountIamV2API) UpdateWorkspaceAssignmentDetail(ctx context.Context, request UpdateWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
- type AccountIamV2Interface
- type AccountIamV2Servicedeprecated
- type CreateWorkspaceAssignmentDetailProxyRequest
- type CreateWorkspaceAssignmentDetailRequest
- type DeleteWorkspaceAssignmentDetailProxyRequest
- type DeleteWorkspaceAssignmentDetailRequest
- type Entitlement
- type GetWorkspaceAccessDetailLocalRequest
- type GetWorkspaceAccessDetailRequest
- type GetWorkspaceAssignmentDetailProxyRequest
- type GetWorkspaceAssignmentDetailRequest
- type Group
- type ListWorkspaceAssignmentDetailsProxyRequest
- type ListWorkspaceAssignmentDetailsRequest
- type ListWorkspaceAssignmentDetailsResponse
- type PrincipalType
- type ResolveGroupProxyRequest
- type ResolveGroupRequest
- type ResolveGroupResponse
- type ResolveServicePrincipalProxyRequest
- type ResolveServicePrincipalRequest
- type ResolveServicePrincipalResponse
- type ResolveUserProxyRequest
- type ResolveUserRequest
- type ResolveUserResponse
- type ServicePrincipal
- type State
- type UpdateWorkspaceAssignmentDetailProxyRequest
- type UpdateWorkspaceAssignmentDetailRequest
- type User
- type UserName
- type WorkspaceAccessDetail
- type WorkspaceAccessDetailAccessType
- type WorkspaceAccessDetailView
- type WorkspaceAssignmentDetail
- type WorkspaceIamV2API
- func (a *WorkspaceIamV2API) CreateWorkspaceAssignmentDetailProxy(ctx context.Context, request CreateWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
- func (a *WorkspaceIamV2API) DeleteWorkspaceAssignmentDetailProxy(ctx context.Context, request DeleteWorkspaceAssignmentDetailProxyRequest) error
- func (a *WorkspaceIamV2API) GetWorkspaceAccessDetailLocal(ctx context.Context, request GetWorkspaceAccessDetailLocalRequest) (*WorkspaceAccessDetail, error)
- func (a *WorkspaceIamV2API) GetWorkspaceAssignmentDetailProxy(ctx context.Context, request GetWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
- func (a *WorkspaceIamV2API) ListWorkspaceAssignmentDetailsProxy(ctx context.Context, request ListWorkspaceAssignmentDetailsProxyRequest) (*ListWorkspaceAssignmentDetailsResponse, error)
- func (a *WorkspaceIamV2API) ResolveGroupProxy(ctx context.Context, request ResolveGroupProxyRequest) (*ResolveGroupResponse, error)
- func (a *WorkspaceIamV2API) ResolveServicePrincipalProxy(ctx context.Context, request ResolveServicePrincipalProxyRequest) (*ResolveServicePrincipalResponse, error)
- func (a *WorkspaceIamV2API) ResolveUserProxy(ctx context.Context, request ResolveUserProxyRequest) (*ResolveUserResponse, error)
- func (a *WorkspaceIamV2API) UpdateWorkspaceAssignmentDetailProxy(ctx context.Context, request UpdateWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
- type WorkspaceIamV2Interface
- type WorkspaceIamV2Servicedeprecated
- type WorkspacePermission
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountIamV2API ¶
type AccountIamV2API struct {
// contains filtered or unexported fields
}
These APIs are used to manage identities and the workspace access of these identities in <Databricks>.
func NewAccountIamV2 ¶
func NewAccountIamV2(client *client.DatabricksClient) *AccountIamV2API
func (*AccountIamV2API) CreateWorkspaceAssignmentDetail ¶ added in v0.133.0
func (a *AccountIamV2API) CreateWorkspaceAssignmentDetail(ctx context.Context, request CreateWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
func (*AccountIamV2API) DeleteWorkspaceAssignmentDetail ¶ added in v0.133.0
func (a *AccountIamV2API) DeleteWorkspaceAssignmentDetail(ctx context.Context, request DeleteWorkspaceAssignmentDetailRequest) error
func (*AccountIamV2API) GetWorkspaceAccessDetail ¶
func (a *AccountIamV2API) GetWorkspaceAccessDetail(ctx context.Context, request GetWorkspaceAccessDetailRequest) (*WorkspaceAccessDetail, error)
func (*AccountIamV2API) GetWorkspaceAssignmentDetail ¶ added in v0.133.0
func (a *AccountIamV2API) GetWorkspaceAssignmentDetail(ctx context.Context, request GetWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
func (*AccountIamV2API) ListWorkspaceAssignmentDetails ¶ added in v0.133.0
func (a *AccountIamV2API) ListWorkspaceAssignmentDetails(ctx context.Context, request ListWorkspaceAssignmentDetailsRequest) (*ListWorkspaceAssignmentDetailsResponse, error)
func (*AccountIamV2API) ResolveGroup ¶
func (a *AccountIamV2API) ResolveGroup(ctx context.Context, request ResolveGroupRequest) (*ResolveGroupResponse, error)
func (*AccountIamV2API) ResolveServicePrincipal ¶
func (a *AccountIamV2API) ResolveServicePrincipal(ctx context.Context, request ResolveServicePrincipalRequest) (*ResolveServicePrincipalResponse, error)
func (*AccountIamV2API) ResolveUser ¶
func (a *AccountIamV2API) ResolveUser(ctx context.Context, request ResolveUserRequest) (*ResolveUserResponse, error)
func (*AccountIamV2API) UpdateWorkspaceAssignmentDetail ¶ added in v0.133.0
func (a *AccountIamV2API) UpdateWorkspaceAssignmentDetail(ctx context.Context, request UpdateWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
type AccountIamV2Interface ¶
type AccountIamV2Interface interface {
// Creates a workspace assignment detail for a principal. Entitlement grants are
// applied individually and non-atomically — if a failure occurs partway
// through, the principal will be assigned to the workspace but with only a
// subset of the requested entitlements. Use GetWorkspaceAssignmentDetail to
// confirm which entitlements were successfully granted.
CreateWorkspaceAssignmentDetail(ctx context.Context, request CreateWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
// Deletes a workspace assignment detail for a principal, revoking all
// associated entitlements. Entitlement revocations are applied individually and
// non-atomically — if a failure occurs partway through, the principal remains
// assigned with a subset of its original entitlements, and the operation is
// safe to retry.
DeleteWorkspaceAssignmentDetail(ctx context.Context, request DeleteWorkspaceAssignmentDetailRequest) error
// Returns the access details for a principal in a workspace. Allows for
// checking access details for any provisioned principal (user, service
// principal, or group) in a workspace. * Provisioned principal here refers to
// one that has been synced into Databricks from the customer's IdP or added
// explicitly to Databricks via SCIM/UI. Allows for passing in a "view"
// parameter to control what fields are returned (BASIC by default or FULL).
GetWorkspaceAccessDetail(ctx context.Context, request GetWorkspaceAccessDetailRequest) (*WorkspaceAccessDetail, error)
// Returns the assignment details for a principal in a workspace.
GetWorkspaceAssignmentDetail(ctx context.Context, request GetWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
// Lists workspace assignment details for a workspace.
ListWorkspaceAssignmentDetails(ctx context.Context, request ListWorkspaceAssignmentDetailsRequest) (*ListWorkspaceAssignmentDetailsResponse, error)
// Resolves a group with the given external ID from the customer's IdP. If the
// group does not exist, it will be created in the account. If the customer is
// not onboarded onto Automatic Identity Management (AIM), this will return an
// error.
ResolveGroup(ctx context.Context, request ResolveGroupRequest) (*ResolveGroupResponse, error)
// Resolves an SP with the given external ID from the customer's IdP. If the SP
// does not exist, it will be created. If the customer is not onboarded onto
// Automatic Identity Management (AIM), this will return an error.
ResolveServicePrincipal(ctx context.Context, request ResolveServicePrincipalRequest) (*ResolveServicePrincipalResponse, error)
// Resolves a user with the given external ID from the customer's IdP. If the
// user does not exist, it will be created. If the customer is not onboarded
// onto Automatic Identity Management (AIM), this will return an error.
ResolveUser(ctx context.Context, request ResolveUserRequest) (*ResolveUserResponse, error)
// Updates the entitlements of a directly assigned principal in a workspace.
// Entitlement changes are applied individually and non-atomically — if a
// failure occurs partway through, only a subset of the requested changes may
// have been applied. Use GetWorkspaceAssignmentDetail to confirm the final
// state.
UpdateWorkspaceAssignmentDetail(ctx context.Context, request UpdateWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
}
type AccountIamV2Service
deprecated
type AccountIamV2Service interface {
// Creates a workspace assignment detail for a principal. Entitlement grants
// are applied individually and non-atomically — if a failure occurs
// partway through, the principal will be assigned to the workspace but with
// only a subset of the requested entitlements. Use
// GetWorkspaceAssignmentDetail to confirm which entitlements were
// successfully granted.
CreateWorkspaceAssignmentDetail(ctx context.Context, request CreateWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
// Deletes a workspace assignment detail for a principal, revoking all
// associated entitlements. Entitlement revocations are applied individually
// and non-atomically — if a failure occurs partway through, the principal
// remains assigned with a subset of its original entitlements, and the
// operation is safe to retry.
DeleteWorkspaceAssignmentDetail(ctx context.Context, request DeleteWorkspaceAssignmentDetailRequest) error
// Returns the access details for a principal in a workspace. Allows for
// checking access details for any provisioned principal (user, service
// principal, or group) in a workspace. * Provisioned principal here refers
// to one that has been synced into Databricks from the customer's IdP or
// added explicitly to Databricks via SCIM/UI. Allows for passing in a
// "view" parameter to control what fields are returned (BASIC by default or
// FULL).
GetWorkspaceAccessDetail(ctx context.Context, request GetWorkspaceAccessDetailRequest) (*WorkspaceAccessDetail, error)
// Returns the assignment details for a principal in a workspace.
GetWorkspaceAssignmentDetail(ctx context.Context, request GetWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
// Lists workspace assignment details for a workspace.
ListWorkspaceAssignmentDetails(ctx context.Context, request ListWorkspaceAssignmentDetailsRequest) (*ListWorkspaceAssignmentDetailsResponse, error)
// Resolves a group with the given external ID from the customer's IdP. If
// the group does not exist, it will be created in the account. If the
// customer is not onboarded onto Automatic Identity Management (AIM), this
// will return an error.
ResolveGroup(ctx context.Context, request ResolveGroupRequest) (*ResolveGroupResponse, error)
// Resolves an SP with the given external ID from the customer's IdP. If the
// SP does not exist, it will be created. If the customer is not onboarded
// onto Automatic Identity Management (AIM), this will return an error.
ResolveServicePrincipal(ctx context.Context, request ResolveServicePrincipalRequest) (*ResolveServicePrincipalResponse, error)
// Resolves a user with the given external ID from the customer's IdP. If
// the user does not exist, it will be created. If the customer is not
// onboarded onto Automatic Identity Management (AIM), this will return an
// error.
ResolveUser(ctx context.Context, request ResolveUserRequest) (*ResolveUserResponse, error)
// Updates the entitlements of a directly assigned principal in a workspace.
// Entitlement changes are applied individually and non-atomically — if a
// failure occurs partway through, only a subset of the requested changes
// may have been applied. Use GetWorkspaceAssignmentDetail to confirm the
// final state.
UpdateWorkspaceAssignmentDetail(ctx context.Context, request UpdateWorkspaceAssignmentDetailRequest) (*WorkspaceAssignmentDetail, error)
}
These APIs are used to manage identities and the workspace access of these identities in <Databricks>.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type CreateWorkspaceAssignmentDetailProxyRequest ¶ added in v0.133.0
type CreateWorkspaceAssignmentDetailProxyRequest struct {
// Required. Workspace assignment detail to be created in <Databricks>.
WorkspaceAssignmentDetail WorkspaceAssignmentDetail `json:"workspace_assignment_detail"`
}
type CreateWorkspaceAssignmentDetailRequest ¶ added in v0.133.0
type CreateWorkspaceAssignmentDetailRequest struct {
// Required. Workspace assignment detail to be created in <Databricks>.
WorkspaceAssignmentDetail WorkspaceAssignmentDetail `json:"workspace_assignment_detail"`
// Required. The workspace ID for which the workspace assignment detail is
// being created.
WorkspaceId int64 `json:"-" url:"-"`
}
type DeleteWorkspaceAssignmentDetailProxyRequest ¶ added in v0.133.0
type DeleteWorkspaceAssignmentDetailProxyRequest struct {
// Required. ID of the principal in Databricks to delete workspace
// assignment for.
PrincipalId int64 `json:"-" url:"-"`
}
type DeleteWorkspaceAssignmentDetailRequest ¶ added in v0.133.0
type Entitlement ¶ added in v0.133.0
type Entitlement string
const EntitlementAllowClusterCreate Entitlement = `ALLOW_CLUSTER_CREATE`
const EntitlementAllowInstancePoolCreate Entitlement = `ALLOW_INSTANCE_POOL_CREATE`
const EntitlementDatabricksSqlAccess Entitlement = `DATABRICKS_SQL_ACCESS`
const EntitlementWorkspaceAccess Entitlement = `WORKSPACE_ACCESS`
const EntitlementWorkspaceAdmin Entitlement = `WORKSPACE_ADMIN`
const EntitlementWorkspaceConsume Entitlement = `WORKSPACE_CONSUME`
func (*Entitlement) Set ¶ added in v0.133.0
func (f *Entitlement) Set(v string) error
Set raw string value and validate it against allowed values
func (*Entitlement) String ¶ added in v0.133.0
func (f *Entitlement) String() string
String representation for fmt.Print
func (*Entitlement) Type ¶ added in v0.133.0
func (f *Entitlement) Type() string
Type always returns Entitlement to satisfy [pflag.Value] interface
func (*Entitlement) Values ¶ added in v0.133.0
func (f *Entitlement) Values() []Entitlement
Values returns all possible values for Entitlement.
There is no guarantee on the order of the values in the slice.
type GetWorkspaceAccessDetailLocalRequest ¶
type GetWorkspaceAccessDetailLocalRequest struct {
// Required. The internal ID of the principal (user/sp/group) for which the
// access details are being requested.
PrincipalId int64 `json:"-" url:"-"`
// Controls what fields are returned.
View WorkspaceAccessDetailView `json:"-" url:"view,omitempty"`
}
type GetWorkspaceAccessDetailRequest ¶
type GetWorkspaceAccessDetailRequest struct {
// Required. The internal ID of the principal (user/sp/group) for which the
// access details are being requested.
PrincipalId int64 `json:"-" url:"-"`
// Controls what fields are returned.
View WorkspaceAccessDetailView `json:"-" url:"view,omitempty"`
// Required. The workspace ID for which the access details are being
// requested.
WorkspaceId int64 `json:"-" url:"-"`
}
type GetWorkspaceAssignmentDetailProxyRequest ¶ added in v0.133.0
type GetWorkspaceAssignmentDetailProxyRequest struct {
// Required. The internal ID of the principal (user/sp/group) for which the
// assignment details are being requested.
PrincipalId int64 `json:"-" url:"-"`
}
type GetWorkspaceAssignmentDetailRequest ¶ added in v0.133.0
type GetWorkspaceAssignmentDetailRequest struct {
// Required. The internal ID of the principal (user/sp/group) for which the
// assignment details are being requested.
PrincipalId int64 `json:"-" url:"-"`
// Required. The workspace ID for which the assignment details are being
// requested.
WorkspaceId int64 `json:"-" url:"-"`
}
type Group ¶
type Group struct {
// The parent account ID for group in Databricks.
AccountId string `json:"account_id,omitempty"`
// ExternalId of the group in the customer's IdP.
ExternalId string `json:"external_id,omitempty"`
// Display name of the group.
GroupName string `json:"group_name,omitempty"`
// Internal group ID of the group in Databricks.
InternalId int64 `json:"internal_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The details of a Group resource.
func (Group) MarshalJSON ¶
func (*Group) UnmarshalJSON ¶
type ListWorkspaceAssignmentDetailsProxyRequest ¶ added in v0.133.0
type ListWorkspaceAssignmentDetailsProxyRequest struct {
// The maximum number of workspace assignment details to return. The service
// may return fewer than this value.
PageSize int `json:"-" url:"page_size,omitempty"`
// A page token, received from a previous
// ListWorkspaceAssignmentDetailsProxy call. Provide this to retrieve the
// subsequent page.
PageToken string `json:"-" url:"page_token,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListWorkspaceAssignmentDetailsProxyRequest) MarshalJSON ¶ added in v0.133.0
func (s ListWorkspaceAssignmentDetailsProxyRequest) MarshalJSON() ([]byte, error)
func (*ListWorkspaceAssignmentDetailsProxyRequest) UnmarshalJSON ¶ added in v0.133.0
func (s *ListWorkspaceAssignmentDetailsProxyRequest) UnmarshalJSON(b []byte) error
type ListWorkspaceAssignmentDetailsRequest ¶ added in v0.133.0
type ListWorkspaceAssignmentDetailsRequest struct {
// The maximum number of workspace assignment details to return. The service
// may return fewer than this value.
PageSize int `json:"-" url:"page_size,omitempty"`
// A page token, received from a previous ListWorkspaceAssignmentDetails
// call. Provide this to retrieve the subsequent page.
PageToken string `json:"-" url:"page_token,omitempty"`
// Required. The workspace ID for which the workspace assignment details are
// being fetched.
WorkspaceId int64 `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (ListWorkspaceAssignmentDetailsRequest) MarshalJSON ¶ added in v0.133.0
func (s ListWorkspaceAssignmentDetailsRequest) MarshalJSON() ([]byte, error)
func (*ListWorkspaceAssignmentDetailsRequest) UnmarshalJSON ¶ added in v0.133.0
func (s *ListWorkspaceAssignmentDetailsRequest) UnmarshalJSON(b []byte) error
type ListWorkspaceAssignmentDetailsResponse ¶ added in v0.133.0
type ListWorkspaceAssignmentDetailsResponse struct {
// A token, which can be sent as page_token to retrieve the next page. If
// this field is omitted, there are no subsequent pages.
NextPageToken string `json:"next_page_token,omitempty"`
WorkspaceAssignmentDetails []WorkspaceAssignmentDetail `json:"workspace_assignment_details,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Response message for listing workspace assignment details.
func (ListWorkspaceAssignmentDetailsResponse) MarshalJSON ¶ added in v0.133.0
func (s ListWorkspaceAssignmentDetailsResponse) MarshalJSON() ([]byte, error)
func (*ListWorkspaceAssignmentDetailsResponse) UnmarshalJSON ¶ added in v0.133.0
func (s *ListWorkspaceAssignmentDetailsResponse) UnmarshalJSON(b []byte) error
type PrincipalType ¶
type PrincipalType string
The type of the principal (user/sp/group).
const PrincipalTypeGroup PrincipalType = `GROUP`
const PrincipalTypeServicePrincipal PrincipalType = `SERVICE_PRINCIPAL`
const PrincipalTypeUser PrincipalType = `USER`
func (*PrincipalType) Set ¶
func (f *PrincipalType) Set(v string) error
Set raw string value and validate it against allowed values
func (*PrincipalType) String ¶
func (f *PrincipalType) String() string
String representation for fmt.Print
func (*PrincipalType) Type ¶
func (f *PrincipalType) Type() string
Type always returns PrincipalType to satisfy [pflag.Value] interface
func (*PrincipalType) Values ¶
func (f *PrincipalType) Values() []PrincipalType
Values returns all possible values for PrincipalType.
There is no guarantee on the order of the values in the slice.
type ResolveGroupProxyRequest ¶
type ResolveGroupProxyRequest struct {
// Required. The external ID of the group in the customer's IdP.
ExternalId string `json:"external_id"`
}
Request message for resolving a group with the given external ID from the customer's IdP into Databricks. Will resolve metadata such as the group's groupname, and inherited parent groups.
type ResolveGroupRequest ¶
type ResolveGroupRequest struct {
// Required. The external ID of the group in the customer's IdP.
ExternalId string `json:"external_id"`
}
Request message for resolving a group with the given external ID from the customer's IdP into Databricks. Will resolve metadata such as the group's groupname, and inherited parent groups.
type ResolveGroupResponse ¶
type ResolveGroupResponse struct {
// The group that was resolved.
Group *Group `json:"group,omitempty"`
}
type ResolveServicePrincipalProxyRequest ¶
type ResolveServicePrincipalProxyRequest struct {
// Required. The external ID of the service principal in the customer's IdP.
ExternalId string `json:"external_id"`
}
Request message for resolving a service principal with the given external ID from the customer's IdP into Databricks. Will resolve metadata such as the service principal's displayname, status, and inherited parent groups.
type ResolveServicePrincipalRequest ¶
type ResolveServicePrincipalRequest struct {
// Required. The external ID of the service principal in the customer's IdP.
ExternalId string `json:"external_id"`
}
Request message for resolving a service principal with the given external ID from the customer's IdP into Databricks. Will resolve metadata such as the service principal's displayname, status, and inherited parent groups.
type ResolveServicePrincipalResponse ¶
type ResolveServicePrincipalResponse struct {
// The service principal that was resolved.
ServicePrincipal *ServicePrincipal `json:"service_principal,omitempty"`
}
type ResolveUserProxyRequest ¶
type ResolveUserProxyRequest struct {
// Required. The external ID of the user in the customer's IdP.
ExternalId string `json:"external_id"`
}
Request message for resolving a user with the given external ID from the customer's IdP into Databricks. Will resolve metadata such as the user's displayname, status, and inherited parent groups.
type ResolveUserRequest ¶
type ResolveUserRequest struct {
// Required. The external ID of the user in the customer's IdP.
ExternalId string `json:"external_id"`
}
Request message for resolving a user with the given external ID from the customer's IdP into Databricks. Will resolve metadata such as the user's displayname, status, and inherited parent groups.
type ResolveUserResponse ¶
type ResolveUserResponse struct {
// The user that was resolved.
User *User `json:"user,omitempty"`
}
type ServicePrincipal ¶
type ServicePrincipal struct {
// The parent account ID for the service principal in Databricks.
AccountId string `json:"account_id,omitempty"`
// The activity status of a service principal in a Databricks account.
AccountSpStatus State `json:"account_sp_status,omitempty"`
// Application ID of the service principal.
ApplicationId string `json:"application_id,omitempty"`
// Display name of the service principal.
DisplayName string `json:"display_name,omitempty"`
// ExternalId of the service principal in the customer's IdP.
ExternalId string `json:"external_id,omitempty"`
// Internal service principal ID of the service principal in Databricks.
InternalId int64 `json:"internal_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The details of a ServicePrincipal resource.
func (ServicePrincipal) MarshalJSON ¶
func (s ServicePrincipal) MarshalJSON() ([]byte, error)
func (*ServicePrincipal) UnmarshalJSON ¶
func (s *ServicePrincipal) UnmarshalJSON(b []byte) error
type State ¶
type State string
The activity status of a user or service principal in a Databricks account or workspace.
const StateActive State = `ACTIVE`
const StateInactive State = `INACTIVE`
type UpdateWorkspaceAssignmentDetailProxyRequest ¶ added in v0.133.0
type UpdateWorkspaceAssignmentDetailProxyRequest struct {
// Required. ID of the principal in Databricks.
PrincipalId int64 `json:"-" url:"-"`
// Required. The list of fields to update.
UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"`
// Required. Workspace assignment detail to be updated in <Databricks>.
WorkspaceAssignmentDetail WorkspaceAssignmentDetail `json:"workspace_assignment_detail"`
}
type UpdateWorkspaceAssignmentDetailRequest ¶ added in v0.133.0
type UpdateWorkspaceAssignmentDetailRequest struct {
// Required. ID of the principal in Databricks.
PrincipalId int64 `json:"-" url:"-"`
// Required. The list of fields to update.
UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"`
// Required. Workspace assignment detail to be updated in <Databricks>.
WorkspaceAssignmentDetail WorkspaceAssignmentDetail `json:"workspace_assignment_detail"`
// Required. The workspace ID for which the workspace assignment detail is
// being updated.
WorkspaceId int64 `json:"-" url:"-"`
}
type User ¶
type User struct {
// The accountId parent of the user in Databricks.
AccountId string `json:"account_id,omitempty"`
// The activity status of a user in a Databricks account.
AccountUserStatus State `json:"account_user_status,omitempty"`
// ExternalId of the user in the customer's IdP.
ExternalId string `json:"external_id,omitempty"`
// Internal userId of the user in Databricks.
InternalId int64 `json:"internal_id,omitempty"`
Name *UserName `json:"name,omitempty"`
// Username/email of the user.
Username string `json:"username,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The details of a User resource.
func (User) MarshalJSON ¶
func (*User) UnmarshalJSON ¶
type UserName ¶
type UserName struct {
FamilyName string `json:"family_name,omitempty"`
GivenName string `json:"given_name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (UserName) MarshalJSON ¶
func (*UserName) UnmarshalJSON ¶
type WorkspaceAccessDetail ¶
type WorkspaceAccessDetail struct {
AccessType WorkspaceAccessDetailAccessType `json:"access_type,omitempty"`
// The account ID parent of the workspace where the principal has access.
AccountId string `json:"account_id,omitempty"`
// The permissions granted to the principal in the workspace.
Permissions []WorkspacePermission `json:"permissions,omitempty"`
// The internal ID of the principal (user/sp/group) in Databricks.
PrincipalId int64 `json:"principal_id,omitempty"`
PrincipalType PrincipalType `json:"principal_type,omitempty"`
// The activity status of the principal in the workspace. Not applicable for
// groups at the moment.
Status State `json:"status,omitempty"`
// The workspace ID where the principal has access.
WorkspaceId int64 `json:"workspace_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The details of a principal's access to a workspace.
func (WorkspaceAccessDetail) MarshalJSON ¶
func (s WorkspaceAccessDetail) MarshalJSON() ([]byte, error)
func (*WorkspaceAccessDetail) UnmarshalJSON ¶
func (s *WorkspaceAccessDetail) UnmarshalJSON(b []byte) error
type WorkspaceAccessDetailAccessType ¶
type WorkspaceAccessDetailAccessType string
The type of access the principal has to the workspace.
const WorkspaceAccessDetailAccessTypeDirect WorkspaceAccessDetailAccessType = `DIRECT`
const WorkspaceAccessDetailAccessTypeIndirect WorkspaceAccessDetailAccessType = `INDIRECT`
func (*WorkspaceAccessDetailAccessType) Set ¶
func (f *WorkspaceAccessDetailAccessType) Set(v string) error
Set raw string value and validate it against allowed values
func (*WorkspaceAccessDetailAccessType) String ¶
func (f *WorkspaceAccessDetailAccessType) String() string
String representation for fmt.Print
func (*WorkspaceAccessDetailAccessType) Type ¶
func (f *WorkspaceAccessDetailAccessType) Type() string
Type always returns WorkspaceAccessDetailAccessType to satisfy [pflag.Value] interface
func (*WorkspaceAccessDetailAccessType) Values ¶
func (f *WorkspaceAccessDetailAccessType) Values() []WorkspaceAccessDetailAccessType
Values returns all possible values for WorkspaceAccessDetailAccessType.
There is no guarantee on the order of the values in the slice.
type WorkspaceAccessDetailView ¶
type WorkspaceAccessDetailView string
Controls what fields are returned in the GetWorkspaceAccessDetail response.
const WorkspaceAccessDetailViewBasic WorkspaceAccessDetailView = `BASIC`
const WorkspaceAccessDetailViewFull WorkspaceAccessDetailView = `FULL`
func (*WorkspaceAccessDetailView) Set ¶
func (f *WorkspaceAccessDetailView) Set(v string) error
Set raw string value and validate it against allowed values
func (*WorkspaceAccessDetailView) String ¶
func (f *WorkspaceAccessDetailView) String() string
String representation for fmt.Print
func (*WorkspaceAccessDetailView) Type ¶
func (f *WorkspaceAccessDetailView) Type() string
Type always returns WorkspaceAccessDetailView to satisfy [pflag.Value] interface
func (*WorkspaceAccessDetailView) Values ¶
func (f *WorkspaceAccessDetailView) Values() []WorkspaceAccessDetailView
Values returns all possible values for WorkspaceAccessDetailView.
There is no guarantee on the order of the values in the slice.
type WorkspaceAssignmentDetail ¶ added in v0.133.0
type WorkspaceAssignmentDetail struct {
// The account ID parent of the workspace where the principal is assigned
AccountId string `json:"account_id,omitempty"`
Entitlements []Entitlement `json:"entitlements,omitempty"`
// The internal ID of the principal (user/sp/group) in Databricks.
PrincipalId int64 `json:"principal_id"`
PrincipalType PrincipalType `json:"principal_type,omitempty"`
// The workspace ID where the principal is assigned
WorkspaceId int64 `json:"workspace_id,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
The details of a principal's assignment to a workspace.
func (WorkspaceAssignmentDetail) MarshalJSON ¶ added in v0.133.0
func (s WorkspaceAssignmentDetail) MarshalJSON() ([]byte, error)
func (*WorkspaceAssignmentDetail) UnmarshalJSON ¶ added in v0.133.0
func (s *WorkspaceAssignmentDetail) UnmarshalJSON(b []byte) error
type WorkspaceIamV2API ¶
type WorkspaceIamV2API struct {
// contains filtered or unexported fields
}
These APIs are used to manage identities and the workspace access of these identities in <Databricks>.
func NewWorkspaceIamV2 ¶
func NewWorkspaceIamV2(client *client.DatabricksClient) *WorkspaceIamV2API
func (*WorkspaceIamV2API) CreateWorkspaceAssignmentDetailProxy ¶ added in v0.133.0
func (a *WorkspaceIamV2API) CreateWorkspaceAssignmentDetailProxy(ctx context.Context, request CreateWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
func (*WorkspaceIamV2API) DeleteWorkspaceAssignmentDetailProxy ¶ added in v0.133.0
func (a *WorkspaceIamV2API) DeleteWorkspaceAssignmentDetailProxy(ctx context.Context, request DeleteWorkspaceAssignmentDetailProxyRequest) error
func (*WorkspaceIamV2API) GetWorkspaceAccessDetailLocal ¶
func (a *WorkspaceIamV2API) GetWorkspaceAccessDetailLocal(ctx context.Context, request GetWorkspaceAccessDetailLocalRequest) (*WorkspaceAccessDetail, error)
func (*WorkspaceIamV2API) GetWorkspaceAssignmentDetailProxy ¶ added in v0.133.0
func (a *WorkspaceIamV2API) GetWorkspaceAssignmentDetailProxy(ctx context.Context, request GetWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
func (*WorkspaceIamV2API) ListWorkspaceAssignmentDetailsProxy ¶ added in v0.133.0
func (a *WorkspaceIamV2API) ListWorkspaceAssignmentDetailsProxy(ctx context.Context, request ListWorkspaceAssignmentDetailsProxyRequest) (*ListWorkspaceAssignmentDetailsResponse, error)
func (*WorkspaceIamV2API) ResolveGroupProxy ¶
func (a *WorkspaceIamV2API) ResolveGroupProxy(ctx context.Context, request ResolveGroupProxyRequest) (*ResolveGroupResponse, error)
func (*WorkspaceIamV2API) ResolveServicePrincipalProxy ¶
func (a *WorkspaceIamV2API) ResolveServicePrincipalProxy(ctx context.Context, request ResolveServicePrincipalProxyRequest) (*ResolveServicePrincipalResponse, error)
func (*WorkspaceIamV2API) ResolveUserProxy ¶
func (a *WorkspaceIamV2API) ResolveUserProxy(ctx context.Context, request ResolveUserProxyRequest) (*ResolveUserResponse, error)
func (*WorkspaceIamV2API) UpdateWorkspaceAssignmentDetailProxy ¶ added in v0.133.0
func (a *WorkspaceIamV2API) UpdateWorkspaceAssignmentDetailProxy(ctx context.Context, request UpdateWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
type WorkspaceIamV2Interface ¶
type WorkspaceIamV2Interface interface {
// Creates a workspace assignment detail for a principal (workspace-level
// proxy). Entitlement grants are applied individually and non-atomically — if
// a failure occurs partway through, the principal will be assigned to the
// workspace but with only a subset of the requested entitlements. Use
// GetWorkspaceAssignmentDetail to confirm which entitlements were successfully
// granted.
CreateWorkspaceAssignmentDetailProxy(ctx context.Context, request CreateWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
// Deletes a workspace assignment detail for a principal (workspace-level
// proxy), revoking all associated entitlements. Entitlement revocations are
// applied individually and non-atomically — if a failure occurs partway
// through, the principal remains assigned with a subset of its original
// entitlements, and the operation is safe to retry.
DeleteWorkspaceAssignmentDetailProxy(ctx context.Context, request DeleteWorkspaceAssignmentDetailProxyRequest) error
// Returns the access details for a principal in the current workspace. Allows
// for checking access details for any provisioned principal (user, service
// principal, or group) in the current workspace. * Provisioned principal here
// refers to one that has been synced into Databricks from the customer's IdP or
// added explicitly to Databricks via SCIM/UI. Allows for passing in a "view"
// parameter to control what fields are returned (BASIC by default or FULL).
GetWorkspaceAccessDetailLocal(ctx context.Context, request GetWorkspaceAccessDetailLocalRequest) (*WorkspaceAccessDetail, error)
// Returns the assignment details for a principal in a workspace
// (workspace-level proxy).
GetWorkspaceAssignmentDetailProxy(ctx context.Context, request GetWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
// Lists workspace assignment details for a workspace (workspace-level proxy).
ListWorkspaceAssignmentDetailsProxy(ctx context.Context, request ListWorkspaceAssignmentDetailsProxyRequest) (*ListWorkspaceAssignmentDetailsResponse, error)
// Resolves a group with the given external ID from the customer's IdP. If the
// group does not exist, it will be created in the account. If the customer is
// not onboarded onto Automatic Identity Management (AIM), this will return an
// error.
ResolveGroupProxy(ctx context.Context, request ResolveGroupProxyRequest) (*ResolveGroupResponse, error)
// Resolves an SP with the given external ID from the customer's IdP. If the SP
// does not exist, it will be created. If the customer is not onboarded onto
// Automatic Identity Management (AIM), this will return an error.
ResolveServicePrincipalProxy(ctx context.Context, request ResolveServicePrincipalProxyRequest) (*ResolveServicePrincipalResponse, error)
// Resolves a user with the given external ID from the customer's IdP. If the
// user does not exist, it will be created. If the customer is not onboarded
// onto Automatic Identity Management (AIM), this will return an error.
ResolveUserProxy(ctx context.Context, request ResolveUserProxyRequest) (*ResolveUserResponse, error)
// Updates the entitlements of a directly assigned principal in a workspace
// (workspace-level proxy). Entitlement changes are applied individually and
// non-atomically — if a failure occurs partway through, only a subset of the
// requested changes may have been applied. Use GetWorkspaceAssignmentDetail to
// confirm the final state.
UpdateWorkspaceAssignmentDetailProxy(ctx context.Context, request UpdateWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
}
type WorkspaceIamV2Service
deprecated
type WorkspaceIamV2Service interface {
// Creates a workspace assignment detail for a principal (workspace-level
// proxy). Entitlement grants are applied individually and non-atomically
// — if a failure occurs partway through, the principal will be assigned
// to the workspace but with only a subset of the requested entitlements.
// Use GetWorkspaceAssignmentDetail to confirm which entitlements were
// successfully granted.
CreateWorkspaceAssignmentDetailProxy(ctx context.Context, request CreateWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
// Deletes a workspace assignment detail for a principal (workspace-level
// proxy), revoking all associated entitlements. Entitlement revocations are
// applied individually and non-atomically — if a failure occurs partway
// through, the principal remains assigned with a subset of its original
// entitlements, and the operation is safe to retry.
DeleteWorkspaceAssignmentDetailProxy(ctx context.Context, request DeleteWorkspaceAssignmentDetailProxyRequest) error
// Returns the access details for a principal in the current workspace.
// Allows for checking access details for any provisioned principal (user,
// service principal, or group) in the current workspace. * Provisioned
// principal here refers to one that has been synced into Databricks from
// the customer's IdP or added explicitly to Databricks via SCIM/UI. Allows
// for passing in a "view" parameter to control what fields are returned
// (BASIC by default or FULL).
GetWorkspaceAccessDetailLocal(ctx context.Context, request GetWorkspaceAccessDetailLocalRequest) (*WorkspaceAccessDetail, error)
// Returns the assignment details for a principal in a workspace
// (workspace-level proxy).
GetWorkspaceAssignmentDetailProxy(ctx context.Context, request GetWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
// Lists workspace assignment details for a workspace (workspace-level
// proxy).
ListWorkspaceAssignmentDetailsProxy(ctx context.Context, request ListWorkspaceAssignmentDetailsProxyRequest) (*ListWorkspaceAssignmentDetailsResponse, error)
// Resolves a group with the given external ID from the customer's IdP. If
// the group does not exist, it will be created in the account. If the
// customer is not onboarded onto Automatic Identity Management (AIM), this
// will return an error.
ResolveGroupProxy(ctx context.Context, request ResolveGroupProxyRequest) (*ResolveGroupResponse, error)
// Resolves an SP with the given external ID from the customer's IdP. If the
// SP does not exist, it will be created. If the customer is not onboarded
// onto Automatic Identity Management (AIM), this will return an error.
ResolveServicePrincipalProxy(ctx context.Context, request ResolveServicePrincipalProxyRequest) (*ResolveServicePrincipalResponse, error)
// Resolves a user with the given external ID from the customer's IdP. If
// the user does not exist, it will be created. If the customer is not
// onboarded onto Automatic Identity Management (AIM), this will return an
// error.
ResolveUserProxy(ctx context.Context, request ResolveUserProxyRequest) (*ResolveUserResponse, error)
// Updates the entitlements of a directly assigned principal in a workspace
// (workspace-level proxy). Entitlement changes are applied individually and
// non-atomically — if a failure occurs partway through, only a subset of
// the requested changes may have been applied. Use
// GetWorkspaceAssignmentDetail to confirm the final state.
UpdateWorkspaceAssignmentDetailProxy(ctx context.Context, request UpdateWorkspaceAssignmentDetailProxyRequest) (*WorkspaceAssignmentDetail, error)
}
These APIs are used to manage identities and the workspace access of these identities in <Databricks>.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type WorkspacePermission ¶
type WorkspacePermission string
The type of permission a principal has to a workspace (admin/user).
const WorkspacePermissionAdminPermission WorkspacePermission = `ADMIN_PERMISSION`
const WorkspacePermissionUserPermission WorkspacePermission = `USER_PERMISSION`
func (*WorkspacePermission) Set ¶
func (f *WorkspacePermission) Set(v string) error
Set raw string value and validate it against allowed values
func (*WorkspacePermission) String ¶
func (f *WorkspacePermission) String() string
String representation for fmt.Print
func (*WorkspacePermission) Type ¶
func (f *WorkspacePermission) Type() string
Type always returns WorkspacePermission to satisfy [pflag.Value] interface
func (*WorkspacePermission) Values ¶
func (f *WorkspacePermission) Values() []WorkspacePermission
Values returns all possible values for WorkspacePermission.
There is no guarantee on the order of the values in the slice.