Environments - Patch Environment
Partially updates an environment.
PATCH {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. |
Request Body
Media Types: "application/merge-patch+json"
Name | Type | Description |
---|---|---|
expirationDate |
string |
The time the expiration date will be triggered (UTC), after which the environment and associated resources will be deleted. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The request has succeeded. |
|
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
Partially updates an environment.
Sample request
PATCH https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/me/environments/mydevenv?api-version=2024-02-01
{
"expirationDate": "2023-09-10T17:00:00Z"
}
Sample response
{
"uri": "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/projects/myProject/users/cf849cb0-3a05-4059-84b4-40c16abb1e93/environments/mydevenv",
"name": "mydevenv",
"environmentType": "DevTest",
"catalogName": "main",
"environmentDefinitionName": "helloworld",
"parameters": {
"functionAppRuntime": "node",
"storageAccountType": "Standard_LRS"
},
"user": "b08e39b4-2ac6-4465-a35e-48322efb0f98",
"provisioningState": "Succeeded",
"expirationDate": "2023-09-10T17:00:00Z"
}
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. |
Environment |
Properties of an environment. |
Environment |
Properties of an environment. These properties can be updated via PATCH after the resource has been created. |
Environment |
The provisioning state of the environment. |
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. |
Environment
Properties of an environment.
Name | Type | Description |
---|---|---|
catalogName |
string |
Name of the catalog. |
environmentDefinitionName |
string |
Name of the environment definition. |
environmentType |
string |
Environment type. |
error |
Provisioning error details. Populated only for error states. |
|
expirationDate |
string |
The time the expiration date will be triggered (UTC), after which the environment and associated resources will be deleted. |
name |
string |
Environment name. |
parameters |
|
Parameters object for the environment. |
provisioningState |
The provisioning state of the environment. |
|
resourceGroupId |
string |
The identifier of the resource group containing the environment's resources. |
uri |
string |
The unique URI of the environment. |
user |
string |
The AAD object id of the owner of this Environment. |
EnvironmentPatchProperties
Properties of an environment. These properties can be updated via PATCH after the resource has been created.
Name | Type | Description |
---|---|---|
expirationDate |
string |
The time the expiration date will be triggered (UTC), after which the environment and associated resources will be deleted. |
EnvironmentProvisioningState
The provisioning state of the environment.
Name | Type | Description |
---|---|---|
Accepted |
string |
The environment was accepted. |
Canceled |
string |
The environment provisioning was canceled. |
Creating |
string |
The environment is creating. |
Deleting |
string |
The environment is deleting. |
Failed |
string |
The environment failed to provision. |
MovingResources |
string |
The environment is moving resources. |
Preparing |
string |
The environment is preparing. |
Running |
string |
The environment is running. |
StorageProvisioningFailed |
string |
The environment storage provisioning failed. |
Succeeded |
string |
The environment was successfully provisioned. |
Syncing |
string |
The environment is Syncing. |
TransientFailure |
string |
The environment has a transient failure. |
Updating |
string |
The environment is updating. |