Skip to content

Commit 7214588

Browse files
committed
Rename fron onprem to fqdnip
1 parent 630413d commit 7214588

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

ark_sdk_python/examples/requests/uap_sia_vm_add_policy_request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"idleTime": 1
5151
},
5252
"targets": {
53-
"onpremResource": {
53+
"fqdnipResource": {
5454
"fqdnRules": [
5555
{
5656
"operator": "EXACTLY",

ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_access_policy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
from ark_sdk_python.models.services.uap.sia.vm.ark_uap_sia_vm_targets import (
1414
ArkUAPSIAVMAWSResource,
1515
ArkUAPSIAVMAzureResource,
16+
ArkUAPSIAVMFQDNIPResource,
1617
ArkUAPSIAVMGCPResource,
17-
ArkUAPSIAVMOnPremResource,
1818
ArkUAPSIAVMPlatformTargets,
1919
)
2020

@@ -40,9 +40,9 @@ def serialize_model(self, *args, **kwargs) -> Dict[str, Any]:
4040
data['targets'] = {
4141
'GCP': self.targets.gcp_resource.model_dump(*args, **kwargs),
4242
}
43-
elif self.metadata.policy_entitlement.location_type == ArkWorkspaceType.FQDN_IP and self.targets.onprem_resource:
43+
elif self.metadata.policy_entitlement.location_type == ArkWorkspaceType.FQDN_IP and self.targets.fqdnip_resource:
4444
data['targets'] = {
45-
'FQDN/IP': self.targets.onprem_resource.model_dump(*args, **kwargs),
45+
'FQDN/IP': self.targets.fqdnip_resource.model_dump(*args, **kwargs),
4646
}
4747
else:
4848
raise ValueError('Unsupported workspace type')
@@ -65,7 +65,7 @@ def deserialize_model(data: Dict[str, Any], *args, **kwargs) -> 'ArkUAPSIAVMAcce
6565
elif policy.metadata.policy_entitlement.location_type == ArkWorkspaceType.GCP and 'GCP' in data['targets']:
6666
policy.targets.gcp_resource = ArkUAPSIAVMGCPResource.model_validate(data['targets']['GCP'])
6767
elif policy.metadata.policy_entitlement.location_type == ArkWorkspaceType.FQDN_IP and 'FQDN/IP' in data['targets']:
68-
policy.targets.onprem_resource = ArkUAPSIAVMOnPremResource.model_validate(data['targets']['FQDN/IP'])
68+
policy.targets.fqdnip_resource = ArkUAPSIAVMFQDNIPResource.model_validate(data['targets']['FQDN/IP'])
6969
else:
7070
raise ValueError('Workspace type not found')
7171
if 'behavior' in data:

ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_targets.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ class ArkUAPSIAVMGCPResource(ArkCamelizedModel):
110110
projects: List[str] = Field(description='GCP project IDs. Leave empty for all projects.')
111111

112112

113-
class ArkUAPSIAVMOnPremResource(ArkCamelizedModel):
113+
class ArkUAPSIAVMFQDNIPResource(ArkCamelizedModel):
114114
"""
115-
Represents the on-premises resources for a virtual machine access policy, including FQDN and IP rules.
115+
Represents the fqdn/ip resources for a virtual machine access policy, including FQDN and IP rules.
116116
"""
117117

118118
fqdn_rules: Optional[List[ArkUAPSIAVMFQDNRule]] = Field(default=None, description='List of FQDN rules applied to the connection')
@@ -128,11 +128,11 @@ class ArkUAPSIAVMPlatformTargets(ArkCamelizedModel):
128128
Optional[ArkUAPSIAVMAWSResource], Field(description='The AWS resource for this virtual machine access policy')
129129
] = None
130130
azure_resource: Annotated[
131-
Optional[ArkUAPSIAVMAzureResource], Field(description='The AWS resource for this virtual machine access policy')
131+
Optional[ArkUAPSIAVMAzureResource], Field(description='The Azure resource for this virtual machine access policy')
132132
] = None
133133
gcp_resource: Annotated[
134-
Optional[ArkUAPSIAVMGCPResource], Field(description='The AWS resource for this virtual machine access policy')
134+
Optional[ArkUAPSIAVMGCPResource], Field(description='The GCP resource for this virtual machine access policy')
135135
] = None
136-
onprem_resource: Annotated[
137-
Optional[ArkUAPSIAVMOnPremResource], Field(description='The AWS resource for this virtual machine access policy')
136+
fqdnip_resource: Annotated[
137+
Optional[ArkUAPSIAVMFQDNIPResource], Field(description='The FQDN/IP resource for this virtual machine access policy')
138138
] = None

ark_sdk_python/models/services/uap/utils/ark_uap_policies_workspace_type_serializer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ def serialize_uap_policies_workspace_type(ws_type: ArkWorkspaceType) -> str:
1111
return 'Azure'
1212
elif ws_type == ArkWorkspaceType.GCP:
1313
return 'GCP'
14-
elif ws_type == ArkWorkspaceType.ONPREM:
15-
return 'OnPrem'
1614
elif ws_type == ArkWorkspaceType.FQDN_IP:
1715
return 'FQDN/IP'
1816
raise ArkException('Invalid Policies Workspace Type')

docs/howto/uap/uap_vm_policy_cli_workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Here is an example workflow for adding a UAP VM policy via the CLI:
8181
"idleTime": 1
8282
},
8383
"targets": {
84-
"onpremResource": {
84+
"fqdnipResource": {
8585
"fqdnRules": [
8686
{
8787
"operator": "EXACTLY",

docs/howto/uap/uap_vm_policy_sdk_workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ uap_vm_service.add_policy(ArkUAPSIAVMAccessPolicy(
5454
domain_ephemeral_user=ArkUAPSSIAVMDomainEphemeralUser(
5555
assign_groups=['rdp_users'], enable_ephemeral_user_reconnect=False, assign_domain_groups=['domain_rdp_users'])
5656
)),
57-
targets=ArkUAPSIAVMPlatformTargets(onprem_resource=ArkUAPSIAVMOnPremResource(
57+
targets=ArkUAPSIAVMPlatformTargets(fqdnip_resource=ArkUAPSIAVMFQDNIPResource(
5858
fqdn_rules=[ArkUAPSIAVMFQDNRule(operator=ArkSIAVMFQDNOperator.EXACTLY, computername_pattern='myvm.mydomain.com',
5959
domain='domain.com')],
6060
ip_rules=[ArkUAPSIAVMIPRule(operator=ArkSIAVMFQDNOperator.EXACTLY, ip_addresses=['8.8.8.8'], logical_name='myLogicalName')],

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "ark-sdk-python"
3-
version = "2.1.0"
3+
version = "2.1.1"
44
description='Official Ark SDK / CLI for CyberArk Identity Security Platform'
55
authors = ["CyberArk <[email protected]>", "Ofir Iluz <[email protected]"]
66
readme = "README.md"

0 commit comments

Comments
 (0)