import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * The subnet is a segment allocated within a specified availability zone from a VPC CIDR block, providing private IP addresses for cloud resources such as cloud servers and load balancers * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcenginecc from "@volcengine/pulumi-volcenginecc"; * * const subnetDemo = new volcenginecc.vpc.Subnet("SubnetDemo", { * vpcId: "vpc-xxxx", * zoneId: "cn-beijing", * subnetName: "subnetDemo", * description: "subnetDemo description", * cidrBlock: "192.168.xx.0/24", * tags: [{ * key: "env", * value: "test", * }], * }); * ``` * * ## Import * * ```sh * $ pulumi import volcenginecc:vpc/subnet:Subnet example "subnet_id" * ``` */ export declare class Subnet extends pulumi.CustomResource { /** * Get an existing Subnet resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SubnetState, opts?: pulumi.CustomResourceOptions): Subnet; /** * Returns true if the given object is an instance of Subnet. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Subnet; /** * ID of the account to which the subnet belongs */ readonly accountId: pulumi.Output; /** * Number of available IP addresses in the subnet */ readonly availableIpAddressCount: pulumi.Output; /** * Subnet IPv4 CIDR block */ readonly cidrBlock: pulumi.Output; /** * Subnet creation time */ readonly createdTime: pulumi.Output; /** * Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https:// */ readonly description: pulumi.Output; /** * Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses */ readonly enableIpv6: pulumi.Output; /** * Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64 */ readonly ipv6CidrBlock: pulumi.Output; /** * Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user */ readonly isDefault: pulumi.Output; /** * ID of the network ACL associated with the subnet */ readonly networkAclId: pulumi.Output; /** * Name of the project associated with the VPC instance where the subnet resides */ readonly projectName: pulumi.Output; /** * Read-only field, subnet IPv6 CIDR block */ readonly readIpv6CidrBlock: pulumi.Output; /** * Route table information */ readonly routeTable: pulumi.Output; /** * Subnet status. 1. Pending: Configuring. 2. Available: Available */ readonly status: pulumi.Output; /** * ID of the subnet whose information is to be modified */ readonly subnetId: pulumi.Output; /** * Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID */ readonly subnetName: pulumi.Output; readonly tags: pulumi.Output; /** * Total number of available IPs in the subnet */ readonly totalIpv4Count: pulumi.Output; /** * Subnet update time */ readonly updatedTime: pulumi.Output; /** * ID of the VPC to which the subnet belongs */ readonly vpcId: pulumi.Output; /** * Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones */ readonly zoneId: pulumi.Output; /** * Create a Subnet resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SubnetArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Subnet resources. */ export interface SubnetState { /** * ID of the account to which the subnet belongs */ accountId?: pulumi.Input; /** * Number of available IP addresses in the subnet */ availableIpAddressCount?: pulumi.Input; /** * Subnet IPv4 CIDR block */ cidrBlock?: pulumi.Input; /** * Subnet creation time */ createdTime?: pulumi.Input; /** * Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https:// */ description?: pulumi.Input; /** * Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses */ enableIpv6?: pulumi.Input; /** * Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64 */ ipv6CidrBlock?: pulumi.Input; /** * Whether the subnet is a default subnet. 1. true: Default subnet, created automatically when an ECS instance is created. 2. false: Non-default subnet, created manually by the user */ isDefault?: pulumi.Input; /** * ID of the network ACL associated with the subnet */ networkAclId?: pulumi.Input; /** * Name of the project associated with the VPC instance where the subnet resides */ projectName?: pulumi.Input; /** * Read-only field, subnet IPv6 CIDR block */ readIpv6CidrBlock?: pulumi.Input; /** * Route table information */ routeTable?: pulumi.Input; /** * Subnet status. 1. Pending: Configuring. 2. Available: Available */ status?: pulumi.Input; /** * ID of the subnet whose information is to be modified */ subnetId?: pulumi.Input; /** * Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID */ subnetName?: pulumi.Input; tags?: pulumi.Input[]>; /** * Total number of available IPs in the subnet */ totalIpv4Count?: pulumi.Input; /** * Subnet update time */ updatedTime?: pulumi.Input; /** * ID of the VPC to which the subnet belongs */ vpcId?: pulumi.Input; /** * Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones */ zoneId?: pulumi.Input; } /** * The set of arguments for constructing a Subnet resource. */ export interface SubnetArgs { /** * Subnet IPv4 CIDR block */ cidrBlock: pulumi.Input; /** * Subnet description. Limited to 0–255 characters. Must start with a letter, Chinese character, or number. Can include English comma (,), period (.), underscore (_), space ( ), equals sign (=), hyphen (-), Chinese comma (,), and Chinese period (。). Cannot start with http:// or https:// */ description?: pulumi.Input; /** * Enable or disable IPv6. This parameter can be configured only if the VPC to which the subnet belongs has IPv6 enabled. 1. true: Enable. 2. false: Disable. This value can be configured only if no cloud resources in the subnet have assigned IPv6 addresses */ enableIpv6?: pulumi.Input; /** * Subnet IPv6 CIDR block. 1. When creating or modifying, enter the last 8 bits of the subnet IPv6 CIDR block (subnet mask is fixed at /64). 2. This parameter is supported only when EnableIpv6 is set to true. 3. Value range: 0–255. Mask is fixed at /64 */ ipv6CidrBlock?: pulumi.Input; /** * Subnet name, limited to 1–128 characters. Must start with a letter, Chinese character, or number. Can include period (.), underscore (_), and hyphen (-). Cannot start with http:// or https://. If not specified, defaults to the subnet ID */ subnetName?: pulumi.Input; tags?: pulumi.Input[]>; /** * ID of the VPC to which the subnet belongs */ vpcId: pulumi.Input; /** * Availability zone ID for the subnet to be created. For more information, see Regions and Availability Zones */ zoneId: pulumi.Input; }