Skip to main content

dev_boxes

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

Overview

Namedev_boxes
TypeResource
Idazure.developer_devcenter.dev_boxes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringDisplay name for the Dev Box. Required.
actionStatestringThe current action state of the Dev Box. This is state is based on previous action performed by user.
createdTimestring (date-time)Creation time of this Dev Box.
errorobjectProvisioning or action error details. Populated only for error states.
hardwareProfileobjectInformation about the Dev Box's hardware resources.
hibernateSupportstringIndicates whether hibernate is enabled/disabled or unknown. Known values are: "Enabled", "Disabled", and "OsUnsupported". (Enabled, Disabled, OsUnsupported)
imageReferenceobjectInformation about the image used for this Dev Box.
localAdministratorstringIndicates whether the owner of the Dev Box is a local administrator. Known values are: "Enabled" and "Disabled". (Enabled, Disabled)
locationstringAzure region where this Dev Box is located. This will be the same region as the Virtual Network it is attached to.
osTypestringThe operating system type of this Dev Box. "Windows" (Windows)
poolNamestringThe name of the Dev Box pool this machine belongs to. Required.
powerStatestringThe current power state of the Dev Box. Known values are: "Unknown", "Running", "Deallocated", "PoweredOff", and "Hibernated". (Unknown, Running, Deallocated, PoweredOff, Hibernated)
projectNamestringName of the project this Dev Box belongs to.
provisioningStatestringThe current provisioning state of the Dev Box. Known values are: "Succeeded", "Failed", "Canceled", "Creating", "Deleting", "Updating", "Starting", "Stopping", "Provisioning", "ProvisionedWithWarning", "InGracePeriod", and "NotProvisioned". (Succeeded, Failed, Canceled, Creating, Deleting, Updating, Starting, Stopping, Provisioning, ProvisionedWithWarning, InGracePeriod, NotProvisioned)
storageProfileobjectStorage settings for this Dev Box.
uniqueIdstringA unique identifier for the Dev Box. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
userstringThe AAD object id of the user this Dev Box is assigned to.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_dev_boxselectproject_name, user_id, dev_box_name, endpointGets a Dev Box.
list_dev_boxesselectproject_name, user_id, endpointLists Dev Boxes in the project for a particular user.
create_dev_boxinsertproject_name, user_id, dev_box_name, endpoint, poolNameCreates or replaces a Dev Box.
delete_dev_boxdeleteproject_name, user_id, dev_box_name, endpointDeletes a Dev Box.

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
dev_box_namestringThe name of a Dev Box. Required.
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
project_namestringThe DevCenter Project upon which to execute operations. Required.
user_idstringThe AAD object id of the user. If value is 'me', the identity is taken from the authentication context. Required.

SELECT examples

Gets a Dev Box.

SELECT
name,
actionState,
createdTime,
error,
hardwareProfile,
hibernateSupport,
imageReference,
localAdministrator,
location,
osType,
poolName,
powerState,
projectName,
provisioningState,
storageProfile,
uniqueId,
user
FROM azure.developer_devcenter.dev_boxes
WHERE project_name = '{{ project_name }}' -- required
AND user_id = '{{ user_id }}' -- required
AND dev_box_name = '{{ dev_box_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

INSERT examples

Creates or replaces a Dev Box.

INSERT INTO azure.developer_devcenter.dev_boxes (
poolName,
localAdministrator,
project_name,
user_id,
dev_box_name,
endpoint
)
SELECT
'{{ poolName }}' /* required */,
'{{ localAdministrator }}',
'{{ project_name }}',
'{{ user_id }}',
'{{ dev_box_name }}',
'{{ endpoint }}'
RETURNING
name,
actionState,
createdTime,
error,
hardwareProfile,
hibernateSupport,
imageReference,
localAdministrator,
location,
osType,
poolName,
powerState,
projectName,
provisioningState,
storageProfile,
uniqueId,
user
;

DELETE examples

Deletes a Dev Box.

DELETE FROM azure.developer_devcenter.dev_boxes
WHERE project_name = '{{ project_name }}' --required
AND user_id = '{{ user_id }}' --required
AND dev_box_name = '{{ dev_box_name }}' --required
AND endpoint = '{{ endpoint }}' --required
;