1. Packages
  2. Packages
  3. Volcenginecc Provider
  4. API Docs
  5. vpc
  6. Vpc
Viewing docs for volcenginecc v0.0.32
published on Thursday, Apr 23, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.32
published on Thursday, Apr 23, 2026 by Volcengine

    A private network creates an isolated, self-configurable virtual network environment for cloud resources. You can customize IP address ranges, security groups, routing policies, and other network features within the private network to manage cloud resources simply, efficiently, and securely.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      vPCDemo:
        type: volcenginecc:vpc:Vpc
        name: VPCDemo
        properties:
          cidrBlock: 192.168.0.0/24
          supportIpv4Gateway: true
          vpcName: vpc-demo
          description: VpcDemo Example
          enableIpv6: false
          dnsServers:
            - 12.3.x.x
          associateCens:
            - cen_id: cen-3re8cx4vwdibk5zsk2xxxx
              cen_owner_id: 200000xxx
              cen_status: Attaching
          natGatewayIds:
            - ngw-2d6tp1y8zq41s58ozfdxxx
          routeTableIds:
            - vtb-29mkf8ft83l6o1e1hgixxx
          securityGroupIds:
            - sg-29mkx39jb80741e1hgj2bxxx
          projectName: default
          tags:
            - key: env
              value: test
    

    Create Vpc Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Vpc(name: string, args?: VpcArgs, opts?: CustomResourceOptions);
    @overload
    def Vpc(resource_name: str,
            args: Optional[VpcArgs] = None,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Vpc(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            cidr_block: Optional[str] = None,
            description: Optional[str] = None,
            dns_servers: Optional[Sequence[str]] = None,
            enable_ipv6: Optional[bool] = None,
            ipv4_gateway_id: Optional[str] = None,
            ipv6_cidr_block: Optional[str] = None,
            nat_gateway_ids: Optional[Sequence[str]] = None,
            project_name: Optional[str] = None,
            secondary_cidr_blocks: Optional[Sequence[str]] = None,
            subnet_ids: Optional[Sequence[str]] = None,
            support_ipv4_gateway: Optional[bool] = None,
            tags: Optional[Sequence[VpcTagArgs]] = None,
            vpc_name: Optional[str] = None)
    func NewVpc(ctx *Context, name string, args *VpcArgs, opts ...ResourceOption) (*Vpc, error)
    public Vpc(string name, VpcArgs? args = null, CustomResourceOptions? opts = null)
    public Vpc(String name, VpcArgs args)
    public Vpc(String name, VpcArgs args, CustomResourceOptions options)
    
    type: volcenginecc:vpc:Vpc
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VpcArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VpcArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VpcArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var vpcResource = new Volcenginecc.Vpc.Vpc("vpcResource", new()
    {
        CidrBlock = "string",
        Description = "string",
        DnsServers = new[]
        {
            "string",
        },
        EnableIpv6 = false,
        Ipv4GatewayId = "string",
        Ipv6CidrBlock = "string",
        NatGatewayIds = new[]
        {
            "string",
        },
        ProjectName = "string",
        SecondaryCidrBlocks = new[]
        {
            "string",
        },
        SubnetIds = new[]
        {
            "string",
        },
        SupportIpv4Gateway = false,
        Tags = new[]
        {
            new Volcenginecc.Vpc.Inputs.VpcTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        VpcName = "string",
    });
    
    example, err := vpc.NewVpc(ctx, "vpcResource", &vpc.VpcArgs{
    	CidrBlock:   pulumi.String("string"),
    	Description: pulumi.String("string"),
    	DnsServers: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	EnableIpv6:    pulumi.Bool(false),
    	Ipv4GatewayId: pulumi.String("string"),
    	Ipv6CidrBlock: pulumi.String("string"),
    	NatGatewayIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ProjectName: pulumi.String("string"),
    	SecondaryCidrBlocks: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SubnetIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SupportIpv4Gateway: pulumi.Bool(false),
    	Tags: vpc.VpcTagArray{
    		&vpc.VpcTagArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	VpcName: pulumi.String("string"),
    })
    
    var vpcResource = new Vpc("vpcResource", VpcArgs.builder()
        .cidrBlock("string")
        .description("string")
        .dnsServers("string")
        .enableIpv6(false)
        .ipv4GatewayId("string")
        .ipv6CidrBlock("string")
        .natGatewayIds("string")
        .projectName("string")
        .secondaryCidrBlocks("string")
        .subnetIds("string")
        .supportIpv4Gateway(false)
        .tags(VpcTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .vpcName("string")
        .build());
    
    vpc_resource = volcenginecc.vpc.Vpc("vpcResource",
        cidr_block="string",
        description="string",
        dns_servers=["string"],
        enable_ipv6=False,
        ipv4_gateway_id="string",
        ipv6_cidr_block="string",
        nat_gateway_ids=["string"],
        project_name="string",
        secondary_cidr_blocks=["string"],
        subnet_ids=["string"],
        support_ipv4_gateway=False,
        tags=[{
            "key": "string",
            "value": "string",
        }],
        vpc_name="string")
    
    const vpcResource = new volcenginecc.vpc.Vpc("vpcResource", {
        cidrBlock: "string",
        description: "string",
        dnsServers: ["string"],
        enableIpv6: false,
        ipv4GatewayId: "string",
        ipv6CidrBlock: "string",
        natGatewayIds: ["string"],
        projectName: "string",
        secondaryCidrBlocks: ["string"],
        subnetIds: ["string"],
        supportIpv4Gateway: false,
        tags: [{
            key: "string",
            value: "string",
        }],
        vpcName: "string",
    });
    
    type: volcenginecc:vpc:Vpc
    properties:
        cidrBlock: string
        description: string
        dnsServers:
            - string
        enableIpv6: false
        ipv4GatewayId: string
        ipv6CidrBlock: string
        natGatewayIds:
            - string
        projectName: string
        secondaryCidrBlocks:
            - string
        subnetIds:
            - string
        supportIpv4Gateway: false
        tags:
            - key: string
              value: string
        vpcName: string
    

    Vpc Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Vpc resource accepts the following input properties:

    CidrBlock string
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    Description string
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    DnsServers List<string>
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    EnableIpv6 bool
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    Ipv4GatewayId string
    ID of the IPv4 gateway bound to the VPC.
    Ipv6CidrBlock string
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    NatGatewayIds List<string>
    ID of the NAT gateway created in the VPC.
    ProjectName string
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    SecondaryCidrBlocks List<string>
    Secondary CIDR block of the VPC.
    SubnetIds List<string>
    List of subnets in the VPC.
    SupportIpv4Gateway bool
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    Tags List<Volcengine.VpcTag>
    VpcName string
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
    CidrBlock string
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    Description string
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    DnsServers []string
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    EnableIpv6 bool
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    Ipv4GatewayId string
    ID of the IPv4 gateway bound to the VPC.
    Ipv6CidrBlock string
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    NatGatewayIds []string
    ID of the NAT gateway created in the VPC.
    ProjectName string
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    SecondaryCidrBlocks []string
    Secondary CIDR block of the VPC.
    SubnetIds []string
    List of subnets in the VPC.
    SupportIpv4Gateway bool
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    Tags []VpcTagArgs
    VpcName string
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
    cidrBlock String
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    description String
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    dnsServers List<String>
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    enableIpv6 Boolean
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    ipv4GatewayId String
    ID of the IPv4 gateway bound to the VPC.
    ipv6CidrBlock String
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    natGatewayIds List<String>
    ID of the NAT gateway created in the VPC.
    projectName String
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    secondaryCidrBlocks List<String>
    Secondary CIDR block of the VPC.
    subnetIds List<String>
    List of subnets in the VPC.
    supportIpv4Gateway Boolean
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    tags List<VpcTag>
    vpcName String
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
    cidrBlock string
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    description string
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    dnsServers string[]
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    enableIpv6 boolean
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    ipv4GatewayId string
    ID of the IPv4 gateway bound to the VPC.
    ipv6CidrBlock string
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    natGatewayIds string[]
    ID of the NAT gateway created in the VPC.
    projectName string
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    secondaryCidrBlocks string[]
    Secondary CIDR block of the VPC.
    subnetIds string[]
    List of subnets in the VPC.
    supportIpv4Gateway boolean
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    tags VpcTag[]
    vpcName string
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
    cidr_block str
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    description str
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    dns_servers Sequence[str]
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    enable_ipv6 bool
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    ipv4_gateway_id str
    ID of the IPv4 gateway bound to the VPC.
    ipv6_cidr_block str
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    nat_gateway_ids Sequence[str]
    ID of the NAT gateway created in the VPC.
    project_name str
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    secondary_cidr_blocks Sequence[str]
    Secondary CIDR block of the VPC.
    subnet_ids Sequence[str]
    List of subnets in the VPC.
    support_ipv4_gateway bool
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    tags Sequence[VpcTagArgs]
    vpc_name str
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
    cidrBlock String
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    description String
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    dnsServers List<String>
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    enableIpv6 Boolean
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    ipv4GatewayId String
    ID of the IPv4 gateway bound to the VPC.
    ipv6CidrBlock String
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    natGatewayIds List<String>
    ID of the NAT gateway created in the VPC.
    projectName String
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    secondaryCidrBlocks List<String>
    Secondary CIDR block of the VPC.
    subnetIds List<String>
    List of subnets in the VPC.
    supportIpv4Gateway Boolean
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    tags List<Property Map>
    vpcName String
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Vpc resource produces the following output properties:

    AccountId string
    ID of the account to which the VPC belongs.
    AssociateCens List<Volcengine.VpcAssociateCen>
    CreationTime string
    Time when the VPC was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    NetworkAclNum string
    Number of network ACLs in the VPC.
    RouteTableIds List<string>
    ID of the route table associated with the VPC.
    SecurityGroupIds List<string>
    List of security groups in the VPC.
    Status string
    Status of the VPC. Creating: being created. Created: created. Available: available.
    UpdateTime string
    Time when the VPC was updated.
    UserCidrBlocks List<string>
    User CIDR block of the VPC.
    VpcId string
    ID of the VPC.
    AccountId string
    ID of the account to which the VPC belongs.
    AssociateCens []VpcAssociateCen
    CreationTime string
    Time when the VPC was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    NetworkAclNum string
    Number of network ACLs in the VPC.
    RouteTableIds []string
    ID of the route table associated with the VPC.
    SecurityGroupIds []string
    List of security groups in the VPC.
    Status string
    Status of the VPC. Creating: being created. Created: created. Available: available.
    UpdateTime string
    Time when the VPC was updated.
    UserCidrBlocks []string
    User CIDR block of the VPC.
    VpcId string
    ID of the VPC.
    accountId String
    ID of the account to which the VPC belongs.
    associateCens List<VpcAssociateCen>
    creationTime String
    Time when the VPC was created.
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    networkAclNum String
    Number of network ACLs in the VPC.
    routeTableIds List<String>
    ID of the route table associated with the VPC.
    securityGroupIds List<String>
    List of security groups in the VPC.
    status String
    Status of the VPC. Creating: being created. Created: created. Available: available.
    updateTime String
    Time when the VPC was updated.
    userCidrBlocks List<String>
    User CIDR block of the VPC.
    vpcId String
    ID of the VPC.
    accountId string
    ID of the account to which the VPC belongs.
    associateCens VpcAssociateCen[]
    creationTime string
    Time when the VPC was created.
    id string
    The provider-assigned unique ID for this managed resource.
    isDefault boolean
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    networkAclNum string
    Number of network ACLs in the VPC.
    routeTableIds string[]
    ID of the route table associated with the VPC.
    securityGroupIds string[]
    List of security groups in the VPC.
    status string
    Status of the VPC. Creating: being created. Created: created. Available: available.
    updateTime string
    Time when the VPC was updated.
    userCidrBlocks string[]
    User CIDR block of the VPC.
    vpcId string
    ID of the VPC.
    account_id str
    ID of the account to which the VPC belongs.
    associate_cens Sequence[VpcAssociateCen]
    creation_time str
    Time when the VPC was created.
    id str
    The provider-assigned unique ID for this managed resource.
    is_default bool
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    network_acl_num str
    Number of network ACLs in the VPC.
    route_table_ids Sequence[str]
    ID of the route table associated with the VPC.
    security_group_ids Sequence[str]
    List of security groups in the VPC.
    status str
    Status of the VPC. Creating: being created. Created: created. Available: available.
    update_time str
    Time when the VPC was updated.
    user_cidr_blocks Sequence[str]
    User CIDR block of the VPC.
    vpc_id str
    ID of the VPC.
    accountId String
    ID of the account to which the VPC belongs.
    associateCens List<Property Map>
    creationTime String
    Time when the VPC was created.
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    networkAclNum String
    Number of network ACLs in the VPC.
    routeTableIds List<String>
    ID of the route table associated with the VPC.
    securityGroupIds List<String>
    List of security groups in the VPC.
    status String
    Status of the VPC. Creating: being created. Created: created. Available: available.
    updateTime String
    Time when the VPC was updated.
    userCidrBlocks List<String>
    User CIDR block of the VPC.
    vpcId String
    ID of the VPC.

    Look up Existing Vpc Resource

    Get an existing Vpc resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VpcState, opts?: CustomResourceOptions): Vpc
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            associate_cens: Optional[Sequence[VpcAssociateCenArgs]] = None,
            cidr_block: Optional[str] = None,
            creation_time: Optional[str] = None,
            description: Optional[str] = None,
            dns_servers: Optional[Sequence[str]] = None,
            enable_ipv6: Optional[bool] = None,
            ipv4_gateway_id: Optional[str] = None,
            ipv6_cidr_block: Optional[str] = None,
            is_default: Optional[bool] = None,
            nat_gateway_ids: Optional[Sequence[str]] = None,
            network_acl_num: Optional[str] = None,
            project_name: Optional[str] = None,
            route_table_ids: Optional[Sequence[str]] = None,
            secondary_cidr_blocks: Optional[Sequence[str]] = None,
            security_group_ids: Optional[Sequence[str]] = None,
            status: Optional[str] = None,
            subnet_ids: Optional[Sequence[str]] = None,
            support_ipv4_gateway: Optional[bool] = None,
            tags: Optional[Sequence[VpcTagArgs]] = None,
            update_time: Optional[str] = None,
            user_cidr_blocks: Optional[Sequence[str]] = None,
            vpc_id: Optional[str] = None,
            vpc_name: Optional[str] = None) -> Vpc
    func GetVpc(ctx *Context, name string, id IDInput, state *VpcState, opts ...ResourceOption) (*Vpc, error)
    public static Vpc Get(string name, Input<string> id, VpcState? state, CustomResourceOptions? opts = null)
    public static Vpc get(String name, Output<String> id, VpcState state, CustomResourceOptions options)
    resources:  _:    type: volcenginecc:vpc:Vpc    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    ID of the account to which the VPC belongs.
    AssociateCens List<Volcengine.VpcAssociateCen>
    CidrBlock string
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    CreationTime string
    Time when the VPC was created.
    Description string
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    DnsServers List<string>
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    EnableIpv6 bool
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    Ipv4GatewayId string
    ID of the IPv4 gateway bound to the VPC.
    Ipv6CidrBlock string
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    IsDefault bool
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    NatGatewayIds List<string>
    ID of the NAT gateway created in the VPC.
    NetworkAclNum string
    Number of network ACLs in the VPC.
    ProjectName string
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    RouteTableIds List<string>
    ID of the route table associated with the VPC.
    SecondaryCidrBlocks List<string>
    Secondary CIDR block of the VPC.
    SecurityGroupIds List<string>
    List of security groups in the VPC.
    Status string
    Status of the VPC. Creating: being created. Created: created. Available: available.
    SubnetIds List<string>
    List of subnets in the VPC.
    SupportIpv4Gateway bool
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    Tags List<Volcengine.VpcTag>
    UpdateTime string
    Time when the VPC was updated.
    UserCidrBlocks List<string>
    User CIDR block of the VPC.
    VpcId string
    ID of the VPC.
    VpcName string
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
    AccountId string
    ID of the account to which the VPC belongs.
    AssociateCens []VpcAssociateCenArgs
    CidrBlock string
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    CreationTime string
    Time when the VPC was created.
    Description string
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    DnsServers []string
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    EnableIpv6 bool
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    Ipv4GatewayId string
    ID of the IPv4 gateway bound to the VPC.
    Ipv6CidrBlock string
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    IsDefault bool
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    NatGatewayIds []string
    ID of the NAT gateway created in the VPC.
    NetworkAclNum string
    Number of network ACLs in the VPC.
    ProjectName string
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    RouteTableIds []string
    ID of the route table associated with the VPC.
    SecondaryCidrBlocks []string
    Secondary CIDR block of the VPC.
    SecurityGroupIds []string
    List of security groups in the VPC.
    Status string
    Status of the VPC. Creating: being created. Created: created. Available: available.
    SubnetIds []string
    List of subnets in the VPC.
    SupportIpv4Gateway bool
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    Tags []VpcTagArgs
    UpdateTime string
    Time when the VPC was updated.
    UserCidrBlocks []string
    User CIDR block of the VPC.
    VpcId string
    ID of the VPC.
    VpcName string
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
    accountId String
    ID of the account to which the VPC belongs.
    associateCens List<VpcAssociateCen>
    cidrBlock String
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    creationTime String
    Time when the VPC was created.
    description String
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    dnsServers List<String>
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    enableIpv6 Boolean
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    ipv4GatewayId String
    ID of the IPv4 gateway bound to the VPC.
    ipv6CidrBlock String
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    isDefault Boolean
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    natGatewayIds List<String>
    ID of the NAT gateway created in the VPC.
    networkAclNum String
    Number of network ACLs in the VPC.
    projectName String
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    routeTableIds List<String>
    ID of the route table associated with the VPC.
    secondaryCidrBlocks List<String>
    Secondary CIDR block of the VPC.
    securityGroupIds List<String>
    List of security groups in the VPC.
    status String
    Status of the VPC. Creating: being created. Created: created. Available: available.
    subnetIds List<String>
    List of subnets in the VPC.
    supportIpv4Gateway Boolean
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    tags List<VpcTag>
    updateTime String
    Time when the VPC was updated.
    userCidrBlocks List<String>
    User CIDR block of the VPC.
    vpcId String
    ID of the VPC.
    vpcName String
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
    accountId string
    ID of the account to which the VPC belongs.
    associateCens VpcAssociateCen[]
    cidrBlock string
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    creationTime string
    Time when the VPC was created.
    description string
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    dnsServers string[]
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    enableIpv6 boolean
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    ipv4GatewayId string
    ID of the IPv4 gateway bound to the VPC.
    ipv6CidrBlock string
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    isDefault boolean
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    natGatewayIds string[]
    ID of the NAT gateway created in the VPC.
    networkAclNum string
    Number of network ACLs in the VPC.
    projectName string
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    routeTableIds string[]
    ID of the route table associated with the VPC.
    secondaryCidrBlocks string[]
    Secondary CIDR block of the VPC.
    securityGroupIds string[]
    List of security groups in the VPC.
    status string
    Status of the VPC. Creating: being created. Created: created. Available: available.
    subnetIds string[]
    List of subnets in the VPC.
    supportIpv4Gateway boolean
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    tags VpcTag[]
    updateTime string
    Time when the VPC was updated.
    userCidrBlocks string[]
    User CIDR block of the VPC.
    vpcId string
    ID of the VPC.
    vpcName string
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
    account_id str
    ID of the account to which the VPC belongs.
    associate_cens Sequence[VpcAssociateCenArgs]
    cidr_block str
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    creation_time str
    Time when the VPC was created.
    description str
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    dns_servers Sequence[str]
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    enable_ipv6 bool
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    ipv4_gateway_id str
    ID of the IPv4 gateway bound to the VPC.
    ipv6_cidr_block str
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    is_default bool
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    nat_gateway_ids Sequence[str]
    ID of the NAT gateway created in the VPC.
    network_acl_num str
    Number of network ACLs in the VPC.
    project_name str
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    route_table_ids Sequence[str]
    ID of the route table associated with the VPC.
    secondary_cidr_blocks Sequence[str]
    Secondary CIDR block of the VPC.
    security_group_ids Sequence[str]
    List of security groups in the VPC.
    status str
    Status of the VPC. Creating: being created. Created: created. Available: available.
    subnet_ids Sequence[str]
    List of subnets in the VPC.
    support_ipv4_gateway bool
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    tags Sequence[VpcTagArgs]
    update_time str
    Time when the VPC was updated.
    user_cidr_blocks Sequence[str]
    User CIDR block of the VPC.
    vpc_id str
    ID of the VPC.
    vpc_name str
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.
    accountId String
    ID of the account to which the VPC belongs.
    associateCens List<Property Map>
    cidrBlock String
    IPv4 CIDR block of the VPC. You can use the following CIDR blocks or their subsets as the VPC's IPv4 CIDR block: 192.168.0.0/16 ~ 24, 10.0.0.0/8 ~ 24, 172.16.0.0/12 ~ 24.
    creationTime String
    Time when the VPC was created.
    description String
    Description of the VPC. Length must be between 0 and 255 characters. If not specified, defaults to an empty string. Must start with a letter, Chinese character, or number. Can include English commas (,), periods (.), underscores (_), spaces ( ), equals signs (=), hyphens (-), Chinese commas (,), and Chinese periods (。). Cannot start with http:// or https://.
    dnsServers List<String>
    DNS server addresses of the VPC. Maximum of 5 per request. Each DnsServer must be a valid IP address. Use & to separate multiple IPs. If not specified, defaults to the system DNS server addresses.
    enableIpv6 Boolean
    Whether to enable IPv6 CIDR block. false (default): not enabled. true: enabled.
    ipv4GatewayId String
    ID of the IPv4 gateway bound to the VPC.
    ipv6CidrBlock String
    IPv6 CIDR block of the VPC. If this parameter is provided, the Ipv6MaskLen parameter is ignored. If the Ipv6Isp parameter is set to a value other than BGP, either the Ipv6MaskLen or Ipv6CidrBlock parameter must be provided. If the Ipv6Isp parameter is not provided or set to BGP and this parameter is not provided, the system automatically assigns an IPv6 CIDR block.
    isDefault Boolean
    Whether this VPC is the default VPC. true: default VPC, meaning the VPC was automatically created by the system when creating an ECS instance. false: non-default VPC, meaning the VPC was manually created by the user.
    natGatewayIds List<String>
    ID of the NAT gateway created in the VPC.
    networkAclNum String
    Number of network ACLs in the VPC.
    projectName String
    Name of the project to which the VPC belongs. If not specified, it is added to the default project.
    routeTableIds List<String>
    ID of the route table associated with the VPC.
    secondaryCidrBlocks List<String>
    Secondary CIDR block of the VPC.
    securityGroupIds List<String>
    List of security groups in the VPC.
    status String
    Status of the VPC. Creating: being created. Created: created. Available: available.
    subnetIds List<String>
    List of subnets in the VPC.
    supportIpv4Gateway Boolean
    Whether the VPC enables the IPv4 gateway. false (default): not enabled. true: enabled.
    tags List<Property Map>
    updateTime String
    Time when the VPC was updated.
    userCidrBlocks List<String>
    User CIDR block of the VPC.
    vpcId String
    ID of the VPC.
    vpcName String
    Name of the VPC. Length must be between 1 and 128 characters. Must start with a letter, Chinese character, or number, and can include periods (.), underscores (_), and hyphens (-). If not specified, defaults to the VPC instance ID. Cannot start with http:// or https://.

    Supporting Types

    VpcAssociateCen, VpcAssociateCenArgs

    CenId string
    ID of the CEN.
    CenOwnerId string
    User ID of the CEN.
    CenStatus string
    Status of the VPC in the CEN. Loading: loading, Loaded: loaded
    CenId string
    ID of the CEN.
    CenOwnerId string
    User ID of the CEN.
    CenStatus string
    Status of the VPC in the CEN. Loading: loading, Loaded: loaded
    cenId String
    ID of the CEN.
    cenOwnerId String
    User ID of the CEN.
    cenStatus String
    Status of the VPC in the CEN. Loading: loading, Loaded: loaded
    cenId string
    ID of the CEN.
    cenOwnerId string
    User ID of the CEN.
    cenStatus string
    Status of the VPC in the CEN. Loading: loading, Loaded: loaded
    cen_id str
    ID of the CEN.
    cen_owner_id str
    User ID of the CEN.
    cen_status str
    Status of the VPC in the CEN. Loading: loading, Loaded: loaded
    cenId String
    ID of the CEN.
    cenOwnerId String
    User ID of the CEN.
    cenStatus String
    Status of the VPC in the CEN. Loading: loading, Loaded: loaded

    VpcTag, VpcTagArgs

    Key string
    Tag key.
    Value string
    Tag value.
    Key string
    Tag key.
    Value string
    Tag value.
    key String
    Tag key.
    value String
    Tag value.
    key string
    Tag key.
    value string
    Tag value.
    key str
    Tag key.
    value str
    Tag value.
    key String
    Tag key.
    value String
    Tag value.

    Import

    $ pulumi import volcenginecc:vpc/vpc:Vpc example "vpc_id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcenginecc volcengine/pulumi-volcenginecc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the volcenginecc Terraform Provider.
    volcenginecc logo
    Viewing docs for volcenginecc v0.0.32
    published on Thursday, Apr 23, 2026 by Volcengine
      Try Pulumi Cloud free. Your team will thank you.