Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def test_get_sandbox(client):
)
assert isinstance(sandbox, types.SandboxEnvironment)
assert sandbox.name == operation.response.name
assert isinstance(sandbox.state, types.SandboxState)


pytestmark = pytest_helper.setup(
Expand Down
2 changes: 2 additions & 0 deletions vertexai/_genai/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,7 @@
from .common import SandboxEnvironmentTemplateWarmPoolConfig
from .common import SandboxEnvironmentTemplateWarmPoolConfigDict
from .common import SandboxEnvironmentTemplateWarmPoolConfigOrDict
from .common import SandboxState
from .common import SavedQuery
from .common import SavedQueryDict
from .common import SavedQueryOrDict
Expand Down Expand Up @@ -2641,6 +2642,7 @@
"Operator",
"Language",
"MachineConfig",
"SandboxState",
"Protocol",
"DefaultContainerCategory",
"PostSnapshotAction",
Expand Down
21 changes: 19 additions & 2 deletions vertexai/_genai/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,23 @@ class MachineConfig(_common.CaseInSensitiveEnum):
"""The default value: milligcu 4000, memory 4 Gib"""


class SandboxState(_common.CaseInSensitiveEnum):
"""Output only. The runtime state of the SandboxEnvironment."""

STATE_UNSPECIFIED = "STATE_UNSPECIFIED"
"""The default value. This value is unused."""
STATE_PROVISIONING = "STATE_PROVISIONING"
"""Runtime resources are being allocated for the sandbox environment."""
STATE_RUNNING = "STATE_RUNNING"
"""Sandbox runtime is ready for serving."""
STATE_DEPROVISIONING = "STATE_DEPROVISIONING"
"""Sandbox runtime is halted, performing tear down tasks."""
STATE_TERMINATED = "STATE_TERMINATED"
"""Sandbox has terminated with underlying runtime failure."""
STATE_DELETED = "STATE_DELETED"
"""Sandbox runtime has been deleted."""


class Protocol(_common.CaseInSensitiveEnum):
"""Protocol for port. Defaults to TCP if not specified."""

Expand Down Expand Up @@ -12356,7 +12373,7 @@ class SandboxEnvironment(_common.BaseModel):
default=None,
description="""Optional. The configuration of the SandboxEnvironment.""",
)
state: Optional[State] = Field(
state: Optional[SandboxState] = Field(
default=None,
description="""Output only. The runtime state of the SandboxEnvironment.""",
)
Expand Down Expand Up @@ -12408,7 +12425,7 @@ class SandboxEnvironmentDict(TypedDict, total=False):
spec: Optional[SandboxEnvironmentSpecDict]
"""Optional. The configuration of the SandboxEnvironment."""

state: Optional[State]
state: Optional[SandboxState]
"""Output only. The runtime state of the SandboxEnvironment."""

ttl: Optional[str]
Expand Down
Loading