1. Packages
  2. Volcenginecc Provider
  3. API Docs
  4. vpc
  5. Vpc
volcenginecc v0.0.2 published on Saturday, Oct 11, 2025 by Volcengine

volcenginecc.vpc.Vpc

Deploy with Pulumi
volcenginecc logo
volcenginecc v0.0.2 published on Saturday, Oct 11, 2025 by Volcengine

    私有网络为云上资源构建隔离的、自主配置的虚拟网络环境。可以在私有网络中自定义IP地址段、安全组、路由策略等网络特性,简单高效安全地管理云上资源。

    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
          enableIpv6: false
          vpcName: vpc-demo
          description: VpcDemo Example
          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,
            associate_cens: Optional[Sequence[VpcAssociateCenArgs]] = None,
            cidr_block: Optional[str] = None,
            description: Optional[str] = None,
            dns_servers: Optional[Sequence[str]] = 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,
            route_table_ids: Optional[Sequence[str]] = None,
            secondary_cidr_blocks: Optional[Sequence[str]] = None,
            security_group_ids: Optional[Sequence[str]] = None,
            subnet_ids: Optional[Sequence[str]] = None,
            support_ipv4_gateway: Optional[bool] = None,
            tags: Optional[Sequence[VpcTagArgs]] = None,
            user_cidr_blocks: Optional[Sequence[str]] = 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()
    {
        AssociateCens = new[]
        {
            new Volcenginecc.Vpc.Inputs.VpcAssociateCenArgs
            {
                CenId = "string",
                CenOwnerId = "string",
                CenStatus = "string",
            },
        },
        CidrBlock = "string",
        Description = "string",
        DnsServers = new[]
        {
            "string",
        },
        Ipv4GatewayId = "string",
        Ipv6CidrBlock = "string",
        NatGatewayIds = new[]
        {
            "string",
        },
        ProjectName = "string",
        RouteTableIds = new[]
        {
            "string",
        },
        SecondaryCidrBlocks = new[]
        {
            "string",
        },
        SecurityGroupIds = new[]
        {
            "string",
        },
        SubnetIds = new[]
        {
            "string",
        },
        SupportIpv4Gateway = false,
        Tags = new[]
        {
            new Volcenginecc.Vpc.Inputs.VpcTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        UserCidrBlocks = new[]
        {
            "string",
        },
        VpcName = "string",
    });
    
    example, err := vpc.NewVpc(ctx, "vpcResource", &vpc.VpcArgs{
    	AssociateCens: vpc.VpcAssociateCenArray{
    		&vpc.VpcAssociateCenArgs{
    			CenId:      pulumi.String("string"),
    			CenOwnerId: pulumi.String("string"),
    			CenStatus:  pulumi.String("string"),
    		},
    	},
    	CidrBlock:   pulumi.String("string"),
    	Description: pulumi.String("string"),
    	DnsServers: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Ipv4GatewayId: pulumi.String("string"),
    	Ipv6CidrBlock: pulumi.String("string"),
    	NatGatewayIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ProjectName: pulumi.String("string"),
    	RouteTableIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SecondaryCidrBlocks: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SecurityGroupIds: 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"),
    		},
    	},
    	UserCidrBlocks: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	VpcName: pulumi.String("string"),
    })
    
    var vpcResource = new Vpc("vpcResource", VpcArgs.builder()
        .associateCens(VpcAssociateCenArgs.builder()
            .cenId("string")
            .cenOwnerId("string")
            .cenStatus("string")
            .build())
        .cidrBlock("string")
        .description("string")
        .dnsServers("string")
        .ipv4GatewayId("string")
        .ipv6CidrBlock("string")
        .natGatewayIds("string")
        .projectName("string")
        .routeTableIds("string")
        .secondaryCidrBlocks("string")
        .securityGroupIds("string")
        .subnetIds("string")
        .supportIpv4Gateway(false)
        .tags(VpcTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .userCidrBlocks("string")
        .vpcName("string")
        .build());
    
    vpc_resource = volcenginecc.vpc.Vpc("vpcResource",
        associate_cens=[{
            "cen_id": "string",
            "cen_owner_id": "string",
            "cen_status": "string",
        }],
        cidr_block="string",
        description="string",
        dns_servers=["string"],
        ipv4_gateway_id="string",
        ipv6_cidr_block="string",
        nat_gateway_ids=["string"],
        project_name="string",
        route_table_ids=["string"],
        secondary_cidr_blocks=["string"],
        security_group_ids=["string"],
        subnet_ids=["string"],
        support_ipv4_gateway=False,
        tags=[{
            "key": "string",
            "value": "string",
        }],
        user_cidr_blocks=["string"],
        vpc_name="string")
    
    const vpcResource = new volcenginecc.vpc.Vpc("vpcResource", {
        associateCens: [{
            cenId: "string",
            cenOwnerId: "string",
            cenStatus: "string",
        }],
        cidrBlock: "string",
        description: "string",
        dnsServers: ["string"],
        ipv4GatewayId: "string",
        ipv6CidrBlock: "string",
        natGatewayIds: ["string"],
        projectName: "string",
        routeTableIds: ["string"],
        secondaryCidrBlocks: ["string"],
        securityGroupIds: ["string"],
        subnetIds: ["string"],
        supportIpv4Gateway: false,
        tags: [{
            key: "string",
            value: "string",
        }],
        userCidrBlocks: ["string"],
        vpcName: "string",
    });
    
    type: volcenginecc:vpc:Vpc
    properties:
        associateCens:
            - cenId: string
              cenOwnerId: string
              cenStatus: string
        cidrBlock: string
        description: string
        dnsServers:
            - string
        ipv4GatewayId: string
        ipv6CidrBlock: string
        natGatewayIds:
            - string
        projectName: string
        routeTableIds:
            - string
        secondaryCidrBlocks:
            - string
        securityGroupIds:
            - string
        subnetIds:
            - string
        supportIpv4Gateway: false
        tags:
            - key: string
              value: string
        userCidrBlocks:
            - 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:

    AssociateCens List<Volcengine.VpcAssociateCen>
    CidrBlock string
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    Description string
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    DnsServers List<string>
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    Ipv4GatewayId string
    VPC 绑定的 IPv4 网关的 ID。
    Ipv6CidrBlock string
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    NatGatewayIds List<string>
    VPC中创建的NAT网关的ID。
    ProjectName string
    VPC所属项目的名称。不填默认加入default项目。
    RouteTableIds List<string>
    VPC关联的路由表ID。
    SecondaryCidrBlocks List<string>
    VPC的辅助网段。
    SecurityGroupIds List<string>
    VPC中安全组的列表。
    SubnetIds List<string>
    VPC中子网的列表。
    SupportIpv4Gateway bool
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    Tags List<Volcengine.VpcTag>
    UserCidrBlocks List<string>
    VPC的用户网段。
    VpcName string
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
    AssociateCens []VpcAssociateCenArgs
    CidrBlock string
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    Description string
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    DnsServers []string
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    Ipv4GatewayId string
    VPC 绑定的 IPv4 网关的 ID。
    Ipv6CidrBlock string
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    NatGatewayIds []string
    VPC中创建的NAT网关的ID。
    ProjectName string
    VPC所属项目的名称。不填默认加入default项目。
    RouteTableIds []string
    VPC关联的路由表ID。
    SecondaryCidrBlocks []string
    VPC的辅助网段。
    SecurityGroupIds []string
    VPC中安全组的列表。
    SubnetIds []string
    VPC中子网的列表。
    SupportIpv4Gateway bool
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    Tags []VpcTagArgs
    UserCidrBlocks []string
    VPC的用户网段。
    VpcName string
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
    associateCens List<VpcAssociateCen>
    cidrBlock String
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    description String
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    dnsServers List<String>
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    ipv4GatewayId String
    VPC 绑定的 IPv4 网关的 ID。
    ipv6CidrBlock String
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    natGatewayIds List<String>
    VPC中创建的NAT网关的ID。
    projectName String
    VPC所属项目的名称。不填默认加入default项目。
    routeTableIds List<String>
    VPC关联的路由表ID。
    secondaryCidrBlocks List<String>
    VPC的辅助网段。
    securityGroupIds List<String>
    VPC中安全组的列表。
    subnetIds List<String>
    VPC中子网的列表。
    supportIpv4Gateway Boolean
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    tags List<VpcTag>
    userCidrBlocks List<String>
    VPC的用户网段。
    vpcName String
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
    associateCens VpcAssociateCen[]
    cidrBlock string
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    description string
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    dnsServers string[]
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    ipv4GatewayId string
    VPC 绑定的 IPv4 网关的 ID。
    ipv6CidrBlock string
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    natGatewayIds string[]
    VPC中创建的NAT网关的ID。
    projectName string
    VPC所属项目的名称。不填默认加入default项目。
    routeTableIds string[]
    VPC关联的路由表ID。
    secondaryCidrBlocks string[]
    VPC的辅助网段。
    securityGroupIds string[]
    VPC中安全组的列表。
    subnetIds string[]
    VPC中子网的列表。
    supportIpv4Gateway boolean
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    tags VpcTag[]
    userCidrBlocks string[]
    VPC的用户网段。
    vpcName string
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
    associate_cens Sequence[VpcAssociateCenArgs]
    cidr_block str
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    description str
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    dns_servers Sequence[str]
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    ipv4_gateway_id str
    VPC 绑定的 IPv4 网关的 ID。
    ipv6_cidr_block str
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    nat_gateway_ids Sequence[str]
    VPC中创建的NAT网关的ID。
    project_name str
    VPC所属项目的名称。不填默认加入default项目。
    route_table_ids Sequence[str]
    VPC关联的路由表ID。
    secondary_cidr_blocks Sequence[str]
    VPC的辅助网段。
    security_group_ids Sequence[str]
    VPC中安全组的列表。
    subnet_ids Sequence[str]
    VPC中子网的列表。
    support_ipv4_gateway bool
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    tags Sequence[VpcTagArgs]
    user_cidr_blocks Sequence[str]
    VPC的用户网段。
    vpc_name str
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
    associateCens List<Property Map>
    cidrBlock String
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    description String
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    dnsServers List<String>
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    ipv4GatewayId String
    VPC 绑定的 IPv4 网关的 ID。
    ipv6CidrBlock String
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    natGatewayIds List<String>
    VPC中创建的NAT网关的ID。
    projectName String
    VPC所属项目的名称。不填默认加入default项目。
    routeTableIds List<String>
    VPC关联的路由表ID。
    secondaryCidrBlocks List<String>
    VPC的辅助网段。
    securityGroupIds List<String>
    VPC中安全组的列表。
    subnetIds List<String>
    VPC中子网的列表。
    supportIpv4Gateway Boolean
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    tags List<Property Map>
    userCidrBlocks List<String>
    VPC的用户网段。
    vpcName String
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。

    Outputs

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

    AccountId string
    VPC所属账号的ID。
    CreationTime string
    创建VPC的时间。
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    NetworkAclNum string
    VPC中的网络ACL的数量。
    Status string
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    UpdateTime string
    更新VPC的时间。
    VpcId string
    VPC的ID。
    AccountId string
    VPC所属账号的ID。
    CreationTime string
    创建VPC的时间。
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    NetworkAclNum string
    VPC中的网络ACL的数量。
    Status string
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    UpdateTime string
    更新VPC的时间。
    VpcId string
    VPC的ID。
    accountId String
    VPC所属账号的ID。
    creationTime String
    创建VPC的时间。
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    networkAclNum String
    VPC中的网络ACL的数量。
    status String
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    updateTime String
    更新VPC的时间。
    vpcId String
    VPC的ID。
    accountId string
    VPC所属账号的ID。
    creationTime string
    创建VPC的时间。
    id string
    The provider-assigned unique ID for this managed resource.
    isDefault boolean
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    networkAclNum string
    VPC中的网络ACL的数量。
    status string
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    updateTime string
    更新VPC的时间。
    vpcId string
    VPC的ID。
    account_id str
    VPC所属账号的ID。
    creation_time str
    创建VPC的时间。
    id str
    The provider-assigned unique ID for this managed resource.
    is_default bool
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    network_acl_num str
    VPC中的网络ACL的数量。
    status str
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    update_time str
    更新VPC的时间。
    vpc_id str
    VPC的ID。
    accountId String
    VPC所属账号的ID。
    creationTime String
    创建VPC的时间。
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    networkAclNum String
    VPC中的网络ACL的数量。
    status String
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    updateTime String
    更新VPC的时间。
    vpcId String
    VPC的ID。

    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,
            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
    VPC所属账号的ID。
    AssociateCens List<Volcengine.VpcAssociateCen>
    CidrBlock string
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    CreationTime string
    创建VPC的时间。
    Description string
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    DnsServers List<string>
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    Ipv4GatewayId string
    VPC 绑定的 IPv4 网关的 ID。
    Ipv6CidrBlock string
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    IsDefault bool
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    NatGatewayIds List<string>
    VPC中创建的NAT网关的ID。
    NetworkAclNum string
    VPC中的网络ACL的数量。
    ProjectName string
    VPC所属项目的名称。不填默认加入default项目。
    RouteTableIds List<string>
    VPC关联的路由表ID。
    SecondaryCidrBlocks List<string>
    VPC的辅助网段。
    SecurityGroupIds List<string>
    VPC中安全组的列表。
    Status string
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    SubnetIds List<string>
    VPC中子网的列表。
    SupportIpv4Gateway bool
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    Tags List<Volcengine.VpcTag>
    UpdateTime string
    更新VPC的时间。
    UserCidrBlocks List<string>
    VPC的用户网段。
    VpcId string
    VPC的ID。
    VpcName string
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
    AccountId string
    VPC所属账号的ID。
    AssociateCens []VpcAssociateCenArgs
    CidrBlock string
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    CreationTime string
    创建VPC的时间。
    Description string
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    DnsServers []string
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    Ipv4GatewayId string
    VPC 绑定的 IPv4 网关的 ID。
    Ipv6CidrBlock string
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    IsDefault bool
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    NatGatewayIds []string
    VPC中创建的NAT网关的ID。
    NetworkAclNum string
    VPC中的网络ACL的数量。
    ProjectName string
    VPC所属项目的名称。不填默认加入default项目。
    RouteTableIds []string
    VPC关联的路由表ID。
    SecondaryCidrBlocks []string
    VPC的辅助网段。
    SecurityGroupIds []string
    VPC中安全组的列表。
    Status string
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    SubnetIds []string
    VPC中子网的列表。
    SupportIpv4Gateway bool
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    Tags []VpcTagArgs
    UpdateTime string
    更新VPC的时间。
    UserCidrBlocks []string
    VPC的用户网段。
    VpcId string
    VPC的ID。
    VpcName string
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
    accountId String
    VPC所属账号的ID。
    associateCens List<VpcAssociateCen>
    cidrBlock String
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    creationTime String
    创建VPC的时间。
    description String
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    dnsServers List<String>
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    ipv4GatewayId String
    VPC 绑定的 IPv4 网关的 ID。
    ipv6CidrBlock String
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    isDefault Boolean
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    natGatewayIds List<String>
    VPC中创建的NAT网关的ID。
    networkAclNum String
    VPC中的网络ACL的数量。
    projectName String
    VPC所属项目的名称。不填默认加入default项目。
    routeTableIds List<String>
    VPC关联的路由表ID。
    secondaryCidrBlocks List<String>
    VPC的辅助网段。
    securityGroupIds List<String>
    VPC中安全组的列表。
    status String
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    subnetIds List<String>
    VPC中子网的列表。
    supportIpv4Gateway Boolean
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    tags List<VpcTag>
    updateTime String
    更新VPC的时间。
    userCidrBlocks List<String>
    VPC的用户网段。
    vpcId String
    VPC的ID。
    vpcName String
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
    accountId string
    VPC所属账号的ID。
    associateCens VpcAssociateCen[]
    cidrBlock string
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    creationTime string
    创建VPC的时间。
    description string
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    dnsServers string[]
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    ipv4GatewayId string
    VPC 绑定的 IPv4 网关的 ID。
    ipv6CidrBlock string
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    isDefault boolean
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    natGatewayIds string[]
    VPC中创建的NAT网关的ID。
    networkAclNum string
    VPC中的网络ACL的数量。
    projectName string
    VPC所属项目的名称。不填默认加入default项目。
    routeTableIds string[]
    VPC关联的路由表ID。
    secondaryCidrBlocks string[]
    VPC的辅助网段。
    securityGroupIds string[]
    VPC中安全组的列表。
    status string
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    subnetIds string[]
    VPC中子网的列表。
    supportIpv4Gateway boolean
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    tags VpcTag[]
    updateTime string
    更新VPC的时间。
    userCidrBlocks string[]
    VPC的用户网段。
    vpcId string
    VPC的ID。
    vpcName string
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
    account_id str
    VPC所属账号的ID。
    associate_cens Sequence[VpcAssociateCenArgs]
    cidr_block str
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    creation_time str
    创建VPC的时间。
    description str
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    dns_servers Sequence[str]
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    ipv4_gateway_id str
    VPC 绑定的 IPv4 网关的 ID。
    ipv6_cidr_block str
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    is_default bool
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    nat_gateway_ids Sequence[str]
    VPC中创建的NAT网关的ID。
    network_acl_num str
    VPC中的网络ACL的数量。
    project_name str
    VPC所属项目的名称。不填默认加入default项目。
    route_table_ids Sequence[str]
    VPC关联的路由表ID。
    secondary_cidr_blocks Sequence[str]
    VPC的辅助网段。
    security_group_ids Sequence[str]
    VPC中安全组的列表。
    status str
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    subnet_ids Sequence[str]
    VPC中子网的列表。
    support_ipv4_gateway bool
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    tags Sequence[VpcTagArgs]
    update_time str
    更新VPC的时间。
    user_cidr_blocks Sequence[str]
    VPC的用户网段。
    vpc_id str
    VPC的ID。
    vpc_name str
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
    accountId String
    VPC所属账号的ID。
    associateCens List<Property Map>
    cidrBlock String
    VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
    creationTime String
    创建VPC的时间。
    description String
    VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
    dnsServers List<String>
    VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
    ipv4GatewayId String
    VPC 绑定的 IPv4 网关的 ID。
    ipv6CidrBlock String
    VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
    isDefault Boolean
    该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
    natGatewayIds List<String>
    VPC中创建的NAT网关的ID。
    networkAclNum String
    VPC中的网络ACL的数量。
    projectName String
    VPC所属项目的名称。不填默认加入default项目。
    routeTableIds List<String>
    VPC关联的路由表ID。
    secondaryCidrBlocks List<String>
    VPC的辅助网段。
    securityGroupIds List<String>
    VPC中安全组的列表。
    status String
    VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
    subnetIds List<String>
    VPC中子网的列表。
    supportIpv4Gateway Boolean
    VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
    tags List<Property Map>
    updateTime String
    更新VPC的时间。
    userCidrBlocks List<String>
    VPC的用户网段。
    vpcId String
    VPC的ID。
    vpcName String
    VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。

    Supporting Types

    VpcAssociateCen, VpcAssociateCenArgs

    CenId string
    CEN的ID。
    CenOwnerId string
    CEN的用户ID。
    CenStatus string
    VPC在CEN中的状态。Attaching:加载中,Attached:已加载
    CenId string
    CEN的ID。
    CenOwnerId string
    CEN的用户ID。
    CenStatus string
    VPC在CEN中的状态。Attaching:加载中,Attached:已加载
    cenId String
    CEN的ID。
    cenOwnerId String
    CEN的用户ID。
    cenStatus String
    VPC在CEN中的状态。Attaching:加载中,Attached:已加载
    cenId string
    CEN的ID。
    cenOwnerId string
    CEN的用户ID。
    cenStatus string
    VPC在CEN中的状态。Attaching:加载中,Attached:已加载
    cen_id str
    CEN的ID。
    cen_owner_id str
    CEN的用户ID。
    cen_status str
    VPC在CEN中的状态。Attaching:加载中,Attached:已加载
    cenId String
    CEN的ID。
    cenOwnerId String
    CEN的用户ID。
    cenStatus String
    VPC在CEN中的状态。Attaching:加载中,Attached:已加载

    VpcTag, VpcTagArgs

    Key string
    标签键。
    Value string
    标签值。
    Key string
    标签键。
    Value string
    标签值。
    key String
    标签键。
    value String
    标签值。
    key string
    标签键。
    value string
    标签值。
    key str
    标签键。
    value str
    标签值。
    key String
    标签键。
    value String
    标签值。

    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
    volcenginecc v0.0.2 published on Saturday, Oct 11, 2025 by Volcengine
      Meet Neo: Your AI Platform Teammate