使用Microsoft.Azure.Management.ResourceManager.Fluent
库枚举资源组中的容器时:
azure.ContainerGroups.ListByResourceGroup(resouceGroup)
返回一个枚举器,但对枚举器执行任何操作(例如.ToList()
)都会抛出:
Exception thrown: 'Microsoft.Rest.Azure.CloudException' in System.Private.CoreLib.dll
The Resource 'Microsoft.ContainerInstance/containerGroups/myResource' under resource group 'myResourceGroup' was not found.