Skip to content

ServicePrincipalSecret

laktory.models.resources.databricks.ServicePrincipalSecret ยค

Bases: ServicePrincipalSecretBase

Databricks Service Principal Secret

OAuth secret of a service principal, used for machine-to-machine authentication. The generated secret is available as an output, e.g. ${resources.my-secret.secret}.

Examples:

import io

from laktory import models

secret_yaml = '''
service_principal_id: ${resources.sp-neptune.id}
lifetime: 7776000s
'''
secret = models.resources.databricks.ServicePrincipalSecret.model_validate_yaml(
    io.StringIO(secret_yaml)
)
References
BASE DESCRIPTION
api

Specifies whether to use account-level or workspace-level API. Valid values are account and workspace. When not set, the API level is inferred from the provider host

TYPE: str | None | VariableType DEFAULT: None

create_time

UTC time when the secret was created

TYPE: str | None | VariableType DEFAULT: None

expire_time

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

TYPE: str | None | VariableType DEFAULT: None

lifetime

The lifetime of the secret in seconds formatted as NNNNs. If this parameter is not provided, the secret will have a default lifetime of 730 days (63072000s). Expiration of secret will lead to generation of new secret

TYPE: str | None | VariableType DEFAULT: None

secret

Sensitive Generated secret for the service principal

TYPE: str | None | VariableType DEFAULT: None

secret_hash

Secret Hash

TYPE: str | None | VariableType DEFAULT: None

service_principal_id

SCIM ID of the databricks_service_principal (not application ID). Set automatically when declared in the secrets of a service principal.

TYPE: str | None | VariableType DEFAULT: None

status

Status of the secret (i.e., ACTIVE - see REST API docs for full list)

TYPE: str | None | VariableType DEFAULT: None

time_rotating
  • Changing this argument forces recreation of the secret

TYPE: str | None | VariableType DEFAULT: None

update_time

UTC time when the secret was updated

TYPE: str | None | VariableType DEFAULT: None