type AddressSpace struct { AddressPrefix []string }
type DNS struct { DNSServers []DNSServer `xml:"DnsServers>DnsServer,omitempty"` }
type DNSServer struct { XMLName xml.Name `xml:"DnsServer"` Name string `xml:"name,attr"` IPAddress string `xml:"IPAddress,attr"` }
type DNSServerRef struct { Name string `xml:"name,attr"` }
type LocalNetworkSite struct { Name string `xml:"name,attr"` VPNGatewayAddress string AddressSpace AddressSpace }
NetworkConfiguration represents the network configuration for an entire Azure subscription.
type NetworkConfiguration struct { XMLName xml.Name `xml:"NetworkConfiguration"` XMLNamespaceXsd string `xml:"xmlns:xsd,attr"` XMLNamespaceXsi string `xml:"xmlns:xsi,attr"` XMLNs string `xml:"xmlns,attr"` Configuration VirtualNetworkConfiguration `xml:"VirtualNetworkConfiguration"` }
type Subnet struct { Name string `xml:"name,attr"` AddressPrefix string }
VirtualNetworkClient is used to perform operations on Virtual Networks.
type VirtualNetworkClient struct {
// contains filtered or unexported fields
}
func NewClient(client management.Client) VirtualNetworkClient
NewClient is used to return new VirtualNetworkClient instance
func (c VirtualNetworkClient) GetVirtualNetworkConfiguration() (NetworkConfiguration, error)
GetVirtualNetworkConfiguration retreives the current virtual network configuration for the currently active subscription. Note that the underlying Azure API means that network related operations are not safe for running concurrently.
func (client *VirtualNetworkClient) NewNetworkConfiguration() NetworkConfiguration
NewNetworkConfiguration creates a new empty NetworkConfiguration structure for further configuration. The XML namespaces are already set correctly.
func (c VirtualNetworkClient) SetVirtualNetworkConfiguration(networkConfiguration NetworkConfiguration) (management.OperationID, error)
SetVirtualNetworkConfiguration configures the virtual networks for the currently active subscription according to the NetworkConfiguration given. Note that the underlying Azure API means that network related operations are not safe for running concurrently.
type VirtualNetworkConfiguration struct { DNS DNS `xml:"Dns,omitempty"` LocalNetworkSites []LocalNetworkSite `xml:"LocalNetworkSites>LocalNetworkSite"` VirtualNetworkSites []VirtualNetworkSite `xml:"VirtualNetworkSites>VirtualNetworkSite"` }
type VirtualNetworkSite struct { Name string `xml:"name,attr"` Location string `xml:"Location,attr"` AddressSpace AddressSpace `xml:"AddressSpace"` Subnets []Subnet `xml:"Subnets>Subnet"` DNSServersRef []DNSServerRef `xml:"DnsServersRef>DnsServerRef,omitempty"` }