Megosztás a következőn keresztül:


Environments - Create Or Update

Meglévő környezet létrehozása vagy cseréje. A művelet elvégzése 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 környezet neve.

resourceGroupName
path True

string

Az erőforráscsoport neve.

subscriptionId
path True

string

Az előfizetés azonosítója.

userName
path True

string

A felhasználói profil neve.

api-version
query True

string

Ügyfél API-verziója.

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

OK

201 Created

DtlEnvironment

Létrehozva

Other Status Codes

CloudError

BadRequest

Biztonság

azure_auth

OAuth2 implicit engedélyezés

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 Microsoft Azure eléré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": {
      "parameters": [],
      "armTemplateId": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}"
    }
  }
}

Mintaválasz

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

Definíciók

Name Description
ArmTemplateParameterProperties

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

CloudError

REST-kérésből származó hiba.

CloudErrorBody

EGY REST-kérésből származó hibatörzs.

DtlEnvironment

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

EnvironmentDeploymentProperties

Egy környezet üzemelő példányának tulajdonságai.

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.

CloudError

REST-kérésből származó hiba.

Name Típus Description
error

CloudErrorBody

A felhőben bekövetkezett hiba

CloudErrorBody

EGY REST-kérésből származó hibatörzs.

Name Típus Description
code

string

A hibakód.

details

CloudErrorBody[]

Belső hibák.

message

string

A hibaüzenet.

target

string

A hiba célja.

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 létrehozója.

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

Egy környezet üzemelő példányának 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.