1. Packages
  2. Outscale Provider
  3. API Docs
  4. getNets
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

outscale.getNets

Explore with Pulumi AI

outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

Provides information about Nets.

For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const nets01 = outscale.getNets({
    filters: [
        {
            name: "net_ids",
            values: [
                "vpc-12345678",
                "vpc-87654321",
            ],
        },
        {
            name: "ip_ranges",
            values: ["10.0.0.0/16"],
        },
    ],
});
Copy
import pulumi
import pulumi_outscale as outscale

nets01 = outscale.get_nets(filters=[
    {
        "name": "net_ids",
        "values": [
            "vpc-12345678",
            "vpc-87654321",
        ],
    },
    {
        "name": "ip_ranges",
        "values": ["10.0.0.0/16"],
    },
])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.GetNets(ctx, &outscale.GetNetsArgs{
			Filters: []outscale.GetNetsFilter{
				{
					Name: "net_ids",
					Values: []string{
						"vpc-12345678",
						"vpc-87654321",
					},
				},
				{
					Name: "ip_ranges",
					Values: []string{
						"10.0.0.0/16",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var nets01 = Outscale.GetNets.Invoke(new()
    {
        Filters = new[]
        {
            new Outscale.Inputs.GetNetsFilterInputArgs
            {
                Name = "net_ids",
                Values = new[]
                {
                    "vpc-12345678",
                    "vpc-87654321",
                },
            },
            new Outscale.Inputs.GetNetsFilterInputArgs
            {
                Name = "ip_ranges",
                Values = new[]
                {
                    "10.0.0.0/16",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.inputs.GetNetsArgs;
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 nets01 = OutscaleFunctions.getNets(GetNetsArgs.builder()
            .filters(            
                GetNetsFilterArgs.builder()
                    .name("net_ids")
                    .values(                    
                        "vpc-12345678",
                        "vpc-87654321")
                    .build(),
                GetNetsFilterArgs.builder()
                    .name("ip_ranges")
                    .values("10.0.0.0/16")
                    .build())
            .build());

    }
}
Copy
variables:
  nets01:
    fn::invoke:
      function: outscale:getNets
      arguments:
        filters:
          - name: net_ids
            values:
              - vpc-12345678
              - vpc-87654321
          - name: ip_ranges
            values:
              - 10.0.0.0/16
Copy

Using getNets

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 getNets(args: GetNetsArgs, opts?: InvokeOptions): Promise<GetNetsResult>
function getNetsOutput(args: GetNetsOutputArgs, opts?: InvokeOptions): Output<GetNetsResult>
Copy
def get_nets(filters: Optional[Sequence[GetNetsFilter]] = None,
             id: Optional[str] = None,
             net_ids: Optional[Sequence[str]] = None,
             opts: Optional[InvokeOptions] = None) -> GetNetsResult
def get_nets_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetNetsFilterArgs]]]] = None,
             id: Optional[pulumi.Input[str]] = None,
             net_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetNetsResult]
Copy
func GetNets(ctx *Context, args *GetNetsArgs, opts ...InvokeOption) (*GetNetsResult, error)
func GetNetsOutput(ctx *Context, args *GetNetsOutputArgs, opts ...InvokeOption) GetNetsResultOutput
Copy

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

public static class GetNets 
{
    public static Task<GetNetsResult> InvokeAsync(GetNetsArgs args, InvokeOptions? opts = null)
    public static Output<GetNetsResult> Invoke(GetNetsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNetsResult> getNets(GetNetsArgs args, InvokeOptions options)
public static Output<GetNetsResult> getNets(GetNetsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: outscale:index/getNets:getNets
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetNetsFilter>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
Id string
NetIds List<string>
The ID of the Net.
Filters []GetNetsFilter
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
Id string
NetIds []string
The ID of the Net.
filters List<GetNetsFilter>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id String
netIds List<String>
The ID of the Net.
filters GetNetsFilter[]
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id string
netIds string[]
The ID of the Net.
filters Sequence[GetNetsFilter]
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id str
net_ids Sequence[str]
The ID of the Net.
filters List<Property Map>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id String
netIds List<String>
The ID of the Net.

getNets Result

The following output properties are available:

Id string
Nets List<GetNetsNet>
Information about the described Nets.
RequestId string
Filters List<GetNetsFilter>
NetIds List<string>
The ID of the Net.
Id string
Nets []GetNetsNet
Information about the described Nets.
RequestId string
Filters []GetNetsFilter
NetIds []string
The ID of the Net.
id String
nets List<GetNetsNet>
Information about the described Nets.
requestId String
filters List<GetNetsFilter>
netIds List<String>
The ID of the Net.
id string
nets GetNetsNet[]
Information about the described Nets.
requestId string
filters GetNetsFilter[]
netIds string[]
The ID of the Net.
id str
nets Sequence[GetNetsNet]
Information about the described Nets.
request_id str
filters Sequence[GetNetsFilter]
net_ids Sequence[str]
The ID of the Net.
id String
nets List<Property Map>
Information about the described Nets.
requestId String
filters List<Property Map>
netIds List<String>
The ID of the Net.

Supporting Types

GetNetsFilter

Name This property is required. string
Values This property is required. List<string>
Name This property is required. string
Values This property is required. []string
name This property is required. String
values This property is required. List<String>
name This property is required. string
values This property is required. string[]
name This property is required. str
values This property is required. Sequence[str]
name This property is required. String
values This property is required. List<String>

GetNetsNet

DhcpOptionsSetId This property is required. string
The ID of the DHCP options set (or default if you want to associate the default one).
IpRange This property is required. string
The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16).
NetId This property is required. string
The ID of the Net.
State This property is required. string
The state of the Net (pending | available | deleting).
Tags This property is required. List<GetNetsNetTag>
One or more tags associated with the Net.
Tenancy This property is required. string
The VM tenancy in a Net.
DhcpOptionsSetId This property is required. string
The ID of the DHCP options set (or default if you want to associate the default one).
IpRange This property is required. string
The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16).
NetId This property is required. string
The ID of the Net.
State This property is required. string
The state of the Net (pending | available | deleting).
Tags This property is required. []GetNetsNetTag
One or more tags associated with the Net.
Tenancy This property is required. string
The VM tenancy in a Net.
dhcpOptionsSetId This property is required. String
The ID of the DHCP options set (or default if you want to associate the default one).
ipRange This property is required. String
The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16).
netId This property is required. String
The ID of the Net.
state This property is required. String
The state of the Net (pending | available | deleting).
tags This property is required. List<GetNetsNetTag>
One or more tags associated with the Net.
tenancy This property is required. String
The VM tenancy in a Net.
dhcpOptionsSetId This property is required. string
The ID of the DHCP options set (or default if you want to associate the default one).
ipRange This property is required. string
The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16).
netId This property is required. string
The ID of the Net.
state This property is required. string
The state of the Net (pending | available | deleting).
tags This property is required. GetNetsNetTag[]
One or more tags associated with the Net.
tenancy This property is required. string
The VM tenancy in a Net.
dhcp_options_set_id This property is required. str
The ID of the DHCP options set (or default if you want to associate the default one).
ip_range This property is required. str
The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16).
net_id This property is required. str
The ID of the Net.
state This property is required. str
The state of the Net (pending | available | deleting).
tags This property is required. Sequence[GetNetsNetTag]
One or more tags associated with the Net.
tenancy This property is required. str
The VM tenancy in a Net.
dhcpOptionsSetId This property is required. String
The ID of the DHCP options set (or default if you want to associate the default one).
ipRange This property is required. String
The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16).
netId This property is required. String
The ID of the Net.
state This property is required. String
The state of the Net (pending | available | deleting).
tags This property is required. List<Property Map>
One or more tags associated with the Net.
tenancy This property is required. String
The VM tenancy in a Net.

GetNetsNetTag

Key This property is required. string
The key of the tag, with a minimum of 1 character.
Value This property is required. string
The value of the tag, between 0 and 255 characters.
Key This property is required. string
The key of the tag, with a minimum of 1 character.
Value This property is required. string
The value of the tag, between 0 and 255 characters.
key This property is required. String
The key of the tag, with a minimum of 1 character.
value This property is required. String
The value of the tag, between 0 and 255 characters.
key This property is required. string
The key of the tag, with a minimum of 1 character.
value This property is required. string
The value of the tag, between 0 and 255 characters.
key This property is required. str
The key of the tag, with a minimum of 1 character.
value This property is required. str
The value of the tag, between 0 and 255 characters.
key This property is required. String
The key of the tag, with a minimum of 1 character.
value This property is required. String
The value of the tag, between 0 and 255 characters.

Package Details

Repository
outscale outscale/terraform-provider-outscale
License
Notes
This Pulumi package is based on the outscale Terraform Provider.
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale