Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi
yandex.getVpcSubnet
Explore with Pulumi AI
Get information about a Yandex VPC subnet. For more information, see Yandex.Cloud VPC.
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const admin = pulumi.output(yandex.getVpcSubnet({
subnetId: "my-subnet-id",
}));
import pulumi
import pulumi_yandex as yandex
admin = yandex.get_vpc_subnet(subnet_id="my-subnet-id")
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var admin = Output.Create(Yandex.GetVpcSubnet.InvokeAsync(new Yandex.GetVpcSubnetArgs
{
SubnetId = "my-subnet-id",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "my-subnet-id"
_, err := yandex.LookupVpcSubnet(ctx, &GetVpcSubnetArgs{
SubnetId: &opt0,
}, nil)
if err != nil {
return err
}
return nil
})
}
This data source is used to define [VPC Subnets] that can be used by other resources.
Using getVpcSubnet
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 getVpcSubnet(args: GetVpcSubnetArgs, opts?: InvokeOptions): Promise<GetVpcSubnetResult>
function getVpcSubnetOutput(args: GetVpcSubnetOutputArgs, opts?: InvokeOptions): Output<GetVpcSubnetResult>
def get_vpc_subnet(folder_id: Optional[str] = None,
name: Optional[str] = None,
subnet_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVpcSubnetResult
def get_vpc_subnet_output(folder_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
subnet_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpcSubnetResult]
func LookupVpcSubnet(ctx *Context, args *LookupVpcSubnetArgs, opts ...InvokeOption) (*LookupVpcSubnetResult, error)
func LookupVpcSubnetOutput(ctx *Context, args *LookupVpcSubnetOutputArgs, opts ...InvokeOption) LookupVpcSubnetResultOutput
> Note: This function is named LookupVpcSubnet
in the Go SDK.
public static class GetVpcSubnet
{
public static Task<GetVpcSubnetResult> InvokeAsync(GetVpcSubnetArgs args, InvokeOptions? opts = null)
public static Output<GetVpcSubnetResult> Invoke(GetVpcSubnetInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpcSubnetResult> getVpcSubnet(GetVpcSubnetArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: yandex:index/getVpcSubnet:getVpcSubnet
arguments:
# arguments dictionary
The following arguments are supported:
getVpcSubnet Result
The following output properties are available:
- Created
At string - Creation timestamp of this subnet.
- Description string
- Description of the subnet.
- Dhcp
Options List<GetVpc Subnet Dhcp Option> - Options for DHCP client. The structure is documented below.
- Folder
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Labels Dictionary<string, string>
- Labels to assign to this subnet.
- Name string
- Network
Id string - ID of the network this subnet belongs to.
- Route
Table stringId - ID of the route table to assign to this subnet.
- Subnet
Id string - V4Cidr
Blocks List<string> - The blocks of internal IPv4 addresses owned by this subnet.
- V6Cidr
Blocks List<string> - The blocks of internal IPv6 addresses owned by this subnet.
- Zone string
- Name of the availability zone for this subnet.
- Created
At string - Creation timestamp of this subnet.
- Description string
- Description of the subnet.
- Dhcp
Options []GetVpc Subnet Dhcp Option - Options for DHCP client. The structure is documented below.
- Folder
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Labels map[string]string
- Labels to assign to this subnet.
- Name string
- Network
Id string - ID of the network this subnet belongs to.
- Route
Table stringId - ID of the route table to assign to this subnet.
- Subnet
Id string - V4Cidr
Blocks []string - The blocks of internal IPv4 addresses owned by this subnet.
- V6Cidr
Blocks []string - The blocks of internal IPv6 addresses owned by this subnet.
- Zone string
- Name of the availability zone for this subnet.
- created
At String - Creation timestamp of this subnet.
- description String
- Description of the subnet.
- dhcp
Options List<GetVpc Subnet Dhcp Option> - Options for DHCP client. The structure is documented below.
- folder
Id String - id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String,String>
- Labels to assign to this subnet.
- name String
- network
Id String - ID of the network this subnet belongs to.
- route
Table StringId - ID of the route table to assign to this subnet.
- subnet
Id String - v4Cidr
Blocks List<String> - The blocks of internal IPv4 addresses owned by this subnet.
- v6Cidr
Blocks List<String> - The blocks of internal IPv6 addresses owned by this subnet.
- zone String
- Name of the availability zone for this subnet.
- created
At string - Creation timestamp of this subnet.
- description string
- Description of the subnet.
- dhcp
Options GetVpc Subnet Dhcp Option[] - Options for DHCP client. The structure is documented below.
- folder
Id string - id string
- The provider-assigned unique ID for this managed resource.
- labels {[key: string]: string}
- Labels to assign to this subnet.
- name string
- network
Id string - ID of the network this subnet belongs to.
- route
Table stringId - ID of the route table to assign to this subnet.
- subnet
Id string - v4Cidr
Blocks string[] - The blocks of internal IPv4 addresses owned by this subnet.
- v6Cidr
Blocks string[] - The blocks of internal IPv6 addresses owned by this subnet.
- zone string
- Name of the availability zone for this subnet.
- created_
at str - Creation timestamp of this subnet.
- description str
- Description of the subnet.
- dhcp_
options Sequence[GetVpc Subnet Dhcp Option] - Options for DHCP client. The structure is documented below.
- folder_
id str - id str
- The provider-assigned unique ID for this managed resource.
- labels Mapping[str, str]
- Labels to assign to this subnet.
- name str
- network_
id str - ID of the network this subnet belongs to.
- route_
table_ strid - ID of the route table to assign to this subnet.
- subnet_
id str - v4_
cidr_ Sequence[str]blocks - The blocks of internal IPv4 addresses owned by this subnet.
- v6_
cidr_ Sequence[str]blocks - The blocks of internal IPv6 addresses owned by this subnet.
- zone str
- Name of the availability zone for this subnet.
- created
At String - Creation timestamp of this subnet.
- description String
- Description of the subnet.
- dhcp
Options List<Property Map> - Options for DHCP client. The structure is documented below.
- folder
Id String - id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String>
- Labels to assign to this subnet.
- name String
- network
Id String - ID of the network this subnet belongs to.
- route
Table StringId - ID of the route table to assign to this subnet.
- subnet
Id String - v4Cidr
Blocks List<String> - The blocks of internal IPv4 addresses owned by this subnet.
- v6Cidr
Blocks List<String> - The blocks of internal IPv6 addresses owned by this subnet.
- zone String
- Name of the availability zone for this subnet.
Supporting Types
GetVpcSubnetDhcpOption
- Domain
Name string - Domain name.
- Domain
Name List<string>Servers - Domain name server IP addresses.
- Ntp
Servers List<string> - NTP server IP addresses.
- Domain
Name string - Domain name.
- Domain
Name []stringServers - Domain name server IP addresses.
- Ntp
Servers []string - NTP server IP addresses.
- domain
Name String - Domain name.
- domain
Name List<String>Servers - Domain name server IP addresses.
- ntp
Servers List<String> - NTP server IP addresses.
- domain
Name string - Domain name.
- domain
Name string[]Servers - Domain name server IP addresses.
- ntp
Servers string[] - NTP server IP addresses.
- domain_
name str - Domain name.
- domain_
name_ Sequence[str]servers - Domain name server IP addresses.
- ntp_
servers Sequence[str] - NTP server IP addresses.
- domain
Name String - Domain name.
- domain
Name List<String>Servers - Domain name server IP addresses.
- ntp
Servers List<String> - NTP server IP addresses.
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
yandex
Terraform Provider.