Documentation ¶
Overview ¶
These APIs allow you to manage Custom App Integration, O Auth Enrollment, Published App Integration, Service Principal Secrets, etc.
Index ¶
- type CreateCustomAppIntegration
- type CreateCustomAppIntegrationOutput
- type CreateOAuthEnrollment
- type CreatePublishedAppIntegration
- type CreatePublishedAppIntegrationOutput
- type CreateServicePrincipalSecretRequest
- type CreateServicePrincipalSecretResponse
- type CustomAppIntegrationAPI
- func (a *CustomAppIntegrationAPI) Create(ctx context.Context, request CreateCustomAppIntegration) (*CreateCustomAppIntegrationOutput, error)
- func (a *CustomAppIntegrationAPI) Delete(ctx context.Context, request DeleteCustomAppIntegrationRequest) error
- func (a *CustomAppIntegrationAPI) DeleteByIntegrationId(ctx context.Context, integrationId string) error
- func (a *CustomAppIntegrationAPI) Get(ctx context.Context, request GetCustomAppIntegrationRequest) (*GetCustomAppIntegrationOutput, error)
- func (a *CustomAppIntegrationAPI) GetByIntegrationId(ctx context.Context, integrationId string) (*GetCustomAppIntegrationOutput, error)
- func (a *CustomAppIntegrationAPI) Impl() CustomAppIntegrationService
- func (a *CustomAppIntegrationAPI) ListAll(ctx context.Context) ([]GetCustomAppIntegrationOutput, error)
- func (a *CustomAppIntegrationAPI) Update(ctx context.Context, request UpdateCustomAppIntegration) error
- func (a *CustomAppIntegrationAPI) WithImpl(impl CustomAppIntegrationService) *CustomAppIntegrationAPI
- type CustomAppIntegrationService
- type DeleteCustomAppIntegrationRequest
- type DeletePublishedAppIntegrationRequest
- type DeleteServicePrincipalSecretRequest
- type GetCustomAppIntegrationOutput
- type GetCustomAppIntegrationRequest
- type GetCustomAppIntegrationsOutput
- type GetPublishedAppIntegrationOutput
- type GetPublishedAppIntegrationRequest
- type GetPublishedAppIntegrationsOutput
- type ListServicePrincipalSecretsRequest
- type ListServicePrincipalSecretsResponse
- type OAuthEnrollmentAPI
- func (a *OAuthEnrollmentAPI) Create(ctx context.Context, request CreateOAuthEnrollment) error
- func (a *OAuthEnrollmentAPI) Get(ctx context.Context) (*OAuthEnrollmentStatus, error)
- func (a *OAuthEnrollmentAPI) Impl() OAuthEnrollmentService
- func (a *OAuthEnrollmentAPI) WithImpl(impl OAuthEnrollmentService) *OAuthEnrollmentAPI
- type OAuthEnrollmentService
- type OAuthEnrollmentStatus
- type PublishedAppIntegrationAPI
- func (a *PublishedAppIntegrationAPI) Create(ctx context.Context, request CreatePublishedAppIntegration) (*CreatePublishedAppIntegrationOutput, error)
- func (a *PublishedAppIntegrationAPI) Delete(ctx context.Context, request DeletePublishedAppIntegrationRequest) error
- func (a *PublishedAppIntegrationAPI) DeleteByIntegrationId(ctx context.Context, integrationId string) error
- func (a *PublishedAppIntegrationAPI) Get(ctx context.Context, request GetPublishedAppIntegrationRequest) (*GetPublishedAppIntegrationOutput, error)
- func (a *PublishedAppIntegrationAPI) GetByIntegrationId(ctx context.Context, integrationId string) (*GetPublishedAppIntegrationOutput, error)
- func (a *PublishedAppIntegrationAPI) Impl() PublishedAppIntegrationService
- func (a *PublishedAppIntegrationAPI) ListAll(ctx context.Context) ([]GetPublishedAppIntegrationOutput, error)
- func (a *PublishedAppIntegrationAPI) Update(ctx context.Context, request UpdatePublishedAppIntegration) error
- func (a *PublishedAppIntegrationAPI) WithImpl(impl PublishedAppIntegrationService) *PublishedAppIntegrationAPI
- type PublishedAppIntegrationService
- type SecretInfo
- type ServicePrincipalSecretsAPI
- func (a *ServicePrincipalSecretsAPI) Create(ctx context.Context, request CreateServicePrincipalSecretRequest) (*CreateServicePrincipalSecretResponse, error)
- func (a *ServicePrincipalSecretsAPI) Delete(ctx context.Context, request DeleteServicePrincipalSecretRequest) error
- func (a *ServicePrincipalSecretsAPI) DeleteByServicePrincipalIdAndSecretId(ctx context.Context, servicePrincipalId int64, secretId string) error
- func (a *ServicePrincipalSecretsAPI) Impl() ServicePrincipalSecretsService
- func (a *ServicePrincipalSecretsAPI) ListAll(ctx context.Context, request ListServicePrincipalSecretsRequest) ([]SecretInfo, error)
- func (a *ServicePrincipalSecretsAPI) ListByServicePrincipalId(ctx context.Context, servicePrincipalId int64) (*ListServicePrincipalSecretsResponse, error)
- func (a *ServicePrincipalSecretsAPI) WithImpl(impl ServicePrincipalSecretsService) *ServicePrincipalSecretsAPI
- type ServicePrincipalSecretsService
- type TokenAccessPolicy
- type UpdateCustomAppIntegration
- type UpdatePublishedAppIntegration
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"` // Token access policy TokenAccessPolicy *TokenAccessPolicy `json:"token_access_policy,omitempty"` }
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"` }
type CreateOAuthEnrollment ¶
type CreateOAuthEnrollment struct { // If true, enable OAuth for all the published applications in the account. EnableAllPublishedApps bool `json:"enable_all_published_apps,omitempty"` }
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"` }
type CreatePublishedAppIntegrationOutput ¶
type CreatePublishedAppIntegrationOutput struct { // unique integration id for the published oauth app IntegrationId string `json:"integration_id,omitempty"` }
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"` }
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.
**Note:** You can only add/use the OAuth custom application integrations when OAuth enrollment status is enabled. For more details see :method:OAuthEnrollment/create
func NewCustomAppIntegration ¶
func NewCustomAppIntegration(client *client.DatabricksClient) *CustomAppIntegrationAPI
func (*CustomAppIntegrationAPI) Create ¶
func (a *CustomAppIntegrationAPI) Create(ctx context.Context, request CreateCustomAppIntegration) (*CreateCustomAppIntegrationOutput, error)
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 ¶
func (a *CustomAppIntegrationAPI) 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.
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 ¶
func (a *CustomAppIntegrationAPI) Get(ctx context.Context, request GetCustomAppIntegrationRequest) (*GetCustomAppIntegrationOutput, error)
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 ¶
func (a *CustomAppIntegrationAPI) Impl() CustomAppIntegrationService
Impl returns low-level CustomAppIntegration API implementation
func (*CustomAppIntegrationAPI) ListAll ¶ added in v0.7.0
func (a *CustomAppIntegrationAPI) ListAll(ctx context.Context) ([]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.
func (*CustomAppIntegrationAPI) Update ¶
func (a *CustomAppIntegrationAPI) Update(ctx context.Context, request UpdateCustomAppIntegration) 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.
func (*CustomAppIntegrationAPI) WithImpl ¶
func (a *CustomAppIntegrationAPI) WithImpl(impl CustomAppIntegrationService) *CustomAppIntegrationAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
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.
**Note:** You can only add/use the OAuth custom application integrations when OAuth enrollment status is enabled. For more details see :method:OAuthEnrollment/create
type DeleteCustomAppIntegrationRequest ¶
type DeleteCustomAppIntegrationRequest struct { // The oauth app integration ID. IntegrationId string `json:"-" url:"-"` }
Delete Custom OAuth App Integration
type DeletePublishedAppIntegrationRequest ¶
type DeletePublishedAppIntegrationRequest struct { // The oauth app integration ID. IntegrationId string `json:"-" url:"-"` }
Delete Published OAuth App Integration
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"` }
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"` }
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 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 OAuthEnrollmentAPI ¶
type OAuthEnrollmentAPI struct {
// contains filtered or unexported fields
}
These APIs enable administrators to enroll OAuth for their accounts, which is required for adding/using any OAuth published/custom application integration.
**Note:** Your account must be on the E2 version to use these APIs, this is because OAuth is only supported on the E2 version.
func NewOAuthEnrollment ¶
func NewOAuthEnrollment(client *client.DatabricksClient) *OAuthEnrollmentAPI
func (*OAuthEnrollmentAPI) Create ¶
func (a *OAuthEnrollmentAPI) Create(ctx context.Context, request CreateOAuthEnrollment) error
Create OAuth Enrollment request.
Create an OAuth Enrollment request to enroll OAuth for this account and optionally enable the OAuth integration for all the partner applications in the account.
The parter applications are: - Power BI - Tableau Desktop - Databricks CLI
The enrollment is executed asynchronously, so the API will return 204 immediately. The actual enrollment take a few minutes, you can check the status via API :method:OAuthEnrollment/get.
func (*OAuthEnrollmentAPI) Get ¶
func (a *OAuthEnrollmentAPI) Get(ctx context.Context) (*OAuthEnrollmentStatus, error)
Get OAuth enrollment status.
Gets the OAuth enrollment status for this Account.
You can only add/use the OAuth published/custom application integrations when OAuth enrollment status is enabled.
func (*OAuthEnrollmentAPI) Impl ¶
func (a *OAuthEnrollmentAPI) Impl() OAuthEnrollmentService
Impl returns low-level OAuthEnrollment API implementation
func (*OAuthEnrollmentAPI) WithImpl ¶
func (a *OAuthEnrollmentAPI) WithImpl(impl OAuthEnrollmentService) *OAuthEnrollmentAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
type OAuthEnrollmentService ¶
type OAuthEnrollmentService interface { // Create OAuth Enrollment request. // // Create an OAuth Enrollment request to enroll OAuth for this account and // optionally enable the OAuth integration for all the partner applications // in the account. // // The parter applications are: - Power BI - Tableau Desktop - Databricks // CLI // // The enrollment is executed asynchronously, so the API will return 204 // immediately. The actual enrollment take a few minutes, you can check the // status via API :method:OAuthEnrollment/get. Create(ctx context.Context, request CreateOAuthEnrollment) error // Get OAuth enrollment status. // // Gets the OAuth enrollment status for this Account. // // You can only add/use the OAuth published/custom application integrations // when OAuth enrollment status is enabled. Get(ctx context.Context) (*OAuthEnrollmentStatus, error) }
These APIs enable administrators to enroll OAuth for their accounts, which is required for adding/using any OAuth published/custom application integration.
**Note:** Your account must be on the E2 version to use these APIs, this is because OAuth is only supported on the E2 version.
type OAuthEnrollmentStatus ¶
type OAuthEnrollmentStatus struct { // Is OAuth enrolled for the account. IsEnabled bool `json:"is_enabled,omitempty"` }
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 Cloud for Databricks in AWS cloud.
**Note:** You can only add/use the OAuth published application integrations when OAuth enrollment status is enabled. For more details see :method:OAuthEnrollment/create
func NewPublishedAppIntegration ¶
func NewPublishedAppIntegration(client *client.DatabricksClient) *PublishedAppIntegrationAPI
func (*PublishedAppIntegrationAPI) Create ¶
func (a *PublishedAppIntegrationAPI) Create(ctx context.Context, request CreatePublishedAppIntegration) (*CreatePublishedAppIntegrationOutput, error)
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 ¶
func (a *PublishedAppIntegrationAPI) 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.
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 ¶
func (a *PublishedAppIntegrationAPI) Get(ctx context.Context, request GetPublishedAppIntegrationRequest) (*GetPublishedAppIntegrationOutput, error)
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 ¶
func (a *PublishedAppIntegrationAPI) Impl() PublishedAppIntegrationService
Impl returns low-level PublishedAppIntegration API implementation
func (*PublishedAppIntegrationAPI) ListAll ¶ added in v0.7.0
func (a *PublishedAppIntegrationAPI) ListAll(ctx context.Context) ([]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.
func (*PublishedAppIntegrationAPI) Update ¶
func (a *PublishedAppIntegrationAPI) Update(ctx context.Context, request UpdatePublishedAppIntegration) 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.
func (*PublishedAppIntegrationAPI) WithImpl ¶
func (a *PublishedAppIntegrationAPI) WithImpl(impl PublishedAppIntegrationService) *PublishedAppIntegrationAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
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 Cloud for Databricks in AWS cloud.
**Note:** You can only add/use the OAuth published application integrations when OAuth enrollment status is enabled. For more details see :method:OAuthEnrollment/create
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"` }
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
func (a *ServicePrincipalSecretsAPI) Create(ctx context.Context, request CreateServicePrincipalSecretRequest) (*CreateServicePrincipalSecretResponse, error)
Create service principal secret.
Create a secret for the given service principal.
func (*ServicePrincipalSecretsAPI) Delete ¶ added in v0.9.0
func (a *ServicePrincipalSecretsAPI) Delete(ctx context.Context, request DeleteServicePrincipalSecretRequest) error
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
func (a *ServicePrincipalSecretsAPI) Impl() ServicePrincipalSecretsService
Impl returns low-level ServicePrincipalSecrets API implementation
func (*ServicePrincipalSecretsAPI) ListAll ¶ added in v0.9.0
func (a *ServicePrincipalSecretsAPI) 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.
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
func (a *ServicePrincipalSecretsAPI) WithImpl(impl ServicePrincipalSecretsService) *ServicePrincipalSecretsAPI
WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks.
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 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 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"` }