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.

environmentName
path True

string

The name of the environment.

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$

projectName
path True

string

The DevCenter Project upon which to execute operations.

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$

userId
path True

string

The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.

Regex pattern: ^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$

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

Environment

The request has succeeded.

Other Status Codes

Azure.Core.Foundations.ErrorResponse

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.Core.Foundations.Error

The error object.

Azure.Core.Foundations.ErrorResponse

A response containing error details.

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.

Environment

Properties of an environment.

EnvironmentPatchProperties

Properties of an environment. These properties can be updated via PATCH after the resource has been created.

EnvironmentProvisioningState

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

Azure.Core.Foundations.Error[]

An array of details about specific errors that led to this reported error.

innererror

Azure.Core.Foundations.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

Azure.Core.Foundations.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

Azure.Core.Foundations.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

Azure.Core.Foundations.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

EnvironmentProvisioningState

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.