1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. getNetwork
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center

edgecenter.getNetwork

Explore with Pulumi AI

edgecenter logo
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center

    Represent network. A network is a software-defined network in a cloud computing infrastructure

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as edgecenter from "@pulumi/edgecenter";
    
    const pr = edgecenter.getProject({
        name: "test",
    });
    const rg = edgecenter.getRegion({
        name: "ED-10 Preprod",
    });
    const tnw = Promise.all([rg, pr]).then(([rg, pr]) => edgecenter.getNetwork({
        name: "example",
        regionId: rg.id,
        projectId: pr.id,
    }));
    export const view = tnw;
    
    import pulumi
    import pulumi_edgecenter as edgecenter
    
    pr = edgecenter.get_project(name="test")
    rg = edgecenter.get_region(name="ED-10 Preprod")
    tnw = edgecenter.get_network(name="example",
        region_id=rg.id,
        project_id=pr.id)
    pulumi.export("view", tnw)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		pr, err := edgecenter.LookupProject(ctx, &edgecenter.LookupProjectArgs{
    			Name: pulumi.StringRef("test"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		rg, err := edgecenter.GetRegion(ctx, &edgecenter.GetRegionArgs{
    			Name: "ED-10 Preprod",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		tnw, err := edgecenter.LookupNetwork(ctx, &edgecenter.LookupNetworkArgs{
    			Name:      "example",
    			RegionId:  pulumi.Float64Ref(rg.Id),
    			ProjectId: pulumi.Float64Ref(pr.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("view", tnw)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Edgecenter = Pulumi.Edgecenter;
    
    return await Deployment.RunAsync(() => 
    {
        var pr = Edgecenter.GetProject.Invoke(new()
        {
            Name = "test",
        });
    
        var rg = Edgecenter.GetRegion.Invoke(new()
        {
            Name = "ED-10 Preprod",
        });
    
        var tnw = Edgecenter.GetNetwork.Invoke(new()
        {
            Name = "example",
            RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
            ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
        });
    
        return new Dictionary<string, object?>
        {
            ["view"] = tnw,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.edgecenter.EdgecenterFunctions;
    import com.pulumi.edgecenter.inputs.GetProjectArgs;
    import com.pulumi.edgecenter.inputs.GetRegionArgs;
    import com.pulumi.edgecenter.inputs.GetNetworkArgs;
    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 pr = EdgecenterFunctions.getProject(GetProjectArgs.builder()
                .name("test")
                .build());
    
            final var rg = EdgecenterFunctions.getRegion(GetRegionArgs.builder()
                .name("ED-10 Preprod")
                .build());
    
            final var tnw = EdgecenterFunctions.getNetwork(GetNetworkArgs.builder()
                .name("example")
                .regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
                .projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
                .build());
    
            ctx.export("view", tnw.applyValue(getNetworkResult -> getNetworkResult));
        }
    }
    
    variables:
      pr:
        fn::invoke:
          function: edgecenter:getProject
          arguments:
            name: test
      rg:
        fn::invoke:
          function: edgecenter:getRegion
          arguments:
            name: ED-10 Preprod
      tnw:
        fn::invoke:
          function: edgecenter:getNetwork
          arguments:
            name: example
            regionId: ${rg.id}
            projectId: ${pr.id}
    outputs:
      view: ${tnw}
    

    Using getNetwork

    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 getNetwork(args: GetNetworkArgs, opts?: InvokeOptions): Promise<GetNetworkResult>
    function getNetworkOutput(args: GetNetworkOutputArgs, opts?: InvokeOptions): Output<GetNetworkResult>
    def get_network(id: Optional[str] = None,
                    metadata_k: Optional[str] = None,
                    metadata_kv: Optional[Mapping[str, str]] = None,
                    name: Optional[str] = None,
                    project_id: Optional[float] = None,
                    project_name: Optional[str] = None,
                    region_id: Optional[float] = None,
                    region_name: Optional[str] = None,
                    shared_with_subnets: Optional[bool] = None,
                    subnets: Optional[Sequence[GetNetworkSubnet]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetNetworkResult
    def get_network_output(id: Optional[pulumi.Input[str]] = None,
                    metadata_k: Optional[pulumi.Input[str]] = None,
                    metadata_kv: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    project_id: Optional[pulumi.Input[float]] = None,
                    project_name: Optional[pulumi.Input[str]] = None,
                    region_id: Optional[pulumi.Input[float]] = None,
                    region_name: Optional[pulumi.Input[str]] = None,
                    shared_with_subnets: Optional[pulumi.Input[bool]] = None,
                    subnets: Optional[pulumi.Input[Sequence[pulumi.Input[GetNetworkSubnetArgs]]]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetNetworkResult]
    func LookupNetwork(ctx *Context, args *LookupNetworkArgs, opts ...InvokeOption) (*LookupNetworkResult, error)
    func LookupNetworkOutput(ctx *Context, args *LookupNetworkOutputArgs, opts ...InvokeOption) LookupNetworkResultOutput

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

    public static class GetNetwork 
    {
        public static Task<GetNetworkResult> InvokeAsync(GetNetworkArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkResult> Invoke(GetNetworkInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
    public static Output<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
    
    fn::invoke:
      function: edgecenter:index/getNetwork:getNetwork
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the network.
    Id string
    The ID of this resource.
    MetadataK string
    Filtration query opts (only key).
    MetadataKv Dictionary<string, string>
    Filtration query opts, for example, {offset = "10", limit = "10"}
    ProjectId double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    SharedWithSubnets bool
    Get shared networks with details of subnets.
    Subnets List<GetNetworkSubnet>
    A list of read-only metadata items, e.g. tags.
    Name string
    The name of the network.
    Id string
    The ID of this resource.
    MetadataK string
    Filtration query opts (only key).
    MetadataKv map[string]string
    Filtration query opts, for example, {offset = "10", limit = "10"}
    ProjectId float64
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId float64
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    SharedWithSubnets bool
    Get shared networks with details of subnets.
    Subnets []GetNetworkSubnet
    A list of read-only metadata items, e.g. tags.
    name String
    The name of the network.
    id String
    The ID of this resource.
    metadataK String
    Filtration query opts (only key).
    metadataKv Map<String,String>
    Filtration query opts, for example, {offset = "10", limit = "10"}
    projectId Double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    sharedWithSubnets Boolean
    Get shared networks with details of subnets.
    subnets List<GetNetworkSubnet>
    A list of read-only metadata items, e.g. tags.
    name string
    The name of the network.
    id string
    The ID of this resource.
    metadataK string
    Filtration query opts (only key).
    metadataKv {[key: string]: string}
    Filtration query opts, for example, {offset = "10", limit = "10"}
    projectId number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    sharedWithSubnets boolean
    Get shared networks with details of subnets.
    subnets GetNetworkSubnet[]
    A list of read-only metadata items, e.g. tags.
    name str
    The name of the network.
    id str
    The ID of this resource.
    metadata_k str
    Filtration query opts (only key).
    metadata_kv Mapping[str, str]
    Filtration query opts, for example, {offset = "10", limit = "10"}
    project_id float
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    project_name str
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    region_id float
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    region_name str
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    shared_with_subnets bool
    Get shared networks with details of subnets.
    subnets Sequence[GetNetworkSubnet]
    A list of read-only metadata items, e.g. tags.
    name String
    The name of the network.
    id String
    The ID of this resource.
    metadataK String
    Filtration query opts (only key).
    metadataKv Map<String>
    Filtration query opts, for example, {offset = "10", limit = "10"}
    projectId Number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    sharedWithSubnets Boolean
    Get shared networks with details of subnets.
    subnets List<Property Map>
    A list of read-only metadata items, e.g. tags.

    getNetwork Result

    The following output properties are available:

    External bool
    Id string
    The ID of this resource.
    MetadataReadOnlies List<GetNetworkMetadataReadOnly>
    A list of read-only metadata items, e.g. tags.
    Mtu double
    Maximum Transmission Unit (MTU) for the network. It determines the maximum packet size that can be transmitted without fragmentation.
    Name string
    The name of the network.
    Shared bool
    Type string
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    MetadataK string
    Filtration query opts (only key).
    MetadataKv Dictionary<string, string>
    Filtration query opts, for example, {offset = "10", limit = "10"}
    ProjectId double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    SharedWithSubnets bool
    Get shared networks with details of subnets.
    Subnets List<GetNetworkSubnet>
    A list of read-only metadata items, e.g. tags.
    External bool
    Id string
    The ID of this resource.
    MetadataReadOnlies []GetNetworkMetadataReadOnly
    A list of read-only metadata items, e.g. tags.
    Mtu float64
    Maximum Transmission Unit (MTU) for the network. It determines the maximum packet size that can be transmitted without fragmentation.
    Name string
    The name of the network.
    Shared bool
    Type string
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    MetadataK string
    Filtration query opts (only key).
    MetadataKv map[string]string
    Filtration query opts, for example, {offset = "10", limit = "10"}
    ProjectId float64
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId float64
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    SharedWithSubnets bool
    Get shared networks with details of subnets.
    Subnets []GetNetworkSubnet
    A list of read-only metadata items, e.g. tags.
    external Boolean
    id String
    The ID of this resource.
    metadataReadOnlies List<GetNetworkMetadataReadOnly>
    A list of read-only metadata items, e.g. tags.
    mtu Double
    Maximum Transmission Unit (MTU) for the network. It determines the maximum packet size that can be transmitted without fragmentation.
    name String
    The name of the network.
    shared Boolean
    type String
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    metadataK String
    Filtration query opts (only key).
    metadataKv Map<String,String>
    Filtration query opts, for example, {offset = "10", limit = "10"}
    projectId Double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    sharedWithSubnets Boolean
    Get shared networks with details of subnets.
    subnets List<GetNetworkSubnet>
    A list of read-only metadata items, e.g. tags.
    external boolean
    id string
    The ID of this resource.
    metadataReadOnlies GetNetworkMetadataReadOnly[]
    A list of read-only metadata items, e.g. tags.
    mtu number
    Maximum Transmission Unit (MTU) for the network. It determines the maximum packet size that can be transmitted without fragmentation.
    name string
    The name of the network.
    shared boolean
    type string
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    metadataK string
    Filtration query opts (only key).
    metadataKv {[key: string]: string}
    Filtration query opts, for example, {offset = "10", limit = "10"}
    projectId number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    sharedWithSubnets boolean
    Get shared networks with details of subnets.
    subnets GetNetworkSubnet[]
    A list of read-only metadata items, e.g. tags.
    external bool
    id str
    The ID of this resource.
    metadata_read_onlies Sequence[GetNetworkMetadataReadOnly]
    A list of read-only metadata items, e.g. tags.
    mtu float
    Maximum Transmission Unit (MTU) for the network. It determines the maximum packet size that can be transmitted without fragmentation.
    name str
    The name of the network.
    shared bool
    type str
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    metadata_k str
    Filtration query opts (only key).
    metadata_kv Mapping[str, str]
    Filtration query opts, for example, {offset = "10", limit = "10"}
    project_id float
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    project_name str
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    region_id float
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    region_name str
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    shared_with_subnets bool
    Get shared networks with details of subnets.
    subnets Sequence[GetNetworkSubnet]
    A list of read-only metadata items, e.g. tags.
    external Boolean
    id String
    The ID of this resource.
    metadataReadOnlies List<Property Map>
    A list of read-only metadata items, e.g. tags.
    mtu Number
    Maximum Transmission Unit (MTU) for the network. It determines the maximum packet size that can be transmitted without fragmentation.
    name String
    The name of the network.
    shared Boolean
    type String
    'vlan' or 'vxlan' network type is allowed. Default value is 'vxlan'
    metadataK String
    Filtration query opts (only key).
    metadataKv Map<String>
    Filtration query opts, for example, {offset = "10", limit = "10"}
    projectId Number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    sharedWithSubnets Boolean
    Get shared networks with details of subnets.
    subnets List<Property Map>
    A list of read-only metadata items, e.g. tags.

    Supporting Types

    GetNetworkMetadataReadOnly

    Key string
    ReadOnly bool
    Value string
    Key string
    ReadOnly bool
    Value string
    key String
    readOnly Boolean
    value String
    key string
    readOnly boolean
    value string
    key str
    read_only bool
    value str
    key String
    readOnly Boolean
    value String

    GetNetworkSubnet

    AvailableIps double
    The number of available IPs in the subnet.
    Cidr string
    Represents the IP address range of the subnet.
    DnsNameservers List<string>
    List of DNS name servers for the subnet.
    EnableDhcp bool
    Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
    GatewayIp string
    The IP address of the gateway for this subnet.
    HasRouter bool
    Indicates whether the subnet has a router attached to it.
    HostRoutes List<GetNetworkSubnetHostRoute>
    List of additional routes to be added to instances that are part of this subnet.
    Id string
    The ID of the subnet.
    Name string
    The name of the subnet.
    TotalIps double
    The total number of IPs in the subnet.
    AvailableIps float64
    The number of available IPs in the subnet.
    Cidr string
    Represents the IP address range of the subnet.
    DnsNameservers []string
    List of DNS name servers for the subnet.
    EnableDhcp bool
    Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
    GatewayIp string
    The IP address of the gateway for this subnet.
    HasRouter bool
    Indicates whether the subnet has a router attached to it.
    HostRoutes []GetNetworkSubnetHostRoute
    List of additional routes to be added to instances that are part of this subnet.
    Id string
    The ID of the subnet.
    Name string
    The name of the subnet.
    TotalIps float64
    The total number of IPs in the subnet.
    availableIps Double
    The number of available IPs in the subnet.
    cidr String
    Represents the IP address range of the subnet.
    dnsNameservers List<String>
    List of DNS name servers for the subnet.
    enableDhcp Boolean
    Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
    gatewayIp String
    The IP address of the gateway for this subnet.
    hasRouter Boolean
    Indicates whether the subnet has a router attached to it.
    hostRoutes List<GetNetworkSubnetHostRoute>
    List of additional routes to be added to instances that are part of this subnet.
    id String
    The ID of the subnet.
    name String
    The name of the subnet.
    totalIps Double
    The total number of IPs in the subnet.
    availableIps number
    The number of available IPs in the subnet.
    cidr string
    Represents the IP address range of the subnet.
    dnsNameservers string[]
    List of DNS name servers for the subnet.
    enableDhcp boolean
    Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
    gatewayIp string
    The IP address of the gateway for this subnet.
    hasRouter boolean
    Indicates whether the subnet has a router attached to it.
    hostRoutes GetNetworkSubnetHostRoute[]
    List of additional routes to be added to instances that are part of this subnet.
    id string
    The ID of the subnet.
    name string
    The name of the subnet.
    totalIps number
    The total number of IPs in the subnet.
    available_ips float
    The number of available IPs in the subnet.
    cidr str
    Represents the IP address range of the subnet.
    dns_nameservers Sequence[str]
    List of DNS name servers for the subnet.
    enable_dhcp bool
    Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
    gateway_ip str
    The IP address of the gateway for this subnet.
    has_router bool
    Indicates whether the subnet has a router attached to it.
    host_routes Sequence[GetNetworkSubnetHostRoute]
    List of additional routes to be added to instances that are part of this subnet.
    id str
    The ID of the subnet.
    name str
    The name of the subnet.
    total_ips float
    The total number of IPs in the subnet.
    availableIps Number
    The number of available IPs in the subnet.
    cidr String
    Represents the IP address range of the subnet.
    dnsNameservers List<String>
    List of DNS name servers for the subnet.
    enableDhcp Boolean
    Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
    gatewayIp String
    The IP address of the gateway for this subnet.
    hasRouter Boolean
    Indicates whether the subnet has a router attached to it.
    hostRoutes List<Property Map>
    List of additional routes to be added to instances that are part of this subnet.
    id String
    The ID of the subnet.
    name String
    The name of the subnet.
    totalIps Number
    The total number of IPs in the subnet.

    GetNetworkSubnetHostRoute

    Destination string
    Nexthop string
    Destination string
    Nexthop string
    destination String
    nexthop String
    destination string
    nexthop string
    destination String
    nexthop String

    Package Details

    Repository
    edgecenter edge-center/terraform-provider-edgecenter
    License
    Notes
    This Pulumi package is based on the edgecenter Terraform Provider.
    edgecenter logo
    edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center