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
|
+
ListUserGroupsResponse information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
from baiducloud_python_sdk_iam.models.group_model import GroupModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ListUserGroupsResponse(BceResponse):
|
|
11
|
+
"""
|
|
12
|
+
ListUserGroupsResponse
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, groups=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListUserGroupsResponse instance.
|
|
18
|
+
|
|
19
|
+
:param groups: 组对象的列表
|
|
20
|
+
:type groups: List[GroupModel] (optional)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.groups = groups
|
|
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.groups is not None:
|
|
43
|
+
result['groups'] = [i.to_dict() for i in self.groups]
|
|
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: ListUserGroupsResponse
|
|
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('groups') is not None:
|
|
63
|
+
self.groups = [GroupModel().from_dict(i) for i in m.get('groups')]
|
|
64
|
+
return self
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ListUserResponse information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
|
|
7
|
+
from baiducloud_python_sdk_iam.models.user_model import UserModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ListUserResponse(BceResponse):
|
|
11
|
+
"""
|
|
12
|
+
ListUserResponse
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, users=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListUserResponse instance.
|
|
18
|
+
|
|
19
|
+
:param users: 用户对象的列表
|
|
20
|
+
:type users: List[UserModel] (optional)
|
|
21
|
+
"""
|
|
22
|
+
super().__init__()
|
|
23
|
+
self.users = users
|
|
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.users is not None:
|
|
43
|
+
result['users'] = [i.to_dict() for i in self.users]
|
|
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: ListUserResponse
|
|
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('users') is not None:
|
|
63
|
+
self.users = [UserModel().from_dict(i) for i in m.get('users')]
|
|
64
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ListUsersWithinTheGroupRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ListUsersWithinTheGroupRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ListUsersWithinTheGroupRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, group_name):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ListUsersWithinTheGroupRequest 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: ListUsersWithinTheGroupRequest
|
|
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 ListUsersWithinTheGroupResponse information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.bce_response import BceResponse
|
|
6
|
+
from baiducloud_python_sdk_iam.models.user_model import UserModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ListUsersWithinTheGroupResponse(BceResponse):
|
|
10
|
+
"""
|
|
11
|
+
ListUsersWithinTheGroupResponse
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self, users=None):
|
|
15
|
+
"""
|
|
16
|
+
Initialize ListUsersWithinTheGroupResponse response.
|
|
17
|
+
|
|
18
|
+
:param users: 用户对象的列表
|
|
19
|
+
:type users: List[UserModel] (optional)
|
|
20
|
+
"""
|
|
21
|
+
super().__init__()
|
|
22
|
+
self.users = users
|
|
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.users is not None:
|
|
41
|
+
result['users'] = [i.to_dict() for i in self.users]
|
|
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: ListUsersWithinTheGroupResponse
|
|
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('users') is not None:
|
|
61
|
+
self.users = [UserModel().from_dict(i) for i in m.get('users')]
|
|
62
|
+
return self
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ModifySubUserOperationProtectionRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ModifySubUserOperationProtectionRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ModifySubUserOperationProtectionRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, user_name, enabled_mfa, mfa_type=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ModifySubUserOperationProtectionRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param user_name: 需要更新的子用户名称
|
|
20
|
+
:type user_name: str (required)
|
|
21
|
+
|
|
22
|
+
:param enabled_mfa: 开启或关闭子用户操作保护
|
|
23
|
+
:type enabled_mfa: bool (required)
|
|
24
|
+
|
|
25
|
+
:param mfa_type: 子用户操作保护类型
|
|
26
|
+
:type mfa_type: str (optional)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.user_name = user_name
|
|
30
|
+
self.enabled_mfa = enabled_mfa
|
|
31
|
+
self.mfa_type = mfa_type
|
|
32
|
+
|
|
33
|
+
def to_dict(self):
|
|
34
|
+
"""
|
|
35
|
+
Convert the request entity to a dictionary representation.
|
|
36
|
+
|
|
37
|
+
Nested model objects are recursively converted to dictionaries.
|
|
38
|
+
|
|
39
|
+
:return: Dictionary representation of the request
|
|
40
|
+
:rtype: dict
|
|
41
|
+
"""
|
|
42
|
+
_map = super().to_dict()
|
|
43
|
+
if _map is not None:
|
|
44
|
+
return _map
|
|
45
|
+
result = dict()
|
|
46
|
+
if self.user_name is not None:
|
|
47
|
+
result['userName'] = self.user_name
|
|
48
|
+
if self.enabled_mfa is not None:
|
|
49
|
+
result['enabledMfa'] = self.enabled_mfa
|
|
50
|
+
if self.mfa_type is not None:
|
|
51
|
+
result['mfaType'] = self.mfa_type
|
|
52
|
+
return result
|
|
53
|
+
|
|
54
|
+
def from_dict(self, m):
|
|
55
|
+
"""
|
|
56
|
+
Populate the request entity from a dictionary.
|
|
57
|
+
|
|
58
|
+
Nested dictionaries are recursively converted to model objects.
|
|
59
|
+
|
|
60
|
+
:param m: Dictionary containing request data
|
|
61
|
+
:type m: dict
|
|
62
|
+
|
|
63
|
+
:return: Self reference for method chaining
|
|
64
|
+
:rtype: ModifySubUserOperationProtectionRequest
|
|
65
|
+
|
|
66
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
67
|
+
:raises ValueError: If nested model conversion fails
|
|
68
|
+
"""
|
|
69
|
+
m = m or dict()
|
|
70
|
+
if m.get('userName') is not None:
|
|
71
|
+
self.user_name = m.get('userName')
|
|
72
|
+
if m.get('enabledMfa') is not None:
|
|
73
|
+
self.enabled_mfa = m.get('enabledMfa')
|
|
74
|
+
if m.get('mfaType') is not None:
|
|
75
|
+
self.mfa_type = m.get('mfaType')
|
|
76
|
+
return self
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for ObtainAListOfPermanentlyValidApikeysRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ObtainAListOfPermanentlyValidApikeysRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for ObtainAListOfPermanentlyValidApikeysRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, user_id=None, service=None, page_no=None, page_size=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize ObtainAListOfPermanentlyValidApikeysRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param user_id: 子用户Id;如果apikey归属其他子用户则必填
|
|
20
|
+
:type user_id: str (optional)
|
|
21
|
+
|
|
22
|
+
:param service: service parameter
|
|
23
|
+
:type service: List[str] (optional)
|
|
24
|
+
|
|
25
|
+
:param page_no: 页码,从1开始;默认 1
|
|
26
|
+
:type page_no: int (optional)
|
|
27
|
+
|
|
28
|
+
:param page_size: 每页大小;默认10
|
|
29
|
+
:type page_size: int (optional)
|
|
30
|
+
"""
|
|
31
|
+
super().__init__()
|
|
32
|
+
self.user_id = user_id
|
|
33
|
+
self.service = service
|
|
34
|
+
self.page_no = page_no
|
|
35
|
+
self.page_size = page_size
|
|
36
|
+
|
|
37
|
+
def to_dict(self):
|
|
38
|
+
"""
|
|
39
|
+
Convert the request entity to a dictionary representation.
|
|
40
|
+
|
|
41
|
+
Nested model objects are recursively converted to dictionaries.
|
|
42
|
+
|
|
43
|
+
:return: Dictionary representation of the request
|
|
44
|
+
:rtype: dict
|
|
45
|
+
"""
|
|
46
|
+
_map = super().to_dict()
|
|
47
|
+
if _map is not None:
|
|
48
|
+
return _map
|
|
49
|
+
result = dict()
|
|
50
|
+
if self.user_id is not None:
|
|
51
|
+
result['userId'] = self.user_id
|
|
52
|
+
if self.service is not None:
|
|
53
|
+
result['service'] = self.service
|
|
54
|
+
if self.page_no is not None:
|
|
55
|
+
result['pageNo'] = self.page_no
|
|
56
|
+
if self.page_size is not None:
|
|
57
|
+
result['pageSize'] = self.page_size
|
|
58
|
+
return result
|
|
59
|
+
|
|
60
|
+
def from_dict(self, m):
|
|
61
|
+
"""
|
|
62
|
+
Populate the request entity from a dictionary.
|
|
63
|
+
|
|
64
|
+
Nested dictionaries are recursively converted to model objects.
|
|
65
|
+
|
|
66
|
+
:param m: Dictionary containing request data
|
|
67
|
+
:type m: dict
|
|
68
|
+
|
|
69
|
+
:return: Self reference for method chaining
|
|
70
|
+
:rtype: ObtainAListOfPermanentlyValidApikeysRequest
|
|
71
|
+
|
|
72
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
73
|
+
:raises ValueError: If nested model conversion fails
|
|
74
|
+
"""
|
|
75
|
+
m = m or dict()
|
|
76
|
+
if m.get('userId') is not None:
|
|
77
|
+
self.user_id = m.get('userId')
|
|
78
|
+
if m.get('service') is not None:
|
|
79
|
+
self.service = m.get('service')
|
|
80
|
+
if m.get('pageNo') is not None:
|
|
81
|
+
self.page_no = m.get('pageNo')
|
|
82
|
+
if m.get('pageSize') is not None:
|
|
83
|
+
self.page_size = m.get('pageSize')
|
|
84
|
+
return self
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""
|
|
2
|
+
PolicyModel information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PolicyModel(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
PolicyModel
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(
|
|
14
|
+
self, id=None, name=None, type=None, create_time=None, attach_time=None, description=None, document=None
|
|
15
|
+
):
|
|
16
|
+
"""
|
|
17
|
+
Initialize PolicyModel instance.
|
|
18
|
+
|
|
19
|
+
:param id: 策略id
|
|
20
|
+
:type id: str (optional)
|
|
21
|
+
|
|
22
|
+
:param name: 策略名称
|
|
23
|
+
:type name: str (optional)
|
|
24
|
+
|
|
25
|
+
:param type: 策略类型,可选:Custom - 自定义策略;System - 系统内置策略
|
|
26
|
+
:type type: str (optional)
|
|
27
|
+
|
|
28
|
+
:param create_time: 创建时间
|
|
29
|
+
:type create_time: datetime (optional)
|
|
30
|
+
|
|
31
|
+
:param attach_time: 绑定时间
|
|
32
|
+
:type attach_time: datetime (optional)
|
|
33
|
+
|
|
34
|
+
:param description: 策略描述
|
|
35
|
+
:type description: str (optional)
|
|
36
|
+
|
|
37
|
+
:param document: 策略内容,要求为ACL格式序列化后得到的String
|
|
38
|
+
:type document: str (optional)
|
|
39
|
+
"""
|
|
40
|
+
super().__init__()
|
|
41
|
+
self.id = id
|
|
42
|
+
self.name = name
|
|
43
|
+
self.type = type
|
|
44
|
+
self.create_time = create_time
|
|
45
|
+
self.attach_time = attach_time
|
|
46
|
+
self.description = description
|
|
47
|
+
self.document = document
|
|
48
|
+
|
|
49
|
+
def to_dict(self):
|
|
50
|
+
"""
|
|
51
|
+
Convert the model instance to a dictionary representation.
|
|
52
|
+
|
|
53
|
+
Nested model objects are recursively converted to dictionaries.
|
|
54
|
+
|
|
55
|
+
:return: Dictionary representation of the model
|
|
56
|
+
:rtype: dict
|
|
57
|
+
"""
|
|
58
|
+
_map = super().to_dict()
|
|
59
|
+
if _map is not None:
|
|
60
|
+
return _map
|
|
61
|
+
result = dict()
|
|
62
|
+
if self.id is not None:
|
|
63
|
+
result['id'] = self.id
|
|
64
|
+
if self.name is not None:
|
|
65
|
+
result['name'] = self.name
|
|
66
|
+
if self.type is not None:
|
|
67
|
+
result['type'] = self.type
|
|
68
|
+
if self.create_time is not None:
|
|
69
|
+
result['createTime'] = self.create_time
|
|
70
|
+
if self.attach_time is not None:
|
|
71
|
+
result['attachTime'] = self.attach_time
|
|
72
|
+
if self.description is not None:
|
|
73
|
+
result['description'] = self.description
|
|
74
|
+
if self.document is not None:
|
|
75
|
+
result['document'] = self.document
|
|
76
|
+
return result
|
|
77
|
+
|
|
78
|
+
def from_dict(self, m):
|
|
79
|
+
"""
|
|
80
|
+
Populate the model instance from a dictionary.
|
|
81
|
+
|
|
82
|
+
Nested dictionaries are recursively converted to model objects.
|
|
83
|
+
|
|
84
|
+
:param m: Dictionary containing model data
|
|
85
|
+
:type m: dict
|
|
86
|
+
|
|
87
|
+
:return: Self reference for method chaining
|
|
88
|
+
:rtype: PolicyModel
|
|
89
|
+
|
|
90
|
+
:raises TypeError: If input is not a dictionary type
|
|
91
|
+
:raises ValueError: If nested model conversion fails
|
|
92
|
+
"""
|
|
93
|
+
m = m or dict()
|
|
94
|
+
if m.get('id') is not None:
|
|
95
|
+
self.id = m.get('id')
|
|
96
|
+
if m.get('name') is not None:
|
|
97
|
+
self.name = m.get('name')
|
|
98
|
+
if m.get('type') is not None:
|
|
99
|
+
self.type = m.get('type')
|
|
100
|
+
if m.get('createTime') is not None:
|
|
101
|
+
self.create_time = m.get('createTime')
|
|
102
|
+
if m.get('attachTime') is not None:
|
|
103
|
+
self.attach_time = m.get('attachTime')
|
|
104
|
+
if m.get('description') is not None:
|
|
105
|
+
self.description = m.get('description')
|
|
106
|
+
if m.get('document') is not None:
|
|
107
|
+
self.document = m.get('document')
|
|
108
|
+
return self
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for QueryApikeyDetailsPermanentlyValidRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class QueryApikeyDetailsPermanentlyValidRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for QueryApikeyDetailsPermanentlyValidRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, id, user_id=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize QueryApikeyDetailsPermanentlyValidRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param user_id: 子用户Id;如果apikey归属其他子用户则必填
|
|
20
|
+
:type user_id: str (optional)
|
|
21
|
+
|
|
22
|
+
:param id: APIKey ID
|
|
23
|
+
:type id: str (required)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.user_id = user_id
|
|
27
|
+
self.id = id
|
|
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
|
+
if self.user_id is not None:
|
|
43
|
+
result['userId'] = self.user_id
|
|
44
|
+
if self.id is not None:
|
|
45
|
+
result['id'] = self.id
|
|
46
|
+
return result
|
|
47
|
+
|
|
48
|
+
def from_dict(self, m):
|
|
49
|
+
"""
|
|
50
|
+
Populate the request entity from a dictionary.
|
|
51
|
+
|
|
52
|
+
Nested dictionaries are recursively converted to model objects.
|
|
53
|
+
|
|
54
|
+
:param m: Dictionary containing request data
|
|
55
|
+
:type m: dict
|
|
56
|
+
|
|
57
|
+
:return: Self reference for method chaining
|
|
58
|
+
:rtype: QueryApikeyDetailsPermanentlyValidRequest
|
|
59
|
+
|
|
60
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
61
|
+
:raises ValueError: If nested model conversion fails
|
|
62
|
+
"""
|
|
63
|
+
m = m or dict()
|
|
64
|
+
if m.get('userId') is not None:
|
|
65
|
+
self.user_id = m.get('userId')
|
|
66
|
+
if m.get('id') is not None:
|
|
67
|
+
self.id = m.get('id')
|
|
68
|
+
return self
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for QueryGroupRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class QueryGroupRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for QueryGroupRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, group_name):
|
|
16
|
+
"""
|
|
17
|
+
Initialize QueryGroupRequest 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: QueryGroupRequest
|
|
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
|