baiducloud-python-sdk-iam 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- baiducloud_python_sdk_iam/__init__.py +5 -0
- baiducloud_python_sdk_iam/api/__init__.py +0 -0
- baiducloud_python_sdk_iam/api/iam_client.py +1507 -0
- baiducloud_python_sdk_iam/models/__init__.py +83 -0
- baiducloud_python_sdk_iam/models/access_key.py +82 -0
- baiducloud_python_sdk_iam/models/account_count_info.py +74 -0
- baiducloud_python_sdk_iam/models/account_limit_info.py +142 -0
- baiducloud_python_sdk_iam/models/add_user_to_group_request.py +64 -0
- baiducloud_python_sdk_iam/models/associate_group_permissions_request.py +70 -0
- baiducloud_python_sdk_iam/models/associate_role_permissions_request.py +70 -0
- baiducloud_python_sdk_iam/models/associate_user_permissions_request.py +70 -0
- baiducloud_python_sdk_iam/models/attached_entities.py +82 -0
- baiducloud_python_sdk_iam/models/change_sub_user_password_request.py +66 -0
- baiducloud_python_sdk_iam/models/create_access_key_request.py +58 -0
- baiducloud_python_sdk_iam/models/create_apikey_permanently_valid_request.py +76 -0
- baiducloud_python_sdk_iam/models/create_group_request.py +68 -0
- baiducloud_python_sdk_iam/models/create_role_request.py +76 -0
- baiducloud_python_sdk_iam/models/create_strategy_request.py +76 -0
- baiducloud_python_sdk_iam/models/create_user_request.py +68 -0
- baiducloud_python_sdk_iam/models/decoding_apikey_permanently_valid_request.py +68 -0
- baiducloud_python_sdk_iam/models/delete_access_key_request.py +64 -0
- baiducloud_python_sdk_iam/models/delete_apikey_permanently_valid_request.py +68 -0
- baiducloud_python_sdk_iam/models/delete_group_request.py +58 -0
- baiducloud_python_sdk_iam/models/delete_login_profile_request.py +58 -0
- baiducloud_python_sdk_iam/models/delete_role_request.py +58 -0
- baiducloud_python_sdk_iam/models/delete_strategy_request.py +58 -0
- baiducloud_python_sdk_iam/models/delete_user_request.py +58 -0
- baiducloud_python_sdk_iam/models/disable_access_key_request.py +64 -0
- baiducloud_python_sdk_iam/models/enable_access_key_request.py +64 -0
- baiducloud_python_sdk_iam/models/get_login_profile_request.py +58 -0
- baiducloud_python_sdk_iam/models/get_session_api_key_request.py +64 -0
- baiducloud_python_sdk_iam/models/get_user_request.py +58 -0
- baiducloud_python_sdk_iam/models/group_model.py +82 -0
- baiducloud_python_sdk_iam/models/idp.py +90 -0
- baiducloud_python_sdk_iam/models/list_access_key_request.py +58 -0
- baiducloud_python_sdk_iam/models/list_access_key_response.py +62 -0
- baiducloud_python_sdk_iam/models/list_all_subjects_granted_permissions_request.py +58 -0
- baiducloud_python_sdk_iam/models/list_all_subjects_granted_permissions_response.py +94 -0
- baiducloud_python_sdk_iam/models/list_groups_response.py +62 -0
- baiducloud_python_sdk_iam/models/list_roles_response.py +62 -0
- baiducloud_python_sdk_iam/models/list_strategies_request.py +64 -0
- baiducloud_python_sdk_iam/models/list_strategies_response.py +64 -0
- baiducloud_python_sdk_iam/models/list_the_permissions_of_roles_request.py +58 -0
- baiducloud_python_sdk_iam/models/list_the_permissions_of_roles_response.py +64 -0
- baiducloud_python_sdk_iam/models/list_the_permissions_of_the_group_request.py +58 -0
- baiducloud_python_sdk_iam/models/list_the_permissions_of_the_group_response.py +62 -0
- baiducloud_python_sdk_iam/models/list_the_subjects_granted_permissions_request.py +64 -0
- baiducloud_python_sdk_iam/models/list_the_subjects_granted_permissions_response.py +94 -0
- baiducloud_python_sdk_iam/models/list_the_user_s_permissions_request.py +58 -0
- baiducloud_python_sdk_iam/models/list_the_user_s_permissions_response.py +64 -0
- baiducloud_python_sdk_iam/models/list_user_groups_request.py +58 -0
- baiducloud_python_sdk_iam/models/list_user_groups_response.py +64 -0
- baiducloud_python_sdk_iam/models/list_user_response.py +64 -0
- baiducloud_python_sdk_iam/models/list_users_within_the_group_request.py +58 -0
- baiducloud_python_sdk_iam/models/list_users_within_the_group_response.py +62 -0
- baiducloud_python_sdk_iam/models/modify_sub_user_operation_protection_request.py +76 -0
- baiducloud_python_sdk_iam/models/obtain_a_list_of_permanently_valid_apikeys_request.py +84 -0
- baiducloud_python_sdk_iam/models/policy_model.py +108 -0
- baiducloud_python_sdk_iam/models/query_apikey_details_permanently_valid_request.py +68 -0
- baiducloud_python_sdk_iam/models/query_group_request.py +58 -0
- baiducloud_python_sdk_iam/models/query_role_request.py +58 -0
- baiducloud_python_sdk_iam/models/query_strategy_request.py +64 -0
- baiducloud_python_sdk_iam/models/query_sub_user_idp_response.py +64 -0
- baiducloud_python_sdk_iam/models/query_summary_of_main_account_response.py +79 -0
- baiducloud_python_sdk_iam/models/query_the_last_usage_time_of_accesskey_request.py +58 -0
- baiducloud_python_sdk_iam/models/query_the_last_usage_time_of_accesskey_response.py +69 -0
- baiducloud_python_sdk_iam/models/remove_group_permissions_request.py +70 -0
- baiducloud_python_sdk_iam/models/remove_role_permissions_request.py +70 -0
- baiducloud_python_sdk_iam/models/remove_user_from_the_group_request.py +64 -0
- baiducloud_python_sdk_iam/models/remove_user_permissions_request.py +70 -0
- baiducloud_python_sdk_iam/models/role_model.py +90 -0
- baiducloud_python_sdk_iam/models/unbind_sub_user_virtual_mfa_request.py +64 -0
- baiducloud_python_sdk_iam/models/update_apikey_permanently_valid_request.py +76 -0
- baiducloud_python_sdk_iam/models/update_group_request.py +74 -0
- baiducloud_python_sdk_iam/models/update_login_profile_request.py +124 -0
- baiducloud_python_sdk_iam/models/update_role_request.py +82 -0
- baiducloud_python_sdk_iam/models/update_strategy_request.py +82 -0
- baiducloud_python_sdk_iam/models/update_sub_user_idp_request.py +76 -0
- baiducloud_python_sdk_iam/models/update_sub_user_idp_response.py +64 -0
- baiducloud_python_sdk_iam/models/update_sub_user_idp_status_request.py +58 -0
- baiducloud_python_sdk_iam/models/update_sub_user_idp_status_response.py +62 -0
- baiducloud_python_sdk_iam/models/update_user_request.py +82 -0
- baiducloud_python_sdk_iam/models/user_model.py +115 -0
- baiducloud_python_sdk_iam-0.0.1.dist-info/LICENSE +177 -0
- baiducloud_python_sdk_iam-0.0.1.dist-info/METADATA +76 -0
- baiducloud_python_sdk_iam-0.0.1.dist-info/RECORD +88 -0
- baiducloud_python_sdk_iam-0.0.1.dist-info/WHEEL +5 -0
- baiducloud_python_sdk_iam-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ListStrategiesResponse information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
from baiducloud_python_sdk_iam.models.policy_model import PolicyModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ListStrategiesResponse(BceResponse):
|
|
11
|
+
"""
|
|
12
|
+
ListStrategiesResponse
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, policies=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListStrategiesResponse instance.
|
|
18
|
+
|
|
19
|
+
:param policies: 策略对象的列表
|
|
20
|
+
:type policies: List[PolicyModel] (optional)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.policies = policies
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the model instance to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
Includes metadata from the parent BceResponse class.
|
|
32
|
+
|
|
33
|
+
:return: Dictionary representation of the model
|
|
34
|
+
:rtype: dict
|
|
35
|
+
"""
|
|
36
|
+
_map = super().to_dict()
|
|
37
|
+
if _map is not None:
|
|
38
|
+
return _map
|
|
39
|
+
result = dict()
|
|
40
|
+
if self.metadata is not None:
|
|
41
|
+
result['metadata'] = dict(self.metadata)
|
|
42
|
+
if self.policies is not None:
|
|
43
|
+
result['policies'] = [i.to_dict() for i in self.policies]
|
|
44
|
+
return result
|
|
45
|
+
|
|
46
|
+
def from_dict(self, m):
|
|
47
|
+
"""
|
|
48
|
+
Populate the model instance from a dictionary.
|
|
49
|
+
|
|
50
|
+
Nested dictionaries are recursively converted to model objects.
|
|
51
|
+
|
|
52
|
+
:param m: Dictionary containing model data
|
|
53
|
+
:type m: dict
|
|
54
|
+
|
|
55
|
+
:return: Self reference for method chaining
|
|
56
|
+
:rtype: ListStrategiesResponse
|
|
57
|
+
|
|
58
|
+
:raises TypeError: If input is not a dictionary type
|
|
59
|
+
:raises ValueError: If nested model conversion fails
|
|
60
|
+
"""
|
|
61
|
+
m = m or dict()
|
|
62
|
+
if m.get('policies') is not None:
|
|
63
|
+
self.policies = [PolicyModel().from_dict(i) for i in m.get('policies')]
|
|
64
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListThePermissionsOfRolesRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListThePermissionsOfRolesRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListThePermissionsOfRolesRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, role_name):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListThePermissionsOfRolesRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param role_name: role_name parameter
|
|
20
|
+
:type role_name: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.role_name = role_name
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the request entity to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the request
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
return result
|
|
39
|
+
|
|
40
|
+
def from_dict(self, m):
|
|
41
|
+
"""
|
|
42
|
+
Populate the request entity from a dictionary.
|
|
43
|
+
|
|
44
|
+
Nested dictionaries are recursively converted to model objects.
|
|
45
|
+
|
|
46
|
+
:param m: Dictionary containing request data
|
|
47
|
+
:type m: dict
|
|
48
|
+
|
|
49
|
+
:return: Self reference for method chaining
|
|
50
|
+
:rtype: ListThePermissionsOfRolesRequest
|
|
51
|
+
|
|
52
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
53
|
+
:raises ValueError: If nested model conversion fails
|
|
54
|
+
"""
|
|
55
|
+
m = m or dict()
|
|
56
|
+
if m.get('roleName') is not None:
|
|
57
|
+
self.role_name = m.get('roleName')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ListThePermissionsOfRolesResponse information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
from baiducloud_python_sdk_iam.models.policy_model import PolicyModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ListThePermissionsOfRolesResponse(BceResponse):
|
|
11
|
+
"""
|
|
12
|
+
ListThePermissionsOfRolesResponse
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, policies=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListThePermissionsOfRolesResponse instance.
|
|
18
|
+
|
|
19
|
+
:param policies: 策略对象的列表
|
|
20
|
+
:type policies: List[PolicyModel] (optional)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.policies = policies
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the model instance to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
Includes metadata from the parent BceResponse class.
|
|
32
|
+
|
|
33
|
+
:return: Dictionary representation of the model
|
|
34
|
+
:rtype: dict
|
|
35
|
+
"""
|
|
36
|
+
_map = super().to_dict()
|
|
37
|
+
if _map is not None:
|
|
38
|
+
return _map
|
|
39
|
+
result = dict()
|
|
40
|
+
if self.metadata is not None:
|
|
41
|
+
result['metadata'] = dict(self.metadata)
|
|
42
|
+
if self.policies is not None:
|
|
43
|
+
result['policies'] = [i.to_dict() for i in self.policies]
|
|
44
|
+
return result
|
|
45
|
+
|
|
46
|
+
def from_dict(self, m):
|
|
47
|
+
"""
|
|
48
|
+
Populate the model instance from a dictionary.
|
|
49
|
+
|
|
50
|
+
Nested dictionaries are recursively converted to model objects.
|
|
51
|
+
|
|
52
|
+
:param m: Dictionary containing model data
|
|
53
|
+
:type m: dict
|
|
54
|
+
|
|
55
|
+
:return: Self reference for method chaining
|
|
56
|
+
:rtype: ListThePermissionsOfRolesResponse
|
|
57
|
+
|
|
58
|
+
:raises TypeError: If input is not a dictionary type
|
|
59
|
+
:raises ValueError: If nested model conversion fails
|
|
60
|
+
"""
|
|
61
|
+
m = m or dict()
|
|
62
|
+
if m.get('policies') is not None:
|
|
63
|
+
self.policies = [PolicyModel().from_dict(i) for i in m.get('policies')]
|
|
64
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListThePermissionsOfTheGroupRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListThePermissionsOfTheGroupRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListThePermissionsOfTheGroupRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, group_name):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListThePermissionsOfTheGroupRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param group_name: group_name parameter
|
|
20
|
+
:type group_name: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.group_name = group_name
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the request entity to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the request
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
return result
|
|
39
|
+
|
|
40
|
+
def from_dict(self, m):
|
|
41
|
+
"""
|
|
42
|
+
Populate the request entity from a dictionary.
|
|
43
|
+
|
|
44
|
+
Nested dictionaries are recursively converted to model objects.
|
|
45
|
+
|
|
46
|
+
:param m: Dictionary containing request data
|
|
47
|
+
:type m: dict
|
|
48
|
+
|
|
49
|
+
:return: Self reference for method chaining
|
|
50
|
+
:rtype: ListThePermissionsOfTheGroupRequest
|
|
51
|
+
|
|
52
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
53
|
+
:raises ValueError: If nested model conversion fails
|
|
54
|
+
"""
|
|
55
|
+
m = m or dict()
|
|
56
|
+
if m.get('groupName') is not None:
|
|
57
|
+
self.group_name = m.get('groupName')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListThePermissionsOfTheGroupResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_iam.models.policy_model import PolicyModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListThePermissionsOfTheGroupResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListThePermissionsOfTheGroupResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, policies=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize ListThePermissionsOfTheGroupResponse response.
|
|
17
|
+
|
|
18
|
+
:param policies: 策略对象的列表
|
|
19
|
+
:type policies: List[PolicyModel] (optional)
|
|
20
|
+
"""
|
|
21
|
+
super().__init__()
|
|
22
|
+
self.policies = policies
|
|
23
|
+
|
|
24
|
+
def to_dict(self):
|
|
25
|
+
"""
|
|
26
|
+
Convert the response instance to a dictionary representation.
|
|
27
|
+
|
|
28
|
+
Includes metadata from the parent BceResponse class.
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the response
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
if self.metadata is not None:
|
|
39
|
+
result['metadata'] = dict(self.metadata)
|
|
40
|
+
if self.policies is not None:
|
|
41
|
+
result['policies'] = [i.to_dict() for i in self.policies]
|
|
42
|
+
return result
|
|
43
|
+
|
|
44
|
+
def from_dict(self, m):
|
|
45
|
+
"""
|
|
46
|
+
Populate the response instance from a dictionary.
|
|
47
|
+
|
|
48
|
+
Nested dictionaries are recursively converted to model objects.
|
|
49
|
+
|
|
50
|
+
:param m: Dictionary containing response data
|
|
51
|
+
:type m: dict
|
|
52
|
+
|
|
53
|
+
:return: Self reference for method chaining
|
|
54
|
+
:rtype: ListThePermissionsOfTheGroupResponse
|
|
55
|
+
|
|
56
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
57
|
+
:raises ValueError: If nested model conversion fails
|
|
58
|
+
"""
|
|
59
|
+
m = m or dict()
|
|
60
|
+
if m.get('policies') is not None:
|
|
61
|
+
self.policies = [PolicyModel().from_dict(i) for i in m.get('policies')]
|
|
62
|
+
return self
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListTheSubjectsGrantedPermissionsRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListTheSubjectsGrantedPermissionsRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListTheSubjectsGrantedPermissionsRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, policy_id, grant_type):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListTheSubjectsGrantedPermissionsRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param policy_id: policy_id parameter
|
|
20
|
+
:type policy_id: str (required)
|
|
21
|
+
|
|
22
|
+
:param grant_type: grant_type parameter
|
|
23
|
+
:type grant_type: str (required)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.policy_id = policy_id
|
|
27
|
+
self.grant_type = grant_type
|
|
28
|
+
|
|
29
|
+
def to_dict(self):
|
|
30
|
+
"""
|
|
31
|
+
Convert the request entity to a dictionary representation.
|
|
32
|
+
|
|
33
|
+
Nested model objects are recursively converted to dictionaries.
|
|
34
|
+
|
|
35
|
+
:return: Dictionary representation of the request
|
|
36
|
+
:rtype: dict
|
|
37
|
+
"""
|
|
38
|
+
_map = super().to_dict()
|
|
39
|
+
if _map is not None:
|
|
40
|
+
return _map
|
|
41
|
+
result = dict()
|
|
42
|
+
return result
|
|
43
|
+
|
|
44
|
+
def from_dict(self, m):
|
|
45
|
+
"""
|
|
46
|
+
Populate the request entity from a dictionary.
|
|
47
|
+
|
|
48
|
+
Nested dictionaries are recursively converted to model objects.
|
|
49
|
+
|
|
50
|
+
:param m: Dictionary containing request data
|
|
51
|
+
:type m: dict
|
|
52
|
+
|
|
53
|
+
:return: Self reference for method chaining
|
|
54
|
+
:rtype: ListTheSubjectsGrantedPermissionsRequest
|
|
55
|
+
|
|
56
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
57
|
+
:raises ValueError: If nested model conversion fails
|
|
58
|
+
"""
|
|
59
|
+
m = m or dict()
|
|
60
|
+
if m.get('policyId') is not None:
|
|
61
|
+
self.policy_id = m.get('policyId')
|
|
62
|
+
if m.get('grantType') is not None:
|
|
63
|
+
self.grant_type = m.get('grantType')
|
|
64
|
+
return self
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListTheSubjectsGrantedPermissionsResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_iam.models.attached_entities import AttachedEntities
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListTheSubjectsGrantedPermissionsResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListTheSubjectsGrantedPermissionsResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, entities=None, id=None, name=None, type=None, attach_time=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize ListTheSubjectsGrantedPermissionsResponse response.
|
|
17
|
+
|
|
18
|
+
:param entities: 策略被授予主体对象的列表
|
|
19
|
+
:type entities: List[AttachedEntities] (optional)
|
|
20
|
+
|
|
21
|
+
:param id: 主体 id
|
|
22
|
+
:type id: str (optional)
|
|
23
|
+
|
|
24
|
+
:param name: 主体名称
|
|
25
|
+
:type name: str (optional)
|
|
26
|
+
|
|
27
|
+
:param type: UserPolicy或 GroupPolicy
|
|
28
|
+
:type type: str (optional)
|
|
29
|
+
|
|
30
|
+
:param attach_time: 策略被授予时间
|
|
31
|
+
:type attach_time: datetime (optional)
|
|
32
|
+
"""
|
|
33
|
+
super().__init__()
|
|
34
|
+
self.entities = entities
|
|
35
|
+
self.id = id
|
|
36
|
+
self.name = name
|
|
37
|
+
self.type = type
|
|
38
|
+
self.attach_time = attach_time
|
|
39
|
+
|
|
40
|
+
def to_dict(self):
|
|
41
|
+
"""
|
|
42
|
+
Convert the response instance to a dictionary representation.
|
|
43
|
+
|
|
44
|
+
Includes metadata from the parent BceResponse class.
|
|
45
|
+
Nested model objects are recursively converted to dictionaries.
|
|
46
|
+
|
|
47
|
+
:return: Dictionary representation of the response
|
|
48
|
+
:rtype: dict
|
|
49
|
+
"""
|
|
50
|
+
_map = super().to_dict()
|
|
51
|
+
if _map is not None:
|
|
52
|
+
return _map
|
|
53
|
+
result = dict()
|
|
54
|
+
if self.metadata is not None:
|
|
55
|
+
result['metadata'] = dict(self.metadata)
|
|
56
|
+
if self.entities is not None:
|
|
57
|
+
result['entities'] = [i.to_dict() for i in self.entities]
|
|
58
|
+
if self.id is not None:
|
|
59
|
+
result['id'] = self.id
|
|
60
|
+
if self.name is not None:
|
|
61
|
+
result['name'] = self.name
|
|
62
|
+
if self.type is not None:
|
|
63
|
+
result['type'] = self.type
|
|
64
|
+
if self.attach_time is not None:
|
|
65
|
+
result['attach_time'] = self.attach_time
|
|
66
|
+
return result
|
|
67
|
+
|
|
68
|
+
def from_dict(self, m):
|
|
69
|
+
"""
|
|
70
|
+
Populate the response instance from a dictionary.
|
|
71
|
+
|
|
72
|
+
Nested dictionaries are recursively converted to model objects.
|
|
73
|
+
|
|
74
|
+
:param m: Dictionary containing response data
|
|
75
|
+
:type m: dict
|
|
76
|
+
|
|
77
|
+
:return: Self reference for method chaining
|
|
78
|
+
:rtype: ListTheSubjectsGrantedPermissionsResponse
|
|
79
|
+
|
|
80
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
81
|
+
:raises ValueError: If nested model conversion fails
|
|
82
|
+
"""
|
|
83
|
+
m = m or dict()
|
|
84
|
+
if m.get('entities') is not None:
|
|
85
|
+
self.entities = [AttachedEntities().from_dict(i) for i in m.get('entities')]
|
|
86
|
+
if m.get('id') is not None:
|
|
87
|
+
self.id = m.get('id')
|
|
88
|
+
if m.get('name') is not None:
|
|
89
|
+
self.name = m.get('name')
|
|
90
|
+
if m.get('type') is not None:
|
|
91
|
+
self.type = m.get('type')
|
|
92
|
+
if m.get('attach_time') is not None:
|
|
93
|
+
self.attach_time = m.get('attach_time')
|
|
94
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListTheUserSPermissionsRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListTheUserSPermissionsRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListTheUserSPermissionsRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, user_name):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListTheUserSPermissionsRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param user_name: user_name parameter
|
|
20
|
+
:type user_name: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.user_name = user_name
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the request entity to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the request
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
return result
|
|
39
|
+
|
|
40
|
+
def from_dict(self, m):
|
|
41
|
+
"""
|
|
42
|
+
Populate the request entity from a dictionary.
|
|
43
|
+
|
|
44
|
+
Nested dictionaries are recursively converted to model objects.
|
|
45
|
+
|
|
46
|
+
:param m: Dictionary containing request data
|
|
47
|
+
:type m: dict
|
|
48
|
+
|
|
49
|
+
:return: Self reference for method chaining
|
|
50
|
+
:rtype: ListTheUserSPermissionsRequest
|
|
51
|
+
|
|
52
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
53
|
+
:raises ValueError: If nested model conversion fails
|
|
54
|
+
"""
|
|
55
|
+
m = m or dict()
|
|
56
|
+
if m.get('userName') is not None:
|
|
57
|
+
self.user_name = m.get('userName')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ListTheUserSPermissionsResponse information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
from baiducloud_python_sdk_iam.models.policy_model import PolicyModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ListTheUserSPermissionsResponse(BceResponse):
|
|
11
|
+
"""
|
|
12
|
+
ListTheUserSPermissionsResponse
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, policies=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListTheUserSPermissionsResponse instance.
|
|
18
|
+
|
|
19
|
+
:param policies: 策略对象的列表
|
|
20
|
+
:type policies: List[PolicyModel] (optional)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.policies = policies
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the model instance to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
Includes metadata from the parent BceResponse class.
|
|
32
|
+
|
|
33
|
+
:return: Dictionary representation of the model
|
|
34
|
+
:rtype: dict
|
|
35
|
+
"""
|
|
36
|
+
_map = super().to_dict()
|
|
37
|
+
if _map is not None:
|
|
38
|
+
return _map
|
|
39
|
+
result = dict()
|
|
40
|
+
if self.metadata is not None:
|
|
41
|
+
result['metadata'] = dict(self.metadata)
|
|
42
|
+
if self.policies is not None:
|
|
43
|
+
result['policies'] = [i.to_dict() for i in self.policies]
|
|
44
|
+
return result
|
|
45
|
+
|
|
46
|
+
def from_dict(self, m):
|
|
47
|
+
"""
|
|
48
|
+
Populate the model instance from a dictionary.
|
|
49
|
+
|
|
50
|
+
Nested dictionaries are recursively converted to model objects.
|
|
51
|
+
|
|
52
|
+
:param m: Dictionary containing model data
|
|
53
|
+
:type m: dict
|
|
54
|
+
|
|
55
|
+
:return: Self reference for method chaining
|
|
56
|
+
:rtype: ListTheUserSPermissionsResponse
|
|
57
|
+
|
|
58
|
+
:raises TypeError: If input is not a dictionary type
|
|
59
|
+
:raises ValueError: If nested model conversion fails
|
|
60
|
+
"""
|
|
61
|
+
m = m or dict()
|
|
62
|
+
if m.get('policies') is not None:
|
|
63
|
+
self.policies = [PolicyModel().from_dict(i) for i in m.get('policies')]
|
|
64
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListUserGroupsRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListUserGroupsRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListUserGroupsRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, user_name):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListUserGroupsRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param user_name: user_name parameter
|
|
20
|
+
:type user_name: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.user_name = user_name
|
|
24
|
+
|
|
25
|
+
def to_dict(self):
|
|
26
|
+
"""
|
|
27
|
+
Convert the request entity to a dictionary representation.
|
|
28
|
+
|
|
29
|
+
Nested model objects are recursively converted to dictionaries.
|
|
30
|
+
|
|
31
|
+
:return: Dictionary representation of the request
|
|
32
|
+
:rtype: dict
|
|
33
|
+
"""
|
|
34
|
+
_map = super().to_dict()
|
|
35
|
+
if _map is not None:
|
|
36
|
+
return _map
|
|
37
|
+
result = dict()
|
|
38
|
+
return result
|
|
39
|
+
|
|
40
|
+
def from_dict(self, m):
|
|
41
|
+
"""
|
|
42
|
+
Populate the request entity from a dictionary.
|
|
43
|
+
|
|
44
|
+
Nested dictionaries are recursively converted to model objects.
|
|
45
|
+
|
|
46
|
+
:param m: Dictionary containing request data
|
|
47
|
+
:type m: dict
|
|
48
|
+
|
|
49
|
+
:return: Self reference for method chaining
|
|
50
|
+
:rtype: ListUserGroupsRequest
|
|
51
|
+
|
|
52
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
53
|
+
:raises ValueError: If nested model conversion fails
|
|
54
|
+
"""
|
|
55
|
+
m = m or dict()
|
|
56
|
+
if m.get('userName') is not None:
|
|
57
|
+
self.user_name = m.get('userName')
|
|
58
|
+
return self
|