diff --git a/specification/devcenter/DevCenter/DevBox/models.tsp b/specification/devcenter/DevCenter/DevBox/models.tsp new file mode 100644 index 000000000000..b7cc2837fcc1 --- /dev/null +++ b/specification/devcenter/DevCenter/DevBox/models.tsp @@ -0,0 +1,474 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "../shared/models.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace DevCenterService; + +@doc("The operating system type.") +union OsType { + @doc("The Windows operating system.") Windows: "Windows", + string, +} + +@doc("Indicates whether hibernate is supported and enabled, disabled, or unsupported by the operating system. Unknown hibernate support is represented as null.") +union HibernateSupport { + @doc("Hibernate is enabled.") Enabled: "Enabled", + @doc("Hibernate is not enabled.") Disabled: "Disabled", + + @doc("Hibernate is not supported by the operating system.") + OsUnsupported: "OsUnsupported", + + string, +} + +@doc("Indicates whether owners of Dev Boxes in a pool are local administrators on the Dev Boxes.") +union LocalAdminStatus { + @doc("Owners of Dev Boxes in the pool are local administrators on the Dev Boxes.") + Enabled: "Enabled", + + @doc("Owners of Dev Boxes in the pool are not local administrators on the Dev Boxes.") + Disabled: "Disabled", + + string, +} + +@doc("Indicates the provisioning state of the Dev Box.") +union DevBoxProvisioningState { + @doc("Dev Box was successfully provisioned") Succeeded: "Succeeded", + @doc("Dev Box failed to provision") Failed: "Failed", + @doc("Dev Box provision was canceled") Canceled: "Canceled", + @doc("Dev Box is being created") Creating: "Creating", + @doc("Dev Box is being deleted") Deleting: "Deleting", + @doc("Dev Box is updating") Updating: "Updating", + @doc("Dev Box is starting") Starting: "Starting", + @doc("Dev Box is stopping") Stopping: "Stopping", + @doc("Dev Box is provisioning") Provisioning: "Provisioning", + + @doc("Dev Box was provisioned with warning") + ProvisionedWithWarning: "ProvisionedWithWarning", + + @doc("Dev Box is in grace period") InGracePeriod: "InGracePeriod", + @doc("Dev Box is not provisioned") NotProvisioned: "NotProvisioned", + string, +} + +@doc("Indicates the Dev Box compute.") +union SkuName { + @doc("Intel, 8 vCPU, 32 GB RAM, 256 GB Storage") + general_i_8c32gb256ssd_v2: "general_i_8c32gb256ssd_v2", + + @doc("Intel, 8 vCPU, 32 GB RAM, 512 GB Storage") + general_i_8c32gb512ssd_v2: "general_i_8c32gb512ssd_v2", + + @doc("Intel, 8 vCPU, 32 GB RAM, 1024 GB Storage") + general_i_8c32gb1024ssd_v2: "general_i_8c32gb1024ssd_v2", + + @doc("Intel, 8 vCPU, 32 GB RAM, 2048 GB Storage") + general_i_8c32gb2048ssd_v2: "general_i_8c32gb2048ssd_v2", + + @doc("Intel, 16 vCPU, 64 GB RAM, 256 GB Storage") + general_i_16c64gb256ssd_v2: "general_i_16c64gb256ssd_v2", + + @doc("Intel, 16 vCPU, 64 GB RAM, 512 GB Storage") + general_i_16c64gb512ssd_v2: "general_i_16c64gb512ssd_v2", + + @doc("Intel, 16 vCPU, 64 GB RAM, 1024 GB Storage") + general_i_16c64gb1024ssd_v2: "general_i_16c64gb1024ssd_v2", + + @doc("Intel, 16 vCPU, 64 GB RAM, 2048 GB Storage") + general_i_16c64gb2048ssd_v2: "general_i_16c64gb2048ssd_v2", + + @doc("Intel, 32 vCPU, 128 GB RAM, 512 GB Storage") + general_i_32c128gb512ssd_v2: "general_i_32c128gb512ssd_v2", + + @doc("Intel, 32 vCPU, 128 GB RAM, 1024 GB Storage") + general_i_32c128gb1024ssd_v2: "general_i_32c128gb1024ssd_v2", + + @doc("Intel, 32 vCPU, 128 GB RAM, 2048 GB Storage") + general_i_32c128gb2048ssd_v2: "general_i_32c128gb2048ssd_v2", + + @doc("AMD, 8 vCPU, 32 GB RAM, 256 GB Storage") + general_a_8c32gb256ssd_v2: "general_a_8c32gb256ssd_v2", + + @doc("AMD, 8 vCPU, 32 GB RAM, 512 GB Storage") + general_a_8c32gb512ssd_v2: "general_a_8c32gb512ssd_v2", + + @doc("AMD, 8 vCPU, 32 GB RAM, 1024 GB Storage") + general_a_8c32gb1024ssd_v2: "general_a_8c32gb1024ssd_v2", + + @doc("AMD, 8 vCPU, 32 GB RAM, 2048 GB Storage") + general_a_8c32gb2048ssd_v2: "general_a_8c32gb2048ssd_v2", + + @doc("AMD, 16 vCPU, 64 GB RAM, 256 GB Storage") + general_a_16c64gb256ssd_v2: "general_a_16c64gb256ssd_v2", + + @doc("AMD, 16 vCPU, 64 GB RAM, 512 GB Storage") + general_a_16c64gb512ssd_v2: "general_a_16c64gb512ssd_v2", + + @doc("AMD, 16 vCPU, 64 GB RAM, 1024 GB Storage") + general_a_16c64gb1024ssd_v2: "general_a_16c64gb1024ssd_v2", + + @doc("AMD, 16 vCPU, 64 GB RAM, 2048 GB Storage") + general_a_16c64gb2048ssd_v2: "general_a_16c64gb2048ssd_v2", + + @doc("AMD, 32 vCPU, 128 GB RAM, 512 GB Storage") + general_a_32c128gb512ssd_v2: "general_a_32c128gb512ssd_v2", + + @doc("AMD, 32 vCPU, 128 GB RAM, 1024 GB Storage") + general_a_32c128gb1024ssd_v2: "general_a_32c128gb1024ssd_v2", + + @doc("AMD, 32 vCPU, 128 GB RAM, 2048 GB Storage") + general_a_32c128gb2048ssd_v2: "general_a_32c128gb2048ssd_v2", + + string, +} + +@doc("Indicates whether the feature to stop the devbox on disconnect once the grace period has lapsed is enabled.") +union StopOnDisconnectEnableStatus { + @doc("Stop on disconnect is enabled on the Dev Box.") Enabled: "Enabled", + + @doc("Stop on disconnect 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.") Unknown: "Unknown", + + @doc("The pool health status waiting for health checks to run.") + Pending: "Pending", + + @doc("The pool health status is healthy.") Healthy: "Healthy", + @doc("The pool health status has one or more warnings.") Warning: "Warning", + @doc("The pool health status is not healthy.") Unhealthy: "Unhealthy", + string, +} + +@doc("The supported types for a scheduled task.") +union ScheduledType { + @doc("The scheduled task will stop impacted Dev Boxes.") + StopDevBox: "StopDevBox", + + string, +} + +@doc("The frequency of task execution.") +union ScheduledFrequency { + @doc("The scheduled task will run every day.") Daily: "Daily", + string, +} + +@doc("The power states of a Dev Box.") +union PowerState { + @doc("The Dev Box power state is not known.") Unknown: "Unknown", + @doc("The Dev Box is running.") Running: "Running", + @doc("The Dev Box is deallocated.") Deallocated: "Deallocated", + @doc("The Dev Box is powered off.") PoweredOff: "PoweredOff", + @doc("The Dev Box is hibernated.") Hibernated: "Hibernated", + string, +} + +@doc("The type of action which will take place on a Dev Box.") +union DevBoxActionType { + @doc("The action will stop the Dev Box.") Stop: "Stop", + string, +} + +@doc("The result of the delay operation on this action.") +union DevBoxActionDelayResultStatus { + @doc("The delay operation succeeded.") Succeeded: "Succeeded", + @doc("The delay operation failed.") Failed: "Failed", + string, +} + +@doc("A pool of Dev Boxes.") +@resource("pools") +@parentResource(Project) +model Pool { + @key("poolName") + @visibility("read") + @doc("Pool name") + name: string; + + @doc("Azure region where Dev Boxes in the pool are located") + location: Azure.Core.azureLocation; + + @doc("The operating system type of Dev Boxes in this pool") + osType?: OsType; + + @doc("Hardware settings for the Dev Boxes created in this pool") + hardwareProfile?: HardwareProfile; + + @doc("Indicates whether hibernate is enabled/disabled or unknown.") + hibernateSupport?: HibernateSupport; + + @doc("Storage settings for Dev Box created in this pool") + storageProfile?: StorageProfile; + + @doc("Image settings for Dev Boxes create in this pool") + imageReference?: ImageReference; + + @doc(""" +Indicates whether owners of Dev Boxes in this pool are local administrators on +the Dev Boxes. +""") + localAdministrator?: LocalAdminStatus; + + @doc("Stop on disconnect configuration settings for Dev Boxes created in this pool.") + stopOnDisconnect?: StopOnDisconnectConfiguration; + + @doc(""" +Overall health status of the Pool. Indicates whether or not the Pool is +available to create Dev Boxes. +""") + healthStatus: PoolHealthStatus; +} + +@doc("Hardware specifications for the Dev Box.") +model HardwareProfile { + @doc("The name of the SKU") + @visibility("read") + skuName?: SkuName; + + #suppress "@azure-tools/typespec-azure-core/casing-style" "this represents the case-sensitive wire format" + @doc("The number of vCPUs available for the Dev Box.") + @visibility("read") + vCPUs?: int32; + + #suppress "@azure-tools/typespec-azure-core/casing-style" "this represents the case-sensitive wire format" + @doc("The amount of memory available for the Dev Box.") + @visibility("read") + memoryGB?: int32; +} + +@doc("Storage settings for the Dev Box's disks") +model StorageProfile { + @doc("Settings for the operating system disk.") + osDisk?: OsDisk; +} + +@doc("Settings for the operating system disk.") +model OsDisk { + #suppress "@azure-tools/typespec-azure-core/casing-style" "this represents the case-sensitive wire format" + @doc("The size of the OS Disk in gigabytes.") + @visibility("read") + diskSizeGB?: int32; +} + +@doc("Specifies information about the image used") +model ImageReference { + @doc("The name of the image used.") + @visibility("read") + name?: string; + + @doc("The version of the image.") + @visibility("read") + version?: string; + + @doc("The operating system of the image.") + @visibility("read") + operatingSystem?: string; + + @doc("The operating system build number of the image.") + @visibility("read") + osBuildNumber?: string; + + @doc("The datetime that the backing image version was published.") + @visibility("read") + publishedDate?: utcDateTime; +} + +@doc("Stop on disconnect configuration settings for Dev Boxes created in this pool.") +model StopOnDisconnectConfiguration { + @doc(""" +Indicates whether the feature to stop the devbox on disconnect once the grace +period has lapsed is enabled. +""") + status: StopOnDisconnectEnableStatus; + + @doc(""" +The specified time in minutes to wait before stopping a Dev Box once disconnect +is detected. +""") + gracePeriodMinutes?: int32; +} + +@doc("A Schedule to execute action.") +@resource("schedules") +@parentResource(Pool) +model Schedule { + @key("scheduleName") + @visibility("read") + @doc("Display name for the Schedule") + name: string; + + @doc("Supported type this scheduled task represents.") + type: ScheduledType; + + @doc("The frequency of this scheduled task.") + frequency: ScheduledFrequency; + + @doc("The target time to trigger the action. The format is HH:MM.") + //no build in time type matches HH:MM time format + time: string; + + @doc("The IANA timezone id at which the schedule should execute.") + timeZone: string; +} + +@doc("The Dev Box list result") +model DevBoxListResult is Azure.Core.Page; + +@doc("A Dev Box") +@resource("devboxes") +@parentResource(User) +model DevBox { + @key("devBoxName") + @doc("Display name for the Dev Box") + @minLength(3) + @maxLength(63) + @pattern("^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$") + @visibility("read") + name: string; + + @doc("Name of the project this Dev Box belongs to") + @visibility("read") + projectName?: string; + + @doc("The name of the Dev Box pool this machine belongs to.") + @minLength(3) + @maxLength(63) + @pattern("^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$") + @visibility("read", "create") + poolName: string; + + @doc("Indicates whether hibernate is enabled/disabled or unknown.") + @visibility("read") + hibernateSupport?: HibernateSupport; + + @doc("The current provisioning state of the Dev Box.") + @visibility("read") + provisioningState?: DevBoxProvisioningState; + + @doc(""" +The current action state of the Dev Box. This is state is based on previous +action performed by user. +""") + @visibility("read") + actionState?: string; + + @doc("The current power state of the Dev Box.") + @visibility("read") + powerState?: PowerState; + + @doc(""" +A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. +00000000-0000-0000-0000-000000000000). +""") + @visibility("read") + uniqueId?: Azure.Core.uuid; + + @doc("Provisioning or action error details. Populated only for error states.") + @visibility("read") + error?: Azure.Core.Foundations.Error; + + @doc(""" +Azure region where this Dev Box is located. This will be the same region as the +Virtual Network it is attached to. +""") + @visibility("read") + location?: Azure.Core.azureLocation; + + @doc("The operating system type of this Dev Box.") + @visibility("read") + osType?: OsType; + + @doc("The AAD object id of the user this Dev Box is assigned to.") + @visibility("read") + user?: Azure.Core.uuid; + + @doc("Information about the Dev Box's hardware resources") + @visibility("read") + hardwareProfile?: HardwareProfile; + + @doc("Storage settings for this Dev Box") + @visibility("read") + storageProfile?: StorageProfile; + + @doc("Information about the image used for this Dev Box") + @visibility("read") + imageReference?: ImageReference; + + @doc("Creation time of this Dev Box") + @visibility("read") + createdTime?: utcDateTime; + + @doc("Indicates whether the owner of the Dev Box is a local administrator.") + @visibility("read", "create") + localAdministrator?: LocalAdminStatus; +} + +@doc("Provides remote connection information for a Dev Box.") +model RemoteConnection { + @doc("URL to open a browser based RDP session.") + webUrl?: url; + + @doc("Link to open a Remote Desktop session.") + rdpConnectionUrl?: url; +} + +@doc("An action which will take place on a Dev Box.") +@resource("actions") +@parentResource(DevBox) +model DevBoxAction { + @key("actionName") + @doc("The name of the action.") + @minLength(3) + @maxLength(63) + @pattern("^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$") + @visibility("read") + name: string; + + @doc("The action that will be taken.") + actionType: DevBoxActionType; + + @doc("The id of the resource which triggered this action") + sourceId: string; + + @doc("The earliest time that the action could occur (UTC).") + suspendedUntil?: utcDateTime; + + @doc("Details about the next run of this action.") + next?: DevBoxNextAction; +} + +@doc("Details about the next run of an action.") +model DevBoxNextAction { + @doc("The time the action will be triggered (UTC).") + scheduledTime: utcDateTime; +} + +@doc("The actions list result") +model DevBoxActionsDelayMultipleResult + is Azure.Core.Page; + +@doc("The action delay result") +model DevBoxActionDelayResult { + @doc("The name of the action.") + name: string; + + @doc("The result of the delay operation on this action.") + result: DevBoxActionDelayResultStatus; + + @doc("The delayed action") + action?: DevBoxAction; + + @doc("Information about the error that occurred. Only populated on error.") + error?: Azure.Core.Foundations.Error; +} diff --git a/specification/devcenter/DevCenter/DevBox/routes.tsp b/specification/devcenter/DevCenter/DevBox/routes.tsp new file mode 100644 index 000000000000..6bde7e5c078d --- /dev/null +++ b/specification/devcenter/DevCenter/DevBox/routes.tsp @@ -0,0 +1,261 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "../shared/routes.tsp"; + +using Azure.Core; +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace DevCenterService; + +interface DevBoxesOperations { + @doc("Lists available pools") + listPools is StandardResourceOperations.ResourceList; + + @doc("Gets a pool") + getPool is StandardResourceOperations.ResourceRead; + + @doc("Lists available schedules for a pool.") + listSchedules is StandardResourceOperations.ResourceList; + + @doc("Gets a schedule.") + getSchedule is StandardResourceOperations.ResourceRead; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Need of reuse DevBoxListResult" + // This does fit in the ResourceList but since there are three different operations that returns dev box list result, + // we can't use the standard operation here - it would not allow the use of DevBoxListResult in the other operations. + // error when using it in other operations: duplicate-type-name 'PagedDevBox' (model DevBoxListResult) + @doc("Lists Dev Boxes in the project for a particular user.") + @route("/projects/{projectName}/users/{userId}/devboxes") + @get + listDevBoxes is Azure.Core.Foundations.Operation< + { + @doc("The DevCenter Project upon which to execute operations.") + @path + projectName: string; + + @doc("The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.") + @path + userId: string; + }, + DevBoxListResult + >; + + @doc("Gets a Dev Box") + getDevBox is StandardResourceOperations.ResourceRead; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Standard operations produce wrong swagger" + // The standard operation names the body as resource, so the generated swagger has parameter + // { + // "name": "resource", + // "in": "body", + // }, + // instead of the desired + // { + // "name": "body", + // "in": "body", + // } + @doc("Creates or replaces a Dev Box.") + @finalOperation(DevBoxesOperations.getDevBox) + @pollingOperation(SharedOperations.getProjectOperationStatus) + @route("/projects/{projectName}/users/{userId}/devboxes/{devBoxName}") + @put + createDevBox is Azure.Core.Foundations.Operation< + { + @doc("The DevCenter Project upon which to execute the operation.") + @path + projectName: string; + + @doc("The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.") + @path + userId: string; + + @doc("The name of a Dev Box.") + @path + devBoxName: string; + + @doc("Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the owner of the Dev Box as local administrator") + @body + body: DevBox; + }, + DevBox | { + @statusCode statusCode: 201; + + @header("Location") + location: ResourceLocation; + + @pollingLocation + @header("Operation-Location") + operationLocation: string; + + @body body?: DevBox; + } + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Does not fit any standard operation pattern" + //Can not use LongRunningResourceDelete because response is 202 or error, but we also accept 204 response" + @doc("Deletes a Dev Box.") + @pollingOperation(SharedOperations.getProjectOperationStatus) + @route("/projects/{projectName}/users/{userId}/devboxes/{devBoxName}") + @delete + deleteDevBox is Azure.Core.Foundations.Operation< + { + @doc("The DevCenter Project upon which to execute operations.") + @path + projectName: string; + + @doc("The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.") + @path + userId: string; + + @doc("The name of a Dev Box.") + @path + devBoxName: string; + }, + { + @statusCode statusCode: 202; + + @header("Location") + location: string; + + @pollingLocation + @header("Operation-Location") + operationLocation: string; + + @body body: OperationStatus; + } | { + @statusCode statusCode: 204; + } + >; + + @doc("Starts a Dev Box") + @pollingOperation(SharedOperations.getProjectOperationStatus) + @action("start") + startDevBox is StandardResourceOperations.LongRunningResourceAction< + DevBox, + {}, + { + @statusCode + statusCode: 202; + + @body + body: OperationStatus; + } + >; + + @doc("Stops a Dev Box") + @pollingOperation(SharedOperations.getProjectOperationStatus) + @action("stop") + stopDevBox is StandardResourceOperations.LongRunningResourceAction< + DevBox, + { + @doc("Optional parameter to hibernate the dev box.") + @query + hibernate?: boolean; + }, + { + @statusCode + statusCode: 202; + + @body + body: OperationStatus; + } + >; + + @doc("Restarts a Dev Box") + @pollingOperation(SharedOperations.getProjectOperationStatus) + @action("restart") + restartDevBox is StandardResourceOperations.LongRunningResourceAction< + DevBox, + {}, + { + @statusCode + statusCode: 202; + + @body + body: OperationStatus; + } + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "can not be represeted by using stand operations" + //There is no @key for RemoteConnection model + @doc("Gets RDP Connection info") + @route("/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection") + @get + getRemoteConnection is Azure.Core.Foundations.Operation< + { + @doc("The DevCenter Project upon which to execute operations.") + @path + projectName: string; + + @doc("The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.") + @path + userId: string; + + @doc("The name of a Dev Box.") + @path + devBoxName: string; + }, + RemoteConnection + >; + + @doc("Lists actions on a Dev Box.") + listDevBoxActions is StandardResourceOperations.ResourceList; + + @doc("Gets an action.") + getDevBoxAction is StandardResourceOperations.ResourceRead; + + @doc("Skips an occurrence of an action.") + @action("skip") + skipAction is StandardResourceOperations.ResourceAction< + DevBoxAction, + {}, + NoContentResponse + >; + + @doc("Delays the occurrence of an action.") + @action("delay") + delayAction is StandardResourceOperations.ResourceAction< + DevBoxAction, + { + @doc("The time to delay the Dev Box action or actions until.") + @query("until") + delayUntil: utcDateTime; + }, + DevBoxAction + >; + + @doc("Delays all actions.") + @action("delay") + delayAllActions is StandardResourceOperations.ResourceCollectionAction< + DevBoxAction, + { + @doc("The time to delay the Dev Box action or actions until.") + @query("until") + delayUntil: utcDateTime; + }, + DevBoxActionsDelayMultipleResult + >; +} + +interface DevBoxesDevCenter { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Does not fit any standard operation pattern since DevBox has a different path" + @doc("Lists Dev Boxes that the caller has access to in the DevCenter.") + @route("/devboxes") + @get + listAllDevBoxes is Azure.Core.Foundations.Operation<{}, DevBoxListResult>; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Does not fit any standard operation pattern since DevBox has a different path" + @doc("Lists Dev Boxes in the Dev Center for a particular user.") + @route("/users/{userId}/devboxes") + @get + listAllDevBoxesByUser is Azure.Core.Foundations.Operation< + { + @doc("The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.") + @path + userId: string; + }, + DevBoxListResult + >; +} diff --git a/specification/devcenter/DevCenter/DevCenter/routes.tsp b/specification/devcenter/DevCenter/DevCenter/routes.tsp new file mode 100644 index 000000000000..61be234c1c9a --- /dev/null +++ b/specification/devcenter/DevCenter/DevCenter/routes.tsp @@ -0,0 +1,17 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "../shared/models.tsp"; + +using Azure.Core; +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace DevCenterService; + +interface DevCenterOperations { + @doc("Lists all projects.") + listProjects is StandardResourceOperations.ResourceList; + + @doc("Gets a project.") + getProject is StandardResourceOperations.ResourceRead; +} diff --git a/specification/devcenter/DevCenter/Environments/models.tsp b/specification/devcenter/DevCenter/Environments/models.tsp new file mode 100644 index 000000000000..7ec593906be0 --- /dev/null +++ b/specification/devcenter/DevCenter/Environments/models.tsp @@ -0,0 +1,233 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "../shared/models.tsp"; + +using TypeSpec.Versioning; +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace DevCenterService; + +@doc("The type of data a parameter accepts.") +union ParameterType { + @doc("The parameter accepts an array of values.") array: "array", + @doc("The parameter accepts a boolean value.") boolean: "boolean", + @doc("The parameter accepts an integer value.") integer: "integer", + @doc("The parameter accepts a number value.") number: "number", + @doc("The parameter accepts an object value.") object: "object", + @doc("The parameter accepts a string value.") string: "string", + string, +} + +@doc("Indicates whether an environment type is enabled for use in a project.") +union EnvironmentTypeEnableStatus { + @doc("The environment type is enabled for use in the project.") + Enabled: "Enabled", + + @doc("The environment type is not enabled for use in the project.") + Disabled: "Disabled", + + string, +} + +@doc("The provisioning state of the environment.") +union EnvironmentProvisioningState { + @doc("The environment was successfully provisioned.") + Succeeded: "Succeeded", + + @doc("The environment failed to provision.") + Failed: "Failed", + + @doc("The environment provisioning was canceled.") + Canceled: "Canceled", + + @doc("The environment is creating.") + Creating: "Creating", + + @doc("The environment was accepted.") + Accepted: "Accepted", + + @doc("The environment is deleting.") + Deleting: "Deleting", + + @doc("The environment is updating.") + Updating: "Updating", + + @doc("The environment is preparing.") + Preparing: "Preparing", + + @doc("The environment is running.") + Running: "Running", + + @doc("The environment is Syncing.") + Syncing: "Syncing", + + @doc("The environment is moving resources.") + MovingResources: "MovingResources", + + @doc("The environment has a transient failure.") + TransientFailure: "TransientFailure", + + @doc("The environment storage provisioning failed.") + StorageProvisioningFailed: "StorageProvisioningFailed", + + string, +} + +@doc("Results of the environment list operation.") +model EnvironmentListResult is Azure.Core.Page; + +@doc("Properties of an environment.") +@resource("environments") +@parentResource(User) +model Environment { + ...EnvironmentUpdateProperties; + + @doc("Environment name.") + @key("environmentName") + @minLength(3) + @maxLength(63) + @pattern("^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$") + @visibility("read") + name: string; + + @doc("Environment type.") + @visibility("read", "create") + environmentType: string; + + @doc("The AAD object id of the owner of this Environment.") + @visibility("read") + user?: Azure.Core.uuid; + + @doc("The provisioning state of the environment.") + @visibility("read") + provisioningState?: EnvironmentProvisioningState; + + @doc("The identifier of the resource group containing the environment's resources.") + @visibility("read") + resourceGroupId?: string; + + @doc("Name of the catalog.") + @visibility("read", "create") + catalogName: string; + + @doc("Name of the environment definition.") + @visibility("read", "create") + environmentDefinitionName: string; + + @doc("Provisioning error details. Populated only for error states.") + @visibility("read") + error?: Azure.Core.Foundations.Error; +} + +@doc(""" +Properties of an environment. These properties can be updated after the +resource has been created. +""") +model EnvironmentUpdateProperties { + #suppress "@azure-tools/typespec-azure-core/bad-record-type" "there is no build in type to describe object" + @doc("Parameters object for the environment.") + parameters?: Record; +} + +@doc("A catalog.") +@resource("catalogs") +@parentResource(Project) +model Catalog { + @doc("Name of the catalog.") + @key("catalogName") + @minLength(3) + @maxLength(63) + @pattern("^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$") + @visibility("read") + name: string; +} + +@doc("Results of the environment definition list operation.") +model EnvironmentDefinitionListResult is Azure.Core.Page; + +@doc("An environment definition.") +@resource("environmentDefinitions") +@parentResource(Catalog) +model EnvironmentDefinition { + @doc("The ID of the environment definition.") + id: string; + + @doc("Name of the environment definition.") + @key("definitionName") + @minLength(3) + @maxLength(63) + @pattern("^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$") + @visibility("read") + name: string; + + @doc("Name of the catalog.") + catalogName: string; + + @doc("A short description of the environment definition.") + description?: string; + + @doc("Input parameters passed to an environment.") + parameters?: EnvironmentDefinitionParameter[]; + + //typespec does not have a way to represent this. Issue https://github.com/microsoft/typespec/issues/3005 + @doc("JSON schema defining the parameters object passed to an environment.") + parametersSchema?: string; + + @doc("Path to the Environment Definition entrypoint file.") + templatePath?: string; +} + +@doc("Properties of an Environment Definition parameter") +model EnvironmentDefinitionParameter { + @doc("Unique ID of the parameter") + id: string; + + @doc("Display name of the parameter") + name?: string; + + @doc("Description of the parameter") + description?: string; + + @doc("Default value of the parameter") + default?: string; + + @doc(""" +A string of one of the basic JSON types (number, integer, array, object, +boolean, string) +""") + type: ParameterType; + + @doc(""" +Whether or not this parameter is read-only. If true, default should have a +value. +""") + readOnly?: boolean; + + @doc("Whether or not this parameter is required") + required: boolean; + + @doc("An array of allowed values") + @minItems(1) + allowed?: string[]; +} + +@doc("Result of the environment type list operation.") +model EnvironmentTypeListResult is Azure.Core.Page; + +@doc("Properties of an environment type.") +model EnvironmentType { + @doc("Name of the environment type") + name: string; + + @doc(""" +Id of a subscription or management group that the environment type will be +mapped to. The environment's resources will be deployed into this subscription +or management group. +""") + deploymentTargetId: string; + + @doc("Indicates whether this environment type is enabled for use in this project.") + status: EnvironmentTypeEnableStatus; +} diff --git a/specification/devcenter/DevCenter/Environments/routes.tsp b/specification/devcenter/DevCenter/Environments/routes.tsp new file mode 100644 index 000000000000..f5c6d982b7cf --- /dev/null +++ b/specification/devcenter/DevCenter/Environments/routes.tsp @@ -0,0 +1,179 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "../shared/routes.tsp"; + +using Azure.Core; +using TypeSpec.Versioning; +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace DevCenterService; + +interface EnvironmentsOperations { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Does not fit any standard operation pattern since Environment has a different path" + @doc("Lists the environments for a project.") + @route("/projects/{projectName}/environments") + @get + listAllEnvironments is Azure.Core.Foundations.Operation< + { + @doc("The DevCenter Project upon which to execute operations.") + @path + projectName: string; + }, + EnvironmentListResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Need of reuse EnvironmentListResult" + // This does fit in the ResourceList but since listAllEnvironments also uses environment list result, + // we can't use the standard operation here - it would not allow the use of EnvironmentListResult in the other operation. + // error when using it in other operation: duplicate-type-name 'PagedEnvironment' (model EnvironmentListResult) + @doc("Lists the environments for a project and user.") + @route("/projects/{projectName}/users/{userId}/environments") + @get + listEnvironments is Azure.Core.Foundations.Operation< + { + @doc("The DevCenter Project upon which to execute operations.") + @path + projectName: string; + + @doc("The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.") + @path + userId: string; + }, + EnvironmentListResult + >; + + @doc("Gets an environment") + getEnvironment is StandardResourceOperations.ResourceRead; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Does not fit any standard operation pattern" + //Can not use LongRunningCreateOrReplace because response is 200 or 201, but we only respond with 201" + @doc("Creates or updates an environment.") + @finalOperation(EnvironmentsOperations.getEnvironment) + @pollingOperation(SharedOperations.getProjectOperationStatus) + @route("/projects/{projectName}/users/{userId}/environments/{environmentName}") + @put + createOrUpdateEnvironment is Azure.Core.Foundations.Operation< + { + @doc("The DevCenter Project upon which to execute operations.") + @path + projectName: string; + + @doc("The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.") + @path + userId: string; + + @doc("The name of the environment.") + @path + environmentName: string; + + @doc("Represents an environment.") + @body + body: Environment; + }, + { + @statusCode + statusCode: 201; + + @pollingLocation + @header("Operation-Location") + operationLocation: string; + + @body body: Environment; + } + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Does not fit any standard operation pattern" + //Can not use LongRunningResourceDelete because response is 202 or error, but we also accept 204 response" + @doc("Deletes an environment and all its associated resources") + @pollingOperation(SharedOperations.getProjectOperationStatus) + @route("/projects/{projectName}/users/{userId}/environments/{environmentName}") + @delete + deleteEnvironment is Azure.Core.Foundations.Operation< + { + @doc("The DevCenter Project upon which to execute operations.") + @path + projectName: string; + + @doc("The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.") + @path + userId: string; + + @doc("The name of the environment.") + @path + environmentName: string; + }, + { + @statusCode + statusCode: 202; + + @body body: OperationStatus; + + @header("Location") + location: string; + + @pollingLocation + @header("Operation-Location") + operationLocation: string; + } | { + @statusCode + statusCode: 204; + } + >; + + @doc("Lists all of the catalogs available for a project.") + listCatalogs is StandardResourceOperations.ResourceList; + + @doc("Gets the specified catalog within the project") + getCatalog is StandardResourceOperations.ResourceRead; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Does not fit any standard operation pattern since EnvironmentDefinition has a different path" + @doc("Lists all environment definitions available for a project.") + @route("/projects/{projectName}/environmentDefinitions") + @get + listEnvironmentDefinitions is Azure.Core.Foundations.Operation< + { + @doc("The DevCenter Project upon which to execute operations.") + @path + projectName: string; + }, + EnvironmentDefinitionListResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Need of reuse EnvironmentDefinitionListResult" + // This does fit in the ResourceList but since listEnvironmentDefinitions also uses environment list result, + // we can't use the standard operation here - it would not allow the use of EnvironmentDefinitionListResult in the other operation. + // error when using it in other operation: duplicate-type-name 'PagedEnvironmentDefinition' (model EnvironmentDefinitionListResult) + @doc("Lists all environment definitions available within a catalog.") + @route("/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions") + @get + listEnvironmentDefinitionsByCatalog is Azure.Core.Foundations.Operation< + { + @doc("The DevCenter Project upon which to execute operations.") + @path + projectName: string; + + @doc("The name of the catalog") + @path + catalogName: string; + }, + EnvironmentDefinitionListResult + >; + + @doc("Get an environment definition from a catalog.") + getEnvironmentDefinition is StandardResourceOperations.ResourceRead; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "can not be represeted by using stand operations since there is no @key for EnvironmentType model" + @doc("Lists all environment types configured for a project.") + @route("/projects/{projectName}/environmentTypes") + @get + listEnvironmentTypes is Azure.Core.Foundations.Operation< + { + @doc("The DevCenter Project upon which to execute operations.") + @path + projectName: string; + }, + EnvironmentTypeListResult + >; +} diff --git a/specification/devcenter/DevCenter/client.tsp b/specification/devcenter/DevCenter/client.tsp new file mode 100644 index 000000000000..69dc2c0c211f --- /dev/null +++ b/specification/devcenter/DevCenter/client.tsp @@ -0,0 +1,251 @@ +import "./main.tsp"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.Core; +using TypeSpec.Versioning; +using DevCenterService; +using Azure.ClientGenerator.Core; + +@useDependency(APIVersions.v2023_04_01) +namespace SdkCustomizations; + +@client({ + name: "DevCenterClient", + service: DevCenterService, +}) +interface DevCenterClientOperations { + listProjects is DevCenterService.DevCenterOperations.listProjects; + getProject is DevCenterService.DevCenterOperations.getProject; +} + +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "detailed suppress description for each operation can be found in routes.tsp" +@client({ + name: "DevBoxesClient", + service: DevCenterService, +}) +interface DevBoxesClientOperations { + listPools is DevCenterService.DevBoxesOperations.listPools; + getPool is DevCenterService.DevBoxesOperations.getPool; + listSchedules is DevCenterService.DevBoxesOperations.listSchedules; + getSchedule is DevCenterService.DevBoxesOperations.getSchedule; + listAllDevBoxes is DevCenterService.DevBoxesDevCenter.listAllDevBoxes; + listAllDevBoxesByUser is DevCenterService.DevBoxesDevCenter.listAllDevBoxesByUser; + listDevBoxes is DevCenterService.DevBoxesOperations.listDevBoxes; + getDevBox is DevCenterService.DevBoxesOperations.getDevBox; + @convenientAPI(false, "csharp") // https://github.com/Azure/azure-rest-api-specs/issues/28083 + createDevBox is DevCenterService.DevBoxesOperations.createDevBox; + deleteDevBox is DevCenterService.DevBoxesOperations.deleteDevBox; + startDevBox is DevCenterService.DevBoxesOperations.startDevBox; + stopDevBox is DevCenterService.DevBoxesOperations.stopDevBox; + restartDevBox is DevCenterService.DevBoxesOperations.restartDevBox; + getRemoteConnection is DevCenterService.DevBoxesOperations.getRemoteConnection; + listDevBoxActions is DevCenterService.DevBoxesOperations.listDevBoxActions; + getDevBoxAction is DevCenterService.DevBoxesOperations.getDevBoxAction; + skipAction is DevCenterService.DevBoxesOperations.skipAction; + delayAction is DevCenterService.DevBoxesOperations.delayAction; + delayAllActions is DevCenterService.DevBoxesOperations.delayAllActions; +} + +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "detailed suppress description for each operation can be found in routes.tsp" +@client({ + name: "DeploymentEnvironmentsClient", + service: DevCenterService, +}) +interface EnvironmentClientOperations { + listAllEnvironments is DevCenterService.EnvironmentsOperations.listAllEnvironments; + listEnvironments is DevCenterService.EnvironmentsOperations.listEnvironments; + getEnvironment is DevCenterService.EnvironmentsOperations.getEnvironment; + @convenientAPI(false, "csharp") // same issue as described in https://github.com/Azure/azure-rest-api-specs/issues/28083 + createOrUpdateEnvironment is DevCenterService.EnvironmentsOperations.createOrUpdateEnvironment; + deleteEnvironment is DevCenterService.EnvironmentsOperations.deleteEnvironment; + listCatalogs is DevCenterService.EnvironmentsOperations.listCatalogs; + getCatalog is DevCenterService.EnvironmentsOperations.getCatalog; + listEnvironmentDefinitions is DevCenterService.EnvironmentsOperations.listEnvironmentDefinitions; + listEnvironmentDefinitionsByCatalog is DevCenterService.EnvironmentsOperations.listEnvironmentDefinitionsByCatalog; + getEnvironmentDefinition is DevCenterService.EnvironmentsOperations.getEnvironmentDefinition; + listEnvironmentTypes is DevCenterService.EnvironmentsOperations.listEnvironmentTypes; +} + +@@usage(DevCenterService.DevBox, Usage.input | Usage.output); +@@usage(DevCenterService.Environment, Usage.input | Usage.output); + +@@projectedName(DevCenterService.LocalAdminStatus, + "client", + "LocalAdministratorStatus" +); +@@projectedName(DevCenterService.StopOnDisconnectEnableStatus, + "client", + "StopOnDisconnectStatus" +); +@@projectedName(DevCenterService.EnvironmentTypeEnableStatus, + "client", + "EnvironmentTypeStatus" +); +@@projectedName(DevCenterService.DevBoxActionDelayResultStatus, + "client", + "DevBoxActionDelayStatus" +); +@@projectedName(DevCenterService.DevBoxActionDelayResult.result, + "client", + "delayStatus" +); + +@@projectedName(DevCenterService.OsType, "csharp", "DevBoxOSType"); +@@projectedName(DevCenterService.ScheduledFrequency, + "csharp", + "ScheduleFrequency" +); +@@projectedName(DevCenterService.ScheduledType, "csharp", "ScheduleType"); +@@projectedName(DevCenterService.Pool, "csharp", "DevBoxPool"); +@@projectedName(DevCenterService.Pool.osType, "csharp", "OSType"); +@@projectedName(DevCenterService.Pool.localAdministrator, + "csharp", + "LocalAdministratorStatus" +); +@@projectedName(DevCenterService.HardwareProfile, + "csharp", + "DevBoxHardwareProfile" +); +@@projectedName(DevCenterService.StorageProfile, + "csharp", + "DevBoxStorageProfile" +); +@@projectedName(DevCenterService.StorageProfile.osDisk, "csharp", "OSDisk"); +@@projectedName(DevCenterService.OsDisk, "csharp", "OSDisk"); +@@projectedName(DevCenterService.ImageReference, + "csharp", + "DevBoxImageReference" +); +@@projectedName(DevCenterService.ImageReference.osBuildNumber, + "csharp", + "OSBuildNumber" +); +@@projectedName(DevCenterService.Schedule, "csharp", "DevBoxSchedule"); +@@projectedName(DevCenterService.Schedule.type, "csharp", "scheduleType"); +@@projectedName(DevCenterService.Schedule.frequency, + "csharp", + "scheduleFrequency" +); +@@projectedName(DevCenterService.DevBox.osType, "csharp", "OSType"); +@@projectedName(DevCenterService.DevBox.user, "csharp", "userId"); +@@projectedName(DevCenterService.DevBox.localAdministrator, + "csharp", + "LocalAdministratorStatus" +); +@@projectedName(DevCenterService.RemoteConnection.webUrl, "csharp", "webUri"); +@@projectedName(DevCenterService.RemoteConnection.rdpConnectionUrl, + "csharp", + "rdpConnectionUri" +); +@@projectedName(DevCenterService.DevBoxAction.next, "csharp", "nextAction"); +@@projectedName(DevCenterService.DevBoxActionDelayResult.name, + "csharp", + "actionName" +); +@@projectedName(DevCenterService.ParameterType, + "csharp", + "EnvironmentDefinitionParameterType" +); +@@projectedName(DevCenterService.Environment, "csharp", "DevCenterEnvironment"); +@@projectedName(DevCenterService.Environment.environmentType, + "csharp", + "environmentTypeName" +); +@@projectedName(DevCenterService.Environment.user, "csharp", "userId"); +@@projectedName(DevCenterService.Catalog, "csharp", "DevCenterCatalog"); +@@projectedName(DevCenterService.EnvironmentDefinitionParameter.default, + "csharp", + "defaultValue" +); +@@projectedName(DevCenterService.EnvironmentDefinitionParameter.type, + "csharp", + "parameterType" +); +@@projectedName(DevCenterService.EnvironmentType, + "csharp", + "DevCenterEnvironmentType" +); +@@projectedName(DevCenterService.OperationStatusValue, + "csharp", + "DevCenterOperationStatus" +); +@@projectedName(DevCenterService.OperationStatus, + "csharp", + "DevCenterOperationDetails" +); +@@projectedName(DevCenterService.Project, "csharp", "DevCenterProject"); + +@@projectedName(DevCenterService.OsType, "java", "DevBoxOsType"); +@@projectedName(DevCenterService.ScheduledFrequency, + "java", + "ScheduleFrequency" +); +@@projectedName(DevCenterService.ScheduledType, "java", "ScheduleType"); +@@projectedName(DevCenterService.Pool, "java", "DevBoxPool"); +@@projectedName(DevCenterService.Pool.localAdministrator, + "java", + "LocalAdministratorStatus" +); +@@projectedName(DevCenterService.HardwareProfile, + "java", + "DevBoxHardwareProfile" +); +@@projectedName(DevCenterService.StorageProfile, + "java", + "DevBoxStorageProfile" +); +@@projectedName(DevCenterService.OsDisk.diskSizeGB, "java", "diskSizeGb"); +@@projectedName(DevCenterService.ImageReference, + "java", + "DevBoxImageReference" +); +@@projectedName(DevCenterService.Schedule, "java", "DevBoxSchedule"); +@@projectedName(DevCenterService.Schedule.type, "java", "scheduleType"); +@@projectedName(DevCenterService.Schedule.frequency, + "java", + "scheduleFrequency" +); +@@projectedName(DevCenterService.DevBox.user, "java", "userId"); +@@projectedName(DevCenterService.DevBox.localAdministrator, + "java", + "LocalAdministratorStatus" +); +@@projectedName(DevCenterService.DevBoxAction.next, "java", "nextAction"); +@@projectedName(DevCenterService.DevBoxActionDelayResult.name, + "java", + "actionName" +); +@@projectedName(DevCenterService.ParameterType, + "java", + "EnvironmentDefinitionParameterType" +); +@@projectedName(DevCenterService.Environment, "java", "DevCenterEnvironment"); +@@projectedName(DevCenterService.Environment.environmentType, + "java", + "environmentTypeName" +); +@@projectedName(DevCenterService.Environment.user, "java", "userId"); +@@projectedName(DevCenterService.Catalog, "java", "DevCenterCatalog"); +@@projectedName(DevCenterService.EnvironmentDefinitionParameter.default, + "java", + "defaultValue" +); +@@projectedName(DevCenterService.EnvironmentDefinitionParameter.type, + "java", + "parameterType" +); +@@projectedName(DevCenterService.EnvironmentType, + "java", + "DevCenterEnvironmentType" +); +@@projectedName(DevCenterService.HardwareProfile.vCPUs, "java", "vCpus"); +@@projectedName(DevCenterService.HardwareProfile.memoryGB, "java", "memoryGb"); +@@projectedName(DevCenterService.OperationStatusValue, + "java", + "DevCenterOperationStatus" +); +@@projectedName(DevCenterService.OperationStatus, + "java", + "DevCenterOperationDetails" +); +@@projectedName(DevCenterService.Project, "java", "DevCenterProject"); diff --git a/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesDevCenterOperations_ListAllDevBoxes.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesDevCenterOperations_ListAllDevBoxes.json new file mode 100644 index 000000000000..33e7210819fb --- /dev/null +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesDevCenterOperations_ListAllDevBoxes.json @@ -0,0 +1,40 @@ +{ + "title": "Lists Dev Boxes that the caller has access to in the DevCenter.", + "operationId": "DevBoxesDevCenter_ListAllDevBoxes", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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" + } + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_List.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesDevCenterOperations_ListAllDevBoxesByUser.json similarity index 84% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_List.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesDevCenterOperations_ListAllDevBoxesByUser.json index 2b5810aee979..1fde15c1bbb5 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_List.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesDevCenterOperations_ListAllDevBoxesByUser.json @@ -1,7 +1,10 @@ { + "title": "Lists Dev Boxes in the Dev Center for a particular user.", + "operationId": "DevBoxesDevCenter_ListAllDevBoxesByUser", "parameters": { + "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", - "api-version": "2023-04-01" + "userId": "me" }, "responses": { "200": { diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Create.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_CreateDevBox.json similarity index 95% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Create.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_CreateDevBox.json index d14321bd2119..f51bad1c0086 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Create.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_CreateDevBox.json @@ -1,4 +1,6 @@ { + "title": "Creates or replaces a Dev Box.", + "operationId": "DevBoxesOperations_CreateDevBox", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_Delay.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_DelayAction.json similarity index 86% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_Delay.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_DelayAction.json index fcbbbb542c00..db7107cfc6bc 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_Delay.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_DelayAction.json @@ -1,4 +1,6 @@ { + "title": "Delays the occurrence of an action.", + "operationId": "DevBoxesOperations_DelayAction", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_DelayMultiple.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_DelayAllActions.json similarity index 93% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_DelayMultiple.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_DelayAllActions.json index a6bcf4dc6608..6a7ade1eef30 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_DelayMultiple.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_DelayAllActions.json @@ -1,4 +1,6 @@ { + "title": "Delays all actions.", + "operationId": "DevBoxesOperations_DelayAllActions", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Delete.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_DeleteDevBox.json similarity index 91% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Delete.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_DeleteDevBox.json index 1fd0570e1b5d..4843a80ed6c9 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Delete.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_DeleteDevBox.json @@ -1,4 +1,6 @@ { + "title": "Deletes a Dev Box.", + "operationId": "DevBoxesOperations_DeleteDevBox", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Get.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetDevBox.json similarity index 92% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Get.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetDevBox.json index 766e1726fdeb..f29193eb0b35 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Get.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetDevBox.json @@ -1,4 +1,6 @@ { + "title": "Gets a Dev Box", + "operationId": "DevBoxesOperations_GetDevBox", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_Get.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetDevBoxAction.json similarity index 87% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_Get.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetDevBoxAction.json index ab3165c3fb86..0d94918c712d 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_Get.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetDevBoxAction.json @@ -1,4 +1,6 @@ { + "title": "Gets an action.", + "operationId": "DevBoxesOperations_GetDevBoxAction", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Get.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetPool.json similarity index 92% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Get.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetPool.json index 98433ea1016d..7b53a6ac96b4 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_Get.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetPool.json @@ -1,4 +1,6 @@ { + "title": "Gets a pool", + "operationId": "DevBoxesOperations_GetPool", "parameters": { "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", "projectName": "myProject", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_GetRemoteConnection.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetRemoteConnection.json similarity index 78% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_GetRemoteConnection.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetRemoteConnection.json index 8b9eff4ba048..a01b7df571fd 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_GetRemoteConnection.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetRemoteConnection.json @@ -1,4 +1,6 @@ { + "title": "Gets RDP Connection info", + "operationId": "DevBoxesOperations_GetRemoteConnection", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Get.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetSchedule.json similarity index 85% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Get.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetSchedule.json index e755d985121f..8ba5489b95c6 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_Get.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_GetSchedule.json @@ -1,4 +1,6 @@ { + "title": "Gets a schedule.", + "operationId": "DevBoxesOperations_GetSchedule", "parameters": { "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", "projectName": "myProject", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_List.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListDevBoxActions.json similarity index 90% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_List.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListDevBoxActions.json index 65e1306247e1..db1ae0af7c62 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_List.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListDevBoxActions.json @@ -1,4 +1,6 @@ { + "title": "Lists actions on a Dev Box.", + "operationId": "DevBoxesOperations_ListDevBoxActions", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_ListByUserByProject.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListDevBoxes.json similarity index 90% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_ListByUserByProject.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListDevBoxes.json index 3c82fb6c63d7..2140a65cb857 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_ListByUserByProject.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListDevBoxes.json @@ -1,4 +1,6 @@ { + "title": "Lists Dev Boxes in the project for a particular user.", + "operationId": "DevBoxesOperations_ListDevBoxes", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_List.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListPools.json similarity index 95% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_List.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListPools.json index 0be1e62eaed0..42c39b484d20 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Pools_List.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListPools.json @@ -1,4 +1,6 @@ { + "title": "Lists available pools", + "operationId": "DevBoxesOperations_ListPools", "parameters": { "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", "projectName": "myProject", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_List.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListSchedules.json similarity index 83% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_List.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListSchedules.json index 0633d5b0b65b..0a5afd4f207a 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Schedules_List.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_ListSchedules.json @@ -1,4 +1,6 @@ { + "title": "Lists available schedules for a pool.", + "operationId": "DevBoxesOperations_ListSchedules", "parameters": { "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", "projectName": "myProject", diff --git a/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_RestartDevBox.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_RestartDevBox.json new file mode 100644 index 000000000000..3c0e55515dd6 --- /dev/null +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_RestartDevBox.json @@ -0,0 +1,25 @@ +{ + "title": "Restarts a Dev Box", + "operationId": "DevBoxesOperations_RestartDevBox", + "parameters": { + "api-version": "2023-04-01", + "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" + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_Skip.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_SkipAction.json similarity index 76% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_Skip.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_SkipAction.json index 6d45b37e9569..1e8552d6bd35 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_Skip.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_SkipAction.json @@ -1,4 +1,6 @@ { + "title": "Skips an occurrence of an action.", + "operationId": "DevBoxesOperations_SkipAction", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Restart.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_StartDevBox.json similarity index 92% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Restart.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_StartDevBox.json index 94087cc95497..292e5e1c947a 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Restart.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_StartDevBox.json @@ -1,4 +1,6 @@ { + "title": "Starts a Dev Box", + "operationId": "DevBoxesOperations_StartDevBox", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Stop.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_StopDevBox.json similarity index 92% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Stop.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_StopDevBox.json index 77b92e105aa0..b92d1089e864 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Stop.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevBoxesOperations_StopDevBox.json @@ -1,4 +1,6 @@ { + "title": "Stops a Dev Box", + "operationId": "DevBoxesOperations_StopDevBox", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Get.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevCenterOperations_GetProject.json similarity index 80% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Get.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevCenterOperations_GetProject.json index 6abb3dfa29b8..fe1a721864bc 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_Get.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevCenterOperations_GetProject.json @@ -1,4 +1,6 @@ { + "title": "Gets a project.", + "operationId": "DevCenterOperations_GetProject", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_ListByDevCenter.json b/specification/devcenter/DevCenter/examples/2023-04-01/DevCenterOperations_ListProjects.json similarity index 80% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_ListByDevCenter.json rename to specification/devcenter/DevCenter/examples/2023-04-01/DevCenterOperations_ListProjects.json index de0ab2fc2490..1e7bdde95309 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Projects_ListByDevCenter.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/DevCenterOperations_ListProjects.json @@ -1,4 +1,6 @@ { + "title": "Lists all projects.", + "operationId": "DevCenterOperations_ListProjects", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com" diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_CreateByEnvironmentDefinition.json b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_CreateOrUpdateEnvironment.json similarity index 91% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_CreateByEnvironmentDefinition.json rename to specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_CreateOrUpdateEnvironment.json index 53e27a92329f..40bd8016a490 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_CreateByEnvironmentDefinition.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_CreateOrUpdateEnvironment.json @@ -1,4 +1,6 @@ { + "title": "Creates or updates an environment.", + "operationId": "EnvironmentsOperations_CreateOrUpdateEnvironment", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_DeleteEnvironment.json b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_DeleteEnvironment.json new file mode 100644 index 000000000000..db378d427835 --- /dev/null +++ b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_DeleteEnvironment.json @@ -0,0 +1,26 @@ +{ + "title": "Deletes an environment and all its associated resources", + "operationId": "EnvironmentsOperations_DeleteEnvironment", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me", + "environmentName": "mydevenv" + }, + "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" + } + }, + "204": {} + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Get.json b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_GetCatalog.json similarity index 73% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Get.json rename to specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_GetCatalog.json index 20e26cf0e719..7d9de8e13786 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_Get.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_GetCatalog.json @@ -1,4 +1,6 @@ { + "title": "Gets the specified catalog within the project", + "operationId": "EnvironmentsOperations_GetCatalog", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_Get.json b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_GetEnvironment.json similarity index 89% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_Get.json rename to specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_GetEnvironment.json index b2e1b2f435cf..eb89813acaf7 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_Get.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_GetEnvironment.json @@ -1,4 +1,6 @@ { + "title": "Gets an environment", + "operationId": "EnvironmentsOperations_GetEnvironment", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentDefinitions_Get.json b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_GetEnvironmentDefinition.json similarity index 94% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentDefinitions_Get.json rename to specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_GetEnvironmentDefinition.json index c008688444aa..e4efa7edea54 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentDefinitions_Get.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_GetEnvironmentDefinition.json @@ -1,4 +1,6 @@ { + "title": "Get an environment definition from a catalog.", + "operationId": "EnvironmentsOperations_GetEnvironmentDefinition", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_ListByProject.json b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListAllEnvironments.json similarity index 87% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_ListByProject.json rename to specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListAllEnvironments.json index e33fee6a7a31..ab203c460a33 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_ListByProject.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListAllEnvironments.json @@ -1,4 +1,6 @@ { + "title": "Lists the environments for a project.", + "operationId": "EnvironmentsOperations_ListAllEnvironments", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_ListByProject.json b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListCatalogs.json similarity index 74% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_ListByProject.json rename to specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListCatalogs.json index ba8305e75d09..17c683e6c9b3 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Catalogs_ListByProject.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListCatalogs.json @@ -1,4 +1,6 @@ { + "title": "Lists all of the catalogs available for a project.", + "operationId": "EnvironmentsOperations_ListCatalogs", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentDefinitions_ListByProject.json b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironmentDefinitions.json similarity index 94% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentDefinitions_ListByProject.json rename to specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironmentDefinitions.json index c8f6393c7d6f..aabe3738602c 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentDefinitions_ListByProject.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironmentDefinitions.json @@ -1,4 +1,6 @@ { + "title": "Lists all environment definitions available for a project.", + "operationId": "EnvironmentsOperations_ListEnvironmentDefinitions", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentDefinitions_ListByCatalog.json b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironmentDefinitionsByCatalog.json similarity index 94% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentDefinitions_ListByCatalog.json rename to specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironmentDefinitionsByCatalog.json index dc71df8f6744..d9c411224b8e 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentDefinitions_ListByCatalog.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironmentDefinitionsByCatalog.json @@ -1,4 +1,6 @@ { + "title": "Lists all environment definitions available within a catalog.", + "operationId": "EnvironmentsOperations_ListEnvironmentDefinitionsByCatalog", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_ListByProject.json b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironmentTypes.json similarity index 78% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_ListByProject.json rename to specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironmentTypes.json index 5a50195e73d3..83e22df09846 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentTypes_ListByProject.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironmentTypes.json @@ -1,4 +1,6 @@ { + "title": "Lists all environment types configured for a project.", + "operationId": "EnvironmentsOperations_ListEnvironmentTypes", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_ListByProjectByUser.json b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironments.json similarity index 87% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_ListByProjectByUser.json rename to specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironments.json index beab108b5b87..51f0384a6ffb 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_ListByProjectByUser.json +++ b/specification/devcenter/DevCenter/examples/2023-04-01/EnvironmentsOperations_ListEnvironments.json @@ -1,4 +1,6 @@ { + "title": "Lists the environments for a project and user.", + "operationId": "EnvironmentsOperations_ListEnvironments", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/DevCenter/examples/2023-04-01/SharedOperations_GetProjectOperationStatus.json b/specification/devcenter/DevCenter/examples/2023-04-01/SharedOperations_GetProjectOperationStatus.json new file mode 100644 index 000000000000..d6c4b10ab2f4 --- /dev/null +++ b/specification/devcenter/DevCenter/examples/2023-04-01/SharedOperations_GetProjectOperationStatus.json @@ -0,0 +1,19 @@ +{ + "title": "Get the status of an operation.", + "operationId": "SharedOperations_GetProjectOperationStatus", + "parameters": { + "api-version": "2023-04-01", + "projectName": "myProject", + "operationId": "fa067167-e49d-41bd-8dd8-de719b9de3b3" + }, + "responses": { + "200": { + "body": { + "id": "/projects/myProject/operationStatuses/fa067167-e49d-41bd-8dd8-de719b9de3b3", + "name": "fa067167-e49d-41bd-8dd8-de719b9de3b3", + "status": "Running", + "startTime": "2024-01-24T21:14:58.472Z" + } + } + } +} diff --git a/specification/devcenter/DevCenter/main.tsp b/specification/devcenter/DevCenter/main.tsp new file mode 100644 index 000000000000..d51242bb7df3 --- /dev/null +++ b/specification/devcenter/DevCenter/main.tsp @@ -0,0 +1,42 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "./DevBox/routes.tsp"; +import "./DevCenter/routes.tsp"; +import "./Environments/routes.tsp"; + +using Azure.Core; +using TypeSpec.Versioning; +using TypeSpec.Rest; +using TypeSpec.Http; + +@useAuth( + OAuth2Auth<[ + { + type: OAuth2FlowType.implicit, + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", + scopes: ["https://devcenter.azure.com/.default"], + } + ]> +) +@service({ + title: "DevCenter", +}) +@server( + "{endpoint}", + "DevCenter service", + { + @doc("The DevCenter-specific URI to operate on.") + endpoint: string, + } +) +@doc("DevCenter service") +@versioned(APIVersions) +namespace DevCenterService; + +@doc("DevCenter API versions") +enum APIVersions { + @doc("The 2023-04-01 service API version") + @useDependency(Versions.v1_0_Preview_2) + v2023_04_01: "2023-04-01", +} diff --git a/specification/devcenter/DevCenter/python-client.tsp b/specification/devcenter/DevCenter/python-client.tsp new file mode 100644 index 000000000000..accddbb1bbf7 --- /dev/null +++ b/specification/devcenter/DevCenter/python-client.tsp @@ -0,0 +1,86 @@ +import "./main.tsp"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.Core; +using TypeSpec.Versioning; +using DevCenterService; +using Azure.ClientGenerator.Core; + +@useDependency(APIVersions.v2023_04_01) +namespace PythonSdkCustomizations; + +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "detailed suppress description for each operation can be found in routes.tsp" +@client({ + name: "DevCenterClient", + service: DevCenterService, +}) +interface DevCenterClientOperations { + //DevCenters + listProjects is DevCenterService.DevCenterOperations.listProjects; + getProject is DevCenterService.DevCenterOperations.getProject; + + //DevBoxes + listPools is DevCenterService.DevBoxesOperations.listPools; + getPool is DevCenterService.DevBoxesOperations.getPool; + listSchedules is DevCenterService.DevBoxesOperations.listSchedules; + getSchedule is DevCenterService.DevBoxesOperations.getSchedule; + listAllDevBoxes is DevCenterService.DevBoxesDevCenter.listAllDevBoxes; + listAllDevBoxesByUser is DevCenterService.DevBoxesDevCenter.listAllDevBoxesByUser; + listDevBoxes is DevCenterService.DevBoxesOperations.listDevBoxes; + getDevBox is DevCenterService.DevBoxesOperations.getDevBox; + createDevBox is DevCenterService.DevBoxesOperations.createDevBox; + deleteDevBox is DevCenterService.DevBoxesOperations.deleteDevBox; + startDevBox is DevCenterService.DevBoxesOperations.startDevBox; + stopDevBox is DevCenterService.DevBoxesOperations.stopDevBox; + restartDevBox is DevCenterService.DevBoxesOperations.restartDevBox; + getRemoteConnection is DevCenterService.DevBoxesOperations.getRemoteConnection; + listDevBoxActions is DevCenterService.DevBoxesOperations.listDevBoxActions; + getDevBoxAction is DevCenterService.DevBoxesOperations.getDevBoxAction; + skipDevBoxAction is DevCenterService.DevBoxesOperations.skipAction; + delayDevBoxAction is DevCenterService.DevBoxesOperations.delayAction; + delayAllDevBoxActions is DevCenterService.DevBoxesOperations.delayAllActions; + + //Environments + listAllEnvironments is DevCenterService.EnvironmentsOperations.listAllEnvironments; + listEnvironments is DevCenterService.EnvironmentsOperations.listEnvironments; + getEnvironment is DevCenterService.EnvironmentsOperations.getEnvironment; + createOrUpdateEnvironment is DevCenterService.EnvironmentsOperations.createOrUpdateEnvironment; + deleteEnvironment is DevCenterService.EnvironmentsOperations.deleteEnvironment; + listCatalogs is DevCenterService.EnvironmentsOperations.listCatalogs; + getCatalog is DevCenterService.EnvironmentsOperations.getCatalog; + listEnvironmentDefinitions is DevCenterService.EnvironmentsOperations.listEnvironmentDefinitions; + listEnvironmentDefinitionsByCatalog is DevCenterService.EnvironmentsOperations.listEnvironmentDefinitionsByCatalog; + getEnvironmentDefinition is DevCenterService.EnvironmentsOperations.getEnvironmentDefinition; + listEnvironmentTypes is DevCenterService.EnvironmentsOperations.listEnvironmentTypes; +} + +@@projectedName(DevCenterService.LocalAdminStatus, + "client", + "LocalAdministratorStatus" +); +@@projectedName(DevCenterService.StopOnDisconnectEnableStatus, + "client", + "StopOnDisconnectStatus" +); +@@projectedName(DevCenterService.EnvironmentTypeEnableStatus, + "client", + "EnvironmentTypeStatus" +); +@@projectedName(DevCenterService.DevBoxActionDelayResultStatus, + "client", + "DevBoxActionDelayStatus" +); + +@@projectedName(DevCenterService.OsType, "python", "OSType"); +@@projectedName(DevCenterService.HardwareProfile.vCPUs, "python", "vcpus"); +@@projectedName(DevCenterService.HardwareProfile.memoryGB, + "python", + "memoryGb" +); +@@projectedName(DevCenterService.OsDisk, "python", "OSDisk"); +@@projectedName(DevCenterService.OsDisk.diskSizeGB, "python", "diskSizeGb"); +@@projectedName(DevCenterService.OperationStatus, "python", "OperationDetails"); +@@projectedName(DevCenterService.OperationStatusValue, + "python", + "OperationStatus" +); diff --git a/specification/devcenter/DevCenter/shared/models.tsp b/specification/devcenter/DevCenter/shared/models.tsp new file mode 100644 index 000000000000..bce3393576c7 --- /dev/null +++ b/specification/devcenter/DevCenter/shared/models.tsp @@ -0,0 +1,99 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "../main.tsp"; + +using Azure.Core; +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace DevCenterService; + +@doc("Indicates whether operation status is running, completed, canceled or failed.") +@lroStatus +enum OperationStatusValue { + @doc("Operation is in progress") + Running, + + @doc("Operation is completed with success") + @lroSucceeded + Completed, + + @doc("Operation was canceled") + Canceled, + + @doc("Operation failed") + Failed, +} + +@doc("The current status of an async operation") +@resource("operationstatuses") +@parentResource(Project) +model OperationStatus { + @doc("Fully qualified ID for the operation status.") + @key("operationId") + @visibility("read") + id: string; + + @doc("The operation id name") + name?: string; + + @doc("Provisioning state of the resource.") + status: OperationStatusValue; + + @doc("The id of the resource.") + resourceId?: string; + + @doc("The start time of the operation") + startTime?: utcDateTime; + + @doc("The end time of the operation") + endTime?: utcDateTime; + + @doc("Percent of the operation that is complete") + @minValue(0.0) + @maxValue(100.0) + percentComplete?: float64; + + #suppress "@azure-tools/typespec-azure-core/no-unknown" "there is no build in type to describe object" + @doc("Custom operation properties, populated only for a successful operation.") + properties?: unknown; + + @doc("Operation Error message") + error?: Azure.Core.Foundations.Error; +} + +@doc("Project details.") +@resource("projects") +model Project { + @key("projectName") + @doc("Name of the project") + @minLength(3) + @maxLength(63) + @pattern("^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$") + @visibility("read") + name: string; + + @doc("Description of the project.") + description?: string; + + @doc(""" +When specified, indicates the maximum number of Dev Boxes a single user can +create across all pools in the project. +""") + @minValue(0) + maxDevBoxesPerUser?: int32; +} + +@doc("Project user") +@resource("users") +@parentResource(Project) +model User { + @key("userId") + @doc("The AAD object id of the user. If value is 'me', the identity is taken from the authentication context") + @minLength(2) + @maxLength(36) + @pattern("^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$") + @visibility("read") + userId: string; +} diff --git a/specification/devcenter/DevCenter/shared/routes.tsp b/specification/devcenter/DevCenter/shared/routes.tsp new file mode 100644 index 000000000000..a477894e502b --- /dev/null +++ b/specification/devcenter/DevCenter/shared/routes.tsp @@ -0,0 +1,14 @@ +import "@typespec/rest"; +import "./models.tsp"; +import "@azure-tools/typespec-azure-core"; + +using Azure.Core; +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace DevCenterService; + +interface SharedOperations { + @doc("Get the status of an operation.") + getProjectOperationStatus is StandardResourceOperations.ResourceRead; +} diff --git a/specification/devcenter/DevCenter/tspconfig.yaml b/specification/devcenter/DevCenter/tspconfig.yaml new file mode 100644 index 000000000000..479a1e1cbe91 --- /dev/null +++ b/specification/devcenter/DevCenter/tspconfig.yaml @@ -0,0 +1,37 @@ +parameters: + service-dir: + default: "sdk/devcenter" +emit: ["@azure-tools/typespec-autorest"] +linter: + extends: + - "@azure-tools/typespec-azure-core/all" +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + output-file: "{azure-resource-provider-folder}/Microsoft.DevCenter/{version-status}/{version}/devcenter.json" + examples-directory: "examples" + "@azure-tools/typespec-csharp": + package-dir: "Azure.Developer.DevCenter" + namespace: "{package-dir}" + clear-output-folder: true + flavor: azure + "@azure-tools/typespec-python": + package-dir: "azure-developer-devcenter" + package-name: "{package-dir}" + flavor: azure + "@azure-tools/typespec-ts": + title: "Azure Developer DevCenter" + package-dir: "developer-devcenter-rest" + generateMetadata: true + packageDetails: + name: "@azure-rest/developer-devcenter" + description: "Azure Developer DevCenter Client" + version: "1.0.0" + flavor: azure + "@azure-tools/typespec-java": + package-dir: "azure-developer-devcenter" + namespace: com.azure.developer.devcenter + examples-directory: "examples" + partial-update: true + flavor: azure diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/devbox.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/devbox.json deleted file mode 100644 index 4dd1fb7a4b69..000000000000 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/devbox.json +++ /dev/null @@ -1,1825 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2023-04-01", - "title": "DevCenter", - "description": "DevBox API." - }, - "x-ms-parameterized-host": { - "hostTemplate": "{endpoint}", - "useSchemePrefix": false, - "parameters": [ - { - "$ref": "devcenter.json#/parameters/EndpointParameter" - } - ] - }, - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "AADToken": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "AADToken": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/projects/{projectName}/pools": { - "get": { - "tags": [ - "Pools" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/TopParameter" - }, - { - "$ref": "devcenter.json#/parameters/FilterParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - } - ], - "description": "Lists available pools", - "operationId": "DevBoxes_ListPools", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/PoolListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_ListPools": { - "$ref": "./examples/Pools_List.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-odata": "#/definitions/Pool" - } - }, - "/projects/{projectName}/pools/{poolName}": { - "get": { - "tags": [ - "Pools" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "#/parameters/PoolNameParameter" - } - ], - "description": "Gets a pool", - "operationId": "DevBoxes_GetPool", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Pool" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_GetPool": { - "$ref": "./examples/Pools_Get.json" - } - } - } - }, - "/projects/{projectName}/pools/{poolName}/schedules": { - "get": { - "tags": [ - "Schedules" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/TopParameter" - }, - { - "$ref": "devcenter.json#/parameters/FilterParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "#/parameters/PoolNameParameter" - } - ], - "description": "Lists available schedules for a pool.", - "operationId": "DevBoxes_ListSchedulesByPool", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ScheduleListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_ListSchedulesByPool": { - "$ref": "./examples/Schedules_List.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-odata": "#/definitions/Schedule" - } - }, - "/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}": { - "get": { - "tags": [ - "Schedules" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "#/parameters/PoolNameParameter" - }, - { - "$ref": "#/parameters/ScheduleNameParameter" - } - ], - "description": "Gets a schedule.", - "operationId": "DevBoxes_GetScheduleByPool", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Schedule" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_GetScheduleByPool": { - "$ref": "./examples/Schedules_Get.json" - } - } - } - }, - "/devboxes": { - "get": { - "tags": [ - "Dev Boxes" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/FilterParameter" - }, - { - "$ref": "devcenter.json#/parameters/TopParameter" - } - ], - "description": "Lists Dev Boxes that the caller has access to in the DevCenter.", - "operationId": "DevCenter_ListAllDevBoxes", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DevBoxListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevCenter_ListAllDevBoxes": { - "$ref": "./examples/DevBoxes_List.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-odata": "#/definitions/DevBox" - } - }, - "/users/{userId}/devboxes": { - "get": { - "tags": [ - "Dev Boxes" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/FilterParameter" - }, - { - "$ref": "devcenter.json#/parameters/TopParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - } - ], - "description": "Lists Dev Boxes in the Dev Center for a particular user.", - "operationId": "DevCenter_ListAllDevBoxesByUser", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DevBoxListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevCenter_ListAllDevBoxesByUser": { - "$ref": "./examples/DevBoxes_ListByUserByProject.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-odata": "#/definitions/DevBox" - } - }, - "/projects/{projectName}/users/{userId}/devboxes": { - "get": { - "tags": [ - "Dev Boxes" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/FilterParameter" - }, - { - "$ref": "devcenter.json#/parameters/TopParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - } - ], - "description": "Lists Dev Boxes in the project for a particular user.", - "operationId": "DevBoxes_ListDevBoxesByUser", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DevBoxListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_ListDevBoxesByUser": { - "$ref": "./examples/DevBoxes_ListByUserByProject.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-odata": "#/definitions/DevBox" - } - }, - "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}": { - "get": { - "tags": [ - "Dev Boxes" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - } - ], - "description": "Gets a Dev Box", - "operationId": "DevBoxes_GetDevBoxByUser", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DevBox" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_GetDevBoxByUser": { - "$ref": "./examples/DevBoxes_Get.json" - } - } - }, - "put": { - "tags": [ - "Dev Boxes" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - }, - { - "name": "body", - "in": "body", - "description": "Represents a environment.", - "required": true, - "schema": { - "$ref": "#/definitions/DevBox" - } - } - ], - "description": "Creates or replaces a Dev Box.", - "operationId": "DevBoxes_CreateDevBox", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "original-uri" - }, - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DevBox" - } - }, - "201": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DevBox" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_CreateDevBox": { - "$ref": "./examples/DevBoxes_Create.json" - } - } - }, - "delete": { - "tags": [ - "Dev Boxes" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - } - ], - "description": "Deletes a Dev Box.", - "operationId": "DevBoxes_DeleteDevBox", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "operation-location" - }, - "responses": { - "202": { - "description": "The request was accepted.", - "schema": { - "$ref": "devcenter.json#/definitions/OperationStatus" - }, - "headers": { - "Operation-Location": { - "description": "URL to query for status of the operation.", - "type": "string" - } - } - }, - "204": { - "description": "Resource does not exist." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_DeleteDevBox": { - "$ref": "./examples/DevBoxes_Delete.json" - } - } - } - }, - "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:start": { - "post": { - "tags": [ - "Dev Boxes" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - } - ], - "description": "Starts a Dev Box", - "operationId": "DevBoxes_StartDevBox", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "operation-location" - }, - "responses": { - "202": { - "description": "The request was accepted.", - "schema": { - "$ref": "devcenter.json#/definitions/OperationStatus" - }, - "headers": { - "Operation-Location": { - "description": "URL to query for status of the operation.", - "type": "string" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_StartDevBox": { - "$ref": "./examples/DevBoxes_Start.json" - } - } - } - }, - "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop": { - "post": { - "tags": [ - "Dev Boxes" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - }, - { - "$ref": "#/parameters/HibernateParameter" - } - ], - "description": "Stops a Dev Box", - "operationId": "DevBoxes_StopDevBox", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "operation-location" - }, - "responses": { - "202": { - "description": "The request was accepted.", - "schema": { - "$ref": "devcenter.json#/definitions/OperationStatus" - }, - "headers": { - "Operation-Location": { - "description": "URL to query for status of the operation.", - "type": "string" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_StopDevBox": { - "$ref": "./examples/DevBoxes_Stop.json" - } - } - } - }, - "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restart": { - "post": { - "tags": [ - "Dev Boxes" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - } - ], - "description": "Restarts a Dev Box", - "operationId": "DevBoxes_RestartDevBox", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "operation-location" - }, - "responses": { - "202": { - "description": "The request was accepted.", - "schema": { - "$ref": "devcenter.json#/definitions/OperationStatus" - }, - "headers": { - "Operation-Location": { - "description": "URL to query for status of the operation.", - "type": "string" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_StartDevBox": { - "$ref": "./examples/DevBoxes_Restart.json" - } - } - } - }, - "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection": { - "get": { - "tags": [ - "Dev Boxes" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - } - ], - "description": "Gets RDP Connection info", - "operationId": "DevBoxes_GetRemoteConnection", - "responses": { - "200": { - "description": "The request completed successfully.", - "schema": { - "$ref": "#/definitions/RemoteConnection" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_GetRemoteConnection": { - "$ref": "./examples/DevBoxes_GetRemoteConnection.json" - } - } - } - }, - "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions": { - "get": { - "tags": [ - "DevBoxActions" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - } - ], - "description": "Lists actions on a Dev Box.", - "operationId": "DevBoxes_ListActions", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DevBoxActionsListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_ListActions": { - "$ref": "./examples/DevBoxActions_List.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-odata": "#/definitions/DevBoxAction" - } - }, - "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}": { - "get": { - "tags": [ - "DevBoxActions" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - }, - { - "$ref": "#/parameters/DevBoxActionNameParameter" - } - ], - "description": "Gets an action.", - "operationId": "DevBoxes_GetAction", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DevBoxAction" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_GetAction": { - "$ref": "./examples/DevBoxActions_Get.json" - } - } - } - }, - "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:skip": { - "post": { - "tags": [ - "DevBoxActions" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - }, - { - "$ref": "#/parameters/DevBoxActionNameParameter" - } - ], - "description": "Skips an occurrence of an action.", - "operationId": "DevBoxes_SkipAction", - "responses": { - "204": { - "description": "No content" - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_SkipAction": { - "$ref": "./examples/DevBoxActions_Skip.json" - } - } - } - }, - "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:delay": { - "post": { - "tags": [ - "DevBoxActions" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - }, - { - "$ref": "#/parameters/DevBoxActionNameParameter" - }, - { - "$ref": "#/parameters/DevBoxActionDelayUntilParameter" - } - ], - "description": "Delays the occurrence of an action.", - "operationId": "DevBoxes_DelayAction", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DevBoxAction" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_DelayAction": { - "$ref": "./examples/DevBoxActions_Delay.json" - } - } - } - }, - "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions:delay": { - "post": { - "tags": [ - "DevBoxActions" - ], - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/DevBoxNameParameter" - }, - { - "$ref": "#/parameters/DevBoxActionDelayUntilParameter" - } - ], - "description": "Delays all actions.", - "operationId": "DevBoxes_DelayActions", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/DevBoxActionsDelayMultipleResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "DevBoxes_DelayActions": { - "$ref": "./examples/DevBoxActions_DelayMultiple.json" - }, - "DevBoxes_DelayActionsWithError": { - "$ref": "./examples/DevBoxActions_DelayMultipleWithError.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-odata": "#/definitions/DevBoxActionDelayResult" - } - } - }, - "definitions": { - "PoolListResult": { - "type": "object", - "description": "The Pool list result", - "properties": { - "value": { - "description": "Current page of results", - "type": "array", - "items": { - "$ref": "#/definitions/Pool" - } - }, - "nextLink": { - "type": "string", - "description": "The URL to get the next set of results." - } - }, - "required": [ - "value" - ] - }, - "Pool": { - "type": "object", - "description": "A pool of Dev Boxes.", - "properties": { - "name": { - "type": "string", - "description": "Pool name" - }, - "location": { - "description": "Azure region where Dev Boxes in the pool are located", - "type": "string" - }, - "osType": { - "description": "The operating system type of Dev Boxes in this pool", - "$ref": "#/definitions/OsType" - }, - "hardwareProfile": { - "description": "Hardware settings for the Dev Boxes created in this pool", - "$ref": "#/definitions/HardwareProfile" - }, - "hibernateSupport": { - "description": "Indicates whether hibernate is enabled/disabled or unknown.", - "$ref": "#/definitions/HibernateSupport" - }, - "storageProfile": { - "description": "Storage settings for Dev Box created in this pool", - "$ref": "#/definitions/StorageProfile" - }, - "imageReference": { - "description": "Image settings for Dev Boxes create in this pool", - "$ref": "#/definitions/ImageReference" - }, - "localAdministrator": { - "description": "Indicates whether owners of Dev Boxes in this pool are local administrators on the Dev Boxes.", - "$ref": "#/definitions/LocalAdminStatus" - }, - "stopOnDisconnect": { - "description": "Stop on disconnect configuration settings for Dev Boxes created in this pool.", - "$ref": "#/definitions/StopOnDisconnectConfiguration" - }, - "healthStatus": { - "description": "Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes.", - "$ref": "#/definitions/PoolHealthStatus" - } - }, - "required": [ - "name", - "location", - "healthStatus" - ] - }, - "PoolHealthStatus": { - "description": "Pool status indicating whether a pool is available to create Dev Boxes.", - "enum": [ - "Unknown", - "Pending", - "Healthy", - "Warning", - "Unhealthy" - ], - "type": "string", - "x-ms-enum": { - "name": "PoolHealthStatus", - "modelAsString": true, - "values": [ - { - "value": "Unknown", - "description": "The pool health status is not known." - }, - { - "value": "Pending", - "description": "The pool health status waiting for health checks to run." - }, - { - "value": "Healthy", - "description": "The pool health status is healthy." - }, - { - "value": "Warning", - "description": "The pool health status has one or more warnings." - }, - { - "value": "Unhealthy", - "description": "The pool health status is not healthy." - } - ] - } - }, - "HibernateSupport": { - "description": "Indicates whether hibernate is supported and enabled, disabled, or unsupported by the operating system. Unknown hibernate support is represented as null.", - "enum": [ - "Enabled", - "Disabled", - "OsUnsupported" - ], - "type": "string", - "x-ms-enum": { - "name": "HibernateSupport", - "modelAsString": true, - "values": [ - { - "value": "Enabled", - "description": "Hibernate is enabled." - }, - { - "value": "Disabled", - "description": "Hibernate is not enabled." - }, - { - "value": "OsUnsupported", - "description": "Hibernate is not supported by the operating system." - } - ] - } - }, - "LocalAdminStatus": { - "description": "Indicates whether owners of Dev Boxes in a pool are local administrators on the Dev Boxes.", - "enum": [ - "Enabled", - "Disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "LocalAdminStatus", - "modelAsString": true, - "values": [ - { - "value": "Enabled", - "description": "Owners of Dev Boxes in the pool are local administrators on the Dev Boxes." - }, - { - "value": "Disabled", - "description": "Owners of Dev Boxes in the pool are not local administrators on the Dev Boxes." - } - ] - } - }, - "StopOnDisconnectEnableStatus": { - "description": "Indicates whether the feature to stop the devbox on disconnect once the grace period has lapsed is enabled.", - "enum": [ - "Enabled", - "Disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "StopOnDisconnectEnableStatus", - "modelAsString": true, - "values": [ - { - "value": "Enabled", - "description": "Stop on disconnect is enabled on the Dev Box." - }, - { - "value": "Disabled", - "description": "Stop on disconnect is not enabled on the Dev Box." - } - ] - } - }, - "ScheduleListResult": { - "type": "object", - "description": "The Schedule list result", - "properties": { - "value": { - "description": "Current page of results", - "type": "array", - "items": { - "$ref": "#/definitions/Schedule" - } - }, - "nextLink": { - "type": "string", - "description": "The URL to get the next set of results." - } - }, - "required": [ - "value" - ] - }, - "Schedule": { - "type": "object", - "description": "A Schedule to execute action.", - "properties": { - "name": { - "description": "Display name for the Schedule", - "type": "string" - }, - "type": { - "description": "Supported type this scheduled task represents.", - "$ref": "#/definitions/ScheduledType" - }, - "frequency": { - "description": "The frequency of this scheduled task.", - "$ref": "#/definitions/ScheduledFrequency" - }, - "time": { - "description": "The target time to trigger the action. The format is HH:MM.", - "type": "string" - }, - "timeZone": { - "description": "The IANA timezone id at which the schedule should execute.", - "type": "string" - } - }, - "required": [ - "name", - "type", - "frequency", - "time", - "timeZone" - ] - }, - "ScheduledType": { - "description": "The supported types for a scheduled task.", - "enum": [ - "StopDevBox" - ], - "type": "string", - "x-ms-enum": { - "name": "ScheduledType", - "modelAsString": true, - "values": [ - { - "value": "StopDevBox", - "description": "The scheduled task will stop impacted Dev Boxes." - } - ] - } - }, - "ScheduledFrequency": { - "description": "The frequency of task execution.", - "enum": [ - "Daily" - ], - "type": "string", - "x-ms-enum": { - "name": "ScheduledFrequency", - "modelAsString": true, - "values": [ - { - "value": "Daily", - "description": "The scheduled task will run every day." - } - ] - } - }, - "DevBoxListResult": { - "type": "object", - "description": "The Dev Box list result", - "properties": { - "value": { - "description": "The list of DevBox Dev Boxes", - "type": "array", - "items": { - "$ref": "#/definitions/DevBox" - } - }, - "nextLink": { - "type": "string", - "description": "The URL to get the next set of results." - } - }, - "required": [ - "value" - ] - }, - "DevBox": { - "type": "object", - "description": "A Dev Box", - "properties": { - "name": { - "description": "Display name for the Dev Box", - "type": "string", - "readOnly": true - }, - "projectName": { - "description": "Name of the project this Dev Box belongs to", - "type": "string", - "readOnly": true - }, - "poolName": { - "description": "The name of the Dev Box pool this machine belongs to.", - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", - "minLength": 3, - "maxLength": 63, - "x-ms-mutability": [ - "read", - "create" - ] - }, - "hibernateSupport": { - "description": "Indicates whether hibernate is enabled/disabled or unknown.", - "$ref": "#/definitions/HibernateSupport", - "readOnly": true - }, - "provisioningState": { - "description": "The current provisioning state of the Dev Box.", - "type": "string", - "readOnly": true - }, - "actionState": { - "description": "The current action state of the Dev Box. This is state is based on previous action performed by user.", - "type": "string", - "readOnly": true - }, - "powerState": { - "description": "The current power state of the Dev Box.", - "$ref": "#/definitions/PowerState", - "readOnly": true - }, - "uniqueId": { - "description": "A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", - "type": "string", - "readOnly": true - }, - "error": { - "description": "Provisioning or action error details. Populated only for error states.", - "readOnly": true, - "$ref": "devcenter.json#/definitions/CloudErrorBody" - }, - "location": { - "description": "Azure region where this Dev Box is located. This will be the same region as the Virtual Network it is attached to.", - "type": "string", - "readOnly": true - }, - "osType": { - "description": "The operating system type of this Dev Box.", - "$ref": "#/definitions/OsType", - "readOnly": true - }, - "user": { - "type": "string", - "description": "The AAD object id of the user this Dev Box is assigned to.", - "readOnly": true - }, - "hardwareProfile": { - "description": "Information about the Dev Box's hardware resources", - "$ref": "#/definitions/HardwareProfile", - "readOnly": true - }, - "storageProfile": { - "description": "Storage settings for this Dev Box", - "$ref": "#/definitions/StorageProfile", - "readOnly": true - }, - "imageReference": { - "description": "Information about the image used for this Dev Box", - "$ref": "#/definitions/ImageReference", - "readOnly": true - }, - "createdTime": { - "description": "Creation time of this Dev Box", - "type": "string", - "readOnly": true, - "format": "date-time" - }, - "localAdministrator": { - "description": "Indicates whether the owner of the Dev Box is a local administrator.", - "$ref": "#/definitions/LocalAdminStatus" - } - }, - "required": [ - "poolName" - ] - }, - "OsType": { - "type": "string", - "enum": [ - "Windows" - ], - "description": "The operating system type.", - "x-ms-enum": { - "name": "OsType", - "modelAsString": true, - "values": [ - { - "value": "Windows", - "description": "The Windows operating system." - } - ] - } - }, - "HardwareProfile": { - "description": "Hardware specifications for the Dev Box.", - "type": "object", - "properties": { - "skuName": { - "description": "The name of the SKU", - "type": "string", - "readOnly": true - }, - "vCPUs": { - "description": "The number of vCPUs available for the Dev Box.", - "type": "integer", - "format": "int32", - "readOnly": true - }, - "memoryGB": { - "description": "The amount of memory available for the Dev Box.", - "type": "integer", - "format": "int32", - "readOnly": true - } - } - }, - "StorageProfile": { - "type": "object", - "description": "Storage settings for the Dev Box's disks", - "properties": { - "osDisk": { - "$ref": "#/definitions/OSDisk" - } - } - }, - "OSDisk": { - "type": "object", - "description": "Settings for the operating system disk.", - "properties": { - "diskSizeGB": { - "description": "The size of the OS Disk in gigabytes.", - "type": "integer", - "format": "int32", - "readOnly": true - } - } - }, - "ImageReference": { - "description": "Specifies information about the image used", - "type": "object", - "properties": { - "name": { - "description": "The name of the image used.", - "type": "string", - "readOnly": true - }, - "version": { - "description": "The version of the image.", - "type": "string", - "readOnly": true - }, - "operatingSystem": { - "description": "The operating system of the image.", - "type": "string", - "readOnly": true - }, - "osBuildNumber": { - "description": "The operating system build number of the image.", - "type": "string", - "readOnly": true - }, - "publishedDate": { - "description": "The datetime that the backing image version was published.", - "type": "string", - "readOnly": true, - "format": "date-time" - } - } - }, - "RemoteConnection": { - "description": "Provides remote connection information for a Dev Box.", - "type": "object", - "properties": { - "webUrl": { - "description": "URL to open a browser based RDP session.", - "type": "string" - }, - "rdpConnectionUrl": { - "description": "Link to open a Remote Desktop session.", - "type": "string" - } - } - }, - "PowerState": { - "type": "string", - "enum": [ - "Unknown", - "Running", - "Deallocated", - "PoweredOff", - "Hibernated" - ], - "description": "The power states of a Dev Box.", - "x-ms-enum": { - "name": "PowerState", - "modelAsString": true, - "values": [ - { - "value": "Unknown", - "description": "The Dev Box power state is not known." - }, - { - "value": "Running", - "description": "The Dev Box is running." - }, - { - "value": "Deallocated", - "description": "The Dev Box is deallocated." - }, - { - "value": "PoweredOff", - "description": "The Dev Box is powered off." - }, - { - "value": "Hibernated", - "description": "The Dev Box is hibernated." - } - ] - } - }, - "StopOnDisconnectConfiguration": { - "type": "object", - "description": "Stop on disconnect configuration settings for Dev Boxes created in this pool.", - "properties": { - "status": { - "description": "Indicates whether the feature to stop the devbox on disconnect once the grace period has lapsed is enabled.", - "$ref": "#/definitions/StopOnDisconnectEnableStatus" - }, - "gracePeriodMinutes": { - "description": "The specified time in minutes to wait before stopping a Dev Box once disconnect is detected.", - "type": "integer", - "format": "int32" - } - }, - "required": [ - "status" - ] - }, - "DevBoxActionsDelayMultipleResult": { - "type": "object", - "description": "The actions list result", - "properties": { - "value": { - "description": "Current page of results", - "type": "array", - "items": { - "$ref": "#/definitions/DevBoxActionDelayResult" - } - }, - "nextLink": { - "type": "string", - "description": "The URL to get the next set of results." - } - }, - "required": [ - "value" - ] - }, - "DevBoxActionDelayResult": { - "type": "object", - "description": "The action delay result", - "properties": { - "name": { - "type": "string", - "description": "The name of the action." - }, - "result": { - "$ref": "#/definitions/DevBoxActionDelayResultStatus", - "description": "The result of the delay operation on this action." - }, - "action": { - "description": "The delayed action", - "type": "object", - "$ref": "#/definitions/DevBoxAction" - }, - "error": { - "description": "Information about the error that occurred. Only populated on error.", - "type": "object", - "$ref": "devcenter.json#/definitions/CloudErrorBody" - } - }, - "required": [ - "name", - "result" - ] - }, - "DevBoxActionDelayResultStatus": { - "type": "string", - "enum": [ - "Succeeded", - "Failed" - ], - "description": "The result of the delay operation on this action.", - "x-ms-enum": { - "name": "DevBoxActionDelayResultStatus", - "modelAsString": true, - "values": [ - { - "value": "Succeeded", - "description": "The delay operation succeeded." - }, - { - "value": "Failed", - "description": "The delay operation failed." - } - ] - } - }, - "DevBoxActionsListResult": { - "type": "object", - "description": "The actions list result", - "properties": { - "value": { - "description": "Current page of results", - "type": "array", - "items": { - "$ref": "#/definitions/DevBoxAction" - } - }, - "nextLink": { - "type": "string", - "description": "The URL to get the next set of results." - } - }, - "required": [ - "value" - ] - }, - "DevBoxAction": { - "type": "object", - "description": "An action which will take place on a Dev Box.", - "properties": { - "name": { - "description": "The name of the action.", - "type": "string" - }, - "actionType": { - "description": "The action that will be taken.", - "$ref": "#/definitions/DevBoxActionType" - }, - "sourceId": { - "description": "The id of the resource which triggered this action", - "type": "string" - }, - "suspendedUntil": { - "description": "The earliest time that the action could occur (UTC).", - "type": "string", - "format": "date-time" - }, - "next": { - "description": "Details about the next run of this action.", - "$ref": "#/definitions/DevBoxNextAction" - } - }, - "required": [ - "name", - "actionType", - "sourceId" - ] - }, - "DevBoxActionType": { - "description": "The type of action which will take place on a Dev Box.", - "type": "string", - "enum": [ - "Stop" - ], - "x-ms-enum": { - "name": "DevBoxActionType", - "modelAsString": true, - "values": [ - { - "value": "Stop", - "description": "The action will stop the Dev Box." - } - ] - } - }, - "DevBoxNextAction": { - "description": "Details about the next run of an action.", - "type": "object", - "properties": { - "scheduledTime": { - "description": "The time the action will be triggered (UTC).", - "type": "string", - "format": "date-time" - } - }, - "required": [ - "scheduledTime" - ] - } - }, - "parameters": { - "PoolNameParameter": { - "name": "poolName", - "description": "The name of a pool of Dev Boxes.", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", - "minLength": 3, - "maxLength": 63, - "in": "path", - "x-ms-parameter-location": "method" - }, - "ScheduleNameParameter": { - "name": "scheduleName", - "description": "The name of a schedule.", - "required": true, - "type": "string", - "in": "path", - "x-ms-parameter-location": "method" - }, - "DevBoxNameParameter": { - "name": "devBoxName", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", - "minLength": 3, - "maxLength": 63, - "description": "The name of a Dev Box.", - "x-ms-parameter-location": "method" - }, - "HibernateParameter": { - "name": "hibernate", - "in": "query", - "required": false, - "type": "boolean", - "description": "Optional parameter to hibernate the dev box.", - "x-ms-parameter-location": "method" - }, - "DevBoxActionNameParameter": { - "name": "actionName", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", - "minLength": 3, - "maxLength": 63, - "description": "The name of an action that will take place on a Dev Box.", - "x-ms-parameter-location": "method" - }, - "DevBoxActionDelayUntilParameter": { - "name": "until", - "description": "The time to delay the Dev Box action or actions until.", - "required": true, - "type": "string", - "format": "date-time", - "in": "query", - "x-ms-parameter-location": "method" - } - } -} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/devcenter.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/devcenter.json index 3f7b9108c3ad..acc05839e320 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/devcenter.json +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/devcenter.json @@ -1,81 +1,127 @@ { "swagger": "2.0", "info": { + "title": "DevCenter", "version": "2023-04-01", - "title": "DevCenter" + "description": "DevCenter service", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] }, + "schemes": [ + "https" + ], "x-ms-parameterized-host": { "hostTemplate": "{endpoint}", "useSchemePrefix": false, "parameters": [ { - "$ref": "devcenter.json#/parameters/EndpointParameter" + "name": "endpoint", + "in": "path", + "description": "The DevCenter-specific URI to operate on.", + "required": true, + "type": "string" } ] }, - "schemes": [ - "https" - ], - "consumes": [ + "produces": [ "application/json" ], - "produces": [ + "consumes": [ "application/json" ], "security": [ { - "AADToken": [ - "user_impersonation" + "OAuth2Auth": [ + "https://devcenter.azure.com/.default" ] } ], "securityDefinitions": { - "AADToken": { + "OAuth2Auth": { "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { - "user_impersonation": "impersonate your user account" + "https://devcenter.azure.com/.default": "" } } }, + "tags": [], "paths": { - "/projects": { + "/devboxes": { "get": { - "tags": [ - "Projects" - ], - "description": "Lists all projects.", + "operationId": "DevBoxesDevCenter_ListAllDevBoxes", + "description": "Lists Dev Boxes that the caller has access to in the DevCenter.", "parameters": [ { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/FilterParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedDevBox" + } }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Lists Dev Boxes that the caller has access to in the DevCenter.": { + "$ref": "./examples/DevBoxesDevCenterOperations_ListAllDevBoxes.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/projects": { + "get": { + "operationId": "DevCenterOperations_ListProjects", + "description": "Lists all projects.", + "parameters": [ { - "$ref": "#/parameters/TopParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" } ], - "operationId": "DevCenter_ListProjects", "responses": { "200": { - "description": "OK. The request has succeeded.", + "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/ProjectListResult" + "$ref": "#/definitions/PagedProject" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "DevCenter_ListProjects": { - "$ref": "./examples/Projects_ListByDevCenter.json" + "Lists all projects.": { + "$ref": "./examples/DevCenterOperations_ListProjects.json" } }, "x-ms-pageable": { @@ -85,257 +131,3622 @@ }, "/projects/{projectName}": { "get": { - "tags": [ - "Projects" - ], + "operationId": "DevCenterOperations_GetProject", "description": "Gets a project.", "parameters": [ { - "$ref": "#/parameters/ProjectNameMethodParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" } ], - "operationId": "DevCenter_GetProject", "responses": { "200": { - "description": "OK. The request has succeeded.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/Project" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "DevCenter_GetProject": { - "$ref": "./examples/Projects_Get.json" + "Gets a project.": { + "$ref": "./examples/DevCenterOperations_GetProject.json" } } } - } - }, - "definitions": { - "ProjectListResult": { - "description": "Results of the project list operation.", - "type": "object", - "properties": { - "value": { - "description": "Current page of results.", - "type": "array", - "items": { - "$ref": "#/definitions/Project" - } - }, - "nextLink": { - "description": "URL to get the next set of results if there are any.", - "type": "string" - } - }, - "required": [ - "value" - ] }, - "Project": { - "description": "Project details.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the project" + "/projects/{projectName}/catalogs": { + "get": { + "operationId": "EnvironmentsOperations_ListCatalogs", + "description": "Lists all of the catalogs available for a project.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedCatalog" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } }, - "description": { - "type": "string", - "description": "Description of the project." + "x-ms-examples": { + "Lists all of the catalogs available for a project.": { + "$ref": "./examples/EnvironmentsOperations_ListCatalogs.json" + } }, - "maxDevBoxesPerUser": { - "type": "integer", - "format": "int32", - "minimum": 0, - "description": "When specified, indicates the maximum number of Dev Boxes a single user can create across all pools in the project." + "x-ms-pageable": { + "nextLinkName": "nextLink" } - }, - "required": [ - "name" - ] + } }, - "CloudError": { - "x-ms-external": true, - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "description": "Error body", - "$ref": "#/definitions/CloudErrorBody" + "/projects/{projectName}/catalogs/{catalogName}": { + "get": { + "operationId": "EnvironmentsOperations_GetCatalog", + "description": "Gets the specified catalog within the project", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of the catalog.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/Catalog" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets the specified catalog within the project": { + "$ref": "./examples/EnvironmentsOperations_GetCatalog.json" + } } - }, - "description": "An error response from the service." + } }, - "CloudErrorBody": { - "x-ms-external": true, - "description": "An error response from the service.", - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "string", - "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." - }, - "message": { - "type": "string", - "description": "A message describing the error, intended to be suitable for display in a user interface." + "/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions": { + "get": { + "operationId": "EnvironmentsOperations_ListEnvironmentDefinitionsByCatalog", + "description": "Lists all environment definitions available within a catalog.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "The DevCenter Project upon which to execute operations.", + "required": true, + "type": "string" + }, + { + "name": "catalogName", + "in": "path", + "description": "The name of the catalog", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedEnvironmentDefinition" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } }, - "target": { - "type": "string", - "description": "The target of the particular error. For example, the name of the property in error." + "x-ms-examples": { + "Lists all environment definitions available within a catalog.": { + "$ref": "./examples/EnvironmentsOperations_ListEnvironmentDefinitionsByCatalog.json" + } }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudErrorBody" - }, - "description": "A list of additional details about the error." + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, - "OperationStatus": { - "description": "The current status of an async operation", - "type": "object", - "properties": { - "id": { - "description": "Fully qualified ID for the operation status.", - "type": "string" - }, - "name": { - "description": "The operation id name", - "type": "string" - }, - "status": { - "description": "Provisioning state of the resource.", - "type": "string" - }, - "resourceId": { - "description": "The id of the resource.", - "type": "string" - }, - "startTime": { - "description": "The start time of the operation", - "type": "string", - "format": "date-time" - }, - "endTime": { - "description": "The end time of the operation", - "type": "string", - "format": "date-time" - }, - "percentComplete": { - "description": "Percent of the operation that is complete", - "type": "number", - "minimum": 0, - "maximum": 100 - }, - "properties": { - "description": "Custom operation properties, populated only for a successful operation.", - "type": "object" - }, - "error": { - "description": "Operation Error message", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "The error code." + "/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{definitionName}": { + "get": { + "operationId": "EnvironmentsOperations_GetEnvironmentDefinition", + "description": "Get an environment definition from a catalog.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of the catalog.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "definitionName", + "in": "path", + "description": "Name of the environment definition.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/EnvironmentDefinition" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, - "message": { - "type": "string", - "description": "The error message." + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } + }, + "x-ms-examples": { + "Get an environment definition from a catalog.": { + "$ref": "./examples/EnvironmentsOperations_GetEnvironmentDefinition.json" + } } - }, - "required": [ - "status" - ] - } - }, - "parameters": { - "ProjectNameParameter": { - "name": "projectName", - "description": "The DevCenter Project upon which to execute operations.", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", - "minLength": 3, - "maxLength": 63, - "in": "path", - "x-ms-parameter-location": "client" - }, - "ProjectNameMethodParameter": { - "name": "projectName", - "description": "The DevCenter Project upon which to execute operations.", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$", - "minLength": 3, - "maxLength": 63, - "in": "path", - "x-ms-parameter-location": "method" - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to be used with the HTTP request.", - "x-ms-parameter-location": "client" - }, - "FilterParameter": { - "name": "filter", - "in": "query", - "description": "An OData filter clause to apply to the operation.", - "type": "string", - "required": false, - "x-ms-parameter-location": "method" + } }, - "TopParameter": { - "name": "top", - "in": "query", - "description": "The maximum number of resources to return from the operation. Example: 'top=10'.", - "type": "integer", - "format": "int32", - "required": false, - "x-ms-parameter-location": "method" - }, - "UserIdParameter": { - "name": "userId", - "in": "path", - "required": true, - "x-ms-client-default": "me", - "type": "string", - "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$", - "minLength": 2, - "maxLength": 36, - "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", - "x-ms-parameter-location": "method" - }, - "EndpointParameter": { - "name": "endpoint", - "description": "The DevCenter-specific URI to operate on.", + "/projects/{projectName}/environmentDefinitions": { + "get": { + "operationId": "EnvironmentsOperations_ListEnvironmentDefinitions", + "description": "Lists all environment definitions available for a project.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "The DevCenter Project upon which to execute operations.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedEnvironmentDefinition" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Lists all environment definitions available for a project.": { + "$ref": "./examples/EnvironmentsOperations_ListEnvironmentDefinitions.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/projects/{projectName}/environmentTypes": { + "get": { + "operationId": "EnvironmentsOperations_ListEnvironmentTypes", + "description": "Lists all environment types configured for a project.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "The DevCenter Project upon which to execute operations.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedEnvironmentType" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Lists all environment types configured for a project.": { + "$ref": "./examples/EnvironmentsOperations_ListEnvironmentTypes.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/projects/{projectName}/environments": { + "get": { + "operationId": "EnvironmentsOperations_ListAllEnvironments", + "description": "Lists the environments for a project.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "The DevCenter Project upon which to execute operations.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedEnvironment" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Lists the environments for a project.": { + "$ref": "./examples/EnvironmentsOperations_ListAllEnvironments.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/projects/{projectName}/operationstatuses/{operationId}": { + "get": { + "operationId": "SharedOperations_GetProjectOperationStatus", + "description": "Get the status of an operation.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "operationId", + "in": "path", + "description": "Fully qualified ID for the operation status.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationStatus" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get the status of an operation.": { + "$ref": "./examples/SharedOperations_GetProjectOperationStatus.json" + } + } + } + }, + "/projects/{projectName}/pools": { + "get": { + "operationId": "DevBoxesOperations_ListPools", + "description": "Lists available pools", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedPool" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Lists available pools": { + "$ref": "./examples/DevBoxesOperations_ListPools.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/projects/{projectName}/pools/{poolName}": { + "get": { + "operationId": "DevBoxesOperations_GetPool", + "description": "Gets a pool", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "poolName", + "in": "path", + "description": "Pool name", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/Pool" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets a pool": { + "$ref": "./examples/DevBoxesOperations_GetPool.json" + } + } + } + }, + "/projects/{projectName}/pools/{poolName}/schedules": { + "get": { + "operationId": "DevBoxesOperations_ListSchedules", + "description": "Lists available schedules for a pool.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "poolName", + "in": "path", + "description": "Pool name", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedSchedule" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Lists available schedules for a pool.": { + "$ref": "./examples/DevBoxesOperations_ListSchedules.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}": { + "get": { + "operationId": "DevBoxesOperations_GetSchedule", + "description": "Gets a schedule.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "poolName", + "in": "path", + "description": "Pool name", + "required": true, + "type": "string" + }, + { + "name": "scheduleName", + "in": "path", + "description": "Display name for the Schedule", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/Schedule" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets a schedule.": { + "$ref": "./examples/DevBoxesOperations_GetSchedule.json" + } + } + } + }, + "/projects/{projectName}/users/{userId}/devboxes": { + "get": { + "operationId": "DevBoxesOperations_ListDevBoxes", + "description": "Lists Dev Boxes in the project for a particular user.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "The DevCenter Project upon which to execute operations.", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedDevBox" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Lists Dev Boxes in the project for a particular user.": { + "$ref": "./examples/DevBoxesOperations_ListDevBoxes.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}": { + "get": { + "operationId": "DevBoxesOperations_GetDevBox", + "description": "Gets a Dev Box", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context", + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$" + }, + { + "name": "devBoxName", + "in": "path", + "description": "Display name for the Dev Box", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/DevBox" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets a Dev Box": { + "$ref": "./examples/DevBoxesOperations_GetDevBox.json" + } + } + }, + "put": { + "operationId": "DevBoxesOperations_CreateDevBox", + "description": "Creates or replaces a Dev Box.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "The DevCenter Project upon which to execute the operation.", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + "required": true, + "type": "string" + }, + { + "name": "devBoxName", + "in": "path", + "description": "The name of a Dev Box.", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the owner of the Dev Box as local administrator", + "required": true, + "schema": { + "$ref": "#/definitions/DevBox" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/DevBox" + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "schema": { + "$ref": "#/definitions/DevBox" + }, + "headers": { + "Location": { + "type": "string", + "format": "uri", + "description": "The location of an instance of DevBox" + }, + "Operation-Location": { + "type": "string" + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Creates or replaces a Dev Box.": { + "$ref": "./examples/DevBoxesOperations_CreateDevBox.json" + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "DevBoxesOperations_DeleteDevBox", + "description": "Deletes a Dev Box.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "The DevCenter Project upon which to execute operations.", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + "required": true, + "type": "string" + }, + { + "name": "devBoxName", + "in": "path", + "description": "The name of a Dev Box.", + "required": true, + "type": "string" + } + ], + "responses": { + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "schema": { + "$ref": "#/definitions/OperationStatus" + }, + "headers": { + "Location": { + "type": "string" + }, + "Operation-Location": { + "type": "string" + } + } + }, + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Deletes a Dev Box.": { + "$ref": "./examples/DevBoxesOperations_DeleteDevBox.json" + } + }, + "x-ms-long-running-operation": true + } + }, + "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:start": { + "post": { + "operationId": "DevBoxesOperations_StartDevBox", + "description": "Starts a Dev Box", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context", + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$" + }, + { + "name": "devBoxName", + "in": "path", + "description": "Display name for the Dev Box", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + } + ], + "responses": { + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "schema": { + "$ref": "#/definitions/OperationStatus" + }, + "headers": { + "Operation-Location": { + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Starts a Dev Box": { + "$ref": "./examples/DevBoxesOperations_StartDevBox.json" + } + }, + "x-ms-long-running-operation": true + } + }, + "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop": { + "post": { + "operationId": "DevBoxesOperations_StopDevBox", + "description": "Stops a Dev Box", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context", + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$" + }, + { + "name": "devBoxName", + "in": "path", + "description": "Display name for the Dev Box", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "hibernate", + "in": "query", + "description": "Optional parameter to hibernate the dev box.", + "required": false, + "type": "boolean" + } + ], + "responses": { + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "schema": { + "$ref": "#/definitions/OperationStatus" + }, + "headers": { + "Operation-Location": { + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Stops a Dev Box": { + "$ref": "./examples/DevBoxesOperations_StopDevBox.json" + } + }, + "x-ms-long-running-operation": true + } + }, + "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restart": { + "post": { + "operationId": "DevBoxesOperations_RestartDevBox", + "description": "Restarts a Dev Box", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context", + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$" + }, + { + "name": "devBoxName", + "in": "path", + "description": "Display name for the Dev Box", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + } + ], + "responses": { + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "schema": { + "$ref": "#/definitions/OperationStatus" + }, + "headers": { + "Operation-Location": { + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Restarts a Dev Box": { + "$ref": "./examples/DevBoxesOperations_RestartDevBox.json" + } + }, + "x-ms-long-running-operation": true + } + }, + "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions": { + "get": { + "operationId": "DevBoxesOperations_ListDevBoxActions", + "description": "Lists actions on a Dev Box.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context", + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$" + }, + { + "name": "devBoxName", + "in": "path", + "description": "Display name for the Dev Box", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedDevBoxAction" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Lists actions on a Dev Box.": { + "$ref": "./examples/DevBoxesOperations_ListDevBoxActions.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}": { + "get": { + "operationId": "DevBoxesOperations_GetDevBoxAction", + "description": "Gets an action.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context", + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$" + }, + { + "name": "devBoxName", + "in": "path", + "description": "Display name for the Dev Box", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "actionName", + "in": "path", + "description": "The name of the action.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/DevBoxAction" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets an action.": { + "$ref": "./examples/DevBoxesOperations_GetDevBoxAction.json" + } + } + } + }, + "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:skip": { + "post": { + "operationId": "DevBoxesOperations_SkipAction", + "description": "Skips an occurrence of an action.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context", + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$" + }, + { + "name": "devBoxName", + "in": "path", + "description": "Display name for the Dev Box", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "actionName", + "in": "path", + "description": "The name of the action.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Skips an occurrence of an action.": { + "$ref": "./examples/DevBoxesOperations_SkipAction.json" + } + } + } + }, + "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:delay": { + "post": { + "operationId": "DevBoxesOperations_DelayAction", + "description": "Delays the occurrence of an action.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context", + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$" + }, + { + "name": "devBoxName", + "in": "path", + "description": "Display name for the Dev Box", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "actionName", + "in": "path", + "description": "The name of the action.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "until", + "in": "query", + "description": "The time to delay the Dev Box action or actions until.", + "required": true, + "type": "string", + "format": "date-time", + "x-ms-client-name": "delayUntil" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/DevBoxAction" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Delays the occurrence of an action.": { + "$ref": "./examples/DevBoxesOperations_DelayAction.json" + } + } + } + }, + "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions:delay": { + "post": { + "operationId": "DevBoxesOperations_DelayAllActions", + "description": "Delays all actions.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context", + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$" + }, + { + "name": "devBoxName", + "in": "path", + "description": "Display name for the Dev Box", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "until", + "in": "query", + "description": "The time to delay the Dev Box action or actions until.", + "required": true, + "type": "string", + "format": "date-time", + "x-ms-client-name": "delayUntil" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedDevBoxActionDelayResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Delays all actions.": { + "$ref": "./examples/DevBoxesOperations_DelayAllActions.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection": { + "get": { + "operationId": "DevBoxesOperations_GetRemoteConnection", + "description": "Gets RDP Connection info", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "The DevCenter Project upon which to execute operations.", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + "required": true, + "type": "string" + }, + { + "name": "devBoxName", + "in": "path", + "description": "The name of a Dev Box.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/RemoteConnection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets RDP Connection info": { + "$ref": "./examples/DevBoxesOperations_GetRemoteConnection.json" + } + } + } + }, + "/projects/{projectName}/users/{userId}/environments": { + "get": { + "operationId": "EnvironmentsOperations_ListEnvironments", + "description": "Lists the environments for a project and user.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "The DevCenter Project upon which to execute operations.", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedEnvironment" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Lists the environments for a project and user.": { + "$ref": "./examples/EnvironmentsOperations_ListEnvironments.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/projects/{projectName}/users/{userId}/environments/{environmentName}": { + "get": { + "operationId": "EnvironmentsOperations_GetEnvironment", + "description": "Gets an environment", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "Name of the project", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context", + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$" + }, + { + "name": "environmentName", + "in": "path", + "description": "Environment name.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/Environment" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets an environment": { + "$ref": "./examples/EnvironmentsOperations_GetEnvironment.json" + } + } + }, + "put": { + "operationId": "EnvironmentsOperations_CreateOrUpdateEnvironment", + "description": "Creates or updates an environment.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "The DevCenter Project upon which to execute operations.", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + "required": true, + "type": "string" + }, + { + "name": "environmentName", + "in": "path", + "description": "The name of the environment.", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Represents an environment.", + "required": true, + "schema": { + "$ref": "#/definitions/Environment" + } + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "schema": { + "$ref": "#/definitions/Environment" + }, + "headers": { + "Operation-Location": { + "type": "string" + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Creates or updates an environment.": { + "$ref": "./examples/EnvironmentsOperations_CreateOrUpdateEnvironment.json" + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "EnvironmentsOperations_DeleteEnvironment", + "description": "Deletes an environment and all its associated resources", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "projectName", + "in": "path", + "description": "The DevCenter Project upon which to execute operations.", + "required": true, + "type": "string" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + "required": true, + "type": "string" + }, + { + "name": "environmentName", + "in": "path", + "description": "The name of the environment.", + "required": true, + "type": "string" + } + ], + "responses": { + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "schema": { + "$ref": "#/definitions/OperationStatus" + }, + "headers": { + "Location": { + "type": "string" + }, + "Operation-Location": { + "type": "string" + } + } + }, + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Deletes an environment and all its associated resources": { + "$ref": "./examples/EnvironmentsOperations_DeleteEnvironment.json" + } + }, + "x-ms-long-running-operation": true + } + }, + "/users/{userId}/devboxes": { + "get": { + "operationId": "DevBoxesDevCenter_ListAllDevBoxesByUser", + "description": "Lists Dev Boxes in the Dev Center for a particular user.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "userId", + "in": "path", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedDevBox" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Lists Dev Boxes in the Dev Center for a particular user.": { + "$ref": "./examples/DevBoxesDevCenterOperations_ListAllDevBoxesByUser.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "APIVersions": { + "type": "string", + "description": "DevCenter API versions", + "enum": [ + "2023-04-01" + ], + "x-ms-enum": { + "name": "APIVersions", + "modelAsString": true, + "values": [ + { + "name": "v2023_04_01", + "value": "2023-04-01", + "description": "The 2023-04-01 service API version" + } + ] + } + }, + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + }, + "x-ms-identifiers": [] + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "Azure.Core.azureLocation": { + "type": "string", + "description": "Represents an Azure geography region where supported resource providers live." + }, + "Azure.Core.uuid": { + "type": "string", + "format": "uuid", + "description": "Universally Unique Identifier" + }, + "Catalog": { + "type": "object", + "description": "A catalog.", + "properties": { + "name": { + "type": "string", + "description": "Name of the catalog.", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", + "readOnly": true + } + }, + "required": [ + "name" + ] + }, + "DevBox": { + "type": "object", + "description": "A Dev Box", + "properties": { + "name": { + "type": "string", + "description": "Display name for the Dev Box", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", + "readOnly": true + }, + "projectName": { + "type": "string", + "description": "Name of the project this Dev Box belongs to", + "readOnly": true + }, + "poolName": { + "type": "string", + "description": "The name of the Dev Box pool this machine belongs to.", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "hibernateSupport": { + "$ref": "#/definitions/HibernateSupport", + "description": "Indicates whether hibernate is enabled/disabled or unknown.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/DevBoxProvisioningState", + "description": "The current provisioning state of the Dev Box.", + "readOnly": true + }, + "actionState": { + "type": "string", + "description": "The current action state of the Dev Box. This is state is based on previous\naction performed by user.", + "readOnly": true + }, + "powerState": { + "$ref": "#/definitions/PowerState", + "description": "The current power state of the Dev Box.", + "readOnly": true + }, + "uniqueId": { + "$ref": "#/definitions/Azure.Core.uuid", + "description": "A unique identifier for the Dev Box. This is a GUID-formatted string (e.g.\n00000000-0000-0000-0000-000000000000).", + "readOnly": true + }, + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "Provisioning or action error details. Populated only for error states.", + "readOnly": true + }, + "location": { + "$ref": "#/definitions/Azure.Core.azureLocation", + "description": "Azure region where this Dev Box is located. This will be the same region as the\nVirtual Network it is attached to.", + "readOnly": true + }, + "osType": { + "$ref": "#/definitions/OsType", + "description": "The operating system type of this Dev Box.", + "readOnly": true + }, + "user": { + "$ref": "#/definitions/Azure.Core.uuid", + "description": "The AAD object id of the user this Dev Box is assigned to.", + "readOnly": true + }, + "hardwareProfile": { + "$ref": "#/definitions/HardwareProfile", + "description": "Information about the Dev Box's hardware resources", + "readOnly": true + }, + "storageProfile": { + "$ref": "#/definitions/StorageProfile", + "description": "Storage settings for this Dev Box", + "readOnly": true + }, + "imageReference": { + "$ref": "#/definitions/ImageReference", + "description": "Information about the image used for this Dev Box", + "readOnly": true + }, + "createdTime": { + "type": "string", + "format": "date-time", + "description": "Creation time of this Dev Box", + "readOnly": true + }, + "localAdministrator": { + "$ref": "#/definitions/LocalAdminStatus", + "description": "Indicates whether the owner of the Dev Box is a local administrator.", + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "required": [ + "name", + "poolName" + ] + }, + "DevBoxAction": { + "type": "object", + "description": "An action which will take place on a Dev Box.", + "properties": { + "name": { + "type": "string", + "description": "The name of the action.", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", + "readOnly": true + }, + "actionType": { + "$ref": "#/definitions/DevBoxActionType", + "description": "The action that will be taken." + }, + "sourceId": { + "type": "string", + "description": "The id of the resource which triggered this action" + }, + "suspendedUntil": { + "type": "string", + "format": "date-time", + "description": "The earliest time that the action could occur (UTC)." + }, + "next": { + "$ref": "#/definitions/DevBoxNextAction", + "description": "Details about the next run of this action." + } + }, + "required": [ + "name", + "actionType", + "sourceId" + ] + }, + "DevBoxActionDelayResult": { + "type": "object", + "description": "The action delay result", + "properties": { + "name": { + "type": "string", + "description": "The name of the action." + }, + "result": { + "$ref": "#/definitions/DevBoxActionDelayResultStatus", + "description": "The result of the delay operation on this action." + }, + "action": { + "$ref": "#/definitions/DevBoxAction", + "description": "The delayed action" + }, + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "Information about the error that occurred. Only populated on error." + } + }, + "required": [ + "name", + "result" + ] + }, + "DevBoxActionDelayResultStatus": { + "type": "string", + "description": "The result of the delay operation on this action.", + "enum": [ + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "DevBoxActionDelayResultStatus", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "The delay operation succeeded." + }, + { + "name": "Failed", + "value": "Failed", + "description": "The delay operation failed." + } + ] + } + }, + "DevBoxActionType": { + "type": "string", + "description": "The type of action which will take place on a Dev Box.", + "enum": [ + "Stop" + ], + "x-ms-enum": { + "name": "DevBoxActionType", + "modelAsString": true, + "values": [ + { + "name": "Stop", + "value": "Stop", + "description": "The action will stop the Dev Box." + } + ] + } + }, + "DevBoxNextAction": { + "type": "object", + "description": "Details about the next run of an action.", + "properties": { + "scheduledTime": { + "type": "string", + "format": "date-time", + "description": "The time the action will be triggered (UTC)." + } + }, + "required": [ + "scheduledTime" + ] + }, + "DevBoxProvisioningState": { + "type": "string", + "description": "Indicates the provisioning state of the Dev Box.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Creating", + "Deleting", + "Updating", + "Starting", + "Stopping", + "Provisioning", + "ProvisionedWithWarning", + "InGracePeriod", + "NotProvisioned" + ], + "x-ms-enum": { + "name": "DevBoxProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Dev Box was successfully provisioned" + }, + { + "name": "Failed", + "value": "Failed", + "description": "Dev Box failed to provision" + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Dev Box provision was canceled" + }, + { + "name": "Creating", + "value": "Creating", + "description": "Dev Box is being created" + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "Dev Box is being deleted" + }, + { + "name": "Updating", + "value": "Updating", + "description": "Dev Box is updating" + }, + { + "name": "Starting", + "value": "Starting", + "description": "Dev Box is starting" + }, + { + "name": "Stopping", + "value": "Stopping", + "description": "Dev Box is stopping" + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "Dev Box is provisioning" + }, + { + "name": "ProvisionedWithWarning", + "value": "ProvisionedWithWarning", + "description": "Dev Box was provisioned with warning" + }, + { + "name": "InGracePeriod", + "value": "InGracePeriod", + "description": "Dev Box is in grace period" + }, + { + "name": "NotProvisioned", + "value": "NotProvisioned", + "description": "Dev Box is not provisioned" + } + ] + } + }, + "Environment": { + "type": "object", + "description": "Properties of an environment.", + "properties": { + "parameters": { + "type": "object", + "description": "Parameters object for the environment.", + "additionalProperties": {} + }, + "name": { + "type": "string", + "description": "Environment name.", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", + "readOnly": true + }, + "environmentType": { + "type": "string", + "description": "Environment type.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "user": { + "$ref": "#/definitions/Azure.Core.uuid", + "description": "The AAD object id of the owner of this Environment.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/EnvironmentProvisioningState", + "description": "The provisioning state of the environment.", + "readOnly": true + }, + "resourceGroupId": { + "type": "string", + "description": "The identifier of the resource group containing the environment's resources.", + "readOnly": true + }, + "catalogName": { + "type": "string", + "description": "Name of the catalog.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "environmentDefinitionName": { + "type": "string", + "description": "Name of the environment definition.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "Provisioning error details. Populated only for error states.", + "readOnly": true + } + }, + "required": [ + "name", + "environmentType", + "catalogName", + "environmentDefinitionName" + ] + }, + "EnvironmentDefinition": { + "type": "object", + "description": "An environment definition.", + "properties": { + "id": { + "type": "string", + "description": "The ID of the environment definition." + }, + "name": { + "type": "string", + "description": "Name of the environment definition.", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", + "readOnly": true + }, + "catalogName": { + "type": "string", + "description": "Name of the catalog." + }, + "description": { + "type": "string", + "description": "A short description of the environment definition." + }, + "parameters": { + "type": "array", + "description": "Input parameters passed to an environment.", + "items": { + "$ref": "#/definitions/EnvironmentDefinitionParameter" + } + }, + "parametersSchema": { + "type": "string", + "description": "JSON schema defining the parameters object passed to an environment." + }, + "templatePath": { + "type": "string", + "description": "Path to the Environment Definition entrypoint file." + } + }, + "required": [ + "id", + "name", + "catalogName" + ] + }, + "EnvironmentDefinitionParameter": { + "type": "object", + "description": "Properties of an Environment Definition parameter", + "properties": { + "id": { + "type": "string", + "description": "Unique ID of the parameter" + }, + "name": { + "type": "string", + "description": "Display name of the parameter" + }, + "description": { + "type": "string", + "description": "Description of the parameter" + }, + "default": { + "type": "string", + "description": "Default value of the parameter" + }, + "type": { + "$ref": "#/definitions/ParameterType", + "description": "A string of one of the basic JSON types (number, integer, array, object,\nboolean, string)" + }, + "readOnly": { + "type": "boolean", + "description": "Whether or not this parameter is read-only. If true, default should have a\nvalue." + }, + "required": { + "type": "boolean", + "description": "Whether or not this parameter is required" + }, + "allowed": { + "type": "array", + "description": "An array of allowed values", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "type", + "required" + ] + }, + "EnvironmentProvisioningState": { + "type": "string", + "description": "The provisioning state of the environment.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Creating", + "Accepted", + "Deleting", + "Updating", + "Preparing", + "Running", + "Syncing", + "MovingResources", + "TransientFailure", + "StorageProvisioningFailed" + ], + "x-ms-enum": { + "name": "EnvironmentProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "The environment was successfully provisioned." + }, + { + "name": "Failed", + "value": "Failed", + "description": "The environment failed to provision." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "The environment provisioning was canceled." + }, + { + "name": "Creating", + "value": "Creating", + "description": "The environment is creating." + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "The environment was accepted." + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "The environment is deleting." + }, + { + "name": "Updating", + "value": "Updating", + "description": "The environment is updating." + }, + { + "name": "Preparing", + "value": "Preparing", + "description": "The environment is preparing." + }, + { + "name": "Running", + "value": "Running", + "description": "The environment is running." + }, + { + "name": "Syncing", + "value": "Syncing", + "description": "The environment is Syncing." + }, + { + "name": "MovingResources", + "value": "MovingResources", + "description": "The environment is moving resources." + }, + { + "name": "TransientFailure", + "value": "TransientFailure", + "description": "The environment has a transient failure." + }, + { + "name": "StorageProvisioningFailed", + "value": "StorageProvisioningFailed", + "description": "The environment storage provisioning failed." + } + ] + } + }, + "EnvironmentType": { + "type": "object", + "description": "Properties of an environment type.", + "properties": { + "name": { + "type": "string", + "description": "Name of the environment type" + }, + "deploymentTargetId": { + "type": "string", + "description": "Id of a subscription or management group that the environment type will be\nmapped to. The environment's resources will be deployed into this subscription\nor management group." + }, + "status": { + "$ref": "#/definitions/EnvironmentTypeEnableStatus", + "description": "Indicates whether this environment type is enabled for use in this project." + } + }, + "required": [ + "name", + "deploymentTargetId", + "status" + ] + }, + "EnvironmentTypeEnableStatus": { + "type": "string", + "description": "Indicates whether an environment type is enabled for use in a project.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "EnvironmentTypeEnableStatus", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "The environment type is enabled for use in the project." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "The environment type is not enabled for use in the project." + } + ] + } + }, + "EnvironmentUpdateProperties": { + "type": "object", + "description": "Properties of an environment. These properties can be updated after the\nresource has been created.", + "properties": { + "parameters": { + "type": "object", + "description": "Parameters object for the environment.", + "additionalProperties": {} + } + } + }, + "HardwareProfile": { + "type": "object", + "description": "Hardware specifications for the Dev Box.", + "properties": { + "skuName": { + "$ref": "#/definitions/SkuName", + "description": "The name of the SKU", + "readOnly": true + }, + "vCPUs": { + "type": "integer", + "format": "int32", + "description": "The number of vCPUs available for the Dev Box.", + "readOnly": true + }, + "memoryGB": { + "type": "integer", + "format": "int32", + "description": "The amount of memory available for the Dev Box.", + "readOnly": true + } + } + }, + "HibernateSupport": { + "type": "string", + "description": "Indicates whether hibernate is supported and enabled, disabled, or unsupported by the operating system. Unknown hibernate support is represented as null.", + "enum": [ + "Enabled", + "Disabled", + "OsUnsupported" + ], + "x-ms-enum": { + "name": "HibernateSupport", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "Hibernate is enabled." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "Hibernate is not enabled." + }, + { + "name": "OsUnsupported", + "value": "OsUnsupported", + "description": "Hibernate is not supported by the operating system." + } + ] + } + }, + "ImageReference": { + "type": "object", + "description": "Specifies information about the image used", + "properties": { + "name": { + "type": "string", + "description": "The name of the image used.", + "readOnly": true + }, + "version": { + "type": "string", + "description": "The version of the image.", + "readOnly": true + }, + "operatingSystem": { + "type": "string", + "description": "The operating system of the image.", + "readOnly": true + }, + "osBuildNumber": { + "type": "string", + "description": "The operating system build number of the image.", + "readOnly": true + }, + "publishedDate": { + "type": "string", + "format": "date-time", + "description": "The datetime that the backing image version was published.", + "readOnly": true + } + } + }, + "LocalAdminStatus": { + "type": "string", + "description": "Indicates whether owners of Dev Boxes in a pool are local administrators on the Dev Boxes.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "LocalAdminStatus", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "Owners of Dev Boxes in the pool are local administrators on the Dev Boxes." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "Owners of Dev Boxes in the pool are not local administrators on the Dev Boxes." + } + ] + } + }, + "OperationStatus": { + "type": "object", + "description": "The current status of an async operation", + "properties": { + "id": { + "type": "string", + "description": "Fully qualified ID for the operation status.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The operation id name" + }, + "status": { + "$ref": "#/definitions/OperationStatusValue", + "description": "Provisioning state of the resource." + }, + "resourceId": { + "type": "string", + "description": "The id of the resource." + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "The start time of the operation" + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "The end time of the operation" + }, + "percentComplete": { + "type": "number", + "format": "double", + "description": "Percent of the operation that is complete", + "minimum": 0, + "maximum": 100 + }, + "properties": { + "description": "Custom operation properties, populated only for a successful operation." + }, + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "Operation Error message" + } + }, + "required": [ + "id", + "status" + ] + }, + "OperationStatusValue": { + "type": "string", + "description": "Indicates whether operation status is running, completed, canceled or failed.", + "enum": [ + "Running", + "Completed", + "Canceled", + "Failed" + ], + "x-ms-enum": { + "name": "OperationStatusValue", + "modelAsString": true, + "values": [ + { + "name": "Running", + "value": "Running", + "description": "Operation is in progress" + }, + { + "name": "Completed", + "value": "Completed", + "description": "Operation is completed with success" + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Operation was canceled" + }, + { + "name": "Failed", + "value": "Failed", + "description": "Operation failed" + } + ] + } + }, + "OsDisk": { + "type": "object", + "description": "Settings for the operating system disk.", + "properties": { + "diskSizeGB": { + "type": "integer", + "format": "int32", + "description": "The size of the OS Disk in gigabytes.", + "readOnly": true + } + } + }, + "OsType": { + "type": "string", + "description": "The operating system type.", + "enum": [ + "Windows" + ], + "x-ms-enum": { + "name": "OsType", + "modelAsString": true, + "values": [ + { + "name": "Windows", + "value": "Windows", + "description": "The Windows operating system." + } + ] + } + }, + "PagedCatalog": { + "type": "object", + "description": "Paged collection of Catalog items", + "properties": { + "value": { + "type": "array", + "description": "The Catalog items on this page", + "items": { + "$ref": "#/definitions/Catalog" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "readOnly": true + } + }, + "required": [ + "value" + ] + }, + "PagedDevBox": { + "type": "object", + "description": "The Dev Box list result", + "properties": { + "value": { + "type": "array", + "description": "The DevBox items on this page", + "items": { + "$ref": "#/definitions/DevBox" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "readOnly": true + } + }, + "required": [ + "value" + ] + }, + "PagedDevBoxAction": { + "type": "object", + "description": "Paged collection of DevBoxAction items", + "properties": { + "value": { + "type": "array", + "description": "The DevBoxAction items on this page", + "items": { + "$ref": "#/definitions/DevBoxAction" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "readOnly": true + } + }, + "required": [ + "value" + ] + }, + "PagedDevBoxActionDelayResult": { + "type": "object", + "description": "The actions list result", + "properties": { + "value": { + "type": "array", + "description": "The DevBoxActionDelayResult items on this page", + "items": { + "$ref": "#/definitions/DevBoxActionDelayResult" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "readOnly": true + } + }, + "required": [ + "value" + ] + }, + "PagedEnvironment": { + "type": "object", + "description": "Results of the environment list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Environment items on this page", + "items": { + "$ref": "#/definitions/Environment" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "readOnly": true + } + }, + "required": [ + "value" + ] + }, + "PagedEnvironmentDefinition": { + "type": "object", + "description": "Results of the environment definition list operation.", + "properties": { + "value": { + "type": "array", + "description": "The EnvironmentDefinition items on this page", + "items": { + "$ref": "#/definitions/EnvironmentDefinition" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "readOnly": true + } + }, + "required": [ + "value" + ] + }, + "PagedEnvironmentType": { + "type": "object", + "description": "Result of the environment type list operation.", + "properties": { + "value": { + "type": "array", + "description": "The EnvironmentType items on this page", + "items": { + "$ref": "#/definitions/EnvironmentType" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "readOnly": true + } + }, + "required": [ + "value" + ] + }, + "PagedPool": { + "type": "object", + "description": "Paged collection of Pool items", + "properties": { + "value": { + "type": "array", + "description": "The Pool items on this page", + "items": { + "$ref": "#/definitions/Pool" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "readOnly": true + } + }, + "required": [ + "value" + ] + }, + "PagedProject": { + "type": "object", + "description": "Paged collection of Project items", + "properties": { + "value": { + "type": "array", + "description": "The Project items on this page", + "items": { + "$ref": "#/definitions/Project" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "readOnly": true + } + }, + "required": [ + "value" + ] + }, + "PagedSchedule": { + "type": "object", + "description": "Paged collection of Schedule items", + "properties": { + "value": { + "type": "array", + "description": "The Schedule items on this page", + "items": { + "$ref": "#/definitions/Schedule" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "readOnly": true + } + }, + "required": [ + "value" + ] + }, + "ParameterType": { + "type": "string", + "description": "The type of data a parameter accepts.", + "enum": [ + "array", + "boolean", + "integer", + "number", + "object", + "string" + ], + "x-ms-enum": { + "name": "ParameterType", + "modelAsString": true, + "values": [ + { + "name": "array", + "value": "array", + "description": "The parameter accepts an array of values." + }, + { + "name": "boolean", + "value": "boolean", + "description": "The parameter accepts a boolean value." + }, + { + "name": "integer", + "value": "integer", + "description": "The parameter accepts an integer value." + }, + { + "name": "number", + "value": "number", + "description": "The parameter accepts a number value." + }, + { + "name": "object", + "value": "object", + "description": "The parameter accepts an object value." + }, + { + "name": "string", + "value": "string", + "description": "The parameter accepts a string value." + } + ] + } + }, + "Pool": { + "type": "object", + "description": "A pool of Dev Boxes.", + "properties": { + "name": { + "type": "string", + "description": "Pool name", + "readOnly": true + }, + "location": { + "$ref": "#/definitions/Azure.Core.azureLocation", + "description": "Azure region where Dev Boxes in the pool are located" + }, + "osType": { + "$ref": "#/definitions/OsType", + "description": "The operating system type of Dev Boxes in this pool" + }, + "hardwareProfile": { + "$ref": "#/definitions/HardwareProfile", + "description": "Hardware settings for the Dev Boxes created in this pool" + }, + "hibernateSupport": { + "$ref": "#/definitions/HibernateSupport", + "description": "Indicates whether hibernate is enabled/disabled or unknown." + }, + "storageProfile": { + "$ref": "#/definitions/StorageProfile", + "description": "Storage settings for Dev Box created in this pool" + }, + "imageReference": { + "$ref": "#/definitions/ImageReference", + "description": "Image settings for Dev Boxes create in this pool" + }, + "localAdministrator": { + "$ref": "#/definitions/LocalAdminStatus", + "description": "Indicates whether owners of Dev Boxes in this pool are local administrators on\nthe Dev Boxes." + }, + "stopOnDisconnect": { + "$ref": "#/definitions/StopOnDisconnectConfiguration", + "description": "Stop on disconnect configuration settings for Dev Boxes created in this pool." + }, + "healthStatus": { + "$ref": "#/definitions/PoolHealthStatus", + "description": "Overall health status of the Pool. Indicates whether or not the Pool is\navailable to create Dev Boxes." + } + }, + "required": [ + "name", + "location", + "healthStatus" + ] + }, + "PoolHealthStatus": { + "type": "string", + "description": "Pool status indicating whether a pool is available to create Dev Boxes.", + "enum": [ + "Unknown", + "Pending", + "Healthy", + "Warning", + "Unhealthy" + ], + "x-ms-enum": { + "name": "PoolHealthStatus", + "modelAsString": true, + "values": [ + { + "name": "Unknown", + "value": "Unknown", + "description": "The pool health status is not known." + }, + { + "name": "Pending", + "value": "Pending", + "description": "The pool health status waiting for health checks to run." + }, + { + "name": "Healthy", + "value": "Healthy", + "description": "The pool health status is healthy." + }, + { + "name": "Warning", + "value": "Warning", + "description": "The pool health status has one or more warnings." + }, + { + "name": "Unhealthy", + "value": "Unhealthy", + "description": "The pool health status is not healthy." + } + ] + } + }, + "PowerState": { + "type": "string", + "description": "The power states of a Dev Box.", + "enum": [ + "Unknown", + "Running", + "Deallocated", + "PoweredOff", + "Hibernated" + ], + "x-ms-enum": { + "name": "PowerState", + "modelAsString": true, + "values": [ + { + "name": "Unknown", + "value": "Unknown", + "description": "The Dev Box power state is not known." + }, + { + "name": "Running", + "value": "Running", + "description": "The Dev Box is running." + }, + { + "name": "Deallocated", + "value": "Deallocated", + "description": "The Dev Box is deallocated." + }, + { + "name": "PoweredOff", + "value": "PoweredOff", + "description": "The Dev Box is powered off." + }, + { + "name": "Hibernated", + "value": "Hibernated", + "description": "The Dev Box is hibernated." + } + ] + } + }, + "Project": { + "type": "object", + "description": "Project details.", + "properties": { + "name": { + "type": "string", + "description": "Name of the project", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", + "readOnly": true + }, + "description": { + "type": "string", + "description": "Description of the project." + }, + "maxDevBoxesPerUser": { + "type": "integer", + "format": "int32", + "description": "When specified, indicates the maximum number of Dev Boxes a single user can\ncreate across all pools in the project.", + "minimum": 0 + } + }, + "required": [ + "name" + ] + }, + "RemoteConnection": { + "type": "object", + "description": "Provides remote connection information for a Dev Box.", + "properties": { + "webUrl": { + "type": "string", + "format": "uri", + "description": "URL to open a browser based RDP session." + }, + "rdpConnectionUrl": { + "type": "string", + "format": "uri", + "description": "Link to open a Remote Desktop session." + } + } + }, + "Schedule": { + "type": "object", + "description": "A Schedule to execute action.", + "properties": { + "name": { + "type": "string", + "description": "Display name for the Schedule", + "readOnly": true + }, + "type": { + "$ref": "#/definitions/ScheduledType", + "description": "Supported type this scheduled task represents." + }, + "frequency": { + "$ref": "#/definitions/ScheduledFrequency", + "description": "The frequency of this scheduled task." + }, + "time": { + "type": "string", + "description": "The target time to trigger the action. The format is HH:MM." + }, + "timeZone": { + "type": "string", + "description": "The IANA timezone id at which the schedule should execute." + } + }, + "required": [ + "name", + "type", + "frequency", + "time", + "timeZone" + ] + }, + "ScheduledFrequency": { + "type": "string", + "description": "The frequency of task execution.", + "enum": [ + "Daily" + ], + "x-ms-enum": { + "name": "ScheduledFrequency", + "modelAsString": true, + "values": [ + { + "name": "Daily", + "value": "Daily", + "description": "The scheduled task will run every day." + } + ] + } + }, + "ScheduledType": { + "type": "string", + "description": "The supported types for a scheduled task.", + "enum": [ + "StopDevBox" + ], + "x-ms-enum": { + "name": "ScheduledType", + "modelAsString": true, + "values": [ + { + "name": "StopDevBox", + "value": "StopDevBox", + "description": "The scheduled task will stop impacted Dev Boxes." + } + ] + } + }, + "SkuName": { + "type": "string", + "description": "Indicates the Dev Box compute.", + "enum": [ + "general_i_8c32gb256ssd_v2", + "general_i_8c32gb512ssd_v2", + "general_i_8c32gb1024ssd_v2", + "general_i_8c32gb2048ssd_v2", + "general_i_16c64gb256ssd_v2", + "general_i_16c64gb512ssd_v2", + "general_i_16c64gb1024ssd_v2", + "general_i_16c64gb2048ssd_v2", + "general_i_32c128gb512ssd_v2", + "general_i_32c128gb1024ssd_v2", + "general_i_32c128gb2048ssd_v2", + "general_a_8c32gb256ssd_v2", + "general_a_8c32gb512ssd_v2", + "general_a_8c32gb1024ssd_v2", + "general_a_8c32gb2048ssd_v2", + "general_a_16c64gb256ssd_v2", + "general_a_16c64gb512ssd_v2", + "general_a_16c64gb1024ssd_v2", + "general_a_16c64gb2048ssd_v2", + "general_a_32c128gb512ssd_v2", + "general_a_32c128gb1024ssd_v2", + "general_a_32c128gb2048ssd_v2" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": true, + "values": [ + { + "name": "general_i_8c32gb256ssd_v2", + "value": "general_i_8c32gb256ssd_v2", + "description": "Intel, 8 vCPU, 32 GB RAM, 256 GB Storage" + }, + { + "name": "general_i_8c32gb512ssd_v2", + "value": "general_i_8c32gb512ssd_v2", + "description": "Intel, 8 vCPU, 32 GB RAM, 512 GB Storage" + }, + { + "name": "general_i_8c32gb1024ssd_v2", + "value": "general_i_8c32gb1024ssd_v2", + "description": "Intel, 8 vCPU, 32 GB RAM, 1024 GB Storage" + }, + { + "name": "general_i_8c32gb2048ssd_v2", + "value": "general_i_8c32gb2048ssd_v2", + "description": "Intel, 8 vCPU, 32 GB RAM, 2048 GB Storage" + }, + { + "name": "general_i_16c64gb256ssd_v2", + "value": "general_i_16c64gb256ssd_v2", + "description": "Intel, 16 vCPU, 64 GB RAM, 256 GB Storage" + }, + { + "name": "general_i_16c64gb512ssd_v2", + "value": "general_i_16c64gb512ssd_v2", + "description": "Intel, 16 vCPU, 64 GB RAM, 512 GB Storage" + }, + { + "name": "general_i_16c64gb1024ssd_v2", + "value": "general_i_16c64gb1024ssd_v2", + "description": "Intel, 16 vCPU, 64 GB RAM, 1024 GB Storage" + }, + { + "name": "general_i_16c64gb2048ssd_v2", + "value": "general_i_16c64gb2048ssd_v2", + "description": "Intel, 16 vCPU, 64 GB RAM, 2048 GB Storage" + }, + { + "name": "general_i_32c128gb512ssd_v2", + "value": "general_i_32c128gb512ssd_v2", + "description": "Intel, 32 vCPU, 128 GB RAM, 512 GB Storage" + }, + { + "name": "general_i_32c128gb1024ssd_v2", + "value": "general_i_32c128gb1024ssd_v2", + "description": "Intel, 32 vCPU, 128 GB RAM, 1024 GB Storage" + }, + { + "name": "general_i_32c128gb2048ssd_v2", + "value": "general_i_32c128gb2048ssd_v2", + "description": "Intel, 32 vCPU, 128 GB RAM, 2048 GB Storage" + }, + { + "name": "general_a_8c32gb256ssd_v2", + "value": "general_a_8c32gb256ssd_v2", + "description": "AMD, 8 vCPU, 32 GB RAM, 256 GB Storage" + }, + { + "name": "general_a_8c32gb512ssd_v2", + "value": "general_a_8c32gb512ssd_v2", + "description": "AMD, 8 vCPU, 32 GB RAM, 512 GB Storage" + }, + { + "name": "general_a_8c32gb1024ssd_v2", + "value": "general_a_8c32gb1024ssd_v2", + "description": "AMD, 8 vCPU, 32 GB RAM, 1024 GB Storage" + }, + { + "name": "general_a_8c32gb2048ssd_v2", + "value": "general_a_8c32gb2048ssd_v2", + "description": "AMD, 8 vCPU, 32 GB RAM, 2048 GB Storage" + }, + { + "name": "general_a_16c64gb256ssd_v2", + "value": "general_a_16c64gb256ssd_v2", + "description": "AMD, 16 vCPU, 64 GB RAM, 256 GB Storage" + }, + { + "name": "general_a_16c64gb512ssd_v2", + "value": "general_a_16c64gb512ssd_v2", + "description": "AMD, 16 vCPU, 64 GB RAM, 512 GB Storage" + }, + { + "name": "general_a_16c64gb1024ssd_v2", + "value": "general_a_16c64gb1024ssd_v2", + "description": "AMD, 16 vCPU, 64 GB RAM, 1024 GB Storage" + }, + { + "name": "general_a_16c64gb2048ssd_v2", + "value": "general_a_16c64gb2048ssd_v2", + "description": "AMD, 16 vCPU, 64 GB RAM, 2048 GB Storage" + }, + { + "name": "general_a_32c128gb512ssd_v2", + "value": "general_a_32c128gb512ssd_v2", + "description": "AMD, 32 vCPU, 128 GB RAM, 512 GB Storage" + }, + { + "name": "general_a_32c128gb1024ssd_v2", + "value": "general_a_32c128gb1024ssd_v2", + "description": "AMD, 32 vCPU, 128 GB RAM, 1024 GB Storage" + }, + { + "name": "general_a_32c128gb2048ssd_v2", + "value": "general_a_32c128gb2048ssd_v2", + "description": "AMD, 32 vCPU, 128 GB RAM, 2048 GB Storage" + } + ] + } + }, + "StopOnDisconnectConfiguration": { + "type": "object", + "description": "Stop on disconnect configuration settings for Dev Boxes created in this pool.", + "properties": { + "status": { + "$ref": "#/definitions/StopOnDisconnectEnableStatus", + "description": "Indicates whether the feature to stop the devbox on disconnect once the grace\nperiod has lapsed is enabled." + }, + "gracePeriodMinutes": { + "type": "integer", + "format": "int32", + "description": "The specified time in minutes to wait before stopping a Dev Box once disconnect\nis detected." + } + }, + "required": [ + "status" + ] + }, + "StopOnDisconnectEnableStatus": { + "type": "string", + "description": "Indicates whether the feature to stop the devbox on disconnect once the grace period has lapsed is enabled.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "StopOnDisconnectEnableStatus", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "Stop on disconnect is enabled on the Dev Box." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "Stop on disconnect is not enabled on the Dev Box." + } + ] + } + }, + "StorageProfile": { + "type": "object", + "description": "Storage settings for the Dev Box's disks", + "properties": { + "osDisk": { + "$ref": "#/definitions/OsDisk", + "description": "Settings for the operating system disk." + } + } + }, + "User": { + "type": "object", + "description": "Project user", + "properties": { + "userId": { + "type": "string", + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context", + "minLength": 2, + "maxLength": 36, + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$", + "readOnly": true + } + }, + "required": [ + "userId" + ] + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", "required": true, "type": "string", - "in": "path", - "x-ms-skip-url-encoding": true, - "x-ms-parameter-location": "client" + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" } } } diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/environments.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/environments.json deleted file mode 100644 index fe627f3cc055..000000000000 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/environments.json +++ /dev/null @@ -1,984 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2023-04-01", - "title": "DevCenter", - "description": "Deployment Environments API." - }, - "x-ms-parameterized-host": { - "hostTemplate": "{endpoint}", - "useSchemePrefix": false, - "parameters": [ - { - "$ref": "devcenter.json#/parameters/EndpointParameter" - } - ] - }, - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "AADToken": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "AADToken": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/projects/{projectName}/environments": { - "get": { - "tags": [ - "Environments" - ], - "description": "Lists the environments for a project.", - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/TopParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - } - ], - "operationId": "Environments_ListEnvironments", - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/EnvironmentListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "Environments_ListEnvironments": { - "$ref": "./examples/Environments_ListByProject.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/projects/{projectName}/users/{userId}/environments": { - "get": { - "tags": [ - "Environments" - ], - "description": "Lists the environments for a project and user.", - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/TopParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - } - ], - "operationId": "Environments_ListEnvironmentsByUser", - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/EnvironmentListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "Environments_ListEnvironmentsByUser": { - "$ref": "./examples/Environments_ListByProjectByUser.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/projects/{projectName}/users/{userId}/environments/{environmentName}": { - "get": { - "tags": [ - "Environments" - ], - "description": "Gets an environment", - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/EnvironmentNameParameter" - } - ], - "operationId": "Environments_GetEnvironmentByUser", - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/Environment" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "Environments_GetEnvironmentByUser": { - "$ref": "./examples/Environments_Get.json" - } - } - }, - "put": { - "tags": [ - "Environments" - ], - "description": "Creates or updates an environment.", - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/EnvironmentNameParameter" - }, - { - "name": "body", - "in": "body", - "description": "Represents an environment.", - "required": true, - "schema": { - "$ref": "#/definitions/Environment" - } - } - ], - "operationId": "Environments_CreateOrReplaceEnvironment", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "original-uri" - }, - "responses": { - "201": { - "description": "Created. Operation will complete asynchronously.", - "schema": { - "$ref": "#/definitions/Environment" - }, - "headers": { - "Operation-Location": { - "description": "URL to query for status of the operation.", - "type": "string" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "Environments_CreateByEnvironmentDefinition": { - "$ref": "./examples/Environments_CreateByEnvironmentDefinition.json" - } - } - }, - "delete": { - "tags": [ - "Environments" - ], - "description": "Deletes an environment and all its associated resources", - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/UserIdParameter" - }, - { - "$ref": "#/parameters/EnvironmentNameParameter" - } - ], - "operationId": "Environments_DeleteEnvironment", - "x-ms-long-running-operation": true, - "responses": { - "202": { - "description": "Accepted. Operation will complete asynchronously.", - "schema": { - "$ref": "devcenter.json#/definitions/OperationStatus" - }, - "headers": { - "Operation-Location": { - "description": "URL to query for status of the operation.", - "type": "string" - } - } - }, - "204": { - "description": "Deletion was successful or resource does not exist." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "Environments_DeleteEnvironment": { - "$ref": "./examples/Environments_Delete.json" - } - } - } - }, - "/projects/{projectName}/catalogs": { - "get": { - "tags": [ - "Catalogs" - ], - "description": "Lists all of the catalogs available for a project.", - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/TopParameter" - } - ], - "operationId": "Environments_ListCatalogsByProject", - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/CatalogListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "Environments_ListCatalogsByProject": { - "$ref": "./examples/Catalogs_ListByProject.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/projects/{projectName}/catalogs/{catalogName}": { - "get": { - "tags": [ - "Catalogs" - ], - "description": "Gets the specified catalog within the project", - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "#/parameters/CatalogNameParameter" - } - ], - "operationId": "Environments_GetCatalog", - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/Catalog" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "Environments_GetCatalog": { - "$ref": "./examples/Catalogs_Get.json" - } - } - } - }, - "/projects/{projectName}/environmentDefinitions": { - "get": { - "tags": [ - "Environment Definitions" - ], - "description": "Lists all environment definitions available for a project.", - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/TopParameter" - } - ], - "operationId": "Environments_ListEnvironmentDefinitionsByProject", - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/EnvironmentDefinitionListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "Environments_ListEnvironmentDefinitions": { - "$ref": "./examples/EnvironmentDefinitions_ListByProject.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions": { - "get": { - "tags": [ - "Environment Definitions" - ], - "description": "Lists all environment definitions available within a catalog.", - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/TopParameter" - }, - { - "$ref": "#/parameters/CatalogNameParameter" - } - ], - "operationId": "Environments_ListEnvironmentDefinitionsByCatalog", - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/EnvironmentDefinitionListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "Environments_ListEnvironmentDefinitionsByCatalog": { - "$ref": "./examples/EnvironmentDefinitions_ListByCatalog.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{definitionName}": { - "get": { - "tags": [ - "Environment Definitions" - ], - "description": "Get an environment definition from a catalog.", - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "#/parameters/CatalogNameParameter" - }, - { - "$ref": "#/parameters/EnvironmentDefinitionNameParameter" - } - ], - "operationId": "Environments_GetEnvironmentDefinition", - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/EnvironmentDefinition" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "Environments_GetEnvironmentDefinition": { - "$ref": "./examples/EnvironmentDefinitions_Get.json" - } - } - } - }, - "/projects/{projectName}/environmentTypes": { - "get": { - "tags": [ - "Environment Types" - ], - "description": "Lists all environment types configured for a project.", - "parameters": [ - { - "$ref": "devcenter.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "devcenter.json#/parameters/ProjectNameParameter" - }, - { - "$ref": "devcenter.json#/parameters/TopParameter" - } - ], - "operationId": "Environments_ListEnvironmentTypes", - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/EnvironmentTypeListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "devcenter.json#/definitions/CloudError" - }, - "headers": { - "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" - } - } - } - }, - "x-ms-examples": { - "Environments_ListEnvironmentTypes": { - "$ref": "./examples/EnvironmentTypes_ListByProject.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - } - }, - "definitions": { - "EnvironmentUpdateProperties": { - "description": "Properties of an environment. These properties can be updated after the resource has been created.", - "type": "object", - "properties": { - "parameters": { - "type": "object", - "description": "Parameters object for the environment." - } - } - }, - "Environment": { - "description": "Properties of an environment.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/EnvironmentUpdateProperties" - } - ], - "properties": { - "name": { - "type": "string", - "description": "Environment name.", - "readOnly": true - }, - "environmentType": { - "type": "string", - "description": "Environment type.", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "user": { - "type": "string", - "description": "The AAD object id of the owner of this Environment.", - "readOnly": true - }, - "provisioningState": { - "description": "The provisioning state of the environment.", - "type": "string", - "readOnly": true - }, - "resourceGroupId": { - "description": "The identifier of the resource group containing the environment's resources.", - "type": "string", - "readOnly": true - }, - "catalogName": { - "type": "string", - "description": "Name of the catalog.", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "environmentDefinitionName": { - "type": "string", - "description": "Name of the environment definition.", - "x-ms-mutability": [ - "read", - "create" - ] - }, - "error": { - "description": "Provisioning error details. Populated only for error states.", - "readOnly": true, - "$ref": "devcenter.json#/definitions/CloudErrorBody" - } - }, - "required": [ - "environmentType", - "catalogName", - "environmentDefinitionName" - ] - }, - "EnvironmentListResult": { - "description": "Results of the environment list operation.", - "type": "object", - "properties": { - "value": { - "description": "Current page of results.", - "type": "array", - "items": { - "$ref": "#/definitions/Environment" - } - }, - "nextLink": { - "description": "URL to get the next set of results if there are any.", - "type": "string" - } - }, - "required": [ - "value" - ] - }, - "CatalogListResult": { - "description": "Results of the catalog list operation.", - "type": "object", - "properties": { - "value": { - "description": "Current page of results.", - "type": "array", - "items": { - "$ref": "#/definitions/Catalog" - } - }, - "nextLink": { - "description": "URL to get the next set of results if there are any.", - "type": "string" - } - }, - "required": [ - "value" - ] - }, - "Catalog": { - "description": "A catalog.", - "type": "object", - "properties": { - "name": { - "description": "Name of the catalog.", - "type": "string" - } - }, - "required": [ - "name" - ] - }, - "EnvironmentDefinitionListResult": { - "description": "Results of the environment definition list operation.", - "type": "object", - "properties": { - "value": { - "description": "Current page of results.", - "type": "array", - "items": { - "$ref": "#/definitions/EnvironmentDefinition" - } - }, - "nextLink": { - "description": "URL to get the next set of results if there are any.", - "type": "string" - } - }, - "required": [ - "value" - ] - }, - "EnvironmentDefinition": { - "description": "An environment definition.", - "type": "object", - "properties": { - "id": { - "description": "The ID of the environment definition.", - "type": "string" - }, - "name": { - "description": "Name of the environment definition.", - "type": "string" - }, - "catalogName": { - "description": "Name of the catalog.", - "type": "string" - }, - "description": { - "description": "A short description of the environment definition.", - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/definitions/EnvironmentDefinitionParameter" - }, - "description": "Input parameters passed to an environment." - }, - "parametersSchema": { - "type": "string", - "description": "JSON schema defining the parameters object passed to an environment." - }, - "templatePath": { - "description": "Path to the Environment Definition entrypoint file.", - "type": "string" - } - }, - "required": [ - "name", - "catalogName", - "id" - ] - }, - "EnvironmentDefinitionParameter": { - "type": "object", - "description": "Properties of an Environment Definition parameter", - "properties": { - "id": { - "type": "string", - "description": "Unique ID of the parameter" - }, - "name": { - "type": "string", - "description": "Display name of the parameter" - }, - "description": { - "type": "string", - "description": "Description of the parameter" - }, - "default": { - "type": "string", - "description": "Default value of the parameter" - }, - "type": { - "description": "A string of one of the basic JSON types (number, integer, array, object, boolean, string)", - "$ref": "#/definitions/ParameterType" - }, - "readOnly": { - "type": "boolean", - "description": "Whether or not this parameter is read-only. If true, default should have a value." - }, - "required": { - "type": "boolean", - "description": "Whether or not this parameter is required" - }, - "allowed": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true, - "description": "An array of allowed values" - } - }, - "required": [ - "id", - "type", - "required" - ] - }, - "EnvironmentTypeListResult": { - "description": "Result of the environment type list operation.", - "type": "object", - "properties": { - "value": { - "description": "Current page of results.", - "type": "array", - "items": { - "$ref": "#/definitions/EnvironmentType" - } - }, - "nextLink": { - "description": "URL to get the next set of results if there are any.", - "type": "string" - } - }, - "required": [ - "value" - ] - }, - "EnvironmentType": { - "description": "Properties of an environment type.", - "type": "object", - "properties": { - "name": { - "description": "Name of the environment type", - "type": "string" - }, - "deploymentTargetId": { - "description": "Id of a subscription or management group that the environment type will be mapped to. The environment's resources will be deployed into this subscription or management group.", - "type": "string" - }, - "status": { - "description": "Indicates whether this environment type is enabled for use in this project.", - "$ref": "#/definitions/EnvironmentTypeEnableStatus" - } - }, - "required": [ - "name", - "deploymentTargetId", - "status" - ] - }, - "EnvironmentTypeEnableStatus": { - "description": "Indicates whether an environment type is enabled for use in a project.", - "enum": [ - "Enabled", - "Disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "EnvironmentTypeEnableStatus", - "modelAsString": true, - "values": [ - { - "value": "Enabled", - "description": "The environment type is enabled for use in the project." - }, - { - "value": "Disabled", - "description": "The environment type is not enabled for use in the project." - } - ] - } - }, - "ParameterType": { - "type": "string", - "enum": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" - ], - "description": "The type of data a parameter accepts.", - "x-ms-enum": { - "name": "ParameterType", - "modelAsString": true, - "values": [ - { - "value": "array", - "description": "The parameter accepts an array of values." - }, - { - "value": "boolean", - "description": "The parameter accepts a boolean value." - }, - { - "value": "integer", - "description": "The parameter accepts an integer value." - }, - { - "value": "number", - "description": "The parameter accepts a number value." - }, - { - "value": "object", - "description": "The parameter accepts an object value." - }, - { - "value": "string", - "description": "The parameter accepts a string value." - } - ] - } - } - }, - "parameters": { - "EnvironmentNameParameter": { - "name": "environmentName", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", - "minLength": 3, - "maxLength": 63, - "description": "The name of the environment.", - "x-ms-parameter-location": "method" - }, - "CatalogNameParameter": { - "name": "catalogName", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", - "minLength": 3, - "maxLength": 63, - "description": "The name of the catalog", - "x-ms-parameter-location": "method" - }, - "EnvironmentDefinitionNameParameter": { - "name": "definitionName", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", - "minLength": 3, - "maxLength": 63, - "description": "The name of the environment definition", - "x-ms-parameter-location": "method" - } - } -} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesDevCenterOperations_ListAllDevBoxes.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesDevCenterOperations_ListAllDevBoxes.json new file mode 100644 index 000000000000..33e7210819fb --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesDevCenterOperations_ListAllDevBoxes.json @@ -0,0 +1,40 @@ +{ + "title": "Lists Dev Boxes that the caller has access to in the DevCenter.", + "operationId": "DevBoxesDevCenter_ListAllDevBoxes", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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" + } + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesDevCenterOperations_ListAllDevBoxesByUser.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesDevCenterOperations_ListAllDevBoxesByUser.json new file mode 100644 index 000000000000..1fde15c1bbb5 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesDevCenterOperations_ListAllDevBoxesByUser.json @@ -0,0 +1,41 @@ +{ + "title": "Lists Dev Boxes in the Dev Center for a particular user.", + "operationId": "DevBoxesDevCenter_ListAllDevBoxesByUser", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "userId": "me" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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" + } + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_CreateDevBox.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_CreateDevBox.json new file mode 100644 index 000000000000..f51bad1c0086 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_CreateDevBox.json @@ -0,0 +1,72 @@ +{ + "title": "Creates or replaces a Dev Box.", + "operationId": "DevBoxesOperations_CreateDevBox", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me", + "devBoxName": "MyDevBox", + "body": { + "poolName": "LargeDevWorkStationPool" + } + }, + "responses": { + "200": { + "body": { + "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": { + "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" + } + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_DelayAction.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_DelayAction.json new file mode 100644 index 000000000000..db7107cfc6bc --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_DelayAction.json @@ -0,0 +1,26 @@ +{ + "title": "Delays the occurrence of an action.", + "operationId": "DevBoxesOperations_DelayAction", + "parameters": { + "api-version": "2023-04-01", + "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": { + "name": "schedule-default", + "actionType": "Stop", + "sourceId": "/projects/myProject/pools/myPool/schedules/default", + "suspendedUntil": "2022-09-30T17:00:00Z", + "next": { + "scheduledTime": "2022-09-30T17:00:00Z" + } + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_DelayMultipleWithError.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_DelayAllActions.json similarity index 63% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_DelayMultipleWithError.json rename to specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_DelayAllActions.json index 6b2a22084e24..6a7ade1eef30 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxActions_DelayMultipleWithError.json +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_DelayAllActions.json @@ -1,4 +1,6 @@ { + "title": "Delays all actions.", + "operationId": "DevBoxesOperations_DelayAllActions", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", @@ -13,10 +15,15 @@ "value": [ { "name": "schedule-default", - "result": "Failed", - "error": { - "code": "DelayOverMaxTime", - "message": "The schedule cannot be delayed more than 8 hours from the original invocation time." + "result": "Succeeded", + "action": { + "name": "schedule-default", + "actionType": "Stop", + "sourceId": "/projects/myProject/pools/myPool/schedules/default", + "suspendedUntil": "2022-09-30T17:00:00Z", + "next": { + "scheduledTime": "2022-09-30T17:00:00Z" + } } }, { diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_Delete.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_DeleteDevBox.json similarity index 89% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_Delete.json rename to specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_DeleteDevBox.json index 2ceebc24a762..4843a80ed6c9 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/Environments_Delete.json +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_DeleteDevBox.json @@ -1,10 +1,12 @@ { + "title": "Deletes a Dev Box.", + "operationId": "DevBoxesOperations_DeleteDevBox", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", "projectName": "myProject", "userId": "me", - "environmentName": "mydevenv" + "devBoxName": "MyDevBox" }, "responses": { "202": { diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetDevBox.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetDevBox.json new file mode 100644 index 000000000000..f29193eb0b35 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetDevBox.json @@ -0,0 +1,39 @@ +{ + "title": "Gets a Dev Box", + "operationId": "DevBoxesOperations_GetDevBox", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me", + "devBoxName": "MyDevBox" + }, + "responses": { + "200": { + "body": { + "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" + } + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetDevBoxAction.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetDevBoxAction.json new file mode 100644 index 000000000000..0d94918c712d --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetDevBoxAction.json @@ -0,0 +1,24 @@ +{ + "title": "Gets an action.", + "operationId": "DevBoxesOperations_GetDevBoxAction", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me", + "devBoxName": "myDevBox", + "actionName": "schedule-default" + }, + "responses": { + "200": { + "body": { + "name": "schedule-default", + "actionType": "Stop", + "sourceId": "/projects/myProject/pools/myPool/schedules/default", + "next": { + "scheduledTime": "2022-09-30T17:00:00Z" + } + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetPool.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetPool.json new file mode 100644 index 000000000000..7b53a6ac96b4 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetPool.json @@ -0,0 +1,39 @@ +{ + "title": "Gets a pool", + "operationId": "DevBoxesOperations_GetPool", + "parameters": { + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "api-version": "2023-04-01", + "poolName": "DevPool" + }, + "responses": { + "200": { + "body": { + "name": "LargeDevWorkStationPool", + "location": "centralus", + "osType": "Windows", + "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" + }, + "stopOnDisconnect": { + "status": "Enabled", + "gracePeriodMinutes": 60 + }, + "healthStatus": "Healthy" + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetRemoteConnection.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetRemoteConnection.json new file mode 100644 index 000000000000..a01b7df571fd --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetRemoteConnection.json @@ -0,0 +1,18 @@ +{ + "title": "Gets RDP Connection info", + "operationId": "DevBoxesOperations_GetRemoteConnection", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me", + "devBoxName": "MyDevBox" + }, + "responses": { + "200": { + "body": { + "webUrl": "https://connectionUrl" + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetSchedule.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetSchedule.json new file mode 100644 index 000000000000..8ba5489b95c6 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_GetSchedule.json @@ -0,0 +1,22 @@ +{ + "title": "Gets a schedule.", + "operationId": "DevBoxesOperations_GetSchedule", + "parameters": { + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "api-version": "2023-04-01", + "poolName": "DevPool", + "scheduleName": "default" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "StopDevBox", + "timeZone": "America/Los_Angeles", + "frequency": "Daily", + "time": "17:30" + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListDevBoxActions.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListDevBoxActions.json new file mode 100644 index 000000000000..db1ae0af7c62 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListDevBoxActions.json @@ -0,0 +1,36 @@ +{ + "title": "Lists actions on a Dev Box.", + "operationId": "DevBoxesOperations_ListDevBoxActions", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me", + "devBoxName": "myDevBox" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "idle-hibernateondisconnect", + "actionType": "Stop", + "sourceId": "/projects/myProject/pools/myPool", + "next": { + "scheduledTime": "2022-09-30T15:23:00Z" + } + }, + { + "name": "schedule-default", + "actionType": "Stop", + "sourceId": "/projects/myProject/pools/myPool/schedules/default", + "suspendedUntil": "2022-09-30T17:00:00Z", + "next": { + "scheduledTime": "2022-09-30T17:00:00Z" + } + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListDevBoxes.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListDevBoxes.json new file mode 100644 index 000000000000..2140a65cb857 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListDevBoxes.json @@ -0,0 +1,42 @@ +{ + "title": "Lists Dev Boxes in the project for a particular user.", + "operationId": "DevBoxesOperations_ListDevBoxes", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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" + } + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListPools.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListPools.json new file mode 100644 index 000000000000..42c39b484d20 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListPools.json @@ -0,0 +1,67 @@ +{ + "title": "Lists available pools", + "operationId": "DevBoxesOperations_ListPools", + "parameters": { + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "api-version": "2023-04-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "LargeDevWorkStationPool", + "location": "centralus", + "osType": "Windows", + "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" + }, + "stopOnDisconnect": { + "status": "Enabled", + "gracePeriodMinutes": 60 + }, + "healthStatus": "Healthy" + }, + { + "name": "SQLDevelopmentMachinePool", + "location": "southcentralus", + "osType": "Windows", + "hardwareProfile": { + "vCPUs": 16, + "memoryGB": 128 + }, + "storageProfile": { + "osDisk": { + "diskSizeGB": 1024 + } + }, + "hibernateSupport": "Enabled", + "imageReference": { + "name": "SqlDevImage", + "version": "1.0.0", + "publishedDate": "2022-03-01T00:13:23.323Z" + }, + "stopOnDisconnect": { + "status": "Enabled", + "gracePeriodMinutes": 60 + }, + "healthStatus": "Healthy" + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListSchedules.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListSchedules.json new file mode 100644 index 000000000000..0a5afd4f207a --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_ListSchedules.json @@ -0,0 +1,25 @@ +{ + "title": "Lists available schedules for a pool.", + "operationId": "DevBoxesOperations_ListSchedules", + "parameters": { + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "poolName": "DevPool", + "api-version": "2023-04-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "StopDevBox", + "timeZone": "America/Los_Angeles", + "frequency": "Daily", + "time": "17:30" + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_RestartDevBox.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_RestartDevBox.json new file mode 100644 index 000000000000..3c0e55515dd6 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_RestartDevBox.json @@ -0,0 +1,25 @@ +{ + "title": "Restarts a Dev Box", + "operationId": "DevBoxesOperations_RestartDevBox", + "parameters": { + "api-version": "2023-04-01", + "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" + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_SkipAction.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_SkipAction.json new file mode 100644 index 000000000000..1e8552d6bd35 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_SkipAction.json @@ -0,0 +1,15 @@ +{ + "title": "Skips an occurrence of an action.", + "operationId": "DevBoxesOperations_SkipAction", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me", + "devBoxName": "myDevBox", + "actionName": "schedule-default" + }, + "responses": { + "204": {} + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Start.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_StartDevBox.json similarity index 92% rename from specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Start.json rename to specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_StartDevBox.json index 94087cc95497..292e5e1c947a 100644 --- a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxes_Start.json +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_StartDevBox.json @@ -1,4 +1,6 @@ { + "title": "Starts a Dev Box", + "operationId": "DevBoxesOperations_StartDevBox", "parameters": { "api-version": "2023-04-01", "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_StopDevBox.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_StopDevBox.json new file mode 100644 index 000000000000..b92d1089e864 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevBoxesOperations_StopDevBox.json @@ -0,0 +1,26 @@ +{ + "title": "Stops a Dev Box", + "operationId": "DevBoxesOperations_StopDevBox", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me", + "devBoxName": "MyDevBox", + "hibernate": "true" + }, + "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" + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenterOperations_GetProject.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenterOperations_GetProject.json new file mode 100644 index 000000000000..fe1a721864bc --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenterOperations_GetProject.json @@ -0,0 +1,17 @@ +{ + "title": "Gets a project.", + "operationId": "DevCenterOperations_GetProject", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject" + }, + "responses": { + "200": { + "body": { + "name": "DevDiv", + "description": "The developer division" + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenterOperations_ListProjects.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenterOperations_ListProjects.json new file mode 100644 index 000000000000..1e7bdde95309 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/DevCenterOperations_ListProjects.json @@ -0,0 +1,20 @@ +{ + "title": "Lists all projects.", + "operationId": "DevCenterOperations_ListProjects", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "DevDiv", + "description": "The developer division" + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_CreateOrUpdateEnvironment.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_CreateOrUpdateEnvironment.json new file mode 100644 index 000000000000..40bd8016a490 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_CreateOrUpdateEnvironment.json @@ -0,0 +1,40 @@ +{ + "title": "Creates or updates an environment.", + "operationId": "EnvironmentsOperations_CreateOrUpdateEnvironment", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "environmentName": "mydevenv", + "userId": "me", + "body": { + "environmentType": "DevTest", + "catalogName": "main", + "environmentDefinitionName": "helloworld", + "parameters": { + "functionAppRuntime": "node", + "storageAccountType": "Standard_LRS" + } + } + }, + "responses": { + "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": { + "name": "mydevenv", + "environmentType": "DevTest", + "catalogName": "main", + "environmentDefinitionName": "helloworld", + "parameters": { + "functionAppRuntime": "node", + "storageAccountType": "Standard_LRS" + }, + "user": "b08e39b4-2ac6-4465-a35e-48322efb0f98", + "provisioningState": "Creating" + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_DeleteEnvironment.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_DeleteEnvironment.json new file mode 100644 index 000000000000..db378d427835 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_DeleteEnvironment.json @@ -0,0 +1,26 @@ +{ + "title": "Deletes an environment and all its associated resources", + "operationId": "EnvironmentsOperations_DeleteEnvironment", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me", + "environmentName": "mydevenv" + }, + "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" + } + }, + "204": {} + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_GetCatalog.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_GetCatalog.json new file mode 100644 index 000000000000..7d9de8e13786 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_GetCatalog.json @@ -0,0 +1,17 @@ +{ + "title": "Gets the specified catalog within the project", + "operationId": "EnvironmentsOperations_GetCatalog", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "catalogName": "foo" + }, + "responses": { + "200": { + "body": { + "name": "foo" + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_GetEnvironment.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_GetEnvironment.json new file mode 100644 index 000000000000..eb89813acaf7 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_GetEnvironment.json @@ -0,0 +1,28 @@ +{ + "title": "Gets an environment", + "operationId": "EnvironmentsOperations_GetEnvironment", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me", + "environmentName": "mydevenv" + }, + "responses": { + "200": { + "body": { + "name": "mydevenv", + "environmentType": "DevTest", + "catalogName": "main", + "environmentDefinitionName": "helloworld", + "parameters": { + "functionAppRuntime": "node", + "storageAccountType": "Standard_LRS" + }, + "user": "b08e39b4-2ac6-4465-a35e-48322efb0f98", + "provisioningState": "Succeeded", + "resourceGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg028321" + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_GetEnvironmentDefinition.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_GetEnvironmentDefinition.json new file mode 100644 index 000000000000..e4efa7edea54 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_GetEnvironmentDefinition.json @@ -0,0 +1,57 @@ +{ + "title": "Get an environment definition from a catalog.", + "operationId": "EnvironmentsOperations_GetEnvironmentDefinition", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "catalogName": "myCatalog", + "definitionName": "foo" + }, + "responses": { + "200": { + "body": { + "id": "/projects/myProject/catalogs/myCatalog/environmentDefinitions/foo", + "name": "foo", + "catalogName": "myCatalog", + "description": "This environment definition is just for example purposes.", + "parameters": [ + { + "id": "functionAppRuntime", + "name": "Function App Runtime", + "type": "string", + "required": true, + "default": "dotnet", + "allowed": [ + "node", + "dotnet", + "java" + ] + }, + { + "id": "storageAccountType", + "name": "Storage Account Type", + "type": "string", + "required": true, + "default": "Standard_LRS", + "allowed": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS" + ] + }, + { + "id": "httpsOnly", + "name": "HTTPS only", + "type": "boolean", + "default": "true", + "readOnly": true, + "required": true + } + ], + "parametersSchema": "{\"type\":\"object\",\"properties\":{\"functionAppRuntime\":{\"$id\":\"functionAppRuntime\",\"value\":\"dotnet\",\"displayName\":\"Function App Runtime\",\"type\":\"string\",\"enum\":[\"node\",\"dotnet\",\"java\"]},\"storageAccountType\":{\"$id\":\"storageAccountType\",\"value\":\"Standard_LRS\",\"displayName\":\"Storage Account Type\",\"type\":\"string\",\"enum\":[\"Standard_LRS\",\"Standard_GRS\",\"Standard_RAGRS\"]},\"httpsOnly\":{\"$id\":\"httpsOnly\",\"value\":true,\"displayName\":\"HTTPS only\",\"type\":\"boolean\"}},\"required\":[\"functionAppRuntime\",\"storageAccountType\"]}", + "templatePath": "azuredeploy.json" + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListAllEnvironments.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListAllEnvironments.json new file mode 100644 index 000000000000..ab203c460a33 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListAllEnvironments.json @@ -0,0 +1,30 @@ +{ + "title": "Lists the environments for a project.", + "operationId": "EnvironmentsOperations_ListAllEnvironments", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "mydevenv", + "environmentType": "DevTest", + "catalogName": "main", + "environmentDefinitionName": "helloworld", + "parameters": { + "functionAppRuntime": "node", + "storageAccountType": "Standard_LRS" + }, + "user": "b08e39b4-2ac6-4465-a35e-48322efb0f98", + "provisioningState": "Succeeded", + "resourceGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg028321" + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListCatalogs.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListCatalogs.json new file mode 100644 index 000000000000..17c683e6c9b3 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListCatalogs.json @@ -0,0 +1,20 @@ +{ + "title": "Lists all of the catalogs available for a project.", + "operationId": "EnvironmentsOperations_ListCatalogs", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "foo" + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironmentDefinitions.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironmentDefinitions.json new file mode 100644 index 000000000000..aabe3738602c --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironmentDefinitions.json @@ -0,0 +1,66 @@ +{ + "title": "Lists all environment definitions available for a project.", + "operationId": "EnvironmentsOperations_ListEnvironmentDefinitions", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/projects/myProject/catalogs/myCatalog/environmentDefinitions/foo", + "name": "foo", + "catalogName": "myCatalog", + "description": "This environment definition is just for example purposes.", + "parameters": [ + { + "id": "functionAppRuntime", + "name": "Function App Runtime", + "type": "string", + "required": true, + "default": "dotnet", + "allowed": [ + "node", + "dotnet", + "java" + ] + }, + { + "id": "storageAccountType", + "name": "Storage Account Type", + "type": "string", + "required": true, + "default": "Standard_LRS", + "allowed": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS" + ] + }, + { + "id": "httpsOnly", + "name": "HTTPS only", + "type": "boolean", + "default": "true", + "readOnly": true, + "required": true + } + ], + "parametersSchema": "{\"type\":\"object\",\"properties\":{\"functionAppRuntime\":{\"$id\":\"functionAppRuntime\",\"value\":\"dotnet\",\"displayName\":\"Function App Runtime\",\"type\":\"string\",\"enum\":[\"node\",\"dotnet\",\"java\"]},\"storageAccountType\":{\"$id\":\"storageAccountType\",\"value\":\"Standard_LRS\",\"displayName\":\"Storage Account Type\",\"type\":\"string\",\"enum\":[\"Standard_LRS\",\"Standard_GRS\",\"Standard_RAGRS\"]},\"httpsOnly\":{\"$id\":\"httpsOnly\",\"value\":true,\"displayName\":\"HTTPS only\",\"type\":\"boolean\"}},\"required\":[\"functionAppRuntime\",\"storageAccountType\"]}", + "templatePath": "azuredeploy.json" + }, + { + "id": "/projects/myProject/catalogs/myOtherCatalog/environmentDefinitions/bar", + "name": "bar", + "catalogName": "myOtherCatalog", + "description": "This environment definition is just for example purposes.", + "templatePath": "azuredeploy.json" + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironmentDefinitionsByCatalog.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironmentDefinitionsByCatalog.json new file mode 100644 index 000000000000..d9c411224b8e --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironmentDefinitionsByCatalog.json @@ -0,0 +1,67 @@ +{ + "title": "Lists all environment definitions available within a catalog.", + "operationId": "EnvironmentsOperations_ListEnvironmentDefinitionsByCatalog", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "catalogName": "myCatalog" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/projects/myProject/catalogs/myCatalog/environmentDefinitions/foo", + "name": "foo", + "catalogName": "myCatalog", + "description": "This environment definition is just for example purposes.", + "parameters": [ + { + "id": "functionAppRuntime", + "name": "Function App Runtime", + "type": "string", + "required": true, + "default": "dotnet", + "allowed": [ + "node", + "dotnet", + "java" + ] + }, + { + "id": "storageAccountType", + "name": "Storage Account Type", + "type": "string", + "required": true, + "default": "Standard_LRS", + "allowed": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS" + ] + }, + { + "id": "httpsOnly", + "name": "HTTPS only", + "type": "boolean", + "default": "true", + "readOnly": true, + "required": true + } + ], + "parametersSchema": "{\"type\":\"object\",\"properties\":{\"functionAppRuntime\":{\"$id\":\"functionAppRuntime\",\"value\":\"dotnet\",\"displayName\":\"Function App Runtime\",\"type\":\"string\",\"enum\":[\"node\",\"dotnet\",\"java\"]},\"storageAccountType\":{\"$id\":\"storageAccountType\",\"value\":\"Standard_LRS\",\"displayName\":\"Storage Account Type\",\"type\":\"string\",\"enum\":[\"Standard_LRS\",\"Standard_GRS\",\"Standard_RAGRS\"]},\"httpsOnly\":{\"$id\":\"httpsOnly\",\"value\":true,\"displayName\":\"HTTPS only\",\"type\":\"boolean\"}},\"required\":[\"functionAppRuntime\",\"storageAccountType\"]}", + "templatePath": "azuredeploy.json" + }, + { + "id": "/projects/myProject/catalogs/myCatalog/environmentDefinitions/bar", + "name": "bar", + "catalogName": "myCatalog", + "description": "This environment definition is just for example purposes.", + "templatePath": "azuredeploy.json" + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironmentTypes.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironmentTypes.json new file mode 100644 index 000000000000..83e22df09846 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironmentTypes.json @@ -0,0 +1,22 @@ +{ + "title": "Lists all environment types configured for a project.", + "operationId": "EnvironmentsOperations_ListEnvironmentTypes", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "devtestenv", + "status": "Enabled", + "deploymentTargetId": "/subscriptions/00000000-0000-0000-0000-000000000000" + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironments.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironments.json new file mode 100644 index 000000000000..51f0384a6ffb --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/EnvironmentsOperations_ListEnvironments.json @@ -0,0 +1,31 @@ +{ + "title": "Lists the environments for a project and user.", + "operationId": "EnvironmentsOperations_ListEnvironments", + "parameters": { + "api-version": "2023-04-01", + "endpoint": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/", + "projectName": "myProject", + "userId": "me" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "mydevenv", + "environmentType": "DevTest", + "catalogName": "main", + "environmentDefinitionName": "helloworld", + "parameters": { + "functionAppRuntime": "node", + "storageAccountType": "Standard_LRS" + }, + "user": "b08e39b4-2ac6-4465-a35e-48322efb0f98", + "provisioningState": "Succeeded", + "resourceGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg028321" + } + ] + } + } + } +} diff --git a/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/SharedOperations_GetProjectOperationStatus.json b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/SharedOperations_GetProjectOperationStatus.json new file mode 100644 index 000000000000..d6c4b10ab2f4 --- /dev/null +++ b/specification/devcenter/data-plane/Microsoft.DevCenter/stable/2023-04-01/examples/SharedOperations_GetProjectOperationStatus.json @@ -0,0 +1,19 @@ +{ + "title": "Get the status of an operation.", + "operationId": "SharedOperations_GetProjectOperationStatus", + "parameters": { + "api-version": "2023-04-01", + "projectName": "myProject", + "operationId": "fa067167-e49d-41bd-8dd8-de719b9de3b3" + }, + "responses": { + "200": { + "body": { + "id": "/projects/myProject/operationStatuses/fa067167-e49d-41bd-8dd8-de719b9de3b3", + "name": "fa067167-e49d-41bd-8dd8-de719b9de3b3", + "status": "Running", + "startTime": "2024-01-24T21:14:58.472Z" + } + } + } +} diff --git a/specification/devcenter/data-plane/readme.md b/specification/devcenter/data-plane/readme.md index 7464490abe4c..1a2a95ddb94e 100644 --- a/specification/devcenter/data-plane/readme.md +++ b/specification/devcenter/data-plane/readme.md @@ -96,9 +96,7 @@ These settings apply only when `--tag=package-2023-04-01` is specified on the co ``` yaml $(tag) == 'package-2023-04-01' input-file: - - Microsoft.DevCenter/stable/2023-04-01/devbox.json - Microsoft.DevCenter/stable/2023-04-01/devcenter.json - - Microsoft.DevCenter/stable/2023-04-01/environments.json directive: - suppress: HostParametersValidation