Skip to content

Commit 1a60db9

Browse files
committed
ECS SDK Auto Released By shaoyi.qusy,Version:4.16.7
发布日志: 1, add ReservedInstance API.
1 parent 05bcfa4 commit 1a60db9

File tree

5 files changed

+309
-1
lines changed

5 files changed

+309
-1
lines changed

aliyun-python-sdk-ecs/ChangeLog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2019-04-18 Version: 4.16.7
2+
1, add ReservedInstance API.
3+
14
2019-04-15 Version: 4.16.6
25
1, add arns parameter to CreateDisk/CreateInstance API in order to support disk encryption by performing a sts role play.
36

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.16.6"
1+
__version__ = "4.16.7"
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
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+
class DescribeReservedInstancesRequest(RpcRequest):
22+
23+
def __init__(self):
24+
RpcRequest.__init__(self, 'Ecs', '2014-05-26', 'DescribeReservedInstances','ecs')
25+
26+
def get_ResourceOwnerId(self):
27+
return self.get_query_params().get('ResourceOwnerId')
28+
29+
def set_ResourceOwnerId(self,ResourceOwnerId):
30+
self.add_query_param('ResourceOwnerId',ResourceOwnerId)
31+
32+
def get_PageNumber(self):
33+
return self.get_query_params().get('PageNumber')
34+
35+
def set_PageNumber(self,PageNumber):
36+
self.add_query_param('PageNumber',PageNumber)
37+
38+
def get_LockReason(self):
39+
return self.get_query_params().get('LockReason')
40+
41+
def set_LockReason(self,LockReason):
42+
self.add_query_param('LockReason',LockReason)
43+
44+
def get_Scope(self):
45+
return self.get_query_params().get('Scope')
46+
47+
def set_Scope(self,Scope):
48+
self.add_query_param('Scope',Scope)
49+
50+
def get_PageSize(self):
51+
return self.get_query_params().get('PageSize')
52+
53+
def set_PageSize(self,PageSize):
54+
self.add_query_param('PageSize',PageSize)
55+
56+
def get_InstanceType(self):
57+
return self.get_query_params().get('InstanceType')
58+
59+
def set_InstanceType(self,InstanceType):
60+
self.add_query_param('InstanceType',InstanceType)
61+
62+
def get_ResourceOwnerAccount(self):
63+
return self.get_query_params().get('ResourceOwnerAccount')
64+
65+
def set_ResourceOwnerAccount(self,ResourceOwnerAccount):
66+
self.add_query_param('ResourceOwnerAccount',ResourceOwnerAccount)
67+
68+
def get_OwnerAccount(self):
69+
return self.get_query_params().get('OwnerAccount')
70+
71+
def set_OwnerAccount(self,OwnerAccount):
72+
self.add_query_param('OwnerAccount',OwnerAccount)
73+
74+
def get_InstanceTypeFamily(self):
75+
return self.get_query_params().get('InstanceTypeFamily')
76+
77+
def set_InstanceTypeFamily(self,InstanceTypeFamily):
78+
self.add_query_param('InstanceTypeFamily',InstanceTypeFamily)
79+
80+
def get_OwnerId(self):
81+
return self.get_query_params().get('OwnerId')
82+
83+
def set_OwnerId(self,OwnerId):
84+
self.add_query_param('OwnerId',OwnerId)
85+
86+
def get_ReservedInstanceIds(self):
87+
return self.get_query_params().get('ReservedInstanceIds')
88+
89+
def set_ReservedInstanceIds(self,ReservedInstanceIds):
90+
for i in range(len(ReservedInstanceIds)):
91+
if ReservedInstanceIds[i] is not None:
92+
self.add_query_param('ReservedInstanceId.' + str(i + 1) , ReservedInstanceIds[i]);
93+
94+
def get_OfferingType(self):
95+
return self.get_query_params().get('OfferingType')
96+
97+
def set_OfferingType(self,OfferingType):
98+
self.add_query_param('OfferingType',OfferingType)
99+
100+
def get_ZoneId(self):
101+
return self.get_query_params().get('ZoneId')
102+
103+
def set_ZoneId(self,ZoneId):
104+
self.add_query_param('ZoneId',ZoneId)
105+
106+
def get_ReservedInstanceName(self):
107+
return self.get_query_params().get('ReservedInstanceName')
108+
109+
def set_ReservedInstanceName(self,ReservedInstanceName):
110+
self.add_query_param('ReservedInstanceName',ReservedInstanceName)
111+
112+
def get_Statuss(self):
113+
return self.get_query_params().get('Statuss')
114+
115+
def set_Statuss(self,Statuss):
116+
for i in range(len(Statuss)):
117+
if Statuss[i] is not None:
118+
self.add_query_param('Status.' + str(i + 1) , Statuss[i]);
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
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+
class ModifyReservedInstancesRequest(RpcRequest):
22+
23+
def __init__(self):
24+
RpcRequest.__init__(self, 'Ecs', '2014-05-26', 'ModifyReservedInstances','ecs')
25+
26+
def get_ResourceOwnerId(self):
27+
return self.get_query_params().get('ResourceOwnerId')
28+
29+
def set_ResourceOwnerId(self,ResourceOwnerId):
30+
self.add_query_param('ResourceOwnerId',ResourceOwnerId)
31+
32+
def get_Configurations(self):
33+
return self.get_query_params().get('Configurations')
34+
35+
def set_Configurations(self,Configurations):
36+
for i in range(len(Configurations)):
37+
if Configurations[i].get('ZoneId') is not None:
38+
self.add_query_param('Configuration.' + str(i + 1) + '.ZoneId' , Configurations[i].get('ZoneId'))
39+
if Configurations[i].get('ReservedInstanceName') is not None:
40+
self.add_query_param('Configuration.' + str(i + 1) + '.ReservedInstanceName' , Configurations[i].get('ReservedInstanceName'))
41+
if Configurations[i].get('InstanceType') is not None:
42+
self.add_query_param('Configuration.' + str(i + 1) + '.InstanceType' , Configurations[i].get('InstanceType'))
43+
if Configurations[i].get('Scope') is not None:
44+
self.add_query_param('Configuration.' + str(i + 1) + '.Scope' , Configurations[i].get('Scope'))
45+
if Configurations[i].get('InstanceAmount') is not None:
46+
self.add_query_param('Configuration.' + str(i + 1) + '.InstanceAmount' , Configurations[i].get('InstanceAmount'))
47+
48+
49+
def get_ResourceOwnerAccount(self):
50+
return self.get_query_params().get('ResourceOwnerAccount')
51+
52+
def set_ResourceOwnerAccount(self,ResourceOwnerAccount):
53+
self.add_query_param('ResourceOwnerAccount',ResourceOwnerAccount)
54+
55+
def get_OwnerAccount(self):
56+
return self.get_query_params().get('OwnerAccount')
57+
58+
def set_OwnerAccount(self,OwnerAccount):
59+
self.add_query_param('OwnerAccount',OwnerAccount)
60+
61+
def get_OwnerId(self):
62+
return self.get_query_params().get('OwnerId')
63+
64+
def set_OwnerId(self,OwnerId):
65+
self.add_query_param('OwnerId',OwnerId)
66+
67+
def get_ReservedInstanceIds(self):
68+
return self.get_query_params().get('ReservedInstanceIds')
69+
70+
def set_ReservedInstanceIds(self,ReservedInstanceIds):
71+
for i in range(len(ReservedInstanceIds)):
72+
if ReservedInstanceIds[i] is not None:
73+
self.add_query_param('ReservedInstanceId.' + str(i + 1) , ReservedInstanceIds[i]);
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
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+
class PurchaseReservedInstancesOfferingRequest(RpcRequest):
22+
23+
def __init__(self):
24+
RpcRequest.__init__(self, 'Ecs', '2014-05-26', 'PurchaseReservedInstancesOffering','ecs')
25+
26+
def get_ResourceOwnerId(self):
27+
return self.get_query_params().get('ResourceOwnerId')
28+
29+
def set_ResourceOwnerId(self,ResourceOwnerId):
30+
self.add_query_param('ResourceOwnerId',ResourceOwnerId)
31+
32+
def get_ClientToken(self):
33+
return self.get_query_params().get('ClientToken')
34+
35+
def set_ClientToken(self,ClientToken):
36+
self.add_query_param('ClientToken',ClientToken)
37+
38+
def get_Description(self):
39+
return self.get_query_params().get('Description')
40+
41+
def set_Description(self,Description):
42+
self.add_query_param('Description',Description)
43+
44+
def get_ResourceGroupId(self):
45+
return self.get_query_params().get('ResourceGroupId')
46+
47+
def set_ResourceGroupId(self,ResourceGroupId):
48+
self.add_query_param('ResourceGroupId',ResourceGroupId)
49+
50+
def get_Scope(self):
51+
return self.get_query_params().get('Scope')
52+
53+
def set_Scope(self,Scope):
54+
self.add_query_param('Scope',Scope)
55+
56+
def get_InstanceType(self):
57+
return self.get_query_params().get('InstanceType')
58+
59+
def set_InstanceType(self,InstanceType):
60+
self.add_query_param('InstanceType',InstanceType)
61+
62+
def get_Period(self):
63+
return self.get_query_params().get('Period')
64+
65+
def set_Period(self,Period):
66+
self.add_query_param('Period',Period)
67+
68+
def get_ResourceOwnerAccount(self):
69+
return self.get_query_params().get('ResourceOwnerAccount')
70+
71+
def set_ResourceOwnerAccount(self,ResourceOwnerAccount):
72+
self.add_query_param('ResourceOwnerAccount',ResourceOwnerAccount)
73+
74+
def get_OwnerAccount(self):
75+
return self.get_query_params().get('OwnerAccount')
76+
77+
def set_OwnerAccount(self,OwnerAccount):
78+
self.add_query_param('OwnerAccount',OwnerAccount)
79+
80+
def get_OwnerId(self):
81+
return self.get_query_params().get('OwnerId')
82+
83+
def set_OwnerId(self,OwnerId):
84+
self.add_query_param('OwnerId',OwnerId)
85+
86+
def get_PeriodUnit(self):
87+
return self.get_query_params().get('PeriodUnit')
88+
89+
def set_PeriodUnit(self,PeriodUnit):
90+
self.add_query_param('PeriodUnit',PeriodUnit)
91+
92+
def get_OfferingType(self):
93+
return self.get_query_params().get('OfferingType')
94+
95+
def set_OfferingType(self,OfferingType):
96+
self.add_query_param('OfferingType',OfferingType)
97+
98+
def get_ZoneId(self):
99+
return self.get_query_params().get('ZoneId')
100+
101+
def set_ZoneId(self,ZoneId):
102+
self.add_query_param('ZoneId',ZoneId)
103+
104+
def get_ReservedInstanceName(self):
105+
return self.get_query_params().get('ReservedInstanceName')
106+
107+
def set_ReservedInstanceName(self,ReservedInstanceName):
108+
self.add_query_param('ReservedInstanceName',ReservedInstanceName)
109+
110+
def get_InstanceAmount(self):
111+
return self.get_query_params().get('InstanceAmount')
112+
113+
def set_InstanceAmount(self,InstanceAmount):
114+
self.add_query_param('InstanceAmount',InstanceAmount)

0 commit comments

Comments
 (0)