UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

159 lines (158 loc) 4.74 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides details about a specific VPC subnet. * * This resource can prove useful when a module accepts a subnet id as an input variable and needs to, for example, * determine the id of the VPC that the subnet belongs to. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as huaweicloud from "@pulumi/huaweicloud"; * * const subnet = huaweicloud.Vpc.getSubnet({ * id: _var.subnet_id, * }); * export const subnetVpcId = subnet.then(subnet => subnet.vpcId); * ``` * ## **Attributes Reference** * * In addition to all arguments above, the following attributes are exported: * * * `dnsList` - The IP address list of DNS servers on the subnet. * * * `dhcpEnable` - Whether the DHCP is enabled. * * * `description` - The description of the subnet. * * * `ipv4SubnetId` - The ID of the IPv4 subnet (Native OpenStack API). * * * `ipv6Enable` - Whether the IPv6 is enabled. * * * `ipv6SubnetId` - The ID of the IPv6 subnet (Native OpenStack API). * * * `ipv6Cidr` - The IPv6 subnet CIDR block. * * * `ipv6Gateway` - The IPv6 subnet gateway. */ export declare function getSubnet(args?: GetSubnetArgs, opts?: pulumi.InvokeOptions): Promise<GetSubnetResult>; /** * A collection of arguments for invoking getSubnet. */ export interface GetSubnetArgs { /** * Specifies the availability zone (AZ) to which the subnet should belong. */ availabilityZone?: string; /** * Specifies the network segment of specific subnet to retrieve. The value must be in CIDR * format. */ cidr?: string; /** * Specifies the subnet gateway address of specific subnet. */ gatewayIp?: string; /** * - Specifies a resource ID in UUID format. */ id?: string; /** * Specifies the name of the specific subnet to retrieve. */ name?: string; /** * Specifies the IP address of DNS server 1 on the specific subnet. */ primaryDns?: string; /** * Specifies the region in which to obtain the subnet. If omitted, the provider-level * region will be used. */ region?: string; /** * Specifies the IP address of DNS server 2 on the specific subnet. */ secondaryDns?: string; /** * Specifies the value can be ACTIVE, DOWN, UNKNOWN, or ERROR. */ status?: string; /** * Specifies the id of the VPC that the desired subnet belongs to. */ vpcId?: string; } /** * A collection of values returned by getSubnet. */ export interface GetSubnetResult { readonly availabilityZone: string; readonly cidr: string; readonly description: string; readonly dhcpEnable: boolean; readonly dnsLists: string[]; readonly gatewayIp: string; readonly id: string; readonly ipv4SubnetId: string; readonly ipv6Cidr: string; readonly ipv6Enable: boolean; readonly ipv6Gateway: string; readonly ipv6SubnetId: string; readonly name: string; readonly primaryDns: string; readonly region: string; readonly secondaryDns: string; readonly status: string; readonly subnetId: string; readonly vpcId: string; } export declare function getSubnetOutput(args?: GetSubnetOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetSubnetResult>; /** * A collection of arguments for invoking getSubnet. */ export interface GetSubnetOutputArgs { /** * Specifies the availability zone (AZ) to which the subnet should belong. */ availabilityZone?: pulumi.Input<string>; /** * Specifies the network segment of specific subnet to retrieve. The value must be in CIDR * format. */ cidr?: pulumi.Input<string>; /** * Specifies the subnet gateway address of specific subnet. */ gatewayIp?: pulumi.Input<string>; /** * - Specifies a resource ID in UUID format. */ id?: pulumi.Input<string>; /** * Specifies the name of the specific subnet to retrieve. */ name?: pulumi.Input<string>; /** * Specifies the IP address of DNS server 1 on the specific subnet. */ primaryDns?: pulumi.Input<string>; /** * Specifies the region in which to obtain the subnet. If omitted, the provider-level * region will be used. */ region?: pulumi.Input<string>; /** * Specifies the IP address of DNS server 2 on the specific subnet. */ secondaryDns?: pulumi.Input<string>; /** * Specifies the value can be ACTIVE, DOWN, UNKNOWN, or ERROR. */ status?: pulumi.Input<string>; /** * Specifies the id of the VPC that the desired subnet belongs to. */ vpcId?: pulumi.Input<string>; }