Skip to content

ark_uap_sia_vm_targets

ArkUAPSIAVMAWSResource

Bases: ArkCamelizedModel

Represents the AWS resources for a virtual machine access policy.

Source code in ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_targets.py
70
71
72
73
74
75
76
77
78
79
80
class ArkUAPSIAVMAWSResource(ArkCamelizedModel):
    """
    Represents the AWS resources for a virtual machine access policy.
    """

    regions: List[str] = Field(description='AWS region names. For example: "us-east-1". Leave empty for all regions.')
    tags: List[ArkUAPSIAVMKeyValTag] = Field(
        description='A list of key/value pairs that have been defined as custom tags for your  AWS instances. ' 'Leave empty for all tags.'
    )
    vpc_ids: List[str] = Field(description='A list of AWS VPC IDs. The accepted syntax is "vpc-<n>". Leave empty for all VPCs.')
    account_ids: List[str] = Field(description='AWS Account IDs. Leave empty for all AWS Accounts.')

ArkUAPSIAVMAzureResource

Bases: ArkCamelizedModel

Represents the Azure resources for a virtual machine access policy.

Source code in ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_targets.py
83
84
85
86
87
88
89
90
91
92
93
94
class ArkUAPSIAVMAzureResource(ArkCamelizedModel):
    """
    Represents the Azure resources for a virtual machine access policy.
    """

    regions: List[str] = Field(description='Azure region names. For example: eastus2. Leave empty for all regions.')
    tags: List[ArkUAPSIAVMKeyValTag] = Field(
        description='A list of key/value pairs that have been defined as custom tags for your  Azure VMs. Leave ' 'empty for all tags'
    )
    resource_groups: List[str] = Field(description='A list of Azure resource group IDs. Leave empty for all resource groups')
    vnet_ids: List[str] = Field(description='A list of Azure VNet IDs. Leave empty for all VNets.')
    subscriptions: List[str] = Field(description='Azure subscription IDs. Leave empty for all subscriptions.')

ArkUAPSIAVMFQDNIPResource

Bases: ArkCamelizedModel

Represents the fqdn/ip resources for a virtual machine access policy, including FQDN and IP rules.

Source code in ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_targets.py
113
114
115
116
117
118
119
class ArkUAPSIAVMFQDNIPResource(ArkCamelizedModel):
    """
    Represents the fqdn/ip resources for a virtual machine access policy, including FQDN and IP rules.
    """

    fqdn_rules: Optional[List[ArkUAPSIAVMFQDNRule]] = Field(default=None, description='List of FQDN rules applied to the connection')
    ip_rules: Optional[List[ArkUAPSIAVMIPRule]] = Field(default=None, description='List of logical name rules applied to the connection')

ArkUAPSIAVMFQDNRule

Bases: ArkCamelizedModel

Defines a specific FQDN rule used to match a given DNS record

Source code in ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_targets.py
23
24
25
26
27
28
29
30
31
32
33
34
class ArkUAPSIAVMFQDNRule(ArkCamelizedModel):
    """
    Defines a specific FQDN rule used to match a given DNS record
    """

    operator: ArkSIAVMFQDNOperator = Field(description='Operator to perform on the FQDN')
    computername_pattern: Annotated[str, StringConstraints(strict=True, max_length=300)] = Field(
        description='The pattern in relations to the operator'
    )
    domain: Optional[Annotated[str, StringConstraints(strict=True, max_length=1000)]] = Field(
        description='The domain in which to execute the operator on the pattern', default=None
    )

ArkUAPSIAVMGCPResource

Bases: ArkCamelizedModel

Represents the GCP resources for a virtual machine access policy.

Source code in ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_targets.py
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
class ArkUAPSIAVMGCPResource(ArkCamelizedModel):
    """
    Represents the GCP resources for a virtual machine access policy.
    """

    regions: List[str] = Field(description='GCP region names. For example: us-east1. Leave empty for all regions.')
    labels: List[ArkUAPSIAVMKeyValTag] = Field(
        description='A list of key/value pairs that have been defined as custom labels for your GCP VMs. ' 'Leave empty for all labels'
    )
    vpc_ids: List[str] = Field(
        description='A list of GCP VPC IDs. The accepted syntax is "projects/{project_id}/global/networks/{'
        'network_name}". Leave empty for all VPCs.'
    )
    projects: List[str] = Field(description='GCP project IDs. Leave empty for all projects.')

ArkUAPSIAVMIPRule

Bases: ArkCamelizedModel

Defines a specific logical name rule used to match a given ip+logical name

Source code in ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_targets.py
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
class ArkUAPSIAVMIPRule(ArkCamelizedModel):
    """
    Defines a specific logical name rule used to match a given ip+logical name
    """

    operator: ArkSIAVMIpOperator = Field(description='Operator to perform on the ip+logical name')
    ip_addresses: Annotated[List[str], Field(max_length=1000)] = Field(description='IP address to match the logical name')
    logical_name: Annotated[str, StringConstraints(strict=True, min_length=1, max_length=256)] = Field(
        description='Network logical name to match the ip address'
    )

    # pylint: disable=no-self-use,no-self-argument
    @field_validator('logical_name')
    @classmethod
    def validate_logical_name(cls, logical_name):
        pattern = NETWORK_NAME_REGEX
        if logical_name is None or len(logical_name.strip()) == 0:
            raise ValueError(ERROR_MESSAGE_MUST_CONTAIN_VALUE)
        if not re.match(pattern, logical_name):
            raise ValueError('Invalid on prem logical name')
        return logical_name

    # pylint: disable=no-self-use,no-self-argument
    @field_validator('ip_addresses')
    def validate_ip_addresses(cls, ip_addresses, values):
        if values.data.get('operator') == ArkSIAVMIpOperator.EXACTLY and (ip_addresses is None or len(ip_addresses) < 1):
            raise ValueError('ip_addresses rules list must have at least one item with operator EXACTLY')
        for ip in ip_addresses:
            if not is_ip_address(ip):
                raise ValueError(f'Invalid ip address {ip}')
        return ip_addresses

ArkUAPSIAVMKeyValTag

Bases: ArkCamelizedModel

Defines a key/value pair used to match a given tag or label on a VM resource

Source code in ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_targets.py
14
15
16
17
18
19
20
class ArkUAPSIAVMKeyValTag(ArkCamelizedModel):
    """
    Defines a key/value pair used to match a given tag or label on a VM resource
    """

    key: str = Field(min_length=1)
    value: Optional[List[str]] = Field(default=None)

ArkUAPSIAVMPlatformTargets

Bases: ArkCamelizedModel

Represents the targets for a virtual machine access policy, which can include AWS, Azure, GCP, or fqdn/ip resources.

Source code in ark_sdk_python/models/services/uap/sia/vm/ark_uap_sia_vm_targets.py
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
class ArkUAPSIAVMPlatformTargets(ArkCamelizedModel):
    """
    Represents the targets for a virtual machine access policy, which can include AWS, Azure, GCP, or fqdn/ip resources.
    """

    aws_resource: Annotated[
        Optional[ArkUAPSIAVMAWSResource], Field(description='The AWS resource for this virtual machine access policy')
    ] = None
    azure_resource: Annotated[
        Optional[ArkUAPSIAVMAzureResource], Field(description='The Azure resource for this virtual machine access policy')
    ] = None
    gcp_resource: Annotated[
        Optional[ArkUAPSIAVMGCPResource], Field(description='The GCP resource for this virtual machine access policy')
    ] = None
    fqdnip_resource: Annotated[
        Optional[ArkUAPSIAVMFQDNIPResource], Field(description='The FQDN/IP resource for this virtual machine access policy')
    ] = None