Debian Codegraph @

src/anthropic/types/beta/beta_environment.py

raw
1 from typing import Dict, Union, Optional
2 from typing_extensions import Literal, Annotated, TypeAlias
3
4 from ..._models import BaseModel, UnionDiscriminator
5 from .beta_cloud_config import BetaCloudConfig
6 from .beta_self_hosted_config import BetaSelfHostedConfig
7
8 __all__ = ["BetaEnvironment", "Config"]
9
10 Config: TypeAlias = Annotated[Union[BetaCloudConfig, BetaSelfHostedConfig], UnionDiscriminator("type")]
11
12
13 class BetaEnvironment(BaseModel):
14 """Unified Environment resource for both cloud and self-hosted environments."""
15
16 id: str
17 """Environment identifier (e.g., 'env\\__...')"""
18
19 archived_at: Optional[str] = None
20 """RFC 3339 timestamp when environment was archived, or null if not archived"""
21
22 config: Config
23 """Environment configuration (either Anthropic Cloud or self-hosted)"""
24
25 created_at: str
26 """RFC 3339 timestamp when environment was created"""
27
28 description: Optional[str] = None
29 """User-provided description for the environment; null when unset"""
30
31 metadata: Dict[str, str]
32 """User-provided metadata key-value pairs"""
33
34 name: str
35 """Human-readable name for the environment"""
36
37 type: Literal["environment"]
38 """The type of object (always 'environment')"""
39
40 updated_at: str
41 """RFC 3339 timestamp when environment was last updated"""
42
43 scope: Optional[Literal["organization", "account"]] = None
44 """The visibility scope for this environment.
45
46 'organization' means visible to all accounts. 'account' means visible only to
47 the owning account.
48 """