Skip to content

Commit eeeb79f

Browse files
committed
POLARDB SDK Auto Released By zhigang.xzg,Version:1.3.0
发布日志: 1, Add interface of tag. 2, Add tag info in DescribeDBClusters and DescribeDBClusterAttribute.
1 parent ebc3d02 commit eeeb79f

File tree

7 files changed

+245
-9
lines changed

7 files changed

+245
-9
lines changed

aliyun-python-sdk-polardb/ChangeLog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2019-02-26 Version: 1.3.0
2+
1, Add interface of tag.
3+
2, Add tag info in DescribeDBClusters and DescribeDBClusterAttribute.
4+
15
2018-12-25 Version: 1.2.0
26
1, Add interface of endpoint.
37
2, Add interface of cluster parameter.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.2.0"
1+
__version__ = "1.3.0"

aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/DescribeDBClustersRequest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ def get_PageSize(self):
7777
def set_PageSize(self,PageSize):
7878
self.add_query_param('PageSize',PageSize)
7979

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'))
89+
90+
8091
def get_DBClusterIds(self):
8192
return self.get_query_params().get('DBClusterIds')
8293

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, 'polardb', '2017-08-01', 'ListTagResources','polardb')
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_ResourceIds(self):
33+
return self.get_query_params().get('ResourceIds')
34+
35+
def set_ResourceIds(self,ResourceIds):
36+
for i in range(len(ResourceIds)):
37+
if ResourceIds[i] is not None:
38+
self.add_query_param('ResourceId.' + str(i + 1) , ResourceIds[i]);
39+
40+
def get_ResourceOwnerAccount(self):
41+
return self.get_query_params().get('ResourceOwnerAccount')
42+
43+
def set_ResourceOwnerAccount(self,ResourceOwnerAccount):
44+
self.add_query_param('ResourceOwnerAccount',ResourceOwnerAccount)
45+
46+
def get_NextToken(self):
47+
return self.get_query_params().get('NextToken')
48+
49+
def set_NextToken(self,NextToken):
50+
self.add_query_param('NextToken',NextToken)
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_Tags(self):
59+
return self.get_query_params().get('Tags')
60+
61+
def set_Tags(self,Tags):
62+
for i in range(len(Tags)):
63+
if Tags[i].get('Value') is not None:
64+
self.add_query_param('Tag.' + str(i + 1) + '.Value' , Tags[i].get('Value'))
65+
if Tags[i].get('Key') is not None:
66+
self.add_query_param('Tag.' + str(i + 1) + '.Key' , Tags[i].get('Key'))
67+
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)
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 TagResourcesRequest(RpcRequest):
22+
23+
def __init__(self):
24+
RpcRequest.__init__(self, 'polardb', '2017-08-01', 'TagResources','polardb')
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_ResourceIds(self):
33+
return self.get_query_params().get('ResourceIds')
34+
35+
def set_ResourceIds(self,ResourceIds):
36+
for i in range(len(ResourceIds)):
37+
if ResourceIds[i] is not None:
38+
self.add_query_param('ResourceId.' + str(i + 1) , ResourceIds[i]);
39+
40+
def get_ResourceOwnerAccount(self):
41+
return self.get_query_params().get('ResourceOwnerAccount')
42+
43+
def set_ResourceOwnerAccount(self,ResourceOwnerAccount):
44+
self.add_query_param('ResourceOwnerAccount',ResourceOwnerAccount)
45+
46+
def get_OwnerAccount(self):
47+
return self.get_query_params().get('OwnerAccount')
48+
49+
def set_OwnerAccount(self,OwnerAccount):
50+
self.add_query_param('OwnerAccount',OwnerAccount)
51+
52+
def get_Tags(self):
53+
return self.get_query_params().get('Tags')
54+
55+
def set_Tags(self,Tags):
56+
for i in range(len(Tags)):
57+
if Tags[i].get('Value') is not None:
58+
self.add_query_param('Tag.' + str(i + 1) + '.Value' , Tags[i].get('Value'))
59+
if Tags[i].get('Key') is not None:
60+
self.add_query_param('Tag.' + str(i + 1) + '.Key' , Tags[i].get('Key'))
61+
62+
63+
def get_OwnerId(self):
64+
return self.get_query_params().get('OwnerId')
65+
66+
def set_OwnerId(self,OwnerId):
67+
self.add_query_param('OwnerId',OwnerId)
68+
69+
def get_ResourceType(self):
70+
return self.get_query_params().get('ResourceType')
71+
72+
def set_ResourceType(self,ResourceType):
73+
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, 'polardb', '2017-08-01', 'UntagResources','polardb')
25+
26+
def get_All(self):
27+
return self.get_query_params().get('All')
28+
29+
def set_All(self,All):
30+
self.add_query_param('All',All)
31+
32+
def get_ResourceOwnerId(self):
33+
return self.get_query_params().get('ResourceOwnerId')
34+
35+
def set_ResourceOwnerId(self,ResourceOwnerId):
36+
self.add_query_param('ResourceOwnerId',ResourceOwnerId)
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_TagKeys(self):
65+
return self.get_query_params().get('TagKeys')
66+
67+
def set_TagKeys(self,TagKeys):
68+
for i in range(len(TagKeys)):
69+
if TagKeys[i] is not None:
70+
self.add_query_param('TagKey.' + str(i + 1) , TagKeys[i]);
71+
72+
def get_ResourceType(self):
73+
return self.get_query_params().get('ResourceType')
74+
75+
def set_ResourceType(self,ResourceType):
76+
self.add_query_param('ResourceType',ResourceType)

aliyun-python-sdk-polardb/setup.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@
4646
finally:
4747
desc_file.close()
4848

49-
requires = []
50-
51-
if sys.version_info < (3, 3):
52-
requires.append("aliyun-python-sdk-core>=2.0.2")
53-
else:
54-
requires.append("aliyun-python-sdk-core-v3>=2.3.5")
55-
5649
setup(
5750
name=NAME,
5851
version=VERSION,
@@ -66,7 +59,7 @@
6659
packages=find_packages(exclude=["tests*"]),
6760
include_package_data=True,
6861
platforms="any",
69-
install_requires=requires,
62+
install_requires=["aliyun-python-sdk-core>=2.11.5",],
7063
classifiers=(
7164
"Development Status :: 4 - Beta",
7265
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)