def describe_subnet(self, req: typing.Optional[dict] = None, **kwargs) -> dict: """ DescribeSubnet - 获取子网信息 **Request** - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_ - **BusinessId** (str) - 业务组 - **Limit** (int) - 列表长度,默认为20 - **Offset** (int) - 偏移量,默认为0 - **RouteTableId** (str) - 路由表Id - **ShowAvailableIPs** (bool) - 是否返回子网的可用IP数,true为是,false为否,默认不返回 - **SubnetId** (str) - 子网id,适用于一次查询一个子网信息 - **SubnetIds** (list) - 子网id数组,适用于一次查询多个子网信息 - **Tag** (str) - 业务组名称,默认为Default - **VPCId** (str) - VPC资源id **Response** - **DataSet** (list) - 见 **SubnetInfo** 模型定义 - **TotalCount** (int) - 子网总数量 **Response Model** **SubnetInfo** - **AvailableIPs** (int) - 可用IP数量 - **CreateTime** (int) - 创建时间 - **Gateway** (str) - 子网网关 - **HasNATGW** (bool) - 是否有natgw - **IPv6Network** (str) - 子网关联的IPv6网段 - **Netmask** (str) - 子网掩码 - **Remark** (str) - 备注 - **RouteTableId** (str) - 路由表Id - **Subnet** (str) - 子网网段 - **SubnetId** (str) - 子网Id - **SubnetName** (str) - 子网名称 - **SubnetType** (int) - 子网类型 - **Tag** (str) - 业务组 - **VPCId** (str) - VPCId - **VPCName** (str) - VPC名称 - **Zone** (str) - 可用区名称 """ # build request d = { "ProjectId": self.config.project_id, "Region": self.config.region, } req and d.update(req) d = apis.DescribeSubnetRequestSchema().dumps(d) resp = self.invoke("DescribeSubnet", d, **kwargs) return apis.DescribeSubnetResponseSchema().loads(resp)
def describe_subnet(self, req=None, **kwargs): """ DescribeSubnet - 获取子网信息 :param ProjectId: (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) :param Region: (Config) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) :param BusinessId: (Optional) 业务组 :param Limit: (Optional) 列表长度,默认为20 :param Offset: (Optional) 偏移量,默认为0 :param RouteTableId: (Optional) 路由表Id :param SubnetId: (Optional) 子网id,适用于一次查询一个子网信息 :param SubnetIds: (Optional) 子网id数组,适用于一次查询多个子网信息 :param Tag: (Optional) 业务组名称,默认为Default :param VPCId: (Optional) VPC资源id """ d = {"ProjectId": self.config.project_id, "Region": self.config.region} req and d.update(req) d = apis.DescribeSubnetRequestSchema().dumps(d) resp = self.invoke("DescribeSubnet", d, **kwargs) return apis.DescribeSubnetResponseSchema().loads(resp)