///GENMHASH:BADDFF325BE650E465684B9E9C420713:EF15F2179E69AEE60447694AD9406A85
        public VirtualNetworkGatewayImpl WithNewNetwork(string name, string addressSpace, string subnetAddressSpaceCidr)
        {
            Network.Definition.IWithGroup definitionWithGroup = Manager.Networks
                                                                .Define(name)
                                                                .WithRegion(RegionName);

            Network.Definition.IWithCreate definitionAfterGroup;
            if (NewGroup() != null)
            {
                definitionAfterGroup = definitionWithGroup.WithNewResourceGroup(NewGroup());
            }
            else
            {
                definitionAfterGroup = definitionWithGroup.WithExistingResourceGroup(ResourceGroupName);
            }

            return(WithNewNetwork(definitionAfterGroup.WithAddressSpace(addressSpace).WithSubnet(GATEWAY_SUBNET, subnetAddressSpaceCidr)));
        }
Ejemplo n.º 2
0
        ///GENMHASH:B5B394278E45FCA8B4503E2FCB31EF46:CC21AC0A859CA80548303077EA4E1648
        internal NicIPConfigurationImpl WithNewNetwork(string name, string addressSpaceCidr)
        {
            Network.Definition.IWithGroup definitionWithGroup = Parent.Manager.Networks
                                                                .Define(name)
                                                                .WithRegion(Parent.RegionName);

            Network.Definition.IWithCreate definitionAfterGroup;
            if (Parent.NewGroup() != null)
            {
                definitionAfterGroup = definitionWithGroup.WithNewResourceGroup(Parent.NewGroup());
            }
            else
            {
                definitionAfterGroup = definitionWithGroup.WithExistingResourceGroup(Parent.ResourceGroupName);
            }

            return(WithNewNetwork(definitionAfterGroup.WithAddressSpace(addressSpaceCidr)));
        }