我想從Azure-Cli(版本0.10.2)部署documentDb,因此我直接從Azure門戶導出模板。需要ARM模板「type」屬性
這導致了一個錯誤:
InvalidRequestContent : The request content was invalid and could not be deserialized: 'Could not find member 'defaultValue' on object of type 'DeploymentParameterDefinition'. Path 'properties.parameters.arm_document_db.defaultValue'
中的「價值」的結果改變這些:
InvalidDeploymentParameterType : The type of deployment parameter 'arm_document_db' should not be specified. Please see https://aka.ms/arm-deploy/#parameter-file for details.
檢查此頁面指示,要求類型,但都是小寫。這給了同樣的錯誤。
刪除「類型」,然後給了我這個錯誤:
InvalidRequestContent : The request content was invalid and could not be deserialized: 'Required property 'type' not found in JSON. Path 'properties.template.parameters.arm_document_db'
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"arm_document_db": {
"defaultValue": null,
"type": "SecureString"
},
"arm_document_db01": {
"defaultValue": "arm-document-db01",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.DocumentDB/databaseAccounts",
"kind": "DocumentDB",
"name": "[parameters('arm_document_db01')]",
"apiVersion": "2015-04-08",
"location": "Japan West",
"tags": {},
"properties": {
"databaseAccountOfferType": "Standard",
"name": "[parameters('arm_document_db')]"
},
"dependsOn": []
}
]
}
的aka.ms鏈接將顯示「類型」是必需的,但是錯誤說,事實並非如此。提前謝謝了!