Show / Hide Table of Contents

Class GetSubnet

Inheritance
System.Object
GetSubnet
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.Network
Assembly: Pulumi.Azure.dll
Syntax
public static class GetSubnet

Methods

View Source

InvokeAsync(GetSubnetArgs, InvokeOptions)

Use this data source to access information about an existing Subnet within a Virtual Network.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
public MyStack()
{
    var example = Output.Create(Azure.Network.GetSubnet.InvokeAsync(new Azure.Network.GetSubnetArgs
    {
        Name = "backend",
        VirtualNetworkName = "production",
        ResourceGroupName = "networking",
    }));
    this.SubnetId = example.Apply(example => example.Id);
}

[Output("subnetId")]
public Output<string> SubnetId { get; set; }
}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetSubnetResult> InvokeAsync(GetSubnetArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetSubnetArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetSubnetResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.