无法使用经典API调用将NSG添加到子网 [英] Unable to add NSG to Subnet using classic API call

查看:86
本文介绍了无法使用经典API调用将NSG添加到子网的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在V1中创建了一个NSG并且还有子网可用。我正在尝试使用经典API将NSG添加到子网。下面是我想要的URI。我有文档中建议的标题和请求正文 -  

I have created a NSG in V1 and also have the Subnet available. I am trying to add the NSG to Subnet using the classic API. Below is the URI i am trying to hit. I have the header and request body as suggested in the documentation - 

https://management.core.windows.net/<subscription-id>/services/virtualnetwork/<virtual-network-name> / subnets /< subnet-name> / networksecuritygroups

我是从微软 文档 -  

https://docs.microsoft.com/en-us/previous-versions/azure/reference/dn913822( v%3dazure.100)

https://docs.microsoft.com/en-us/previous-versions/azure/reference/dn913822(v%3dazure.100)

现在,当我尝试点击api时,我收到以下错误回复 -  

<错误xmlns =" ; HTTP://schemas.microsoft.com/windowsazure" xmlns:i =" http://www.w3.org/2001/XMLSchema-instance">< Code> ResourceNotFound< / Code>< Message>不支持资源服务名称virtualnetwork。< / Message> ;< /错误>

<Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>ResourceNotFound</Code><Message>The resource service name virtualnetwork is not supported.</Message></Error>

看起来不支持'virtualnetwork'服务。我认为文档中提供的URI不正确。您能否请,请告诉我正确的URI或任何建议来解决这个问题?

Looks like 'virtualnetwork' service is not supported. I think the URI provided in the documentation is not correct. Can you please, let me know the correct URI or any suggestions to resolve this?

推荐答案

尝试使用 resources.azure.com 查看它如何引用子网。这是一个仔细检查任何JSON或Rest API更新的好地方。 
Try using resources.azure.com to see how it references the subnet. It is a great place to double check any JSON or Rest API updates. 


这篇关于无法使用经典API调用将NSG添加到子网的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆