Skip to content

Commit 8a21c7f

Browse files
committed
Support record for ecs.
1 parent 3f888a9 commit 8a21c7f

File tree

7 files changed

+180
-1
lines changed

7 files changed

+180
-1
lines changed

aliyun-python-sdk-ecs-workbench/ChangeLog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2024-08-21 Version: 1.0.2
2+
- Support record for ecs.
3+
14
2023-08-21 Version: 1.0.1
25
- ECS-workbench upgrade, add fixedHeight and fixedWidth parameters.
36

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.1'
1+
__version__ = '1.0.2'
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
22+
class GetInstanceRecordConfigRequest(RpcRequest):
23+
24+
def __init__(self):
25+
RpcRequest.__init__(self, 'ecs-workbench', '2022-02-20', 'GetInstanceRecordConfig','ecs-workbench')
26+
self.set_protocol_type('https')
27+
self.set_method('POST')
28+
29+
def get_InstanceId(self): # String
30+
return self.get_body_params().get('InstanceId')
31+
32+
def set_InstanceId(self, InstanceId): # String
33+
self.add_body_params('InstanceId', InstanceId)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
22+
class ListInstanceRecordsRequest(RpcRequest):
23+
24+
def __init__(self):
25+
RpcRequest.__init__(self, 'ecs-workbench', '2022-02-20', 'ListInstanceRecords','ecs-workbench')
26+
self.set_protocol_type('https')
27+
self.set_method('POST')
28+
29+
def get_PageNumber(self): # Integer
30+
return self.get_body_params().get('PageNumber')
31+
32+
def set_PageNumber(self, PageNumber): # Integer
33+
self.add_body_params('PageNumber', PageNumber)
34+
def get_InstanceId(self): # String
35+
return self.get_body_params().get('InstanceId')
36+
37+
def set_InstanceId(self, InstanceId): # String
38+
self.add_body_params('InstanceId', InstanceId)
39+
def get_PageSize(self): # Integer
40+
return self.get_body_params().get('PageSize')
41+
42+
def set_PageSize(self, PageSize): # Integer
43+
self.add_body_params('PageSize', PageSize)

aliyun-python-sdk-ecs-workbench/aliyunsdkecs_workbench/request/v20220220/LoginInstanceRequest.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,24 @@ def get_InstanceLoginInfo(self): # Struct
4040
def set_InstanceLoginInfo(self, InstanceLoginInfo): # Struct
4141
if InstanceLoginInfo.get('ExpireTime') is not None:
4242
self.add_query_param('InstanceLoginInfo.ExpireTime', InstanceLoginInfo.get('ExpireTime'))
43+
if InstanceLoginInfo.get('LoginByInstanceShortcut') is not None:
44+
self.add_query_param('InstanceLoginInfo.LoginByInstanceShortcut', InstanceLoginInfo.get('LoginByInstanceShortcut'))
4345
if InstanceLoginInfo.get('Certificate') is not None:
4446
self.add_query_param('InstanceLoginInfo.Certificate', InstanceLoginInfo.get('Certificate'))
4547
if InstanceLoginInfo.get('AuthenticationType') is not None:
4648
self.add_query_param('InstanceLoginInfo.AuthenticationType', InstanceLoginInfo.get('AuthenticationType'))
49+
if InstanceLoginInfo.get('DockerExec') is not None:
50+
self.add_query_param('InstanceLoginInfo.DockerExec', InstanceLoginInfo.get('DockerExec'))
51+
if InstanceLoginInfo.get('ShortcutToken') is not None:
52+
self.add_query_param('InstanceLoginInfo.ShortcutToken', InstanceLoginInfo.get('ShortcutToken'))
53+
if InstanceLoginInfo.get('ResourceGroupId') is not None:
54+
self.add_query_param('InstanceLoginInfo.ResourceGroupId', InstanceLoginInfo.get('ResourceGroupId'))
4755
if InstanceLoginInfo.get('Protocol') is not None:
4856
self.add_query_param('InstanceLoginInfo.Protocol', InstanceLoginInfo.get('Protocol'))
4957
if InstanceLoginInfo.get('Password') is not None:
5058
self.add_query_param('InstanceLoginInfo.Password', InstanceLoginInfo.get('Password'))
59+
if InstanceLoginInfo.get('LoginByInstanceCredential') is not None:
60+
self.add_query_param('InstanceLoginInfo.LoginByInstanceCredential', InstanceLoginInfo.get('LoginByInstanceCredential'))
5161
if InstanceLoginInfo.get('InstanceId') is not None:
5262
self.add_query_param('InstanceLoginInfo.InstanceId', InstanceLoginInfo.get('InstanceId'))
5363
if InstanceLoginInfo.get('RegionId') is not None:
@@ -99,8 +109,12 @@ def set_InstanceLoginInfo(self, InstanceLoginInfo): # Struct
99109
self.add_query_param('InstanceLoginInfo.Options.NotificationRetryLimit', InstanceLoginInfo.get('Options').get('NotificationRetryLimit'))
100110
if InstanceLoginInfo.get('InstanceType') is not None:
101111
self.add_query_param('InstanceLoginInfo.InstanceType', InstanceLoginInfo.get('InstanceType'))
112+
if InstanceLoginInfo.get('DockerContainerName') is not None:
113+
self.add_query_param('InstanceLoginInfo.DockerContainerName', InstanceLoginInfo.get('DockerContainerName'))
102114
if InstanceLoginInfo.get('PassPhrase') is not None:
103115
self.add_query_param('InstanceLoginInfo.PassPhrase', InstanceLoginInfo.get('PassPhrase'))
116+
if InstanceLoginInfo.get('CredentialToken') is not None:
117+
self.add_query_param('InstanceLoginInfo.CredentialToken', InstanceLoginInfo.get('CredentialToken'))
104118
if InstanceLoginInfo.get('DurationSeconds') is not None:
105119
self.add_query_param('InstanceLoginInfo.DurationSeconds', InstanceLoginInfo.get('DurationSeconds'))
106120
if InstanceLoginInfo.get('NetworkAccessMode') is not None:
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
22+
class SetInstanceRecordConfigRequest(RpcRequest):
23+
24+
def __init__(self):
25+
RpcRequest.__init__(self, 'ecs-workbench', '2022-02-20', 'SetInstanceRecordConfig','ecs-workbench')
26+
self.set_protocol_type('https')
27+
self.set_method('POST')
28+
29+
def get_Enabled(self): # Boolean
30+
return self.get_body_params().get('Enabled')
31+
32+
def set_Enabled(self, Enabled): # Boolean
33+
self.add_body_params('Enabled', Enabled)
34+
def get_RecordStorageTarget(self): # String
35+
return self.get_body_params().get('RecordStorageTarget')
36+
37+
def set_RecordStorageTarget(self, RecordStorageTarget): # String
38+
self.add_body_params('RecordStorageTarget', RecordStorageTarget)
39+
def get_InstanceId(self): # String
40+
return self.get_body_params().get('InstanceId')
41+
42+
def set_InstanceId(self, InstanceId): # String
43+
self.add_body_params('InstanceId', InstanceId)
44+
def get_ExpirationDays(self): # Integer
45+
return self.get_body_params().get('ExpirationDays')
46+
47+
def set_ExpirationDays(self, ExpirationDays): # Integer
48+
self.add_body_params('ExpirationDays', ExpirationDays)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from aliyunsdkcore.request import RpcRequest
21+
22+
class ViewInstanceRecordsRequest(RpcRequest):
23+
24+
def __init__(self):
25+
RpcRequest.__init__(self, 'ecs-workbench', '2022-02-20', 'ViewInstanceRecords','ecs-workbench')
26+
self.set_protocol_type('https')
27+
self.set_method('POST')
28+
29+
def get_InstanceId(self): # String
30+
return self.get_body_params().get('InstanceId')
31+
32+
def set_InstanceId(self, InstanceId): # String
33+
self.add_body_params('InstanceId', InstanceId)
34+
def get_TerminalSessionToken(self): # String
35+
return self.get_body_params().get('TerminalSessionToken')
36+
37+
def set_TerminalSessionToken(self, TerminalSessionToken): # String
38+
self.add_body_params('TerminalSessionToken', TerminalSessionToken)

0 commit comments

Comments
 (0)