Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg
nutanix.getSubnet
Explore with Pulumi AI
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>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]func LookupSubnet(ctx *Context, args *LookupSubnetArgs, opts ...InvokeOption) (*LookupSubnetResult, error)
func LookupSubnetOutput(ctx *Context, args *LookupSubnetOutputArgs, opts ...InvokeOption) LookupSubnetResultOutput> 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)
}public static CompletableFuture<GetSubnetResult> getSubnet(GetSubnetArgs args, InvokeOptions options)
public static Output<GetSubnetResult> getSubnet(GetSubnetArgs args, InvokeOptions options)
fn::invoke:
  function: nutanix:index/getSubnet:getSubnet
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AdditionalFilters List<PiersKarsenbarg. Nutanix. Inputs. Get Subnet Additional Filter> 
- Additional filters to narrow down list of subnets.
 
- Categories
List<PiersKarsenbarg. Nutanix. Inputs. Get Subnet Category> 
- The API Version.
- SubnetId string
- (Optional) The ID for the subnet.
 
- SubnetName string
- (Optional) The name for the subnet
 
- AdditionalFilters []GetSubnet Additional Filter 
- Additional filters to narrow down list of subnets.
 
- Categories
[]GetSubnet Category 
- The API Version.
- SubnetId string
- (Optional) The ID for the subnet.
 
- SubnetName string
- (Optional) The name for the subnet
 
- additionalFilters List<GetSubnet Additional Filter> 
- Additional filters to narrow down list of subnets.
 
- categories
List<GetSubnet Category> 
- The API Version.
- subnetId String
- (Optional) The ID for the subnet.
 
- subnetName String
- (Optional) The name for the subnet
 
- additionalFilters GetSubnet Additional Filter[] 
- Additional filters to narrow down list of subnets.
 
- categories
GetSubnet Category[] 
- The API Version.
- subnetId string
- (Optional) The ID for the subnet.
 
- subnetName string
- (Optional) The name for the subnet
 
- additional_filters Sequence[GetSubnet Additional Filter] 
- Additional filters to narrow down list of subnets.
 
- categories
Sequence[GetSubnet Category] 
- 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
- AvailabilityZone Dictionary<string, string>Reference 
- The reference to a availability_zone.
- Categories
List<PiersKarsenbarg. Nutanix. Outputs. Get Subnet Category> 
- The API Version.
- ClusterName string
- The name of a cluster.
- ClusterUuid string
- DefaultGateway stringIp 
- Default gateway IP address.
- Description string
- A description for subnet.
- DhcpDomain List<string>Name Server Lists 
- DhcpDomain List<string>Search Lists 
- DHCP domain search list for a subnet.
- DhcpOptions Dictionary<string, string>
- Spec for defining DHCP options.
- DhcpServer Dictionary<string, string>Address 
- Host address.
- DhcpServer intAddress Port 
- Port Number.
- EnableNat bool
- Id string
- The provider-assigned unique ID for this managed resource.
- IpConfig List<string>Pool List Ranges 
- IsExternal bool
- MessageLists List<PiersKarsenbarg. Nutanix. Outputs. Get Subnet Message List> 
- Metadata Dictionary<string, string>
- The subnet kind metadata.
- Name string
- the name(Optional).
 
- NetworkFunction Dictionary<string, string>Chain Reference 
- 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. Get Subnet Additional Filter> 
- Additional filters to narrow down list of subnets.
 
- SubnetId string
- SubnetName string
- ApiVersion string
- AvailabilityZone map[string]stringReference 
- The reference to a availability_zone.
- Categories
[]GetSubnet Category 
- The API Version.
- ClusterName string
- The name of a cluster.
- ClusterUuid string
- DefaultGateway stringIp 
- Default gateway IP address.
- Description string
- A description for subnet.
- DhcpDomain []stringName Server Lists 
- DhcpDomain []stringSearch Lists 
- DHCP domain search list for a subnet.
- DhcpOptions map[string]string
- Spec for defining DHCP options.
- DhcpServer map[string]stringAddress 
- Host address.
- DhcpServer intAddress Port 
- Port Number.
- EnableNat bool
- Id string
- The provider-assigned unique ID for this managed resource.
- IpConfig []stringPool List Ranges 
- IsExternal bool
- MessageLists []GetSubnet Message List 
- Metadata map[string]string
- The subnet kind metadata.
- Name string
- the name(Optional).
 
- NetworkFunction map[string]stringChain Reference 
- 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 []GetSubnet Additional Filter 
- Additional filters to narrow down list of subnets.
 
- SubnetId string
- SubnetName string
- apiVersion String
- availabilityZone Map<String,String>Reference 
- The reference to a availability_zone.
- categories
List<GetSubnet Category> 
- The API Version.
- clusterName String
- The name of a cluster.
- clusterUuid String
- defaultGateway StringIp 
- Default gateway IP address.
- description String
- A description for subnet.
- dhcpDomain List<String>Name Server Lists 
- dhcpDomain List<String>Search Lists 
- DHCP domain search list for a subnet.
- dhcpOptions Map<String,String>
- Spec for defining DHCP options.
- dhcpServer Map<String,String>Address 
- Host address.
- dhcpServer IntegerAddress Port 
- Port Number.
- enableNat Boolean
- id String
- The provider-assigned unique ID for this managed resource.
- ipConfig List<String>Pool List Ranges 
- isExternal Boolean
- messageLists List<GetSubnet Message List> 
- metadata Map<String,String>
- The subnet kind metadata.
- name String
- the name(Optional).
 
- networkFunction Map<String,String>Chain Reference 
- 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<GetSubnet Additional Filter> 
- Additional filters to narrow down list of subnets.
 
- subnetId String
- subnetName String
- apiVersion string
- availabilityZone {[key: string]: string}Reference 
- The reference to a availability_zone.
- categories
GetSubnet Category[] 
- The API Version.
- clusterName string
- The name of a cluster.
- clusterUuid string
- defaultGateway stringIp 
- Default gateway IP address.
- description string
- A description for subnet.
- dhcpDomain string[]Name Server Lists 
- dhcpDomain string[]Search Lists 
- DHCP domain search list for a subnet.
- dhcpOptions {[key: string]: string}
- Spec for defining DHCP options.
- dhcpServer {[key: string]: string}Address 
- Host address.
- dhcpServer numberAddress Port 
- Port Number.
- enableNat boolean
- id string
- The provider-assigned unique ID for this managed resource.
- ipConfig string[]Pool List Ranges 
- isExternal boolean
- messageLists GetSubnet Message List[] 
- metadata {[key: string]: string}
- The subnet kind metadata.
- name string
- the name(Optional).
 
- networkFunction {[key: string]: string}Chain Reference 
- 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 GetSubnet Additional Filter[] 
- Additional filters to narrow down list of subnets.
 
- subnetId string
- subnetName string
- api_version str
- availability_zone_ Mapping[str, str]reference 
- The reference to a availability_zone.
- categories
Sequence[GetSubnet Category] 
- The API Version.
- cluster_name str
- The name of 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
- id str
- The provider-assigned unique ID for this managed resource.
- ip_config_ Sequence[str]pool_ list_ ranges 
- is_external bool
- message_lists Sequence[GetSubnet Message List] 
- metadata Mapping[str, str]
- The subnet kind metadata.
- name str
- the name(Optional).
 
- 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
- (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[GetSubnet Additional Filter] 
- Additional filters to narrow down list of subnets.
 
- subnet_id str
- subnet_name str
- apiVersion String
- availabilityZone Map<String>Reference 
- The reference to a availability_zone.
- categories List<Property Map>
- The API Version.
- clusterName String
- The name of a cluster.
- clusterUuid String
- defaultGateway StringIp 
- Default gateway IP address.
- description String
- A description for subnet.
- dhcpDomain List<String>Name Server Lists 
- dhcpDomain List<String>Search Lists 
- DHCP domain search list for a subnet.
- dhcpOptions Map<String>
- Spec for defining DHCP options.
- dhcpServer Map<String>Address 
- Host address.
- dhcpServer NumberAddress Port 
- Port Number.
- enableNat Boolean
- id String
- The provider-assigned unique ID for this managed resource.
- ipConfig List<String>Pool List Ranges 
- isExternal Boolean
- messageLists List<Property Map>
- metadata Map<String>
- The subnet kind metadata.
- name String
- the name(Optional).
 
- networkFunction Map<String>Chain Reference 
- 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   
GetSubnetCategory  
GetSubnetMessageList   
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the nutanixTerraform Provider.
