在Powershell中创建Azure API管理标记
是否有在Powershell中创建Azure API管理标记的方法?我已经使用创建命名值,但在AzAPIManagement中似乎没有创建标记的等效项 以前有人这样做过吗在Powershell中创建Azure API管理标记,azure,powershell,tags,azure-api-management,Azure,Powershell,Tags,Azure Api Management,是否有在Powershell中创建Azure API管理标记的方法?我已经使用创建命名值,但在AzAPIManagement中似乎没有创建标记的等效项 以前有人这样做过吗 请看一下这里: 您可以使用创建标记,尝试下面的脚本,它将创建一个名为tag1的标记 $ResourceName = "tag1" $PropertiesObject = @{ displayName = "tag1" } New-AzResource -PropertyObject $PropertiesObject
请看一下这里: 您可以使用创建标记,尝试下面的脚本,它将创建一个名为
tag1
的标记
$ResourceName = "tag1"
$PropertiesObject = @{
displayName = "tag1"
}
New-AzResource -PropertyObject $PropertiesObject -ResourceGroupName <resource-group-name> -ResourceType Microsoft.ApiManagement/service/tags -ResourceName "<API-Management-service-name>/$ResourceName" -ApiVersion 2018-01-01 -Force
$ResourceName=“tag1”
$PropertiesObject=@{
displayName=“tag1”
}
新建AzResource-PropertyObject$PropertiesObject-ResourceGroupName-ResourceType Microsoft.ApiManagement/service/tags-ResourceName“
Hi Markus,我以前见过。它似乎是用于将现有标记添加到新API。可能缺少某些内容。Hi Joy,我在运行该语句时出错,new AzResource:{“Message”:“请求的资源不支持http方法‘PUT’。”}第3行字符:1+新AzResource-PropertyObject$PropertiesObject-ResourceGroupName$…+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,ErrorResponseMessageException+FullyQualifiedErrorId:Microsoft.Azure.Commands.ResourceManager.cmdlet.Implementation。NewAzureResourceCmdlet@PhilMurray尝试通过updatemodule-Name Az-Force
更新powershell版本。只需更新Az库并重新运行命令a,我就可以得到相同的结果error@PhilMurray你能确定一下吗您的脚本与我的脚本完全相同?您能在问题中提供完整的脚本吗?@PhilMurray只需复制和粘贴,更改标记1
,
,
,它能工作吗?