sandbox_environments
Creates, updates, deletes, gets or lists a sandbox_environments resource.
Overview
| Name | sandbox_environments |
| Type | Resource |
| Id | google.aiplatform.sandbox_environments |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The name of the SandboxEnvironment. |
connectionInfo | object | Output only. The connection information of the SandboxEnvironment. (id: GoogleCloudAiplatformV1SandboxEnvironmentConnectionInfo) |
createTime | string (google-datetime) | Output only. The timestamp when this SandboxEnvironment was created. |
displayName | string | Required. The display name of the SandboxEnvironment. |
expireTime | string (google-datetime) | Optional. Timestamp in UTC of when this SandboxEnvironment is considered expired. This is always provided on output, regardless of what expiration was sent on input. |
latestSandboxEnvironmentSnapshot | string | Output only. The resource name of the latest snapshot taken for this SandboxEnvironment. |
owner | string | Optional. Owner information for this sandbox environment. A Sandbox can only be restored from a snapshot that belongs to the same owner. If not set, sandbox will be created as the default owner. |
sandboxEnvironmentSnapshot | string | Optional. The resource name of the SandboxEnvironmentSnapshot to use for creating this SandboxEnvironment. Format: projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sandboxEnvironmentSnapshots/{sandbox_environment_snapshot} |
sandboxEnvironmentTemplate | string | Optional. The name of the SandboxEnvironmentTemplate specified in the parent Agent Engine resource that this SandboxEnvironment is created from. |
spec | object | Optional. The configuration of the SandboxEnvironment. (id: GoogleCloudAiplatformV1SandboxEnvironmentSpec) |
state | string | Output only. The runtime state of the SandboxEnvironment. (STATE_UNSPECIFIED, STATE_PROVISIONING, STATE_RUNNING, STATE_DEPROVISIONING, STATE_TERMINATED, STATE_DELETED) |
ttl | string (google-duration) | Optional. Input only. The TTL for the sandbox environment. The expiration time is computed: now + TTL. |
updateTime | string (google-datetime) | Output only. The timestamp when this SandboxEnvironment was most recently updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The name of the SandboxEnvironment. |
connectionInfo | object | Output only. The connection information of the SandboxEnvironment. (id: GoogleCloudAiplatformV1SandboxEnvironmentConnectionInfo) |
createTime | string (google-datetime) | Output only. The timestamp when this SandboxEnvironment was created. |
displayName | string | Required. The display name of the SandboxEnvironment. |
expireTime | string (google-datetime) | Optional. Timestamp in UTC of when this SandboxEnvironment is considered expired. This is always provided on output, regardless of what expiration was sent on input. |
latestSandboxEnvironmentSnapshot | string | Output only. The resource name of the latest snapshot taken for this SandboxEnvironment. |
owner | string | Optional. Owner information for this sandbox environment. A Sandbox can only be restored from a snapshot that belongs to the same owner. If not set, sandbox will be created as the default owner. |
sandboxEnvironmentSnapshot | string | Optional. The resource name of the SandboxEnvironmentSnapshot to use for creating this SandboxEnvironment. Format: projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sandboxEnvironmentSnapshots/{sandbox_environment_snapshot} |
sandboxEnvironmentTemplate | string | Optional. The name of the SandboxEnvironmentTemplate specified in the parent Agent Engine resource that this SandboxEnvironment is created from. |
spec | object | Optional. The configuration of the SandboxEnvironment. (id: GoogleCloudAiplatformV1SandboxEnvironmentSpec) |
state | string | Output only. The runtime state of the SandboxEnvironment. (STATE_UNSPECIFIED, STATE_PROVISIONING, STATE_RUNNING, STATE_DEPROVISIONING, STATE_TERMINATED, STATE_DELETED) |
ttl | string (google-duration) | Optional. Input only. The TTL for the sandbox environment. The expiration time is computed: now + TTL. |
updateTime | string (google-datetime) | Output only. The timestamp when this SandboxEnvironment was most recently updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | reasoningEnginesId, sandboxEnvironmentsId | Gets details of the specific SandboxEnvironment. | |
list | select | reasoningEnginesId | filter, pageToken, pageSize | Lists SandboxEnvironments in a given reasoning engine. |
create | insert | reasoningEnginesId | Creates a SandboxEnvironment in a given reasoning engine. | |
delete | delete | reasoningEnginesId, sandboxEnvironmentsId | Deletes the specific SandboxEnvironment. | |
execute | exec | reasoningEnginesId, sandboxEnvironmentsId | Executes using a sandbox environment. | |
resume | exec | reasoningEnginesId, sandboxEnvironmentsId | Resumes the specific SandboxEnvironment. | |
snapshot | exec | reasoningEnginesId, sandboxEnvironmentsId | Snapshots the specific SandboxEnvironment resource and creates a SandboxEnvironmentSnapshot resource. | |
pause | exec | reasoningEnginesId, sandboxEnvironmentsId | Pauses the specific SandboxEnvironment. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
reasoningEnginesId | string | |
sandboxEnvironmentsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
Gets details of the specific SandboxEnvironment.
SELECT
name,
connectionInfo,
createTime,
displayName,
expireTime,
latestSandboxEnvironmentSnapshot,
owner,
sandboxEnvironmentSnapshot,
sandboxEnvironmentTemplate,
spec,
state,
ttl,
updateTime
FROM google.aiplatform.sandbox_environments
WHERE reasoningEnginesId = '{{ reasoningEnginesId }}' -- required
AND sandboxEnvironmentsId = '{{ sandboxEnvironmentsId }}' -- required
;
Lists SandboxEnvironments in a given reasoning engine.
SELECT
name,
connectionInfo,
createTime,
displayName,
expireTime,
latestSandboxEnvironmentSnapshot,
owner,
sandboxEnvironmentSnapshot,
sandboxEnvironmentTemplate,
spec,
state,
ttl,
updateTime
FROM google.aiplatform.sandbox_environments
WHERE reasoningEnginesId = '{{ reasoningEnginesId }}' -- required
AND filter = '{{ filter }}'
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- create
- Manifest
Creates a SandboxEnvironment in a given reasoning engine.
INSERT INTO google.aiplatform.sandbox_environments (
data__ttl,
data__owner,
data__displayName,
data__sandboxEnvironmentSnapshot,
data__spec,
data__name,
data__expireTime,
data__sandboxEnvironmentTemplate,
reasoningEnginesId
)
SELECT
'{{ ttl }}',
'{{ owner }}',
'{{ displayName }}',
'{{ sandboxEnvironmentSnapshot }}',
'{{ spec }}',
'{{ name }}',
'{{ expireTime }}',
'{{ sandboxEnvironmentTemplate }}',
'{{ reasoningEnginesId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: sandbox_environments
props:
- name: reasoningEnginesId
value: "{{ reasoningEnginesId }}"
description: Required parameter for the sandbox_environments resource.
- name: ttl
value: "{{ ttl }}"
description: |
Optional. Input only. The TTL for the sandbox environment. The expiration time is computed: now + TTL.
- name: owner
value: "{{ owner }}"
description: |
Optional. Owner information for this sandbox environment. A Sandbox can only be restored from a snapshot that belongs to the same owner. If not set, sandbox will be created as the default owner.
- name: displayName
value: "{{ displayName }}"
description: |
Required. The display name of the SandboxEnvironment.
- name: sandboxEnvironmentSnapshot
value: "{{ sandboxEnvironmentSnapshot }}"
description: |
Optional. The resource name of the SandboxEnvironmentSnapshot to use for creating this SandboxEnvironment. Format: `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sandboxEnvironmentSnapshots/{sandbox_environment_snapshot}`
- name: spec
description: |
Optional. The configuration of the SandboxEnvironment.
value:
codeExecutionEnvironment:
codeLanguage: "{{ codeLanguage }}"
machineConfig: "{{ machineConfig }}"
- name: name
value: "{{ name }}"
description: |
Identifier. The name of the SandboxEnvironment.
- name: expireTime
value: "{{ expireTime }}"
description: |
Optional. Timestamp in UTC of when this SandboxEnvironment is considered expired. This is *always* provided on output, regardless of what `expiration` was sent on input.
- name: sandboxEnvironmentTemplate
value: "{{ sandboxEnvironmentTemplate }}"
description: |
Optional. The name of the SandboxEnvironmentTemplate specified in the parent Agent Engine resource that this SandboxEnvironment is created from.
DELETE examples
- delete
Deletes the specific SandboxEnvironment.
DELETE FROM google.aiplatform.sandbox_environments
WHERE reasoningEnginesId = '{{ reasoningEnginesId }}' --required
AND sandboxEnvironmentsId = '{{ sandboxEnvironmentsId }}' --required
;
Lifecycle Methods
- execute
- resume
- snapshot
- pause
Executes using a sandbox environment.
EXEC google.aiplatform.sandbox_environments.execute
@reasoningEnginesId='{{ reasoningEnginesId }}' --required,
@sandboxEnvironmentsId='{{ sandboxEnvironmentsId }}' --required
@@json=
'{
"inputs": "{{ inputs }}"
}'
;
Resumes the specific SandboxEnvironment.
EXEC google.aiplatform.sandbox_environments.resume
@reasoningEnginesId='{{ reasoningEnginesId }}' --required,
@sandboxEnvironmentsId='{{ sandboxEnvironmentsId }}' --required
;
Snapshots the specific SandboxEnvironment resource and creates a SandboxEnvironmentSnapshot resource.
EXEC google.aiplatform.sandbox_environments.snapshot
@reasoningEnginesId='{{ reasoningEnginesId }}' --required,
@sandboxEnvironmentsId='{{ sandboxEnvironmentsId }}' --required
@@json=
'{
"expireTime": "{{ expireTime }}",
"name": "{{ name }}",
"sourceSandboxEnvironment": "{{ sourceSandboxEnvironment }}",
"displayName": "{{ displayName }}",
"postSnapshotAction": "{{ postSnapshotAction }}",
"owner": "{{ owner }}",
"ttl": "{{ ttl }}"
}'
;
Pauses the specific SandboxEnvironment.
EXEC google.aiplatform.sandbox_environments.pause
@reasoningEnginesId='{{ reasoningEnginesId }}' --required,
@sandboxEnvironmentsId='{{ sandboxEnvironmentsId }}' --required
;