diff --git a/agentplatform/_genai/types/__init__.py b/agentplatform/_genai/types/__init__.py index 45605224d3..9349833bc4 100644 --- a/agentplatform/_genai/types/__init__.py +++ b/agentplatform/_genai/types/__init__.py @@ -3446,6 +3446,12 @@ "CreateSandboxEnvironmentTemplateConfig", "CreateSandboxEnvironmentTemplateConfigDict", "CreateSandboxEnvironmentTemplateConfigOrDict", + "PSCAutomationConfig", + "PSCAutomationConfigDict", + "PSCAutomationConfigOrDict", + "PrivateServiceConnectConfig", + "PrivateServiceConnectConfigDict", + "PrivateServiceConnectConfigOrDict", "SandboxEnvironmentTemplate", "SandboxEnvironmentTemplateDict", "SandboxEnvironmentTemplateOrDict", @@ -3881,12 +3887,6 @@ "DeployRequestModelConfig", "DeployRequestModelConfigDict", "DeployRequestModelConfigOrDict", - "PSCAutomationConfig", - "PSCAutomationConfigDict", - "PSCAutomationConfigOrDict", - "PrivateServiceConnectConfig", - "PrivateServiceConnectConfigDict", - "PrivateServiceConnectConfigOrDict", "DeployRequestEndpointConfig", "DeployRequestEndpointConfigDict", "DeployRequestEndpointConfigOrDict", @@ -4294,6 +4294,7 @@ "SandboxState", "Protocol", "DefaultContainerCategory", + "PscAutomationState", "PostSnapshotAction", "Framework", "SkillSource", @@ -4302,7 +4303,6 @@ "OpenSourceCategory", "VersionState", "QuotaState", - "PscAutomationState", "FeedbackType", "Encoding", "ColorMap", diff --git a/agentplatform/_genai/types/common.py b/agentplatform/_genai/types/common.py index 500ff27f97..78e93f310e 100644 --- a/agentplatform/_genai/types/common.py +++ b/agentplatform/_genai/types/common.py @@ -348,6 +348,17 @@ class DefaultContainerCategory(_common.CaseInSensitiveEnum): """The default container image for Shell Sandbox.""" +class PscAutomationState(_common.CaseInSensitiveEnum): + """Output only. The state of the PSC service automation.""" + + PSC_AUTOMATION_STATE_UNSPECIFIED = "PSC_AUTOMATION_STATE_UNSPECIFIED" + """Should not be used.""" + PSC_AUTOMATION_STATE_SUCCESSFUL = "PSC_AUTOMATION_STATE_SUCCESSFUL" + """The PSC service automation is successful.""" + PSC_AUTOMATION_STATE_FAILED = "PSC_AUTOMATION_STATE_FAILED" + """The PSC service automation has failed.""" + + class PostSnapshotAction(_common.CaseInSensitiveEnum): """Input only. Action to take on the source SandboxEnvironment after the snapshot is taken. This field is only used in CreateSandboxEnvironmentSnapshotRequest and it is not stored in the resource.""" @@ -452,17 +463,6 @@ class QuotaState(_common.CaseInSensitiveEnum): """User does not have enough accelerator quota for the machine type.""" -class PscAutomationState(_common.CaseInSensitiveEnum): - """Output only. The state of the PSC service automation.""" - - PSC_AUTOMATION_STATE_UNSPECIFIED = "PSC_AUTOMATION_STATE_UNSPECIFIED" - """Should not be used.""" - PSC_AUTOMATION_STATE_SUCCESSFUL = "PSC_AUTOMATION_STATE_SUCCESSFUL" - """The PSC service automation is successful.""" - PSC_AUTOMATION_STATE_FAILED = "PSC_AUTOMATION_STATE_FAILED" - """The PSC service automation has failed.""" - - class FeedbackType(_common.CaseInSensitiveEnum): """The type of the feedback.""" @@ -17589,6 +17589,109 @@ class _CreateSandboxEnvironmentTemplateRequestParametersDict(TypedDict, total=Fa ] +class PSCAutomationConfig(_common.BaseModel): + """PSC config that is used to automatically create PSC endpoints in the user projects.""" + + error_message: Optional[str] = Field( + default=None, + description="""Output only. Error message if the PSC service automation failed.""", + ) + forwarding_rule: Optional[str] = Field( + default=None, + description="""Output only. Forwarding rule created by the PSC service automation.""", + ) + ip_address: Optional[str] = Field( + default=None, + description="""Output only. IP address rule created by the PSC service automation.""", + ) + network: Optional[str] = Field( + default=None, + description="""Required. The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): `projects/{project}/global/networks/{network}`.""", + ) + project_id: Optional[str] = Field( + default=None, + description="""Required. Project id used to create forwarding rule.""", + ) + state: Optional[PscAutomationState] = Field( + default=None, + description="""Output only. The state of the PSC service automation.""", + ) + + +class PSCAutomationConfigDict(TypedDict, total=False): + """PSC config that is used to automatically create PSC endpoints in the user projects.""" + + error_message: Optional[str] + """Output only. Error message if the PSC service automation failed.""" + + forwarding_rule: Optional[str] + """Output only. Forwarding rule created by the PSC service automation.""" + + ip_address: Optional[str] + """Output only. IP address rule created by the PSC service automation.""" + + network: Optional[str] + """Required. The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): `projects/{project}/global/networks/{network}`.""" + + project_id: Optional[str] + """Required. Project id used to create forwarding rule.""" + + state: Optional[PscAutomationState] + """Output only. The state of the PSC service automation.""" + + +PSCAutomationConfigOrDict = Union[PSCAutomationConfig, PSCAutomationConfigDict] + + +class PrivateServiceConnectConfig(_common.BaseModel): + """Represents configuration for private service connect.""" + + enable_private_service_connect: Optional[bool] = Field( + default=None, + description="""Required. If true, expose the IndexEndpoint via private service connect.""", + ) + enable_secure_private_service_connect: Optional[bool] = Field( + default=None, + description="""Optional. If set to true, enable secure private service connect with IAM authorization. Otherwise, private service connect will be done without authorization. Note latency will be slightly increased if authorization is enabled.""", + ) + project_allowlist: Optional[list[str]] = Field( + default=None, + description="""A list of Projects from which the forwarding rule will target the service attachment.""", + ) + psc_automation_configs: Optional[list[PSCAutomationConfig]] = Field( + default=None, + description="""Optional. List of projects and networks where the PSC endpoints will be created. This field is used by Online Inference(Prediction) only.""", + ) + service_attachment: Optional[str] = Field( + default=None, + description="""Output only. The name of the generated service attachment resource. This is only populated if the endpoint is deployed with PrivateServiceConnect.""", + ) + + +class PrivateServiceConnectConfigDict(TypedDict, total=False): + """Represents configuration for private service connect.""" + + enable_private_service_connect: Optional[bool] + """Required. If true, expose the IndexEndpoint via private service connect.""" + + enable_secure_private_service_connect: Optional[bool] + """Optional. If set to true, enable secure private service connect with IAM authorization. Otherwise, private service connect will be done without authorization. Note latency will be slightly increased if authorization is enabled.""" + + project_allowlist: Optional[list[str]] + """A list of Projects from which the forwarding rule will target the service attachment.""" + + psc_automation_configs: Optional[list[PSCAutomationConfigDict]] + """Optional. List of projects and networks where the PSC endpoints will be created. This field is used by Online Inference(Prediction) only.""" + + service_attachment: Optional[str] + """Output only. The name of the generated service attachment resource. This is only populated if the endpoint is deployed with PrivateServiceConnect.""" + + +PrivateServiceConnectConfigOrDict = Union[ + PrivateServiceConnectConfig, PrivateServiceConnectConfigDict +] + + class SandboxEnvironmentTemplate(_common.BaseModel): """A sandbox environment template.""" @@ -17639,6 +17742,10 @@ class SandboxEnvironmentTemplate(_common.BaseModel): default=None, description="""Output only. The timestamp when this SandboxEnvironmentTemplate was most recently updated.""", ) + ingress_control_config: Optional[PrivateServiceConnectConfig] = Field( + default=None, + description="""Optional. The configuration for private ingress (PSC-E) of this template. When set, the sandbox router is exposed privately via a PSC service attachment so VPC-SC customers can connect from their VPC over a private endpoint instead of the public internet. The resulting service attachment is surfaced on `SandboxEnvironment.connection_info.service_attachment`. Only the PSC-E (service-attachment/ingress) portion of `PrivateServiceConnectConfig` applies here: `enable_private_service_connect` and `project_allowlist` (the consumer projects allowed to connect). The nested `psc_interface_config` (PSC-I / egress) is not used for sandbox ingress; sandbox egress is configured via `egress_control_config` instead.""", + ) class SandboxEnvironmentTemplateDict(TypedDict, total=False): @@ -17681,6 +17788,9 @@ class SandboxEnvironmentTemplateDict(TypedDict, total=False): update_time: Optional[datetime.datetime] """Output only. The timestamp when this SandboxEnvironmentTemplate was most recently updated.""" + ingress_control_config: Optional[PrivateServiceConnectConfigDict] + """Optional. The configuration for private ingress (PSC-E) of this template. When set, the sandbox router is exposed privately via a PSC service attachment so VPC-SC customers can connect from their VPC over a private endpoint instead of the public internet. The resulting service attachment is surfaced on `SandboxEnvironment.connection_info.service_attachment`. Only the PSC-E (service-attachment/ingress) portion of `PrivateServiceConnectConfig` applies here: `enable_private_service_connect` and `project_allowlist` (the consumer projects allowed to connect). The nested `psc_interface_config` (PSC-I / egress) is not used for sandbox ingress; sandbox egress is configured via `egress_control_config` instead.""" + SandboxEnvironmentTemplateOrDict = Union[ SandboxEnvironmentTemplate, SandboxEnvironmentTemplateDict @@ -24985,109 +25095,6 @@ class DeployRequestModelConfigDict(TypedDict, total=False): ] -class PSCAutomationConfig(_common.BaseModel): - """PSC config that is used to automatically create PSC endpoints in the user projects.""" - - error_message: Optional[str] = Field( - default=None, - description="""Output only. Error message if the PSC service automation failed.""", - ) - forwarding_rule: Optional[str] = Field( - default=None, - description="""Output only. Forwarding rule created by the PSC service automation.""", - ) - ip_address: Optional[str] = Field( - default=None, - description="""Output only. IP address rule created by the PSC service automation.""", - ) - network: Optional[str] = Field( - default=None, - description="""Required. The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): `projects/{project}/global/networks/{network}`.""", - ) - project_id: Optional[str] = Field( - default=None, - description="""Required. Project id used to create forwarding rule.""", - ) - state: Optional[PscAutomationState] = Field( - default=None, - description="""Output only. The state of the PSC service automation.""", - ) - - -class PSCAutomationConfigDict(TypedDict, total=False): - """PSC config that is used to automatically create PSC endpoints in the user projects.""" - - error_message: Optional[str] - """Output only. Error message if the PSC service automation failed.""" - - forwarding_rule: Optional[str] - """Output only. Forwarding rule created by the PSC service automation.""" - - ip_address: Optional[str] - """Output only. IP address rule created by the PSC service automation.""" - - network: Optional[str] - """Required. The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): `projects/{project}/global/networks/{network}`.""" - - project_id: Optional[str] - """Required. Project id used to create forwarding rule.""" - - state: Optional[PscAutomationState] - """Output only. The state of the PSC service automation.""" - - -PSCAutomationConfigOrDict = Union[PSCAutomationConfig, PSCAutomationConfigDict] - - -class PrivateServiceConnectConfig(_common.BaseModel): - """Represents configuration for private service connect.""" - - enable_private_service_connect: Optional[bool] = Field( - default=None, - description="""Required. If true, expose the IndexEndpoint via private service connect.""", - ) - enable_secure_private_service_connect: Optional[bool] = Field( - default=None, - description="""Optional. If set to true, enable secure private service connect with IAM authorization. Otherwise, private service connect will be done without authorization. Note latency will be slightly increased if authorization is enabled.""", - ) - project_allowlist: Optional[list[str]] = Field( - default=None, - description="""A list of Projects from which the forwarding rule will target the service attachment.""", - ) - psc_automation_configs: Optional[list[PSCAutomationConfig]] = Field( - default=None, - description="""Optional. List of projects and networks where the PSC endpoints will be created. This field is used by Online Inference(Prediction) only.""", - ) - service_attachment: Optional[str] = Field( - default=None, - description="""Output only. The name of the generated service attachment resource. This is only populated if the endpoint is deployed with PrivateServiceConnect.""", - ) - - -class PrivateServiceConnectConfigDict(TypedDict, total=False): - """Represents configuration for private service connect.""" - - enable_private_service_connect: Optional[bool] - """Required. If true, expose the IndexEndpoint via private service connect.""" - - enable_secure_private_service_connect: Optional[bool] - """Optional. If set to true, enable secure private service connect with IAM authorization. Otherwise, private service connect will be done without authorization. Note latency will be slightly increased if authorization is enabled.""" - - project_allowlist: Optional[list[str]] - """A list of Projects from which the forwarding rule will target the service attachment.""" - - psc_automation_configs: Optional[list[PSCAutomationConfigDict]] - """Optional. List of projects and networks where the PSC endpoints will be created. This field is used by Online Inference(Prediction) only.""" - - service_attachment: Optional[str] - """Output only. The name of the generated service attachment resource. This is only populated if the endpoint is deployed with PrivateServiceConnect.""" - - -PrivateServiceConnectConfigOrDict = Union[ - PrivateServiceConnectConfig, PrivateServiceConnectConfigDict -] - - class DeployRequestEndpointConfig(_common.BaseModel): """The endpoint config to use for the deployment."""