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
getselectprojectsId, locationsId, reasoningEnginesId, sandboxEnvironmentsIdGets details of the specific SandboxEnvironment.
listselectprojectsId, locationsId, reasoningEnginesIdfilter, pageSize, pageTokenLists SandboxEnvironments in a given reasoning engine.
createinsertprojectsId, locationsId, reasoningEnginesIdCreates a SandboxEnvironment in a given reasoning engine.
deletedeleteprojectsId, locationsId, reasoningEnginesId, sandboxEnvironmentsIdDeletes the specific SandboxEnvironment.
executeexecprojectsId, locationsId, reasoningEnginesId, sandboxEnvironmentsIdExecutes using a sandbox environment.
pauseexecprojectsId, locationsId, reasoningEnginesId, sandboxEnvironmentsIdPauses the specific SandboxEnvironment.
resumeexecprojectsId, locationsId, reasoningEnginesId, sandboxEnvironmentsIdResumes the specific SandboxEnvironment.
snapshotexecprojectsId, locationsId, reasoningEnginesId, sandboxEnvironmentsIdSnapshots the specific SandboxEnvironment resource and creates a SandboxEnvironmentSnapshot resource.

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
locationsIdstring
projectsIdstring
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 projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND reasoningEnginesId = '{{ reasoningEnginesId }}' -- required
AND sandboxEnvironmentsId = '{{ sandboxEnvironmentsId }}' -- required
;

INSERT examples​

Creates a SandboxEnvironment in a given reasoning engine.

INSERT INTO google.aiplatform.sandbox_environments (
data__displayName,
data__expireTime,
data__name,
data__owner,
data__sandboxEnvironmentSnapshot,
data__sandboxEnvironmentTemplate,
data__spec,
data__ttl,
projectsId,
locationsId,
reasoningEnginesId
)
SELECT
'{{ displayName }}',
'{{ expireTime }}',
'{{ name }}',
'{{ owner }}',
'{{ sandboxEnvironmentSnapshot }}',
'{{ sandboxEnvironmentTemplate }}',
'{{ spec }}',
'{{ ttl }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ reasoningEnginesId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples​

Deletes the specific SandboxEnvironment.

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

Lifecycle Methods​

Executes using a sandbox environment.

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