Environments - Delete Environment
Deletes an environment and all its associated resources
DELETE {endpoint}/projects/{projectName}/users/{userId}/environments/{environmentName}?api-version=2024-02-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string uri |
The DevCenter-specific URI to operate on. |
environment
|
path | True |
string |
The name of the environment. Regex pattern: |
project
|
path | True |
string |
The DevCenter Project upon which to execute operations. Regex pattern: |
user
|
path | True |
string |
The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. Regex pattern: |
api-version
|
query | True |
string |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
202 Accepted |
The request has been accepted for processing, but processing has not yet completed. Headers
|
|
204 No Content |
There is no content to send for this request, but the headers may be useful. |
|
Other Status Codes |
An unexpected error response. Headers x-ms-error-code: string |
Security
OAuth2Auth
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
https://devcenter.azure.com/.default |
Examples
Deletes an environment and all its associated resources.
Sample request
DELETE https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/me/environments/mydevenv?api-version=2024-02-01
Sample response
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
{
"id": "/projects/myProject/operationstatuses/786a823c-8037-48ab-89b8-8599901e67d0",
"name": "786a823c-8037-48ab-89b8-8599901e67d0",
"status": "Running",
"startTime": "2023-02-01T12:43:54.122Z"
}
Definitions
Name | Description |
---|---|
Azure. |
The error object. |
Azure. |
A response containing error details. |
Azure. |
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. |
Operation |
The operation status. |
Operation |
The current status of an async operation. |
Azure.Core.Foundations.Error
The error object.
Name | Type | Description |
---|---|---|
code |
string |
One of a server-defined set of error codes. |
details |
An array of details about specific errors that led to this reported error. |
|
innererror |
An object containing more specific information than the current object about the error. |
|
message |
string |
A human-readable representation of the error. |
target |
string |
The target of the error. |
Azure.Core.Foundations.ErrorResponse
A response containing error details.
Name | Type | Description |
---|---|---|
error |
The error object. |
Azure.Core.Foundations.InnerError
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.
Name | Type | Description |
---|---|---|
code |
string |
One of a server-defined set of error codes. |
innererror |
Inner error. |
OperationState
The operation status.
Name | Type | Description |
---|---|---|
Canceled |
string |
The operation has been canceled by the user. |
Failed |
string |
The operation has failed. |
NotStarted |
string |
The operation has not started. |
Running |
string |
The operation is in progress. |
Succeeded |
string |
The operation has completed successfully. |
OperationStatus
The current status of an async operation.
Name | Type | Description |
---|---|---|
endTime |
string |
The end time of the operation, in RFC3339 format. |
error |
Operation Error message. |
|
id |
string |
Fully qualified ID for the operation status. |
name |
string |
The operation id name. |
percentComplete |
number |
Percent of the operation that is complete. |
properties |
|
Custom operation properties, populated only for a successful operation. |
resourceId |
string |
The id of the resource. |
startTime |
string |
The start time of the operation, in RFC3339 format. |
status |
Provisioning state of the resource. |