Is there a way to create a virtual network using C# and the Azure SDK/API?

I don't see a clear way to create an Azure Virtual Network using the SDK.
I have all the methods to create the virtual network configuration, but no way to submit it:
IList<string> VirtualNetworkAddressPrefixes = new List<string>();
IList<string> LocalNetworkAddressPrefixes = new List<string>();
IList<NetworkListResponse.DnsServer> DNSServers = new List<NetworkListResponse.DnsServer>();
IList<NetworkListResponse.Subnet> Subnets = new List<NetworkListResponse.Subnet>();
NetworkListResponse.Gateway Gateway = new NetworkListResponse.Gateway();
IList<NetworkListResponse.LocalNetworkSite> LocalSites = new List<NetworkListResponse.LocalNetworkSite>();
IList<NetworkListResponse.Connection> Connections = new List<NetworkListResponse.Connection>();
VirtualNetworkAddressPrefixes.Add("a.b.c.d/cidr");
DNSServers.Add(new NetworkListResponse.DnsServer() { Name = "TestDNS1", Address = "a.b.c.d" });
Subnets.Add(new NetworkListResponse.Subnet() { Name = "Subnet-1", AddressPrefix = "a.b.c.d/cidr" });
Subnets.Add(new NetworkListResponse.Subnet() { Name = "GatewaySubnet", AddressPrefix = "a.b.c.d/cidr" });
Connections.Add(new NetworkListResponse.Connection() { Type = LocalNetworkConnectionType.IPSecurity });
LocalNetworkAddressPrefixes.Add("a.b.c.d/cidr");
LocalSites.Add(new NetworkListResponse.LocalNetworkSite()
Name = "On-Prem",
Connections = Connections,
VpnGatewayAddress = "a.b.c.d",
AddressSpace = new NetworkListResponse.AddressSpace() { AddressPrefixes = LocalNetworkAddressPrefixes }
Gateway.Sites = LocalSites;
Gateway.Profile = GatewayProfile.ExtraLarge;
NetworkManagementClient netMgmtClient = new NetworkManagementClient(CloudCredentials);
NetworkListResponse netlistresp = GlobalSettings.mainWindow.netMgmtClient.Networks.List();
netlistresp.VirtualNetworkSites
.Add(new NetworkListResponse.VirtualNetworkSite()
Name = "TestVirtualNetwork",
AddressSpace = new NetworkListResponse.AddressSpace() { AddressPrefixes = VirtualNetworkAddressPrefixes },
DnsServers = DNSServers,
Subnets = Subnets,
AffinityGroup = "East US",
Gateway = Gateway,
Label = "LabelValue"
I have also created the entire XML response and sent it to the NetworkManagementClient -> Networks.SetConfiguration() method, but it appears this command expects the virtual network to already be in existence. If anyone could give guidance, it would be
appreciated.

Hi,
As discuss above , we have to create the XML response  ,before that first you have to
GetConfiguration() details of existing virtual network. 
string.format("@<NetworkConfiguration xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns='http://schemas.microsoft.com/ServiceHosting/2011/07/NetworkConfiguration'>
            <VirtualNetworkConfiguration>
            <Dns />
            <VirtualNetworkSites>
            <VirtualNetworkSite name=""{0}"" Location=""{1}"">
            <AddressSpace>
            <AddressPrefix>10.0.0.0/8</AddressPrefix>
            </AddressSpace>
            <Subnets>
            <Subnet name=""Subnet-2"">
            <AddressPrefix>10.0.0.0/11</AddressPrefix>
            </Subnet>
            </Subnets>
            </VirtualNetworkSite>",Networkname,location)+(@"<VirtualNetworkSite name=""demodsf1"" Location=""West Europe"">
        <AddressSpace>
          <AddressPrefix>10.0.0.0/8</AddressPrefix>
        </AddressSpace>
        <Subnets>
          <Subnet name=""Subnet-1"">
            <AddressPrefix>10.0.0.0/11</AddressPrefix>
          </Subnet>
        </Subnets>
      </VirtualNetworkSite>  </VirtualNetworkSites>
            </VirtualNetworkConfiguration>
            </NetworkConfiguration>")
you have to append the node for existing node with new values , i got it its adding new virtual network 
Best regards,

Similar Messages

  • Is there a way to create form fields to tab into and type and or drop down selection fields in pages as you can with microsoft word?

    is there a way to create form fields to tab into and type and or drop down selection fields in pages as you can with microsoft word?

    No

  • Is there a way to create multiple BQY output to one of the Job File ?

    Hello,
    I am using EPM11.1.2.3.501 version.
    BQY report due to the large amount of data, it is difficult to use a WebClient.
    So will share on a quarterly basis.
    However,
    If modifications are to occur,There are difficulties must modify each file.
    For example,
    Register 2014 1Q, 2014 2Q, 2014 3Q, 2014 4Q BQY Job file.
    When you run the job, the output of the job file is created.
    If the job file is changed, you must modify all four files.
    This will be only grow ations.
    Is there a way to create multiple BQY output to one of the Job File ??
    Please help me.
    Thanks

    It is not possible to have multiple BQY outpu into a job file.
    Thanks,
    KK

  • It seems cranky sometimes works, somtimes not.  My other issue - is there a way to create a mail signature using the font I use in Outlook (or can I import that signature)?

    I have a new iPhone 4s - having lots of trouble with Siri.  It seems cranky - sometimes works, somtimes not.  My other issue - is there a way to create a mail signature using the font I use in Outlook (or can I import that signature)?  How can I find fonts availble on my phone?
    Thanks for any help

    Not in Acrobat unless your image is already in the PDF format.
    This is a feature of forms created with LiveCycle Designer.

  • Is there any way to create an installer for Mac OS and Linux OS once a stand alone application is created?

    Is there any way to create an installer for Mac OS and Linux OS once a stand alone application is created?  I have created an executable application that I want to distribute to Mac and Linux users (different applications were created in the respective OS).  I was wondering if there is any way to create an installer?  I think there probably isn't...  If the user were to simply download the Labview Run-time Engine from ni.com would they be able to run the application or is it more complicated than that?
    Thanks so much for your time.

    I think Shane tried to say, that it is on the Mac OS X installation DVD, NOT the LabVIEW for Mac OS X installation medium. And that could very well have changed in recent Mac OS X versions as well. They used to have Xcode on it too, but that seems gone as well.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Is there a way to create an email alert in iCal on the iPhone (as it's possible to do on the laptop)?

    Is there a way to create an email alert in iCal on the iPhone (as it's possible to do on the laptop)?

    Nope.
    You might be able to find another calendar app that can do that in the App Store.
    And, you can always leave Apple feedback here -> Apple - iPhone - Feedback

  • Is there a way to play your music through your laptop and the apple tv?

    Is there a way to play your music through your laptop AND the apple tv? I use my apple TV with screen sharing, but then there is no more sounds coming from my laptop. Is there a way to do this?

    on you laptop you will open itunes. up next to the play button you will see the little airplay symbol, you need to click that, press Apple TV, then select some music.

  • Is there a way to insert a Ai graphic into msWord and the graphic text be searchable in msWord?

    Is there a way to insert a Ai graphic into msWord and the graphic text still be searchable in msWord? I would like the text in my Ai graphic to be searchable once the graphic is inserted in msWord. I have tried different Ai exports, but all come into msWord as pictures. Is there a way to keep the Text Layer in my Ai file searchable in msWord.

    Which version of Illustrator are you using?
    Which version of Word are you using?
    What OS?
    Do you have a recent version of Acrobat?

  • Hi my names mark.I have the ipad 2 it's on ios 7.1 I had iOS 7.4 but it downgraded to iOS 7.1 is there any way I can upgrade to iOS 7.4 and the 3D effect is gone off my ipad

    Hi my names mark.I have the ipad 2 it's on ios 7.1 I had iOS 7.4 but it downgraded to iOS 7.1 is there any way I can upgrade to iOS 7.4 and the 3D effect is gone off my ipad

    There isn't an iOS 7.4 - there was a 7.0.4 (and 7.0.6), 7.1 is the current version.
    For the parallax effect, do you currently have Settings > General > Accessibility > Reduce Motion set 'on' ?

  • Is there a way to create a sequence by using multiple playlists?

    Is there a way to create a sequence so that music from several playlists is played in a specific order.
    For example:
    1 song from playlist 1
    3 songs from playlist 2
    5 songs from playlist 3
    1 song from playlist 4
    After which it restarts.

    No. Create a new PL with the sequence that you want. You can tell the PL to repeat itself.
    MJ

  • Is there a way to create consignment stock without using a Purchase Order

    Hi Gurus,
    Is there a way tp created unrestricted consignment stock for a material without first creating a Purchase Order and then using MIGO. Is there a way to create directly into inventory?
    Thanks for your help!

    Hi Charlie/All,
    Still having the same issue.
    I checked t-code OMEV to make sure Consignment Info Record is activated
    I checked the EINE table to verify the Infor Record was created for consignment
    In MIGO I use the following:
    Goods receipt - other - movement type 501K
    material, vendor, qty entered
    error msg: purchase info record not founf in purchasing organization??
    not sure why..thank for all your help so far...

  • SCOM 2012 - Is there a way to create a class/target/group based on the presence of a folder?

    I need to create monitor(s) for an application, but the application services are different on all the servers.  Usually I would find a application service that is common among all the servers I want to monitor to create the target,
    but this does not exist.  There are no common services for this application. However, every server does have a common folder in the Program Files on the C: drive (i.e. "xyz" folder exist on every server for the application). 
    Is there a way to create a target based on a folder in the Programs Folder?

    Please refer to the following, which is quite exactly fit your requirement.
    http://msdn.microsoft.com/en-us/library/bb437613.aspx
    Roger

  • Is there a way to create a file merge that updates from the original source file if changes are made?

    I have thousands of PDF documents that are merged with other files. I'll give an example so it's easier to understand.
    File #1 may be merged (or in a portfolio) with Files #2 and #3 but also in another merge (or portfolio) with Files #3 and #4.
    If I update File #1, is there a way for it to automatically update both of the merge or portfolio files with the updated File #1? (File#1 would be replaced, same name and location).
    I'm using windows and Adobe Acrobat Pro

    You would need to add favorites to the WebHelp output prior to creating a CHM. You would need something along the lines of: http://www.wvanweelden.eu/product/favorites-widget-webhelp
    But since it's in a CHM, I'm not sure whether you will be able to save anything from the webhelp output between sessions.
    Kind regards,
    Willam

  • Is there a way to create basic tier Azurvm using new-azureVMconfig?

    Currently with azure powershell version 0.8.0 I am able to provision new Azure virtual machines using a combination of New-AzureVMconfig | Add-AzureProvisioningConfig | New-AzureVM cmdlets.  This gets me standard tier virtual machines with parameters
    for -instanceSize { ExtraSmall, Medium, Large, etc). 
    Is there a way for me to specify that I want a Basic Tier ExtraSmall vs a Standard Tier ExtraSmall ?
    thank you

    Hi,
    As far as I know, we don't specify the Basic Tier or Standard Tier VM in request using Powershell. And the documents didn't show this property. We only change it on azure portal. About this issue, You can submit a feature suggestion on
    http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I bought my kids an itouch...however, it snyced to my account.  Is there a way to create a separate account from them and remove all of my information from the touch?

    if i give my itouch to my son, how can i start from scratch with none of my info on it?  Additionally, i would like for him to have his own account but he isn't  old enoughby apple's rules, is there a way for him to have a sub account from mine?

    Hopefully you moved the entire iTunes Media (or iTunes Music) folder to a new path on your external drive. Copy your iTunes library folder out to the root of the external drive, e.g. X:\iTunes (where X: is your external drive), then move the media folder inside it. Hold down shift as you start iTUnes and keep holding untila asked to choose or create a library. Choose the library at X:\iTunes\iTunes Library.itl. Should all be good.
    Failing that, download and run my FindTracks script and point it at the new location of your media folder.
    tt2

Maybe you are looking for