Skip to content

Commit dccd419

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
feat: update discovery doc
PiperOrigin-RevId: 993240130
1 parent b1378bb commit dccd419

2 files changed

Lines changed: 53 additions & 2 deletions

File tree

‎agentplatform/_genai/types/__init__.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,6 +1995,9 @@
19951995
from .common import SandboxEnvironmentTemplateOperationDict
19961996
from .common import SandboxEnvironmentTemplateOperationOrDict
19971997
from .common import SandboxEnvironmentTemplateOrDict
1998+
from .common import SandboxEnvironmentTemplatePersistentDiskConfig
1999+
from .common import SandboxEnvironmentTemplatePersistentDiskConfigDict
2000+
from .common import SandboxEnvironmentTemplatePersistentDiskConfigOrDict
19982001
from .common import SandboxEnvironmentTemplateResourceRequirements
19992002
from .common import SandboxEnvironmentTemplateResourceRequirementsDict
20002003
from .common import SandboxEnvironmentTemplateResourceRequirementsOrDict
@@ -3516,6 +3519,9 @@
35163519
"CreateSandboxEnvironmentTemplateConfig",
35173520
"CreateSandboxEnvironmentTemplateConfigDict",
35183521
"CreateSandboxEnvironmentTemplateConfigOrDict",
3522+
"SandboxEnvironmentTemplatePersistentDiskConfig",
3523+
"SandboxEnvironmentTemplatePersistentDiskConfigDict",
3524+
"SandboxEnvironmentTemplatePersistentDiskConfigOrDict",
35193525
"SandboxEnvironmentTemplate",
35203526
"SandboxEnvironmentTemplateDict",
35213527
"SandboxEnvironmentTemplateOrDict",

‎agentplatform/_genai/types/common.py‎

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,7 +1733,7 @@ def evaluate(instance: dict[str, Any]) -> float:
17331733
)
17341734
code_execution_region: Optional[str] = Field(
17351735
default=None,
1736-
description="""Optional. The region to use for code execution. If set, the Code Execution Sandbox will be invoked in the specified region regardless of the request's originating region. Must be a region where the Code Execution Sandbox is available. Supported regions: northamerica-northeast1, southamerica-east1, us-central1, us-east1, us-east4, us-west1, us-west4, europe-central2, europe-north1, europe-southwest1, europe-west1, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-west1, asia-east1, asia-east2, asia-northeast1, asia-northeast3, asia-south1, asia-south2, asia-southeast1, australia-southeast2. If unset, the request's originating region is used; requests from regions where the sandbox is unavailable will fail with UNIMPLEMENTED.""",
1736+
description="""Optional. The region to use for code execution. If set, the Code Execution Sandbox will be invoked in the specified region regardless of the request's originating region. Must be a region where the Code Execution Sandbox is available. For the current list of [supported regions](https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/locations). If unset, the request's originating region is used; requests from regions where the sandbox is unavailable will fail with UNIMPLEMENTED.""",
17371737
)
17381738

17391739

@@ -1755,7 +1755,7 @@ def evaluate(instance: dict[str, Any]) -> float:
17551755
are available to the function as instance[field_name]."""
17561756

17571757
code_execution_region: Optional[str]
1758-
"""Optional. The region to use for code execution. If set, the Code Execution Sandbox will be invoked in the specified region regardless of the request's originating region. Must be a region where the Code Execution Sandbox is available. Supported regions: northamerica-northeast1, southamerica-east1, us-central1, us-east1, us-east4, us-west1, us-west4, europe-central2, europe-north1, europe-southwest1, europe-west1, europe-west2, europe-west3, europe-west4, europe-west6, europe-west8, europe-west9, me-west1, asia-east1, asia-east2, asia-northeast1, asia-northeast3, asia-south1, asia-south2, asia-southeast1, australia-southeast2. If unset, the request's originating region is used; requests from regions where the sandbox is unavailable will fail with UNIMPLEMENTED."""
1758+
"""Optional. The region to use for code execution. If set, the Code Execution Sandbox will be invoked in the specified region regardless of the request's originating region. Must be a region where the Code Execution Sandbox is available. For the current list of [supported regions](https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/locations). If unset, the request's originating region is used; requests from regions where the sandbox is unavailable will fail with UNIMPLEMENTED."""
17591759

17601760

17611761
CustomCodeExecutionSpecOrDict = Union[
@@ -18001,6 +18001,42 @@ class _CreateSandboxEnvironmentTemplateRequestParametersDict(TypedDict, total=Fa
1800118001
]
1800218002

1800318003

18004+
class SandboxEnvironmentTemplatePersistentDiskConfig(_common.BaseModel):
18005+
"""Configuration for attaching a persistent disk (PD) to each SandboxEnvironment created from this template. A persistent disk provides durable, per-sandbox block storage whose contents survive across the sandbox lifecycle events that this service supports (e.g. pause/resume), unlike ephemeral local storage which is lost when the underlying runtime is torn down."""
18006+
18007+
enabled: Optional[bool] = Field(
18008+
default=None,
18009+
description="""Optional. Whether a persistent disk is attached to sandboxes created from this template. Defaults to `false`. This flag lets a template carry (and preserve) disk configuration while keeping the disk detached, so it can be toggled on later without re-specifying the rest of the config. When `false`, the remaining fields in this message are ignored.""",
18010+
)
18011+
mount_path: Optional[str] = Field(
18012+
default=None,
18013+
description="""Optional. The absolute path inside the sandbox container at which the persistent disk is mounted. Defaults to `/workspace` when unset. Ignored when `enabled` is `false`. Only writes beneath this path land on the disk. Writes elsewhere go to the container's writable layer, which counts against the container's ephemeral storage and is lost when the sandbox's runtime is torn down, so this should be the directory the workload actually writes to. Paths that would shadow the container's system directories (for example `/etc`, `/proc`, or `/usr` itself) are rejected.""",
18014+
)
18015+
size_gb: Optional[int] = Field(
18016+
default=None,
18017+
description="""Optional. The size of the persistent disk in GB. Must be non-negative. When `enabled` is `true`, a positive value is required; when unset or zero while enabled, the service applies a default size. Ignored when `enabled` is `false`.""",
18018+
)
18019+
18020+
18021+
class SandboxEnvironmentTemplatePersistentDiskConfigDict(TypedDict, total=False):
18022+
"""Configuration for attaching a persistent disk (PD) to each SandboxEnvironment created from this template. A persistent disk provides durable, per-sandbox block storage whose contents survive across the sandbox lifecycle events that this service supports (e.g. pause/resume), unlike ephemeral local storage which is lost when the underlying runtime is torn down."""
18023+
18024+
enabled: Optional[bool]
18025+
"""Optional. Whether a persistent disk is attached to sandboxes created from this template. Defaults to `false`. This flag lets a template carry (and preserve) disk configuration while keeping the disk detached, so it can be toggled on later without re-specifying the rest of the config. When `false`, the remaining fields in this message are ignored."""
18026+
18027+
mount_path: Optional[str]
18028+
"""Optional. The absolute path inside the sandbox container at which the persistent disk is mounted. Defaults to `/workspace` when unset. Ignored when `enabled` is `false`. Only writes beneath this path land on the disk. Writes elsewhere go to the container's writable layer, which counts against the container's ephemeral storage and is lost when the sandbox's runtime is torn down, so this should be the directory the workload actually writes to. Paths that would shadow the container's system directories (for example `/etc`, `/proc`, or `/usr` itself) are rejected."""
18029+
18030+
size_gb: Optional[int]
18031+
"""Optional. The size of the persistent disk in GB. Must be non-negative. When `enabled` is `true`, a positive value is required; when unset or zero while enabled, the service applies a default size. Ignored when `enabled` is `false`."""
18032+
18033+
18034+
SandboxEnvironmentTemplatePersistentDiskConfigOrDict = Union[
18035+
SandboxEnvironmentTemplatePersistentDiskConfig,
18036+
SandboxEnvironmentTemplatePersistentDiskConfigDict,
18037+
]
18038+
18039+
1800418040
class SandboxEnvironmentTemplate(_common.BaseModel):
1800518041
"""A sandbox environment template."""
1800618042

@@ -18050,6 +18086,12 @@ class SandboxEnvironmentTemplate(_common.BaseModel):
1805018086
default=None,
1805118087
description="""Optional. Immutable. Whether to provision the SandboxEnvironmentTemplate via the GKE TD pool.""",
1805218088
)
18089+
persistent_disk_config: Optional[SandboxEnvironmentTemplatePersistentDiskConfig] = (
18090+
Field(
18091+
default=None,
18092+
description="""Optional. Configuration for attaching a persistent disk (PD) to each SandboxEnvironment created from this template. When unset (or when `enabled` is `false`), sandboxes created from this template are not backed by a persistent disk and rely on ephemeral storage only. See PersistentDiskConfig for details.""",
18093+
)
18094+
)
1805318095

1805418096

1805518097
class SandboxEnvironmentTemplateDict(TypedDict, total=False):
@@ -18089,6 +18131,9 @@ class SandboxEnvironmentTemplateDict(TypedDict, total=False):
1808918131
use_gke_td: Optional[bool]
1809018132
"""Optional. Immutable. Whether to provision the SandboxEnvironmentTemplate via the GKE TD pool."""
1809118133

18134+
persistent_disk_config: Optional[SandboxEnvironmentTemplatePersistentDiskConfigDict]
18135+
"""Optional. Configuration for attaching a persistent disk (PD) to each SandboxEnvironment created from this template. When unset (or when `enabled` is `false`), sandboxes created from this template are not backed by a persistent disk and rely on ephemeral storage only. See PersistentDiskConfig for details."""
18136+
1809218137

1809318138
SandboxEnvironmentTemplateOrDict = Union[
1809418139
SandboxEnvironmentTemplate, SandboxEnvironmentTemplateDict

0 commit comments

Comments
 (0)