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 SourceInvokeAsync(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> |