Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions specification/devcenter/DevCenter/DevBox/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,18 @@ union StopOnDisconnectEnableStatus {
string,
}

@doc("Stop on no connect enable or disable status.")
@added(APIVersions.v2024_10_01_preview)
union StopOnNoConnectEnableStatus {
@doc("Stop on no connect is enabled on the Dev Box.")
Enabled: "Enabled",

@doc("Stop on no connect is not enabled on the Dev Box.")
Disabled: "Disabled",

string,
}

@doc("Pool status indicating whether a pool is available to create Dev Boxes.")
union PoolHealthStatus {
@doc("The pool health status is not known.")
Expand Down Expand Up @@ -359,6 +371,10 @@ union DevBoxOperationKind {
@added(APIVersions.v2024_09_01_preview)
RestoreSnapshot: "RestoreSnapshot",

@doc("The operation represents a Dev Box manual snapshot creation.")
@added(APIVersions.v2024_10_01_preview)
CaptureSnapshot: "CaptureSnapshot",

string,
}

Expand All @@ -377,6 +393,18 @@ union DevBoxRepairOutcome {
string,
}

@doc("The type of snapshot.")
@added(APIVersions.v2024_10_01_preview)
union SnapshotType {
@doc("The snapshot type indicates that this is a manually taken snapshot.")
Manual: "Manual",

@doc("The snapshot type indicates that this is an automatically taken snapshot.")
Automatic: "Automatic",

string,
}

@doc("A pool of Dev Boxes.")
@resource("pools")
@parentResource(Project)
Expand Down Expand Up @@ -420,6 +448,10 @@ model Pool {
@doc("Stop on disconnect configuration settings for Dev Boxes created in this pool.")
stopOnDisconnect?: StopOnDisconnectConfiguration;

@doc("Stop on no connect configuration settings for Dev Boxes created in this pool.")
@added(APIVersions.v2024_10_01_preview)
stopOnNoConnect?: StopOnNoConnectConfiguration;

@doc("""
Overall health status of the Pool. Indicates whether or not the Pool is
available to create Dev Boxes.
Expand Down Expand Up @@ -500,6 +532,18 @@ model StopOnDisconnectConfiguration {
gracePeriodMinutes?: int32;
}

@doc("Stop on no connect configuration settings for Dev Boxes created in this pool.")
@added(APIVersions.v2024_10_01_preview)
model StopOnNoConnectConfiguration {
@doc("""
Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.
""")
status: StopOnNoConnectEnableStatus;

@doc("The specified time in minutes to wait before stopping a Dev Box if no connection is made. This will only be present if stop on no connect is enabled.")
gracePeriodMinutes?: int32;
}

alias ScheduleListResult = Azure.Core.Page<Schedule>;

@doc("A Schedule to execute action.")
Expand Down Expand Up @@ -631,6 +675,11 @@ model DevBox {
@visibility("read")
createdTime?: utcDateTime;

@doc("Last time a user connected to this Dev Box, in RFC3339 format.")
@visibility("read")
@added(APIVersions.v2024_10_01_preview)
lastConnectedTime?: utcDateTime;

@doc("Indicates whether the owner of the Dev Box is a local administrator.")
@visibility("read", "create")
localAdministrator?: LocalAdminStatus;
Expand Down Expand Up @@ -803,6 +852,13 @@ model DevBoxRestoreSnapshotOperation extends DevBoxOperation {
kind: DevBoxOperationKind.RestoreSnapshot;
}

@doc("Information about a snapshot creation operation on a Dev Box.")
@added(APIVersions.v2024_10_01_preview)
model DevBoxCaptureSnapshotOperation extends DevBoxOperation {
@doc("The kind of operation that occurred.")
kind: DevBoxOperationKind.CaptureSnapshot;
}

@doc("The Customization Task list result.")
model PagedCustomizationTaskDefinition
is Azure.Core.Page<CustomizationTaskDefinition>;
Expand Down Expand Up @@ -981,4 +1037,14 @@ model DevBoxSnapshot {
@doc("The datetime that the snapshot was created, in RFC3339 format.")
@visibility("read")
createdTime: utcDateTime;

@doc("The datetime when the snapshot expires, will only be shown for a manual snapshot, in RFC3339 format.")
@visibility("read")
@added(APIVersions.v2024_10_01_preview)
expirationTime?: utcDateTime;

@doc("The type of the snapshot indicates whether it is manual or automatic.")
@visibility("read")
@added(APIVersions.v2024_10_01_preview)
snapshotType: SnapshotType;
}
11 changes: 11 additions & 0 deletions specification/devcenter/DevCenter/DevBox/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -439,4 +439,15 @@ interface DevBoxes {
},
OperationStatus
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Replacing Status Monitor"
@doc("Captures a manual snapshot of the Dev Box.")
@added(APIVersions.v2024_10_01_preview)
@pollingOperation(OperationStatuses.get)
@action("captureSnapshot")
captureSnapshotDevBox is DevCenterOps.LongRunningResourceAction<
DevBox,
{},
OperationStatus
>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"title": "Attempts to capture the manual snapshot for the Dev Box.",
"operationId": "DevBoxes_CaptureSnapshotDevBox",
"parameters": {
"api-version": "2024-10-01-preview",
"endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com",
"projectName": "myProject",
"userId": "me",
"devBoxName": "MyDevBox"
},
"responses": {
"202": {
"headers": {
"Location": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/operationstatuses/786a823c-8037-48ab-89b8-8599901e67d0",
"Operation-Location": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/operationstatuses/786a823c-8037-48ab-89b8-8599901e67d0"
},
"body": {
"id": "/projects/myProject/operationstatuses/786a823c-8037-48ab-89b8-8599901e67d0",
"name": "786a823c-8037-48ab-89b8-8599901e67d0",
"status": "Running",
"startTime": "2023-02-01T12:43:54.122Z"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"title": "Applies customizations to the Dev Box.",
"operationId": "DevBoxes_CreateCustomizationGroup",
"parameters": {
"api-version": "2024-10-01-preview",
"endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/",
"projectName": "myProject",
"userId": "me",
"devBoxName": "MyDevBox",
"customizationGroupName": "Provisioning",
"body": {
"tasks": [
{
"name": "catalogName/choco",
"displayName": "Install VS Code",
"parameters": {
"packageName": "vscode",
"packageVersion": "1.0.0"
}
},
{
"name": "catalogName/write-to-file",
"runAs": "User"
}
]
}
},
"responses": {
"200": {
"body": {
"name": "Provisioning",
"uri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/b08e39b4-2ac6-4465-a35e-48322efb0f98/devboxes/MyDevBox/customizationgroups/Provisioning",
"tasks": [
{
"id": "a9202018-fb6a-4007-8b52-26d7c6d1c1fb",
"name": "catalogName/choco",
"displayName": "Install VS Code",
"status": "NotStarted",
"parameters": {
"packageName": "vscode",
"packageVersion": "1.0.0"
},
"logUri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/b08e39b4-2ac6-4465-a35e-48322efb0f98/devboxes/MyDevBox/customizationgroups/Provisioning/logs/a9202018-fb6a-4007-8b52-26d7c6d1c1fb"
},
{
"id": "91835dc0-ef5a-4f58-9e3a-099aea8481f4",
"name": "catalogName/write-to-file",
"runAs": "User",
"status": "NotStarted",
"logUri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/b08e39b4-2ac6-4465-a35e-48322efb0f98/devboxes/MyDevBox/customizationgroups/Provisioning/logs/91835dc0-ef5a-4f58-9e3a-099aea8481f4"
}
],
"status": "NotStarted"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"title": "Creates or replaces a Dev Box.",
"operationId": "DevBoxes_CreateDevBox",
"parameters": {
"api-version": "2024-10-01-preview",
"endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com",
"projectName": "myProject",
"userId": "me",
"devBoxName": "MyDevBox",
"body": {
"poolName": "LargeDevWorkStationPool"
}
},
"responses": {
"200": {
"body": {
"uri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/b08e39b4-2ac6-4465-a35e-48322efb0f98/devboxes/MyDevBox",
"name": "MyDevBox",
"provisioningState": "Succeeded",
"projectName": "ContosoProject",
"poolName": "LargeDevWorkStationPool",
"location": "centralus",
"osType": "Windows",
"user": "b08e39b4-2ac6-4465-a35e-48322efb0f98",
"hardwareProfile": {
"vCPUs": 8,
"memoryGB": 32
},
"storageProfile": {
"osDisk": {
"diskSizeGB": 1024
}
},
"hibernateSupport": "Enabled",
"imageReference": {
"name": "DevImage",
"version": "1.0.0",
"publishedDate": "2022-03-01T00:13:23.323Z"
}
}
},
"201": {
"headers": {
"Location": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/operationstatuses/786a823c-8037-48ab-89b8-8599901e67d0",
"Operation-Location": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/operationstatuses/786a823c-8037-48ab-89b8-8599901e67d0"
},
"body": {
"uri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/b08e39b4-2ac6-4465-a35e-48322efb0f98/devboxes/MyDevBox",
"name": "MyDevBox",
"provisioningState": "Creating",
"projectName": "ContosoProject",
"poolName": "LargeDevWorkStationPool",
"location": "centralus",
"osType": "Windows",
"user": "b08e39b4-2ac6-4465-a35e-48322efb0f98",
"hardwareProfile": {
"vCPUs": 8,
"memoryGB": 32
},
"storageProfile": {
"osDisk": {
"diskSizeGB": 1024
}
},
"hibernateSupport": "Enabled",
"imageReference": {
"name": "DevImage",
"version": "1.0.0",
"publishedDate": "2022-03-01T00:13:23.323Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"title": "Delays the occurrence of an action.",
"operationId": "DevBoxes_DelayAction",
"parameters": {
"api-version": "2024-10-01-preview",
"endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com",
"projectName": "myProject",
"userId": "me",
"devBoxName": "myDevBox",
"actionName": "schedule-default",
"until": "2022-09-30T17:00:00Z"
},
"responses": {
"200": {
"body": {
"uri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/b08e39b4-2ac6-4465-a35e-48322efb0f98/devboxes/MyDevBox/actions/schedule-default",
"name": "schedule-default",
"actionType": "Stop",
"sourceUri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/pools/myPool/schedules/default",
"sourceId": "/projects/myProject/pools/myPool/schedules/default",
"sourceType": "Schedule",
"suspendedUntil": "2022-09-30T17:00:00Z",
"next": {
"scheduledTime": "2022-09-30T17:00:00Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"title": "Delays all actions.",
"operationId": "DevBoxes_DelayActions",
"parameters": {
"api-version": "2024-10-01-preview",
"endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com",
"projectName": "myProject",
"userId": "me",
"devBoxName": "myDevBox",
"until": "2022-09-30T17:00:00Z"
},
"responses": {
"200": {
"body": {
"value": [
{
"uri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/b08e39b4-2ac6-4465-a35e-48322efb0f98/devboxes/MyDevBox/actions/schedule-default",
"name": "schedule-default",
"result": "Succeeded",
"action": {
"uri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/b08e39b4-2ac6-4465-a35e-48322efb0f98/devboxes/MyDevBox/actions/schedule-default",
"name": "schedule-default",
"actionType": "Stop",
"sourceId": "/projects/myProject/pools/myPool/schedules/default",
"sourceUri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/pools/myPool/schedules/default",
"sourceType": "Schedule",
"suspendedUntil": "2022-09-30T17:00:00Z",
"next": {
"scheduledTime": "2022-09-30T17:00:00Z"
}
}
},
{
"uri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/b08e39b4-2ac6-4465-a35e-48322efb0f98/devboxes/MyDevBox/actions/idle-hibernateondisconnect",
"name": "idle-hibernateondisconnect",
"result": "Succeeded",
"action": {
"uri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/b08e39b4-2ac6-4465-a35e-48322efb0f98/devboxes/MyDevBox/actions/idle-hibernateondisconnect",
"name": "idle-hibernateondisconnect",
"actionType": "Stop",
"sourceId": "/projects/myProject/pools/myPool",
"sourceUri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/pools/myPool",
"sourceType": "Pool",
"suspendedUntil": "2022-09-30T17:00:00Z"
}
}
]
}
}
}
}
Loading