1. Packages
  2. Azure Native
  3. API Docs
  4. azurestackhci
  5. getVirtualNetworkSubnet
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.13.0 published on Wednesday, Jan 28, 2026 by Pulumi
azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.13.0 published on Wednesday, Jan 28, 2026 by Pulumi

    The operation to get a virtual network subnet.

    Uses Azure REST API version 2025-09-01-preview.

    Using getVirtualNetworkSubnet

    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 getVirtualNetworkSubnet(args: GetVirtualNetworkSubnetArgs, opts?: InvokeOptions): Promise<GetVirtualNetworkSubnetResult>
    function getVirtualNetworkSubnetOutput(args: GetVirtualNetworkSubnetOutputArgs, opts?: InvokeOptions): Output<GetVirtualNetworkSubnetResult>
    def get_virtual_network_subnet(resource_group_name: Optional[str] = None,
                                   subnet_name: Optional[str] = None,
                                   virtual_network_name: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetVirtualNetworkSubnetResult
    def get_virtual_network_subnet_output(resource_group_name: Optional[pulumi.Input[str]] = None,
                                   subnet_name: Optional[pulumi.Input[str]] = None,
                                   virtual_network_name: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetVirtualNetworkSubnetResult]
    func LookupVirtualNetworkSubnet(ctx *Context, args *LookupVirtualNetworkSubnetArgs, opts ...InvokeOption) (*LookupVirtualNetworkSubnetResult, error)
    func LookupVirtualNetworkSubnetOutput(ctx *Context, args *LookupVirtualNetworkSubnetOutputArgs, opts ...InvokeOption) LookupVirtualNetworkSubnetResultOutput

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

    public static class GetVirtualNetworkSubnet 
    {
        public static Task<GetVirtualNetworkSubnetResult> InvokeAsync(GetVirtualNetworkSubnetArgs args, InvokeOptions? opts = null)
        public static Output<GetVirtualNetworkSubnetResult> Invoke(GetVirtualNetworkSubnetInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVirtualNetworkSubnetResult> getVirtualNetworkSubnet(GetVirtualNetworkSubnetArgs args, InvokeOptions options)
    public static Output<GetVirtualNetworkSubnetResult> getVirtualNetworkSubnet(GetVirtualNetworkSubnetArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure-native:azurestackhci:getVirtualNetworkSubnet
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    SubnetName string
    Name of the virtual network subnet
    VirtualNetworkName string
    Name of the virtual network
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    SubnetName string
    Name of the virtual network subnet
    VirtualNetworkName string
    Name of the virtual network
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    subnetName String
    Name of the virtual network subnet
    virtualNetworkName String
    Name of the virtual network
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    subnetName string
    Name of the virtual network subnet
    virtualNetworkName string
    Name of the virtual network
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    subnet_name str
    Name of the virtual network subnet
    virtual_network_name str
    Name of the virtual network
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    subnetName String
    Name of the virtual network subnet
    virtualNetworkName String
    Name of the virtual network

    getVirtualNetworkSubnet Result

    The following output properties are available:

    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    Name string
    The name of the resource
    Properties Pulumi.AzureNative.AzureStackHCI.Outputs.VirtualNetworkSubnetPropertiesResponse
    The resource-specific properties for this resource.
    SystemData Pulumi.AzureNative.AzureStackHCI.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    ExtendedLocation Pulumi.AzureNative.AzureStackHCI.Outputs.ExtendedLocationResponse
    The extendedLocation of the resource.
    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    Name string
    The name of the resource
    Properties VirtualNetworkSubnetPropertiesResponse
    The resource-specific properties for this resource.
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    ExtendedLocation ExtendedLocationResponse
    The extendedLocation of the resource.
    azureApiVersion String
    The Azure API version of the resource.
    id String
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    name String
    The name of the resource
    properties VirtualNetworkSubnetPropertiesResponse
    The resource-specific properties for this resource.
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    extendedLocation ExtendedLocationResponse
    The extendedLocation of the resource.
    azureApiVersion string
    The Azure API version of the resource.
    id string
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    name string
    The name of the resource
    properties VirtualNetworkSubnetPropertiesResponse
    The resource-specific properties for this resource.
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    extendedLocation ExtendedLocationResponse
    The extendedLocation of the resource.
    azure_api_version str
    The Azure API version of the resource.
    id str
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    name str
    The name of the resource
    properties VirtualNetworkSubnetPropertiesResponse
    The resource-specific properties for this resource.
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    extended_location ExtendedLocationResponse
    The extendedLocation of the resource.
    azureApiVersion String
    The Azure API version of the resource.
    id String
    Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
    name String
    The name of the resource
    properties Property Map
    The resource-specific properties for this resource.
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    extendedLocation Property Map
    The extendedLocation of the resource.

    Supporting Types

    ExtendedLocationResponse

    Name string
    The name of the extended location.
    Type string
    The type of the extended location.
    Name string
    The name of the extended location.
    Type string
    The type of the extended location.
    name String
    The name of the extended location.
    type String
    The type of the extended location.
    name string
    The name of the extended location.
    type string
    The type of the extended location.
    name str
    The name of the extended location.
    type str
    The type of the extended location.
    name String
    The name of the extended location.
    type String
    The type of the extended location.

    NatGatewayArmReferenceResponse

    ResourceId string
    The ARM ID for a Network Security Group.
    ResourceId string
    The ARM ID for a Network Security Group.
    resourceId String
    The ARM ID for a Network Security Group.
    resourceId string
    The ARM ID for a Network Security Group.
    resource_id str
    The ARM ID for a Network Security Group.
    resourceId String
    The ARM ID for a Network Security Group.

    NetworkSecurityGroupArmReferenceResponse

    Id string
    The Azure Resource ID for a Network Security Group.
    Id string
    The Azure Resource ID for a Network Security Group.
    id String
    The Azure Resource ID for a Network Security Group.
    id string
    The Azure Resource ID for a Network Security Group.
    id str
    The Azure Resource ID for a Network Security Group.
    id String
    The Azure Resource ID for a Network Security Group.

    RouteResponse

    AddressPrefix string
    The destination CIDR to which the route applies.
    Name string
    Name - name of the subnet
    NextHopIpAddress string
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
    AddressPrefix string
    The destination CIDR to which the route applies.
    Name string
    Name - name of the subnet
    NextHopIpAddress string
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
    addressPrefix String
    The destination CIDR to which the route applies.
    name String
    Name - name of the subnet
    nextHopIpAddress String
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
    addressPrefix string
    The destination CIDR to which the route applies.
    name string
    Name - name of the subnet
    nextHopIpAddress string
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
    address_prefix str
    The destination CIDR to which the route applies.
    name str
    Name - name of the subnet
    next_hop_ip_address str
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
    addressPrefix String
    The destination CIDR to which the route applies.
    name String
    Name - name of the subnet
    nextHopIpAddress String
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.

    RouteTableResponse

    Etag string
    A unique read-only string that changes whenever the resource is updated.
    Name string
    Resource name.
    Type string
    Resource type.
    Routes List<Pulumi.AzureNative.AzureStackHCI.Inputs.RouteResponse>
    Collection of routes contained within a route table.
    Etag string
    A unique read-only string that changes whenever the resource is updated.
    Name string
    Resource name.
    Type string
    Resource type.
    Routes []RouteResponse
    Collection of routes contained within a route table.
    etag String
    A unique read-only string that changes whenever the resource is updated.
    name String
    Resource name.
    type String
    Resource type.
    routes List<RouteResponse>
    Collection of routes contained within a route table.
    etag string
    A unique read-only string that changes whenever the resource is updated.
    name string
    Resource name.
    type string
    Resource type.
    routes RouteResponse[]
    Collection of routes contained within a route table.
    etag str
    A unique read-only string that changes whenever the resource is updated.
    name str
    Resource name.
    type str
    Resource type.
    routes Sequence[RouteResponse]
    Collection of routes contained within a route table.
    etag String
    A unique read-only string that changes whenever the resource is updated.
    name String
    Resource name.
    type String
    Resource type.
    routes List<Property Map>
    Collection of routes contained within a route table.

    SystemDataResponse

    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.
    createdAt string
    The timestamp of resource creation (UTC).
    createdBy string
    The identity that created the resource.
    createdByType string
    The type of identity that created the resource.
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    The identity that last modified the resource.
    lastModifiedByType string
    The type of identity that last modified the resource.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.

    VirtualNetworkSubnetIpConfigurationReferenceResponse

    Id string
    The Azure Resource ID for a Network Interface.
    Id string
    The Azure Resource ID for a Network Interface.
    id String
    The Azure Resource ID for a Network Interface.
    id string
    The Azure Resource ID for a Network Interface.
    id str
    The Azure Resource ID for a Network Interface.
    id String
    The Azure Resource ID for a Network Interface.

    VirtualNetworkSubnetPropertiesResponse

    AddressPrefix string
    Subnet CIDR
    IpConfigurations List<Pulumi.AzureNative.AzureStackHCI.Inputs.VirtualNetworkSubnetIpConfigurationReferenceResponse>
    List of ip configurations for the subnet
    ProvisioningState string
    The provisioning state of the virtual network subnet resource.
    Status Pulumi.AzureNative.AzureStackHCI.Inputs.VirtualNetworkSubnetStatusResponse
    The observed status of the virtual network subnet resource.
    NatGateway Pulumi.AzureNative.AzureStackHCI.Inputs.NatGatewayArmReferenceResponse
    Nat Gateway attached to the subnet for non-vnet traffic.
    NetworkSecurityGroup Pulumi.AzureNative.AzureStackHCI.Inputs.NetworkSecurityGroupArmReferenceResponse
    Network Security Group attached to the subnet.
    RouteTable Pulumi.AzureNative.AzureStackHCI.Inputs.RouteTableResponse
    RouteTable defining custom routes for the subnet.
    AddressPrefix string
    Subnet CIDR
    IpConfigurations []VirtualNetworkSubnetIpConfigurationReferenceResponse
    List of ip configurations for the subnet
    ProvisioningState string
    The provisioning state of the virtual network subnet resource.
    Status VirtualNetworkSubnetStatusResponse
    The observed status of the virtual network subnet resource.
    NatGateway NatGatewayArmReferenceResponse
    Nat Gateway attached to the subnet for non-vnet traffic.
    NetworkSecurityGroup NetworkSecurityGroupArmReferenceResponse
    Network Security Group attached to the subnet.
    RouteTable RouteTableResponse
    RouteTable defining custom routes for the subnet.
    addressPrefix String
    Subnet CIDR
    ipConfigurations List<VirtualNetworkSubnetIpConfigurationReferenceResponse>
    List of ip configurations for the subnet
    provisioningState String
    The provisioning state of the virtual network subnet resource.
    status VirtualNetworkSubnetStatusResponse
    The observed status of the virtual network subnet resource.
    natGateway NatGatewayArmReferenceResponse
    Nat Gateway attached to the subnet for non-vnet traffic.
    networkSecurityGroup NetworkSecurityGroupArmReferenceResponse
    Network Security Group attached to the subnet.
    routeTable RouteTableResponse
    RouteTable defining custom routes for the subnet.
    addressPrefix string
    Subnet CIDR
    ipConfigurations VirtualNetworkSubnetIpConfigurationReferenceResponse[]
    List of ip configurations for the subnet
    provisioningState string
    The provisioning state of the virtual network subnet resource.
    status VirtualNetworkSubnetStatusResponse
    The observed status of the virtual network subnet resource.
    natGateway NatGatewayArmReferenceResponse
    Nat Gateway attached to the subnet for non-vnet traffic.
    networkSecurityGroup NetworkSecurityGroupArmReferenceResponse
    Network Security Group attached to the subnet.
    routeTable RouteTableResponse
    RouteTable defining custom routes for the subnet.
    address_prefix str
    Subnet CIDR
    ip_configurations Sequence[VirtualNetworkSubnetIpConfigurationReferenceResponse]
    List of ip configurations for the subnet
    provisioning_state str
    The provisioning state of the virtual network subnet resource.
    status VirtualNetworkSubnetStatusResponse
    The observed status of the virtual network subnet resource.
    nat_gateway NatGatewayArmReferenceResponse
    Nat Gateway attached to the subnet for non-vnet traffic.
    network_security_group NetworkSecurityGroupArmReferenceResponse
    Network Security Group attached to the subnet.
    route_table RouteTableResponse
    RouteTable defining custom routes for the subnet.
    addressPrefix String
    Subnet CIDR
    ipConfigurations List<Property Map>
    List of ip configurations for the subnet
    provisioningState String
    The provisioning state of the virtual network subnet resource.
    status Property Map
    The observed status of the virtual network subnet resource.
    natGateway Property Map
    Nat Gateway attached to the subnet for non-vnet traffic.
    networkSecurityGroup Property Map
    Network Security Group attached to the subnet.
    routeTable Property Map
    RouteTable defining custom routes for the subnet.

    VirtualNetworkSubnetStatusProvisioningStatusResponse

    Status string
    The status of the operation performed on the virtual network subnet [Succeeded, Failed, InProgress]
    OperationId string
    The ID of the operation performed on the virtual network subnet
    Status string
    The status of the operation performed on the virtual network subnet [Succeeded, Failed, InProgress]
    OperationId string
    The ID of the operation performed on the virtual network subnet
    status String
    The status of the operation performed on the virtual network subnet [Succeeded, Failed, InProgress]
    operationId String
    The ID of the operation performed on the virtual network subnet
    status string
    The status of the operation performed on the virtual network subnet [Succeeded, Failed, InProgress]
    operationId string
    The ID of the operation performed on the virtual network subnet
    status str
    The status of the operation performed on the virtual network subnet [Succeeded, Failed, InProgress]
    operation_id str
    The ID of the operation performed on the virtual network subnet
    status String
    The status of the operation performed on the virtual network subnet [Succeeded, Failed, InProgress]
    operationId String
    The ID of the operation performed on the virtual network subnet

    VirtualNetworkSubnetStatusResponse

    ErrorCode string
    VirtualNetworkSubnet provisioning error code
    ErrorMessage string
    Descriptive error message
    ProvisioningStatus Pulumi.AzureNative.AzureStackHCI.Inputs.VirtualNetworkSubnetStatusProvisioningStatusResponse
    Public IP provisioning status
    ErrorCode string
    VirtualNetworkSubnet provisioning error code
    ErrorMessage string
    Descriptive error message
    ProvisioningStatus VirtualNetworkSubnetStatusProvisioningStatusResponse
    Public IP provisioning status
    errorCode String
    VirtualNetworkSubnet provisioning error code
    errorMessage String
    Descriptive error message
    provisioningStatus VirtualNetworkSubnetStatusProvisioningStatusResponse
    Public IP provisioning status
    errorCode string
    VirtualNetworkSubnet provisioning error code
    errorMessage string
    Descriptive error message
    provisioningStatus VirtualNetworkSubnetStatusProvisioningStatusResponse
    Public IP provisioning status
    error_code str
    VirtualNetworkSubnet provisioning error code
    error_message str
    Descriptive error message
    provisioning_status VirtualNetworkSubnetStatusProvisioningStatusResponse
    Public IP provisioning status
    errorCode String
    VirtualNetworkSubnet provisioning error code
    errorMessage String
    Descriptive error message
    provisioningStatus Property Map
    Public IP provisioning status

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Azure Native v3.13.0 published on Wednesday, Jan 28, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate