1. Packages
  2. Nutanix
  3. API Docs
  4. getSubnet
Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg

nutanix.getSubnet

Explore with Pulumi AI

Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg

Provides a resource to create a subnet based on the input parameters. A subnet is a block of IP addresses.

Using getSubnet

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 getSubnet(args: GetSubnetArgs, opts?: InvokeOptions): Promise<GetSubnetResult>
function getSubnetOutput(args: GetSubnetOutputArgs, opts?: InvokeOptions): Output<GetSubnetResult>
Copy
def get_subnet(additional_filters: Optional[Sequence[GetSubnetAdditionalFilter]] = None,
               categories: Optional[Sequence[GetSubnetCategory]] = None,
               subnet_id: Optional[str] = None,
               subnet_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetSubnetResult
def get_subnet_output(additional_filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSubnetAdditionalFilterArgs]]]] = None,
               categories: Optional[pulumi.Input[Sequence[pulumi.Input[GetSubnetCategoryArgs]]]] = None,
               subnet_id: Optional[pulumi.Input[str]] = None,
               subnet_name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetSubnetResult]
Copy
func LookupSubnet(ctx *Context, args *LookupSubnetArgs, opts ...InvokeOption) (*LookupSubnetResult, error)
func LookupSubnetOutput(ctx *Context, args *LookupSubnetOutputArgs, opts ...InvokeOption) LookupSubnetResultOutput
Copy

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

public static class GetSubnet 
{
    public static Task<GetSubnetResult> InvokeAsync(GetSubnetArgs args, InvokeOptions? opts = null)
    public static Output<GetSubnetResult> Invoke(GetSubnetInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSubnetResult> getSubnet(GetSubnetArgs args, InvokeOptions options)
public static Output<GetSubnetResult> getSubnet(GetSubnetArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: nutanix:index/getSubnet:getSubnet
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AdditionalFilters List<PiersKarsenbarg.Nutanix.Inputs.GetSubnetAdditionalFilter>
  • Additional filters to narrow down list of subnets.
Categories List<PiersKarsenbarg.Nutanix.Inputs.GetSubnetCategory>
The API Version.
SubnetId string
  • (Optional) The ID for the subnet.
SubnetName string
  • (Optional) The name for the subnet
AdditionalFilters []GetSubnetAdditionalFilter
  • Additional filters to narrow down list of subnets.
Categories []GetSubnetCategory
The API Version.
SubnetId string
  • (Optional) The ID for the subnet.
SubnetName string
  • (Optional) The name for the subnet
additionalFilters List<GetSubnetAdditionalFilter>
  • Additional filters to narrow down list of subnets.
categories List<GetSubnetCategory>
The API Version.
subnetId String
  • (Optional) The ID for the subnet.
subnetName String
  • (Optional) The name for the subnet
additionalFilters GetSubnetAdditionalFilter[]
  • Additional filters to narrow down list of subnets.
categories GetSubnetCategory[]
The API Version.
subnetId string
  • (Optional) The ID for the subnet.
subnetName string
  • (Optional) The name for the subnet
additional_filters Sequence[GetSubnetAdditionalFilter]
  • Additional filters to narrow down list of subnets.
categories Sequence[GetSubnetCategory]
The API Version.
subnet_id str
  • (Optional) The ID for the subnet.
subnet_name str
  • (Optional) The name for the subnet
additionalFilters List<Property Map>
  • Additional filters to narrow down list of subnets.
categories List<Property Map>
The API Version.
subnetId String
  • (Optional) The ID for the subnet.
subnetName String
  • (Optional) The name for the subnet

getSubnet Result

The following output properties are available:

ApiVersion string
AvailabilityZoneReference Dictionary<string, string>
The reference to a availability_zone.
Categories List<PiersKarsenbarg.Nutanix.Outputs.GetSubnetCategory>
The API Version.
ClusterName string
The name of a cluster.
ClusterUuid string
DefaultGatewayIp string
Default gateway IP address.
Description string
A description for subnet.
DhcpDomainNameServerLists List<string>
DhcpDomainSearchLists List<string>
DHCP domain search list for a subnet.
DhcpOptions Dictionary<string, string>
Spec for defining DHCP options.
DhcpServerAddress Dictionary<string, string>
Host address.
DhcpServerAddressPort int
Port Number.
EnableNat bool
Id string
The provider-assigned unique ID for this managed resource.
IpConfigPoolListRanges List<string>
IsExternal bool
MessageLists List<PiersKarsenbarg.Nutanix.Outputs.GetSubnetMessageList>
Metadata Dictionary<string, string>
The subnet kind metadata.
Name string
  • the name(Optional).
NetworkFunctionChainReference Dictionary<string, string>
The reference to a network_function_chain.
OwnerReference Dictionary<string, string>
The reference to a user.
PrefixLength int
  • (Optional). IP prefix length of the Subnet.
ProjectReference Dictionary<string, string>
The reference to a project.
State string
  • The state of the subnet.
SubnetIp string
Subnet IP address.
SubnetType string
The type of the subnet.
VlanId int
VLAN assigned to the subnet.
VpcReference Dictionary<string, string>
VswitchName string
The name of the vswitch.
AdditionalFilters List<PiersKarsenbarg.Nutanix.Outputs.GetSubnetAdditionalFilter>
  • Additional filters to narrow down list of subnets.
SubnetId string
SubnetName string
ApiVersion string
AvailabilityZoneReference map[string]string
The reference to a availability_zone.
Categories []GetSubnetCategory
The API Version.
ClusterName string
The name of a cluster.
ClusterUuid string
DefaultGatewayIp string
Default gateway IP address.
Description string
A description for subnet.
DhcpDomainNameServerLists []string
DhcpDomainSearchLists []string
DHCP domain search list for a subnet.
DhcpOptions map[string]string
Spec for defining DHCP options.
DhcpServerAddress map[string]string
Host address.
DhcpServerAddressPort int
Port Number.
EnableNat bool
Id string
The provider-assigned unique ID for this managed resource.
IpConfigPoolListRanges []string
IsExternal bool
MessageLists []GetSubnetMessageList
Metadata map[string]string
The subnet kind metadata.
Name string
  • the name(Optional).
NetworkFunctionChainReference map[string]string
The reference to a network_function_chain.
OwnerReference map[string]string
The reference to a user.
PrefixLength int
  • (Optional). IP prefix length of the Subnet.
ProjectReference map[string]string
The reference to a project.
State string
  • The state of the subnet.
SubnetIp string
Subnet IP address.
SubnetType string
The type of the subnet.
VlanId int
VLAN assigned to the subnet.
VpcReference map[string]string
VswitchName string
The name of the vswitch.
AdditionalFilters []GetSubnetAdditionalFilter
  • Additional filters to narrow down list of subnets.
SubnetId string
SubnetName string
apiVersion String
availabilityZoneReference Map<String,String>
The reference to a availability_zone.
categories List<GetSubnetCategory>
The API Version.
clusterName String
The name of a cluster.
clusterUuid String
defaultGatewayIp String
Default gateway IP address.
description String
A description for subnet.
dhcpDomainNameServerLists List<String>
dhcpDomainSearchLists List<String>
DHCP domain search list for a subnet.
dhcpOptions Map<String,String>
Spec for defining DHCP options.
dhcpServerAddress Map<String,String>
Host address.
dhcpServerAddressPort Integer
Port Number.
enableNat Boolean
id String
The provider-assigned unique ID for this managed resource.
ipConfigPoolListRanges List<String>
isExternal Boolean
messageLists List<GetSubnetMessageList>
metadata Map<String,String>
The subnet kind metadata.
name String
  • the name(Optional).
networkFunctionChainReference Map<String,String>
The reference to a network_function_chain.
ownerReference Map<String,String>
The reference to a user.
prefixLength Integer
  • (Optional). IP prefix length of the Subnet.
projectReference Map<String,String>
The reference to a project.
state String
  • The state of the subnet.
subnetIp String
Subnet IP address.
subnetType String
The type of the subnet.
vlanId Integer
VLAN assigned to the subnet.
vpcReference Map<String,String>
vswitchName String
The name of the vswitch.
additionalFilters List<GetSubnetAdditionalFilter>
  • Additional filters to narrow down list of subnets.
subnetId String
subnetName String
apiVersion string
availabilityZoneReference {[key: string]: string}
The reference to a availability_zone.
categories GetSubnetCategory[]
The API Version.
clusterName string
The name of a cluster.
clusterUuid string
defaultGatewayIp string
Default gateway IP address.
description string
A description for subnet.
dhcpDomainNameServerLists string[]
dhcpDomainSearchLists string[]
DHCP domain search list for a subnet.
dhcpOptions {[key: string]: string}
Spec for defining DHCP options.
dhcpServerAddress {[key: string]: string}
Host address.
dhcpServerAddressPort number
Port Number.
enableNat boolean
id string
The provider-assigned unique ID for this managed resource.
ipConfigPoolListRanges string[]
isExternal boolean
messageLists GetSubnetMessageList[]
metadata {[key: string]: string}
The subnet kind metadata.
name string
  • the name(Optional).
networkFunctionChainReference {[key: string]: string}
The reference to a network_function_chain.
ownerReference {[key: string]: string}
The reference to a user.
prefixLength number
  • (Optional). IP prefix length of the Subnet.
projectReference {[key: string]: string}
The reference to a project.
state string
  • The state of the subnet.
subnetIp string
Subnet IP address.
subnetType string
The type of the subnet.
vlanId number
VLAN assigned to the subnet.
vpcReference {[key: string]: string}
vswitchName string
The name of the vswitch.
additionalFilters GetSubnetAdditionalFilter[]
  • Additional filters to narrow down list of subnets.
subnetId string
subnetName string
api_version str
availability_zone_reference Mapping[str, str]
The reference to a availability_zone.
categories Sequence[GetSubnetCategory]
The API Version.
cluster_name str
The name of a cluster.
cluster_uuid str
default_gateway_ip str
Default gateway IP address.
description str
A description for subnet.
dhcp_domain_name_server_lists Sequence[str]
dhcp_domain_search_lists Sequence[str]
DHCP domain search list for a subnet.
dhcp_options Mapping[str, str]
Spec for defining DHCP options.
dhcp_server_address Mapping[str, str]
Host address.
dhcp_server_address_port int
Port Number.
enable_nat bool
id str
The provider-assigned unique ID for this managed resource.
ip_config_pool_list_ranges Sequence[str]
is_external bool
message_lists Sequence[GetSubnetMessageList]
metadata Mapping[str, str]
The subnet kind metadata.
name str
  • the name(Optional).
network_function_chain_reference Mapping[str, str]
The reference to a network_function_chain.
owner_reference Mapping[str, str]
The reference to a user.
prefix_length int
  • (Optional). IP prefix length of the Subnet.
project_reference Mapping[str, str]
The reference to a project.
state str
  • The state of the subnet.
subnet_ip str
Subnet IP address.
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.
additional_filters Sequence[GetSubnetAdditionalFilter]
  • Additional filters to narrow down list of subnets.
subnet_id str
subnet_name str
apiVersion String
availabilityZoneReference Map<String>
The reference to a availability_zone.
categories List<Property Map>
The API Version.
clusterName String
The name of a cluster.
clusterUuid String
defaultGatewayIp String
Default gateway IP address.
description String
A description for subnet.
dhcpDomainNameServerLists List<String>
dhcpDomainSearchLists List<String>
DHCP domain search list for a subnet.
dhcpOptions Map<String>
Spec for defining DHCP options.
dhcpServerAddress Map<String>
Host address.
dhcpServerAddressPort Number
Port Number.
enableNat Boolean
id String
The provider-assigned unique ID for this managed resource.
ipConfigPoolListRanges List<String>
isExternal Boolean
messageLists List<Property Map>
metadata Map<String>
The subnet kind metadata.
name String
  • the name(Optional).
networkFunctionChainReference Map<String>
The reference to a network_function_chain.
ownerReference Map<String>
The reference to a user.
prefixLength Number
  • (Optional). IP prefix length of the Subnet.
projectReference Map<String>
The reference to a project.
state String
  • The state of the subnet.
subnetIp String
Subnet IP address.
subnetType String
The type of the subnet.
vlanId Number
VLAN assigned to the subnet.
vpcReference Map<String>
vswitchName String
The name of the vswitch.
additionalFilters List<Property Map>
  • Additional filters to narrow down list of subnets.
subnetId String
subnetName String

Supporting Types

GetSubnetAdditionalFilter

Name This property is required. string
  • the name(Optional).
Values This property is required. List<string>
Name This property is required. string
  • the name(Optional).
Values This property is required. []string
name This property is required. String
  • the name(Optional).
values This property is required. List<String>
name This property is required. string
  • the name(Optional).
values This property is required. string[]
name This property is required. str
  • the name(Optional).
values This property is required. Sequence[str]
name This property is required. String
  • the name(Optional).
values This property is required. List<String>

GetSubnetCategory

Name This property is required. string
  • the name(Optional).
Value This property is required. string
  • value of the key.
Name This property is required. string
  • the name(Optional).
Value This property is required. string
  • value of the key.
name This property is required. String
  • the name(Optional).
value This property is required. String
  • value of the key.
name This property is required. string
  • the name(Optional).
value This property is required. string
  • value of the key.
name This property is required. str
  • the name(Optional).
value This property is required. str
  • value of the key.
name This property is required. String
  • the name(Optional).
value This property is required. String
  • value of the key.

GetSubnetMessageList

Details This property is required. Dictionary<string, string>
Message This property is required. string
Reason This property is required. string
Details This property is required. map[string]string
Message This property is required. string
Reason This property is required. string
details This property is required. Map<String,String>
message This property is required. String
reason This property is required. String
details This property is required. {[key: string]: string}
message This property is required. string
reason This property is required. string
details This property is required. Mapping[str, str]
message This property is required. str
reason This property is required. str
details This property is required. Map<String>
message This property is required. String
reason This property is required. String

Package Details

Repository
nutanix pierskarsenbarg/pulumi-nutanix
License
Apache-2.0
Notes
This Pulumi package is based on the nutanix Terraform Provider.
Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg