1. Packages
  2. Opennebula Provider
  3. API Docs
  4. getVirtualNetworkAddressRanges
opennebula 1.5.0 published on Friday, Jun 27, 2025 by opennebula

opennebula.getVirtualNetworkAddressRanges

Explore with Pulumi AI

opennebula logo
opennebula 1.5.0 published on Friday, Jun 27, 2025 by opennebula

    Use this data source to retrieve information about all address ranges for a virtual network in OpenNebula.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opennebula from "@pulumi/opennebula";
    
    const example = opennebula.getVirtualNetworkAddressRanges({
        virtualNetworkId: 123,
    });
    
    import pulumi
    import pulumi_opennebula as opennebula
    
    example = opennebula.get_virtual_network_address_ranges(virtual_network_id=123)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opennebula/opennebula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opennebula.GetVirtualNetworkAddressRanges(ctx, &opennebula.GetVirtualNetworkAddressRangesArgs{
    			VirtualNetworkId: 123,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opennebula = Pulumi.Opennebula;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Opennebula.GetVirtualNetworkAddressRanges.Invoke(new()
        {
            VirtualNetworkId = 123,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opennebula.OpennebulaFunctions;
    import com.pulumi.opennebula.inputs.GetVirtualNetworkAddressRangesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = OpennebulaFunctions.getVirtualNetworkAddressRanges(GetVirtualNetworkAddressRangesArgs.builder()
                .virtualNetworkId(123)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: opennebula:getVirtualNetworkAddressRanges
          arguments:
            virtualNetworkId: 123
    

    Using getVirtualNetworkAddressRanges

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getVirtualNetworkAddressRanges(args: GetVirtualNetworkAddressRangesArgs, opts?: InvokeOptions): Promise<GetVirtualNetworkAddressRangesResult>
    function getVirtualNetworkAddressRangesOutput(args: GetVirtualNetworkAddressRangesOutputArgs, opts?: InvokeOptions): Output<GetVirtualNetworkAddressRangesResult>
    def get_virtual_network_address_ranges(id: Optional[str] = None,
                                           virtual_network_id: Optional[float] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetVirtualNetworkAddressRangesResult
    def get_virtual_network_address_ranges_output(id: Optional[pulumi.Input[str]] = None,
                                           virtual_network_id: Optional[pulumi.Input[float]] = None,
                                           opts: Optional[InvokeOptions] = None) -> Output[GetVirtualNetworkAddressRangesResult]
    func GetVirtualNetworkAddressRanges(ctx *Context, args *GetVirtualNetworkAddressRangesArgs, opts ...InvokeOption) (*GetVirtualNetworkAddressRangesResult, error)
    func GetVirtualNetworkAddressRangesOutput(ctx *Context, args *GetVirtualNetworkAddressRangesOutputArgs, opts ...InvokeOption) GetVirtualNetworkAddressRangesResultOutput

    > Note: This function is named GetVirtualNetworkAddressRanges in the Go SDK.

    public static class GetVirtualNetworkAddressRanges 
    {
        public static Task<GetVirtualNetworkAddressRangesResult> InvokeAsync(GetVirtualNetworkAddressRangesArgs args, InvokeOptions? opts = null)
        public static Output<GetVirtualNetworkAddressRangesResult> Invoke(GetVirtualNetworkAddressRangesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVirtualNetworkAddressRangesResult> getVirtualNetworkAddressRanges(GetVirtualNetworkAddressRangesArgs args, InvokeOptions options)
    public static Output<GetVirtualNetworkAddressRangesResult> getVirtualNetworkAddressRanges(GetVirtualNetworkAddressRangesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: opennebula:index/getVirtualNetworkAddressRanges:getVirtualNetworkAddressRanges
      arguments:
        # arguments dictionary

    The following arguments are supported:

    VirtualNetworkId double
    ID of the virtual network.
    Id string
    The ID of the address range.
    VirtualNetworkId float64
    ID of the virtual network.
    Id string
    The ID of the address range.
    virtualNetworkId Double
    ID of the virtual network.
    id String
    The ID of the address range.
    virtualNetworkId number
    ID of the virtual network.
    id string
    The ID of the address range.
    virtual_network_id float
    ID of the virtual network.
    id str
    The ID of the address range.
    virtualNetworkId Number
    ID of the virtual network.
    id String
    The ID of the address range.

    getVirtualNetworkAddressRanges Result

    The following output properties are available:

    AddressRanges List<GetVirtualNetworkAddressRangesAddressRange>
    A list of address ranges for the specified virtual network, each containing the following attributes:
    Id string
    The ID of the address range.
    VirtualNetworkId double
    AddressRanges []GetVirtualNetworkAddressRangesAddressRange
    A list of address ranges for the specified virtual network, each containing the following attributes:
    Id string
    The ID of the address range.
    VirtualNetworkId float64
    addressRanges List<GetVirtualNetworkAddressRangesAddressRange>
    A list of address ranges for the specified virtual network, each containing the following attributes:
    id String
    The ID of the address range.
    virtualNetworkId Double
    addressRanges GetVirtualNetworkAddressRangesAddressRange[]
    A list of address ranges for the specified virtual network, each containing the following attributes:
    id string
    The ID of the address range.
    virtualNetworkId number
    address_ranges Sequence[GetVirtualNetworkAddressRangesAddressRange]
    A list of address ranges for the specified virtual network, each containing the following attributes:
    id str
    The ID of the address range.
    virtual_network_id float
    addressRanges List<Property Map>
    A list of address ranges for the specified virtual network, each containing the following attributes:
    id String
    The ID of the address range.
    virtualNetworkId Number

    Supporting Types

    GetVirtualNetworkAddressRangesAddressRange

    ArType string
    Type of the Address Range: IP4, IP6, IP4_6. Default is IP4.
    Custom Dictionary<string, string>
    Custom attributes for the address range.
    GlobalPrefix string
    Global prefix for IP6 or IP4_6.
    HeldIps List<string>
    List of IPs held in this address range.
    Id string
    The ID of the address range.
    Ip4 string
    Start IPv4 of the allocated range.
    Ip4End string
    End IPv4 of the allocated range.
    Ip6 string
    Start IPv6 of the allocated range.
    Ip6End string
    End IPv6 of the allocated range.
    Ip6Global string
    Global IPv6 of the allocated range.
    Ip6GlobalEnd string
    End Global IPv6 of the allocated range.
    Ip6Ula string
    ULA IPv6 of the allocated range.
    Ip6UlaEnd string
    End ULA IPv6 of the allocated range.
    Mac string
    Start MAC of the allocated range.
    MacEnd string
    End MAC of the allocated range.
    Size double
    Count of addresses in the IP range.
    UlaPrefix string
    ULA prefix for IP6 or IP4_6.
    ArType string
    Type of the Address Range: IP4, IP6, IP4_6. Default is IP4.
    Custom map[string]string
    Custom attributes for the address range.
    GlobalPrefix string
    Global prefix for IP6 or IP4_6.
    HeldIps []string
    List of IPs held in this address range.
    Id string
    The ID of the address range.
    Ip4 string
    Start IPv4 of the allocated range.
    Ip4End string
    End IPv4 of the allocated range.
    Ip6 string
    Start IPv6 of the allocated range.
    Ip6End string
    End IPv6 of the allocated range.
    Ip6Global string
    Global IPv6 of the allocated range.
    Ip6GlobalEnd string
    End Global IPv6 of the allocated range.
    Ip6Ula string
    ULA IPv6 of the allocated range.
    Ip6UlaEnd string
    End ULA IPv6 of the allocated range.
    Mac string
    Start MAC of the allocated range.
    MacEnd string
    End MAC of the allocated range.
    Size float64
    Count of addresses in the IP range.
    UlaPrefix string
    ULA prefix for IP6 or IP4_6.
    arType String
    Type of the Address Range: IP4, IP6, IP4_6. Default is IP4.
    custom Map<String,String>
    Custom attributes for the address range.
    globalPrefix String
    Global prefix for IP6 or IP4_6.
    heldIps List<String>
    List of IPs held in this address range.
    id String
    The ID of the address range.
    ip4 String
    Start IPv4 of the allocated range.
    ip4End String
    End IPv4 of the allocated range.
    ip6 String
    Start IPv6 of the allocated range.
    ip6End String
    End IPv6 of the allocated range.
    ip6Global String
    Global IPv6 of the allocated range.
    ip6GlobalEnd String
    End Global IPv6 of the allocated range.
    ip6Ula String
    ULA IPv6 of the allocated range.
    ip6UlaEnd String
    End ULA IPv6 of the allocated range.
    mac String
    Start MAC of the allocated range.
    macEnd String
    End MAC of the allocated range.
    size Double
    Count of addresses in the IP range.
    ulaPrefix String
    ULA prefix for IP6 or IP4_6.
    arType string
    Type of the Address Range: IP4, IP6, IP4_6. Default is IP4.
    custom {[key: string]: string}
    Custom attributes for the address range.
    globalPrefix string
    Global prefix for IP6 or IP4_6.
    heldIps string[]
    List of IPs held in this address range.
    id string
    The ID of the address range.
    ip4 string
    Start IPv4 of the allocated range.
    ip4End string
    End IPv4 of the allocated range.
    ip6 string
    Start IPv6 of the allocated range.
    ip6End string
    End IPv6 of the allocated range.
    ip6Global string
    Global IPv6 of the allocated range.
    ip6GlobalEnd string
    End Global IPv6 of the allocated range.
    ip6Ula string
    ULA IPv6 of the allocated range.
    ip6UlaEnd string
    End ULA IPv6 of the allocated range.
    mac string
    Start MAC of the allocated range.
    macEnd string
    End MAC of the allocated range.
    size number
    Count of addresses in the IP range.
    ulaPrefix string
    ULA prefix for IP6 or IP4_6.
    ar_type str
    Type of the Address Range: IP4, IP6, IP4_6. Default is IP4.
    custom Mapping[str, str]
    Custom attributes for the address range.
    global_prefix str
    Global prefix for IP6 or IP4_6.
    held_ips Sequence[str]
    List of IPs held in this address range.
    id str
    The ID of the address range.
    ip4 str
    Start IPv4 of the allocated range.
    ip4_end str
    End IPv4 of the allocated range.
    ip6 str
    Start IPv6 of the allocated range.
    ip6_end str
    End IPv6 of the allocated range.
    ip6_global str
    Global IPv6 of the allocated range.
    ip6_global_end str
    End Global IPv6 of the allocated range.
    ip6_ula str
    ULA IPv6 of the allocated range.
    ip6_ula_end str
    End ULA IPv6 of the allocated range.
    mac str
    Start MAC of the allocated range.
    mac_end str
    End MAC of the allocated range.
    size float
    Count of addresses in the IP range.
    ula_prefix str
    ULA prefix for IP6 or IP4_6.
    arType String
    Type of the Address Range: IP4, IP6, IP4_6. Default is IP4.
    custom Map<String>
    Custom attributes for the address range.
    globalPrefix String
    Global prefix for IP6 or IP4_6.
    heldIps List<String>
    List of IPs held in this address range.
    id String
    The ID of the address range.
    ip4 String
    Start IPv4 of the allocated range.
    ip4End String
    End IPv4 of the allocated range.
    ip6 String
    Start IPv6 of the allocated range.
    ip6End String
    End IPv6 of the allocated range.
    ip6Global String
    Global IPv6 of the allocated range.
    ip6GlobalEnd String
    End Global IPv6 of the allocated range.
    ip6Ula String
    ULA IPv6 of the allocated range.
    ip6UlaEnd String
    End ULA IPv6 of the allocated range.
    mac String
    Start MAC of the allocated range.
    macEnd String
    End MAC of the allocated range.
    size Number
    Count of addresses in the IP range.
    ulaPrefix String
    ULA prefix for IP6 or IP4_6.

    Package Details

    Repository
    opennebula opennebula/terraform-provider-opennebula
    License
    Notes
    This Pulumi package is based on the opennebula Terraform Provider.
    opennebula logo
    opennebula 1.5.0 published on Friday, Jun 27, 2025 by opennebula