ark-sdk-python 1.1.3__py3-none-any.whl → 1.2.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.
- ark_sdk_python/ark.py +1 -1
- ark_sdk_python/ark_api.py +36 -0
- ark_sdk_python/examples/list_pcloud_accounts.py +20 -0
- ark_sdk_python/models/actions/services/__init__.py +3 -0
- ark_sdk_python/models/actions/services/ark_pcloud_exec_action_consts.py +131 -0
- ark_sdk_python/models/auth/ark_auth_method.py +1 -1
- ark_sdk_python/models/services/dpa/workspaces/db/ark_dpa_db_auth_method.py +1 -0
- ark_sdk_python/models/services/pcloud/__init__.py +0 -0
- ark_sdk_python/models/services/pcloud/accounts/__init__.py +53 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_account.py +53 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_account_credentials.py +11 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_account_secret_version.py +12 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_accounts_filter.py +15 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_accounts_stats.py +11 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_add_account.py +10 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_change_account_credentials.py +7 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_delete_account.py +7 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_generate_account_credentials.py +7 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_get_account.py +7 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_get_account_credentials.py +16 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_link_account.py +11 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_list_account_secret_versions.py +8 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_reconcile_account_credentials.py +7 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_set_account_next_credentials.py +8 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_unlink_account.py +8 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_update_account.py +27 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_update_account_credentials_in_vault.py +8 -0
- ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_verify_account_credentias.py +7 -0
- ark_sdk_python/models/services/pcloud/platforms/__init__.py +69 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_activate_target_platform.py +7 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_deactivate_target_platform.py +7 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_delete_target_platform.py +7 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_duplicate_target_platform.py +11 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_duplicated_target_platform_info.py +12 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_export_platform.py +8 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_export_target_platform.py +8 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_get_platform.py +7 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_get_target_platform.py +7 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_import_platform.py +7 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_import_target_platform.py +7 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_platform.py +66 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_platforms_filter.py +12 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_platforms_stats.py +11 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_target_platform.py +76 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_target_platforms_filter.py +18 -0
- ark_sdk_python/models/services/pcloud/platforms/ark_pcloud_target_platforms_stats.py +11 -0
- ark_sdk_python/models/services/pcloud/safes/__init__.py +46 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_add_safe.py +5 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_add_safe_member.py +23 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_delete_safe.py +7 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_delete_safe_member.py +8 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_get_safe.py +7 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_get_safe_member.py +8 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_get_safe_members_stats.py +7 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_list_safe_members.py +7 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safe.py +30 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safe_member.py +65 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safe_members_filter.py +15 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safes_filters.py +12 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safes_members_stats.py +17 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_safes_stats.py +11 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_update_safe.py +7 -0
- ark_sdk_python/models/services/pcloud/safes/ark_pcloud_update_safe_member.py +18 -0
- ark_sdk_python/services/pcloud/__init__.py +0 -0
- ark_sdk_python/services/pcloud/accounts/__init__.py +3 -0
- ark_sdk_python/services/pcloud/accounts/ark_pcloud_accounts_service.py +465 -0
- ark_sdk_python/services/pcloud/ark_pcloud_api.py +41 -0
- ark_sdk_python/services/pcloud/common/__init__.py +3 -0
- ark_sdk_python/services/pcloud/common/ark_pcloud_base_service.py +27 -0
- ark_sdk_python/services/pcloud/platforms/__init__.py +3 -0
- ark_sdk_python/services/pcloud/platforms/ark_pcloud_platforms_service.py +462 -0
- ark_sdk_python/services/pcloud/safes/__init__.py +3 -0
- ark_sdk_python/services/pcloud/safes/ark_pcloud_safes_service.py +523 -0
- {ark_sdk_python-1.1.3.dist-info → ark_sdk_python-1.2.1.dist-info}/METADATA +23 -1
- {ark_sdk_python-1.1.3.dist-info → ark_sdk_python-1.2.1.dist-info}/RECORD +79 -11
- {ark_sdk_python-1.1.3.dist-info → ark_sdk_python-1.2.1.dist-info}/LICENSE.txt +0 -0
- {ark_sdk_python-1.1.3.dist-info → ark_sdk_python-1.2.1.dist-info}/NOTICES.md +0 -0
- {ark_sdk_python-1.1.3.dist-info → ark_sdk_python-1.2.1.dist-info}/WHEEL +0 -0
- {ark_sdk_python-1.1.3.dist-info → ark_sdk_python-1.2.1.dist-info}/entry_points.txt +0 -0
ark_sdk_python/ark.py
CHANGED
ark_sdk_python/ark_api.py
CHANGED
|
@@ -235,3 +235,39 @@ class ArkAPI:
|
|
|
235
235
|
from ark_sdk_python.services.sm import ArkSMService
|
|
236
236
|
|
|
237
237
|
return cast(ArkSMService, self.service(ArkSMService))
|
|
238
|
+
|
|
239
|
+
@property
|
|
240
|
+
def pcloud_accounts(self) -> "ArkPCloudAccountsService":
|
|
241
|
+
"""
|
|
242
|
+
Returns the PCloud Accounts service if the appropriate authenticators were given
|
|
243
|
+
|
|
244
|
+
Returns:
|
|
245
|
+
ArkPCloudAccountsService: _description_
|
|
246
|
+
"""
|
|
247
|
+
from ark_sdk_python.services.pcloud.accounts import ArkPCloudAccountsService
|
|
248
|
+
|
|
249
|
+
return cast(ArkPCloudAccountsService, self.service(ArkPCloudAccountsService))
|
|
250
|
+
|
|
251
|
+
@property
|
|
252
|
+
def pcloud_safes(self) -> "ArkPCloudSafesService":
|
|
253
|
+
"""
|
|
254
|
+
Returns the PCloud Safes service if the appropriate authenticators were given
|
|
255
|
+
|
|
256
|
+
Returns:
|
|
257
|
+
ArkPCloudSafesService: _description_
|
|
258
|
+
"""
|
|
259
|
+
from ark_sdk_python.services.pcloud.safes import ArkPCloudSafesService
|
|
260
|
+
|
|
261
|
+
return cast(ArkPCloudSafesService, self.service(ArkPCloudSafesService))
|
|
262
|
+
|
|
263
|
+
@property
|
|
264
|
+
def pcloud_platforms(self) -> "ArkPCloudPlatformsService":
|
|
265
|
+
"""
|
|
266
|
+
Returns the PCloud Platforms service if the appropriate authenticators were given
|
|
267
|
+
|
|
268
|
+
Returns:
|
|
269
|
+
ArkPCloudPlatformsService: _description_
|
|
270
|
+
"""
|
|
271
|
+
from ark_sdk_python.services.pcloud.platforms import ArkPCloudPlatformsService
|
|
272
|
+
|
|
273
|
+
return cast(ArkPCloudPlatformsService, self.service(ArkPCloudPlatformsService))
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import pprint
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.auth import ArkISPAuth
|
|
4
|
+
from ark_sdk_python.models.auth import ArkAuthMethod, ArkAuthProfile, ArkSecret, IdentityArkAuthMethodSettings
|
|
5
|
+
from ark_sdk_python.services.pcloud.accounts import ArkPCloudAccountsService
|
|
6
|
+
|
|
7
|
+
if __name__ == '__main__':
|
|
8
|
+
isp_auth = ArkISPAuth(cache_authentication=False)
|
|
9
|
+
isp_auth.authenticate(
|
|
10
|
+
auth_profile=ArkAuthProfile(
|
|
11
|
+
username='user@cyberark.cloud.12345',
|
|
12
|
+
auth_method=ArkAuthMethod.Identity,
|
|
13
|
+
auth_method_settings=IdentityArkAuthMethodSettings(),
|
|
14
|
+
),
|
|
15
|
+
secret=ArkSecret(secret="CoolPassword"),
|
|
16
|
+
)
|
|
17
|
+
accounts_service = ArkPCloudAccountsService(isp_auth=isp_auth)
|
|
18
|
+
for page in accounts_service.list_accounts():
|
|
19
|
+
for item in page:
|
|
20
|
+
pprint.pprint(item.dict())
|
|
@@ -2,17 +2,20 @@ from typing import Any, List
|
|
|
2
2
|
|
|
3
3
|
from ark_sdk_python.models.actions.services.ark_dpa_exec_action_consts import DPA_ACTIONS
|
|
4
4
|
from ark_sdk_python.models.actions.services.ark_identity_exec_action_consts import IDENTITY_ACTIONS
|
|
5
|
+
from ark_sdk_python.models.actions.services.ark_pcloud_exec_action_consts import PCLOUD_ACTIONS
|
|
5
6
|
from ark_sdk_python.models.actions.services.ark_sm_exec_action_consts import SM_ACTIONS
|
|
6
7
|
|
|
7
8
|
SUPPORTED_SERVICE_ACTIONS: List[Any] = [
|
|
8
9
|
IDENTITY_ACTIONS,
|
|
9
10
|
DPA_ACTIONS,
|
|
10
11
|
SM_ACTIONS,
|
|
12
|
+
PCLOUD_ACTIONS,
|
|
11
13
|
]
|
|
12
14
|
|
|
13
15
|
__all__ = [
|
|
14
16
|
'IDENTITY_ACTIONS',
|
|
15
17
|
'DPA_ACTIONS',
|
|
16
18
|
'SM_ACTIONS',
|
|
19
|
+
'PCLOUD_ACTIONS',
|
|
17
20
|
'SUPPORTED_SERVICE_ACTIONS',
|
|
18
21
|
]
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
from typing import Dict, Final, Optional, Type
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models import ArkModel
|
|
4
|
+
from ark_sdk_python.models.actions.ark_service_action_definition import ArkServiceActionDefinition
|
|
5
|
+
from ark_sdk_python.models.services.pcloud.accounts import (
|
|
6
|
+
ArkPCloudAccountsFilter,
|
|
7
|
+
ArkPCloudAddAccount,
|
|
8
|
+
ArkPCloudChangeAccountCredentials,
|
|
9
|
+
ArkPCloudDeleteAccount,
|
|
10
|
+
ArkPCloudGenerateAccountCredentials,
|
|
11
|
+
ArkPCloudGetAccount,
|
|
12
|
+
ArkPCloudGetAccountCredentials,
|
|
13
|
+
ArkPCloudLinkAccount,
|
|
14
|
+
ArkPCloudListAccountSecretVersions,
|
|
15
|
+
ArkPCloudReconcileAccountCredentials,
|
|
16
|
+
ArkPCloudSetAccountNextCredentials,
|
|
17
|
+
ArkPCloudUnlinkAccount,
|
|
18
|
+
ArkPCloudUpdateAccount,
|
|
19
|
+
ArkPCloudUpdateAccountCredentialsInVault,
|
|
20
|
+
ArkPCloudVerifyAccountCredentials,
|
|
21
|
+
)
|
|
22
|
+
from ark_sdk_python.models.services.pcloud.platforms import (
|
|
23
|
+
ArkPCloudActivateTargetPlatform,
|
|
24
|
+
ArkPCloudDeactivateTargetPlatform,
|
|
25
|
+
ArkPCloudDeleteTargetPlatform,
|
|
26
|
+
ArkPCloudDuplicateTargetPlatform,
|
|
27
|
+
ArkPCloudExportPlatform,
|
|
28
|
+
ArkPCloudExportTargetPlatform,
|
|
29
|
+
ArkPCloudGetPlatform,
|
|
30
|
+
ArkPCloudGetTargetPlatform,
|
|
31
|
+
ArkPCloudImportPlatform,
|
|
32
|
+
ArkPCloudImportTargetPlatform,
|
|
33
|
+
ArkPCloudPlatformsFilter,
|
|
34
|
+
ArkPCloudTargetPlatformsFilter,
|
|
35
|
+
)
|
|
36
|
+
from ark_sdk_python.models.services.pcloud.safes import (
|
|
37
|
+
ArkPCloudAddSafe,
|
|
38
|
+
ArkPCloudAddSafeMember,
|
|
39
|
+
ArkPCloudDeleteSafe,
|
|
40
|
+
ArkPCloudDeleteSafeMember,
|
|
41
|
+
ArkPCloudGetSafe,
|
|
42
|
+
ArkPCloudGetSafeMember,
|
|
43
|
+
ArkPCloudGetSafeMembersStats,
|
|
44
|
+
ArkPCloudListSafeMembers,
|
|
45
|
+
ArkPCloudSafeMembersFilters,
|
|
46
|
+
ArkPCloudSafesFilters,
|
|
47
|
+
ArkPCloudUpdateSafe,
|
|
48
|
+
ArkPCloudUpdateSafeMember,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
# PCloud Accounts Definitions
|
|
52
|
+
PCLOUD_ACCOUNTS_ACTION_TO_SCHEMA_MAP: Final[Dict[str, Optional[Type[ArkModel]]]] = {
|
|
53
|
+
'add-account': ArkPCloudAddAccount,
|
|
54
|
+
'update-account': ArkPCloudUpdateAccount,
|
|
55
|
+
'delete-account': ArkPCloudDeleteAccount,
|
|
56
|
+
'account': ArkPCloudGetAccount,
|
|
57
|
+
'account-credentials': ArkPCloudGetAccountCredentials,
|
|
58
|
+
'list-accounts': None,
|
|
59
|
+
'list-accounts-by': ArkPCloudAccountsFilter,
|
|
60
|
+
'list-account-secret-versions': ArkPCloudListAccountSecretVersions,
|
|
61
|
+
'generate-account-credentials': ArkPCloudGenerateAccountCredentials,
|
|
62
|
+
'verify-account-credentials': ArkPCloudVerifyAccountCredentials,
|
|
63
|
+
'change-account-credentials': ArkPCloudChangeAccountCredentials,
|
|
64
|
+
'set-account-next-credentials': ArkPCloudSetAccountNextCredentials,
|
|
65
|
+
'update-account-credentials-in-vault': ArkPCloudUpdateAccountCredentialsInVault,
|
|
66
|
+
'reconcile-account-credentials': ArkPCloudReconcileAccountCredentials,
|
|
67
|
+
'accounts-stats': None,
|
|
68
|
+
'link-account': ArkPCloudLinkAccount,
|
|
69
|
+
'unlink-account': ArkPCloudUnlinkAccount,
|
|
70
|
+
}
|
|
71
|
+
PCLOUD_ACCOUNTS_ACTION: Final[ArkServiceActionDefinition] = ArkServiceActionDefinition(
|
|
72
|
+
action_name='accounts',
|
|
73
|
+
schemas=PCLOUD_ACCOUNTS_ACTION_TO_SCHEMA_MAP,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# PCloud Safes Definitions
|
|
77
|
+
PCLOUD_SAFES_ACTION_TO_SCHEMA_MAP: Final[Dict[str, Optional[Type[ArkModel]]]] = {
|
|
78
|
+
'add-safe': ArkPCloudAddSafe,
|
|
79
|
+
'update-safe': ArkPCloudUpdateSafe,
|
|
80
|
+
'delete-safe': ArkPCloudDeleteSafe,
|
|
81
|
+
'safe': ArkPCloudGetSafe,
|
|
82
|
+
'list-safes': None,
|
|
83
|
+
'list-safes-by': ArkPCloudSafesFilters,
|
|
84
|
+
'safes-stats': None,
|
|
85
|
+
'add-safe-member': ArkPCloudAddSafeMember,
|
|
86
|
+
'update-safe-member': ArkPCloudUpdateSafeMember,
|
|
87
|
+
'delete-safe-member': ArkPCloudDeleteSafeMember,
|
|
88
|
+
'safe-member': ArkPCloudGetSafeMember,
|
|
89
|
+
'list-safe-members': ArkPCloudListSafeMembers,
|
|
90
|
+
'list-safe-members-by': ArkPCloudSafeMembersFilters,
|
|
91
|
+
'safe-members-stats': ArkPCloudGetSafeMembersStats,
|
|
92
|
+
'safes-members-stats': None,
|
|
93
|
+
}
|
|
94
|
+
PCLOUD_SAFES_ACTION: Final[ArkServiceActionDefinition] = ArkServiceActionDefinition(
|
|
95
|
+
action_name='safes',
|
|
96
|
+
schemas=PCLOUD_SAFES_ACTION_TO_SCHEMA_MAP,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
# PCloud Platforms Definitions
|
|
100
|
+
PCLOUD_PLATFORMS_ACTION_TO_SCHEMA_MAP: Final[Dict[str, Optional[Type[ArkModel]]]] = {
|
|
101
|
+
'list-platforms': None,
|
|
102
|
+
'list-platforms-by': ArkPCloudPlatformsFilter,
|
|
103
|
+
'import-platform': ArkPCloudImportPlatform,
|
|
104
|
+
'import-target-platform': ArkPCloudImportTargetPlatform,
|
|
105
|
+
'export-platform': ArkPCloudExportPlatform,
|
|
106
|
+
'export-target-platform': ArkPCloudExportTargetPlatform,
|
|
107
|
+
'platform': ArkPCloudGetPlatform,
|
|
108
|
+
'platforms-stats': None,
|
|
109
|
+
'activate-target-platform': ArkPCloudActivateTargetPlatform,
|
|
110
|
+
'deactivate-target-platform': ArkPCloudDeactivateTargetPlatform,
|
|
111
|
+
'list-target-platforms': None,
|
|
112
|
+
'list-target-platforms-by': ArkPCloudTargetPlatformsFilter,
|
|
113
|
+
'target-platform': ArkPCloudGetTargetPlatform,
|
|
114
|
+
'delete-target-platform': ArkPCloudDeleteTargetPlatform,
|
|
115
|
+
'duplicate-target-platform': ArkPCloudDuplicateTargetPlatform,
|
|
116
|
+
'target-platforms-stats': None,
|
|
117
|
+
}
|
|
118
|
+
PCLOUD_PLATFORMS_ACTION: Final[ArkServiceActionDefinition] = ArkServiceActionDefinition(
|
|
119
|
+
action_name='platforms',
|
|
120
|
+
schemas=PCLOUD_PLATFORMS_ACTION_TO_SCHEMA_MAP,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
# Service Actions Definition
|
|
124
|
+
PCLOUD_ACTIONS: Final[ArkServiceActionDefinition] = ArkServiceActionDefinition(
|
|
125
|
+
action_name='pcloud',
|
|
126
|
+
subactions=[
|
|
127
|
+
PCLOUD_ACCOUNTS_ACTION,
|
|
128
|
+
PCLOUD_PLATFORMS_ACTION,
|
|
129
|
+
PCLOUD_SAFES_ACTION,
|
|
130
|
+
],
|
|
131
|
+
)
|
|
@@ -39,7 +39,7 @@ class IdentityArkAuthMethodSettings(ArkAuthMethodSettings):
|
|
|
39
39
|
class IdentityServiceUserArkAuthMethodSettings(ArkAuthMethodSettings):
|
|
40
40
|
identity_authorization_application: str = Field(
|
|
41
41
|
description='Identity application to authorize once logged in with the service user',
|
|
42
|
-
default='
|
|
42
|
+
default='__idaptive_cybr_user_oidc',
|
|
43
43
|
alias='Service User Authorization Application',
|
|
44
44
|
)
|
|
45
45
|
|
|
@@ -13,6 +13,7 @@ class ArkDPADBAuthMethodType(str, Enum):
|
|
|
13
13
|
ADEphemeralUser = 'ad_ephemeral_user'
|
|
14
14
|
LocalEphemeralUser = 'local_ephemeral_user'
|
|
15
15
|
RDSIAMAuthentication = 'rds_iam_authentication'
|
|
16
|
+
AtlasEphemeralUser = 'atlas_ephemeral_user'
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
class ArkDPADBAuthMethod(ArkCamelizedModel):
|
|
File without changes
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_account import (
|
|
2
|
+
ArkPCloudAccount,
|
|
3
|
+
ArkPCloudAccountRemoteMachinesAccess,
|
|
4
|
+
ArkPCloudAccountSecretManagement,
|
|
5
|
+
ArkPCloudAccountSecretType,
|
|
6
|
+
ArkPCloudBaseAccount,
|
|
7
|
+
)
|
|
8
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_account_credentials import ArkPCloudAccountCredentials
|
|
9
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_account_secret_version import ArkPCloudAccountSecretVersion
|
|
10
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_accounts_filter import ArkPCloudAccountsFilter
|
|
11
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_accounts_stats import ArkPCloudAccountsStats
|
|
12
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_add_account import ArkPCloudAddAccount
|
|
13
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_change_account_credentials import ArkPCloudChangeAccountCredentials
|
|
14
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_delete_account import ArkPCloudDeleteAccount
|
|
15
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_generate_account_credentials import ArkPCloudGenerateAccountCredentials
|
|
16
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_get_account import ArkPCloudGetAccount
|
|
17
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_get_account_credentials import ArkPCloudGetAccountCredentials
|
|
18
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_link_account import ArkPCloudLinkAccount
|
|
19
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_list_account_secret_versions import ArkPCloudListAccountSecretVersions
|
|
20
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_reconcile_account_credentials import ArkPCloudReconcileAccountCredentials
|
|
21
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_set_account_next_credentials import ArkPCloudSetAccountNextCredentials
|
|
22
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_unlink_account import ArkPCloudUnlinkAccount
|
|
23
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_update_account import ArkPCloudUpdateAccount
|
|
24
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_update_account_credentials_in_vault import (
|
|
25
|
+
ArkPCloudUpdateAccountCredentialsInVault,
|
|
26
|
+
)
|
|
27
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_verify_account_credentias import ArkPCloudVerifyAccountCredentials
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
'ArkPCloudBaseAccount',
|
|
31
|
+
'ArkPCloudAccount',
|
|
32
|
+
'ArkPCloudAccountRemoteMachinesAccess',
|
|
33
|
+
'ArkPCloudAccountSecretManagement',
|
|
34
|
+
'ArkPCloudAccountSecretType',
|
|
35
|
+
'ArkPCloudAccountsFilter',
|
|
36
|
+
'ArkPCloudAccountsStats',
|
|
37
|
+
'ArkPCloudAddAccount',
|
|
38
|
+
'ArkPCloudDeleteAccount',
|
|
39
|
+
'ArkPCloudGetAccount',
|
|
40
|
+
'ArkPCloudUpdateAccount',
|
|
41
|
+
'ArkPCloudAccountSecretVersion',
|
|
42
|
+
'ArkPCloudListAccountSecretVersions',
|
|
43
|
+
'ArkPCloudAccountCredentials',
|
|
44
|
+
'ArkPCloudGenerateAccountCredentials',
|
|
45
|
+
'ArkPCloudVerifyAccountCredentials',
|
|
46
|
+
'ArkPCloudChangeAccountCredentials',
|
|
47
|
+
'ArkPCloudSetAccountNextCredentials',
|
|
48
|
+
'ArkPCloudUpdateAccountCredentialsInVault',
|
|
49
|
+
'ArkPCloudReconcileAccountCredentials',
|
|
50
|
+
'ArkPCloudGetAccountCredentials',
|
|
51
|
+
'ArkPCloudLinkAccount',
|
|
52
|
+
'ArkPCloudUnlinkAccount',
|
|
53
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
|
+
|
|
4
|
+
from pydantic import Field, validator
|
|
5
|
+
|
|
6
|
+
from ark_sdk_python.models import ArkCamelizedModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ArkPCloudAccountSecretType(str, Enum):
|
|
10
|
+
Password = "password"
|
|
11
|
+
Key = "key"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ArkPCloudAccountSecretManagement(ArkCamelizedModel):
|
|
15
|
+
automatic_management_enabled: Optional[bool] = Field(description='Whether automatic management of the account is enabled or not')
|
|
16
|
+
manual_management_reason: Optional[str] = Field(description='The reason for disabling automatic management')
|
|
17
|
+
last_modified_time: Optional[int] = Field(description='Last time the management properties were modified')
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ArkPCloudAccountRemoteMachinesAccess(ArkCamelizedModel):
|
|
21
|
+
remote_machines: Optional[Union[List[str], str]] = Field(description='Remote machines the access of this account is allowed')
|
|
22
|
+
access_restricted_to_remote_machines: Optional[bool] = Field(
|
|
23
|
+
description='Whether the access is only restricted to those remote machines'
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
# pylint: disable=no-self-use,no-self-argument
|
|
27
|
+
@validator('remote_machines')
|
|
28
|
+
def _validate_remote_machines(remote_machines):
|
|
29
|
+
# backward compatibility for when remote_machines was a comma separated string
|
|
30
|
+
if isinstance(remote_machines, str):
|
|
31
|
+
return remote_machines.split(',')
|
|
32
|
+
return remote_machines
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class ArkPCloudBaseAccount(ArkCamelizedModel):
|
|
36
|
+
name: str = Field(description='Name of the account')
|
|
37
|
+
safe_name: str = Field(description='Safe name to store the account in')
|
|
38
|
+
platform_id: Optional[str] = Field(description='Platform id to relate the account to')
|
|
39
|
+
user_name: Optional[str] = Field(description='Username of the account')
|
|
40
|
+
address: Optional[str] = Field(description='Address of the account')
|
|
41
|
+
secret_type: Optional[ArkPCloudAccountSecretType] = Field(description='Type of the secret of the account')
|
|
42
|
+
platform_account_properties: Optional[Dict[str, Any]] = Field(
|
|
43
|
+
description='Different properties related to the platform the account is related to'
|
|
44
|
+
)
|
|
45
|
+
secret_management: Optional[ArkPCloudAccountSecretManagement] = Field(description='Secret mgmt related properties')
|
|
46
|
+
remote_machines_access: Optional[ArkPCloudAccountRemoteMachinesAccess] = Field(description='Remote machines access related properties')
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class ArkPCloudAccount(ArkPCloudBaseAccount):
|
|
50
|
+
id: str = Field(description='ID of the account')
|
|
51
|
+
status: Optional[str] = Field(description='Status of the account')
|
|
52
|
+
created_time: Optional[int] = Field(description='Creation time of the account')
|
|
53
|
+
category_modification_time: Optional[int] = Field(description='Category modification time of the account')
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from pydantic import Field, SecretStr
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models import ArkModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ArkPCloudAccountCredentials(ArkModel):
|
|
7
|
+
account_id: str = Field(description='The id of the account')
|
|
8
|
+
password: SecretStr = Field(description='The credentials')
|
|
9
|
+
|
|
10
|
+
class Config:
|
|
11
|
+
json_encoders = {SecretStr: lambda v: v.get_secret_value()}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from ark_sdk_python.models import ArkCamelizedModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ArkPCloudAccountSecretVersion(ArkCamelizedModel):
|
|
9
|
+
is_temporary: bool = Field(description='Whether the secret is permenant or temporary')
|
|
10
|
+
modification_date: datetime = Field(description='Modification time of the secret')
|
|
11
|
+
modified_by: str = Field(description='Username who modified the secret')
|
|
12
|
+
version_id: int = Field(description='Version id of the secret')
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ark_sdk_python.models import ArkModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ArkPCloudAccountsFilter(ArkModel):
|
|
10
|
+
search: Optional[str] = Field(description='Search by string')
|
|
11
|
+
search_type: Optional[Literal['contains', 'startswith']] = Field(description='Search type to filter with')
|
|
12
|
+
sort: Optional[str] = Field(description='Sort results by given key')
|
|
13
|
+
safe_name: Optional[str] = Field(description='Safe name to filter by')
|
|
14
|
+
offset: Optional[int] = Field(description='Offset to the accounts list')
|
|
15
|
+
limit: Optional[int] = Field(description='Limit of results')
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from typing import Dict
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from ark_sdk_python.models import ArkModel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ArkPCloudAccountsStats(ArkModel):
|
|
9
|
+
accounts_count: int = Field(description='Overall accounts count')
|
|
10
|
+
accounts_count_by_platform_id: Dict[str, int] = Field(description='Accounts count by platform id')
|
|
11
|
+
accounts_count_by_safe_name: Dict[str, int] = Field(description='Accounts count by safe name')
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from pydantic import Field, SecretStr
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_account import ArkPCloudBaseAccount
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ArkPCloudAddAccount(ArkPCloudBaseAccount):
|
|
7
|
+
secret: SecretStr = Field(description='The secret of the account')
|
|
8
|
+
|
|
9
|
+
class Config:
|
|
10
|
+
json_encoders = {SecretStr: lambda v: v.get_secret_value()}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ark_sdk_python.models import ArkModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ArkPCloudGetAccountCredentials(ArkModel):
|
|
10
|
+
account_id: str = Field(description='The id of the account to retrieve the credentials for')
|
|
11
|
+
reason: Optional[str] = Field(description='Reason for retrieving the credentials')
|
|
12
|
+
ticketing_system_name: Optional[str] = Field(description='Ticketing system name to use for retrieval of the credentials')
|
|
13
|
+
ticket_id: Optional[str] = Field(description='Ticket id allowing retrieval of the credentials')
|
|
14
|
+
version: Optional[str] = Field(description='Version of the credentials to retrieve')
|
|
15
|
+
action_type: Optional[Literal['show', 'copy', 'connect']] = Field(description='Action type of the retrieval', default='show')
|
|
16
|
+
machine: Optional[str] = Field(description='The address of the remote machine to connect to with the credentials')
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models import ArkCamelizedModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ArkPCloudLinkAccount(ArkCamelizedModel):
|
|
7
|
+
account_id: str = Field(description='The id of the account to link')
|
|
8
|
+
safe: str = Field(description='The safe in which the linked account is stored')
|
|
9
|
+
extra_password_index: int = Field(description='The linked account extra password index')
|
|
10
|
+
folder: str = Field(description='Folder of the linked account')
|
|
11
|
+
name: str = Field(description='The linked account name')
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models import ArkModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ArkPCloudListAccountSecretVersions(ArkModel):
|
|
7
|
+
account_id: str = Field(description='The id of the account to retrieve the secret versions for')
|
|
8
|
+
show_temporary: bool = Field(description='Show temporary secrets as well', default=False)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models import ArkCamelizedModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ArkPCloudSetAccountNextCredentials(ArkCamelizedModel):
|
|
7
|
+
account_id: str = Field(description='The id of the account to change the password for')
|
|
8
|
+
new_credentials: str = Field(description='Next credentials to set')
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models import ArkCamelizedModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ArkPCloudUnlinkAccount(ArkCamelizedModel):
|
|
7
|
+
account_id: str = Field(description='The id of the account to unlink')
|
|
8
|
+
extra_password_index: str = Field(description='The linked account extra password index')
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from typing import Any, Dict, Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from ark_sdk_python.models import ArkCamelizedModel
|
|
6
|
+
from ark_sdk_python.models.services.pcloud.accounts.ark_pcloud_account import (
|
|
7
|
+
ArkPCloudAccountRemoteMachinesAccess,
|
|
8
|
+
ArkPCloudAccountSecretManagement,
|
|
9
|
+
ArkPCloudAccountSecretType,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ArkPCloudUpdateAccount(ArkCamelizedModel):
|
|
14
|
+
account_id: str = Field(description='The account id to update')
|
|
15
|
+
name: Optional[str] = Field(description='Name of the account to update')
|
|
16
|
+
address: Optional[str] = Field(description='Address of the account to update')
|
|
17
|
+
username: Optional[str] = Field(description='Username of the account to update')
|
|
18
|
+
platform_id: Optional[str] = Field(description='Platform id to relate the account to to update')
|
|
19
|
+
safe_name: Optional[str] = Field(description='Safe name to store the account in to update')
|
|
20
|
+
secret_type: Optional[ArkPCloudAccountSecretType] = Field(description='Type of the secret of the account to update')
|
|
21
|
+
platform_account_properties: Optional[Dict[str, Any]] = Field(
|
|
22
|
+
description='Different properties related to the platform the account is related to to update'
|
|
23
|
+
)
|
|
24
|
+
secret_management: Optional[ArkPCloudAccountSecretManagement] = Field(description='Secret mgmt related properties to update')
|
|
25
|
+
remote_machines_access: Optional[ArkPCloudAccountRemoteMachinesAccess] = Field(
|
|
26
|
+
description='Remote machines access related properties to update'
|
|
27
|
+
)
|
ark_sdk_python/models/services/pcloud/accounts/ark_pcloud_update_account_credentials_in_vault.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from pydantic import Field
|
|
2
|
+
|
|
3
|
+
from ark_sdk_python.models import ArkCamelizedModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ArkPCloudUpdateAccountCredentialsInVault(ArkCamelizedModel):
|
|
7
|
+
account_id: str = Field(description='The id of the account to change the password for')
|
|
8
|
+
new_credentials: str = Field(description='Wew credentials to set in vault')
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_activate_target_platform import ArkPCloudActivateTargetPlatform
|
|
2
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_deactivate_target_platform import ArkPCloudDeactivateTargetPlatform
|
|
3
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_delete_target_platform import ArkPCloudDeleteTargetPlatform
|
|
4
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_duplicate_target_platform import ArkPCloudDuplicateTargetPlatform
|
|
5
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_duplicated_target_platform_info import ArkPCloudDuplicatedTargetPlatformInfo
|
|
6
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_export_platform import ArkPCloudExportPlatform
|
|
7
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_export_target_platform import ArkPCloudExportTargetPlatform
|
|
8
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_get_platform import ArkPCloudGetPlatform
|
|
9
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_get_target_platform import ArkPCloudGetTargetPlatform
|
|
10
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_import_platform import ArkPCloudImportPlatform
|
|
11
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_import_target_platform import ArkPCloudImportTargetPlatform
|
|
12
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_platform import (
|
|
13
|
+
ArkPCloudCredentialsManagement,
|
|
14
|
+
ArkPCloudPlatform,
|
|
15
|
+
ArkPCloudPlatformGeneralDetails,
|
|
16
|
+
ArkPCloudPlatformProperties,
|
|
17
|
+
ArkPCloudPlatformProperty,
|
|
18
|
+
ArkPCloudPlatformType,
|
|
19
|
+
ArkPCloudPrivilegedAccessWorkflows,
|
|
20
|
+
ArkPCloudSessionManagement,
|
|
21
|
+
)
|
|
22
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_platforms_filter import ArkPCloudPlatformsFilter
|
|
23
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_platforms_stats import ArkPCloudPlatformsStats
|
|
24
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_target_platform import (
|
|
25
|
+
ArkPCloudTargetPlatform,
|
|
26
|
+
ArkPCloudTPCredentialsManagementPolicy,
|
|
27
|
+
ArkPCloudTPCredentialsManagementReconcilePolicy,
|
|
28
|
+
ArkPCloudTPCredentialsManagementSecretUpdateConfiguration,
|
|
29
|
+
ArkPCloudTPCredentialsManagementVerificationChangePolicy,
|
|
30
|
+
ArkPCloudTPPrivilegedAccessWorkflows,
|
|
31
|
+
ArkPCloudTPPrivilegedAccessWorkflowsActiveException,
|
|
32
|
+
ArkPCloudTPPrivilegedSessionManagement,
|
|
33
|
+
)
|
|
34
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_target_platforms_filter import ArkPCloudTargetPlatformsFilter
|
|
35
|
+
from ark_sdk_python.models.services.pcloud.platforms.ark_pcloud_target_platforms_stats import ArkPCloudTargetPlatformsStats
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
'ArkPCloudExportPlatform',
|
|
39
|
+
'ArkPCloudExportTargetPlatform',
|
|
40
|
+
'ArkPCloudGetPlatform',
|
|
41
|
+
'ArkPCloudImportPlatform',
|
|
42
|
+
'ArkPCloudImportTargetPlatform',
|
|
43
|
+
'ArkPCloudCredentialsManagement',
|
|
44
|
+
'ArkPCloudPlatform',
|
|
45
|
+
'ArkPCloudPlatformGeneralDetails',
|
|
46
|
+
'ArkPCloudPlatformProperties',
|
|
47
|
+
'ArkPCloudPlatformProperty',
|
|
48
|
+
'ArkPCloudPlatformType',
|
|
49
|
+
'ArkPCloudPrivilegedAccessWorkflows',
|
|
50
|
+
'ArkPCloudSessionManagement',
|
|
51
|
+
'ArkPCloudPlatformsFilter',
|
|
52
|
+
'ArkPCloudPlatformsStats',
|
|
53
|
+
'ArkPCloudActivateTargetPlatform',
|
|
54
|
+
'ArkPCloudDeactivateTargetPlatform',
|
|
55
|
+
'ArkPCloudTPCredentialsManagementPolicy',
|
|
56
|
+
'ArkPCloudTPCredentialsManagementReconcilePolicy',
|
|
57
|
+
'ArkPCloudTPCredentialsManagementSecretUpdateConfiguration',
|
|
58
|
+
'ArkPCloudTPCredentialsManagementVerificationChangePolicy',
|
|
59
|
+
'ArkPCloudTPPrivilegedAccessWorkflows',
|
|
60
|
+
'ArkPCloudTPPrivilegedAccessWorkflowsActiveException',
|
|
61
|
+
'ArkPCloudTPPrivilegedSessionManagement',
|
|
62
|
+
'ArkPCloudTargetPlatform',
|
|
63
|
+
'ArkPCloudTargetPlatformsFilter',
|
|
64
|
+
'ArkPCloudDuplicateTargetPlatform',
|
|
65
|
+
'ArkPCloudDeleteTargetPlatform',
|
|
66
|
+
'ArkPCloudGetTargetPlatform',
|
|
67
|
+
'ArkPCloudTargetPlatformsStats',
|
|
68
|
+
'ArkPCloudDuplicatedTargetPlatformInfo',
|
|
69
|
+
]
|