Skip to content

Commit a3c3019

Browse files
committed
RAM role support MaxSessionDuration.
1 parent a6a2d7f commit a3c3019

File tree

70 files changed

+763
-474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+763
-474
lines changed

aliyun-python-sdk-ram/ChangeLog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2020-03-20 Version: 3.2.0
2+
- RAM role support MaxSessionDuration.
3+
14
2019-06-19 Version: 3.1.0
25
1, Add DefaultPolicyVersion as return field to GetPolicy interface, Facilitating to get policy document from this interface.
36
2, Add RotateStrategy as input field to CreatePolicyVersion interface for rotating policy version when reaching policy version limit.

aliyun-python-sdk-ram/README.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
=============================================================
12
aliyun-python-sdk-ram
2-
This is the ram module of Aliyun Python SDK.
3+
=============================================================
4+
5+
.. This is the ram module of Aliyun Python SDK.
36
47
Aliyun Python SDK is the official software development kit. It makes things easy to integrate your Python application, library, or script with Aliyun services.
58

69
This module works on Python versions:
710

811
2.6.5 and greater
9-
Documentation:
1012

11-
Please visit http://develop.aliyun.com/sdk/python
13+
**Documentation:**
14+
15+
Please visit `http://develop.aliyun.com/sdk/python <http://develop.aliyun.com/sdk/python>`_
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '3.1.0'
1+
__version__ = '3.2.0'
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
# #
10+
# # http://www.apache.org/licenses/LICENSE-2.0
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+
21+
class EndpointData():
22+
def __init__(self):
23+
self.endpoint_map = {}
24+
self.endpoint_regional = "central"
25+
26+
def getEndpointMap(self):
27+
return self.endpoint_map
28+
29+
def getEndpointRegional(self):
30+
return self.endpoint_regional
31+
32+
33+
endpoint_data = EndpointData()

aliyun-python-sdk-ram/aliyunsdkram/request/v20150501/AddUserToGroupRequest.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
88
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
109
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
1111
#
1212
#
1313
# Unless required by applicable law or agreed to in writing,
@@ -18,11 +18,18 @@
1818
# under the License.
1919

2020
from aliyunsdkcore.request import RpcRequest
21+
from aliyunsdkram.endpoint import endpoint_data
22+
2123
class AddUserToGroupRequest(RpcRequest):
2224

2325
def __init__(self):
24-
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'AddUserToGroup')
25-
self.set_protocol_type('https')
26+
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'AddUserToGroup','Ram')
27+
self.set_protocol_type('https')
28+
if hasattr(self, "endpoint_map"):
29+
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
30+
if hasattr(self, "endpoint_regional"):
31+
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
32+
2633

2734
def get_GroupName(self):
2835
return self.get_query_params().get('GroupName')

aliyun-python-sdk-ram/aliyunsdkram/request/v20150501/AttachPolicyToGroupRequest.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
88
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
109
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
1111
#
1212
#
1313
# Unless required by applicable law or agreed to in writing,
@@ -18,26 +18,33 @@
1818
# under the License.
1919

2020
from aliyunsdkcore.request import RpcRequest
21+
from aliyunsdkram.endpoint import endpoint_data
22+
2123
class AttachPolicyToGroupRequest(RpcRequest):
2224

2325
def __init__(self):
24-
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'AttachPolicyToGroup')
25-
self.set_protocol_type('https')
26+
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'AttachPolicyToGroup','Ram')
27+
self.set_protocol_type('https')
28+
if hasattr(self, "endpoint_map"):
29+
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
30+
if hasattr(self, "endpoint_regional"):
31+
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
32+
2633

2734
def get_PolicyType(self):
2835
return self.get_query_params().get('PolicyType')
2936

3037
def set_PolicyType(self,PolicyType):
3138
self.add_query_param('PolicyType',PolicyType)
3239

33-
def get_PolicyName(self):
34-
return self.get_query_params().get('PolicyName')
35-
36-
def set_PolicyName(self,PolicyName):
37-
self.add_query_param('PolicyName',PolicyName)
38-
3940
def get_GroupName(self):
4041
return self.get_query_params().get('GroupName')
4142

4243
def set_GroupName(self,GroupName):
43-
self.add_query_param('GroupName',GroupName)
44+
self.add_query_param('GroupName',GroupName)
45+
46+
def get_PolicyName(self):
47+
return self.get_query_params().get('PolicyName')
48+
49+
def set_PolicyName(self,PolicyName):
50+
self.add_query_param('PolicyName',PolicyName)

aliyun-python-sdk-ram/aliyunsdkram/request/v20150501/AttachPolicyToRoleRequest.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
88
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
109
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
1111
#
1212
#
1313
# Unless required by applicable law or agreed to in writing,
@@ -18,11 +18,18 @@
1818
# under the License.
1919

2020
from aliyunsdkcore.request import RpcRequest
21+
from aliyunsdkram.endpoint import endpoint_data
22+
2123
class AttachPolicyToRoleRequest(RpcRequest):
2224

2325
def __init__(self):
24-
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'AttachPolicyToRole')
25-
self.set_protocol_type('https')
26+
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'AttachPolicyToRole','Ram')
27+
self.set_protocol_type('https')
28+
if hasattr(self, "endpoint_map"):
29+
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
30+
if hasattr(self, "endpoint_regional"):
31+
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
32+
2633

2734
def get_PolicyType(self):
2835
return self.get_query_params().get('PolicyType')

aliyun-python-sdk-ram/aliyunsdkram/request/v20150501/AttachPolicyToUserRequest.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
88
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
109
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
1111
#
1212
#
1313
# Unless required by applicable law or agreed to in writing,
@@ -18,11 +18,18 @@
1818
# under the License.
1919

2020
from aliyunsdkcore.request import RpcRequest
21+
from aliyunsdkram.endpoint import endpoint_data
22+
2123
class AttachPolicyToUserRequest(RpcRequest):
2224

2325
def __init__(self):
24-
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'AttachPolicyToUser')
25-
self.set_protocol_type('https')
26+
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'AttachPolicyToUser','Ram')
27+
self.set_protocol_type('https')
28+
if hasattr(self, "endpoint_map"):
29+
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
30+
if hasattr(self, "endpoint_regional"):
31+
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
32+
2633

2734
def get_PolicyType(self):
2835
return self.get_query_params().get('PolicyType')

aliyun-python-sdk-ram/aliyunsdkram/request/v20150501/BindMFADeviceRequest.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
88
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
109
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
1111
#
1212
#
1313
# Unless required by applicable law or agreed to in writing,
@@ -18,11 +18,18 @@
1818
# under the License.
1919

2020
from aliyunsdkcore.request import RpcRequest
21+
from aliyunsdkram.endpoint import endpoint_data
22+
2123
class BindMFADeviceRequest(RpcRequest):
2224

2325
def __init__(self):
24-
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'BindMFADevice')
25-
self.set_protocol_type('https')
26+
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'BindMFADevice','Ram')
27+
self.set_protocol_type('https')
28+
if hasattr(self, "endpoint_map"):
29+
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
30+
if hasattr(self, "endpoint_regional"):
31+
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
32+
2633

2734
def get_SerialNumber(self):
2835
return self.get_query_params().get('SerialNumber')

aliyun-python-sdk-ram/aliyunsdkram/request/v20150501/ChangePasswordRequest.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
88
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
109
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
1111
#
1212
#
1313
# Unless required by applicable law or agreed to in writing,
@@ -18,11 +18,18 @@
1818
# under the License.
1919

2020
from aliyunsdkcore.request import RpcRequest
21+
from aliyunsdkram.endpoint import endpoint_data
22+
2123
class ChangePasswordRequest(RpcRequest):
2224

2325
def __init__(self):
24-
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'ChangePassword')
25-
self.set_protocol_type('https')
26+
RpcRequest.__init__(self, 'Ram', '2015-05-01', 'ChangePassword','Ram')
27+
self.set_protocol_type('https')
28+
if hasattr(self, "endpoint_map"):
29+
setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
30+
if hasattr(self, "endpoint_regional"):
31+
setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
32+
2633

2734
def get_OldPassword(self):
2835
return self.get_query_params().get('OldPassword')

0 commit comments

Comments
 (0)