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,90 @@
|
|
|
1
|
+
"""
|
|
2
|
+
RoleModel information
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RoleModel(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
RoleModel
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
def __init__(self, id=None, name=None, create_time=None, description=None, assume_role_policy_document=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialize RoleModel 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
|
+
:param assume_role_policy_document: 指定允许扮演此角色的实体
|
|
30
|
+
:type assume_role_policy_document: str (optional)
|
|
31
|
+
"""
|
|
32
|
+
super().__init__()
|
|
33
|
+
self.id = id
|
|
34
|
+
self.name = name
|
|
35
|
+
self.create_time = create_time
|
|
36
|
+
self.description = description
|
|
37
|
+
self.assume_role_policy_document = assume_role_policy_document
|
|
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.id is not None:
|
|
53
|
+
result['id'] = self.id
|
|
54
|
+
if self.name is not None:
|
|
55
|
+
result['name'] = self.name
|
|
56
|
+
if self.create_time is not None:
|
|
57
|
+
result['createTime'] = self.create_time
|
|
58
|
+
if self.description is not None:
|
|
59
|
+
result['description'] = self.description
|
|
60
|
+
if self.assume_role_policy_document is not None:
|
|
61
|
+
result['assumeRolePolicyDocument'] = self.assume_role_policy_document
|
|
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: RoleModel
|
|
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('id') is not None:
|
|
81
|
+
self.id = m.get('id')
|
|
82
|
+
if m.get('name') is not None:
|
|
83
|
+
self.name = m.get('name')
|
|
84
|
+
if m.get('createTime') is not None:
|
|
85
|
+
self.create_time = m.get('createTime')
|
|
86
|
+
if m.get('description') is not None:
|
|
87
|
+
self.description = m.get('description')
|
|
88
|
+
if m.get('assumeRolePolicyDocument') is not None:
|
|
89
|
+
self.assume_role_policy_document = m.get('assumeRolePolicyDocument')
|
|
90
|
+
return self
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for UnbindSubUserVirtualMfaRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UnbindSubUserVirtualMfaRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for UnbindSubUserVirtualMfaRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, user_name, mfa_type):
|
|
16
|
+
"""
|
|
17
|
+
Initialize UnbindSubUserVirtualMfaRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param user_name: user_name parameter
|
|
20
|
+
:type user_name: str (required)
|
|
21
|
+
|
|
22
|
+
:param mfa_type: mfa_type parameter
|
|
23
|
+
:type mfa_type: str (required)
|
|
24
|
+
"""
|
|
25
|
+
super().__init__()
|
|
26
|
+
self.user_name = user_name
|
|
27
|
+
self.mfa_type = mfa_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: UnbindSubUserVirtualMfaRequest
|
|
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('userName') is not None:
|
|
61
|
+
self.user_name = m.get('userName')
|
|
62
|
+
if m.get('mfaType') is not None:
|
|
63
|
+
self.mfa_type = m.get('mfaType')
|
|
64
|
+
return self
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for UpdateApikeyPermanentlyValidRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateApikeyPermanentlyValidRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for UpdateApikeyPermanentlyValidRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, id, acl, user_id=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize UpdateApikeyPermanentlyValidRequest 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
|
+
:param acl: ACL策略
|
|
26
|
+
:type acl: str (required)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.user_id = user_id
|
|
30
|
+
self.id = id
|
|
31
|
+
self.acl = acl
|
|
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_id is not None:
|
|
47
|
+
result['userId'] = self.user_id
|
|
48
|
+
if self.id is not None:
|
|
49
|
+
result['id'] = self.id
|
|
50
|
+
if self.acl is not None:
|
|
51
|
+
result['acl'] = self.acl
|
|
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: UpdateApikeyPermanentlyValidRequest
|
|
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('userId') is not None:
|
|
71
|
+
self.user_id = m.get('userId')
|
|
72
|
+
if m.get('id') is not None:
|
|
73
|
+
self.id = m.get('id')
|
|
74
|
+
if m.get('acl') is not None:
|
|
75
|
+
self.acl = m.get('acl')
|
|
76
|
+
return self
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for UpdateGroupRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateGroupRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for UpdateGroupRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, group_name, name=None, description=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize UpdateGroupRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param group_name: group_name parameter
|
|
20
|
+
:type group_name: str (required)
|
|
21
|
+
|
|
22
|
+
:param name: 更新后的组名
|
|
23
|
+
:type name: str (optional)
|
|
24
|
+
|
|
25
|
+
:param description: 组的描述
|
|
26
|
+
:type description: str (optional)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.group_name = group_name
|
|
30
|
+
self.name = name
|
|
31
|
+
self.description = description
|
|
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.name is not None:
|
|
47
|
+
result['name'] = self.name
|
|
48
|
+
if self.description is not None:
|
|
49
|
+
result['description'] = self.description
|
|
50
|
+
return result
|
|
51
|
+
|
|
52
|
+
def from_dict(self, m):
|
|
53
|
+
"""
|
|
54
|
+
Populate the request entity from a dictionary.
|
|
55
|
+
|
|
56
|
+
Nested dictionaries are recursively converted to model objects.
|
|
57
|
+
|
|
58
|
+
:param m: Dictionary containing request data
|
|
59
|
+
:type m: dict
|
|
60
|
+
|
|
61
|
+
:return: Self reference for method chaining
|
|
62
|
+
:rtype: UpdateGroupRequest
|
|
63
|
+
|
|
64
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
65
|
+
:raises ValueError: If nested model conversion fails
|
|
66
|
+
"""
|
|
67
|
+
m = m or dict()
|
|
68
|
+
if m.get('groupName') is not None:
|
|
69
|
+
self.group_name = m.get('groupName')
|
|
70
|
+
if m.get('name') is not None:
|
|
71
|
+
self.name = m.get('name')
|
|
72
|
+
if m.get('description') is not None:
|
|
73
|
+
self.description = m.get('description')
|
|
74
|
+
return self
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for UpdateLoginProfileRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateLoginProfileRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for UpdateLoginProfileRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self,
|
|
17
|
+
user_name,
|
|
18
|
+
password=None,
|
|
19
|
+
need_reset_password=None,
|
|
20
|
+
enabled_login=None,
|
|
21
|
+
enabled_login_mfa=None,
|
|
22
|
+
login_mfa_type=None,
|
|
23
|
+
third_party_type=None,
|
|
24
|
+
third_party_account=None,
|
|
25
|
+
):
|
|
26
|
+
"""
|
|
27
|
+
Initialize UpdateLoginProfileRequest request entity.
|
|
28
|
+
|
|
29
|
+
:param user_name: user_name parameter
|
|
30
|
+
:type user_name: str (required)
|
|
31
|
+
|
|
32
|
+
:param password: 用户密码;作为响应时不显示
|
|
33
|
+
:type password: str (optional)
|
|
34
|
+
|
|
35
|
+
:param need_reset_password: 下次登录时是否需要重置密码
|
|
36
|
+
:type need_reset_password: bool (optional)
|
|
37
|
+
|
|
38
|
+
:param enabled_login: 是否允许子用户控制台登录
|
|
39
|
+
:type enabled_login: bool (optional)
|
|
40
|
+
|
|
41
|
+
:param enabled_login_mfa: 是否要求绑定二次验证设备
|
|
42
|
+
:type enabled_login_mfa: bool (optional)
|
|
43
|
+
|
|
44
|
+
:param login_mfa_type: 二次验证类型,可选:PHONE-手机号,TOTP虚拟MFA设备
|
|
45
|
+
:type login_mfa_type: str (optional)
|
|
46
|
+
|
|
47
|
+
:param third_party_type: 绑定的第三方登录类型,可选:UUAP-内网账号,PASSPORT-百度账号
|
|
48
|
+
:type third_party_type: str (optional)
|
|
49
|
+
|
|
50
|
+
:param third_party_account: 绑定的第三方登录账号。绑定类型为PASSPORT时可以是手机、邮箱以及账号名称
|
|
51
|
+
:type third_party_account: str (optional)
|
|
52
|
+
"""
|
|
53
|
+
super().__init__()
|
|
54
|
+
self.user_name = user_name
|
|
55
|
+
self.password = password
|
|
56
|
+
self.need_reset_password = need_reset_password
|
|
57
|
+
self.enabled_login = enabled_login
|
|
58
|
+
self.enabled_login_mfa = enabled_login_mfa
|
|
59
|
+
self.login_mfa_type = login_mfa_type
|
|
60
|
+
self.third_party_type = third_party_type
|
|
61
|
+
self.third_party_account = third_party_account
|
|
62
|
+
|
|
63
|
+
def to_dict(self):
|
|
64
|
+
"""
|
|
65
|
+
Convert the request entity to a dictionary representation.
|
|
66
|
+
|
|
67
|
+
Nested model objects are recursively converted to dictionaries.
|
|
68
|
+
|
|
69
|
+
:return: Dictionary representation of the request
|
|
70
|
+
:rtype: dict
|
|
71
|
+
"""
|
|
72
|
+
_map = super().to_dict()
|
|
73
|
+
if _map is not None:
|
|
74
|
+
return _map
|
|
75
|
+
result = dict()
|
|
76
|
+
if self.password is not None:
|
|
77
|
+
result['password'] = self.password
|
|
78
|
+
if self.need_reset_password is not None:
|
|
79
|
+
result['needResetPassword'] = self.need_reset_password
|
|
80
|
+
if self.enabled_login is not None:
|
|
81
|
+
result['enabledLogin'] = self.enabled_login
|
|
82
|
+
if self.enabled_login_mfa is not None:
|
|
83
|
+
result['enabledLoginMfa'] = self.enabled_login_mfa
|
|
84
|
+
if self.login_mfa_type is not None:
|
|
85
|
+
result['loginMfaType'] = self.login_mfa_type
|
|
86
|
+
if self.third_party_type is not None:
|
|
87
|
+
result['thirdPartyType'] = self.third_party_type
|
|
88
|
+
if self.third_party_account is not None:
|
|
89
|
+
result['thirdPartyAccount'] = self.third_party_account
|
|
90
|
+
return result
|
|
91
|
+
|
|
92
|
+
def from_dict(self, m):
|
|
93
|
+
"""
|
|
94
|
+
Populate the request entity from a dictionary.
|
|
95
|
+
|
|
96
|
+
Nested dictionaries are recursively converted to model objects.
|
|
97
|
+
|
|
98
|
+
:param m: Dictionary containing request data
|
|
99
|
+
:type m: dict
|
|
100
|
+
|
|
101
|
+
:return: Self reference for method chaining
|
|
102
|
+
:rtype: UpdateLoginProfileRequest
|
|
103
|
+
|
|
104
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
105
|
+
:raises ValueError: If nested model conversion fails
|
|
106
|
+
"""
|
|
107
|
+
m = m or dict()
|
|
108
|
+
if m.get('userName') is not None:
|
|
109
|
+
self.user_name = m.get('userName')
|
|
110
|
+
if m.get('password') is not None:
|
|
111
|
+
self.password = m.get('password')
|
|
112
|
+
if m.get('needResetPassword') is not None:
|
|
113
|
+
self.need_reset_password = m.get('needResetPassword')
|
|
114
|
+
if m.get('enabledLogin') is not None:
|
|
115
|
+
self.enabled_login = m.get('enabledLogin')
|
|
116
|
+
if m.get('enabledLoginMfa') is not None:
|
|
117
|
+
self.enabled_login_mfa = m.get('enabledLoginMfa')
|
|
118
|
+
if m.get('loginMfaType') is not None:
|
|
119
|
+
self.login_mfa_type = m.get('loginMfaType')
|
|
120
|
+
if m.get('thirdPartyType') is not None:
|
|
121
|
+
self.third_party_type = m.get('thirdPartyType')
|
|
122
|
+
if m.get('thirdPartyAccount') is not None:
|
|
123
|
+
self.third_party_account = m.get('thirdPartyAccount')
|
|
124
|
+
return self
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for UpdateRoleRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateRoleRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for UpdateRoleRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, role_name, name=None, description=None, assume_role_policy_document=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize UpdateRoleRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param role_name: role_name parameter
|
|
20
|
+
:type role_name: str (required)
|
|
21
|
+
|
|
22
|
+
:param name: 更新后的角色名
|
|
23
|
+
:type name: str (optional)
|
|
24
|
+
|
|
25
|
+
:param description: 角色的描述
|
|
26
|
+
:type description: str (optional)
|
|
27
|
+
|
|
28
|
+
:param assume_role_policy_document: 指定可以扮演此角色的身份
|
|
29
|
+
:type assume_role_policy_document: str (optional)
|
|
30
|
+
"""
|
|
31
|
+
super().__init__()
|
|
32
|
+
self.role_name = role_name
|
|
33
|
+
self.name = name
|
|
34
|
+
self.description = description
|
|
35
|
+
self.assume_role_policy_document = assume_role_policy_document
|
|
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.name is not None:
|
|
51
|
+
result['name'] = self.name
|
|
52
|
+
if self.description is not None:
|
|
53
|
+
result['description'] = self.description
|
|
54
|
+
if self.assume_role_policy_document is not None:
|
|
55
|
+
result['assumeRolePolicyDocument'] = self.assume_role_policy_document
|
|
56
|
+
return result
|
|
57
|
+
|
|
58
|
+
def from_dict(self, m):
|
|
59
|
+
"""
|
|
60
|
+
Populate the request entity from a dictionary.
|
|
61
|
+
|
|
62
|
+
Nested dictionaries are recursively converted to model objects.
|
|
63
|
+
|
|
64
|
+
:param m: Dictionary containing request data
|
|
65
|
+
:type m: dict
|
|
66
|
+
|
|
67
|
+
:return: Self reference for method chaining
|
|
68
|
+
:rtype: UpdateRoleRequest
|
|
69
|
+
|
|
70
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
71
|
+
:raises ValueError: If nested model conversion fails
|
|
72
|
+
"""
|
|
73
|
+
m = m or dict()
|
|
74
|
+
if m.get('roleName') is not None:
|
|
75
|
+
self.role_name = m.get('roleName')
|
|
76
|
+
if m.get('name') is not None:
|
|
77
|
+
self.name = m.get('name')
|
|
78
|
+
if m.get('description') is not None:
|
|
79
|
+
self.description = m.get('description')
|
|
80
|
+
if m.get('assumeRolePolicyDocument') is not None:
|
|
81
|
+
self.assume_role_policy_document = m.get('assumeRolePolicyDocument')
|
|
82
|
+
return self
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for UpdateStrategyRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateStrategyRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for UpdateStrategyRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, policy_name, document, name=None, description=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize UpdateStrategyRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param policy_name: policy_name parameter
|
|
20
|
+
:type policy_name: str (required)
|
|
21
|
+
|
|
22
|
+
:param name: 新策略名
|
|
23
|
+
:type name: str (optional)
|
|
24
|
+
|
|
25
|
+
:param description: 策略的描述
|
|
26
|
+
:type description: str (optional)
|
|
27
|
+
|
|
28
|
+
:param document: 策略内容,ACL格式序列化后得到的String
|
|
29
|
+
:type document: str (required)
|
|
30
|
+
"""
|
|
31
|
+
super().__init__()
|
|
32
|
+
self.policy_name = policy_name
|
|
33
|
+
self.name = name
|
|
34
|
+
self.description = description
|
|
35
|
+
self.document = document
|
|
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.name is not None:
|
|
51
|
+
result['name'] = self.name
|
|
52
|
+
if self.description is not None:
|
|
53
|
+
result['description'] = self.description
|
|
54
|
+
if self.document is not None:
|
|
55
|
+
result['document'] = self.document
|
|
56
|
+
return result
|
|
57
|
+
|
|
58
|
+
def from_dict(self, m):
|
|
59
|
+
"""
|
|
60
|
+
Populate the request entity from a dictionary.
|
|
61
|
+
|
|
62
|
+
Nested dictionaries are recursively converted to model objects.
|
|
63
|
+
|
|
64
|
+
:param m: Dictionary containing request data
|
|
65
|
+
:type m: dict
|
|
66
|
+
|
|
67
|
+
:return: Self reference for method chaining
|
|
68
|
+
:rtype: UpdateStrategyRequest
|
|
69
|
+
|
|
70
|
+
:raises TypeError: If input is not a dictionary or field type mismatch
|
|
71
|
+
:raises ValueError: If nested model conversion fails
|
|
72
|
+
"""
|
|
73
|
+
m = m or dict()
|
|
74
|
+
if m.get('policyName') is not None:
|
|
75
|
+
self.policy_name = m.get('policyName')
|
|
76
|
+
if m.get('name') is not None:
|
|
77
|
+
self.name = m.get('name')
|
|
78
|
+
if m.get('description') is not None:
|
|
79
|
+
self.description = m.get('description')
|
|
80
|
+
if m.get('document') is not None:
|
|
81
|
+
self.document = m.get('document')
|
|
82
|
+
return self
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Request entity for UpdateSubUserIdpRequest information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from baiducloud_python_sdk_core.abstract_model import AbstractModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UpdateSubUserIdpRequest(AbstractModel):
|
|
9
|
+
"""
|
|
10
|
+
Request entity for UpdateSubUserIdpRequest operation.
|
|
11
|
+
|
|
12
|
+
This class encapsulates all parameters for the API request.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, file_name, encode_metadata, auxiliary_domain=None):
|
|
16
|
+
"""
|
|
17
|
+
Initialize UpdateSubUserIdpRequest request entity.
|
|
18
|
+
|
|
19
|
+
:param file_name: 文件名称,必须为xml格式文件
|
|
20
|
+
:type file_name: str (required)
|
|
21
|
+
|
|
22
|
+
:param encode_metadata: Base64编码后的IdP元数据
|
|
23
|
+
:type encode_metadata: str (required)
|
|
24
|
+
|
|
25
|
+
:param auxiliary_domain: 辅助域名
|
|
26
|
+
:type auxiliary_domain: str (optional)
|
|
27
|
+
"""
|
|
28
|
+
super().__init__()
|
|
29
|
+
self.file_name = file_name
|
|
30
|
+
self.encode_metadata = encode_metadata
|
|
31
|
+
self.auxiliary_domain = auxiliary_domain
|
|
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.file_name is not None:
|
|
47
|
+
result['fileName'] = self.file_name
|
|
48
|
+
if self.encode_metadata is not None:
|
|
49
|
+
result['encodeMetadata'] = self.encode_metadata
|
|
50
|
+
if self.auxiliary_domain is not None:
|
|
51
|
+
result['auxiliaryDomain'] = self.auxiliary_domain
|
|
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: UpdateSubUserIdpRequest
|
|
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('fileName') is not None:
|
|
71
|
+
self.file_name = m.get('fileName')
|
|
72
|
+
if m.get('encodeMetadata') is not None:
|
|
73
|
+
self.encode_metadata = m.get('encodeMetadata')
|
|
74
|
+
if m.get('auxiliaryDomain') is not None:
|
|
75
|
+
self.auxiliary_domain = m.get('auxiliaryDomain')
|
|
76
|
+
return self
|