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

edgecenter.getResellerNetworks

Explore with Pulumi AI

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

    !!! This data source has been created for resellers and only works with the reseller API key. !!!

    Returns the list of networks with subnet details that are available to the reseller and its clients in all regions.
    If the client_id and project_id parameters are not specified, the network or subnet is not owned by a reseller client or project.
    

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as edgecenter from "@pulumi/edgecenter";
    
    const rnw = edgecenter.getResellerNetworks({
        shared: false,
        orderBy: "name.desc",
        metadataKv: {
            key_1: "value_1",
        },
        metadataKs: ["key_1"],
    });
    export const view = rnw;
    
    import pulumi
    import pulumi_edgecenter as edgecenter
    
    rnw = edgecenter.get_reseller_networks(shared=False,
        order_by="name.desc",
        metadata_kv={
            "key_1": "value_1",
        },
        metadata_ks=["key_1"])
    pulumi.export("view", rnw)
    
    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 {
    		rnw, err := edgecenter.GetResellerNetworks(ctx, &edgecenter.GetResellerNetworksArgs{
    			Shared:  pulumi.BoolRef(false),
    			OrderBy: pulumi.StringRef("name.desc"),
    			MetadataKv: map[string]interface{}{
    				"key_1": "value_1",
    			},
    			MetadataKs: []string{
    				"key_1",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("view", rnw)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Edgecenter = Pulumi.Edgecenter;
    
    return await Deployment.RunAsync(() => 
    {
        var rnw = Edgecenter.GetResellerNetworks.Invoke(new()
        {
            Shared = false,
            OrderBy = "name.desc",
            MetadataKv = 
            {
                { "key_1", "value_1" },
            },
            MetadataKs = new[]
            {
                "key_1",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["view"] = rnw,
        };
    });
    
    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.GetResellerNetworksArgs;
    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 rnw = EdgecenterFunctions.getResellerNetworks(GetResellerNetworksArgs.builder()
                .shared(false)
                .orderBy("name.desc")
                .metadataKv(Map.of("key_1", "value_1"))
                .metadataKs("key_1")
                .build());
    
            ctx.export("view", rnw.applyValue(getResellerNetworksResult -> getResellerNetworksResult));
        }
    }
    
    variables:
      rnw:
        fn::invoke:
          function: edgecenter:getResellerNetworks
          arguments:
            shared: false
            orderBy: name.desc
            metadataKv:
              key_1: value_1
            metadataKs:
              - key_1
    outputs:
      view: ${rnw}
    

    Using getResellerNetworks

    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 getResellerNetworks(args: GetResellerNetworksArgs, opts?: InvokeOptions): Promise<GetResellerNetworksResult>
    function getResellerNetworksOutput(args: GetResellerNetworksOutputArgs, opts?: InvokeOptions): Output<GetResellerNetworksResult>
    def get_reseller_networks(id: Optional[str] = None,
                              metadata_ks: Optional[Sequence[str]] = None,
                              metadata_kv: Optional[Mapping[str, str]] = None,
                              network_type: Optional[str] = None,
                              order_by: Optional[str] = None,
                              shared: Optional[bool] = None,
                              opts: Optional[InvokeOptions] = None) -> GetResellerNetworksResult
    def get_reseller_networks_output(id: Optional[pulumi.Input[str]] = None,
                              metadata_ks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              metadata_kv: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                              network_type: Optional[pulumi.Input[str]] = None,
                              order_by: Optional[pulumi.Input[str]] = None,
                              shared: Optional[pulumi.Input[bool]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetResellerNetworksResult]
    func GetResellerNetworks(ctx *Context, args *GetResellerNetworksArgs, opts ...InvokeOption) (*GetResellerNetworksResult, error)
    func GetResellerNetworksOutput(ctx *Context, args *GetResellerNetworksOutputArgs, opts ...InvokeOption) GetResellerNetworksResultOutput

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

    public static class GetResellerNetworks 
    {
        public static Task<GetResellerNetworksResult> InvokeAsync(GetResellerNetworksArgs args, InvokeOptions? opts = null)
        public static Output<GetResellerNetworksResult> Invoke(GetResellerNetworksInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetResellerNetworksResult> getResellerNetworks(GetResellerNetworksArgs args, InvokeOptions options)
    public static Output<GetResellerNetworksResult> getResellerNetworks(GetResellerNetworksArgs args, InvokeOptions options)
    
    fn::invoke:
      function: edgecenter:index/getResellerNetworks:getResellerNetworks
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of this resource.
    MetadataKs List<string>
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    MetadataKv Dictionary<string, string>
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    NetworkType string
    Filter networks by the type of the network (vlan or vxlan).
    OrderBy string
    Order networks by transmitted fields and directions (name.asc).
    Shared bool
    Can be used to only show networks with the shared state.
    Id string
    The ID of this resource.
    MetadataKs []string
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    MetadataKv map[string]string
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    NetworkType string
    Filter networks by the type of the network (vlan or vxlan).
    OrderBy string
    Order networks by transmitted fields and directions (name.asc).
    Shared bool
    Can be used to only show networks with the shared state.
    id String
    The ID of this resource.
    metadataKs List<String>
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    metadataKv Map<String,String>
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    networkType String
    Filter networks by the type of the network (vlan or vxlan).
    orderBy String
    Order networks by transmitted fields and directions (name.asc).
    shared Boolean
    Can be used to only show networks with the shared state.
    id string
    The ID of this resource.
    metadataKs string[]
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    metadataKv {[key: string]: string}
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    networkType string
    Filter networks by the type of the network (vlan or vxlan).
    orderBy string
    Order networks by transmitted fields and directions (name.asc).
    shared boolean
    Can be used to only show networks with the shared state.
    id str
    The ID of this resource.
    metadata_ks Sequence[str]
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    metadata_kv Mapping[str, str]
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    network_type str
    Filter networks by the type of the network (vlan or vxlan).
    order_by str
    Order networks by transmitted fields and directions (name.asc).
    shared bool
    Can be used to only show networks with the shared state.
    id String
    The ID of this resource.
    metadataKs List<String>
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    metadataKv Map<String>
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    networkType String
    Filter networks by the type of the network (vlan or vxlan).
    orderBy String
    Order networks by transmitted fields and directions (name.asc).
    shared Boolean
    Can be used to only show networks with the shared state.

    getResellerNetworks Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Networks List<GetResellerNetworksNetwork>
    A list of read-only reseller networks.
    MetadataKs List<string>
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    MetadataKv Dictionary<string, string>
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    NetworkType string
    Filter networks by the type of the network (vlan or vxlan).
    OrderBy string
    Order networks by transmitted fields and directions (name.asc).
    Shared bool
    Can be used to only show networks with the shared state.
    Id string
    The ID of this resource.
    Networks []GetResellerNetworksNetwork
    A list of read-only reseller networks.
    MetadataKs []string
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    MetadataKv map[string]string
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    NetworkType string
    Filter networks by the type of the network (vlan or vxlan).
    OrderBy string
    Order networks by transmitted fields and directions (name.asc).
    Shared bool
    Can be used to only show networks with the shared state.
    id String
    The ID of this resource.
    networks List<GetResellerNetworksNetwork>
    A list of read-only reseller networks.
    metadataKs List<String>
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    metadataKv Map<String,String>
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    networkType String
    Filter networks by the type of the network (vlan or vxlan).
    orderBy String
    Order networks by transmitted fields and directions (name.asc).
    shared Boolean
    Can be used to only show networks with the shared state.
    id string
    The ID of this resource.
    networks GetResellerNetworksNetwork[]
    A list of read-only reseller networks.
    metadataKs string[]
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    metadataKv {[key: string]: string}
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    networkType string
    Filter networks by the type of the network (vlan or vxlan).
    orderBy string
    Order networks by transmitted fields and directions (name.asc).
    shared boolean
    Can be used to only show networks with the shared state.
    id str
    The ID of this resource.
    networks Sequence[GetResellerNetworksNetwork]
    A list of read-only reseller networks.
    metadata_ks Sequence[str]
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    metadata_kv Mapping[str, str]
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    network_type str
    Filter networks by the type of the network (vlan or vxlan).
    order_by str
    Order networks by transmitted fields and directions (name.asc).
    shared bool
    Can be used to only show networks with the shared state.
    id String
    The ID of this resource.
    networks List<Property Map>
    A list of read-only reseller networks.
    metadataKs List<String>
    Filter by metadata keys. Must be a valid JSON string. "metadata_k=["value", "sense"]"
    metadataKv Map<String>
    Filtration query opts, for example, {key = "value", key1 = "value1"}.
    networkType String
    Filter networks by the type of the network (vlan or vxlan).
    orderBy String
    Order networks by transmitted fields and directions (name.asc).
    shared Boolean
    Can be used to only show networks with the shared state.

    Supporting Types

    GetResellerNetworksNetwork

    clientId Number
    createdAt String
    creatorTaskId String
    default Boolean
    external Boolean
    id String
    metadatas List<Property Map>
    mtu Number
    name String
    projectId Number
    regionId Number
    regionName String
    segmentationId Number
    shared Boolean
    subnets List<Property Map>
    taskId String
    type String
    updatedAt String

    GetResellerNetworksNetworkMetadata

    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

    GetResellerNetworksNetworkSubnet

    availableIps Number
    cidr String
    dnsNameservers List<String>
    enableDhcp Boolean
    gatewayIp String
    hasRouter Boolean
    hostRoutes List<Property Map>
    id String
    name String
    totalIps Number

    GetResellerNetworksNetworkSubnetHostRoute

    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