def allocate_vip(self, req: typing.Optional[dict] = None, **kwargs) -> dict: """AllocateVIP - **Request** - **ProjectId** (str) - (Config) - **Region** (str) - (Config) - **SubnetId** (str) - (Required) - **VPCId** (str) - (Required) - **BusinessId** (str) - - **Count** (int) - - **Ip** (str) - - **Name** (str) - - **Remark** (str) - - **Tag** (str) - - **Zone** (str) - **Response** - **DataSet** (list) - - **VIPSet** (list) - 见 **VIPSet** 模型定义 **Response Model** **VIPSet** - **VIP** (str) - - **VIPId** (str) - - **VPCId** (str) - """ # build request d = { "ProjectId": self.config.project_id, "Region": self.config.region, } req and d.update(req) d = apis.AllocateVIPRequestSchema().dumps(d) # build options kwargs["max_retries"] = 0 # ignore retry when api is not idempotent resp = self.invoke("AllocateVIP", d, **kwargs) return apis.AllocateVIPResponseSchema().loads(resp)
def allocate_vip(self, req: typing.Optional[dict] = None, **kwargs) -> dict: """ AllocateVIP - 根据提供信息,申请内网VIP(Virtual IP),多用于高可用程序作为漂移IP。 **Request** - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_ - **Region** (str) - (Config) 地域 - **SubnetId** (str) - (Required) 子网id - **VPCId** (str) - (Required) 指定vip所属的VPC - **BusinessId** (str) - 业务组 - **Count** (int) - 申请数量,默认: 1 - **Ip** (str) - 指定ip - **Name** (str) - vip名,默认为VIP - **Remark** (str) - 备注 - **Tag** (str) - 业务组名称,默认为Default - **Zone** (str) - 可用区 **Response** - **DataSet** (list) - 申请到的VIP地址 - **VIPSet** (list) - 见 **VIPSet** 模型定义 **Response Model** **VIPSet** - **VIP** (str) - 虚拟ip - **VIPId** (str) - 虚拟ip id - **VPCId** (str) - VPC id """ # build request d = {"ProjectId": self.config.project_id, "Region": self.config.region} req and d.update(req) d = apis.AllocateVIPRequestSchema().dumps(d) # build options kwargs["max_retries"] = 0 # ignore retry when api is not idempotent resp = self.invoke("AllocateVIP", d, **kwargs) return apis.AllocateVIPResponseSchema().loads(resp)
def allocate_v_ip(self, req=None, **kwargs): """ AllocateVIP - 根据提供信息,申请内网VIP(Virtual IP),多用于高可用程序作为漂移IP。 :param ProjectId: (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) :param Region: (Config) 地域 :param SubnetId: (Required) 子网id :param VPCId: (Required) 指定vip所属的VPC :param BusinessId: (Optional) 业务组 :param Count: (Optional) 申请数量,默认: 1 :param Name: (Optional) vip名,默认为VIP :param Remark: (Optional) 备注 :param Tag: (Optional) 业务组名称,默认为Default :param Zone: (Optional) 可用区 """ d = {"ProjectId": self.config.project_id, "Region": self.config.region} req and d.update(req) d = apis.AllocateVIPRequestSchema().dumps(d) kwargs["max_retries"] = 0 resp = self.invoke("AllocateVIP", d, **kwargs) return apis.AllocateVIPResponseSchema().loads(resp)