Exemplo n.º 1
0
    def describe_firewall_resource(self, req=None, **kwargs):
        """ DescribeFirewallResource - 获取防火墙组所绑定资源的外网IP

        **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>`_ 
        - **FWId** (str) - (Required) 防火墙ID
        - **Limit** (int) - 返回数据长度,默认为20,最大10000000
        - **Offset** (int) - 列表起始位置偏移量,默认为0
        
        **Response**

        - **ResourceSet** (list) - 见 **ResourceSet** 模型定义
        - **TotalCount** (int) - 绑定资源总数
        
        **Response Model**
        
        **ResourceSet** 
        
        - **Name** (str) - 名称
        - **PrivateIP** (str) - 内网IP
        - **Remark** (str) - 备注
        - **ResourceID** (str) - 绑定该防火墙的资源id
        - **ResourceType** (str) - 绑定资源的资源类型,如"uhost","upm","umem","uhive","uvip","uredis","uhadoop","ufortress","dbaudit","udw","udocker", "umemcache"
        - **Status** (int) - 状态
        - **Tag** (str) - 业务组
        - **Zone** (int) - 可用区

        """
        d = {"ProjectId": self.config.project_id, "Region": self.config.region}
        req and d.update(req)
        d = apis.DescribeFirewallResourceRequestSchema().dumps(d)
        resp = self.invoke("DescribeFirewallResource", d, **kwargs)
        return apis.DescribeFirewallResourceResponseSchema().loads(resp)
Exemplo n.º 2
0
    def describe_firewall_resource(self, req=None, **kwargs):
        """ DescribeFirewallResource - 获取防火墙组所绑定资源的外网IP

        :param ProjectId: (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html)
        :param Region: (Config) 地域。 参见 [地域和可用区列表](../summary/regionlist.html)
        :param FWId: (Required) 防火墙ID
        :param Limit: (Optional) 返回数据长度,默认为20,最大10000000
        :param Offset: (Optional) 列表起始位置偏移量,默认为0
        """
        d = {"ProjectId": self.config.project_id, "Region": self.config.region}
        req and d.update(req)
        d = apis.DescribeFirewallResourceRequestSchema().dumps(d)
        resp = self.invoke("DescribeFirewallResource", d, **kwargs)
        return apis.DescribeFirewallResourceResponseSchema().loads(resp)
Exemplo n.º 3
0
    def describe_firewall_resource(self,
                                   req: typing.Optional[dict] = None,
                                   **kwargs) -> dict:
        """DescribeFirewallResource - 获取防火墙组所绑定资源的外网IP

        **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>`_
        - **FWId** (str) - (Required) 防火墙ID
        - **Limit** (int) - 返回数据长度,默认为20,最大10000000
        - **Offset** (int) - 列表起始位置偏移量,默认为0

        **Response**

        - **ResourceSet** (list) - 见 **ResourceSet** 模型定义
        - **TotalCount** (int) - 绑定资源总数

        **Response Model**

        **ResourceSet**
        - **Name** (str) - 名称
        - **PrivateIP** (str) - 内网IP
        - **Remark** (str) - 备注
        - **ResourceID** (str) - 绑定该防火墙的资源id
        - **ResourceType** (str) - 绑定防火墙组的资源类型。"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计.
        - **Status** (int) - 状态
        - **Tag** (str) - 业务组
        - **Zone** (int) - 可用区


        """
        # build request
        d = {
            "ProjectId": self.config.project_id,
            "Region": self.config.region,
        }
        req and d.update(req)
        d = apis.DescribeFirewallResourceRequestSchema().dumps(d)

        resp = self.invoke("DescribeFirewallResource", d, **kwargs)
        return apis.DescribeFirewallResourceResponseSchema().loads(resp)