New-AzResourceGroupDeployment
语法
ByTemplateFileWithNoParameters (默认值)
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateFile <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateObjectAndParameterObject
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterObject <Hashtable>
-TemplateObject <Hashtable>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateFileAndParameterObject
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterObject <Hashtable>
-TemplateFile <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateUriAndParameterObject
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterObject <Hashtable>
-TemplateUri <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateSpecResourceIdAndParamsObject
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterObject <Hashtable>
-TemplateSpecId <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateObjectAndParameterFile
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterFile <String>
-TemplateObject <Hashtable>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateFileAndParameterFile
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterFile <String>
-TemplateFile <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateUriAndParameterFile
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterFile <String>
-TemplateUri <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateSpecResourceIdAndParams
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterFile <String>
-TemplateSpecId <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByParameterFileWithNoTemplate
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterFile <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateObjectAndParameterUri
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterUri <String>
-TemplateObject <Hashtable>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateFileAndParameterUri
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterUri <String>
-TemplateFile <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateUriAndParameterUri
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterUri <String>
-TemplateUri <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateSpecResourceIdAndParamsUri
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateParameterUri <String>
-TemplateSpecId <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateObjectWithNoParameters
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateObject <Hashtable>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateUriWithNoParameters
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateUri <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByTemplateSpecResourceId
New-AzResourceGroupDeployment
-ResourceGroupName <String>
-TemplateSpecId <String>
[-Name <String>]
[-Mode <DeploymentMode>]
[-DeploymentDebugLogLevel <String>]
[-RollbackToLastDeployment]
[-RollBackDeploymentName <String>]
[-Tag <Hashtable>]
[-WhatIfResultFormat <WhatIfResultFormat>]
[-WhatIfExcludeChangeType <String[]>]
[-Force]
[-ProceedIfNoChange]
[-AsJob]
[-AuxTenant <String[]>]
[-QueryString <String>]
[-ValidationLevel <String>]
[-SkipTemplateParameterPrompt]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
New-AzResourceGroupDeployment cmdlet 将部署添加到现有资源组。
这包括部署所需的资源。
Azure 资源是用户管理的 Azure 实体,例如数据库服务器、数据库、网站、虚拟机或存储帐户。
Azure 资源组是一组 Azure 资源,这些资源部署为单元,例如网站、数据库服务器和财务网站所需的数据库。
资源组部署使用模板将资源添加到资源组并发布资源,使其在 Azure 中可用。
若要在不使用模板的情况下将资源添加到资源组,请使用 New-AzResource cmdlet。
若要添加资源组部署,请指定现有资源组和资源组模板的名称。
资源组模板是一个 JSON 字符串,表示复杂基于云的服务的资源组,例如 Web 门户。
该模板包括所需资源和可配置属性值的参数占位符,例如名称和大小。
可以在 Azure 模板库中找到许多模板,也可以创建自己的模板。
若要使用自定义模板创建资源组,请指定 TemplateFile 参数或 TemplateUri 参数。
每个模板都有可配置属性的参数。
若要指定模板参数的值,请指定 TemplateParameterFile 参数或 TemplateParameterObject 参数。
或者,可以在指定模板时使用动态添加到命令的模板参数。
若要使用动态参数,请在命令提示符下键入它们,或键入减号(-),以指示参数,并使用 Tab 键循环访问可用参数。
在命令提示符处输入的模板参数值优先于模板参数对象或文件中的值。
示例
示例 1:使用自定义模板和参数文件创建部署
New-AzResourceGroupDeployment -ResourceGroupName "ContosoEngineering" -TemplateFile "D:\Azure\Templates\EngineeringSite.json" -TemplateParameterFile "D:\Azure\Templates\EngSiteParms.json" -Tag @{"key1"="value1"; "key2"="value2";}
此命令使用自定义模板和磁盘上的模板文件以及定义的标记参数创建新的部署。
该命令使用 TemplateFile 参数指定模板和 TemplateParameterFile 参数来指定包含参数和参数值的文件。
示例 2:使用自定义模板对象和参数文件创建部署
$TemplateFileText = [System.IO.File]::ReadAllText("D:\Azure\Templates\EngineeringSite.json")
$TemplateObject = ConvertFrom-Json $TemplateFileText -AsHashtable
New-AzResourceGroupDeployment -ResourceGroupName "ContosoEngineering" -TemplateObject $TemplateObject -TemplateParameterFile "D:\Azure\Templates\EngSiteParams.json"
此命令使用已转换为内存中哈希表的磁盘上的自定义和模板文件创建新的部署。
前两个命令读取磁盘上模板文件的文本,并将其转换为内存中哈希表。
最后一个命令使用 TemplateObject 参数指定哈希表和 TemplateParameterFile 参数来指定包含参数和参数值的文件。
示例 3
将 Azure 部署添加到资源组。 (autogenerated)
New-AzResourceGroupDeployment -DeploymentDebugLogLevel RequestContent -Name mynewstorageaccount -ResourceGroupName 'ContosoEngineering' -TemplateFile 'D:\Azure\Templates\EngineeringSite.json' -TemplateParameterObject <Hashtable>
示例 4:使用 URI 和 SAS 令牌部署存储在非公共存储帐户中的模板
New-AzResourceGroupDeployment -ResourceGroupName "RGName" -TemplateUri "https://example.com/example.json" -QueryString "foo"
此命令使用 TemplateUri 中的模板创建新的部署,该模板不是公共模板,需要令牌参数才能访问将使用 QueryString 参数提供的参数。
运行此命令会使用 URL https://example.com/example.json?foo有效地访问模板。
如果要通过在存储帐户中提供 SAS 令牌作为 QueryString 来使用模板,则可以使用此功能
示例 5:使用 .bicepparam 文件创建部署
New-AzResourceGroupDeployment -ResourceGroupName "RGName" -TemplateParameterFile "./parameters.bicepparam"
此命令使用磁盘上的 .bicepparam 文件在资源组范围内创建新的部署。
该命令使用 TemplateParameterFile 参数指定 .bicepparam 文件。
参数
-AsJob
在后台运行 cmdlet
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-AuxTenant
跨租户部署的 Aux 租户 ID
参数属性
| 类型: | String[]
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DefaultProfile
用于与 azure 通信的凭据、帐户、租户和订阅
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DeploymentDebugLogLevel
指定调试日志级别。
此参数的可接受值为:
- RequestContent
- ResponseContent
- 全部
- None
参数属性
| 类型: | String
|
| 默认值: | None |
| 接受的值: | RequestContent, ResponseContent, All, None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-Force
强制命令运行而不要求用户确认。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Mode
指定部署模式。 此参数的可接受值为:
- 完成:在完整模式下,资源管理器删除资源组中存在但未在模板中指定的资源。
- 增量:在增量模式下,资源管理器保留资源组中存在但未在模板中指定的未更改的资源。
参数属性
| 类型: | DeploymentMode
|
| 默认值: | Incremental |
| 接受的值: | Incremental, Complete |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-Name
要创建的部署的名称。 如果未指定,则提供模板文件时默认为模板文件名;默认为提供模板对象的当前时间,例如“20131223140835”。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | 部署名称 |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-Pre
指示此 cmdlet 在自动确定要使用的版本时会考虑预发布 API 版本。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ProceedIfNoChange
如果 What-If 结果中没有更改,请不要请求确认。 设置 -Confirm 开关时适用。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-QueryString
要与 TemplateUri 参数一起使用的查询字符串(例如 SAS 令牌)。 在链接模板的情况下使用
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ResourceGroupName
指定要部署的资源组的名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-RollBackDeploymentName
如果使用 -RollbackToLastDeployment,则不应使用资源组中具有给定名称的成功部署。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-RollbackToLastDeployment
如果使用 -RollBackDeploymentName,则不应回滚到资源组中最后一次成功的部署。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-SkipTemplateParameterPrompt
跳过 PowerShell 动态参数处理,用于检查提供的模板参数是否包含模板使用的所有必要参数。 如果发现参数未在模板中绑定,则此检查会提示用户提供缺失参数的值,但提供 -SkipTemplateParameterPrompt 将立即忽略此提示并立即出错。 对于非交互式脚本,可以提供 -SkipTemplateParameterPrompt,以便在未满足所有必需参数的情况下提供更好的错误消息。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Tag
要放入部署的标记。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-TemplateFile
指定自定义模板文件的完整路径。 支持的模板文件类型:json 和 bicep。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByTemplateFileWithNoParameters
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateFileAndParameterObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateFileAndParameterFile
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateFileAndParameterUri
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-TemplateObject
表示模板的哈希表。
参数属性
参数集
ByTemplateObjectAndParameterObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateObjectAndParameterFile
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateObjectAndParameterUri
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateObjectWithNoParameters
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-TemplateParameterFile
指定包含模板参数名称和值的 JSON 文件的完整路径。
如果模板具有参数,则必须使用 TemplateParameterFile 参数或 TemplateParameterObject 参数指定参数值。
指定模板时,模板参数会动态添加到命令。
若要使用动态参数,请键入减号(-),以指示参数名称,然后使用 Tab 键循环访问可用参数。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByTemplateObjectAndParameterFile
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateFileAndParameterFile
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateUriAndParameterFile
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateSpecResourceIdAndParams
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByParameterFileWithNoTemplate
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-TemplateParameterObject
指定模板参数名称和值的哈希表。
有关 Windows PowerShell 中哈希表的帮助,请键入 Get-Help about_Hash_Tables。
如果模板具有参数,则必须指定参数值。
指定模板时,模板参数会动态添加到命令。
参数属性
参数集
ByTemplateObjectAndParameterObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateFileAndParameterObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateUriAndParameterObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateSpecResourceIdAndParamsObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-TemplateParameterUri
指定模板参数文件的 URI。 使用 TemplateParameterUri 时,将忽略你使用的任何动态参数。 若要使用动态参数,必须改用 TemplateParameterFile 参数
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByTemplateObjectAndParameterUri
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateFileAndParameterUri
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateUriAndParameterUri
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateSpecResourceIdAndParamsUri
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-TemplateSpecId
要部署的 templateSpec 的资源 ID。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByTemplateSpecResourceIdAndParamsObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateSpecResourceIdAndParams
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateSpecResourceIdAndParamsUri
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateSpecResourceId
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-TemplateUri
指定自定义模板文件的 URI。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByTemplateUriAndParameterObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateUriAndParameterFile
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateUriAndParameterUri
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByTemplateUriWithNoParameters
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-ValidationLevel
设置验证/what-if 的验证级别。 ValidationLevel 可以是模板(跳过提供程序验证)、提供程序(执行完全验证)或 ProviderNoRbac(使用 RBAC 读取检查执行完全验证,而不是 RBAC 写入检查来验证提供程序)。
参数属性
| 类型: | String
|
| 默认值: | None(Provider) |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-WhatIfExcludeChangeType
要从 What-If 结果中排除的逗号分隔的资源更改类型。 在设置 -WhatIf 或 -Confirm 开关时适用。
参数属性
| 类型: | String[]
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
What-If 结果格式。
| 类型: | WhatIfResultFormat
|
| 默认值: | None |
| 接受的值: | ResourceIdOnly, FullResourcePayloads |
| 支持通配符: | False |
| 不显示: | False |
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
Microsoft.Azure.Management.ResourceManager.Models.DeploymentMode
输出