Megosztás:


Environments - Create Or Update

Meglévő környezet létrehozása vagy cseréje. Ez a művelet eltarthat egy ideig.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}?api-version=2018-09-15

URI-paraméterek

Name In Kötelező Típus Description
labName
path True

string

A labor neve.

name
path True

string

A DtlEnvironment neve

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Az erőforráscsoport neve. A név nem megkülönbözteti a kis- és nagybetűket.

subscriptionId
path True

string

minLength: 1

A cél-előfizetés azonosítója.

userName
path True

string

A felhasználói profil neve.

api-version
query True

string

minLength: 1

A művelethez használandó API-verzió.

Kérelem törzse

Name Típus Description
location

string

Az erőforrás helye.

properties.armTemplateDisplayName

string

A környezetet létrehozó Azure Resource Manager-sablon megjelenítendő neve.

properties.deploymentProperties

EnvironmentDeploymentProperties

A környezet üzembehelyezési tulajdonságai.

tags

object

Az erőforrás címkéi.

Válaszok

Name Típus Description
200 OK

DtlEnvironment

A "DtlEnvironment" erőforrás frissítési művelete sikeres volt

201 Created

DtlEnvironment

A "DtlEnvironment" erőforrás létrehozási művelete sikeres volt

Fejlécek

  • Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

Váratlan hibaválasz.

Biztonság

azure_auth

Azure Active Directory Oauth2-folyamat.

Típus: oauth2
Folyamat: implicit
Engedélyezési URL: https://login.microsoftonline.com/common/oauth2/authorize

Hatókörök

Name Description
user_impersonation a felhasználói fiók megszemélyesítése

Példák

Environments_CreateOrUpdate

Mintakérelem

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/users/@me/environments/{environmentName}?api-version=2018-09-15

{
  "properties": {
    "deploymentProperties": {
      "armTemplateId": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}",
      "parameters": []
    }
  }
}

Mintaválasz

{
  "name": "{environmentName}",
  "type": "Microsoft.DevTestLab/labs/users/environments",
  "id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/users/{uniqueIdentifier}/environments/{environmentName}",
  "location": "{location}",
  "properties": {
    "createdByUser": "user@contoso.com",
    "deploymentProperties": {
      "armTemplateId": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}"
    },
    "provisioningState": "Succeeded",
    "uniqueIdentifier": "{uniqueIdentifier}"
  },
  "tags": {
    "tagName1": "tagValue1"
  }
}
{
  "name": "{environmentName}",
  "type": "Microsoft.DevTestLab/labs/users/environments",
  "id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/users/{uniqueIdentifier}/environments/{environmentName}",
  "location": "{location}",
  "properties": {
    "createdByUser": "user@contoso.com",
    "deploymentProperties": {
      "armTemplateId": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}"
    },
    "provisioningState": "Creating",
    "uniqueIdentifier": "{uniqueIdentifier}"
  },
  "tags": {
    "tagName1": "tagValue1"
  }
}

Definíciók

Name Description
ArmTemplateParameterProperties

Egy Azure Resource Manager-sablonparaméter tulajdonságai.

DtlEnvironment

Egy környezet, amely lényegében egy ARM-sablon üzembe helyezése.

EnvironmentDeploymentProperties

A környezet üzembe helyezésének tulajdonságai.

ErrorAdditionalInfo

Az erőforrás-kezelési hiba további információi.

ErrorDetail

A hiba részletei.

ErrorResponse

Hibaválasz

ArmTemplateParameterProperties

Egy Azure Resource Manager-sablonparaméter tulajdonságai.

Name Típus Description
name

string

A sablonparaméter neve.

value

string

A sablonparaméter értéke.

DtlEnvironment

Egy környezet, amely lényegében egy ARM-sablon üzembe helyezése.

Name Típus Description
id

string

Az erőforrás azonosítója.

location

string

Az erőforrás helye.

name

string

Az erőforrás neve.

properties.armTemplateDisplayName

string

A környezetet létrehozó Azure Resource Manager-sablon megjelenítendő neve.

properties.createdByUser

string

A környezet megteremtője.

properties.deploymentProperties

EnvironmentDeploymentProperties

A környezet üzembehelyezési tulajdonságai.

properties.provisioningState

string

Az erőforrás kiépítési állapota.

properties.resourceGroupId

string

A környezet erőforrásait tartalmazó erőforráscsoport azonosítója.

properties.uniqueIdentifier

string

Az erőforrás egyedi nem módosítható azonosítója (Guid).

tags

object

Az erőforrás címkéi.

type

string

Az erőforrás típusa.

EnvironmentDeploymentProperties

A környezet üzembe helyezésének tulajdonságai.

Name Típus Description
armTemplateId

string

Az Azure Resource Manager-sablon azonosítója.

parameters

ArmTemplateParameterProperties[]

Az Azure Resource Manager-sablon paraméterei.

ErrorAdditionalInfo

Az erőforrás-kezelési hiba további információi.

Name Típus Description
info

object

A további információk.

type

string

A további információtípus.

ErrorDetail

A hiba részletei.

Name Típus Description
additionalInfo

ErrorAdditionalInfo[]

A hiba további információi.

code

string

A hibakód.

details

ErrorDetail[]

A hiba részletei.

message

string

A hibaüzenet.

target

string

A hibacél.

ErrorResponse

Hibaválasz

Name Típus Description
error

ErrorDetail

A hibaobjektum.