我正在尝试运行以下命令来删除 Azure 中未使用的网络安全组,但该命令不断返回“子网/默认值不能为空或为空。”??
let subnetParameters = {
id: "/subscriptions/MysubscriptionId/resourceGroups/helloStorageResouceGrp/providers/Microsoft.Network/virtualNetworks/helloStorageResouceGrpvnet860/subnets/default",
networkSecurityGroup: {
id:'/subscriptions/MySubscription/resourceGroups/helloStorageResouceGrp/providers/Microsoft.Network/networkSecurityGroups/babNewMachineForEncryption-nsg',
name: null
}
}
let resourceGroupName = 'helloStorageResouceGrp';
let virtualNetworkName = 'helloStorageResouceGrpvnet860';
let subnetName = 'default';
let removeSecurityGroup = await NetworkManagement.subnets.createOrUpdate(resourceGroupName, virtualNetworkName, subnetName, subnetParameters)
console.log('removeSecurityGroup: ', JSON.stringify(removeSecurityGroup));