I need to add an existing ASG (Application Security Group ) to my existing NetworkInterface.
In my code below I can find my ASG and NetworkInterface... but I have no clue how to attach both of them together.
public void AddASG(string servername, string ASGName)
{
IAzure azure = ConnectAzure();
var ASG = azure.ApplicationSecurityGroups.List().Where(y => y.Name == ASGName).First();
var nic = azure.NetworkInterfaces.List()
.Where(y => y.Name.ToUpper().Contains(servername))
.Select(x => x).First();
nic.IPConfigurations?????;
}
