Secret

Smarter API Secret Manifest Constants.

Smarter API Manifest - Secret.metadata

class smarter.apps.secret.manifest.models.secret.metadata.SAMSecretMetadata(*, name, description, version, tags=<factory>, annotations=<factory>)[source]

Bases: AbstractSAMMetadataBase

Smarter API Secret Manifest - Metadata class.

class_identifier: ClassVar[str] = 'Secret.metadata'
model_config = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

Return type:

None

name: str

Smarter API Manifest - Secret.spec.

class smarter.apps.secret.manifest.models.secret.spec.SAMSecretSpec(*, config)[source]

Bases: AbstractSAMSpecBase

Smarter API Secret Manifest Secret.spec.

class_identifier: ClassVar[str] = 'Secret.spec'
config: SAMSecretSpecConfig
model_config = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

Return type:

None

class smarter.apps.secret.manifest.models.secret.spec.SAMSecretSpecConfig(*, value, expiration_date=None)[source]

Bases: AbstractSAMSpecBase

Smarter API Secret Manifest Secret.spec.config.

class_identifier: ClassVar[str] = 'Secret.spec.configuration'
classmethod ensure_utc(v)[source]

Treat a naive expiration_date as UTC.

Parameters:

v – The expiration date, or None.

Returns:

The date, with UTC as its time zone if it had none, or None.

Raises:

ValueError – when it is not a datetime.

expiration_date: datetime | None
mask_value(v)[source]

Mask the secret value when the spec is serialized, so that it is never shown.

Parameters:

v (str) – The secret value.

Return type:

str

Returns:

The masked value, or the value unchanged when it is empty.

model_config = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

Return type:

None

value: str

Smarter API Manifest - User.status

class smarter.apps.secret.manifest.models.secret.status.SAMSecretStatus(*, recordLocator, created, modified, dependencies=None, accountNumber, username, last_accessed=None)[source]

Bases: AbstractSAMStatusBase

Smarter API Secret Manifest - Status class (read-only, like Kubernetes status attributes).

class Config[source]

Bases: object

frozen = True
accountNumber: str
class_identifier: ClassVar[str] = 'Secret.status'
last_accessed: datetime | None
model_config = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

Return type:

None

username: str

Smarter API Secret Manifest

class smarter.apps.secret.manifest.models.secret.model.SAMSecret(*, apiVersion, kind, metadata, spec, status=None)[source]

Bases: AbstractSAMBase

Smarter API Manifest - Secret

class_identifier: ClassVar[str] = 'Secret'
metadata: SAMSecretMetadata
model_config = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.

Return type:

None

spec: SAMSecretSpec
status: SAMSecretStatus | None