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,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for GetUserRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GetUserRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for GetUserRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, user_name):
|
|
16
|
+
"""
|
|
17
|
+
Initialize GetUserRequest 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: GetUserRequest
|
|
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,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
GroupModel information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GroupModel(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
GroupModel
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, id=None, name=None, create_time=None, description=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize GroupModel instance.
|
|
16
|
+
|
|
17
|
+
:param id: 组id
|
|
18
|
+
:type id: str (optional)
|
|
19
|
+
|
|
20
|
+
:param name: 组名称
|
|
21
|
+
:type name: str (optional)
|
|
22
|
+
|
|
23
|
+
:param create_time: 创建时间
|
|
24
|
+
:type create_time: datetime (optional)
|
|
25
|
+
|
|
26
|
+
:param description: 组描述
|
|
27
|
+
:type description: str (optional)
|
|
28
|
+
"""
|
|
29
|
+
super().__init__()
|
|
30
|
+
self.id = id
|
|
31
|
+
self.name = name
|
|
32
|
+
self.create_time = create_time
|
|
33
|
+
self.description = description
|
|
34
|
+
|
|
35
|
+
def to_dict(self):
|
|
36
|
+
"""
|
|
37
|
+
Convert the model instance to a dictionary representation.
|
|
38
|
+
|
|
39
|
+
Nested model objects are recursively converted to dictionaries.
|
|
40
|
+
|
|
41
|
+
:return: Dictionary representation of the model
|
|
42
|
+
:rtype: dict
|
|
43
|
+
"""
|
|
44
|
+
_map = super().to_dict()
|
|
45
|
+
if _map is not None:
|
|
46
|
+
return _map
|
|
47
|
+
result = dict()
|
|
48
|
+
if self.id is not None:
|
|
49
|
+
result['id'] = self.id
|
|
50
|
+
if self.name is not None:
|
|
51
|
+
result['name'] = self.name
|
|
52
|
+
if self.create_time is not None:
|
|
53
|
+
result['createTime'] = self.create_time
|
|
54
|
+
if self.description is not None:
|
|
55
|
+
result['description'] = self.description
|
|
56
|
+
return result
|
|
57
|
+
|
|
58
|
+
def from_dict(self, m):
|
|
59
|
+
"""
|
|
60
|
+
Populate the model instance from a dictionary.
|
|
61
|
+
|
|
62
|
+
Nested dictionaries are recursively converted to model objects.
|
|
63
|
+
|
|
64
|
+
:param m: Dictionary containing model data
|
|
65
|
+
:type m: dict
|
|
66
|
+
|
|
67
|
+
:return: Self reference for method chaining
|
|
68
|
+
:rtype: GroupModel
|
|
69
|
+
|
|
70
|
+
:raises TypeError: If input is not a dictionary type
|
|
71
|
+
:raises ValueError: If nested model conversion fails
|
|
72
|
+
"""
|
|
73
|
+
m = m or dict()
|
|
74
|
+
if m.get('id') is not None:
|
|
75
|
+
self.id = m.get('id')
|
|
76
|
+
if m.get('name') is not None:
|
|
77
|
+
self.name = m.get('name')
|
|
78
|
+
if m.get('createTime') is not None:
|
|
79
|
+
self.create_time = m.get('createTime')
|
|
80
|
+
if m.get('description') is not None:
|
|
81
|
+
self.description = m.get('description')
|
|
82
|
+
return self
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Idp information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Idp(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Idp
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, status=None, domain_id=None, encode_metadata=None, file_name=None, auxiliary_domain=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize Idp instance.
|
|
16
|
+
|
|
17
|
+
:param status: 用户联合功能状态,开启状态返回enable,关闭状态为disable
|
|
18
|
+
:type status: str (optional)
|
|
19
|
+
|
|
20
|
+
:param domain_id: 账户ID
|
|
21
|
+
:type domain_id: str (optional)
|
|
22
|
+
|
|
23
|
+
:param encode_metadata: Base64编码后的IdP元数据
|
|
24
|
+
:type encode_metadata: str (optional)
|
|
25
|
+
|
|
26
|
+
:param file_name: IdP元数据文件名称
|
|
27
|
+
:type file_name: str (optional)
|
|
28
|
+
|
|
29
|
+
:param auxiliary_domain: 辅助域名
|
|
30
|
+
:type auxiliary_domain: str (optional)
|
|
31
|
+
"""
|
|
32
|
+
super().__init__()
|
|
33
|
+
self.status = status
|
|
34
|
+
self.domain_id = domain_id
|
|
35
|
+
self.encode_metadata = encode_metadata
|
|
36
|
+
self.file_name = file_name
|
|
37
|
+
self.auxiliary_domain = auxiliary_domain
|
|
38
|
+
|
|
39
|
+
def to_dict(self):
|
|
40
|
+
"""
|
|
41
|
+
Convert the model instance to a dictionary representation.
|
|
42
|
+
|
|
43
|
+
Nested model objects are recursively converted to dictionaries.
|
|
44
|
+
|
|
45
|
+
:return: Dictionary representation of the model
|
|
46
|
+
:rtype: dict
|
|
47
|
+
"""
|
|
48
|
+
_map = super().to_dict()
|
|
49
|
+
if _map is not None:
|
|
50
|
+
return _map
|
|
51
|
+
result = dict()
|
|
52
|
+
if self.status is not None:
|
|
53
|
+
result['status'] = self.status
|
|
54
|
+
if self.domain_id is not None:
|
|
55
|
+
result['domainId'] = self.domain_id
|
|
56
|
+
if self.encode_metadata is not None:
|
|
57
|
+
result['encodeMetadata'] = self.encode_metadata
|
|
58
|
+
if self.file_name is not None:
|
|
59
|
+
result['fileName'] = self.file_name
|
|
60
|
+
if self.auxiliary_domain is not None:
|
|
61
|
+
result['auxiliaryDomain'] = self.auxiliary_domain
|
|
62
|
+
return result
|
|
63
|
+
|
|
64
|
+
def from_dict(self, m):
|
|
65
|
+
"""
|
|
66
|
+
Populate the model instance from a dictionary.
|
|
67
|
+
|
|
68
|
+
Nested dictionaries are recursively converted to model objects.
|
|
69
|
+
|
|
70
|
+
:param m: Dictionary containing model data
|
|
71
|
+
:type m: dict
|
|
72
|
+
|
|
73
|
+
:return: Self reference for method chaining
|
|
74
|
+
:rtype: Idp
|
|
75
|
+
|
|
76
|
+
:raises TypeError: If input is not a dictionary type
|
|
77
|
+
:raises ValueError: If nested model conversion fails
|
|
78
|
+
"""
|
|
79
|
+
m = m or dict()
|
|
80
|
+
if m.get('status') is not None:
|
|
81
|
+
self.status = m.get('status')
|
|
82
|
+
if m.get('domainId') is not None:
|
|
83
|
+
self.domain_id = m.get('domainId')
|
|
84
|
+
if m.get('encodeMetadata') is not None:
|
|
85
|
+
self.encode_metadata = m.get('encodeMetadata')
|
|
86
|
+
if m.get('fileName') is not None:
|
|
87
|
+
self.file_name = m.get('fileName')
|
|
88
|
+
if m.get('auxiliaryDomain') is not None:
|
|
89
|
+
self.auxiliary_domain = m.get('auxiliaryDomain')
|
|
90
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListAccessKeyRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListAccessKeyRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListAccessKeyRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, user_name):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListAccessKeyRequest 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: ListAccessKeyRequest
|
|
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,62 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListAccessKeyResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_iam.models.access_key import AccessKey
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListAccessKeyResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListAccessKeyResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, access_keys=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize ListAccessKeyResponse response.
|
|
17
|
+
|
|
18
|
+
:param access_keys: 用户访问密钥列表
|
|
19
|
+
:type access_keys: List[AccessKey] (optional)
|
|
20
|
+
"""
|
|
21
|
+
super().__init__()
|
|
22
|
+
self.access_keys = access_keys
|
|
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.access_keys is not None:
|
|
41
|
+
result['accessKeys'] = [i.to_dict() for i in self.access_keys]
|
|
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: ListAccessKeyResponse
|
|
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('accessKeys') is not None:
|
|
61
|
+
self.access_keys = [AccessKey().from_dict(i) for i in m.get('accessKeys')]
|
|
62
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListAllSubjectsGrantedPermissionsRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListAllSubjectsGrantedPermissionsRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListAllSubjectsGrantedPermissionsRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, policy_id):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListAllSubjectsGrantedPermissionsRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param policy_id: policy_id parameter
|
|
20
|
+
:type policy_id: str (required)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.policy_id = policy_id
|
|
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: ListAllSubjectsGrantedPermissionsRequest
|
|
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('policyId') is not None:
|
|
57
|
+
self.policy_id = m.get('policyId')
|
|
58
|
+
return self
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListAllSubjectsGrantedPermissionsResponse 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 ListAllSubjectsGrantedPermissionsResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListAllSubjectsGrantedPermissionsResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, entities=None, id=None, name=None, type=None, attach_time=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize ListAllSubjectsGrantedPermissionsResponse 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、RolePolicy
|
|
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: ListAllSubjectsGrantedPermissionsResponse
|
|
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,62 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListGroupsResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_iam.models.group_model import GroupModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListGroupsResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListGroupsResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, groups=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize ListGroupsResponse response.
|
|
17
|
+
|
|
18
|
+
:param groups: 组对象的列表
|
|
19
|
+
:type groups: List[GroupModel] (optional)
|
|
20
|
+
"""
|
|
21
|
+
super().__init__()
|
|
22
|
+
self.groups = groups
|
|
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.groups is not None:
|
|
41
|
+
result['groups'] = [i.to_dict() for i in self.groups]
|
|
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: ListGroupsResponse
|
|
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('groups') is not None:
|
|
61
|
+
self.groups = [GroupModel().from_dict(i) for i in m.get('groups')]
|
|
62
|
+
return self
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListRolesResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_iam.models.role_model import RoleModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListRolesResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListRolesResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, roles=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize ListRolesResponse response.
|
|
17
|
+
|
|
18
|
+
:param roles: 角色对象的列表
|
|
19
|
+
:type roles: List[RoleModel] (optional)
|
|
20
|
+
"""
|
|
21
|
+
super().__init__()
|
|
22
|
+
self.roles = roles
|
|
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.roles is not None:
|
|
41
|
+
result['roles'] = [i.to_dict() for i in self.roles]
|
|
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: ListRolesResponse
|
|
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('roles') is not None:
|
|
61
|
+
self.roles = [RoleModel().from_dict(i) for i in m.get('roles')]
|
|
62
|
+
return self
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListStrategiesRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListStrategiesRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListStrategiesRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, policy_type=None, name_filter=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListStrategiesRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param policy_type: policy_type parameter
|
|
20
|
+
:type policy_type: str (optional)
|
|
21
|
+
|
|
22
|
+
:param name_filter: name_filter parameter
|
|
23
|
+
:type name_filter: str (optional)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.policy_type = policy_type
|
|
27
|
+
self.name_filter = name_filter
|
|
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: ListStrategiesRequest
|
|
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('policyType') is not None:
|
|
61
|
+
self.policy_type = m.get('policyType')
|
|
62
|
+
if m.get('nameFilter') is not None:
|
|
63
|
+
self.name_filter = m.get('nameFilter')
|
|
64
|
+
return self
|