Nutanix v0.0.52 published on Friday, Jun 7, 2024 by Piers Karsenbarg
nutanix.getSubnets
Explore with Pulumi AI
Describes a list of subnets
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pulumi/nutanix";
const subnets = nutanix.getSubnets({});
const test = nutanix.getSubnets({
metadatas: [{
filter: "name==vlan0_test_2",
}],
});
import pulumi
import pulumi_nutanix as nutanix
subnets = nutanix.get_subnets()
test = nutanix.get_subnets(metadatas=[nutanix.GetSubnetsMetadataArgs(
filter="name==vlan0_test_2",
)])
package main
import (
"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nutanix.GetSubnets(ctx, nil, nil)
if err != nil {
return err
}
_, err = nutanix.GetSubnets(ctx, &nutanix.GetSubnetsArgs{
Metadatas: []nutanix.GetSubnetsMetadata{
{
Filter: "name==vlan0_test_2",
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = Pulumi.Nutanix;
return await Deployment.RunAsync(() =>
{
var subnets = Nutanix.GetSubnets.Invoke();
var test = Nutanix.GetSubnets.Invoke(new()
{
Metadatas = new[]
{
new Nutanix.Inputs.GetSubnetsMetadataInputArgs
{
Filter = "name==vlan0_test_2",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.NutanixFunctions;
import com.pulumi.nutanix.inputs.GetSubnetsArgs;
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 subnets = NutanixFunctions.getSubnets();
final var test = NutanixFunctions.getSubnets(GetSubnetsArgs.builder()
.metadatas(GetSubnetsMetadataArgs.builder()
.filter("name==vlan0_test_2")
.build())
.build());
}
}
variables:
subnets:
fn::invoke:
Function: nutanix:getSubnets
Arguments: {}
test:
fn::invoke:
Function: nutanix:getSubnets
Arguments:
metadatas:
- filter: name==vlan0_test_2
Using getSubnets
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 getSubnets(args: GetSubnetsArgs, opts?: InvokeOptions): Promise<GetSubnetsResult>
function getSubnetsOutput(args: GetSubnetsOutputArgs, opts?: InvokeOptions): Output<GetSubnetsResult>
def get_subnets(metadatas: Optional[Sequence[GetSubnetsMetadata]] = None,
opts: Optional[InvokeOptions] = None) -> GetSubnetsResult
def get_subnets_output(metadatas: Optional[pulumi.Input[Sequence[pulumi.Input[GetSubnetsMetadataArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSubnetsResult]
func GetSubnets(ctx *Context, args *GetSubnetsArgs, opts ...InvokeOption) (*GetSubnetsResult, error)
func GetSubnetsOutput(ctx *Context, args *GetSubnetsOutputArgs, opts ...InvokeOption) GetSubnetsResultOutput
> Note: This function is named GetSubnets
in the Go SDK.
public static class GetSubnets
{
public static Task<GetSubnetsResult> InvokeAsync(GetSubnetsArgs args, InvokeOptions? opts = null)
public static Output<GetSubnetsResult> Invoke(GetSubnetsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSubnetsResult> getSubnets(GetSubnetsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: nutanix:index/getSubnets:getSubnets
arguments:
# arguments dictionary
The following arguments are supported:
- Metadatas
List<Piers
Karsenbarg. Nutanix. Inputs. Get Subnets Metadata> - The subnet kind metadata.
- Metadatas
[]Get
Subnets Metadata - The subnet kind metadata.
- metadatas
List<Get
Subnets Metadata> - The subnet kind metadata.
- metadatas
Get
Subnets Metadata[] - The subnet kind metadata.
- metadatas
Sequence[Get
Subnets Metadata] - The subnet kind metadata.
- metadatas List<Property Map>
- The subnet kind metadata.
getSubnets Result
The following output properties are available:
- Api
Version string - version of the API
- Entities
List<Piers
Karsenbarg. Nutanix. Outputs. Get Subnets Entity> - List of Subnets
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadatas
List<Piers
Karsenbarg. Nutanix. Outputs. Get Subnets Metadata> - The subnet kind metadata.
- Api
Version string - version of the API
- Entities
[]Get
Subnets Entity - List of Subnets
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadatas
[]Get
Subnets Metadata - The subnet kind metadata.
- api
Version String - version of the API
- entities
List<Get
Subnets Entity> - List of Subnets
- id String
- The provider-assigned unique ID for this managed resource.
- metadatas
List<Get
Subnets Metadata> - The subnet kind metadata.
- api
Version string - version of the API
- entities
Get
Subnets Entity[] - List of Subnets
- id string
- The provider-assigned unique ID for this managed resource.
- metadatas
Get
Subnets Metadata[] - The subnet kind metadata.
- api_
version str - version of the API
- entities
Sequence[Get
Subnets Entity] - List of Subnets
- id str
- The provider-assigned unique ID for this managed resource.
- metadatas
Sequence[Get
Subnets Metadata] - The subnet kind metadata.
- api
Version String - version of the API
- entities List<Property Map>
- List of Subnets
- id String
- The provider-assigned unique ID for this managed resource.
- metadatas List<Property Map>
- The subnet kind metadata.
Supporting Types
GetSubnetsEntity
- Api
Version string - version of the API
- Availability
Zone Dictionary<string, string>Reference - The reference to a availability_zone.
- Categories
List<Piers
Karsenbarg. Nutanix. Inputs. Get Subnets Entity Category> - The API Version.
- Cluster
Name string - The name of a cluster.
- Cluster
Reference Dictionary<string, string> - The reference to a cluster.
- Cluster
Uuid string - Default
Gateway stringIp - Default gateway IP address.
- Description string
- A description for subnet.
- Dhcp
Domain List<string>Name Server Lists - Dhcp
Domain List<string>Search Lists - DHCP domain search list for a subnet.
- Dhcp
Options Dictionary<string, string> - Spec for defining DHCP options.
- Dhcp
Server Dictionary<string, string>Address - Host address.
- Dhcp
Server intAddress Port - Port Number.
- Enable
Nat bool - Ip
Config List<string>Pool List Ranges - Is
External bool - Message
Lists List<PiersKarsenbarg. Nutanix. Inputs. Get Subnets Entity Message List> - Metadata Dictionary<string, string>
- The subnet kind metadata.
- Name string
- the name.
- Network
Function Dictionary<string, string>Chain Reference - The reference to a network_function_chain.
- Owner
Reference Dictionary<string, string> - The reference to a user.
- Prefix
Length int - -. IP prefix length of the Subnet.
- Project
Reference Dictionary<string, string> - The reference to a project.
- State string
- The state of the subnet.
- Subnet
Id string - Subnet
Ip string - Subnet IP address.
- Subnet
Name string - Subnet
Type string - The type of the subnet.
- Vlan
Id int - VLAN assigned to the subnet.
- Vpc
Reference Dictionary<string, string> - Vswitch
Name string - The name of the vswitch.
- Api
Version string - version of the API
- Availability
Zone map[string]stringReference - The reference to a availability_zone.
- Categories
[]Get
Subnets Entity Category - The API Version.
- Cluster
Name string - The name of a cluster.
- Cluster
Reference map[string]string - The reference to a cluster.
- Cluster
Uuid string - Default
Gateway stringIp - Default gateway IP address.
- Description string
- A description for subnet.
- Dhcp
Domain []stringName Server Lists - Dhcp
Domain []stringSearch Lists - DHCP domain search list for a subnet.
- Dhcp
Options map[string]string - Spec for defining DHCP options.
- Dhcp
Server map[string]stringAddress - Host address.
- Dhcp
Server intAddress Port - Port Number.
- Enable
Nat bool - Ip
Config []stringPool List Ranges - Is
External bool - Message
Lists []GetSubnets Entity Message List - Metadata map[string]string
- The subnet kind metadata.
- Name string
- the name.
- Network
Function map[string]stringChain Reference - The reference to a network_function_chain.
- Owner
Reference map[string]string - The reference to a user.
- Prefix
Length int - -. IP prefix length of the Subnet.
- Project
Reference map[string]string - The reference to a project.
- State string
- The state of the subnet.
- Subnet
Id string - Subnet
Ip string - Subnet IP address.
- Subnet
Name string - Subnet
Type string - The type of the subnet.
- Vlan
Id int - VLAN assigned to the subnet.
- Vpc
Reference map[string]string - Vswitch
Name string - The name of the vswitch.
- api
Version String - version of the API
- availability
Zone Map<String,String>Reference - The reference to a availability_zone.
- categories
List<Get
Subnets Entity Category> - The API Version.
- cluster
Name String - The name of a cluster.
- cluster
Reference Map<String,String> - The reference to a cluster.
- cluster
Uuid String - default
Gateway StringIp - Default gateway IP address.
- description String
- A description for subnet.
- dhcp
Domain List<String>Name Server Lists - dhcp
Domain List<String>Search Lists - DHCP domain search list for a subnet.
- dhcp
Options Map<String,String> - Spec for defining DHCP options.
- dhcp
Server Map<String,String>Address - Host address.
- dhcp
Server IntegerAddress Port - Port Number.
- enable
Nat Boolean - ip
Config List<String>Pool List Ranges - is
External Boolean - message
Lists List<GetSubnets Entity Message List> - metadata Map<String,String>
- The subnet kind metadata.
- name String
- the name.
- network
Function Map<String,String>Chain Reference - The reference to a network_function_chain.
- owner
Reference Map<String,String> - The reference to a user.
- prefix
Length Integer - -. IP prefix length of the Subnet.
- project
Reference Map<String,String> - The reference to a project.
- state String
- The state of the subnet.
- subnet
Id String - subnet
Ip String - Subnet IP address.
- subnet
Name String - subnet
Type String - The type of the subnet.
- vlan
Id Integer - VLAN assigned to the subnet.
- vpc
Reference Map<String,String> - vswitch
Name String - The name of the vswitch.
- api
Version string - version of the API
- availability
Zone {[key: string]: string}Reference - The reference to a availability_zone.
- categories
Get
Subnets Entity Category[] - The API Version.
- cluster
Name string - The name of a cluster.
- cluster
Reference {[key: string]: string} - The reference to a cluster.
- cluster
Uuid string - default
Gateway stringIp - Default gateway IP address.
- description string
- A description for subnet.
- dhcp
Domain string[]Name Server Lists - dhcp
Domain string[]Search Lists - DHCP domain search list for a subnet.
- dhcp
Options {[key: string]: string} - Spec for defining DHCP options.
- dhcp
Server {[key: string]: string}Address - Host address.
- dhcp
Server numberAddress Port - Port Number.
- enable
Nat boolean - ip
Config string[]Pool List Ranges - is
External boolean - message
Lists GetSubnets Entity Message List[] - metadata {[key: string]: string}
- The subnet kind metadata.
- name string
- the name.
- network
Function {[key: string]: string}Chain Reference - The reference to a network_function_chain.
- owner
Reference {[key: string]: string} - The reference to a user.
- prefix
Length number - -. IP prefix length of the Subnet.
- project
Reference {[key: string]: string} - The reference to a project.
- state string
- The state of the subnet.
- subnet
Id string - subnet
Ip string - Subnet IP address.
- subnet
Name string - subnet
Type string - The type of the subnet.
- vlan
Id number - VLAN assigned to the subnet.
- vpc
Reference {[key: string]: string} - vswitch
Name string - The name of the vswitch.
- api_
version str - version of the API
- availability_
zone_ Mapping[str, str]reference - The reference to a availability_zone.
- categories
Sequence[Get
Subnets Entity Category] - The API Version.
- cluster_
name str - The name of a cluster.
- cluster_
reference Mapping[str, str] - The reference to a cluster.
- cluster_
uuid str - default_
gateway_ strip - Default gateway IP address.
- description str
- A description for subnet.
- dhcp_
domain_ Sequence[str]name_ server_ lists - dhcp_
domain_ Sequence[str]search_ lists - DHCP domain search list for a subnet.
- dhcp_
options Mapping[str, str] - Spec for defining DHCP options.
- dhcp_
server_ Mapping[str, str]address - Host address.
- dhcp_
server_ intaddress_ port - Port Number.
- enable_
nat bool - ip_
config_ Sequence[str]pool_ list_ ranges - is_
external bool - message_
lists Sequence[GetSubnets Entity Message List] - metadata Mapping[str, str]
- The subnet kind metadata.
- name str
- the name.
- network_
function_ Mapping[str, str]chain_ reference - The reference to a network_function_chain.
- owner_
reference Mapping[str, str] - The reference to a user.
- prefix_
length int - -. IP prefix length of the Subnet.
- project_
reference Mapping[str, str] - The reference to a project.
- state str
- The state of the subnet.
- subnet_
id str - subnet_
ip str - Subnet IP address.
- subnet_
name str - subnet_
type str - The type of the subnet.
- vlan_
id int - VLAN assigned to the subnet.
- vpc_
reference Mapping[str, str] - vswitch_
name str - The name of the vswitch.
- api
Version String - version of the API
- availability
Zone Map<String>Reference - The reference to a availability_zone.
- categories List<Property Map>
- The API Version.
- cluster
Name String - The name of a cluster.
- cluster
Reference Map<String> - The reference to a cluster.
- cluster
Uuid String - default
Gateway StringIp - Default gateway IP address.
- description String
- A description for subnet.
- dhcp
Domain List<String>Name Server Lists - dhcp
Domain List<String>Search Lists - DHCP domain search list for a subnet.
- dhcp
Options Map<String> - Spec for defining DHCP options.
- dhcp
Server Map<String>Address - Host address.
- dhcp
Server NumberAddress Port - Port Number.
- enable
Nat Boolean - ip
Config List<String>Pool List Ranges - is
External Boolean - message
Lists List<Property Map> - metadata Map<String>
- The subnet kind metadata.
- name String
- the name.
- network
Function Map<String>Chain Reference - The reference to a network_function_chain.
- owner
Reference Map<String> - The reference to a user.
- prefix
Length Number - -. IP prefix length of the Subnet.
- project
Reference Map<String> - The reference to a project.
- state String
- The state of the subnet.
- subnet
Id String - subnet
Ip String - Subnet IP address.
- subnet
Name String - subnet
Type String - The type of the subnet.
- vlan
Id Number - VLAN assigned to the subnet.
- vpc
Reference Map<String> - vswitch
Name String - The name of the vswitch.
GetSubnetsEntityCategory
GetSubnetsEntityMessageList
GetSubnetsMetadata
- filter str
- kind str
- The kind name (Default value: project.
- length int
- offset int
- sort_
attribute str - sort_
order str
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanix
Terraform Provider.