Ejemplo n.º 1
0
    def delete_policy(self,
                      req: typing.Optional[dict] = None,
                      **kwargs) -> dict:
        """DeletePolicy - 删除内容转发策略

        **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>`_
        - **PolicyId** (str) - (Required) 内容转发策略ID
        - **VServerId** (str) - VServer 资源ID

        **Response**


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

        resp = self.invoke("DeletePolicy", d, **kwargs)
        return apis.DeletePolicyResponseSchema().loads(resp)
Ejemplo n.º 2
0
    def delete_policy(self, req=None, **kwargs):
        """ DeletePolicy - 删除内容转发策略

        :param ProjectId: (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html)
        :param Region: (Config) 地域。 参见 [地域和可用区列表](../summary/regionlist.html)
        :param PolicyId: (Required) 内容转发策略ID
        :param GroupId: (Optional) 内容转发策略组ID
        :param VServerId: (Optional) VServer 资源ID
        """
        d = {"ProjectId": self.config.project_id, "Region": self.config.region}
        req and d.update(req)
        d = apis.DeletePolicyRequestSchema().dumps(d)
        resp = self.invoke("DeletePolicy", d, **kwargs)
        return apis.DeletePolicyResponseSchema().loads(resp)