Skip to content

Commit

Permalink
Support Spot Instance.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed May 22, 2024
1 parent 23c61ae commit 7c87789
Show file tree
Hide file tree
Showing 19 changed files with 220 additions and 145 deletions.
3 changes: 3 additions & 0 deletions aliyun-python-sdk-ens/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2024-05-22 Version: 3.0.15
- Support Spot Instance.

2023-11-27 Version: 3.0.14
- Support AIC Instance.

Expand Down
2 changes: 1 addition & 1 deletion aliyun-python-sdk-ens/aliyunsdkens/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.0.14'
__version__ = '3.0.15'
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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 CreateSDGRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'CreateSDG','ens')
self.set_method('GET')

def get_FromSDGId(self): # String
return self.get_query_params().get('FromSDGId')

def set_FromSDGId(self, FromSDGId): # String
self.add_query_param('FromSDGId', FromSDGId)
def get_Description(self): # String
return self.get_query_params().get('Description')

def set_Description(self, Description): # String
self.add_query_param('Description', Description)
def get_InstanceId(self): # String
return self.get_query_params().get('InstanceId')

def set_InstanceId(self, InstanceId): # String
self.add_query_param('InstanceId', InstanceId)
def get_Size(self): # String
return self.get_query_params().get('Size')

def set_Size(self, Size): # String
self.add_query_param('Size', Size)
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ def get_KeyPairName(self): # String

def set_KeyPairName(self, KeyPairName): # String
self.add_query_param('KeyPairName', KeyPairName)
def get_KeyPairId(self): # String
return self.get_query_params().get('KeyPairId')

def set_KeyPairId(self, KeyPairId): # String
self.add_query_param('KeyPairId', KeyPairId)
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
from aliyunsdkcore.request import RpcRequest
import json

class RetryWorkflowRequest(RpcRequest):
class DeleteSDGRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'RetryWorkflow','ens')
self.set_method('POST')
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'DeleteSDG','ens')
self.set_method('GET')

def get_WorkflowIds(self): # Array
return self.get_query_params().get('WorkflowIds')
def get_SDGId(self): # Array
return self.get_query_params().get('SDGId')

def set_WorkflowIds(self, WorkflowIds): # Array
self.add_query_param("WorkflowIds", json.dumps(WorkflowIds))
def set_SDGId(self, SDGId): # Array
self.add_query_param("SDGId", json.dumps(SDGId))
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'DescribeApplication','ens')
self.set_method('POST')

def get_ResourceSelector(self): # String
return self.get_query_params().get('ResourceSelector')

def set_ResourceSelector(self, ResourceSelector): # String
self.add_query_param('ResourceSelector', ResourceSelector)
def get_AppVersions(self): # String
return self.get_query_params().get('AppVersions')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# under the License.

from aliyunsdkcore.request import RpcRequest
import json

class DescribeInstancesRequest(RpcRequest):

Expand Down Expand Up @@ -45,6 +46,11 @@ def get_EnsServiceId(self): # String

def set_EnsServiceId(self, EnsServiceId): # String
self.add_query_param('EnsServiceId', EnsServiceId)
def get_Tags(self): # Array
return self.get_query_params().get('Tags')

def set_Tags(self, Tags): # Array
self.add_query_param("Tags", json.dumps(Tags))
def get_VSwitchId(self): # String
return self.get_query_params().get('VSwitchId')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ def get_PageSize(self): # String

def set_PageSize(self, PageSize): # String
self.add_query_param('PageSize', PageSize)
def get_KeyPairId(self): # String
return self.get_query_params().get('KeyPairId')

def set_KeyPairId(self, KeyPairId): # String
self.add_query_param('KeyPairId', KeyPairId)
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,26 @@
# under the License.

from aliyunsdkcore.request import RpcRequest
import json

class RollbackWorkflowRequest(RpcRequest):
class DescribeSDGDeploymentStatusRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'RollbackWorkflow','ens')
self.set_method('POST')
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'DescribeSDGDeploymentStatus','ens')
self.set_protocol_type('https')
self.set_method('GET')

def get_WorkflowIds(self): # Array
return self.get_query_params().get('WorkflowIds')
def get_PageNumber(self): # String
return self.get_query_params().get('PageNumber')

def set_WorkflowIds(self, WorkflowIds): # Array
self.add_query_param("WorkflowIds", json.dumps(WorkflowIds))
def set_PageNumber(self, PageNumber): # String
self.add_query_param('PageNumber', PageNumber)
def get_SDGId(self): # String
return self.get_query_params().get('SDGId')

def set_SDGId(self, SDGId): # String
self.add_query_param('SDGId', SDGId)
def get_PageSize(self): # String
return self.get_query_params().get('PageSize')

def set_PageSize(self, PageSize): # String
self.add_query_param('PageSize', PageSize)
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@
from aliyunsdkcore.request import RpcRequest
import json

class TerminateWorkflowRequest(RpcRequest):
class DescribeSDGsRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'TerminateWorkflow','ens')
self.set_method('POST')
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'DescribeSDGs','ens')
self.set_method('GET')

def get_WorkflowIds(self): # Array
return self.get_query_params().get('WorkflowIds')
def get_SDGIds(self): # Array
return self.get_query_params().get('SDGIds')

def set_WorkflowIds(self, WorkflowIds): # Array
self.add_query_param("WorkflowIds", json.dumps(WorkflowIds))
def set_SDGIds(self, SDGIds): # Array
self.add_query_param("SDGIds", json.dumps(SDGIds))
def get_InstanceIds(self): # Array
return self.get_query_params().get('InstanceIds')

def set_InstanceIds(self, InstanceIds): # Array
self.add_query_param("InstanceIds", json.dumps(InstanceIds))

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,3 @@ def get_ImageName(self): # String

def set_ImageName(self, ImageName): # String
self.add_query_param('ImageName', ImageName)
def get_product(self): # String
return self.get_query_params().get('product')

def set_product(self, product): # String
self.add_query_param('product', product)
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# 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
import json

class ModifyInstanceChargeTypeRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'ModifyInstanceChargeType','ens')
self.set_method('POST')

def get_Period(self): # String
return self.get_query_params().get('Period')

def set_Period(self, Period): # String
self.add_query_param('Period', Period)
def get_IncludeDataDisks(self): # Boolean
return self.get_query_params().get('IncludeDataDisks')

def set_IncludeDataDisks(self, IncludeDataDisks): # Boolean
self.add_query_param('IncludeDataDisks', IncludeDataDisks)
def get_PeriodUnit(self): # String
return self.get_query_params().get('PeriodUnit')

def set_PeriodUnit(self, PeriodUnit): # String
self.add_query_param('PeriodUnit', PeriodUnit)
def get_AutoRenew(self): # Boolean
return self.get_query_params().get('AutoRenew')

def set_AutoRenew(self, AutoRenew): # Boolean
self.add_query_param('AutoRenew', AutoRenew)
def get_InstanceIds(self): # Array
return self.get_query_params().get('InstanceIds')

def set_InstanceIds(self, InstanceIds): # Array
self.add_query_param("InstanceIds", json.dumps(InstanceIds))
def get_InstanceChargeType(self): # String
return self.get_query_params().get('InstanceChargeType')

def set_InstanceChargeType(self, InstanceChargeType): # String
self.add_query_param('InstanceChargeType', InstanceChargeType)
def get_AutoPay(self): # Boolean
return self.get_query_params().get('AutoPay')

def set_AutoPay(self, AutoPay): # Boolean
self.add_query_param('AutoPay', AutoPay)
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
from aliyunsdkcore.request import RpcRequest
import json

class RestartWorkflowRequest(RpcRequest):
class RemoveSDGRequest(RpcRequest):

def __init__(self):
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'RestartWorkflow','ens')
self.set_method('POST')
RpcRequest.__init__(self, 'Ens', '2017-11-10', 'RemoveSDG','ens')
self.set_method('GET')

def get_WorkflowIds(self): # Array
return self.get_query_params().get('WorkflowIds')
def get_InstanceIds(self): # Array
return self.get_query_params().get('InstanceIds')

def set_WorkflowIds(self, WorkflowIds): # Array
self.add_query_param("WorkflowIds", json.dumps(WorkflowIds))
def set_InstanceIds(self, InstanceIds): # Array
self.add_query_param("InstanceIds", json.dumps(InstanceIds))
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ def get_InstanceId(self): # String

def set_InstanceId(self, InstanceId): # String
self.add_query_param('InstanceId', InstanceId)
def get_AutoRenew(self): # Boolean
return self.get_query_params().get('AutoRenew')

def set_AutoRenew(self, AutoRenew): # Boolean
self.add_query_param('AutoRenew', AutoRenew)
Loading

0 comments on commit 7c87789

Please sign in to comment.