protected override AzureSubnet Get(string subnetName) { AzureVnet vnet = Parent as AzureVnet; var subnetResult = Client.Subnets.Get(vnet.Id.ResourceGroup, vnet.Name, subnetName); return(new AzureSubnet(vnet, new PhSubnet(subnetResult.Value, vnet.Location))); }
public AzureSubnet CreateOrUpdateSubnets(AzureSubnet subnet) { AzureVnet vnet = Parent as AzureVnet; var subnetResult = Client.Subnets.StartCreateOrUpdate(vnet.Id.ResourceGroup, vnet.Name, subnet.Name, subnet.Model).WaitForCompletionAsync().Result; subnet = new AzureSubnet(vnet, new PhSubnet(subnetResult.Value, vnet.Location)); return(subnet); }
protected override IEnumerable <AzureSubnet> GetItems() { AzureVnet vnet = Parent as AzureVnet; foreach (var subnet in Client.Subnets.List(vnet.Id.ResourceGroup, vnet.Name)) { yield return(new AzureSubnet(vnet, new PhSubnet(subnet, vnet.Location))); } }
public AzureSubnet(AzureVnet vnet, PhSubnet model) : base(vnet, model) { }
public SubnetCollection(AzureVnet vnet) : base(vnet) { }