UpCloud v0.0.6 published on Friday, Feb 21, 2025 by UpCloudLtd
upcloud.getNetworks
Explore with Pulumi AI
Use this data source to get the available UpCloud networks.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as upcloud from "@pulumi/upcloud";
const upcloud = upcloud.getNetworks({});
const upcloudByZone = upcloud.getNetworks({
filterName: "^Public.*",
});
import pulumi
import pulumi_upcloud as upcloud
upcloud = upcloud.get_networks()
upcloud_by_zone = upcloud.get_networks(filter_name="^Public.*")
package main
import (
"github.com/UpCloudLtd/pulumi-upcloud/sdk/go/upcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := upcloud.GetNetworks(ctx, &upcloud.GetNetworksArgs{}, nil)
if err != nil {
return err
}
_, err = upcloud.GetNetworks(ctx, &upcloud.GetNetworksArgs{
FilterName: pulumi.StringRef("^Public.*"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using UpCloud = Pulumi.UpCloud;
return await Deployment.RunAsync(() =>
{
var upcloud = UpCloud.GetNetworks.Invoke();
var upcloudByZone = UpCloud.GetNetworks.Invoke(new()
{
FilterName = "^Public.*",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.upcloud.UpcloudFunctions;
import com.pulumi.upcloud.inputs.GetNetworksArgs;
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 upcloud = UpcloudFunctions.getNetworks();
final var upcloudByZone = UpcloudFunctions.getNetworks(GetNetworksArgs.builder()
.filterName("^Public.*")
.build());
}
}
variables:
upcloud:
fn::invoke:
function: upcloud:getNetworks
arguments: {}
upcloudByZone:
fn::invoke:
function: upcloud:getNetworks
arguments:
filterName: ^Public.*
Using getNetworks
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 getNetworks(args: GetNetworksArgs, opts?: InvokeOptions): Promise<GetNetworksResult>
function getNetworksOutput(args: GetNetworksOutputArgs, opts?: InvokeOptions): Output<GetNetworksResult>
def get_networks(filter_name: Optional[str] = None,
zone: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNetworksResult
def get_networks_output(filter_name: Optional[pulumi.Input[str]] = None,
zone: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNetworksResult]
func GetNetworks(ctx *Context, args *GetNetworksArgs, opts ...InvokeOption) (*GetNetworksResult, error)
func GetNetworksOutput(ctx *Context, args *GetNetworksOutputArgs, opts ...InvokeOption) GetNetworksResultOutput
> Note: This function is named GetNetworks
in the Go SDK.
public static class GetNetworks
{
public static Task<GetNetworksResult> InvokeAsync(GetNetworksArgs args, InvokeOptions? opts = null)
public static Output<GetNetworksResult> Invoke(GetNetworksInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworksResult> getNetworks(GetNetworksArgs args, InvokeOptions options)
public static Output<GetNetworksResult> getNetworks(GetNetworksArgs args, InvokeOptions options)
fn::invoke:
function: upcloud:index/getNetworks:getNetworks
arguments:
# arguments dictionary
The following arguments are supported:
- Filter
Name string - Zone string
- Filter
Name string - Zone string
- filter
Name String - zone String
- filter
Name string - zone string
- filter_
name str - zone str
- filter
Name String - zone String
getNetworks Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Networks
List<Up
Cloud. Pulumi. Up Cloud. Outputs. Get Networks Network> - Filter
Name string - Zone string
- Id string
- The provider-assigned unique ID for this managed resource.
- Networks
[]Get
Networks Network - Filter
Name string - Zone string
- id String
- The provider-assigned unique ID for this managed resource.
- networks
List<Get
Networks Network> - filter
Name String - zone String
- id string
- The provider-assigned unique ID for this managed resource.
- networks
Get
Networks Network[] - filter
Name string - zone string
- id str
- The provider-assigned unique ID for this managed resource.
- networks
Sequence[Get
Networks Network] - filter_
name str - zone str
- id String
- The provider-assigned unique ID for this managed resource.
- networks List<Property Map>
- filter
Name String - zone String
Supporting Types
GetNetworksNetwork
- Id string
- The UUID of the network
- Ip
Networks List<UpCloud. Pulumi. Up Cloud. Inputs. Get Networks Network Ip Network> - A list of IP subnets within the network
- Name string
- A valid name for the network
- Servers
List<Up
Cloud. Pulumi. Up Cloud. Inputs. Get Networks Network Server> - A list of attached servers
- Type string
- The network type
- Zone string
- The zone the network is in, e.g.
de-fra1
. You can list available zones withupctl zone list
.
- Id string
- The UUID of the network
- Ip
Networks []GetNetworks Network Ip Network - A list of IP subnets within the network
- Name string
- A valid name for the network
- Servers
[]Get
Networks Network Server - A list of attached servers
- Type string
- The network type
- Zone string
- The zone the network is in, e.g.
de-fra1
. You can list available zones withupctl zone list
.
- id String
- The UUID of the network
- ip
Networks List<GetNetworks Network Ip Network> - A list of IP subnets within the network
- name String
- A valid name for the network
- servers
List<Get
Networks Network Server> - A list of attached servers
- type String
- The network type
- zone String
- The zone the network is in, e.g.
de-fra1
. You can list available zones withupctl zone list
.
- id string
- The UUID of the network
- ip
Networks GetNetworks Network Ip Network[] - A list of IP subnets within the network
- name string
- A valid name for the network
- servers
Get
Networks Network Server[] - A list of attached servers
- type string
- The network type
- zone string
- The zone the network is in, e.g.
de-fra1
. You can list available zones withupctl zone list
.
- id str
- The UUID of the network
- ip_
networks Sequence[GetNetworks Network Ip Network] - A list of IP subnets within the network
- name str
- A valid name for the network
- servers
Sequence[Get
Networks Network Server] - A list of attached servers
- type str
- The network type
- zone str
- The zone the network is in, e.g.
de-fra1
. You can list available zones withupctl zone list
.
- id String
- The UUID of the network
- ip
Networks List<Property Map> - A list of IP subnets within the network
- name String
- A valid name for the network
- servers List<Property Map>
- A list of attached servers
- type String
- The network type
- zone String
- The zone the network is in, e.g.
de-fra1
. You can list available zones withupctl zone list
.
GetNetworksNetworkIpNetwork
- Address string
- The CIDR range of the subnet
- Dhcp bool
- Is DHCP enabled?
- Dhcp
Default boolRoute - Is the gateway the DHCP default route?
- Dhcp
Dns List<string> - The DNS servers given by DHCP
- Dhcp
Routes List<string> - The additional DHCP classless static routes given by DHCP
- Family string
- IP address family
- Gateway string
- Gateway address given by DHCP
- Address string
- The CIDR range of the subnet
- Dhcp bool
- Is DHCP enabled?
- Dhcp
Default boolRoute - Is the gateway the DHCP default route?
- Dhcp
Dns []string - The DNS servers given by DHCP
- Dhcp
Routes []string - The additional DHCP classless static routes given by DHCP
- Family string
- IP address family
- Gateway string
- Gateway address given by DHCP
- address String
- The CIDR range of the subnet
- dhcp Boolean
- Is DHCP enabled?
- dhcp
Default BooleanRoute - Is the gateway the DHCP default route?
- dhcp
Dns List<String> - The DNS servers given by DHCP
- dhcp
Routes List<String> - The additional DHCP classless static routes given by DHCP
- family String
- IP address family
- gateway String
- Gateway address given by DHCP
- address string
- The CIDR range of the subnet
- dhcp boolean
- Is DHCP enabled?
- dhcp
Default booleanRoute - Is the gateway the DHCP default route?
- dhcp
Dns string[] - The DNS servers given by DHCP
- dhcp
Routes string[] - The additional DHCP classless static routes given by DHCP
- family string
- IP address family
- gateway string
- Gateway address given by DHCP
- address str
- The CIDR range of the subnet
- dhcp bool
- Is DHCP enabled?
- dhcp_
default_ boolroute - Is the gateway the DHCP default route?
- dhcp_
dns Sequence[str] - The DNS servers given by DHCP
- dhcp_
routes Sequence[str] - The additional DHCP classless static routes given by DHCP
- family str
- IP address family
- gateway str
- Gateway address given by DHCP
- address String
- The CIDR range of the subnet
- dhcp Boolean
- Is DHCP enabled?
- dhcp
Default BooleanRoute - Is the gateway the DHCP default route?
- dhcp
Dns List<String> - The DNS servers given by DHCP
- dhcp
Routes List<String> - The additional DHCP classless static routes given by DHCP
- family String
- IP address family
- gateway String
- Gateway address given by DHCP
GetNetworksNetworkServer
Package Details
- Repository
- upcloud UpCloudLtd/pulumi-upcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
upcloud
Terraform Provider.