# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs

__all__ = [
    'GetVpcResult',
    'AwaitableGetVpcResult',
    'get_vpc',
    'get_vpc_output',
]

@pulumi.output_type
class GetVpcResult:
    """
    A collection of values returned by getVpc.
    """
    def __init__(__self__, account_id=None, associate_cens=None, cidr_block=None, creation_time=None, description=None, dns_servers=None, id=None, ipv4_gateway_id=None, ipv6_cidr_block=None, is_default=None, nat_gateway_ids=None, network_acl_num=None, project_name=None, route_table_ids=None, secondary_cidr_blocks=None, security_group_ids=None, status=None, subnet_ids=None, support_ipv4_gateway=None, tags=None, update_time=None, user_cidr_blocks=None, vpc_id=None, vpc_name=None):
        if account_id and not isinstance(account_id, str):
            raise TypeError("Expected argument 'account_id' to be a str")
        pulumi.set(__self__, "account_id", account_id)
        if associate_cens and not isinstance(associate_cens, list):
            raise TypeError("Expected argument 'associate_cens' to be a list")
        pulumi.set(__self__, "associate_cens", associate_cens)
        if cidr_block and not isinstance(cidr_block, str):
            raise TypeError("Expected argument 'cidr_block' to be a str")
        pulumi.set(__self__, "cidr_block", cidr_block)
        if creation_time and not isinstance(creation_time, str):
            raise TypeError("Expected argument 'creation_time' to be a str")
        pulumi.set(__self__, "creation_time", creation_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if dns_servers and not isinstance(dns_servers, list):
            raise TypeError("Expected argument 'dns_servers' to be a list")
        pulumi.set(__self__, "dns_servers", dns_servers)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if ipv4_gateway_id and not isinstance(ipv4_gateway_id, str):
            raise TypeError("Expected argument 'ipv4_gateway_id' to be a str")
        pulumi.set(__self__, "ipv4_gateway_id", ipv4_gateway_id)
        if ipv6_cidr_block and not isinstance(ipv6_cidr_block, str):
            raise TypeError("Expected argument 'ipv6_cidr_block' to be a str")
        pulumi.set(__self__, "ipv6_cidr_block", ipv6_cidr_block)
        if is_default and not isinstance(is_default, bool):
            raise TypeError("Expected argument 'is_default' to be a bool")
        pulumi.set(__self__, "is_default", is_default)
        if nat_gateway_ids and not isinstance(nat_gateway_ids, list):
            raise TypeError("Expected argument 'nat_gateway_ids' to be a list")
        pulumi.set(__self__, "nat_gateway_ids", nat_gateway_ids)
        if network_acl_num and not isinstance(network_acl_num, str):
            raise TypeError("Expected argument 'network_acl_num' to be a str")
        pulumi.set(__self__, "network_acl_num", network_acl_num)
        if project_name and not isinstance(project_name, str):
            raise TypeError("Expected argument 'project_name' to be a str")
        pulumi.set(__self__, "project_name", project_name)
        if route_table_ids and not isinstance(route_table_ids, list):
            raise TypeError("Expected argument 'route_table_ids' to be a list")
        pulumi.set(__self__, "route_table_ids", route_table_ids)
        if secondary_cidr_blocks and not isinstance(secondary_cidr_blocks, list):
            raise TypeError("Expected argument 'secondary_cidr_blocks' to be a list")
        pulumi.set(__self__, "secondary_cidr_blocks", secondary_cidr_blocks)
        if security_group_ids and not isinstance(security_group_ids, list):
            raise TypeError("Expected argument 'security_group_ids' to be a list")
        pulumi.set(__self__, "security_group_ids", security_group_ids)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if subnet_ids and not isinstance(subnet_ids, list):
            raise TypeError("Expected argument 'subnet_ids' to be a list")
        pulumi.set(__self__, "subnet_ids", subnet_ids)
        if support_ipv4_gateway and not isinstance(support_ipv4_gateway, bool):
            raise TypeError("Expected argument 'support_ipv4_gateway' to be a bool")
        pulumi.set(__self__, "support_ipv4_gateway", support_ipv4_gateway)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if update_time and not isinstance(update_time, str):
            raise TypeError("Expected argument 'update_time' to be a str")
        pulumi.set(__self__, "update_time", update_time)
        if user_cidr_blocks and not isinstance(user_cidr_blocks, list):
            raise TypeError("Expected argument 'user_cidr_blocks' to be a list")
        pulumi.set(__self__, "user_cidr_blocks", user_cidr_blocks)
        if vpc_id and not isinstance(vpc_id, str):
            raise TypeError("Expected argument 'vpc_id' to be a str")
        pulumi.set(__self__, "vpc_id", vpc_id)
        if vpc_name and not isinstance(vpc_name, str):
            raise TypeError("Expected argument 'vpc_name' to be a str")
        pulumi.set(__self__, "vpc_name", vpc_name)

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> builtins.str:
        """
        VPC所属账号的ID。
        """
        return pulumi.get(self, "account_id")

    @property
    @pulumi.getter(name="associateCens")
    def associate_cens(self) -> Sequence['outputs.GetVpcAssociateCenResult']:
        """
        VPC关联的CEN信息。
        """
        return pulumi.get(self, "associate_cens")

    @property
    @pulumi.getter(name="cidrBlock")
    def cidr_block(self) -> builtins.str:
        """
        VPC的IPv4网段。您可以使用以下网段或其子集作为VPC的IPv4网段：192.168.0.0/16 ~ 24、10.0.0.0/8 ~ 24、172.16.0.0/12 ~ 24。
        """
        return pulumi.get(self, "cidr_block")

    @property
    @pulumi.getter(name="creationTime")
    def creation_time(self) -> builtins.str:
        """
        创建VPC的时间。
        """
        return pulumi.get(self, "creation_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        VPC的描述信息。长度限制为0~ 255个字符。不填默认为空字符串。需要以字母、中文或数字开头。可包含英文逗号（,）、点号（.）、下划线（_）、空格（ ）、等号（=）、短横线（-）、中文逗号（，）、中文句号（。）。不能以http://或https://开头。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="dnsServers")
    def dns_servers(self) -> Sequence[builtins.str]:
        """
        VPC的DNS服务器地址。单次调用数量上限为5个，每个DnsServer必须以合法IP形式给出。多个IP之间用&分隔。不填则配置为默认DNS服务器地址。
        """
        return pulumi.get(self, "dns_servers")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="ipv4GatewayId")
    def ipv4_gateway_id(self) -> builtins.str:
        """
        VPC 绑定的 IPv4 网关的 ID。
        """
        return pulumi.get(self, "ipv4_gateway_id")

    @property
    @pulumi.getter(name="ipv6CidrBlock")
    def ipv6_cidr_block(self) -> builtins.str:
        """
        VPC的IPv6网段。传入此参数后，参数Ipv6MaskLen不生效。参数Ipv6Isp传入非BGP后，参数Ipv6MaskLen和参数Ipv6CidrBlock二者必须传入一个。参数Ipv6Isp未传或传入BGP，此参数未传，则由系统自动分配IPv6网段。
        """
        return pulumi.get(self, "ipv6_cidr_block")

    @property
    @pulumi.getter(name="isDefault")
    def is_default(self) -> builtins.bool:
        """
        该VPC是否为默认VPC。true：默认VPC，表示该VPC是创建ECS实例时系统自动创建的VPC。false：非默认VPC，表示该VPC是用户手动创建的。
        """
        return pulumi.get(self, "is_default")

    @property
    @pulumi.getter(name="natGatewayIds")
    def nat_gateway_ids(self) -> Sequence[builtins.str]:
        """
        VPC中创建的NAT网关的ID。
        """
        return pulumi.get(self, "nat_gateway_ids")

    @property
    @pulumi.getter(name="networkAclNum")
    def network_acl_num(self) -> builtins.str:
        """
        VPC中的网络ACL的数量。
        """
        return pulumi.get(self, "network_acl_num")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        VPC所属项目的名称。不填默认加入default项目。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="routeTableIds")
    def route_table_ids(self) -> Sequence[builtins.str]:
        """
        VPC关联的路由表ID。
        """
        return pulumi.get(self, "route_table_ids")

    @property
    @pulumi.getter(name="secondaryCidrBlocks")
    def secondary_cidr_blocks(self) -> Sequence[builtins.str]:
        """
        VPC的辅助网段。
        """
        return pulumi.get(self, "secondary_cidr_blocks")

    @property
    @pulumi.getter(name="securityGroupIds")
    def security_group_ids(self) -> Sequence[builtins.str]:
        """
        VPC中安全组的列表。
        """
        return pulumi.get(self, "security_group_ids")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        VPC的状态。Creating：创建中。Pending：已创建。Available：可用。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="subnetIds")
    def subnet_ids(self) -> Sequence[builtins.str]:
        """
        VPC中子网的列表。
        """
        return pulumi.get(self, "subnet_ids")

    @property
    @pulumi.getter(name="supportIpv4Gateway")
    def support_ipv4_gateway(self) -> builtins.bool:
        """
        VPC 是否启用 IPv4 网关。false（默认值）：不启用。true：启用。
        """
        return pulumi.get(self, "support_ipv4_gateway")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetVpcTagResult']:
        """
        私有网络绑定的标签。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="updateTime")
    def update_time(self) -> builtins.str:
        """
        更新VPC的时间。
        """
        return pulumi.get(self, "update_time")

    @property
    @pulumi.getter(name="userCidrBlocks")
    def user_cidr_blocks(self) -> Sequence[builtins.str]:
        """
        VPC的用户网段。
        """
        return pulumi.get(self, "user_cidr_blocks")

    @property
    @pulumi.getter(name="vpcId")
    def vpc_id(self) -> builtins.str:
        """
        VPC的ID。
        """
        return pulumi.get(self, "vpc_id")

    @property
    @pulumi.getter(name="vpcName")
    def vpc_name(self) -> builtins.str:
        """
        VPC的名称。长度限制为1 ~ 128个字符。需要以字母、中文或数字开头，可包含点号（.）、下划线（_）和短横线（-）。不填默认为VPC实例的ID。不能以http://或https://开头。
        """
        return pulumi.get(self, "vpc_name")


class AwaitableGetVpcResult(GetVpcResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVpcResult(
            account_id=self.account_id,
            associate_cens=self.associate_cens,
            cidr_block=self.cidr_block,
            creation_time=self.creation_time,
            description=self.description,
            dns_servers=self.dns_servers,
            id=self.id,
            ipv4_gateway_id=self.ipv4_gateway_id,
            ipv6_cidr_block=self.ipv6_cidr_block,
            is_default=self.is_default,
            nat_gateway_ids=self.nat_gateway_ids,
            network_acl_num=self.network_acl_num,
            project_name=self.project_name,
            route_table_ids=self.route_table_ids,
            secondary_cidr_blocks=self.secondary_cidr_blocks,
            security_group_ids=self.security_group_ids,
            status=self.status,
            subnet_ids=self.subnet_ids,
            support_ipv4_gateway=self.support_ipv4_gateway,
            tags=self.tags,
            update_time=self.update_time,
            user_cidr_blocks=self.user_cidr_blocks,
            vpc_id=self.vpc_id,
            vpc_name=self.vpc_name)


def get_vpc(id: Optional[builtins.str] = None,
            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVpcResult:
    """
    Data Source schema for Byteplus::VPC::VPC


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:vpc/getVpc:getVpc', __args__, opts=opts, typ=GetVpcResult).value

    return AwaitableGetVpcResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        associate_cens=pulumi.get(__ret__, 'associate_cens'),
        cidr_block=pulumi.get(__ret__, 'cidr_block'),
        creation_time=pulumi.get(__ret__, 'creation_time'),
        description=pulumi.get(__ret__, 'description'),
        dns_servers=pulumi.get(__ret__, 'dns_servers'),
        id=pulumi.get(__ret__, 'id'),
        ipv4_gateway_id=pulumi.get(__ret__, 'ipv4_gateway_id'),
        ipv6_cidr_block=pulumi.get(__ret__, 'ipv6_cidr_block'),
        is_default=pulumi.get(__ret__, 'is_default'),
        nat_gateway_ids=pulumi.get(__ret__, 'nat_gateway_ids'),
        network_acl_num=pulumi.get(__ret__, 'network_acl_num'),
        project_name=pulumi.get(__ret__, 'project_name'),
        route_table_ids=pulumi.get(__ret__, 'route_table_ids'),
        secondary_cidr_blocks=pulumi.get(__ret__, 'secondary_cidr_blocks'),
        security_group_ids=pulumi.get(__ret__, 'security_group_ids'),
        status=pulumi.get(__ret__, 'status'),
        subnet_ids=pulumi.get(__ret__, 'subnet_ids'),
        support_ipv4_gateway=pulumi.get(__ret__, 'support_ipv4_gateway'),
        tags=pulumi.get(__ret__, 'tags'),
        update_time=pulumi.get(__ret__, 'update_time'),
        user_cidr_blocks=pulumi.get(__ret__, 'user_cidr_blocks'),
        vpc_id=pulumi.get(__ret__, 'vpc_id'),
        vpc_name=pulumi.get(__ret__, 'vpc_name'))
def get_vpc_output(id: Optional[pulumi.Input[builtins.str]] = None,
                   opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetVpcResult]:
    """
    Data Source schema for Byteplus::VPC::VPC


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:vpc/getVpc:getVpc', __args__, opts=opts, typ=GetVpcResult)
    return __ret__.apply(lambda __response__: GetVpcResult(
        account_id=pulumi.get(__response__, 'account_id'),
        associate_cens=pulumi.get(__response__, 'associate_cens'),
        cidr_block=pulumi.get(__response__, 'cidr_block'),
        creation_time=pulumi.get(__response__, 'creation_time'),
        description=pulumi.get(__response__, 'description'),
        dns_servers=pulumi.get(__response__, 'dns_servers'),
        id=pulumi.get(__response__, 'id'),
        ipv4_gateway_id=pulumi.get(__response__, 'ipv4_gateway_id'),
        ipv6_cidr_block=pulumi.get(__response__, 'ipv6_cidr_block'),
        is_default=pulumi.get(__response__, 'is_default'),
        nat_gateway_ids=pulumi.get(__response__, 'nat_gateway_ids'),
        network_acl_num=pulumi.get(__response__, 'network_acl_num'),
        project_name=pulumi.get(__response__, 'project_name'),
        route_table_ids=pulumi.get(__response__, 'route_table_ids'),
        secondary_cidr_blocks=pulumi.get(__response__, 'secondary_cidr_blocks'),
        security_group_ids=pulumi.get(__response__, 'security_group_ids'),
        status=pulumi.get(__response__, 'status'),
        subnet_ids=pulumi.get(__response__, 'subnet_ids'),
        support_ipv4_gateway=pulumi.get(__response__, 'support_ipv4_gateway'),
        tags=pulumi.get(__response__, 'tags'),
        update_time=pulumi.get(__response__, 'update_time'),
        user_cidr_blocks=pulumi.get(__response__, 'user_cidr_blocks'),
        vpc_id=pulumi.get(__response__, 'vpc_id'),
        vpc_name=pulumi.get(__response__, 'vpc_name')))
