-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Expand file tree
/
Copy pathcontainer_create_response.py
More file actions
65 lines (44 loc) · 1.94 KB
/
container_create_response.py
File metadata and controls
65 lines (44 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
from typing_extensions import Literal
from .._models import BaseModel
__all__ = ["ContainerCreateResponse", "ExpiresAfter", "NetworkPolicy"]
class ExpiresAfter(BaseModel):
"""
The container will expire after this time period.
The anchor is the reference point for the expiration.
The minutes is the number of minutes after the anchor before the container expires.
"""
anchor: Optional[Literal["last_active_at"]] = None
"""The reference point for the expiration."""
minutes: Optional[int] = None
"""The number of minutes after the anchor before the container expires."""
class NetworkPolicy(BaseModel):
"""Network access policy for the container."""
type: Literal["allowlist", "disabled"]
"""The network policy mode."""
allowed_domains: Optional[List[str]] = None
"""Allowed outbound domains when `type` is `allowlist`."""
class ContainerCreateResponse(BaseModel):
id: str
"""Unique identifier for the container."""
created_at: int
"""Unix timestamp (in seconds) when the container was created."""
name: str
"""Name of the container."""
object: str
"""The type of this object."""
status: str
"""Status of the container (e.g., active, deleted)."""
expires_after: Optional[ExpiresAfter] = None
"""
The container will expire after this time period. The anchor is the reference
point for the expiration. The minutes is the number of minutes after the anchor
before the container expires.
"""
last_active_at: Optional[int] = None
"""Unix timestamp (in seconds) when the container was last active."""
memory_limit: Optional[Literal["1g", "4g", "16g", "64g"]] = None
"""The memory limit configured for the container."""
network_policy: Optional[NetworkPolicy] = None
"""Network access policy for the container."""