Exemple #1
0
    def modify_global_ssh_port(
        self, req: typing.Optional[dict] = None, **kwargs
    ) -> dict:
        """ModifyGlobalSSHPort -

        **Request**

        - **ProjectId** (str) - (Config)
        - **InstanceId** (str) - (Required)
        - **Port** (int) - (Required)

        **Response**

        - **Message** (str) -

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

        # build options
        kwargs["max_retries"] = 0  # ignore retry when api is not idempotent

        resp = self.invoke("ModifyGlobalSSHPort", d, **kwargs)
        return apis.ModifyGlobalSSHPortResponseSchema().loads(resp)
    def modify_global_ssh_port(self, req=None, **kwargs):
        """ ModifyGlobalSSHPort - 修改GlobalSSH端口

        :param ProjectId: (Config) 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html)
        :param InstanceId: (Required) 实例ID,资源唯一标识
        :param Port: (Required) 调整后的SSH登陆端口
        """
        d = {"ProjectId": self.config.project_id}
        req and d.update(req)
        d = apis.ModifyGlobalSSHPortRequestSchema().dumps(d)
        resp = self.invoke("ModifyGlobalSSHPort", d, **kwargs)
        return apis.ModifyGlobalSSHPortResponseSchema().loads(resp)
Exemple #3
0
    def modify_global_ssh_port(self, req=None, **kwargs):
        """ ModifyGlobalSSHPort - 修改GlobalSSH端口

        **Request**

        - **ProjectId** (str) - (Config) 项目ID,如org-xxxx。请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_ 
        - **InstanceId** (str) - (Required) 实例ID,资源唯一标识
        - **Port** (int) - (Required) 调整后的SSH登陆端口
        
        **Response**

        - **Message** (str) - 提示信息
        
        """
        d = {"ProjectId": self.config.project_id}
        req and d.update(req)
        d = apis.ModifyGlobalSSHPortRequestSchema().dumps(d)
        resp = self.invoke("ModifyGlobalSSHPort", d, **kwargs)
        return apis.ModifyGlobalSSHPortResponseSchema().loads(resp)