OAuth

These dataclasses are used in the SDK to represent API requests and responses for services in the databricks.sdk.service.oauth2 module.

class databricks.sdk.service.oauth2.CreateCustomAppIntegrationOutput(client_id: 'Optional[str]' = None, client_secret: 'Optional[str]' = None, integration_id: 'Optional[str]' = None)
client_id: str | None = None

OAuth client-id generated by the Databricks

client_secret: str | None = None

OAuth client-secret generated by the Databricks. If this is a confidential OAuth app client-secret will be generated.

integration_id: str | None = None

Unique integration id for the custom OAuth app

as_dict() dict

Serializes the CreateCustomAppIntegrationOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the CreateCustomAppIntegrationOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) CreateCustomAppIntegrationOutput

Deserializes the CreateCustomAppIntegrationOutput from a dictionary.

class databricks.sdk.service.oauth2.CreatePublishedAppIntegrationOutput(integration_id: 'Optional[str]' = None)
integration_id: str | None = None

Unique integration id for the published OAuth app

as_dict() dict

Serializes the CreatePublishedAppIntegrationOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the CreatePublishedAppIntegrationOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) CreatePublishedAppIntegrationOutput

Deserializes the CreatePublishedAppIntegrationOutput from a dictionary.

class databricks.sdk.service.oauth2.CreateServicePrincipalSecretResponse(create_time: 'Optional[str]' = None, expire_time: 'Optional[str]' = None, id: 'Optional[str]' = None, secret: 'Optional[str]' = None, secret_hash: 'Optional[str]' = None, status: 'Optional[str]' = None, update_time: 'Optional[str]' = None)
create_time: str | None = None

UTC time when the secret was created

expire_time: str | None = None

UTC time when the secret will expire. If the field is not present, the secret does not expire.

id: str | None = None

ID of the secret

secret: str | None = None

Secret Value

secret_hash: str | None = None

Secret Hash

status: str | None = None

Status of the secret

update_time: str | None = None

UTC time when the secret was updated

as_dict() dict

Serializes the CreateServicePrincipalSecretResponse into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the CreateServicePrincipalSecretResponse into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) CreateServicePrincipalSecretResponse

Deserializes the CreateServicePrincipalSecretResponse from a dictionary.

class databricks.sdk.service.oauth2.DeleteCustomAppIntegrationOutput
as_dict() dict

Serializes the DeleteCustomAppIntegrationOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the DeleteCustomAppIntegrationOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) DeleteCustomAppIntegrationOutput

Deserializes the DeleteCustomAppIntegrationOutput from a dictionary.

class databricks.sdk.service.oauth2.DeletePublishedAppIntegrationOutput
as_dict() dict

Serializes the DeletePublishedAppIntegrationOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the DeletePublishedAppIntegrationOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) DeletePublishedAppIntegrationOutput

Deserializes the DeletePublishedAppIntegrationOutput from a dictionary.

class databricks.sdk.service.oauth2.FederationPolicy(create_time: 'Optional[str]' = None, description: 'Optional[str]' = None, name: 'Optional[str]' = None, oidc_policy: 'Optional[OidcFederationPolicy]' = None, policy_id: 'Optional[str]' = None, service_principal_id: 'Optional[int]' = None, uid: 'Optional[str]' = None, update_time: 'Optional[str]' = None)
create_time: str | None = None

Creation time of the federation policy.

description: str | None = None

Description of the federation policy.

name: str | None = None

Resource name for the federation policy. Example values include accounts/<account-id>/federationPolicies/my-federation-policy for Account Federation Policies, and accounts/<account-id>/servicePrincipals/<service-principal-id>/federationPolicies/my-federation-policy for Service Principal Federation Policies. Typically an output parameter, which does not need to be specified in create or update requests. If specified in a request, must match the value in the request URL.

oidc_policy: OidcFederationPolicy | None = None
policy_id: str | None = None

The ID of the federation policy. Output only.

service_principal_id: int | None = None

The service principal ID that this federation policy applies to. Output only. Only set for service principal federation policies.

uid: str | None = None

Unique, immutable id of the federation policy.

update_time: str | None = None

Last update time of the federation policy.

as_dict() dict

Serializes the FederationPolicy into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the FederationPolicy into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) FederationPolicy

Deserializes the FederationPolicy from a dictionary.

class databricks.sdk.service.oauth2.GetCustomAppIntegrationOutput(client_id: 'Optional[str]' = None, confidential: 'Optional[bool]' = None, create_time: 'Optional[str]' = None, created_by: 'Optional[int]' = None, creator_username: 'Optional[str]' = None, integration_id: 'Optional[str]' = None, name: 'Optional[str]' = None, redirect_urls: 'Optional[List[str]]' = None, scopes: 'Optional[List[str]]' = None, token_access_policy: 'Optional[TokenAccessPolicy]' = None, user_authorized_scopes: 'Optional[List[str]]' = None)
client_id: str | None = None

The client id of the custom OAuth app

confidential: bool | None = None

This field indicates whether an OAuth client secret is required to authenticate this client.

create_time: str | None = None
created_by: int | None = None
creator_username: str | None = None
integration_id: str | None = None

ID of this custom app

name: str | None = None

The display name of the custom OAuth app

redirect_urls: List[str] | None = None

List of OAuth redirect urls

scopes: List[str] | None = None
token_access_policy: TokenAccessPolicy | None = None

Token access policy

user_authorized_scopes: List[str] | None = None

Scopes that will need to be consented by end user to mint the access token. If the user does not authorize the access token will not be minted. Must be a subset of scopes.

as_dict() dict

Serializes the GetCustomAppIntegrationOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the GetCustomAppIntegrationOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) GetCustomAppIntegrationOutput

Deserializes the GetCustomAppIntegrationOutput from a dictionary.

class databricks.sdk.service.oauth2.GetCustomAppIntegrationsOutput(apps: 'Optional[List[GetCustomAppIntegrationOutput]]' = None, next_page_token: 'Optional[str]' = None)
apps: List[GetCustomAppIntegrationOutput] | None = None

List of Custom OAuth App Integrations defined for the account.

next_page_token: str | None = None
as_dict() dict

Serializes the GetCustomAppIntegrationsOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the GetCustomAppIntegrationsOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) GetCustomAppIntegrationsOutput

Deserializes the GetCustomAppIntegrationsOutput from a dictionary.

class databricks.sdk.service.oauth2.GetPublishedAppIntegrationOutput(app_id: 'Optional[str]' = None, create_time: 'Optional[str]' = None, created_by: 'Optional[int]' = None, integration_id: 'Optional[str]' = None, name: 'Optional[str]' = None, token_access_policy: 'Optional[TokenAccessPolicy]' = None)
app_id: str | None = None

App-id of the published app integration

create_time: str | None = None
created_by: int | None = None
integration_id: str | None = None

Unique integration id for the published OAuth app

name: str | None = None

Display name of the published OAuth app

token_access_policy: TokenAccessPolicy | None = None

Token access policy

as_dict() dict

Serializes the GetPublishedAppIntegrationOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the GetPublishedAppIntegrationOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) GetPublishedAppIntegrationOutput

Deserializes the GetPublishedAppIntegrationOutput from a dictionary.

class databricks.sdk.service.oauth2.GetPublishedAppIntegrationsOutput(apps: 'Optional[List[GetPublishedAppIntegrationOutput]]' = None, next_page_token: 'Optional[str]' = None)
apps: List[GetPublishedAppIntegrationOutput] | None = None

List of Published OAuth App Integrations defined for the account.

next_page_token: str | None = None
as_dict() dict

Serializes the GetPublishedAppIntegrationsOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the GetPublishedAppIntegrationsOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) GetPublishedAppIntegrationsOutput

Deserializes the GetPublishedAppIntegrationsOutput from a dictionary.

class databricks.sdk.service.oauth2.GetPublishedAppsOutput(apps: 'Optional[List[PublishedAppOutput]]' = None, next_page_token: 'Optional[str]' = None)
apps: List[PublishedAppOutput] | None = None

List of Published OAuth Apps.

next_page_token: str | None = None

A token that can be used to get the next page of results. If not present, there are no more results to show.

as_dict() dict

Serializes the GetPublishedAppsOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the GetPublishedAppsOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) GetPublishedAppsOutput

Deserializes the GetPublishedAppsOutput from a dictionary.

class databricks.sdk.service.oauth2.ListFederationPoliciesResponse(next_page_token: 'Optional[str]' = None, policies: 'Optional[List[FederationPolicy]]' = None)
next_page_token: str | None = None
policies: List[FederationPolicy] | None = None
as_dict() dict

Serializes the ListFederationPoliciesResponse into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ListFederationPoliciesResponse into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ListFederationPoliciesResponse

Deserializes the ListFederationPoliciesResponse from a dictionary.

class databricks.sdk.service.oauth2.ListServicePrincipalSecretsResponse(next_page_token: 'Optional[str]' = None, secrets: 'Optional[List[SecretInfo]]' = None)
next_page_token: str | None = None

A token, which can be sent as page_token to retrieve the next page.

secrets: List[SecretInfo] | None = None

List of the secrets

as_dict() dict

Serializes the ListServicePrincipalSecretsResponse into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the ListServicePrincipalSecretsResponse into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) ListServicePrincipalSecretsResponse

Deserializes the ListServicePrincipalSecretsResponse from a dictionary.

class databricks.sdk.service.oauth2.OidcFederationPolicy(audiences: List[str] | None = None, issuer: str | None = None, jwks_json: str | None = None, jwks_uri: str | None = None, subject: str | None = None, subject_claim: str | None = None)

Specifies the policy to use for validating OIDC claims in your federated tokens.

audiences: List[str] | None = None

The allowed token audiences, as specified in the ‘aud’ claim of federated tokens. The audience identifier is intended to represent the recipient of the token. Can be any non-empty string value. As long as the audience in the token matches at least one audience in the policy, the token is considered a match. If audiences is unspecified, defaults to your Databricks account id.

issuer: str | None = None

The required token issuer, as specified in the ‘iss’ claim of federated tokens.

jwks_json: str | None = None

The public keys used to validate the signature of federated tokens, in JWKS format. Most use cases should not need to specify this field. If jwks_uri and jwks_json are both unspecified (recommended), Databricks automatically fetches the public keys from your issuer’s well known endpoint. Databricks strongly recommends relying on your issuer’s well known endpoint for discovering public keys.

jwks_uri: str | None = None

URL of the public keys used to validate the signature of federated tokens, in JWKS format. Most use cases should not need to specify this field. If jwks_uri and jwks_json are both unspecified (recommended), Databricks automatically fetches the public keys from your issuer’s well known endpoint. Databricks strongly recommends relying on your issuer’s well known endpoint for discovering public keys.

subject: str | None = None

The required token subject, as specified in the subject claim of federated tokens. Must be specified for service principal federation policies. Must not be specified for account federation policies.

subject_claim: str | None = None

The claim that contains the subject of the token. If unspecified, the default value is ‘sub’.

as_dict() dict

Serializes the OidcFederationPolicy into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the OidcFederationPolicy into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) OidcFederationPolicy

Deserializes the OidcFederationPolicy from a dictionary.

class databricks.sdk.service.oauth2.PublishedAppOutput(app_id: 'Optional[str]' = None, client_id: 'Optional[str]' = None, description: 'Optional[str]' = None, is_confidential_client: 'Optional[bool]' = None, name: 'Optional[str]' = None, redirect_urls: 'Optional[List[str]]' = None, scopes: 'Optional[List[str]]' = None)
app_id: str | None = None

Unique ID of the published OAuth app.

client_id: str | None = None

Client ID of the published OAuth app. It is the client_id in the OAuth flow

description: str | None = None

Description of the published OAuth app.

is_confidential_client: bool | None = None

Whether the published OAuth app is a confidential client. It is always false for published OAuth apps.

name: str | None = None

The display name of the published OAuth app.

redirect_urls: List[str] | None = None

Redirect URLs of the published OAuth app.

scopes: List[str] | None = None

Required scopes for the published OAuth app.

as_dict() dict

Serializes the PublishedAppOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the PublishedAppOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) PublishedAppOutput

Deserializes the PublishedAppOutput from a dictionary.

class databricks.sdk.service.oauth2.SecretInfo(create_time: 'Optional[str]' = None, expire_time: 'Optional[str]' = None, id: 'Optional[str]' = None, secret_hash: 'Optional[str]' = None, status: 'Optional[str]' = None, update_time: 'Optional[str]' = None)
create_time: str | None = None

UTC time when the secret was created

expire_time: str | None = None

UTC time when the secret will expire. If the field is not present, the secret does not expire.

id: str | None = None

ID of the secret

secret_hash: str | None = None

Secret Hash

status: str | None = None

Status of the secret

update_time: str | None = None

UTC time when the secret was updated

as_dict() dict

Serializes the SecretInfo into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the SecretInfo into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) SecretInfo

Deserializes the SecretInfo from a dictionary.

class databricks.sdk.service.oauth2.TokenAccessPolicy(absolute_session_lifetime_in_minutes: 'Optional[int]' = None, access_token_ttl_in_minutes: 'Optional[int]' = None, enable_single_use_refresh_tokens: 'Optional[bool]' = None, refresh_token_ttl_in_minutes: 'Optional[int]' = None)
absolute_session_lifetime_in_minutes: int | None = None

Absolute OAuth session TTL in minutes. Effective only when the single-use refresh token feature is enabled. This is the absolute TTL of all refresh tokens issued in one OAuth session. When a new refresh token is issued during refresh token rotation, it will inherit the same absolute TTL as the old refresh token. In other words, this represents the maximum amount of time a user can stay logged in without re-authenticating.

access_token_ttl_in_minutes: int | None = None

access token time to live in minutes

enable_single_use_refresh_tokens: bool | None = None

Whether to enable single-use refresh tokens (refresh token rotation). If this feature is enabled, upon successfully getting a new access token using a refresh token, Databricks will issue a new refresh token along with the access token in the response and invalidate the old refresh token. The client should use the new refresh token to get access tokens in future requests.

refresh_token_ttl_in_minutes: int | None = None

Refresh token time to live in minutes. When single-use refresh tokens are enabled, this represents the TTL of an individual refresh token. If the refresh token is used before it expires, a new one is issued with a renewed individual TTL.

as_dict() dict

Serializes the TokenAccessPolicy into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the TokenAccessPolicy into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) TokenAccessPolicy

Deserializes the TokenAccessPolicy from a dictionary.

class databricks.sdk.service.oauth2.UpdateCustomAppIntegrationOutput
as_dict() dict

Serializes the UpdateCustomAppIntegrationOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the UpdateCustomAppIntegrationOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) UpdateCustomAppIntegrationOutput

Deserializes the UpdateCustomAppIntegrationOutput from a dictionary.

class databricks.sdk.service.oauth2.UpdatePublishedAppIntegrationOutput
as_dict() dict

Serializes the UpdatePublishedAppIntegrationOutput into a dictionary suitable for use as a JSON request body.

as_shallow_dict() dict

Serializes the UpdatePublishedAppIntegrationOutput into a shallow dictionary of its immediate attributes.

classmethod from_dict(d: Dict[str, Any]) UpdatePublishedAppIntegrationOutput

Deserializes the UpdatePublishedAppIntegrationOutput from a dictionary.