Skip to main content

sandbox_environments

Creates, updates, deletes, gets or lists a sandbox_environments resource.

Overview

Namesandbox_environments
TypeResource
Idgoogle.aiplatform.sandbox_environments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The name of the SandboxEnvironment.
connectionInfoobjectOutput only. The connection information of the SandboxEnvironment. (id: GoogleCloudAiplatformV1SandboxEnvironmentConnectionInfo)
createTimestring (google-datetime)Output only. The timestamp when this SandboxEnvironment was created.
displayNamestringRequired. The display name of the SandboxEnvironment.
expireTimestring (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.
latestSandboxEnvironmentSnapshotstringOutput only. The resource name of the latest snapshot taken for this SandboxEnvironment.
ownerstringOptional. 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.
sandboxEnvironmentSnapshotstringOptional. The resource name of the SandboxEnvironmentSnapshot to use for creating this SandboxEnvironment. Format: projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sandboxEnvironmentSnapshots/{sandbox_environment_snapshot}
sandboxEnvironmentTemplatestringOptional. The name of the SandboxEnvironmentTemplate specified in the parent Agent Engine resource that this SandboxEnvironment is created from.
specobjectOptional. The configuration of the SandboxEnvironment. (id: GoogleCloudAiplatformV1SandboxEnvironmentSpec)
statestringOutput only. The runtime state of the SandboxEnvironment. (STATE_UNSPECIFIED, STATE_PROVISIONING, STATE_RUNNING, STATE_DEPROVISIONING, STATE_TERMINATED, STATE_DELETED)
ttlstring (google-duration)Optional. Input only. The TTL for the sandbox environment. The expiration time is computed: now + TTL.
updateTimestring (google-datetime)Output only. The timestamp when this SandboxEnvironment was most recently updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectreasoningEnginesId, sandboxEnvironmentsIdGets details of the specific SandboxEnvironment.
listselectreasoningEnginesIdfilter, pageToken, pageSizeLists SandboxEnvironments in a given reasoning engine.
createinsertreasoningEnginesIdCreates a SandboxEnvironment in a given reasoning engine.
deletedeletereasoningEnginesId, sandboxEnvironmentsIdDeletes the specific SandboxEnvironment.
executeexecreasoningEnginesId, sandboxEnvironmentsIdExecutes using a sandbox environment.
resumeexecreasoningEnginesId, sandboxEnvironmentsIdResumes the specific SandboxEnvironment.
snapshotexecreasoningEnginesId, sandboxEnvironmentsIdSnapshots the specific SandboxEnvironment resource and creates a SandboxEnvironmentSnapshot resource.
pauseexecreasoningEnginesId, sandboxEnvironmentsIdPauses 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.

NameDatatypeDescription
reasoningEnginesIdstring
sandboxEnvironmentsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

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
;

INSERT examples

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
;

DELETE examples

Deletes the specific SandboxEnvironment.

DELETE FROM google.aiplatform.sandbox_environments
WHERE reasoningEnginesId = '{{ reasoningEnginesId }}' --required
AND sandboxEnvironmentsId = '{{ sandboxEnvironmentsId }}' --required
;

Lifecycle Methods

Executes using a sandbox environment.

EXEC google.aiplatform.sandbox_environments.execute
@reasoningEnginesId='{{ reasoningEnginesId }}' --required,
@sandboxEnvironmentsId='{{ sandboxEnvironmentsId }}' --required
@@json=
'{
"inputs": "{{ inputs }}"
}'
;