From 8a21c7fedbf55babb8834a70e1f4e0c2a857b417 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Wed, 21 Aug 2024 09:54:29 +0000 Subject: [PATCH] Support record for ecs. --- aliyun-python-sdk-ecs-workbench/ChangeLog.txt | 3 ++ .../aliyunsdkecs_workbench/__init__.py | 2 +- .../GetInstanceRecordConfigRequest.py | 33 +++++++++++++ .../v20220220/ListInstanceRecordsRequest.py | 43 +++++++++++++++++ .../request/v20220220/LoginInstanceRequest.py | 14 ++++++ .../SetInstanceRecordConfigRequest.py | 48 +++++++++++++++++++ .../v20220220/ViewInstanceRecordsRequest.py | 38 +++++++++++++++ 7 files changed, 180 insertions(+), 1 deletion(-) create mode 100644 aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/GetInstanceRecordConfigRequest.py create mode 100644 aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/ListInstanceRecordsRequest.py create mode 100644 aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/SetInstanceRecordConfigRequest.py create mode 100644 aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/ViewInstanceRecordsRequest.py diff --git a/aliyun-python-sdk-ecs-workbench/ChangeLog.txt b/aliyun-python-sdk-ecs-workbench/ChangeLog.txt index 4c48753046..3c6580ef96 100644 --- a/aliyun-python-sdk-ecs-workbench/ChangeLog.txt +++ b/aliyun-python-sdk-ecs-workbench/ChangeLog.txt @@ -1,3 +1,6 @@ +2024-08-21 Version: 1.0.2 +- Support record for ecs. + 2023-08-21 Version: 1.0.1 - ECS-workbench upgrade, add fixedHeight and fixedWidth parameters. diff --git a/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/__init__.py b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/__init__.py index 6c4c011435..34c1db36a1 100644 --- a/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/__init__.py +++ b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/__init__.py @@ -1 +1 @@ -__version__ = '1.0.1' \ No newline at end of file +__version__ = '1.0.2' \ No newline at end of file diff --git a/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/GetInstanceRecordConfigRequest.py b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/GetInstanceRecordConfigRequest.py new file mode 100644 index 0000000000..9aaa3c3453 --- /dev/null +++ b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/GetInstanceRecordConfigRequest.py @@ -0,0 +1,33 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from aliyunsdkcore.request import RpcRequest + +class GetInstanceRecordConfigRequest(RpcRequest): + + def __init__(self): + RpcRequest.__init__(self, 'ecs-workbench', '2022-02-20', 'GetInstanceRecordConfig','ecs-workbench') + self.set_protocol_type('https') + self.set_method('POST') + + def get_InstanceId(self): # String + return self.get_body_params().get('InstanceId') + + def set_InstanceId(self, InstanceId): # String + self.add_body_params('InstanceId', InstanceId) diff --git a/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/ListInstanceRecordsRequest.py b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/ListInstanceRecordsRequest.py new file mode 100644 index 0000000000..71dcd6d887 --- /dev/null +++ b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/ListInstanceRecordsRequest.py @@ -0,0 +1,43 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from aliyunsdkcore.request import RpcRequest + +class ListInstanceRecordsRequest(RpcRequest): + + def __init__(self): + RpcRequest.__init__(self, 'ecs-workbench', '2022-02-20', 'ListInstanceRecords','ecs-workbench') + self.set_protocol_type('https') + self.set_method('POST') + + def get_PageNumber(self): # Integer + return self.get_body_params().get('PageNumber') + + def set_PageNumber(self, PageNumber): # Integer + self.add_body_params('PageNumber', PageNumber) + def get_InstanceId(self): # String + return self.get_body_params().get('InstanceId') + + def set_InstanceId(self, InstanceId): # String + self.add_body_params('InstanceId', InstanceId) + def get_PageSize(self): # Integer + return self.get_body_params().get('PageSize') + + def set_PageSize(self, PageSize): # Integer + self.add_body_params('PageSize', PageSize) diff --git a/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/LoginInstanceRequest.py b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/LoginInstanceRequest.py index 780f54c2fd..8fe9e9a4c9 100644 --- a/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/LoginInstanceRequest.py +++ b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/LoginInstanceRequest.py @@ -40,14 +40,24 @@ def get_InstanceLoginInfo(self): # Struct def set_InstanceLoginInfo(self, InstanceLoginInfo): # Struct if InstanceLoginInfo.get('ExpireTime') is not None: self.add_query_param('InstanceLoginInfo.ExpireTime', InstanceLoginInfo.get('ExpireTime')) + if InstanceLoginInfo.get('LoginByInstanceShortcut') is not None: + self.add_query_param('InstanceLoginInfo.LoginByInstanceShortcut', InstanceLoginInfo.get('LoginByInstanceShortcut')) if InstanceLoginInfo.get('Certificate') is not None: self.add_query_param('InstanceLoginInfo.Certificate', InstanceLoginInfo.get('Certificate')) if InstanceLoginInfo.get('AuthenticationType') is not None: self.add_query_param('InstanceLoginInfo.AuthenticationType', InstanceLoginInfo.get('AuthenticationType')) + if InstanceLoginInfo.get('DockerExec') is not None: + self.add_query_param('InstanceLoginInfo.DockerExec', InstanceLoginInfo.get('DockerExec')) + if InstanceLoginInfo.get('ShortcutToken') is not None: + self.add_query_param('InstanceLoginInfo.ShortcutToken', InstanceLoginInfo.get('ShortcutToken')) + if InstanceLoginInfo.get('ResourceGroupId') is not None: + self.add_query_param('InstanceLoginInfo.ResourceGroupId', InstanceLoginInfo.get('ResourceGroupId')) if InstanceLoginInfo.get('Protocol') is not None: self.add_query_param('InstanceLoginInfo.Protocol', InstanceLoginInfo.get('Protocol')) if InstanceLoginInfo.get('Password') is not None: self.add_query_param('InstanceLoginInfo.Password', InstanceLoginInfo.get('Password')) + if InstanceLoginInfo.get('LoginByInstanceCredential') is not None: + self.add_query_param('InstanceLoginInfo.LoginByInstanceCredential', InstanceLoginInfo.get('LoginByInstanceCredential')) if InstanceLoginInfo.get('InstanceId') is not None: self.add_query_param('InstanceLoginInfo.InstanceId', InstanceLoginInfo.get('InstanceId')) if InstanceLoginInfo.get('RegionId') is not None: @@ -99,8 +109,12 @@ def set_InstanceLoginInfo(self, InstanceLoginInfo): # Struct self.add_query_param('InstanceLoginInfo.Options.NotificationRetryLimit', InstanceLoginInfo.get('Options').get('NotificationRetryLimit')) if InstanceLoginInfo.get('InstanceType') is not None: self.add_query_param('InstanceLoginInfo.InstanceType', InstanceLoginInfo.get('InstanceType')) + if InstanceLoginInfo.get('DockerContainerName') is not None: + self.add_query_param('InstanceLoginInfo.DockerContainerName', InstanceLoginInfo.get('DockerContainerName')) if InstanceLoginInfo.get('PassPhrase') is not None: self.add_query_param('InstanceLoginInfo.PassPhrase', InstanceLoginInfo.get('PassPhrase')) + if InstanceLoginInfo.get('CredentialToken') is not None: + self.add_query_param('InstanceLoginInfo.CredentialToken', InstanceLoginInfo.get('CredentialToken')) if InstanceLoginInfo.get('DurationSeconds') is not None: self.add_query_param('InstanceLoginInfo.DurationSeconds', InstanceLoginInfo.get('DurationSeconds')) if InstanceLoginInfo.get('NetworkAccessMode') is not None: diff --git a/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/SetInstanceRecordConfigRequest.py b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/SetInstanceRecordConfigRequest.py new file mode 100644 index 0000000000..4aae2d23b2 --- /dev/null +++ b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/SetInstanceRecordConfigRequest.py @@ -0,0 +1,48 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from aliyunsdkcore.request import RpcRequest + +class SetInstanceRecordConfigRequest(RpcRequest): + + def __init__(self): + RpcRequest.__init__(self, 'ecs-workbench', '2022-02-20', 'SetInstanceRecordConfig','ecs-workbench') + self.set_protocol_type('https') + self.set_method('POST') + + def get_Enabled(self): # Boolean + return self.get_body_params().get('Enabled') + + def set_Enabled(self, Enabled): # Boolean + self.add_body_params('Enabled', Enabled) + def get_RecordStorageTarget(self): # String + return self.get_body_params().get('RecordStorageTarget') + + def set_RecordStorageTarget(self, RecordStorageTarget): # String + self.add_body_params('RecordStorageTarget', RecordStorageTarget) + def get_InstanceId(self): # String + return self.get_body_params().get('InstanceId') + + def set_InstanceId(self, InstanceId): # String + self.add_body_params('InstanceId', InstanceId) + def get_ExpirationDays(self): # Integer + return self.get_body_params().get('ExpirationDays') + + def set_ExpirationDays(self, ExpirationDays): # Integer + self.add_body_params('ExpirationDays', ExpirationDays) diff --git a/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/ViewInstanceRecordsRequest.py b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/ViewInstanceRecordsRequest.py new file mode 100644 index 0000000000..2984aba42e --- /dev/null +++ b/aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/ViewInstanceRecordsRequest.py @@ -0,0 +1,38 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from aliyunsdkcore.request import RpcRequest + +class ViewInstanceRecordsRequest(RpcRequest): + + def __init__(self): + RpcRequest.__init__(self, 'ecs-workbench', '2022-02-20', 'ViewInstanceRecords','ecs-workbench') + self.set_protocol_type('https') + self.set_method('POST') + + def get_InstanceId(self): # String + return self.get_body_params().get('InstanceId') + + def set_InstanceId(self, InstanceId): # String + self.add_body_params('InstanceId', InstanceId) + def get_TerminalSessionToken(self): # String + return self.get_body_params().get('TerminalSessionToken') + + def set_TerminalSessionToken(self, TerminalSessionToken): # String + self.add_body_params('TerminalSessionToken', TerminalSessionToken)