Deployments - Create Or Update

將資源部署到資源群組。
您可以直接在要求中提供範本和參數,或連結至 JSON 檔案。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}?api-version=2021-04-01

URI 參數

名稱 位於 必要 類型 Description
deploymentName
path True

string

部署的名稱。

Regex pattern: ^[-\w\._\(\)]+$

resourceGroupName
path True

string

要部署資源的資源群組名稱。 名稱不區分大小寫。 資源群組必須已存在。

Regex pattern: ^[-\w\._\(\)]+$

subscriptionId
path True

string

Microsoft Azure 訂用帳戶標識碼。

api-version
query True

string

用於此作業的 API 版本。

要求本文

名稱 必要 類型 Description
properties True

DeploymentProperties

部署屬性。

location

string

儲存部署數據的位置。

tags

object

部署標籤

回應

名稱 類型 Description
200 OK

DeploymentExtended

確定 - 傳回部署的相關信息,包括布建狀態。

201 Created

DeploymentExtended

已建立 - 傳回部署的相關信息,包括布建狀態。

Other Status Codes

CloudError

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Create a deployment that will deploy a template with a uri and queryString
Create a deployment that will deploy a templateSpec with the given resourceId
Create a deployment that will redeploy another deployment on failure
Create a deployment that will redeploy the last successful deployment on failure

Create a deployment that will deploy a template with a uri and queryString

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000001/resourcegroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment?api-version=2021-04-01

{
  "properties": {
    "templateLink": {
      "uri": "https://example.com/exampleTemplate.json",
      "queryString": "sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=xxxxxxxx0xxxxxxxxxxxxx%2bxxxxxxxxxxxxxxxxxxxx%3d"
    },
    "parameters": {},
    "mode": "Incremental"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment",
  "name": "my-deployment",
  "type": "Microsoft.Resources/deployments",
  "properties": {
    "templateLink": {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/TemplateSpecs/TemplateSpec-Name/versions/v1",
      "contentVersion": "1.0.0.0"
    },
    "templateHash": "0000000000000000000",
    "parameters": {},
    "mode": "Incremental",
    "provisioningState": "Succeeded",
    "timestamp": "2020-06-05T01:20:01.723776Z",
    "duration": "PT22.8356799S",
    "correlationId": "00000000-0000-0000-0000-000000000000",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": [],
    "outputResources": [
      {
        "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/my-storage-account"
      }
    ]
  }
}
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment",
  "name": "my-deployment",
  "type": "Microsoft.Resources/deployments",
  "properties": {
    "templateLink": {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/TemplateSpecs/TemplateSpec-Name/versions/v1",
      "contentVersion": "1.0.0.0"
    },
    "templateHash": "0000000000000000000",
    "parameters": {},
    "mode": "Incremental",
    "provisioningState": "Accepted",
    "timestamp": "2020-06-05T01:20:01.723776Z",
    "duration": "PT22.8356799S",
    "correlationId": "00000000-0000-0000-0000-000000000000",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": []
  }
}

Create a deployment that will deploy a templateSpec with the given resourceId

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000001/resourcegroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment?api-version=2021-04-01

{
  "properties": {
    "templateLink": {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/TemplateSpecs/TemplateSpec-Name/versions/v1"
    },
    "parameters": {},
    "mode": "Incremental"
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment",
  "name": "my-deployment",
  "type": "Microsoft.Resources/deployments",
  "properties": {
    "templateLink": {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/TemplateSpecs/TemplateSpec-Name/versions/v1",
      "contentVersion": "1.0.0.0"
    },
    "templateHash": "0000000000000000000",
    "parameters": {},
    "mode": "Incremental",
    "provisioningState": "Succeeded",
    "timestamp": "2020-06-05T01:20:01.723776Z",
    "duration": "PT22.8356799S",
    "correlationId": "00000000-0000-0000-0000-000000000000",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": [],
    "outputResources": [
      {
        "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Storage/storageAccounts/my-storage-account"
      }
    ]
  }
}
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment",
  "name": "my-deployment",
  "type": "Microsoft.Resources/deployments",
  "properties": {
    "templateLink": {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/my-resource-group/providers/Microsoft.Resources/TemplateSpecs/TemplateSpec-Name/versions/v1",
      "contentVersion": "1.0.0.0"
    },
    "templateHash": "0000000000000000000",
    "parameters": {},
    "mode": "Incremental",
    "provisioningState": "Accepted",
    "timestamp": "2020-06-05T01:20:01.723776Z",
    "duration": "PT22.8356799S",
    "correlationId": "00000000-0000-0000-0000-000000000000",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": []
  }
}

Create a deployment that will redeploy another deployment on failure

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment?api-version=2021-04-01

{
  "properties": {
    "templateLink": {
      "uri": "https://example.com/exampleTemplate.json"
    },
    "parameters": {},
    "mode": "Complete",
    "onErrorDeployment": {
      "type": "SpecificDeployment",
      "deploymentName": "name-of-deployment-to-use"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment",
  "name": "my-deployment",
  "type": "Microsoft.Resources/deployments",
  "properties": {
    "templateLink": {
      "uri": "https://example.com/exampleTemplate.json",
      "contentVersion": "1.0.0.0"
    },
    "parameters": {},
    "mode": "Complete",
    "provisioningState": "Accepted",
    "timestamp": "2019-03-01T00:00:00.0000000Z",
    "duration": "PT0.8204881S",
    "correlationId": "00000000-0000-0000-0000-000000000000",
    "providers": [
      {
        "namespace": "Microsoft.Network",
        "resourceTypes": [
          {
            "resourceType": "virtualNetworks",
            "locations": [
              "centralus"
            ]
          },
          {
            "resourceType": "virtualNetworks/subnets",
            "locations": [
              "centralus"
            ]
          }
        ]
      }
    ],
    "dependencies": [
      {
        "dependsOn": [
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks",
            "resourceName": "VNet1"
          }
        ],
        "id": "{resourceid}",
        "resourceType": "Microsoft.Network/virtualNetworks/subnets",
        "resourceName": "VNet1/Subnet1"
      },
      {
        "dependsOn": [
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks",
            "resourceName": "VNet1"
          },
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks/subnets",
            "resourceName": "VNet1/Subnet1"
          }
        ],
        "id": "{resourceid}",
        "resourceType": "Microsoft.Network/virtualNetworks/subnets",
        "resourceName": "VNet1/Subnet2"
      }
    ],
    "onErrorDeployment": {
      "type": "SpecificDeployment",
      "deploymentName": "name-of-deployment-to-use"
    }
  }
}
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment",
  "name": "my-deployment",
  "type": "Microsoft.Resources/deployments",
  "properties": {
    "templateLink": {
      "uri": "https://example.com/exampleTemplate.json",
      "contentVersion": "1.0.0.0"
    },
    "parameters": {},
    "mode": "Complete",
    "provisioningState": "Accepted",
    "timestamp": "2019-03-01T00:00:00.0000000Z",
    "duration": "PT0.8204881S",
    "correlationId": "00000000-0000-0000-0000-000000000000",
    "providers": [
      {
        "namespace": "Microsoft.Network",
        "resourceTypes": [
          {
            "resourceType": "virtualNetworks",
            "locations": [
              "centralus"
            ]
          },
          {
            "resourceType": "virtualNetworks/subnets",
            "locations": [
              "centralus"
            ]
          }
        ]
      }
    ],
    "dependencies": [
      {
        "dependsOn": [
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks",
            "resourceName": "VNet1"
          }
        ],
        "id": "{resourceid}",
        "resourceType": "Microsoft.Network/virtualNetworks/subnets",
        "resourceName": "VNet1/Subnet1"
      },
      {
        "dependsOn": [
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks",
            "resourceName": "VNet1"
          },
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks/subnets",
            "resourceName": "VNet1/Subnet1"
          }
        ],
        "id": "{resourceid}",
        "resourceType": "Microsoft.Network/virtualNetworks/subnets",
        "resourceName": "VNet1/Subnet2"
      }
    ],
    "onErrorDeployment": {
      "type": "SpecificDeployment",
      "deploymentName": "name-of-deployment-to-use"
    }
  }
}

Create a deployment that will redeploy the last successful deployment on failure

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment?api-version=2021-04-01

{
  "properties": {
    "templateLink": {
      "uri": "https://example.com/exampleTemplate.json"
    },
    "parameters": {},
    "mode": "Complete",
    "onErrorDeployment": {
      "type": "LastSuccessful"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment",
  "name": "my-deployment",
  "type": "Microsoft.Resources/deployments",
  "properties": {
    "templateLink": {
      "uri": "https://example.com/exampleTemplate.json",
      "contentVersion": "1.0.0.0"
    },
    "parameters": {},
    "mode": "Complete",
    "provisioningState": "Accepted",
    "timestamp": "2019-03-01T00:00:00.0000000Z",
    "duration": "PT0.8204881S",
    "correlationId": "00000000-0000-0000-0000-000000000000",
    "providers": [
      {
        "namespace": "Microsoft.Network",
        "resourceTypes": [
          {
            "resourceType": "virtualNetworks",
            "locations": [
              "centralus"
            ]
          },
          {
            "resourceType": "virtualNetworks/subnets",
            "locations": [
              "centralus"
            ]
          }
        ]
      }
    ],
    "dependencies": [
      {
        "dependsOn": [
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks",
            "resourceName": "VNet1"
          }
        ],
        "id": "{resourceid}",
        "resourceType": "Microsoft.Network/virtualNetworks/subnets",
        "resourceName": "VNet1/Subnet1"
      },
      {
        "dependsOn": [
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks",
            "resourceName": "VNet1"
          },
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks/subnets",
            "resourceName": "VNet1/Subnet1"
          }
        ],
        "id": "{resourceid}",
        "resourceType": "Microsoft.Network/virtualNetworks/subnets",
        "resourceName": "VNet1/Subnet2"
      }
    ],
    "onErrorDeployment": {
      "type": "LastSuccessful",
      "deploymentName": "{nameOfLastSuccesfulDeployment}"
    }
  }
}
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/Microsoft.Resources/deployments/my-deployment",
  "name": "my-deployment",
  "type": "Microsoft.Resources/deployments",
  "properties": {
    "templateLink": {
      "uri": "https://example.com/exampleTemplate.json",
      "contentVersion": "1.0.0.0"
    },
    "parameters": {},
    "mode": "Complete",
    "provisioningState": "Accepted",
    "timestamp": "2019-03-01T00:00:00.0000000Z",
    "duration": "PT0.8204881S",
    "correlationId": "00000000-0000-0000-0000-000000000000",
    "providers": [
      {
        "namespace": "Microsoft.Network",
        "resourceTypes": [
          {
            "resourceType": "virtualNetworks",
            "locations": [
              "centralus"
            ]
          },
          {
            "resourceType": "virtualNetworks/subnets",
            "locations": [
              "centralus"
            ]
          }
        ]
      }
    ],
    "dependencies": [
      {
        "dependsOn": [
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks",
            "resourceName": "VNet1"
          }
        ],
        "id": "{resourceid}",
        "resourceType": "Microsoft.Network/virtualNetworks/subnets",
        "resourceName": "VNet1/Subnet1"
      },
      {
        "dependsOn": [
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks",
            "resourceName": "VNet1"
          },
          {
            "id": "{resourceid}",
            "resourceType": "Microsoft.Network/virtualNetworks/subnets",
            "resourceName": "VNet1/Subnet1"
          }
        ],
        "id": "{resourceid}",
        "resourceType": "Microsoft.Network/virtualNetworks/subnets",
        "resourceName": "VNet1/Subnet2"
      }
    ],
    "onErrorDeployment": {
      "type": "LastSuccessful",
      "deploymentName": "{nameOfLastSuccesfulDeployment}"
    }
  }
}

定義

名稱 Description
Alias

別名類型。

AliasPath

別名的路徑類型。

AliasPathAttributes

別名路徑所參考之令牌的屬性。

AliasPathMetadata
AliasPathTokenType

別名路徑所參考的令牌類型。

AliasPattern

別名路徑的模式類型。

AliasPatternType

別名模式的類型

AliasType

別名類型。

ApiProfile
BasicDependency

部署相依性資訊。

CloudError

資源管理要求的錯誤回應。

DebugSetting

偵錯設定。

Dependency

部署相依性資訊。

Deployment

部署作業參數。

DeploymentExtended

部署資訊。

DeploymentMode

用來部署資源的模式。 此值可以是累加或完成。 在 [增量] 模式中,部署資源時不會刪除範本中未包含的現有資源。 在 [完成] 模式中,系統會部署資源,而範本中未包含的資源群組中現有的資源則會遭到刪除。 使用完整模式時請小心,因為您可能不小心刪除資源。

DeploymentProperties

部署屬性

DeploymentPropertiesExtended

具有其他詳細數據的部署屬性。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorResponse

錯誤回應

ExpressionEvaluationOptions

指定範本表示式是否在父範本或巢狀範本的範圍內進行評估。

ExpressionEvaluationOptionsScopeType

要用於評估巢狀範本中參數、變數和函式的範圍。

OnErrorDeployment

錯誤行為的部署。

OnErrorDeploymentExtended

使用其他詳細數據部署錯誤行為。

OnErrorDeploymentType

錯誤行為類型的部署。 可能的值為 LastSuccessful 和 SpecificDeployment。

ParametersLink

表示部署參數參考的實體。

Provider

資源提供者資訊。

ProviderAuthorizationConsentState

提供者授權同意狀態。

ProviderExtendedLocation

提供者擴充位置。

ProviderResourceType

資源提供者所管理的資源類型。

ProvisioningState

表示布建的狀態。

ResourceReference

資源標識元模型。

TemplateLink

實體,代表範本的參考。

ZoneMapping

Alias

別名類型。

名稱 類型 Description
defaultMetadata

AliasPathMetadata

默認別名路徑元數據。 適用於預設路徑,以及任何沒有元數據的別名路徑

defaultPath

string

別名的預設路徑。

defaultPattern

AliasPattern

別名的預設模式。

name

string

別名名稱。

paths

AliasPath[]

別名的路徑。

type

AliasType

別名類型。

AliasPath

別名的路徑類型。

名稱 類型 Description
apiVersions

string[]

API 版本。

metadata

AliasPathMetadata

別名路徑的元數據。 如果遺失,請回復為別名的預設元數據。

path

string

別名的路徑。

pattern

AliasPattern

別名路徑的模式。

AliasPathAttributes

別名路徑所參考之令牌的屬性。

名稱 類型 Description
Modifiable

string

別名路徑所參考的令牌可由具有 『modify』 效果的原則修改。

None

string

別名路徑所參考的令牌沒有屬性。

AliasPathMetadata

名稱 類型 Description
attributes

AliasPathAttributes

別名路徑所參考之令牌的屬性。

type

AliasPathTokenType

別名路徑所參考的令牌類型。

AliasPathTokenType

別名路徑所參考的令牌類型。

名稱 類型 Description
Any

string

Token 類型可以是任何專案。

Array

string

Token 類型為陣列。

Boolean

string

Token 類型為布爾值。

Integer

string

Token 類型為整數。

NotSpecified

string

未指定令牌類型。

Number

string

Token 類型為 number。

Object

string

Token 類型為物件。

String

string

Token 類型為字串。

AliasPattern

別名路徑的模式類型。

名稱 類型 Description
phrase

string

別名模式片語。

type

AliasPatternType

別名模式的類型

variable

string

別名模式變數。

AliasPatternType

別名模式的類型

名稱 類型 Description
Extract

string

擷取是唯一允許的值。

NotSpecified

string

不允許 NotSpecified。

AliasType

別名類型。

名稱 類型 Description
Mask

string

別名值是秘密。

NotSpecified

string

別名類型未知 (與未提供別名類型) 相同。

PlainText

string

別名值不是秘密。

ApiProfile

名稱 類型 Description
apiVersion

string

API 版本。

profileVersion

string

配置檔版本。

BasicDependency

部署相依性資訊。

名稱 類型 Description
id

string

相依性標識碼。

resourceName

string

相依性資源名稱。

resourceType

string

相依性資源類型。

CloudError

資源管理要求的錯誤回應。

名稱 類型 Description
error

ErrorResponse

錯誤回應
所有 Azure Resource Manager API 的常見錯誤回應,以傳回失敗作業的錯誤詳細數據。 (這也會遵循 OData 錯誤回應格式。)

DebugSetting

偵錯設定。

名稱 類型 Description
detailLevel

string

指定要記錄以進行偵錯的資訊類型。 允許的值為 none、requestContent、responseContent,或以逗號分隔的 requestContent 和 responseContent。 預設值是 [none]。 設定此值時,請仔細考慮您在部署期間傳入的信息類型。 透過記錄要求或回應的相關資訊,您可能會公開透過部署作業擷取的機密資料。

Dependency

部署相依性資訊。

名稱 類型 Description
dependsOn

BasicDependency[]

相依性的清單。

id

string

相依性標識碼。

resourceName

string

相依性資源名稱。

resourceType

string

相依性資源類型。

Deployment

部署作業參數。

名稱 類型 Description
location

string

儲存部署數據的位置。

properties

DeploymentProperties

部署屬性。

tags

object

部署標籤

DeploymentExtended

部署資訊。

名稱 類型 Description
id

string

部署的標識碼。

location

string

部署的位置。

name

string

部署的名稱。

properties

DeploymentPropertiesExtended

部署屬性

tags

object

部署標籤

type

string

部署的類型。

DeploymentMode

用來部署資源的模式。 此值可以是累加或完成。 在 [增量] 模式中,部署資源時不會刪除範本中未包含的現有資源。 在 [完成] 模式中,系統會部署資源,而範本中未包含的資源群組中現有的資源則會遭到刪除。 使用完整模式時請小心,因為您可能不小心刪除資源。

名稱 類型 Description
Complete

string

Incremental

string

DeploymentProperties

部署屬性

名稱 類型 Description
debugSetting

DebugSetting

部署的偵錯設定。

expressionEvaluationOptions

ExpressionEvaluationOptions

指定範本表示式是否在父範本或巢狀範本的範圍內進行評估。 僅適用於巢狀範本。 如果未指定,預設值為外部。

mode

DeploymentMode

用來部署資源的模式。 此值可以是累加或完成。 在 [增量] 模式中,部署資源時不會刪除範本中未包含的現有資源。 在 [完成] 模式中,系統會部署資源,而範本中未包含的資源群組中現有的資源則會遭到刪除。 使用完整模式時請小心,因為您可能不小心刪除資源。

onErrorDeployment

OnErrorDeployment

錯誤行為的部署。

parameters

object

定義範本部署參數的名稱和值組。 當您想要直接在要求中提供參數值,而不是連結至現有的參數檔案時,請使用這個專案。 使用parametersLink屬性或parameters屬性,但不能同時使用兩者。 它可以是 JObject 或格式正確的 JSON 字串。

parametersLink

ParametersLink

參數檔案的 URI。 您可以使用這個項目連結至現有的參數檔案。 使用parametersLink屬性或parameters屬性,但不能同時使用兩者。

template

object

範本內容。 當您想要直接在要求中傳遞範本語法,而不是連結至現有的範本時,請使用這個專案。 它可以是 JObject 或格式正確的 JSON 字串。 使用templateLink屬性或範本屬性,但不能同時使用兩者。

templateLink

TemplateLink

範本的 URI。 使用templateLink屬性或範本屬性,但不能同時使用兩者。

DeploymentPropertiesExtended

具有其他詳細數據的部署屬性。

名稱 類型 Description
correlationId

string

部署的相互關聯標識碼。

debugSetting

DebugSetting

部署的偵錯設定。

dependencies

Dependency[]

部署相依性的清單。

duration

string

範本部署的持續時間。

error

ErrorResponse

錯誤回應
部署錯誤。

mode

DeploymentMode

部署模式。 可能的值為累加和完成。

onErrorDeployment

OnErrorDeploymentExtended

錯誤行為的部署。

outputResources

ResourceReference[]

已布建資源的陣列。

outputs

object

代表部署輸出的索引鍵/值組。

parameters

object

部署參數。

parametersLink

ParametersLink

參考參數的 URI。

providers

Provider[]

部署所需的資源提供者清單。

provisioningState

ProvisioningState

表示布建的狀態。

templateHash

string

為範本產生的哈希。

templateLink

TemplateLink

參考範本的 URI。

timestamp

string

範本部署的時間戳。

validatedResources

ResourceReference[]

已驗證資源的陣列。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorResponse

錯誤回應

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorResponse[]

錯誤詳細資料。

message

string

錯誤訊息。

target

string

錯誤目標。

ExpressionEvaluationOptions

指定範本表示式是否在父範本或巢狀範本的範圍內進行評估。

名稱 類型 Description
scope

ExpressionEvaluationOptionsScopeType

要用於評估巢狀範本中參數、變數和函式的範圍。

ExpressionEvaluationOptionsScopeType

要用於評估巢狀範本中參數、變數和函式的範圍。

名稱 類型 Description
Inner

string

NotSpecified

string

Outer

string

OnErrorDeployment

錯誤行為的部署。

名稱 類型 Description
deploymentName

string

要用於錯誤案例的部署。

type

OnErrorDeploymentType

錯誤行為類型的部署。 可能的值為 LastSuccessful 和 SpecificDeployment。

OnErrorDeploymentExtended

使用其他詳細數據部署錯誤行為。

名稱 類型 Description
deploymentName

string

要用於錯誤案例的部署。

provisioningState

string

在錯誤部署時布建的狀態。

type

OnErrorDeploymentType

錯誤行為類型的部署。 可能的值為 LastSuccessful 和 SpecificDeployment。

OnErrorDeploymentType

錯誤行為類型的部署。 可能的值為 LastSuccessful 和 SpecificDeployment。

名稱 類型 Description
LastSuccessful

string

SpecificDeployment

string

表示部署參數參考的實體。

名稱 類型 Description
contentVersion

string

如果包含,則必須符合範本中的 ContentVersion。

uri

string

參數檔案的 URI。

Provider

資源提供者資訊。

名稱 類型 Description
id

string

提供者 ID。

namespace

string

資源提供者的命名空間。

providerAuthorizationConsentState

ProviderAuthorizationConsentState

提供者授權同意狀態。

registrationPolicy

string

資源提供者的註冊原則。

registrationState

string

資源提供者的註冊狀態。

resourceTypes

ProviderResourceType[]

提供者資源類型的集合。

ProviderAuthorizationConsentState

提供者授權同意狀態。

名稱 類型 Description
Consented

string

NotRequired

string

NotSpecified

string

Required

string

ProviderExtendedLocation

提供者擴充位置。

名稱 類型 Description
extendedLocations

string[]

Azure 位置的擴充位置。

location

string

Azure 位置。

type

string

擴充位置類型。

ProviderResourceType

資源提供者所管理的資源類型。

名稱 類型 Description
aliases

Alias[]

此資源類型支援的別名。

apiProfiles

ApiProfile[]

資源提供者的 API 設定檔。

apiVersions

string[]

API 版本。

capabilities

string

此資源類型所提供的其他功能。

defaultApiVersion

string

預設 API 版本。

locationMappings

ProviderExtendedLocation[]

此資源類型支援的位置對應。

locations

string[]

可以建立此資源類型的位置集合。

properties

object

屬性。

resourceType

string

資源類型。

zoneMappings

ZoneMapping[]

ProvisioningState

表示布建的狀態。

名稱 類型 Description
Accepted

string

Canceled

string

Created

string

Creating

string

Deleted

string

Deleting

string

Failed

string

NotSpecified

string

Ready

string

Running

string

Succeeded

string

Updating

string

ResourceReference

資源標識元模型。

名稱 類型 Description
id

string

完整資源標識碼。

實體,代表範本的參考。

名稱 類型 Description
contentVersion

string

如果包含,則必須符合範本中的 ContentVersion。

id

string

範本規格的資源識別碼。請使用id或 uri 屬性,但不能同時使用兩者。

queryString

string

例如,查詢字串 (,要與 templateLink URI 搭配使用的 SAS 令牌) 。

relativePath

string

relativePath 屬性可用來在相對於父系的位置部署連結的範本。 如果父範本與 TemplateSpec 連結,這會參考 TemplateSpec 中的成品。 如果父系與 URI 連結,子部署將會是父系和 relativePath URI 的組合

uri

string

要部署之範本的 URI。 使用 uri 或 id 屬性,但不能同時使用兩者。

ZoneMapping

名稱 類型 Description
location

string

區域對應的位置。

zones

string[]