volcenginecc.vpc.Vpc
私有网络为云上资源构建隔离的、自主配置的虚拟网络环境。可以在私有网络中自定义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)
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:
- Associate
Cens List<Volcengine.Vpc Associate Cen> - Cidr
Block 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://开头。
- Dns
Servers List<string> - VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
- Ipv4Gateway
Id string - VPC 绑定的 IPv4 网关的 ID。
- Ipv6Cidr
Block string - VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
- Nat
Gateway List<string>Ids - VPC中创建的NAT网关的ID。
- Project
Name string - VPC所属项目的名称。不填默认加入default项目。
- Route
Table List<string>Ids - VPC关联的路由表ID。
- Secondary
Cidr List<string>Blocks - VPC的辅助网段。
- Security
Group List<string>Ids - VPC中安全组的列表。
- Subnet
Ids List<string> - VPC中子网的列表。
- Support
Ipv4Gateway bool - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- List<Volcengine.
Vpc Tag> - User
Cidr List<string>Blocks - VPC的用户网段。
- Vpc
Name string - VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
- Associate
Cens []VpcAssociate Cen Args - Cidr
Block 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://开头。
- Dns
Servers []string - VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
- Ipv4Gateway
Id string - VPC 绑定的 IPv4 网关的 ID。
- Ipv6Cidr
Block string - VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
- Nat
Gateway []stringIds - VPC中创建的NAT网关的ID。
- Project
Name string - VPC所属项目的名称。不填默认加入default项目。
- Route
Table []stringIds - VPC关联的路由表ID。
- Secondary
Cidr []stringBlocks - VPC的辅助网段。
- Security
Group []stringIds - VPC中安全组的列表。
- Subnet
Ids []string - VPC中子网的列表。
- Support
Ipv4Gateway bool - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- []Vpc
Tag Args - User
Cidr []stringBlocks - VPC的用户网段。
- Vpc
Name string - VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
- associate
Cens List<VpcAssociate Cen> - cidr
Block 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://开头。
- dns
Servers List<String> - VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
- ipv4Gateway
Id String - VPC 绑定的 IPv4 网关的 ID。
- ipv6Cidr
Block String - VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
- nat
Gateway List<String>Ids - VPC中创建的NAT网关的ID。
- project
Name String - VPC所属项目的名称。不填默认加入default项目。
- route
Table List<String>Ids - VPC关联的路由表ID。
- secondary
Cidr List<String>Blocks - VPC的辅助网段。
- security
Group List<String>Ids - VPC中安全组的列表。
- subnet
Ids List<String> - VPC中子网的列表。
- support
Ipv4Gateway Boolean - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- List<Vpc
Tag> - user
Cidr List<String>Blocks - VPC的用户网段。
- vpc
Name String - VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
- associate
Cens VpcAssociate Cen[] - cidr
Block 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://开头。
- dns
Servers string[] - VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
- ipv4Gateway
Id string - VPC 绑定的 IPv4 网关的 ID。
- ipv6Cidr
Block string - VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
- nat
Gateway string[]Ids - VPC中创建的NAT网关的ID。
- project
Name string - VPC所属项目的名称。不填默认加入default项目。
- route
Table string[]Ids - VPC关联的路由表ID。
- secondary
Cidr string[]Blocks - VPC的辅助网段。
- security
Group string[]Ids - VPC中安全组的列表。
- subnet
Ids string[] - VPC中子网的列表。
- support
Ipv4Gateway boolean - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- Vpc
Tag[] - user
Cidr string[]Blocks - VPC的用户网段。
- vpc
Name string - VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
- associate_
cens Sequence[VpcAssociate Cen Args] - 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_ strid - VPC 绑定的 IPv4 网关的 ID。
- ipv6_
cidr_ strblock - VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
- nat_
gateway_ Sequence[str]ids - VPC中创建的NAT网关的ID。
- project_
name str - VPC所属项目的名称。不填默认加入default项目。
- route_
table_ Sequence[str]ids - VPC关联的路由表ID。
- secondary_
cidr_ Sequence[str]blocks - VPC的辅助网段。
- security_
group_ Sequence[str]ids - VPC中安全组的列表。
- subnet_
ids Sequence[str] - VPC中子网的列表。
- support_
ipv4_ boolgateway - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- Sequence[Vpc
Tag Args] - user_
cidr_ Sequence[str]blocks - VPC的用户网段。
- vpc_
name str - VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
- associate
Cens List<Property Map> - cidr
Block 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://开头。
- dns
Servers List<String> - VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
- ipv4Gateway
Id String - VPC 绑定的 IPv4 网关的 ID。
- ipv6Cidr
Block String - VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
- nat
Gateway List<String>Ids - VPC中创建的NAT网关的ID。
- project
Name String - VPC所属项目的名称。不填默认加入default项目。
- route
Table List<String>Ids - VPC关联的路由表ID。
- secondary
Cidr List<String>Blocks - VPC的辅助网段。
- security
Group List<String>Ids - VPC中安全组的列表。
- subnet
Ids List<String> - VPC中子网的列表。
- support
Ipv4Gateway Boolean - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- List<Property Map>
- user
Cidr List<String>Blocks - VPC的用户网段。
- vpc
Name 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:
- Account
Id string - VPC所属账号的ID。
- Creation
Time string - 创建VPC的时间。
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - 该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
- Network
Acl stringNum - VPC中的网络ACL的数量。
- Status string
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- Update
Time string - 更新VPC的时间。
- Vpc
Id string - VPC的ID。
- Account
Id string - VPC所属账号的ID。
- Creation
Time string - 创建VPC的时间。
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Default bool - 该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
- Network
Acl stringNum - VPC中的网络ACL的数量。
- Status string
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- Update
Time string - 更新VPC的时间。
- Vpc
Id string - VPC的ID。
- account
Id String - VPC所属账号的ID。
- creation
Time String - 创建VPC的时间。
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - 该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
- network
Acl StringNum - VPC中的网络ACL的数量。
- status String
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- update
Time String - 更新VPC的时间。
- vpc
Id String - VPC的ID。
- account
Id string - VPC所属账号的ID。
- creation
Time string - 创建VPC的时间。
- id string
- The provider-assigned unique ID for this managed resource.
- is
Default boolean - 该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
- network
Acl stringNum - VPC中的网络ACL的数量。
- status string
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- update
Time string - 更新VPC的时间。
- vpc
Id 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_ strnum - VPC中的网络ACL的数量。
- status str
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- update_
time str - 更新VPC的时间。
- vpc_
id str - VPC的ID。
- account
Id String - VPC所属账号的ID。
- creation
Time String - 创建VPC的时间。
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - 该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
- network
Acl StringNum - VPC中的网络ACL的数量。
- status String
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- update
Time String - 更新VPC的时间。
- vpc
Id 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.
- Account
Id string - VPC所属账号的ID。
- Associate
Cens List<Volcengine.Vpc Associate Cen> - Cidr
Block string - VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
- Creation
Time string - 创建VPC的时间。
- Description string
- VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
- Dns
Servers List<string> - VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
- Ipv4Gateway
Id string - VPC 绑定的 IPv4 网关的 ID。
- Ipv6Cidr
Block string - 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 List<string>Ids - VPC中创建的NAT网关的ID。
- Network
Acl stringNum - VPC中的网络ACL的数量。
- Project
Name string - VPC所属项目的名称。不填默认加入default项目。
- Route
Table List<string>Ids - VPC关联的路由表ID。
- Secondary
Cidr List<string>Blocks - VPC的辅助网段。
- Security
Group List<string>Ids - VPC中安全组的列表。
- Status string
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- Subnet
Ids List<string> - VPC中子网的列表。
- Support
Ipv4Gateway bool - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- List<Volcengine.
Vpc Tag> - Update
Time string - 更新VPC的时间。
- User
Cidr List<string>Blocks - VPC的用户网段。
- Vpc
Id string - VPC的ID。
- Vpc
Name string - VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
- Account
Id string - VPC所属账号的ID。
- Associate
Cens []VpcAssociate Cen Args - Cidr
Block string - VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
- Creation
Time string - 创建VPC的时间。
- Description string
- VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
- Dns
Servers []string - VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
- Ipv4Gateway
Id string - VPC 绑定的 IPv4 网关的 ID。
- Ipv6Cidr
Block string - 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 []stringIds - VPC中创建的NAT网关的ID。
- Network
Acl stringNum - VPC中的网络ACL的数量。
- Project
Name string - VPC所属项目的名称。不填默认加入default项目。
- Route
Table []stringIds - VPC关联的路由表ID。
- Secondary
Cidr []stringBlocks - VPC的辅助网段。
- Security
Group []stringIds - VPC中安全组的列表。
- Status string
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- Subnet
Ids []string - VPC中子网的列表。
- Support
Ipv4Gateway bool - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- []Vpc
Tag Args - Update
Time string - 更新VPC的时间。
- User
Cidr []stringBlocks - VPC的用户网段。
- Vpc
Id string - VPC的ID。
- Vpc
Name string - VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
- account
Id String - VPC所属账号的ID。
- associate
Cens List<VpcAssociate Cen> - cidr
Block String - VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
- creation
Time String - 创建VPC的时间。
- description String
- VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
- dns
Servers List<String> - VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
- ipv4Gateway
Id String - VPC 绑定的 IPv4 网关的 ID。
- ipv6Cidr
Block String - VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
- is
Default Boolean - 该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
- nat
Gateway List<String>Ids - VPC中创建的NAT网关的ID。
- network
Acl StringNum - VPC中的网络ACL的数量。
- project
Name String - VPC所属项目的名称。不填默认加入default项目。
- route
Table List<String>Ids - VPC关联的路由表ID。
- secondary
Cidr List<String>Blocks - VPC的辅助网段。
- security
Group List<String>Ids - VPC中安全组的列表。
- status String
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- subnet
Ids List<String> - VPC中子网的列表。
- support
Ipv4Gateway Boolean - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- List<Vpc
Tag> - update
Time String - 更新VPC的时间。
- user
Cidr List<String>Blocks - VPC的用户网段。
- vpc
Id String - VPC的ID。
- vpc
Name String - VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
- account
Id string - VPC所属账号的ID。
- associate
Cens VpcAssociate Cen[] - cidr
Block string - VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
- creation
Time string - 创建VPC的时间。
- description string
- VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
- dns
Servers string[] - VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
- ipv4Gateway
Id string - VPC 绑定的 IPv4 网关的 ID。
- ipv6Cidr
Block string - VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
- is
Default boolean - 该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
- nat
Gateway string[]Ids - VPC中创建的NAT网关的ID。
- network
Acl stringNum - VPC中的网络ACL的数量。
- project
Name string - VPC所属项目的名称。不填默认加入default项目。
- route
Table string[]Ids - VPC关联的路由表ID。
- secondary
Cidr string[]Blocks - VPC的辅助网段。
- security
Group string[]Ids - VPC中安全组的列表。
- status string
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- subnet
Ids string[] - VPC中子网的列表。
- support
Ipv4Gateway boolean - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- Vpc
Tag[] - update
Time string - 更新VPC的时间。
- user
Cidr string[]Blocks - VPC的用户网段。
- vpc
Id string - VPC的ID。
- vpc
Name string - VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
- account_
id str - VPC所属账号的ID。
- associate_
cens Sequence[VpcAssociate Cen Args] - 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_ strid - VPC 绑定的 IPv4 网关的 ID。
- ipv6_
cidr_ strblock - 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_ Sequence[str]ids - VPC中创建的NAT网关的ID。
- network_
acl_ strnum - VPC中的网络ACL的数量。
- project_
name str - VPC所属项目的名称。不填默认加入default项目。
- route_
table_ Sequence[str]ids - VPC关联的路由表ID。
- secondary_
cidr_ Sequence[str]blocks - VPC的辅助网段。
- security_
group_ Sequence[str]ids - VPC中安全组的列表。
- status str
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- subnet_
ids Sequence[str] - VPC中子网的列表。
- support_
ipv4_ boolgateway - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- Sequence[Vpc
Tag Args] - update_
time str - 更新VPC的时间。
- user_
cidr_ Sequence[str]blocks - VPC的用户网段。
- vpc_
id str - VPC的ID。
- vpc_
name str - VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
- account
Id String - VPC所属账号的ID。
- associate
Cens List<Property Map> - cidr
Block String - VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段:192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
- creation
Time String - 创建VPC的时间。
- description String
- VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。不能以http://或https://开头。
- dns
Servers List<String> - VPC的DNS服务器地址。单次调用数量上限为5个,每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
- ipv4Gateway
Id String - VPC 绑定的 IPv4 网关的 ID。
- ipv6Cidr
Block String - VPC的IPv6网段。传入此参数后,参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后,参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP,此参数未传,则由系统自动分配IPv6网段。
- is
Default Boolean - 该VPC是否为默认VPC。true:默认VPC,表示该VPC是创建ECS实例时系统自动创建的VPC。false:非默认VPC,表示该VPC是用户手动创建的。
- nat
Gateway List<String>Ids - VPC中创建的NAT网关的ID。
- network
Acl StringNum - VPC中的网络ACL的数量。
- project
Name String - VPC所属项目的名称。不填默认加入default项目。
- route
Table List<String>Ids - VPC关联的路由表ID。
- secondary
Cidr List<String>Blocks - VPC的辅助网段。
- security
Group List<String>Ids - VPC中安全组的列表。
- status String
- VPC的状态。Creating:创建中。Pending:已创建。Available:可用。
- subnet
Ids List<String> - VPC中子网的列表。
- support
Ipv4Gateway Boolean - VPC 是否启用 IPv4 网关。false(默认值):不启用。true:启用。
- List<Property Map>
- update
Time String - 更新VPC的时间。
- user
Cidr List<String>Blocks - VPC的用户网段。
- vpc
Id String - VPC的ID。
- vpc
Name String - VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。不填默认为VPC实例的ID。不能以http://或https://开头。
Supporting Types
VpcAssociateCen, VpcAssociateCenArgs
- Cen
Id string - CEN的ID。
- Cen
Owner stringId - CEN的用户ID。
- Cen
Status string - VPC在CEN中的状态。Attaching:加载中,Attached:已加载
- Cen
Id string - CEN的ID。
- Cen
Owner stringId - CEN的用户ID。
- Cen
Status string - VPC在CEN中的状态。Attaching:加载中,Attached:已加载
- cen
Id String - CEN的ID。
- cen
Owner StringId - CEN的用户ID。
- cen
Status String - VPC在CEN中的状态。Attaching:加载中,Attached:已加载
- cen
Id string - CEN的ID。
- cen
Owner stringId - CEN的用户ID。
- cen
Status string - VPC在CEN中的状态。Attaching:加载中,Attached:已加载
- cen_
id str - CEN的ID。
- cen_
owner_ strid - CEN的用户ID。
- cen_
status str - VPC在CEN中的状态。Attaching:加载中,Attached:已加载
- cen
Id String - CEN的ID。
- cen
Owner StringId - CEN的用户ID。
- cen
Status String - VPC在CEN中的状态。Attaching:加载中,Attached:已加载
VpcTag, VpcTagArgs
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.