Skip to content

Commit 7001dc9

Browse files
committed
ECS SDK Auto Released By luomeng.lxp,Version:4.16.2
发布日志: 1, Add three APIs for tag. APIs : TagResources, UntagResources, ListTagResources.
1 parent e216964 commit 7001dc9

File tree

8 files changed

+267
-37
lines changed

8 files changed

+267
-37
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-02-27 Version: 4.16.2
2+
1, Add three APIs for tag. APIs : TagResources, UntagResources, ListTagResources.
3+
14
2019-02-18 Version: 4.16.1
25
1, Add DryRun into StartInstance, StopInstance and RebootInstance.
36
2, Add snapshot operations: ExportSnapshot and ImportSnapshot
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.16.1"
1+
__version__ = "4.16.2"

aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/CopyImageRequest.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ def get_ImageId(self):
3535
def set_ImageId(self,ImageId):
3636
self.add_query_param('ImageId',ImageId)
3737

38-
def get_Encrypted(self):
39-
return self.get_query_params().get('Encrypted')
40-
41-
def set_Encrypted(self,Encrypted):
42-
self.add_query_param('Encrypted',Encrypted)
43-
4438
def get_ResourceOwnerAccount(self):
4539
return self.get_query_params().get('ResourceOwnerAccount')
4640

@@ -65,6 +59,18 @@ def get_OwnerAccount(self):
6559
def set_OwnerAccount(self,OwnerAccount):
6660
self.add_query_param('OwnerAccount',OwnerAccount)
6761

62+
def get_OwnerId(self):
63+
return self.get_query_params().get('OwnerId')
64+
65+
def set_OwnerId(self,OwnerId):
66+
self.add_query_param('OwnerId',OwnerId)
67+
68+
def get_Encrypted(self):
69+
return self.get_query_params().get('Encrypted')
70+
71+
def set_Encrypted(self,Encrypted):
72+
self.add_query_param('Encrypted',Encrypted)
73+
6874
def get_Tags(self):
6975
return self.get_query_params().get('Tags')
7076

@@ -76,12 +82,6 @@ def set_Tags(self,Tags):
7682
self.add_query_param('Tag.' + str(i + 1) + '.Key' , Tags[i].get('Key'))
7783

7884

79-
def get_OwnerId(self):
80-
return self.get_query_params().get('OwnerId')
81-
82-
def set_OwnerId(self,OwnerId):
83-
self.add_query_param('OwnerId',OwnerId)
84-
8585
def get_DestinationDescription(self):
8686
return self.get_query_params().get('DestinationDescription')
8787

aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/CreateSecurityGroupRequest.py

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ class CreateSecurityGroupRequest(RpcRequest):
2323
def __init__(self):
2424
RpcRequest.__init__(self, 'Ecs', '2014-05-26', 'CreateSecurityGroup','ecs')
2525

26-
def get_ResourceGroupId(self):
27-
return self.get_query_params().get('ResourceGroupId')
28-
29-
def set_ResourceGroupId(self,ResourceGroupId):
30-
self.add_query_param('ResourceGroupId',ResourceGroupId)
31-
3226
def get_ResourceOwnerId(self):
3327
return self.get_query_params().get('ResourceOwnerId')
3428

@@ -47,12 +41,6 @@ def get_ClientToken(self):
4741
def set_ClientToken(self,ClientToken):
4842
self.add_query_param('ClientToken',ClientToken)
4943

50-
def get_VpcId(self):
51-
return self.get_query_params().get('VpcId')
52-
53-
def set_VpcId(self,VpcId):
54-
self.add_query_param('VpcId',VpcId)
55-
5644
def get_OwnerAccount(self):
5745
return self.get_query_params().get('OwnerAccount')
5846

@@ -65,17 +53,6 @@ def get_Description(self):
6553
def set_Description(self,Description):
6654
self.add_query_param('Description',Description)
6755

68-
def get_Tags(self):
69-
return self.get_query_params().get('Tags')
70-
71-
def set_Tags(self,Tags):
72-
for i in range(len(Tags)):
73-
if Tags[i].get('Value') is not None:
74-
self.add_query_param('Tag.' + str(i + 1) + '.Value' , Tags[i].get('Value'))
75-
if Tags[i].get('Key') is not None:
76-
self.add_query_param('Tag.' + str(i + 1) + '.Key' , Tags[i].get('Key'))
77-
78-
7956
def get_OwnerId(self):
8057
return self.get_query_params().get('OwnerId')
8158

@@ -86,4 +63,26 @@ def get_SecurityGroupName(self):
8663
return self.get_query_params().get('SecurityGroupName')
8764

8865
def set_SecurityGroupName(self,SecurityGroupName):
89-
self.add_query_param('SecurityGroupName',SecurityGroupName)
66+
self.add_query_param('SecurityGroupName',SecurityGroupName)
67+
68+
def get_ResourceGroupId(self):
69+
return self.get_query_params().get('ResourceGroupId')
70+
71+
def set_ResourceGroupId(self,ResourceGroupId):
72+
self.add_query_param('ResourceGroupId',ResourceGroupId)
73+
74+
def get_VpcId(self):
75+
return self.get_query_params().get('VpcId')
76+
77+
def set_VpcId(self,VpcId):
78+
self.add_query_param('VpcId',VpcId)
79+
80+
def get_Tags(self):
81+
return self.get_query_params().get('Tags')
82+
83+
def set_Tags(self,Tags):
84+
for i in range(len(Tags)):
85+
if Tags[i].get('Value') is not None:
86+
self.add_query_param('Tag.' + str(i + 1) + '.Value' , Tags[i].get('Value'))
87+
if Tags[i].get('Key') is not None:
88+
self.add_query_param('Tag.' + str(i + 1) + '.Key' , Tags[i].get('Key'))
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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 ListTagResourcesRequest(RpcRequest):
22+
23+
def __init__(self):
24+
RpcRequest.__init__(self, 'Ecs', '2014-05-26', 'ListTagResources','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_NextToken(self):
33+
return self.get_query_params().get('NextToken')
34+
35+
def set_NextToken(self,NextToken):
36+
self.add_query_param('NextToken',NextToken)
37+
38+
def get_Tags(self):
39+
return self.get_query_params().get('Tags')
40+
41+
def set_Tags(self,Tags):
42+
for i in range(len(Tags)):
43+
if Tags[i].get('Key') is not None:
44+
self.add_query_param('Tag.' + str(i + 1) + '.Key' , Tags[i].get('Key'))
45+
if Tags[i].get('Value') is not None:
46+
self.add_query_param('Tag.' + str(i + 1) + '.Value' , Tags[i].get('Value'))
47+
48+
49+
def get_ResourceIds(self):
50+
return self.get_query_params().get('ResourceIds')
51+
52+
def set_ResourceIds(self,ResourceIds):
53+
for i in range(len(ResourceIds)):
54+
if ResourceIds[i] is not None:
55+
self.add_query_param('ResourceId.' + str(i + 1) , ResourceIds[i]);
56+
57+
def get_ResourceOwnerAccount(self):
58+
return self.get_query_params().get('ResourceOwnerAccount')
59+
60+
def set_ResourceOwnerAccount(self,ResourceOwnerAccount):
61+
self.add_query_param('ResourceOwnerAccount',ResourceOwnerAccount)
62+
63+
def get_OwnerAccount(self):
64+
return self.get_query_params().get('OwnerAccount')
65+
66+
def set_OwnerAccount(self,OwnerAccount):
67+
self.add_query_param('OwnerAccount',OwnerAccount)
68+
69+
def get_OwnerId(self):
70+
return self.get_query_params().get('OwnerId')
71+
72+
def set_OwnerId(self,OwnerId):
73+
self.add_query_param('OwnerId',OwnerId)
74+
75+
def get_ResourceType(self):
76+
return self.get_query_params().get('ResourceType')
77+
78+
def set_ResourceType(self,ResourceType):
79+
self.add_query_param('ResourceType',ResourceType)

aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/StartInstanceRequest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ class StartInstanceRequest(RpcRequest):
2323
def __init__(self):
2424
RpcRequest.__init__(self, 'Ecs', '2014-05-26', 'StartInstance','ecs')
2525

26+
def get_SourceRegionId(self):
27+
return self.get_query_params().get('SourceRegionId')
28+
29+
def set_SourceRegionId(self,SourceRegionId):
30+
self.add_query_param('SourceRegionId',SourceRegionId)
31+
2632
def get_InitLocalDisk(self):
2733
return self.get_query_params().get('InitLocalDisk')
2834

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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 TagResourcesRequest(RpcRequest):
22+
23+
def __init__(self):
24+
RpcRequest.__init__(self, 'Ecs', '2014-05-26', 'TagResources','ecs')
25+
26+
def get_Tags(self):
27+
return self.get_query_params().get('Tags')
28+
29+
def set_Tags(self,Tags):
30+
for i in range(len(Tags)):
31+
if Tags[i].get('Key') is not None:
32+
self.add_query_param('Tag.' + str(i + 1) + '.Key' , Tags[i].get('Key'))
33+
if Tags[i].get('Value') is not None:
34+
self.add_query_param('Tag.' + str(i + 1) + '.Value' , Tags[i].get('Value'))
35+
36+
37+
def get_ResourceIds(self):
38+
return self.get_query_params().get('ResourceIds')
39+
40+
def set_ResourceIds(self,ResourceIds):
41+
for i in range(len(ResourceIds)):
42+
if ResourceIds[i] is not None:
43+
self.add_query_param('ResourceId.' + str(i + 1) , ResourceIds[i]);
44+
45+
def get_ResourceOwnerAccount(self):
46+
return self.get_query_params().get('ResourceOwnerAccount')
47+
48+
def set_ResourceOwnerAccount(self,ResourceOwnerAccount):
49+
self.add_query_param('ResourceOwnerAccount',ResourceOwnerAccount)
50+
51+
def get_OwnerAccount(self):
52+
return self.get_query_params().get('OwnerAccount')
53+
54+
def set_OwnerAccount(self,OwnerAccount):
55+
self.add_query_param('OwnerAccount',OwnerAccount)
56+
57+
def get_OwnerId(self):
58+
return self.get_query_params().get('OwnerId')
59+
60+
def set_OwnerId(self,OwnerId):
61+
self.add_query_param('OwnerId',OwnerId)
62+
63+
def get_ResourceType(self):
64+
return self.get_query_params().get('ResourceType')
65+
66+
def set_ResourceType(self,ResourceType):
67+
self.add_query_param('ResourceType',ResourceType)
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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 UntagResourcesRequest(RpcRequest):
22+
23+
def __init__(self):
24+
RpcRequest.__init__(self, 'Ecs', '2014-05-26', 'UntagResources','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_All(self):
33+
return self.get_query_params().get('All')
34+
35+
def set_All(self,All):
36+
self.add_query_param('All',All)
37+
38+
def get_ResourceIds(self):
39+
return self.get_query_params().get('ResourceIds')
40+
41+
def set_ResourceIds(self,ResourceIds):
42+
for i in range(len(ResourceIds)):
43+
if ResourceIds[i] is not None:
44+
self.add_query_param('ResourceId.' + str(i + 1) , ResourceIds[i]);
45+
46+
def get_ResourceOwnerAccount(self):
47+
return self.get_query_params().get('ResourceOwnerAccount')
48+
49+
def set_ResourceOwnerAccount(self,ResourceOwnerAccount):
50+
self.add_query_param('ResourceOwnerAccount',ResourceOwnerAccount)
51+
52+
def get_OwnerAccount(self):
53+
return self.get_query_params().get('OwnerAccount')
54+
55+
def set_OwnerAccount(self,OwnerAccount):
56+
self.add_query_param('OwnerAccount',OwnerAccount)
57+
58+
def get_OwnerId(self):
59+
return self.get_query_params().get('OwnerId')
60+
61+
def set_OwnerId(self,OwnerId):
62+
self.add_query_param('OwnerId',OwnerId)
63+
64+
def get_ResourceType(self):
65+
return self.get_query_params().get('ResourceType')
66+
67+
def set_ResourceType(self,ResourceType):
68+
self.add_query_param('ResourceType',ResourceType)
69+
70+
def get_TagKeys(self):
71+
return self.get_query_params().get('TagKeys')
72+
73+
def set_TagKeys(self,TagKeys):
74+
for i in range(len(TagKeys)):
75+
if TagKeys[i] is not None:
76+
self.add_query_param('TagKey.' + str(i + 1) , TagKeys[i]);

0 commit comments

Comments
 (0)