Skip to content

Commit

Permalink
Support record for ecs.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Aug 21, 2024
1 parent 3f888a9 commit 8a21c7f
Show file tree
Hide file tree
Showing 7 changed files with 180 additions and 1 deletion.
3 changes: 3 additions & 0 deletions aliyun-python-sdk-ecs-workbench/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0.1'
__version__ = '1.0.2'
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 8a21c7f

Please sign in to comment.