iamv2

package
v0.83.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

These APIs allow you to manage Account Iam V2, Workspace Iam V2, etc.

Index

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) GetWorkspaceAccessDetail

func (a *AccountIamV2API) GetWorkspaceAccessDetail(ctx context.Context, request GetWorkspaceAccessDetailRequest) (*WorkspaceAccessDetail, 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)

type AccountIamV2Interface

type AccountIamV2Interface interface {

	// 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)

	// 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)
}

type AccountIamV2Service deprecated

type AccountIamV2Service interface {

	// 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)

	// 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)
}

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 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 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 (s Group) MarshalJSON() ([]byte, error)

func (*Group) UnmarshalJSON

func (s *Group) 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`

func (*State) Set

func (f *State) Set(v string) error

Set raw string value and validate it against allowed values

func (*State) String

func (f *State) String() string

String representation for fmt.Print

func (*State) Type

func (f *State) Type() string

Type always returns State to satisfy [pflag.Value] interface

func (*State) Values

func (f *State) Values() []State

Values returns all possible values for State.

There is no guarantee on the order of the values in the slice.

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"`

	ForceSendFields []string `json:"-" url:"-"`
}

The details of a User resource.

func (User) MarshalJSON

func (s User) MarshalJSON() ([]byte, error)

func (*User) UnmarshalJSON

func (s *User) UnmarshalJSON(b []byte) error

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 (s UserName) MarshalJSON() ([]byte, error)

func (*UserName) UnmarshalJSON

func (s *UserName) UnmarshalJSON(b []byte) error

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

Set raw string value and validate it against allowed values

func (*WorkspaceAccessDetailAccessType) String

String representation for fmt.Print

func (*WorkspaceAccessDetailAccessType) Type

Type always returns WorkspaceAccessDetailAccessType to satisfy [pflag.Value] interface

func (*WorkspaceAccessDetailAccessType) Values

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

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

Type always returns WorkspaceAccessDetailView to satisfy [pflag.Value] interface

func (*WorkspaceAccessDetailView) Values

Values returns all possible values for WorkspaceAccessDetailView.

There is no guarantee on the order of the values in the slice.

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) GetWorkspaceAccessDetailLocal

func (a *WorkspaceIamV2API) GetWorkspaceAccessDetailLocal(ctx context.Context, request GetWorkspaceAccessDetailLocalRequest) (*WorkspaceAccessDetail, 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)

type WorkspaceIamV2Interface

type WorkspaceIamV2Interface interface {

	// 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)

	// 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)
}

type WorkspaceIamV2Service deprecated

type WorkspaceIamV2Service interface {

	// 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)

	// 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)
}

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

Values returns all possible values for WorkspacePermission.

There is no guarantee on the order of the values in the slice.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL