oauth2

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Overview

These APIs allow you to manage Custom App Integration, O Auth Published Apps, Published App Integration, Service Principal Secrets, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateCustomAppIntegration

type CreateCustomAppIntegration struct {
	// indicates if an oauth client-secret should be generated
	Confidential bool `json:"confidential,omitempty"`
	// name of the custom oauth app
	Name string `json:"name"`
	// List of oauth redirect urls
	RedirectUrls []string `json:"redirect_urls"`
	// OAuth scopes granted to the application. Supported scopes: all-apis, sql,
	// offline_access, openid, profile, email.
	Scopes []string `json:"scopes,omitempty"`
	// Token access policy
	TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`

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

func (CreateCustomAppIntegration) MarshalJSON added in v0.23.0

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

func (*CreateCustomAppIntegration) UnmarshalJSON added in v0.23.0

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

type CreateCustomAppIntegrationOutput

type CreateCustomAppIntegrationOutput struct {
	// oauth client-id generated by the Databricks
	ClientId string `json:"client_id,omitempty"`
	// oauth client-secret generated by the Databricks if this is a confidential
	// oauth app client-secret will be generated.
	ClientSecret string `json:"client_secret,omitempty"`
	// unique integration id for the custom oauth app
	IntegrationId string `json:"integration_id,omitempty"`

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

func (CreateCustomAppIntegrationOutput) MarshalJSON added in v0.23.0

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

func (*CreateCustomAppIntegrationOutput) UnmarshalJSON added in v0.23.0

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

type CreatePublishedAppIntegration

type CreatePublishedAppIntegration struct {
	// app_id of the oauth published app integration. For example power-bi,
	// tableau-deskop
	AppId string `json:"app_id,omitempty"`
	// Token access policy
	TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`

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

func (CreatePublishedAppIntegration) MarshalJSON added in v0.23.0

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

func (*CreatePublishedAppIntegration) UnmarshalJSON added in v0.23.0

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

type CreatePublishedAppIntegrationOutput

type CreatePublishedAppIntegrationOutput struct {
	// unique integration id for the published oauth app
	IntegrationId string `json:"integration_id,omitempty"`

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

func (CreatePublishedAppIntegrationOutput) MarshalJSON added in v0.23.0

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

func (*CreatePublishedAppIntegrationOutput) UnmarshalJSON added in v0.23.0

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

type CreateServicePrincipalSecretRequest added in v0.9.0

type CreateServicePrincipalSecretRequest struct {
	// The service principal ID.
	ServicePrincipalId int64 `json:"-" url:"-"`
}

Create service principal secret

type CreateServicePrincipalSecretResponse added in v0.9.0

type CreateServicePrincipalSecretResponse struct {
	// UTC time when the secret was created
	CreateTime string `json:"create_time,omitempty"`
	// ID of the secret
	Id string `json:"id,omitempty"`
	// Secret Value
	Secret string `json:"secret,omitempty"`
	// Secret Hash
	SecretHash string `json:"secret_hash,omitempty"`
	// Status of the secret
	Status string `json:"status,omitempty"`
	// UTC time when the secret was updated
	UpdateTime string `json:"update_time,omitempty"`

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

func (CreateServicePrincipalSecretResponse) MarshalJSON added in v0.23.0

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

func (*CreateServicePrincipalSecretResponse) UnmarshalJSON added in v0.23.0

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

type CustomAppIntegrationAPI

type CustomAppIntegrationAPI struct {
	// contains filtered or unexported fields
}

These APIs enable administrators to manage custom oauth app integrations, which is required for adding/using Custom OAuth App Integration like Tableau Cloud for Databricks in AWS cloud.

func NewCustomAppIntegration

func NewCustomAppIntegration(client *client.DatabricksClient) *CustomAppIntegrationAPI

func (*CustomAppIntegrationAPI) Create

Create Custom OAuth App Integration.

Create Custom OAuth App Integration.

You can retrieve the custom oauth app integration via :method:CustomAppIntegration/get.

func (*CustomAppIntegrationAPI) Delete

Delete Custom OAuth App Integration.

Delete an existing Custom OAuth App Integration. You can retrieve the custom oauth app integration via :method:CustomAppIntegration/get.

func (*CustomAppIntegrationAPI) DeleteByIntegrationId

func (a *CustomAppIntegrationAPI) DeleteByIntegrationId(ctx context.Context, integrationId string) error

Delete Custom OAuth App Integration.

Delete an existing Custom OAuth App Integration. You can retrieve the custom oauth app integration via :method:CustomAppIntegration/get.

func (*CustomAppIntegrationAPI) Get

Get OAuth Custom App Integration.

Gets the Custom OAuth App Integration for the given integration id.

func (*CustomAppIntegrationAPI) GetByIntegrationId

func (a *CustomAppIntegrationAPI) GetByIntegrationId(ctx context.Context, integrationId string) (*GetCustomAppIntegrationOutput, error)

Get OAuth Custom App Integration.

Gets the Custom OAuth App Integration for the given integration id.

func (*CustomAppIntegrationAPI) Impl

Impl returns low-level CustomAppIntegration API implementation Deprecated: use MockCustomAppIntegrationInterface instead.

func (*CustomAppIntegrationAPI) List added in v0.24.0

Get custom oauth app integrations.

Get the list of custom oauth app integrations for the specified Databricks account

This method is generated by Databricks SDK Code Generator.

func (*CustomAppIntegrationAPI) ListAll added in v0.7.0

Get custom oauth app integrations.

Get the list of custom oauth app integrations for the specified Databricks account

This method is generated by Databricks SDK Code Generator.

func (*CustomAppIntegrationAPI) Update

Updates Custom OAuth App Integration.

Updates an existing custom OAuth App Integration. You can retrieve the custom oauth app integration via :method:CustomAppIntegration/get.

func (*CustomAppIntegrationAPI) WithImpl

WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks. Deprecated: use MockCustomAppIntegrationInterface instead.

type CustomAppIntegrationInterface added in v0.29.0

type CustomAppIntegrationInterface interface {
	// WithImpl could be used to override low-level API implementations for unit
	// testing purposes with [github.com/golang/mock] or other mocking frameworks.
	// Deprecated: use MockCustomAppIntegrationInterface instead.
	WithImpl(impl CustomAppIntegrationService) CustomAppIntegrationInterface

	// Impl returns low-level CustomAppIntegration API implementation
	// Deprecated: use MockCustomAppIntegrationInterface instead.
	Impl() CustomAppIntegrationService

	// Create Custom OAuth App Integration.
	//
	// Create Custom OAuth App Integration.
	//
	// You can retrieve the custom oauth app integration via
	// :method:CustomAppIntegration/get.
	Create(ctx context.Context, request CreateCustomAppIntegration) (*CreateCustomAppIntegrationOutput, error)

	// Delete Custom OAuth App Integration.
	//
	// Delete an existing Custom OAuth App Integration. You can retrieve the custom
	// oauth app integration via :method:CustomAppIntegration/get.
	Delete(ctx context.Context, request DeleteCustomAppIntegrationRequest) error

	// Delete Custom OAuth App Integration.
	//
	// Delete an existing Custom OAuth App Integration. You can retrieve the custom
	// oauth app integration via :method:CustomAppIntegration/get.
	DeleteByIntegrationId(ctx context.Context, integrationId string) error

	// Get OAuth Custom App Integration.
	//
	// Gets the Custom OAuth App Integration for the given integration id.
	Get(ctx context.Context, request GetCustomAppIntegrationRequest) (*GetCustomAppIntegrationOutput, error)

	// Get OAuth Custom App Integration.
	//
	// Gets the Custom OAuth App Integration for the given integration id.
	GetByIntegrationId(ctx context.Context, integrationId string) (*GetCustomAppIntegrationOutput, error)

	// Get custom oauth app integrations.
	//
	// Get the list of custom oauth app integrations for the specified Databricks
	// account
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context) listing.Iterator[GetCustomAppIntegrationOutput]

	// Get custom oauth app integrations.
	//
	// Get the list of custom oauth app integrations for the specified Databricks
	// account
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context) ([]GetCustomAppIntegrationOutput, error)

	// Updates Custom OAuth App Integration.
	//
	// Updates an existing custom OAuth App Integration. You can retrieve the custom
	// oauth app integration via :method:CustomAppIntegration/get.
	Update(ctx context.Context, request UpdateCustomAppIntegration) error
}

type CustomAppIntegrationService

type CustomAppIntegrationService interface {

	// Create Custom OAuth App Integration.
	//
	// Create Custom OAuth App Integration.
	//
	// You can retrieve the custom oauth app integration via
	// :method:CustomAppIntegration/get.
	Create(ctx context.Context, request CreateCustomAppIntegration) (*CreateCustomAppIntegrationOutput, error)

	// Delete Custom OAuth App Integration.
	//
	// Delete an existing Custom OAuth App Integration. You can retrieve the
	// custom oauth app integration via :method:CustomAppIntegration/get.
	Delete(ctx context.Context, request DeleteCustomAppIntegrationRequest) error

	// Get OAuth Custom App Integration.
	//
	// Gets the Custom OAuth App Integration for the given integration id.
	Get(ctx context.Context, request GetCustomAppIntegrationRequest) (*GetCustomAppIntegrationOutput, error)

	// Get custom oauth app integrations.
	//
	// Get the list of custom oauth app integrations for the specified
	// Databricks account
	//
	// Use ListAll() to get all GetCustomAppIntegrationOutput instances
	List(ctx context.Context) (*GetCustomAppIntegrationsOutput, error)

	// Updates Custom OAuth App Integration.
	//
	// Updates an existing custom OAuth App Integration. You can retrieve the
	// custom oauth app integration via :method:CustomAppIntegration/get.
	Update(ctx context.Context, request UpdateCustomAppIntegration) error
}

These APIs enable administrators to manage custom oauth app integrations, which is required for adding/using Custom OAuth App Integration like Tableau Cloud for Databricks in AWS cloud.

type DeleteCustomAppIntegrationOutput added in v0.34.0

type DeleteCustomAppIntegrationOutput struct {
}

type DeleteCustomAppIntegrationRequest

type DeleteCustomAppIntegrationRequest struct {
	// The oauth app integration ID.
	IntegrationId string `json:"-" url:"-"`
}

Delete Custom OAuth App Integration

type DeletePublishedAppIntegrationOutput added in v0.34.0

type DeletePublishedAppIntegrationOutput struct {
}

type DeletePublishedAppIntegrationRequest

type DeletePublishedAppIntegrationRequest struct {
	// The oauth app integration ID.
	IntegrationId string `json:"-" url:"-"`
}

Delete Published OAuth App Integration

type DeleteResponse added in v0.34.0

type DeleteResponse struct {
}

type DeleteServicePrincipalSecretRequest added in v0.9.0

type DeleteServicePrincipalSecretRequest struct {
	// The secret ID.
	SecretId string `json:"-" url:"-"`
	// The service principal ID.
	ServicePrincipalId int64 `json:"-" url:"-"`
}

Delete service principal secret

type GetCustomAppIntegrationOutput

type GetCustomAppIntegrationOutput struct {
	// oauth client id of the custom oauth app
	ClientId string `json:"client_id,omitempty"`
	// indicates if an oauth client-secret should be generated
	Confidential bool `json:"confidential,omitempty"`
	// ID of this custom app
	IntegrationId string `json:"integration_id,omitempty"`
	// name of the custom oauth app
	Name string `json:"name,omitempty"`
	// List of oauth redirect urls
	RedirectUrls []string `json:"redirect_urls,omitempty"`
	// Token access policy
	TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`

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

func (GetCustomAppIntegrationOutput) MarshalJSON added in v0.23.0

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

func (*GetCustomAppIntegrationOutput) UnmarshalJSON added in v0.23.0

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

type GetCustomAppIntegrationRequest

type GetCustomAppIntegrationRequest struct {
	// The oauth app integration ID.
	IntegrationId string `json:"-" url:"-"`
}

Get OAuth Custom App Integration

type GetCustomAppIntegrationsOutput added in v0.7.0

type GetCustomAppIntegrationsOutput struct {
	// Array of Custom OAuth App Integrations defined for the account.
	Apps []GetCustomAppIntegrationOutput `json:"apps,omitempty"`
}

type GetPublishedAppIntegrationOutput

type GetPublishedAppIntegrationOutput struct {
	// app-id of the published app integration
	AppId string `json:"app_id,omitempty"`
	// unique integration id for the published oauth app
	IntegrationId string `json:"integration_id,omitempty"`
	// name of the published oauth app
	Name string `json:"name,omitempty"`
	// Token access policy
	TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`

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

func (GetPublishedAppIntegrationOutput) MarshalJSON added in v0.23.0

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

func (*GetPublishedAppIntegrationOutput) UnmarshalJSON added in v0.23.0

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

type GetPublishedAppIntegrationRequest

type GetPublishedAppIntegrationRequest struct {
	// The oauth app integration ID.
	IntegrationId string `json:"-" url:"-"`
}

Get OAuth Published App Integration

type GetPublishedAppIntegrationsOutput added in v0.7.0

type GetPublishedAppIntegrationsOutput struct {
	// Array of Published OAuth App Integrations defined for the account.
	Apps []GetPublishedAppIntegrationOutput `json:"apps,omitempty"`
}

type GetPublishedAppsOutput added in v0.20.0

type GetPublishedAppsOutput struct {
	// Array of Published OAuth Apps.
	Apps []PublishedAppOutput `json:"apps,omitempty"`
	// A token that can be used to get the next page of results. If not present,
	// there are no more results to show.
	NextPageToken string `json:"next_page_token,omitempty"`

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

func (GetPublishedAppsOutput) MarshalJSON added in v0.23.0

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

func (*GetPublishedAppsOutput) UnmarshalJSON added in v0.23.0

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

type ListOAuthPublishedAppsRequest added in v0.20.0

type ListOAuthPublishedAppsRequest struct {
	// The max number of OAuth published apps to return.
	PageSize int64 `json:"-" url:"page_size,omitempty"`
	// A token that can be used to get the next page of results.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

Get all the published OAuth apps

func (ListOAuthPublishedAppsRequest) MarshalJSON added in v0.23.0

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

func (*ListOAuthPublishedAppsRequest) UnmarshalJSON added in v0.23.0

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

type ListServicePrincipalSecretsRequest added in v0.9.0

type ListServicePrincipalSecretsRequest struct {
	// The service principal ID.
	ServicePrincipalId int64 `json:"-" url:"-"`
}

List service principal secrets

type ListServicePrincipalSecretsResponse added in v0.9.0

type ListServicePrincipalSecretsResponse struct {
	// List of the secrets
	Secrets []SecretInfo `json:"secrets,omitempty"`
}

type OAuthPublishedAppsAPI added in v0.20.0

type OAuthPublishedAppsAPI struct {
	// contains filtered or unexported fields
}

These APIs enable administrators to view all the available published OAuth applications in Databricks. Administrators can add the published OAuth applications to their account through the OAuth Published App Integration APIs.

func NewOAuthPublishedApps added in v0.20.0

func NewOAuthPublishedApps(client *client.DatabricksClient) *OAuthPublishedAppsAPI

func (*OAuthPublishedAppsAPI) Impl added in v0.20.0

Impl returns low-level OAuthPublishedApps API implementation Deprecated: use MockOAuthPublishedAppsInterface instead.

func (*OAuthPublishedAppsAPI) List added in v0.24.0

Get all the published OAuth apps.

Get all the available published OAuth apps in Databricks.

This method is generated by Databricks SDK Code Generator.

func (*OAuthPublishedAppsAPI) ListAll added in v0.20.0

Get all the published OAuth apps.

Get all the available published OAuth apps in Databricks.

This method is generated by Databricks SDK Code Generator.

func (*OAuthPublishedAppsAPI) WithImpl added in v0.20.0

WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks. Deprecated: use MockOAuthPublishedAppsInterface instead.

type OAuthPublishedAppsInterface added in v0.29.0

type OAuthPublishedAppsInterface interface {
	// WithImpl could be used to override low-level API implementations for unit
	// testing purposes with [github.com/golang/mock] or other mocking frameworks.
	// Deprecated: use MockOAuthPublishedAppsInterface instead.
	WithImpl(impl OAuthPublishedAppsService) OAuthPublishedAppsInterface

	// Impl returns low-level OAuthPublishedApps API implementation
	// Deprecated: use MockOAuthPublishedAppsInterface instead.
	Impl() OAuthPublishedAppsService

	// Get all the published OAuth apps.
	//
	// Get all the available published OAuth apps in Databricks.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListOAuthPublishedAppsRequest) listing.Iterator[PublishedAppOutput]

	// Get all the published OAuth apps.
	//
	// Get all the available published OAuth apps in Databricks.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListOAuthPublishedAppsRequest) ([]PublishedAppOutput, error)
}

type OAuthPublishedAppsService added in v0.20.0

type OAuthPublishedAppsService interface {

	// Get all the published OAuth apps.
	//
	// Get all the available published OAuth apps in Databricks.
	//
	// Use ListAll() to get all PublishedAppOutput instances, which will iterate over every result page.
	List(ctx context.Context, request ListOAuthPublishedAppsRequest) (*GetPublishedAppsOutput, error)
}

These APIs enable administrators to view all the available published OAuth applications in Databricks. Administrators can add the published OAuth applications to their account through the OAuth Published App Integration APIs.

type PublishedAppIntegrationAPI

type PublishedAppIntegrationAPI struct {
	// contains filtered or unexported fields
}

These APIs enable administrators to manage published oauth app integrations, which is required for adding/using Published OAuth App Integration like Tableau Desktop for Databricks in AWS cloud.

func NewPublishedAppIntegration

func NewPublishedAppIntegration(client *client.DatabricksClient) *PublishedAppIntegrationAPI

func (*PublishedAppIntegrationAPI) Create

Create Published OAuth App Integration.

Create Published OAuth App Integration.

You can retrieve the published oauth app integration via :method:PublishedAppIntegration/get.

func (*PublishedAppIntegrationAPI) Delete

Delete Published OAuth App Integration.

Delete an existing Published OAuth App Integration. You can retrieve the published oauth app integration via :method:PublishedAppIntegration/get.

func (*PublishedAppIntegrationAPI) DeleteByIntegrationId

func (a *PublishedAppIntegrationAPI) DeleteByIntegrationId(ctx context.Context, integrationId string) error

Delete Published OAuth App Integration.

Delete an existing Published OAuth App Integration. You can retrieve the published oauth app integration via :method:PublishedAppIntegration/get.

func (*PublishedAppIntegrationAPI) Get

Get OAuth Published App Integration.

Gets the Published OAuth App Integration for the given integration id.

func (*PublishedAppIntegrationAPI) GetByIntegrationId

func (a *PublishedAppIntegrationAPI) GetByIntegrationId(ctx context.Context, integrationId string) (*GetPublishedAppIntegrationOutput, error)

Get OAuth Published App Integration.

Gets the Published OAuth App Integration for the given integration id.

func (*PublishedAppIntegrationAPI) Impl

Impl returns low-level PublishedAppIntegration API implementation Deprecated: use MockPublishedAppIntegrationInterface instead.

func (*PublishedAppIntegrationAPI) List added in v0.24.0

Get published oauth app integrations.

Get the list of published oauth app integrations for the specified Databricks account

This method is generated by Databricks SDK Code Generator.

func (*PublishedAppIntegrationAPI) ListAll added in v0.7.0

Get published oauth app integrations.

Get the list of published oauth app integrations for the specified Databricks account

This method is generated by Databricks SDK Code Generator.

func (*PublishedAppIntegrationAPI) Update

Updates Published OAuth App Integration.

Updates an existing published OAuth App Integration. You can retrieve the published oauth app integration via :method:PublishedAppIntegration/get.

func (*PublishedAppIntegrationAPI) WithImpl

WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks. Deprecated: use MockPublishedAppIntegrationInterface instead.

type PublishedAppIntegrationInterface added in v0.29.0

type PublishedAppIntegrationInterface interface {
	// WithImpl could be used to override low-level API implementations for unit
	// testing purposes with [github.com/golang/mock] or other mocking frameworks.
	// Deprecated: use MockPublishedAppIntegrationInterface instead.
	WithImpl(impl PublishedAppIntegrationService) PublishedAppIntegrationInterface

	// Impl returns low-level PublishedAppIntegration API implementation
	// Deprecated: use MockPublishedAppIntegrationInterface instead.
	Impl() PublishedAppIntegrationService

	// Create Published OAuth App Integration.
	//
	// Create Published OAuth App Integration.
	//
	// You can retrieve the published oauth app integration via
	// :method:PublishedAppIntegration/get.
	Create(ctx context.Context, request CreatePublishedAppIntegration) (*CreatePublishedAppIntegrationOutput, error)

	// Delete Published OAuth App Integration.
	//
	// Delete an existing Published OAuth App Integration. You can retrieve the
	// published oauth app integration via :method:PublishedAppIntegration/get.
	Delete(ctx context.Context, request DeletePublishedAppIntegrationRequest) error

	// Delete Published OAuth App Integration.
	//
	// Delete an existing Published OAuth App Integration. You can retrieve the
	// published oauth app integration via :method:PublishedAppIntegration/get.
	DeleteByIntegrationId(ctx context.Context, integrationId string) error

	// Get OAuth Published App Integration.
	//
	// Gets the Published OAuth App Integration for the given integration id.
	Get(ctx context.Context, request GetPublishedAppIntegrationRequest) (*GetPublishedAppIntegrationOutput, error)

	// Get OAuth Published App Integration.
	//
	// Gets the Published OAuth App Integration for the given integration id.
	GetByIntegrationId(ctx context.Context, integrationId string) (*GetPublishedAppIntegrationOutput, error)

	// Get published oauth app integrations.
	//
	// Get the list of published oauth app integrations for the specified Databricks
	// account
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context) listing.Iterator[GetPublishedAppIntegrationOutput]

	// Get published oauth app integrations.
	//
	// Get the list of published oauth app integrations for the specified Databricks
	// account
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context) ([]GetPublishedAppIntegrationOutput, error)

	// Updates Published OAuth App Integration.
	//
	// Updates an existing published OAuth App Integration. You can retrieve the
	// published oauth app integration via :method:PublishedAppIntegration/get.
	Update(ctx context.Context, request UpdatePublishedAppIntegration) error
}

type PublishedAppIntegrationService

type PublishedAppIntegrationService interface {

	// Create Published OAuth App Integration.
	//
	// Create Published OAuth App Integration.
	//
	// You can retrieve the published oauth app integration via
	// :method:PublishedAppIntegration/get.
	Create(ctx context.Context, request CreatePublishedAppIntegration) (*CreatePublishedAppIntegrationOutput, error)

	// Delete Published OAuth App Integration.
	//
	// Delete an existing Published OAuth App Integration. You can retrieve the
	// published oauth app integration via :method:PublishedAppIntegration/get.
	Delete(ctx context.Context, request DeletePublishedAppIntegrationRequest) error

	// Get OAuth Published App Integration.
	//
	// Gets the Published OAuth App Integration for the given integration id.
	Get(ctx context.Context, request GetPublishedAppIntegrationRequest) (*GetPublishedAppIntegrationOutput, error)

	// Get published oauth app integrations.
	//
	// Get the list of published oauth app integrations for the specified
	// Databricks account
	//
	// Use ListAll() to get all GetPublishedAppIntegrationOutput instances
	List(ctx context.Context) (*GetPublishedAppIntegrationsOutput, error)

	// Updates Published OAuth App Integration.
	//
	// Updates an existing published OAuth App Integration. You can retrieve the
	// published oauth app integration via :method:PublishedAppIntegration/get.
	Update(ctx context.Context, request UpdatePublishedAppIntegration) error
}

These APIs enable administrators to manage published oauth app integrations, which is required for adding/using Published OAuth App Integration like Tableau Desktop for Databricks in AWS cloud.

type PublishedAppOutput added in v0.20.0

type PublishedAppOutput struct {
	// Unique ID of the published OAuth app.
	AppId string `json:"app_id,omitempty"`
	// Client ID of the published OAuth app. It is the client_id in the OAuth
	// flow
	ClientId string `json:"client_id,omitempty"`
	// Description of the published OAuth app.
	Description string `json:"description,omitempty"`
	// Whether the published OAuth app is a confidential client. It is always
	// false for published OAuth apps.
	IsConfidentialClient bool `json:"is_confidential_client,omitempty"`
	// Name of the published OAuth app.
	Name string `json:"name,omitempty"`
	// Redirect URLs of the published OAuth app.
	RedirectUrls []string `json:"redirect_urls,omitempty"`
	// Required scopes for the published OAuth app.
	Scopes []string `json:"scopes,omitempty"`

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

func (PublishedAppOutput) MarshalJSON added in v0.23.0

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

func (*PublishedAppOutput) UnmarshalJSON added in v0.23.0

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

type SecretInfo added in v0.9.0

type SecretInfo struct {
	// UTC time when the secret was created
	CreateTime string `json:"create_time,omitempty"`
	// ID of the secret
	Id string `json:"id,omitempty"`
	// Secret Hash
	SecretHash string `json:"secret_hash,omitempty"`
	// Status of the secret
	Status string `json:"status,omitempty"`
	// UTC time when the secret was updated
	UpdateTime string `json:"update_time,omitempty"`

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

func (SecretInfo) MarshalJSON added in v0.23.0

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

func (*SecretInfo) UnmarshalJSON added in v0.23.0

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

type ServicePrincipalSecretsAPI added in v0.9.0

type ServicePrincipalSecretsAPI struct {
	// contains filtered or unexported fields
}

These APIs enable administrators to manage service principal secrets.

You can use the generated secrets to obtain OAuth access tokens for a service principal, which can then be used to access Databricks Accounts and Workspace APIs. For more information, see Authentication using OAuth tokens for service principals,

In addition, the generated secrets can be used to configure the Databricks Terraform Provider to authenticate with the service principal. For more information, see Databricks Terraform Provider.

func NewServicePrincipalSecrets added in v0.9.0

func NewServicePrincipalSecrets(client *client.DatabricksClient) *ServicePrincipalSecretsAPI

func (*ServicePrincipalSecretsAPI) Create added in v0.9.0

Create service principal secret.

Create a secret for the given service principal.

func (*ServicePrincipalSecretsAPI) Delete added in v0.9.0

Delete service principal secret.

Delete a secret from the given service principal.

func (*ServicePrincipalSecretsAPI) DeleteByServicePrincipalIdAndSecretId added in v0.9.0

func (a *ServicePrincipalSecretsAPI) DeleteByServicePrincipalIdAndSecretId(ctx context.Context, servicePrincipalId int64, secretId string) error

Delete service principal secret.

Delete a secret from the given service principal.

func (*ServicePrincipalSecretsAPI) Impl added in v0.9.0

Impl returns low-level ServicePrincipalSecrets API implementation Deprecated: use MockServicePrincipalSecretsInterface instead.

func (*ServicePrincipalSecretsAPI) List added in v0.24.0

List service principal secrets.

List all secrets associated with the given service principal. This operation only returns information about the secrets themselves and does not include the secret values.

This method is generated by Databricks SDK Code Generator.

func (*ServicePrincipalSecretsAPI) ListAll added in v0.9.0

List service principal secrets.

List all secrets associated with the given service principal. This operation only returns information about the secrets themselves and does not include the secret values.

This method is generated by Databricks SDK Code Generator.

func (*ServicePrincipalSecretsAPI) ListByServicePrincipalId added in v0.9.0

func (a *ServicePrincipalSecretsAPI) ListByServicePrincipalId(ctx context.Context, servicePrincipalId int64) (*ListServicePrincipalSecretsResponse, error)

List service principal secrets.

List all secrets associated with the given service principal. This operation only returns information about the secrets themselves and does not include the secret values.

func (*ServicePrincipalSecretsAPI) WithImpl added in v0.9.0

WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks. Deprecated: use MockServicePrincipalSecretsInterface instead.

type ServicePrincipalSecretsInterface added in v0.29.0

type ServicePrincipalSecretsInterface interface {
	// WithImpl could be used to override low-level API implementations for unit
	// testing purposes with [github.com/golang/mock] or other mocking frameworks.
	// Deprecated: use MockServicePrincipalSecretsInterface instead.
	WithImpl(impl ServicePrincipalSecretsService) ServicePrincipalSecretsInterface

	// Impl returns low-level ServicePrincipalSecrets API implementation
	// Deprecated: use MockServicePrincipalSecretsInterface instead.
	Impl() ServicePrincipalSecretsService

	// Create service principal secret.
	//
	// Create a secret for the given service principal.
	Create(ctx context.Context, request CreateServicePrincipalSecretRequest) (*CreateServicePrincipalSecretResponse, error)

	// Delete service principal secret.
	//
	// Delete a secret from the given service principal.
	Delete(ctx context.Context, request DeleteServicePrincipalSecretRequest) error

	// Delete service principal secret.
	//
	// Delete a secret from the given service principal.
	DeleteByServicePrincipalIdAndSecretId(ctx context.Context, servicePrincipalId int64, secretId string) error

	// List service principal secrets.
	//
	// List all secrets associated with the given service principal. This operation
	// only returns information about the secrets themselves and does not include
	// the secret values.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListServicePrincipalSecretsRequest) listing.Iterator[SecretInfo]

	// List service principal secrets.
	//
	// List all secrets associated with the given service principal. This operation
	// only returns information about the secrets themselves and does not include
	// the secret values.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListServicePrincipalSecretsRequest) ([]SecretInfo, error)

	// List service principal secrets.
	//
	// List all secrets associated with the given service principal. This operation
	// only returns information about the secrets themselves and does not include
	// the secret values.
	ListByServicePrincipalId(ctx context.Context, servicePrincipalId int64) (*ListServicePrincipalSecretsResponse, error)
}

type ServicePrincipalSecretsService added in v0.9.0

type ServicePrincipalSecretsService interface {

	// Create service principal secret.
	//
	// Create a secret for the given service principal.
	Create(ctx context.Context, request CreateServicePrincipalSecretRequest) (*CreateServicePrincipalSecretResponse, error)

	// Delete service principal secret.
	//
	// Delete a secret from the given service principal.
	Delete(ctx context.Context, request DeleteServicePrincipalSecretRequest) error

	// List service principal secrets.
	//
	// List all secrets associated with the given service principal. This
	// operation only returns information about the secrets themselves and does
	// not include the secret values.
	//
	// Use ListAll() to get all SecretInfo instances
	List(ctx context.Context, request ListServicePrincipalSecretsRequest) (*ListServicePrincipalSecretsResponse, error)
}

These APIs enable administrators to manage service principal secrets.

You can use the generated secrets to obtain OAuth access tokens for a service principal, which can then be used to access Databricks Accounts and Workspace APIs. For more information, see Authentication using OAuth tokens for service principals,

In addition, the generated secrets can be used to configure the Databricks Terraform Provider to authenticate with the service principal. For more information, see Databricks Terraform Provider.

type TokenAccessPolicy

type TokenAccessPolicy struct {
	// access token time to live in minutes
	AccessTokenTtlInMinutes int `json:"access_token_ttl_in_minutes,omitempty"`
	// refresh token time to live in minutes
	RefreshTokenTtlInMinutes int `json:"refresh_token_ttl_in_minutes,omitempty"`

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

func (TokenAccessPolicy) MarshalJSON added in v0.23.0

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

func (*TokenAccessPolicy) UnmarshalJSON added in v0.23.0

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

type UpdateCustomAppIntegration

type UpdateCustomAppIntegration struct {
	// The oauth app integration ID.
	IntegrationId string `json:"-" url:"-"`
	// List of oauth redirect urls to be updated in the custom oauth app
	// integration
	RedirectUrls []string `json:"redirect_urls,omitempty"`
	// Token access policy to be updated in the custom oauth app integration
	TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`
}

type UpdateCustomAppIntegrationOutput added in v0.34.0

type UpdateCustomAppIntegrationOutput struct {
}

type UpdatePublishedAppIntegration

type UpdatePublishedAppIntegration struct {
	// The oauth app integration ID.
	IntegrationId string `json:"-" url:"-"`
	// Token access policy to be updated in the published oauth app integration
	TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"`
}

type UpdatePublishedAppIntegrationOutput added in v0.34.0

type UpdatePublishedAppIntegrationOutput struct {
}

Jump to

Keyboard shortcuts

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