【问题标题】:Authoratative Source Dcoumentation for Azure ARM Template SchemaAzure ARM 模板架构的权威源文档
【发布时间】:2017-01-19 17:49:58
【问题描述】:

我正在寻找 Azure Desired State Configuration JSON 架构的官方文档。我在网上找到的文档和示例可以追溯到很久以前,我觉得我使用的模式不是最新的。我目前正在寻找 Microsoft.Powershell.DSC 的最新架构和字段描述。这是 Visual Studio 提供的架构,但我想全面了解他们期望的每个字段和值。

{
    "name": "Microsoft.Powershell.DSC",
    "type": "extensions",
    "location": "[parameters('location')]",
    "apiVersion": "2015-06-15",
    "dependsOn": [
        "[resourceId('Microsoft.Compute/virtualMachines', parameters('vm-SP1-Name'))]"
    ],
    "tags": {
        "displayName": "test"
    },
    "properties": {
        "publisher": "Microsoft.Powershell",
        "type": "DSC",
        "typeHandlerVersion": "2.9",
        "autoUpgradeMinorVersion": true,
        "forceUpdateTag": "[parameters('testUpdateTagVersion')]",
        "settings": {
            "configuration": {
                "url": "[concat(parameters('_artifactsLocation'), '/', variables('testArchiveFolder'), '/', variables('testArchiveFileName'))]",
                "script": "test.ps1",
                "function": "Main"
            },
            "configurationArguments": {
                "nodeName": "[parameters('vm-SP1-Name')]"
            }
        },
        "protectedSettings": {
            "configurationUrlSasToken": "[parameters('_artifactsLocationSasToken')]"
        }
    }
}

【问题讨论】:

    标签: powershell azure-resource-manager dsc


    【解决方案1】:

    可在以下链接中找到 ARM PowerShell Desired State Configuration (DSC) JSON 架构的官方架构定义:

    Schema Json

        "dscExtension": {
            "type": "object",
            "properties": {
                "publisher": {
                    "enum": ["Microsoft.Powershell"]
                },
                "type": {
                    "enum": ["DSC"]
                },
                "typeHandlerVersion": {
                    "type": "string",
                    "minLength": 1
                },
                "autoUpgradeMinorVersion": {
                    "type": "boolean"
                },
                "settings": {
                    "type": "object",
                    "properties": {
                        "modulesUrl": {
                            "type": "string"
                        },
                        "configurationFunction": {
                            "type": "string"
                        },
                        "properties": {
                            "type": "string"
                        },
                        "wmfVersion": {
                            "type": "string"
                        },
                        "privacy": {
                            "type": "object",
                            "properties": {
                                "dataCollection": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "required": ["modulesUrl", "configurationFunction"]
                },
                "protectedSettings": {
                    "type": "object",
                    "properties": {
                        "dataBlobUri": {
                            "type": "string"
                        }
                    }
                }
            },
            "required": ["publisher", "type", "typeHandlerVersion", "autoUpgradeMinorVersion", "settings", "protectedSettings"]
        },
    

    【讨论】:

    • 此架构已过期。请使用 PowerShell 博客中的那个。
    【解决方案2】:

    架构记录在this blog 中。如果您有任何问题,请随时在PowerShell slack(首选)或推特上联系我,@TravisPlunk。如果我不知道,我可以将他们引导到正确的地方。

    【讨论】:

    • 这是一篇非常古老的博客文章,不确定该架构的最新情况。我想查看有关当前和过去架构的官方权威文档
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-03
    • 1970-01-01
    相关资源
    最近更新 更多