code
stringlengths 501
5.19M
| package
stringlengths 2
81
| path
stringlengths 9
304
| filename
stringlengths 4
145
|
---|---|---|---|
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = ['ConnectorGroupArgs', 'ConnectorGroup']
@pulumi.input_type
class ConnectorGroupArgs:
def __init__(__self__, *,
latitude: pulumi.Input[str],
location: pulumi.Input[str],
longitude: pulumi.Input[str],
city_country: Optional[pulumi.Input[str]] = None,
country_code: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
dns_query_type: Optional[pulumi.Input[str]] = None,
enabled: Optional[pulumi.Input[bool]] = None,
lss_app_connector_group: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
override_version_profile: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_app: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_assistant: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_read_assistant: Optional[pulumi.Input[bool]] = None,
upgrade_day: Optional[pulumi.Input[str]] = None,
upgrade_time_in_secs: Optional[pulumi.Input[str]] = None,
use_in_dr_mode: Optional[pulumi.Input[bool]] = None,
version_profile_id: Optional[pulumi.Input[str]] = None,
version_profile_name: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a ConnectorGroup resource.
:param pulumi.Input[str] latitude: Latitude of the App Connector Group. Integer or decimal. With values in the range of `-90` to `90`
:param pulumi.Input[str] location: Location of the App Connector Group. i.e ``"San Jose, CA, USA"``
:param pulumi.Input[str] longitude: Longitude of the App Connector Group. Integer or decimal. With values in the range of `-180` to `180`
:param pulumi.Input[str] city_country: Whether Double Encryption is enabled or disabled for the app. i.e ``"San Jose, US"``
:param pulumi.Input[str] country_code: i.e ``"US"``, ``"CA"``
:param pulumi.Input[str] description: Description of the App Connector Group.
:param pulumi.Input[str] dns_query_type: Supported values are:
:param pulumi.Input[bool] enabled: Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
:param pulumi.Input[str] name: Name of the App Connector Group.
:param pulumi.Input[bool] override_version_profile: Whether the default version profile of the App Connector Group is applied or overridden. Default: `false` Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_app: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_assistant: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_read_assistant: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[str] upgrade_day: App Connectors in this group will attempt to update to a newer version of the software during this specified day i.e ``SUNDAY``
:param pulumi.Input[str] upgrade_time_in_secs: App Connectors in this group will attempt to update to a newer version of the software during this specified time. Default value: `66600`. Integer in seconds (i.e., `-66600`). The integer should be greater than or equal to `0` and less than `86400`, in `15` minute intervals
:param pulumi.Input[bool] use_in_dr_mode: Supported values: `true`, `false`
:param pulumi.Input[str] version_profile_id: ID of the version profile. To learn more, see Version Profile Use Cases. Supported values are:
:param pulumi.Input[str] version_profile_name: Name of the version profile. To learn more, see Version Profile Use Cases. This value is required, if the value for
overrideVersionProfile is set to true
"""
pulumi.set(__self__, "latitude", latitude)
pulumi.set(__self__, "location", location)
pulumi.set(__self__, "longitude", longitude)
if city_country is not None:
pulumi.set(__self__, "city_country", city_country)
if country_code is not None:
pulumi.set(__self__, "country_code", country_code)
if description is not None:
pulumi.set(__self__, "description", description)
if dns_query_type is not None:
pulumi.set(__self__, "dns_query_type", dns_query_type)
if enabled is not None:
pulumi.set(__self__, "enabled", enabled)
if lss_app_connector_group is not None:
pulumi.set(__self__, "lss_app_connector_group", lss_app_connector_group)
if name is not None:
pulumi.set(__self__, "name", name)
if override_version_profile is not None:
pulumi.set(__self__, "override_version_profile", override_version_profile)
if tcp_quick_ack_app is not None:
pulumi.set(__self__, "tcp_quick_ack_app", tcp_quick_ack_app)
if tcp_quick_ack_assistant is not None:
pulumi.set(__self__, "tcp_quick_ack_assistant", tcp_quick_ack_assistant)
if tcp_quick_ack_read_assistant is not None:
pulumi.set(__self__, "tcp_quick_ack_read_assistant", tcp_quick_ack_read_assistant)
if upgrade_day is not None:
pulumi.set(__self__, "upgrade_day", upgrade_day)
if upgrade_time_in_secs is not None:
pulumi.set(__self__, "upgrade_time_in_secs", upgrade_time_in_secs)
if use_in_dr_mode is not None:
pulumi.set(__self__, "use_in_dr_mode", use_in_dr_mode)
if version_profile_id is not None:
pulumi.set(__self__, "version_profile_id", version_profile_id)
if version_profile_name is not None:
pulumi.set(__self__, "version_profile_name", version_profile_name)
@property
@pulumi.getter
def latitude(self) -> pulumi.Input[str]:
"""
Latitude of the App Connector Group. Integer or decimal. With values in the range of `-90` to `90`
"""
return pulumi.get(self, "latitude")
@latitude.setter
def latitude(self, value: pulumi.Input[str]):
pulumi.set(self, "latitude", value)
@property
@pulumi.getter
def location(self) -> pulumi.Input[str]:
"""
Location of the App Connector Group. i.e ``"San Jose, CA, USA"``
"""
return pulumi.get(self, "location")
@location.setter
def location(self, value: pulumi.Input[str]):
pulumi.set(self, "location", value)
@property
@pulumi.getter
def longitude(self) -> pulumi.Input[str]:
"""
Longitude of the App Connector Group. Integer or decimal. With values in the range of `-180` to `180`
"""
return pulumi.get(self, "longitude")
@longitude.setter
def longitude(self, value: pulumi.Input[str]):
pulumi.set(self, "longitude", value)
@property
@pulumi.getter(name="cityCountry")
def city_country(self) -> Optional[pulumi.Input[str]]:
"""
Whether Double Encryption is enabled or disabled for the app. i.e ``"San Jose, US"``
"""
return pulumi.get(self, "city_country")
@city_country.setter
def city_country(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "city_country", value)
@property
@pulumi.getter(name="countryCode")
def country_code(self) -> Optional[pulumi.Input[str]]:
"""
i.e ``"US"``, ``"CA"``
"""
return pulumi.get(self, "country_code")
@country_code.setter
def country_code(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "country_code", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description of the App Connector Group.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="dnsQueryType")
def dns_query_type(self) -> Optional[pulumi.Input[str]]:
"""
Supported values are:
"""
return pulumi.get(self, "dns_query_type")
@dns_query_type.setter
def dns_query_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "dns_query_type", value)
@property
@pulumi.getter
def enabled(self) -> Optional[pulumi.Input[bool]]:
"""
Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
"""
return pulumi.get(self, "enabled")
@enabled.setter
def enabled(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "enabled", value)
@property
@pulumi.getter(name="lssAppConnectorGroup")
def lss_app_connector_group(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "lss_app_connector_group")
@lss_app_connector_group.setter
def lss_app_connector_group(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "lss_app_connector_group", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Name of the App Connector Group.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="overrideVersionProfile")
def override_version_profile(self) -> Optional[pulumi.Input[bool]]:
"""
Whether the default version profile of the App Connector Group is applied or overridden. Default: `false` Supported values: `true`, `false`
"""
return pulumi.get(self, "override_version_profile")
@override_version_profile.setter
def override_version_profile(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "override_version_profile", value)
@property
@pulumi.getter(name="tcpQuickAckApp")
def tcp_quick_ack_app(self) -> Optional[pulumi.Input[bool]]:
"""
Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
"""
return pulumi.get(self, "tcp_quick_ack_app")
@tcp_quick_ack_app.setter
def tcp_quick_ack_app(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "tcp_quick_ack_app", value)
@property
@pulumi.getter(name="tcpQuickAckAssistant")
def tcp_quick_ack_assistant(self) -> Optional[pulumi.Input[bool]]:
"""
Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
"""
return pulumi.get(self, "tcp_quick_ack_assistant")
@tcp_quick_ack_assistant.setter
def tcp_quick_ack_assistant(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "tcp_quick_ack_assistant", value)
@property
@pulumi.getter(name="tcpQuickAckReadAssistant")
def tcp_quick_ack_read_assistant(self) -> Optional[pulumi.Input[bool]]:
"""
Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
"""
return pulumi.get(self, "tcp_quick_ack_read_assistant")
@tcp_quick_ack_read_assistant.setter
def tcp_quick_ack_read_assistant(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "tcp_quick_ack_read_assistant", value)
@property
@pulumi.getter(name="upgradeDay")
def upgrade_day(self) -> Optional[pulumi.Input[str]]:
"""
App Connectors in this group will attempt to update to a newer version of the software during this specified day i.e ``SUNDAY``
"""
return pulumi.get(self, "upgrade_day")
@upgrade_day.setter
def upgrade_day(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "upgrade_day", value)
@property
@pulumi.getter(name="upgradeTimeInSecs")
def upgrade_time_in_secs(self) -> Optional[pulumi.Input[str]]:
"""
App Connectors in this group will attempt to update to a newer version of the software during this specified time. Default value: `66600`. Integer in seconds (i.e., `-66600`). The integer should be greater than or equal to `0` and less than `86400`, in `15` minute intervals
"""
return pulumi.get(self, "upgrade_time_in_secs")
@upgrade_time_in_secs.setter
def upgrade_time_in_secs(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "upgrade_time_in_secs", value)
@property
@pulumi.getter(name="useInDrMode")
def use_in_dr_mode(self) -> Optional[pulumi.Input[bool]]:
"""
Supported values: `true`, `false`
"""
return pulumi.get(self, "use_in_dr_mode")
@use_in_dr_mode.setter
def use_in_dr_mode(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "use_in_dr_mode", value)
@property
@pulumi.getter(name="versionProfileId")
def version_profile_id(self) -> Optional[pulumi.Input[str]]:
"""
ID of the version profile. To learn more, see Version Profile Use Cases. Supported values are:
"""
return pulumi.get(self, "version_profile_id")
@version_profile_id.setter
def version_profile_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "version_profile_id", value)
@property
@pulumi.getter(name="versionProfileName")
def version_profile_name(self) -> Optional[pulumi.Input[str]]:
"""
Name of the version profile. To learn more, see Version Profile Use Cases. This value is required, if the value for
overrideVersionProfile is set to true
"""
return pulumi.get(self, "version_profile_name")
@version_profile_name.setter
def version_profile_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "version_profile_name", value)
@pulumi.input_type
class _ConnectorGroupState:
def __init__(__self__, *,
city_country: Optional[pulumi.Input[str]] = None,
country_code: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
dns_query_type: Optional[pulumi.Input[str]] = None,
enabled: Optional[pulumi.Input[bool]] = None,
latitude: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
longitude: Optional[pulumi.Input[str]] = None,
lss_app_connector_group: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
override_version_profile: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_app: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_assistant: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_read_assistant: Optional[pulumi.Input[bool]] = None,
upgrade_day: Optional[pulumi.Input[str]] = None,
upgrade_time_in_secs: Optional[pulumi.Input[str]] = None,
use_in_dr_mode: Optional[pulumi.Input[bool]] = None,
version_profile_id: Optional[pulumi.Input[str]] = None,
version_profile_name: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering ConnectorGroup resources.
:param pulumi.Input[str] city_country: Whether Double Encryption is enabled or disabled for the app. i.e ``"San Jose, US"``
:param pulumi.Input[str] country_code: i.e ``"US"``, ``"CA"``
:param pulumi.Input[str] description: Description of the App Connector Group.
:param pulumi.Input[str] dns_query_type: Supported values are:
:param pulumi.Input[bool] enabled: Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
:param pulumi.Input[str] latitude: Latitude of the App Connector Group. Integer or decimal. With values in the range of `-90` to `90`
:param pulumi.Input[str] location: Location of the App Connector Group. i.e ``"San Jose, CA, USA"``
:param pulumi.Input[str] longitude: Longitude of the App Connector Group. Integer or decimal. With values in the range of `-180` to `180`
:param pulumi.Input[str] name: Name of the App Connector Group.
:param pulumi.Input[bool] override_version_profile: Whether the default version profile of the App Connector Group is applied or overridden. Default: `false` Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_app: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_assistant: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_read_assistant: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[str] upgrade_day: App Connectors in this group will attempt to update to a newer version of the software during this specified day i.e ``SUNDAY``
:param pulumi.Input[str] upgrade_time_in_secs: App Connectors in this group will attempt to update to a newer version of the software during this specified time. Default value: `66600`. Integer in seconds (i.e., `-66600`). The integer should be greater than or equal to `0` and less than `86400`, in `15` minute intervals
:param pulumi.Input[bool] use_in_dr_mode: Supported values: `true`, `false`
:param pulumi.Input[str] version_profile_id: ID of the version profile. To learn more, see Version Profile Use Cases. Supported values are:
:param pulumi.Input[str] version_profile_name: Name of the version profile. To learn more, see Version Profile Use Cases. This value is required, if the value for
overrideVersionProfile is set to true
"""
if city_country is not None:
pulumi.set(__self__, "city_country", city_country)
if country_code is not None:
pulumi.set(__self__, "country_code", country_code)
if description is not None:
pulumi.set(__self__, "description", description)
if dns_query_type is not None:
pulumi.set(__self__, "dns_query_type", dns_query_type)
if enabled is not None:
pulumi.set(__self__, "enabled", enabled)
if latitude is not None:
pulumi.set(__self__, "latitude", latitude)
if location is not None:
pulumi.set(__self__, "location", location)
if longitude is not None:
pulumi.set(__self__, "longitude", longitude)
if lss_app_connector_group is not None:
pulumi.set(__self__, "lss_app_connector_group", lss_app_connector_group)
if name is not None:
pulumi.set(__self__, "name", name)
if override_version_profile is not None:
pulumi.set(__self__, "override_version_profile", override_version_profile)
if tcp_quick_ack_app is not None:
pulumi.set(__self__, "tcp_quick_ack_app", tcp_quick_ack_app)
if tcp_quick_ack_assistant is not None:
pulumi.set(__self__, "tcp_quick_ack_assistant", tcp_quick_ack_assistant)
if tcp_quick_ack_read_assistant is not None:
pulumi.set(__self__, "tcp_quick_ack_read_assistant", tcp_quick_ack_read_assistant)
if upgrade_day is not None:
pulumi.set(__self__, "upgrade_day", upgrade_day)
if upgrade_time_in_secs is not None:
pulumi.set(__self__, "upgrade_time_in_secs", upgrade_time_in_secs)
if use_in_dr_mode is not None:
pulumi.set(__self__, "use_in_dr_mode", use_in_dr_mode)
if version_profile_id is not None:
pulumi.set(__self__, "version_profile_id", version_profile_id)
if version_profile_name is not None:
pulumi.set(__self__, "version_profile_name", version_profile_name)
@property
@pulumi.getter(name="cityCountry")
def city_country(self) -> Optional[pulumi.Input[str]]:
"""
Whether Double Encryption is enabled or disabled for the app. i.e ``"San Jose, US"``
"""
return pulumi.get(self, "city_country")
@city_country.setter
def city_country(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "city_country", value)
@property
@pulumi.getter(name="countryCode")
def country_code(self) -> Optional[pulumi.Input[str]]:
"""
i.e ``"US"``, ``"CA"``
"""
return pulumi.get(self, "country_code")
@country_code.setter
def country_code(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "country_code", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description of the App Connector Group.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="dnsQueryType")
def dns_query_type(self) -> Optional[pulumi.Input[str]]:
"""
Supported values are:
"""
return pulumi.get(self, "dns_query_type")
@dns_query_type.setter
def dns_query_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "dns_query_type", value)
@property
@pulumi.getter
def enabled(self) -> Optional[pulumi.Input[bool]]:
"""
Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
"""
return pulumi.get(self, "enabled")
@enabled.setter
def enabled(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "enabled", value)
@property
@pulumi.getter
def latitude(self) -> Optional[pulumi.Input[str]]:
"""
Latitude of the App Connector Group. Integer or decimal. With values in the range of `-90` to `90`
"""
return pulumi.get(self, "latitude")
@latitude.setter
def latitude(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "latitude", value)
@property
@pulumi.getter
def location(self) -> Optional[pulumi.Input[str]]:
"""
Location of the App Connector Group. i.e ``"San Jose, CA, USA"``
"""
return pulumi.get(self, "location")
@location.setter
def location(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "location", value)
@property
@pulumi.getter
def longitude(self) -> Optional[pulumi.Input[str]]:
"""
Longitude of the App Connector Group. Integer or decimal. With values in the range of `-180` to `180`
"""
return pulumi.get(self, "longitude")
@longitude.setter
def longitude(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "longitude", value)
@property
@pulumi.getter(name="lssAppConnectorGroup")
def lss_app_connector_group(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "lss_app_connector_group")
@lss_app_connector_group.setter
def lss_app_connector_group(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "lss_app_connector_group", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
Name of the App Connector Group.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="overrideVersionProfile")
def override_version_profile(self) -> Optional[pulumi.Input[bool]]:
"""
Whether the default version profile of the App Connector Group is applied or overridden. Default: `false` Supported values: `true`, `false`
"""
return pulumi.get(self, "override_version_profile")
@override_version_profile.setter
def override_version_profile(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "override_version_profile", value)
@property
@pulumi.getter(name="tcpQuickAckApp")
def tcp_quick_ack_app(self) -> Optional[pulumi.Input[bool]]:
"""
Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
"""
return pulumi.get(self, "tcp_quick_ack_app")
@tcp_quick_ack_app.setter
def tcp_quick_ack_app(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "tcp_quick_ack_app", value)
@property
@pulumi.getter(name="tcpQuickAckAssistant")
def tcp_quick_ack_assistant(self) -> Optional[pulumi.Input[bool]]:
"""
Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
"""
return pulumi.get(self, "tcp_quick_ack_assistant")
@tcp_quick_ack_assistant.setter
def tcp_quick_ack_assistant(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "tcp_quick_ack_assistant", value)
@property
@pulumi.getter(name="tcpQuickAckReadAssistant")
def tcp_quick_ack_read_assistant(self) -> Optional[pulumi.Input[bool]]:
"""
Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
"""
return pulumi.get(self, "tcp_quick_ack_read_assistant")
@tcp_quick_ack_read_assistant.setter
def tcp_quick_ack_read_assistant(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "tcp_quick_ack_read_assistant", value)
@property
@pulumi.getter(name="upgradeDay")
def upgrade_day(self) -> Optional[pulumi.Input[str]]:
"""
App Connectors in this group will attempt to update to a newer version of the software during this specified day i.e ``SUNDAY``
"""
return pulumi.get(self, "upgrade_day")
@upgrade_day.setter
def upgrade_day(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "upgrade_day", value)
@property
@pulumi.getter(name="upgradeTimeInSecs")
def upgrade_time_in_secs(self) -> Optional[pulumi.Input[str]]:
"""
App Connectors in this group will attempt to update to a newer version of the software during this specified time. Default value: `66600`. Integer in seconds (i.e., `-66600`). The integer should be greater than or equal to `0` and less than `86400`, in `15` minute intervals
"""
return pulumi.get(self, "upgrade_time_in_secs")
@upgrade_time_in_secs.setter
def upgrade_time_in_secs(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "upgrade_time_in_secs", value)
@property
@pulumi.getter(name="useInDrMode")
def use_in_dr_mode(self) -> Optional[pulumi.Input[bool]]:
"""
Supported values: `true`, `false`
"""
return pulumi.get(self, "use_in_dr_mode")
@use_in_dr_mode.setter
def use_in_dr_mode(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "use_in_dr_mode", value)
@property
@pulumi.getter(name="versionProfileId")
def version_profile_id(self) -> Optional[pulumi.Input[str]]:
"""
ID of the version profile. To learn more, see Version Profile Use Cases. Supported values are:
"""
return pulumi.get(self, "version_profile_id")
@version_profile_id.setter
def version_profile_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "version_profile_id", value)
@property
@pulumi.getter(name="versionProfileName")
def version_profile_name(self) -> Optional[pulumi.Input[str]]:
"""
Name of the version profile. To learn more, see Version Profile Use Cases. This value is required, if the value for
overrideVersionProfile is set to true
"""
return pulumi.get(self, "version_profile_name")
@version_profile_name.setter
def version_profile_name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "version_profile_name", value)
class ConnectorGroup(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
city_country: Optional[pulumi.Input[str]] = None,
country_code: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
dns_query_type: Optional[pulumi.Input[str]] = None,
enabled: Optional[pulumi.Input[bool]] = None,
latitude: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
longitude: Optional[pulumi.Input[str]] = None,
lss_app_connector_group: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
override_version_profile: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_app: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_assistant: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_read_assistant: Optional[pulumi.Input[bool]] = None,
upgrade_day: Optional[pulumi.Input[str]] = None,
upgrade_time_in_secs: Optional[pulumi.Input[str]] = None,
use_in_dr_mode: Optional[pulumi.Input[bool]] = None,
version_profile_id: Optional[pulumi.Input[str]] = None,
version_profile_name: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
## Example Usage
```python
import pulumi
import zscaler_pulumi_zpa as zpa
# Create a App Connector Group
example = zpa.app_connector_group.ConnectorGroup("example",
city_country="San Jose, CA",
country_code="US",
description="Example",
dns_query_type="IPV4_IPV6",
enabled=True,
latitude="37.338",
location="San Jose, CA, US",
longitude="-121.8863",
override_version_profile=True,
upgrade_day="SUNDAY",
upgrade_time_in_secs="66600",
version_profile_name="New Release")
```
## Import
Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language. [Visit](https://github.com/zscaler/zscaler-terraformer) App Connector Group can be imported by using `<APP CONNECTOR GROUP ID>` or `<APP CONNECTOR GROUP NAME>`as the import ID.
```sh
$ pulumi import zpa:AppConnectorGroup/connectorGroup:ConnectorGroup example <app_connector_group_id>
```
or
```sh
$ pulumi import zpa:AppConnectorGroup/connectorGroup:ConnectorGroup example <app_connector_group_name>
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] city_country: Whether Double Encryption is enabled or disabled for the app. i.e ``"San Jose, US"``
:param pulumi.Input[str] country_code: i.e ``"US"``, ``"CA"``
:param pulumi.Input[str] description: Description of the App Connector Group.
:param pulumi.Input[str] dns_query_type: Supported values are:
:param pulumi.Input[bool] enabled: Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
:param pulumi.Input[str] latitude: Latitude of the App Connector Group. Integer or decimal. With values in the range of `-90` to `90`
:param pulumi.Input[str] location: Location of the App Connector Group. i.e ``"San Jose, CA, USA"``
:param pulumi.Input[str] longitude: Longitude of the App Connector Group. Integer or decimal. With values in the range of `-180` to `180`
:param pulumi.Input[str] name: Name of the App Connector Group.
:param pulumi.Input[bool] override_version_profile: Whether the default version profile of the App Connector Group is applied or overridden. Default: `false` Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_app: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_assistant: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_read_assistant: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[str] upgrade_day: App Connectors in this group will attempt to update to a newer version of the software during this specified day i.e ``SUNDAY``
:param pulumi.Input[str] upgrade_time_in_secs: App Connectors in this group will attempt to update to a newer version of the software during this specified time. Default value: `66600`. Integer in seconds (i.e., `-66600`). The integer should be greater than or equal to `0` and less than `86400`, in `15` minute intervals
:param pulumi.Input[bool] use_in_dr_mode: Supported values: `true`, `false`
:param pulumi.Input[str] version_profile_id: ID of the version profile. To learn more, see Version Profile Use Cases. Supported values are:
:param pulumi.Input[str] version_profile_name: Name of the version profile. To learn more, see Version Profile Use Cases. This value is required, if the value for
overrideVersionProfile is set to true
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: ConnectorGroupArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
## Example Usage
```python
import pulumi
import zscaler_pulumi_zpa as zpa
# Create a App Connector Group
example = zpa.app_connector_group.ConnectorGroup("example",
city_country="San Jose, CA",
country_code="US",
description="Example",
dns_query_type="IPV4_IPV6",
enabled=True,
latitude="37.338",
location="San Jose, CA, US",
longitude="-121.8863",
override_version_profile=True,
upgrade_day="SUNDAY",
upgrade_time_in_secs="66600",
version_profile_name="New Release")
```
## Import
Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language. [Visit](https://github.com/zscaler/zscaler-terraformer) App Connector Group can be imported by using `<APP CONNECTOR GROUP ID>` or `<APP CONNECTOR GROUP NAME>`as the import ID.
```sh
$ pulumi import zpa:AppConnectorGroup/connectorGroup:ConnectorGroup example <app_connector_group_id>
```
or
```sh
$ pulumi import zpa:AppConnectorGroup/connectorGroup:ConnectorGroup example <app_connector_group_name>
```
:param str resource_name: The name of the resource.
:param ConnectorGroupArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(ConnectorGroupArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
city_country: Optional[pulumi.Input[str]] = None,
country_code: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
dns_query_type: Optional[pulumi.Input[str]] = None,
enabled: Optional[pulumi.Input[bool]] = None,
latitude: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
longitude: Optional[pulumi.Input[str]] = None,
lss_app_connector_group: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
override_version_profile: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_app: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_assistant: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_read_assistant: Optional[pulumi.Input[bool]] = None,
upgrade_day: Optional[pulumi.Input[str]] = None,
upgrade_time_in_secs: Optional[pulumi.Input[str]] = None,
use_in_dr_mode: Optional[pulumi.Input[bool]] = None,
version_profile_id: Optional[pulumi.Input[str]] = None,
version_profile_name: Optional[pulumi.Input[str]] = None,
__props__=None):
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = ConnectorGroupArgs.__new__(ConnectorGroupArgs)
__props__.__dict__["city_country"] = city_country
__props__.__dict__["country_code"] = country_code
__props__.__dict__["description"] = description
__props__.__dict__["dns_query_type"] = dns_query_type
__props__.__dict__["enabled"] = enabled
if latitude is None and not opts.urn:
raise TypeError("Missing required property 'latitude'")
__props__.__dict__["latitude"] = latitude
if location is None and not opts.urn:
raise TypeError("Missing required property 'location'")
__props__.__dict__["location"] = location
if longitude is None and not opts.urn:
raise TypeError("Missing required property 'longitude'")
__props__.__dict__["longitude"] = longitude
__props__.__dict__["lss_app_connector_group"] = lss_app_connector_group
__props__.__dict__["name"] = name
__props__.__dict__["override_version_profile"] = override_version_profile
__props__.__dict__["tcp_quick_ack_app"] = tcp_quick_ack_app
__props__.__dict__["tcp_quick_ack_assistant"] = tcp_quick_ack_assistant
__props__.__dict__["tcp_quick_ack_read_assistant"] = tcp_quick_ack_read_assistant
__props__.__dict__["upgrade_day"] = upgrade_day
__props__.__dict__["upgrade_time_in_secs"] = upgrade_time_in_secs
__props__.__dict__["use_in_dr_mode"] = use_in_dr_mode
__props__.__dict__["version_profile_id"] = version_profile_id
__props__.__dict__["version_profile_name"] = version_profile_name
super(ConnectorGroup, __self__).__init__(
'zpa:AppConnectorGroup/connectorGroup:ConnectorGroup',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
city_country: Optional[pulumi.Input[str]] = None,
country_code: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
dns_query_type: Optional[pulumi.Input[str]] = None,
enabled: Optional[pulumi.Input[bool]] = None,
latitude: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
longitude: Optional[pulumi.Input[str]] = None,
lss_app_connector_group: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
override_version_profile: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_app: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_assistant: Optional[pulumi.Input[bool]] = None,
tcp_quick_ack_read_assistant: Optional[pulumi.Input[bool]] = None,
upgrade_day: Optional[pulumi.Input[str]] = None,
upgrade_time_in_secs: Optional[pulumi.Input[str]] = None,
use_in_dr_mode: Optional[pulumi.Input[bool]] = None,
version_profile_id: Optional[pulumi.Input[str]] = None,
version_profile_name: Optional[pulumi.Input[str]] = None) -> 'ConnectorGroup':
"""
Get an existing ConnectorGroup resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] city_country: Whether Double Encryption is enabled or disabled for the app. i.e ``"San Jose, US"``
:param pulumi.Input[str] country_code: i.e ``"US"``, ``"CA"``
:param pulumi.Input[str] description: Description of the App Connector Group.
:param pulumi.Input[str] dns_query_type: Supported values are:
:param pulumi.Input[bool] enabled: Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
:param pulumi.Input[str] latitude: Latitude of the App Connector Group. Integer or decimal. With values in the range of `-90` to `90`
:param pulumi.Input[str] location: Location of the App Connector Group. i.e ``"San Jose, CA, USA"``
:param pulumi.Input[str] longitude: Longitude of the App Connector Group. Integer or decimal. With values in the range of `-180` to `180`
:param pulumi.Input[str] name: Name of the App Connector Group.
:param pulumi.Input[bool] override_version_profile: Whether the default version profile of the App Connector Group is applied or overridden. Default: `false` Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_app: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_assistant: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[bool] tcp_quick_ack_read_assistant: Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
:param pulumi.Input[str] upgrade_day: App Connectors in this group will attempt to update to a newer version of the software during this specified day i.e ``SUNDAY``
:param pulumi.Input[str] upgrade_time_in_secs: App Connectors in this group will attempt to update to a newer version of the software during this specified time. Default value: `66600`. Integer in seconds (i.e., `-66600`). The integer should be greater than or equal to `0` and less than `86400`, in `15` minute intervals
:param pulumi.Input[bool] use_in_dr_mode: Supported values: `true`, `false`
:param pulumi.Input[str] version_profile_id: ID of the version profile. To learn more, see Version Profile Use Cases. Supported values are:
:param pulumi.Input[str] version_profile_name: Name of the version profile. To learn more, see Version Profile Use Cases. This value is required, if the value for
overrideVersionProfile is set to true
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _ConnectorGroupState.__new__(_ConnectorGroupState)
__props__.__dict__["city_country"] = city_country
__props__.__dict__["country_code"] = country_code
__props__.__dict__["description"] = description
__props__.__dict__["dns_query_type"] = dns_query_type
__props__.__dict__["enabled"] = enabled
__props__.__dict__["latitude"] = latitude
__props__.__dict__["location"] = location
__props__.__dict__["longitude"] = longitude
__props__.__dict__["lss_app_connector_group"] = lss_app_connector_group
__props__.__dict__["name"] = name
__props__.__dict__["override_version_profile"] = override_version_profile
__props__.__dict__["tcp_quick_ack_app"] = tcp_quick_ack_app
__props__.__dict__["tcp_quick_ack_assistant"] = tcp_quick_ack_assistant
__props__.__dict__["tcp_quick_ack_read_assistant"] = tcp_quick_ack_read_assistant
__props__.__dict__["upgrade_day"] = upgrade_day
__props__.__dict__["upgrade_time_in_secs"] = upgrade_time_in_secs
__props__.__dict__["use_in_dr_mode"] = use_in_dr_mode
__props__.__dict__["version_profile_id"] = version_profile_id
__props__.__dict__["version_profile_name"] = version_profile_name
return ConnectorGroup(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="cityCountry")
def city_country(self) -> pulumi.Output[str]:
"""
Whether Double Encryption is enabled or disabled for the app. i.e ``"San Jose, US"``
"""
return pulumi.get(self, "city_country")
@property
@pulumi.getter(name="countryCode")
def country_code(self) -> pulumi.Output[str]:
"""
i.e ``"US"``, ``"CA"``
"""
return pulumi.get(self, "country_code")
@property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
"""
Description of the App Connector Group.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter(name="dnsQueryType")
def dns_query_type(self) -> pulumi.Output[Optional[str]]:
"""
Supported values are:
"""
return pulumi.get(self, "dns_query_type")
@property
@pulumi.getter
def enabled(self) -> pulumi.Output[bool]:
"""
Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
"""
return pulumi.get(self, "enabled")
@property
@pulumi.getter
def latitude(self) -> pulumi.Output[str]:
"""
Latitude of the App Connector Group. Integer or decimal. With values in the range of `-90` to `90`
"""
return pulumi.get(self, "latitude")
@property
@pulumi.getter
def location(self) -> pulumi.Output[str]:
"""
Location of the App Connector Group. i.e ``"San Jose, CA, USA"``
"""
return pulumi.get(self, "location")
@property
@pulumi.getter
def longitude(self) -> pulumi.Output[str]:
"""
Longitude of the App Connector Group. Integer or decimal. With values in the range of `-180` to `180`
"""
return pulumi.get(self, "longitude")
@property
@pulumi.getter(name="lssAppConnectorGroup")
def lss_app_connector_group(self) -> pulumi.Output[bool]:
return pulumi.get(self, "lss_app_connector_group")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
Name of the App Connector Group.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="overrideVersionProfile")
def override_version_profile(self) -> pulumi.Output[bool]:
"""
Whether the default version profile of the App Connector Group is applied or overridden. Default: `false` Supported values: `true`, `false`
"""
return pulumi.get(self, "override_version_profile")
@property
@pulumi.getter(name="tcpQuickAckApp")
def tcp_quick_ack_app(self) -> pulumi.Output[bool]:
"""
Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
"""
return pulumi.get(self, "tcp_quick_ack_app")
@property
@pulumi.getter(name="tcpQuickAckAssistant")
def tcp_quick_ack_assistant(self) -> pulumi.Output[bool]:
"""
Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
"""
return pulumi.get(self, "tcp_quick_ack_assistant")
@property
@pulumi.getter(name="tcpQuickAckReadAssistant")
def tcp_quick_ack_read_assistant(self) -> pulumi.Output[bool]:
"""
Whether TCP Quick Acknowledgement is enabled or disabled for the application. The tcpQuickAckApp, tcpQuickAckAssistant, and tcpQuickAckReadAssistant fields must all share the same value. Supported values: `true`, `false`
"""
return pulumi.get(self, "tcp_quick_ack_read_assistant")
@property
@pulumi.getter(name="upgradeDay")
def upgrade_day(self) -> pulumi.Output[Optional[str]]:
"""
App Connectors in this group will attempt to update to a newer version of the software during this specified day i.e ``SUNDAY``
"""
return pulumi.get(self, "upgrade_day")
@property
@pulumi.getter(name="upgradeTimeInSecs")
def upgrade_time_in_secs(self) -> pulumi.Output[Optional[str]]:
"""
App Connectors in this group will attempt to update to a newer version of the software during this specified time. Default value: `66600`. Integer in seconds (i.e., `-66600`). The integer should be greater than or equal to `0` and less than `86400`, in `15` minute intervals
"""
return pulumi.get(self, "upgrade_time_in_secs")
@property
@pulumi.getter(name="useInDrMode")
def use_in_dr_mode(self) -> pulumi.Output[bool]:
"""
Supported values: `true`, `false`
"""
return pulumi.get(self, "use_in_dr_mode")
@property
@pulumi.getter(name="versionProfileId")
def version_profile_id(self) -> pulumi.Output[str]:
"""
ID of the version profile. To learn more, see Version Profile Use Cases. Supported values are:
"""
return pulumi.get(self, "version_profile_id")
@property
@pulumi.getter(name="versionProfileName")
def version_profile_name(self) -> pulumi.Output[str]:
"""
Name of the version profile. To learn more, see Version Profile Use Cases. This value is required, if the value for
overrideVersionProfile is set to true
"""
return pulumi.get(self, "version_profile_name") | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/appconnectorgroup/connector_group.py | connector_group.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'GetAppConnectorGroupConnectorResult',
'GetAppConnectorGroupServerGroupResult',
]
@pulumi.output_type
class GetAppConnectorGroupConnectorResult(dict):
def __init__(__self__, *,
appconnector_group_id: str,
appconnector_group_name: str,
application_start_time: str,
control_channel_status: str,
creation_time: str,
ctrl_broker_name: str,
current_version: str,
description: str,
enabled: bool,
enrollment_cert: Mapping[str, Any],
expected_upgrade_time: str,
expected_version: str,
fingerprint: str,
id: str,
ipacl: str,
issued_cert_id: str,
last_broker_connect_time: str,
last_broker_connect_time_duration: str,
last_broker_disconnect_time: str,
last_broker_disconnect_time_duration: str,
last_upgrade_time: str,
latitude: str,
location: str,
longitude: str,
modified_time: str,
modifiedby: str,
name: str,
platform: str,
previous_version: str,
private_ip: str,
provisioning_key_id: str,
provisioning_key_name: str,
public_ip: str,
sarge_version: str,
upgrade_attempt: str,
upgrade_status: str):
"""
:param str description: (String) Description of the App Connector Group.
:param bool enabled: (String) Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
:param str id: ID of the App Connector Group.
:param str latitude: (String) Latitude of the App Connector Group. Integer or decimal. With values in the range of `-90` to `90`
:param str location: (String) Location of the App Connector Group.
:param str longitude: (String) Longitude of the App Connector Group. Integer or decimal. With values in the range of `-180` to `180`
:param str name: Name of the App Connector Group.
"""
pulumi.set(__self__, "appconnector_group_id", appconnector_group_id)
pulumi.set(__self__, "appconnector_group_name", appconnector_group_name)
pulumi.set(__self__, "application_start_time", application_start_time)
pulumi.set(__self__, "control_channel_status", control_channel_status)
pulumi.set(__self__, "creation_time", creation_time)
pulumi.set(__self__, "ctrl_broker_name", ctrl_broker_name)
pulumi.set(__self__, "current_version", current_version)
pulumi.set(__self__, "description", description)
pulumi.set(__self__, "enabled", enabled)
pulumi.set(__self__, "enrollment_cert", enrollment_cert)
pulumi.set(__self__, "expected_upgrade_time", expected_upgrade_time)
pulumi.set(__self__, "expected_version", expected_version)
pulumi.set(__self__, "fingerprint", fingerprint)
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "ipacl", ipacl)
pulumi.set(__self__, "issued_cert_id", issued_cert_id)
pulumi.set(__self__, "last_broker_connect_time", last_broker_connect_time)
pulumi.set(__self__, "last_broker_connect_time_duration", last_broker_connect_time_duration)
pulumi.set(__self__, "last_broker_disconnect_time", last_broker_disconnect_time)
pulumi.set(__self__, "last_broker_disconnect_time_duration", last_broker_disconnect_time_duration)
pulumi.set(__self__, "last_upgrade_time", last_upgrade_time)
pulumi.set(__self__, "latitude", latitude)
pulumi.set(__self__, "location", location)
pulumi.set(__self__, "longitude", longitude)
pulumi.set(__self__, "modified_time", modified_time)
pulumi.set(__self__, "modifiedby", modifiedby)
pulumi.set(__self__, "name", name)
pulumi.set(__self__, "platform", platform)
pulumi.set(__self__, "previous_version", previous_version)
pulumi.set(__self__, "private_ip", private_ip)
pulumi.set(__self__, "provisioning_key_id", provisioning_key_id)
pulumi.set(__self__, "provisioning_key_name", provisioning_key_name)
pulumi.set(__self__, "public_ip", public_ip)
pulumi.set(__self__, "sarge_version", sarge_version)
pulumi.set(__self__, "upgrade_attempt", upgrade_attempt)
pulumi.set(__self__, "upgrade_status", upgrade_status)
@property
@pulumi.getter(name="appconnectorGroupId")
def appconnector_group_id(self) -> str:
return pulumi.get(self, "appconnector_group_id")
@property
@pulumi.getter(name="appconnectorGroupName")
def appconnector_group_name(self) -> str:
return pulumi.get(self, "appconnector_group_name")
@property
@pulumi.getter(name="applicationStartTime")
def application_start_time(self) -> str:
return pulumi.get(self, "application_start_time")
@property
@pulumi.getter(name="controlChannelStatus")
def control_channel_status(self) -> str:
return pulumi.get(self, "control_channel_status")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter(name="ctrlBrokerName")
def ctrl_broker_name(self) -> str:
return pulumi.get(self, "ctrl_broker_name")
@property
@pulumi.getter(name="currentVersion")
def current_version(self) -> str:
return pulumi.get(self, "current_version")
@property
@pulumi.getter
def description(self) -> str:
"""
(String) Description of the App Connector Group.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def enabled(self) -> bool:
"""
(String) Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
"""
return pulumi.get(self, "enabled")
@property
@pulumi.getter(name="enrollmentCert")
def enrollment_cert(self) -> Mapping[str, Any]:
return pulumi.get(self, "enrollment_cert")
@property
@pulumi.getter(name="expectedUpgradeTime")
def expected_upgrade_time(self) -> str:
return pulumi.get(self, "expected_upgrade_time")
@property
@pulumi.getter(name="expectedVersion")
def expected_version(self) -> str:
return pulumi.get(self, "expected_version")
@property
@pulumi.getter
def fingerprint(self) -> str:
return pulumi.get(self, "fingerprint")
@property
@pulumi.getter
def id(self) -> str:
"""
ID of the App Connector Group.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def ipacl(self) -> str:
return pulumi.get(self, "ipacl")
@property
@pulumi.getter(name="issuedCertId")
def issued_cert_id(self) -> str:
return pulumi.get(self, "issued_cert_id")
@property
@pulumi.getter(name="lastBrokerConnectTime")
def last_broker_connect_time(self) -> str:
return pulumi.get(self, "last_broker_connect_time")
@property
@pulumi.getter(name="lastBrokerConnectTimeDuration")
def last_broker_connect_time_duration(self) -> str:
return pulumi.get(self, "last_broker_connect_time_duration")
@property
@pulumi.getter(name="lastBrokerDisconnectTime")
def last_broker_disconnect_time(self) -> str:
return pulumi.get(self, "last_broker_disconnect_time")
@property
@pulumi.getter(name="lastBrokerDisconnectTimeDuration")
def last_broker_disconnect_time_duration(self) -> str:
return pulumi.get(self, "last_broker_disconnect_time_duration")
@property
@pulumi.getter(name="lastUpgradeTime")
def last_upgrade_time(self) -> str:
return pulumi.get(self, "last_upgrade_time")
@property
@pulumi.getter
def latitude(self) -> str:
"""
(String) Latitude of the App Connector Group. Integer or decimal. With values in the range of `-90` to `90`
"""
return pulumi.get(self, "latitude")
@property
@pulumi.getter
def location(self) -> str:
"""
(String) Location of the App Connector Group.
"""
return pulumi.get(self, "location")
@property
@pulumi.getter
def longitude(self) -> str:
"""
(String) Longitude of the App Connector Group. Integer or decimal. With values in the range of `-180` to `180`
"""
return pulumi.get(self, "longitude")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def modifiedby(self) -> str:
return pulumi.get(self, "modifiedby")
@property
@pulumi.getter
def name(self) -> str:
"""
Name of the App Connector Group.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def platform(self) -> str:
return pulumi.get(self, "platform")
@property
@pulumi.getter(name="previousVersion")
def previous_version(self) -> str:
return pulumi.get(self, "previous_version")
@property
@pulumi.getter(name="privateIp")
def private_ip(self) -> str:
return pulumi.get(self, "private_ip")
@property
@pulumi.getter(name="provisioningKeyId")
def provisioning_key_id(self) -> str:
return pulumi.get(self, "provisioning_key_id")
@property
@pulumi.getter(name="provisioningKeyName")
def provisioning_key_name(self) -> str:
return pulumi.get(self, "provisioning_key_name")
@property
@pulumi.getter(name="publicIp")
def public_ip(self) -> str:
return pulumi.get(self, "public_ip")
@property
@pulumi.getter(name="sargeVersion")
def sarge_version(self) -> str:
return pulumi.get(self, "sarge_version")
@property
@pulumi.getter(name="upgradeAttempt")
def upgrade_attempt(self) -> str:
return pulumi.get(self, "upgrade_attempt")
@property
@pulumi.getter(name="upgradeStatus")
def upgrade_status(self) -> str:
return pulumi.get(self, "upgrade_status")
@pulumi.output_type
class GetAppConnectorGroupServerGroupResult(dict):
def __init__(__self__, *,
config_space: str,
creation_time: str,
description: str,
dynamic_discovery: bool,
enabled: bool,
id: str,
modified_time: str,
modifiedby: str,
name: str):
"""
:param str description: (String) Description of the App Connector Group.
:param bool enabled: (String) Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
:param str id: ID of the App Connector Group.
:param str name: Name of the App Connector Group.
"""
pulumi.set(__self__, "config_space", config_space)
pulumi.set(__self__, "creation_time", creation_time)
pulumi.set(__self__, "description", description)
pulumi.set(__self__, "dynamic_discovery", dynamic_discovery)
pulumi.set(__self__, "enabled", enabled)
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "modified_time", modified_time)
pulumi.set(__self__, "modifiedby", modifiedby)
pulumi.set(__self__, "name", name)
@property
@pulumi.getter(name="configSpace")
def config_space(self) -> str:
return pulumi.get(self, "config_space")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter
def description(self) -> str:
"""
(String) Description of the App Connector Group.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter(name="dynamicDiscovery")
def dynamic_discovery(self) -> bool:
return pulumi.get(self, "dynamic_discovery")
@property
@pulumi.getter
def enabled(self) -> bool:
"""
(String) Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
"""
return pulumi.get(self, "enabled")
@property
@pulumi.getter
def id(self) -> str:
"""
ID of the App Connector Group.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def modifiedby(self) -> str:
return pulumi.get(self, "modifiedby")
@property
@pulumi.getter
def name(self) -> str:
"""
Name of the App Connector Group.
"""
return pulumi.get(self, "name") | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/appconnectorgroup/outputs.py | outputs.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'GetAppConnectorGroupResult',
'AwaitableGetAppConnectorGroupResult',
'get_app_connector_group',
'get_app_connector_group_output',
]
@pulumi.output_type
class GetAppConnectorGroupResult:
"""
A collection of values returned by getAppConnectorGroup.
"""
def __init__(__self__, city_country=None, connectors=None, country_code=None, creation_time=None, description=None, dns_query_type=None, enabled=None, geo_location_id=None, id=None, latitude=None, location=None, longitude=None, lss_app_connector_group=None, modified_time=None, modifiedby=None, name=None, override_version_profile=None, server_groups=None, tcp_quick_ack_app=None, tcp_quick_ack_assistant=None, tcp_quick_ack_read_assistant=None, upgrade_day=None, upgrade_time_in_secs=None, use_in_dr_mode=None, version_profile_id=None, version_profile_name=None, version_profile_visibility_scope=None):
if city_country and not isinstance(city_country, str):
raise TypeError("Expected argument 'city_country' to be a str")
pulumi.set(__self__, "city_country", city_country)
if connectors and not isinstance(connectors, list):
raise TypeError("Expected argument 'connectors' to be a list")
pulumi.set(__self__, "connectors", connectors)
if country_code and not isinstance(country_code, str):
raise TypeError("Expected argument 'country_code' to be a str")
pulumi.set(__self__, "country_code", country_code)
if creation_time and not isinstance(creation_time, str):
raise TypeError("Expected argument 'creation_time' to be a str")
pulumi.set(__self__, "creation_time", creation_time)
if description and not isinstance(description, str):
raise TypeError("Expected argument 'description' to be a str")
pulumi.set(__self__, "description", description)
if dns_query_type and not isinstance(dns_query_type, str):
raise TypeError("Expected argument 'dns_query_type' to be a str")
pulumi.set(__self__, "dns_query_type", dns_query_type)
if enabled and not isinstance(enabled, bool):
raise TypeError("Expected argument 'enabled' to be a bool")
pulumi.set(__self__, "enabled", enabled)
if geo_location_id and not isinstance(geo_location_id, str):
raise TypeError("Expected argument 'geo_location_id' to be a str")
pulumi.set(__self__, "geo_location_id", geo_location_id)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if latitude and not isinstance(latitude, str):
raise TypeError("Expected argument 'latitude' to be a str")
pulumi.set(__self__, "latitude", latitude)
if location and not isinstance(location, str):
raise TypeError("Expected argument 'location' to be a str")
pulumi.set(__self__, "location", location)
if longitude and not isinstance(longitude, str):
raise TypeError("Expected argument 'longitude' to be a str")
pulumi.set(__self__, "longitude", longitude)
if lss_app_connector_group and not isinstance(lss_app_connector_group, bool):
raise TypeError("Expected argument 'lss_app_connector_group' to be a bool")
pulumi.set(__self__, "lss_app_connector_group", lss_app_connector_group)
if modified_time and not isinstance(modified_time, str):
raise TypeError("Expected argument 'modified_time' to be a str")
pulumi.set(__self__, "modified_time", modified_time)
if modifiedby and not isinstance(modifiedby, str):
raise TypeError("Expected argument 'modifiedby' to be a str")
pulumi.set(__self__, "modifiedby", modifiedby)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
if override_version_profile and not isinstance(override_version_profile, bool):
raise TypeError("Expected argument 'override_version_profile' to be a bool")
pulumi.set(__self__, "override_version_profile", override_version_profile)
if server_groups and not isinstance(server_groups, list):
raise TypeError("Expected argument 'server_groups' to be a list")
pulumi.set(__self__, "server_groups", server_groups)
if tcp_quick_ack_app and not isinstance(tcp_quick_ack_app, bool):
raise TypeError("Expected argument 'tcp_quick_ack_app' to be a bool")
pulumi.set(__self__, "tcp_quick_ack_app", tcp_quick_ack_app)
if tcp_quick_ack_assistant and not isinstance(tcp_quick_ack_assistant, bool):
raise TypeError("Expected argument 'tcp_quick_ack_assistant' to be a bool")
pulumi.set(__self__, "tcp_quick_ack_assistant", tcp_quick_ack_assistant)
if tcp_quick_ack_read_assistant and not isinstance(tcp_quick_ack_read_assistant, bool):
raise TypeError("Expected argument 'tcp_quick_ack_read_assistant' to be a bool")
pulumi.set(__self__, "tcp_quick_ack_read_assistant", tcp_quick_ack_read_assistant)
if upgrade_day and not isinstance(upgrade_day, str):
raise TypeError("Expected argument 'upgrade_day' to be a str")
pulumi.set(__self__, "upgrade_day", upgrade_day)
if upgrade_time_in_secs and not isinstance(upgrade_time_in_secs, str):
raise TypeError("Expected argument 'upgrade_time_in_secs' to be a str")
pulumi.set(__self__, "upgrade_time_in_secs", upgrade_time_in_secs)
if use_in_dr_mode and not isinstance(use_in_dr_mode, bool):
raise TypeError("Expected argument 'use_in_dr_mode' to be a bool")
pulumi.set(__self__, "use_in_dr_mode", use_in_dr_mode)
if version_profile_id and not isinstance(version_profile_id, str):
raise TypeError("Expected argument 'version_profile_id' to be a str")
pulumi.set(__self__, "version_profile_id", version_profile_id)
if version_profile_name and not isinstance(version_profile_name, str):
raise TypeError("Expected argument 'version_profile_name' to be a str")
pulumi.set(__self__, "version_profile_name", version_profile_name)
if version_profile_visibility_scope and not isinstance(version_profile_visibility_scope, str):
raise TypeError("Expected argument 'version_profile_visibility_scope' to be a str")
pulumi.set(__self__, "version_profile_visibility_scope", version_profile_visibility_scope)
@property
@pulumi.getter(name="cityCountry")
def city_country(self) -> str:
"""
(String) Whether Double Encryption is enabled or disabled for the app.
"""
return pulumi.get(self, "city_country")
@property
@pulumi.getter
def connectors(self) -> Sequence['outputs.GetAppConnectorGroupConnectorResult']:
return pulumi.get(self, "connectors")
@property
@pulumi.getter(name="countryCode")
def country_code(self) -> str:
"""
(String)
"""
return pulumi.get(self, "country_code")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter
def description(self) -> str:
"""
(String) Description of the App Connector Group.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter(name="dnsQueryType")
def dns_query_type(self) -> str:
"""
(String)
"""
return pulumi.get(self, "dns_query_type")
@property
@pulumi.getter
def enabled(self) -> bool:
"""
(String) Whether this App Connector Group is enabled or not. Default value: `true`. Supported values: `true`, `false`
"""
return pulumi.get(self, "enabled")
@property
@pulumi.getter(name="geoLocationId")
def geo_location_id(self) -> str:
"""
(String)
"""
return pulumi.get(self, "geo_location_id")
@property
@pulumi.getter
def id(self) -> Optional[str]:
return pulumi.get(self, "id")
@property
@pulumi.getter
def latitude(self) -> str:
"""
(String) Latitude of the App Connector Group. Integer or decimal. With values in the range of `-90` to `90`
"""
return pulumi.get(self, "latitude")
@property
@pulumi.getter
def location(self) -> str:
"""
(String) Location of the App Connector Group.
"""
return pulumi.get(self, "location")
@property
@pulumi.getter
def longitude(self) -> str:
"""
(String) Longitude of the App Connector Group. Integer or decimal. With values in the range of `-180` to `180`
"""
return pulumi.get(self, "longitude")
@property
@pulumi.getter(name="lssAppConnectorGroup")
def lss_app_connector_group(self) -> bool:
return pulumi.get(self, "lss_app_connector_group")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def modifiedby(self) -> str:
return pulumi.get(self, "modifiedby")
@property
@pulumi.getter
def name(self) -> Optional[str]:
return pulumi.get(self, "name")
@property
@pulumi.getter(name="overrideVersionProfile")
def override_version_profile(self) -> Optional[bool]:
"""
(bool) Whether the default version profile of the App Connector Group is applied or overridden. Default: `false` Supported values: `true`, `false`
"""
return pulumi.get(self, "override_version_profile")
@property
@pulumi.getter(name="serverGroups")
def server_groups(self) -> Sequence['outputs.GetAppConnectorGroupServerGroupResult']:
return pulumi.get(self, "server_groups")
@property
@pulumi.getter(name="tcpQuickAckApp")
def tcp_quick_ack_app(self) -> bool:
return pulumi.get(self, "tcp_quick_ack_app")
@property
@pulumi.getter(name="tcpQuickAckAssistant")
def tcp_quick_ack_assistant(self) -> bool:
return pulumi.get(self, "tcp_quick_ack_assistant")
@property
@pulumi.getter(name="tcpQuickAckReadAssistant")
def tcp_quick_ack_read_assistant(self) -> bool:
return pulumi.get(self, "tcp_quick_ack_read_assistant")
@property
@pulumi.getter(name="upgradeDay")
def upgrade_day(self) -> str:
"""
(String) App Connectors in this group will attempt to update to a newer version of the software during this specified day
"""
return pulumi.get(self, "upgrade_day")
@property
@pulumi.getter(name="upgradeTimeInSecs")
def upgrade_time_in_secs(self) -> str:
"""
(String) App Connectors in this group will attempt to update to a newer version of the software during this specified time. Default value: `66600`. Integer in seconds (i.e., `-66600`). The integer should be greater than or equal to `0` and less than `86400`, in `15` minute intervals
"""
return pulumi.get(self, "upgrade_time_in_secs")
@property
@pulumi.getter(name="useInDrMode")
def use_in_dr_mode(self) -> bool:
return pulumi.get(self, "use_in_dr_mode")
@property
@pulumi.getter(name="versionProfileId")
def version_profile_id(self) -> str:
"""
(String) ID of the version profile.
Exported values are:
"""
return pulumi.get(self, "version_profile_id")
@property
@pulumi.getter(name="versionProfileName")
def version_profile_name(self) -> str:
"""
(String)
Exported values are:
"""
return pulumi.get(self, "version_profile_name")
@property
@pulumi.getter(name="versionProfileVisibilityScope")
def version_profile_visibility_scope(self) -> str:
"""
(String)
Exported values are:
"""
return pulumi.get(self, "version_profile_visibility_scope")
class AwaitableGetAppConnectorGroupResult(GetAppConnectorGroupResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetAppConnectorGroupResult(
city_country=self.city_country,
connectors=self.connectors,
country_code=self.country_code,
creation_time=self.creation_time,
description=self.description,
dns_query_type=self.dns_query_type,
enabled=self.enabled,
geo_location_id=self.geo_location_id,
id=self.id,
latitude=self.latitude,
location=self.location,
longitude=self.longitude,
lss_app_connector_group=self.lss_app_connector_group,
modified_time=self.modified_time,
modifiedby=self.modifiedby,
name=self.name,
override_version_profile=self.override_version_profile,
server_groups=self.server_groups,
tcp_quick_ack_app=self.tcp_quick_ack_app,
tcp_quick_ack_assistant=self.tcp_quick_ack_assistant,
tcp_quick_ack_read_assistant=self.tcp_quick_ack_read_assistant,
upgrade_day=self.upgrade_day,
upgrade_time_in_secs=self.upgrade_time_in_secs,
use_in_dr_mode=self.use_in_dr_mode,
version_profile_id=self.version_profile_id,
version_profile_name=self.version_profile_name,
version_profile_visibility_scope=self.version_profile_visibility_scope)
def get_app_connector_group(id: Optional[str] = None,
name: Optional[str] = None,
override_version_profile: Optional[bool] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAppConnectorGroupResult:
"""
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
foo = zpa.AppConnectorGroup.get_app_connector_group(name="DataCenter")
```
```python
import pulumi
import pulumi_zpa as zpa
foo = zpa.AppConnectorGroup.get_app_connector_group(id="123456789")
```
:param str id: ID of the App Connector Group.
:param str name: Name of the App Connector Group.
:param bool override_version_profile: (bool) Whether the default version profile of the App Connector Group is applied or overridden. Default: `false` Supported values: `true`, `false`
"""
__args__ = dict()
__args__['id'] = id
__args__['name'] = name
__args__['overrideVersionProfile'] = override_version_profile
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('zpa:AppConnectorGroup/getAppConnectorGroup:getAppConnectorGroup', __args__, opts=opts, typ=GetAppConnectorGroupResult).value
return AwaitableGetAppConnectorGroupResult(
city_country=__ret__.city_country,
connectors=__ret__.connectors,
country_code=__ret__.country_code,
creation_time=__ret__.creation_time,
description=__ret__.description,
dns_query_type=__ret__.dns_query_type,
enabled=__ret__.enabled,
geo_location_id=__ret__.geo_location_id,
id=__ret__.id,
latitude=__ret__.latitude,
location=__ret__.location,
longitude=__ret__.longitude,
lss_app_connector_group=__ret__.lss_app_connector_group,
modified_time=__ret__.modified_time,
modifiedby=__ret__.modifiedby,
name=__ret__.name,
override_version_profile=__ret__.override_version_profile,
server_groups=__ret__.server_groups,
tcp_quick_ack_app=__ret__.tcp_quick_ack_app,
tcp_quick_ack_assistant=__ret__.tcp_quick_ack_assistant,
tcp_quick_ack_read_assistant=__ret__.tcp_quick_ack_read_assistant,
upgrade_day=__ret__.upgrade_day,
upgrade_time_in_secs=__ret__.upgrade_time_in_secs,
use_in_dr_mode=__ret__.use_in_dr_mode,
version_profile_id=__ret__.version_profile_id,
version_profile_name=__ret__.version_profile_name,
version_profile_visibility_scope=__ret__.version_profile_visibility_scope)
@_utilities.lift_output_func(get_app_connector_group)
def get_app_connector_group_output(id: Optional[pulumi.Input[Optional[str]]] = None,
name: Optional[pulumi.Input[Optional[str]]] = None,
override_version_profile: Optional[pulumi.Input[Optional[bool]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAppConnectorGroupResult]:
"""
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
foo = zpa.AppConnectorGroup.get_app_connector_group(name="DataCenter")
```
```python
import pulumi
import pulumi_zpa as zpa
foo = zpa.AppConnectorGroup.get_app_connector_group(id="123456789")
```
:param str id: ID of the App Connector Group.
:param str name: Name of the App Connector Group.
:param bool override_version_profile: (bool) Whether the default version profile of the App Connector Group is applied or overridden. Default: `false` Supported values: `true`, `false`
"""
... | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/appconnectorgroup/get_app_connector_group.py | get_app_connector_group.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'GetInspectionCustomControlsResult',
'AwaitableGetInspectionCustomControlsResult',
'get_inspection_custom_controls',
'get_inspection_custom_controls_output',
]
@pulumi.output_type
class GetInspectionCustomControlsResult:
"""
A collection of values returned by getInspectionCustomControls.
"""
def __init__(__self__, action=None, action_value=None, control_number=None, control_rule_json=None, control_type=None, creation_time=None, default_action=None, default_action_value=None, description=None, id=None, modified_time=None, modifiedby=None, name=None, paranoia_level=None, protocol_type=None, rules=None, severity=None, type=None, version=None):
if action and not isinstance(action, str):
raise TypeError("Expected argument 'action' to be a str")
pulumi.set(__self__, "action", action)
if action_value and not isinstance(action_value, str):
raise TypeError("Expected argument 'action_value' to be a str")
pulumi.set(__self__, "action_value", action_value)
if control_number and not isinstance(control_number, str):
raise TypeError("Expected argument 'control_number' to be a str")
pulumi.set(__self__, "control_number", control_number)
if control_rule_json and not isinstance(control_rule_json, str):
raise TypeError("Expected argument 'control_rule_json' to be a str")
pulumi.set(__self__, "control_rule_json", control_rule_json)
if control_type and not isinstance(control_type, str):
raise TypeError("Expected argument 'control_type' to be a str")
pulumi.set(__self__, "control_type", control_type)
if creation_time and not isinstance(creation_time, str):
raise TypeError("Expected argument 'creation_time' to be a str")
pulumi.set(__self__, "creation_time", creation_time)
if default_action and not isinstance(default_action, str):
raise TypeError("Expected argument 'default_action' to be a str")
pulumi.set(__self__, "default_action", default_action)
if default_action_value and not isinstance(default_action_value, str):
raise TypeError("Expected argument 'default_action_value' to be a str")
pulumi.set(__self__, "default_action_value", default_action_value)
if description and not isinstance(description, str):
raise TypeError("Expected argument 'description' to be a str")
pulumi.set(__self__, "description", description)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if modified_time and not isinstance(modified_time, str):
raise TypeError("Expected argument 'modified_time' to be a str")
pulumi.set(__self__, "modified_time", modified_time)
if modifiedby and not isinstance(modifiedby, str):
raise TypeError("Expected argument 'modifiedby' to be a str")
pulumi.set(__self__, "modifiedby", modifiedby)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
if paranoia_level and not isinstance(paranoia_level, str):
raise TypeError("Expected argument 'paranoia_level' to be a str")
pulumi.set(__self__, "paranoia_level", paranoia_level)
if protocol_type and not isinstance(protocol_type, str):
raise TypeError("Expected argument 'protocol_type' to be a str")
pulumi.set(__self__, "protocol_type", protocol_type)
if rules and not isinstance(rules, list):
raise TypeError("Expected argument 'rules' to be a list")
pulumi.set(__self__, "rules", rules)
if severity and not isinstance(severity, str):
raise TypeError("Expected argument 'severity' to be a str")
pulumi.set(__self__, "severity", severity)
if type and not isinstance(type, str):
raise TypeError("Expected argument 'type' to be a str")
pulumi.set(__self__, "type", type)
if version and not isinstance(version, str):
raise TypeError("Expected argument 'version' to be a str")
pulumi.set(__self__, "version", version)
@property
@pulumi.getter
def action(self) -> str:
return pulumi.get(self, "action")
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> str:
return pulumi.get(self, "action_value")
@property
@pulumi.getter(name="controlNumber")
def control_number(self) -> str:
return pulumi.get(self, "control_number")
@property
@pulumi.getter(name="controlRuleJson")
def control_rule_json(self) -> str:
return pulumi.get(self, "control_rule_json")
@property
@pulumi.getter(name="controlType")
def control_type(self) -> str:
return pulumi.get(self, "control_type")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter(name="defaultAction")
def default_action(self) -> str:
return pulumi.get(self, "default_action")
@property
@pulumi.getter(name="defaultActionValue")
def default_action_value(self) -> str:
return pulumi.get(self, "default_action_value")
@property
@pulumi.getter
def description(self) -> str:
return pulumi.get(self, "description")
@property
@pulumi.getter
def id(self) -> str:
return pulumi.get(self, "id")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def modifiedby(self) -> str:
return pulumi.get(self, "modifiedby")
@property
@pulumi.getter
def name(self) -> str:
return pulumi.get(self, "name")
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> str:
return pulumi.get(self, "paranoia_level")
@property
@pulumi.getter(name="protocolType")
def protocol_type(self) -> str:
return pulumi.get(self, "protocol_type")
@property
@pulumi.getter
def rules(self) -> Sequence['outputs.GetInspectionCustomControlsRuleResult']:
return pulumi.get(self, "rules")
@property
@pulumi.getter
def severity(self) -> str:
return pulumi.get(self, "severity")
@property
@pulumi.getter
def type(self) -> str:
return pulumi.get(self, "type")
@property
@pulumi.getter
def version(self) -> str:
return pulumi.get(self, "version")
class AwaitableGetInspectionCustomControlsResult(GetInspectionCustomControlsResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetInspectionCustomControlsResult(
action=self.action,
action_value=self.action_value,
control_number=self.control_number,
control_rule_json=self.control_rule_json,
control_type=self.control_type,
creation_time=self.creation_time,
default_action=self.default_action,
default_action_value=self.default_action_value,
description=self.description,
id=self.id,
modified_time=self.modified_time,
modifiedby=self.modifiedby,
name=self.name,
paranoia_level=self.paranoia_level,
protocol_type=self.protocol_type,
rules=self.rules,
severity=self.severity,
type=self.type,
version=self.version)
def get_inspection_custom_controls(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInspectionCustomControlsResult:
"""
Use this data source to access information about an existing resource.
"""
__args__ = dict()
__args__['id'] = id
__args__['name'] = name
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('zpa:Inspection/getInspectionCustomControls:getInspectionCustomControls', __args__, opts=opts, typ=GetInspectionCustomControlsResult).value
return AwaitableGetInspectionCustomControlsResult(
action=__ret__.action,
action_value=__ret__.action_value,
control_number=__ret__.control_number,
control_rule_json=__ret__.control_rule_json,
control_type=__ret__.control_type,
creation_time=__ret__.creation_time,
default_action=__ret__.default_action,
default_action_value=__ret__.default_action_value,
description=__ret__.description,
id=__ret__.id,
modified_time=__ret__.modified_time,
modifiedby=__ret__.modifiedby,
name=__ret__.name,
paranoia_level=__ret__.paranoia_level,
protocol_type=__ret__.protocol_type,
rules=__ret__.rules,
severity=__ret__.severity,
type=__ret__.type,
version=__ret__.version)
@_utilities.lift_output_func(get_inspection_custom_controls)
def get_inspection_custom_controls_output(id: Optional[pulumi.Input[Optional[str]]] = None,
name: Optional[pulumi.Input[Optional[str]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetInspectionCustomControlsResult]:
"""
Use this data source to access information about an existing resource.
"""
... | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/inspection/get_inspection_custom_controls.py | get_inspection_custom_controls.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'InspectionCustomControlsAssociatedInspectionProfileNameArgs',
'InspectionCustomControlsRuleArgs',
'InspectionCustomControlsRuleConditionsArgs',
'InspectionProfileControlsInfoArgs',
'InspectionProfileCustomControlArgs',
'InspectionProfilePredefinedControlArgs',
'InspectionProfileWebSocketControlArgs',
]
@pulumi.input_type
class InspectionCustomControlsAssociatedInspectionProfileNameArgs:
def __init__(__self__, *,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
if ids is not None:
pulumi.set(__self__, "ids", ids)
@property
@pulumi.getter
def ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "ids")
@ids.setter
def ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "ids", value)
@pulumi.input_type
class InspectionCustomControlsRuleArgs:
def __init__(__self__, *,
conditions: Optional[pulumi.Input['InspectionCustomControlsRuleConditionsArgs']] = None,
names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
type: Optional[pulumi.Input[str]] = None):
if conditions is not None:
pulumi.set(__self__, "conditions", conditions)
if names is not None:
pulumi.set(__self__, "names", names)
if type is not None:
pulumi.set(__self__, "type", type)
@property
@pulumi.getter
def conditions(self) -> Optional[pulumi.Input['InspectionCustomControlsRuleConditionsArgs']]:
return pulumi.get(self, "conditions")
@conditions.setter
def conditions(self, value: Optional[pulumi.Input['InspectionCustomControlsRuleConditionsArgs']]):
pulumi.set(self, "conditions", value)
@property
@pulumi.getter
def names(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "names")
@names.setter
def names(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "names", value)
@property
@pulumi.getter
def type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "type")
@type.setter
def type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "type", value)
@pulumi.input_type
class InspectionCustomControlsRuleConditionsArgs:
def __init__(__self__, *,
lhs: Optional[pulumi.Input[str]] = None,
op: Optional[pulumi.Input[str]] = None,
rhs: Optional[pulumi.Input[str]] = None):
if lhs is not None:
pulumi.set(__self__, "lhs", lhs)
if op is not None:
pulumi.set(__self__, "op", op)
if rhs is not None:
pulumi.set(__self__, "rhs", rhs)
@property
@pulumi.getter
def lhs(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "lhs")
@lhs.setter
def lhs(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "lhs", value)
@property
@pulumi.getter
def op(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "op")
@op.setter
def op(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "op", value)
@property
@pulumi.getter
def rhs(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "rhs")
@rhs.setter
def rhs(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "rhs", value)
@pulumi.input_type
class InspectionProfileControlsInfoArgs:
def __init__(__self__, *,
control_type: Optional[pulumi.Input[str]] = None,
count: Optional[pulumi.Input[str]] = None):
"""
:param pulumi.Input[str] control_type: (string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
:param pulumi.Input[str] count: (Optional) Control information counts `Long`
"""
if control_type is not None:
pulumi.set(__self__, "control_type", control_type)
if count is not None:
pulumi.set(__self__, "count", count)
@property
@pulumi.getter(name="controlType")
def control_type(self) -> Optional[pulumi.Input[str]]:
"""
(string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
return pulumi.get(self, "control_type")
@control_type.setter
def control_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "control_type", value)
@property
@pulumi.getter
def count(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) Control information counts `Long`
"""
return pulumi.get(self, "count")
@count.setter
def count(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "count", value)
@pulumi.input_type
class InspectionProfileCustomControlArgs:
def __init__(__self__, *,
id: pulumi.Input[str],
action: Optional[pulumi.Input[str]] = None,
action_value: Optional[pulumi.Input[str]] = None):
"""
:param pulumi.Input[str] id: ID of the predefined control
:param pulumi.Input[str] action: The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
:param pulumi.Input[str] action_value: Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
"""
pulumi.set(__self__, "id", id)
if action is not None:
pulumi.set(__self__, "action", action)
if action_value is not None:
pulumi.set(__self__, "action_value", action_value)
@property
@pulumi.getter
def id(self) -> pulumi.Input[str]:
"""
ID of the predefined control
"""
return pulumi.get(self, "id")
@id.setter
def id(self, value: pulumi.Input[str]):
pulumi.set(self, "id", value)
@property
@pulumi.getter
def action(self) -> Optional[pulumi.Input[str]]:
"""
The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action", value)
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> Optional[pulumi.Input[str]]:
"""
Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
"""
return pulumi.get(self, "action_value")
@action_value.setter
def action_value(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action_value", value)
@pulumi.input_type
class InspectionProfilePredefinedControlArgs:
def __init__(__self__, *,
action: pulumi.Input[str],
id: pulumi.Input[str],
action_value: Optional[pulumi.Input[str]] = None,
control_type: Optional[pulumi.Input[str]] = None,
protocol_type: Optional[pulumi.Input[str]] = None):
"""
:param pulumi.Input[str] action: The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
:param pulumi.Input[str] id: ID of the predefined control
:param pulumi.Input[str] action_value: Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
:param pulumi.Input[str] control_type: (string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
pulumi.set(__self__, "action", action)
pulumi.set(__self__, "id", id)
if action_value is not None:
pulumi.set(__self__, "action_value", action_value)
if control_type is not None:
pulumi.set(__self__, "control_type", control_type)
if protocol_type is not None:
pulumi.set(__self__, "protocol_type", protocol_type)
@property
@pulumi.getter
def action(self) -> pulumi.Input[str]:
"""
The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: pulumi.Input[str]):
pulumi.set(self, "action", value)
@property
@pulumi.getter
def id(self) -> pulumi.Input[str]:
"""
ID of the predefined control
"""
return pulumi.get(self, "id")
@id.setter
def id(self, value: pulumi.Input[str]):
pulumi.set(self, "id", value)
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> Optional[pulumi.Input[str]]:
"""
Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
"""
return pulumi.get(self, "action_value")
@action_value.setter
def action_value(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action_value", value)
@property
@pulumi.getter(name="controlType")
def control_type(self) -> Optional[pulumi.Input[str]]:
"""
(string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
return pulumi.get(self, "control_type")
@control_type.setter
def control_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "control_type", value)
@property
@pulumi.getter(name="protocolType")
def protocol_type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "protocol_type")
@protocol_type.setter
def protocol_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "protocol_type", value)
@pulumi.input_type
class InspectionProfileWebSocketControlArgs:
def __init__(__self__, *,
action: pulumi.Input[str],
id: pulumi.Input[str],
action_value: Optional[pulumi.Input[str]] = None,
control_type: Optional[pulumi.Input[str]] = None,
protocol_type: Optional[pulumi.Input[str]] = None):
"""
:param pulumi.Input[str] action: The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
:param pulumi.Input[str] id: ID of the predefined control
:param pulumi.Input[str] action_value: Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
:param pulumi.Input[str] control_type: (string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
pulumi.set(__self__, "action", action)
pulumi.set(__self__, "id", id)
if action_value is not None:
pulumi.set(__self__, "action_value", action_value)
if control_type is not None:
pulumi.set(__self__, "control_type", control_type)
if protocol_type is not None:
pulumi.set(__self__, "protocol_type", protocol_type)
@property
@pulumi.getter
def action(self) -> pulumi.Input[str]:
"""
The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: pulumi.Input[str]):
pulumi.set(self, "action", value)
@property
@pulumi.getter
def id(self) -> pulumi.Input[str]:
"""
ID of the predefined control
"""
return pulumi.get(self, "id")
@id.setter
def id(self, value: pulumi.Input[str]):
pulumi.set(self, "id", value)
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> Optional[pulumi.Input[str]]:
"""
Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
"""
return pulumi.get(self, "action_value")
@action_value.setter
def action_value(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action_value", value)
@property
@pulumi.getter(name="controlType")
def control_type(self) -> Optional[pulumi.Input[str]]:
"""
(string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
return pulumi.get(self, "control_type")
@control_type.setter
def control_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "control_type", value)
@property
@pulumi.getter(name="protocolType")
def protocol_type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "protocol_type")
@protocol_type.setter
def protocol_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "protocol_type", value) | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/inspection/_inputs.py | _inputs.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'GetInspectionAllPredefinedControlsResult',
'AwaitableGetInspectionAllPredefinedControlsResult',
'get_inspection_all_predefined_controls',
'get_inspection_all_predefined_controls_output',
]
@pulumi.output_type
class GetInspectionAllPredefinedControlsResult:
"""
A collection of values returned by getInspectionAllPredefinedControls.
"""
def __init__(__self__, group_name=None, id=None, lists=None, version=None):
if group_name and not isinstance(group_name, str):
raise TypeError("Expected argument 'group_name' to be a str")
pulumi.set(__self__, "group_name", group_name)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if lists and not isinstance(lists, list):
raise TypeError("Expected argument 'lists' to be a list")
pulumi.set(__self__, "lists", lists)
if version and not isinstance(version, str):
raise TypeError("Expected argument 'version' to be a str")
pulumi.set(__self__, "version", version)
@property
@pulumi.getter(name="groupName")
def group_name(self) -> Optional[str]:
return pulumi.get(self, "group_name")
@property
@pulumi.getter
def id(self) -> str:
"""
The provider-assigned unique ID for this managed resource.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def lists(self) -> Sequence['outputs.GetInspectionAllPredefinedControlsListResult']:
return pulumi.get(self, "lists")
@property
@pulumi.getter
def version(self) -> str:
return pulumi.get(self, "version")
class AwaitableGetInspectionAllPredefinedControlsResult(GetInspectionAllPredefinedControlsResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetInspectionAllPredefinedControlsResult(
group_name=self.group_name,
id=self.id,
lists=self.lists,
version=self.version)
def get_inspection_all_predefined_controls(group_name: Optional[str] = None,
version: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInspectionAllPredefinedControlsResult:
"""
Use the **zpa_inspection_all_predefined_controls** data source to get information about all OWASP predefined control and prefedined control version by group name. The `Preprocessors` predefined control is the default predefined control, This data source is always required, when creating an inspection profile.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
this = zpa.Inspection.get_inspection_all_predefined_controls(group_name="Preprocessors",
version="OWASP_CRS/3.3.0")
```
:param str group_name: The name of the predefined control.
:param str version: The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
__args__ = dict()
__args__['groupName'] = group_name
__args__['version'] = version
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('zpa:Inspection/getInspectionAllPredefinedControls:getInspectionAllPredefinedControls', __args__, opts=opts, typ=GetInspectionAllPredefinedControlsResult).value
return AwaitableGetInspectionAllPredefinedControlsResult(
group_name=__ret__.group_name,
id=__ret__.id,
lists=__ret__.lists,
version=__ret__.version)
@_utilities.lift_output_func(get_inspection_all_predefined_controls)
def get_inspection_all_predefined_controls_output(group_name: Optional[pulumi.Input[Optional[str]]] = None,
version: Optional[pulumi.Input[str]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetInspectionAllPredefinedControlsResult]:
"""
Use the **zpa_inspection_all_predefined_controls** data source to get information about all OWASP predefined control and prefedined control version by group name. The `Preprocessors` predefined control is the default predefined control, This data source is always required, when creating an inspection profile.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
this = zpa.Inspection.get_inspection_all_predefined_controls(group_name="Preprocessors",
version="OWASP_CRS/3.3.0")
```
:param str group_name: The name of the predefined control.
:param str version: The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
... | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/inspection/get_inspection_all_predefined_controls.py | get_inspection_all_predefined_controls.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'GetInspectionPredefinedControlsResult',
'AwaitableGetInspectionPredefinedControlsResult',
'get_inspection_predefined_controls',
'get_inspection_predefined_controls_output',
]
@pulumi.output_type
class GetInspectionPredefinedControlsResult:
"""
A collection of values returned by getInspectionPredefinedControls.
"""
def __init__(__self__, action=None, action_value=None, associated_inspection_profile_names=None, attachment=None, control_group=None, control_number=None, control_type=None, creation_time=None, default_action=None, default_action_value=None, description=None, id=None, modified_time=None, modifiedby=None, name=None, paranoia_level=None, protocol_type=None, severity=None, version=None):
if action and not isinstance(action, str):
raise TypeError("Expected argument 'action' to be a str")
pulumi.set(__self__, "action", action)
if action_value and not isinstance(action_value, str):
raise TypeError("Expected argument 'action_value' to be a str")
pulumi.set(__self__, "action_value", action_value)
if associated_inspection_profile_names and not isinstance(associated_inspection_profile_names, list):
raise TypeError("Expected argument 'associated_inspection_profile_names' to be a list")
pulumi.set(__self__, "associated_inspection_profile_names", associated_inspection_profile_names)
if attachment and not isinstance(attachment, str):
raise TypeError("Expected argument 'attachment' to be a str")
pulumi.set(__self__, "attachment", attachment)
if control_group and not isinstance(control_group, str):
raise TypeError("Expected argument 'control_group' to be a str")
pulumi.set(__self__, "control_group", control_group)
if control_number and not isinstance(control_number, str):
raise TypeError("Expected argument 'control_number' to be a str")
pulumi.set(__self__, "control_number", control_number)
if control_type and not isinstance(control_type, str):
raise TypeError("Expected argument 'control_type' to be a str")
pulumi.set(__self__, "control_type", control_type)
if creation_time and not isinstance(creation_time, str):
raise TypeError("Expected argument 'creation_time' to be a str")
pulumi.set(__self__, "creation_time", creation_time)
if default_action and not isinstance(default_action, str):
raise TypeError("Expected argument 'default_action' to be a str")
pulumi.set(__self__, "default_action", default_action)
if default_action_value and not isinstance(default_action_value, str):
raise TypeError("Expected argument 'default_action_value' to be a str")
pulumi.set(__self__, "default_action_value", default_action_value)
if description and not isinstance(description, str):
raise TypeError("Expected argument 'description' to be a str")
pulumi.set(__self__, "description", description)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if modified_time and not isinstance(modified_time, str):
raise TypeError("Expected argument 'modified_time' to be a str")
pulumi.set(__self__, "modified_time", modified_time)
if modifiedby and not isinstance(modifiedby, str):
raise TypeError("Expected argument 'modifiedby' to be a str")
pulumi.set(__self__, "modifiedby", modifiedby)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
if paranoia_level and not isinstance(paranoia_level, str):
raise TypeError("Expected argument 'paranoia_level' to be a str")
pulumi.set(__self__, "paranoia_level", paranoia_level)
if protocol_type and not isinstance(protocol_type, str):
raise TypeError("Expected argument 'protocol_type' to be a str")
pulumi.set(__self__, "protocol_type", protocol_type)
if severity and not isinstance(severity, str):
raise TypeError("Expected argument 'severity' to be a str")
pulumi.set(__self__, "severity", severity)
if version and not isinstance(version, str):
raise TypeError("Expected argument 'version' to be a str")
pulumi.set(__self__, "version", version)
@property
@pulumi.getter
def action(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "action")
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "action_value")
@property
@pulumi.getter(name="associatedInspectionProfileNames")
def associated_inspection_profile_names(self) -> Sequence['outputs.GetInspectionPredefinedControlsAssociatedInspectionProfileNameResult']:
"""
(Computed)
"""
return pulumi.get(self, "associated_inspection_profile_names")
@property
@pulumi.getter
def attachment(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "attachment")
@property
@pulumi.getter(name="controlGroup")
def control_group(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "control_group")
@property
@pulumi.getter(name="controlNumber")
def control_number(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "control_number")
@property
@pulumi.getter(name="controlType")
def control_type(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "control_type")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "creation_time")
@property
@pulumi.getter(name="defaultAction")
def default_action(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "default_action")
@property
@pulumi.getter(name="defaultActionValue")
def default_action_value(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "default_action_value")
@property
@pulumi.getter
def description(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def id(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def modifiedby(self) -> str:
return pulumi.get(self, "modifiedby")
@property
@pulumi.getter
def name(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "paranoia_level")
@property
@pulumi.getter(name="protocolType")
def protocol_type(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "protocol_type")
@property
@pulumi.getter
def severity(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "severity")
@property
@pulumi.getter
def version(self) -> Optional[str]:
return pulumi.get(self, "version")
class AwaitableGetInspectionPredefinedControlsResult(GetInspectionPredefinedControlsResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetInspectionPredefinedControlsResult(
action=self.action,
action_value=self.action_value,
associated_inspection_profile_names=self.associated_inspection_profile_names,
attachment=self.attachment,
control_group=self.control_group,
control_number=self.control_number,
control_type=self.control_type,
creation_time=self.creation_time,
default_action=self.default_action,
default_action_value=self.default_action_value,
description=self.description,
id=self.id,
modified_time=self.modified_time,
modifiedby=self.modifiedby,
name=self.name,
paranoia_level=self.paranoia_level,
protocol_type=self.protocol_type,
severity=self.severity,
version=self.version)
def get_inspection_predefined_controls(id: Optional[str] = None,
name: Optional[str] = None,
version: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInspectionPredefinedControlsResult:
"""
Use the **zpa_inspection_predefined_controls** data source to get information about an OWASP predefined control and prefedined control version. This data source is required when creating an inspection profile.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
example = zpa.Inspection.get_inspection_predefined_controls(name="Failed to parse request body",
version="OWASP_CRS/3.3.0")
pulumi.export("zpaInspectionPredefinedControls", example)
```
:param str id: (Computed)
:param str name: The name of the predefined control.
:param str version: The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
__args__ = dict()
__args__['id'] = id
__args__['name'] = name
__args__['version'] = version
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('zpa:Inspection/getInspectionPredefinedControls:getInspectionPredefinedControls', __args__, opts=opts, typ=GetInspectionPredefinedControlsResult).value
return AwaitableGetInspectionPredefinedControlsResult(
action=__ret__.action,
action_value=__ret__.action_value,
associated_inspection_profile_names=__ret__.associated_inspection_profile_names,
attachment=__ret__.attachment,
control_group=__ret__.control_group,
control_number=__ret__.control_number,
control_type=__ret__.control_type,
creation_time=__ret__.creation_time,
default_action=__ret__.default_action,
default_action_value=__ret__.default_action_value,
description=__ret__.description,
id=__ret__.id,
modified_time=__ret__.modified_time,
modifiedby=__ret__.modifiedby,
name=__ret__.name,
paranoia_level=__ret__.paranoia_level,
protocol_type=__ret__.protocol_type,
severity=__ret__.severity,
version=__ret__.version)
@_utilities.lift_output_func(get_inspection_predefined_controls)
def get_inspection_predefined_controls_output(id: Optional[pulumi.Input[Optional[str]]] = None,
name: Optional[pulumi.Input[Optional[str]]] = None,
version: Optional[pulumi.Input[Optional[str]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetInspectionPredefinedControlsResult]:
"""
Use the **zpa_inspection_predefined_controls** data source to get information about an OWASP predefined control and prefedined control version. This data source is required when creating an inspection profile.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
example = zpa.Inspection.get_inspection_predefined_controls(name="Failed to parse request body",
version="OWASP_CRS/3.3.0")
pulumi.export("zpaInspectionPredefinedControls", example)
```
:param str id: (Computed)
:param str name: The name of the predefined control.
:param str version: The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
... | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/inspection/get_inspection_predefined_controls.py | get_inspection_predefined_controls.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *
__all__ = ['InspectionCustomControlsArgs', 'InspectionCustomControls']
@pulumi.input_type
class InspectionCustomControlsArgs:
def __init__(__self__, *,
default_action: pulumi.Input[str],
severity: pulumi.Input[str],
type: pulumi.Input[str],
action: Optional[pulumi.Input[str]] = None,
action_value: Optional[pulumi.Input[str]] = None,
associated_inspection_profile_names: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]]] = None,
control_number: Optional[pulumi.Input[str]] = None,
control_rule_json: Optional[pulumi.Input[str]] = None,
control_type: Optional[pulumi.Input[str]] = None,
default_action_value: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
paranoia_level: Optional[pulumi.Input[str]] = None,
protocol_type: Optional[pulumi.Input[str]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsRuleArgs']]]] = None,
version: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a InspectionCustomControls resource.
:param pulumi.Input[str] default_action: The performed action
:param pulumi.Input[str] severity: Severity of the control number
:param pulumi.Input[str] type: Rules to be applied to the request or response type
:param pulumi.Input[str] action: The performed action
:param pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]] associated_inspection_profile_names: Name of the inspection profile
:param pulumi.Input[str] control_rule_json: The control rule in JSON format that has the conditions and type of control for the inspection control
:param pulumi.Input[str] default_action_value: This is used to provide the redirect URL if the default action is set to REDIRECT
:param pulumi.Input[str] description: Description of the custom control
:param pulumi.Input[str] paranoia_level: OWASP Predefined Paranoia Level. Range: [1-4], inclusive
:param pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsRuleArgs']]] rules: Rules of the custom controls applied as conditions (JSON)
"""
pulumi.set(__self__, "default_action", default_action)
pulumi.set(__self__, "severity", severity)
pulumi.set(__self__, "type", type)
if action is not None:
pulumi.set(__self__, "action", action)
if action_value is not None:
pulumi.set(__self__, "action_value", action_value)
if associated_inspection_profile_names is not None:
pulumi.set(__self__, "associated_inspection_profile_names", associated_inspection_profile_names)
if control_number is not None:
pulumi.set(__self__, "control_number", control_number)
if control_rule_json is not None:
pulumi.set(__self__, "control_rule_json", control_rule_json)
if control_type is not None:
pulumi.set(__self__, "control_type", control_type)
if default_action_value is not None:
pulumi.set(__self__, "default_action_value", default_action_value)
if description is not None:
pulumi.set(__self__, "description", description)
if name is not None:
pulumi.set(__self__, "name", name)
if paranoia_level is not None:
pulumi.set(__self__, "paranoia_level", paranoia_level)
if protocol_type is not None:
pulumi.set(__self__, "protocol_type", protocol_type)
if rules is not None:
pulumi.set(__self__, "rules", rules)
if version is not None:
pulumi.set(__self__, "version", version)
@property
@pulumi.getter(name="defaultAction")
def default_action(self) -> pulumi.Input[str]:
"""
The performed action
"""
return pulumi.get(self, "default_action")
@default_action.setter
def default_action(self, value: pulumi.Input[str]):
pulumi.set(self, "default_action", value)
@property
@pulumi.getter
def severity(self) -> pulumi.Input[str]:
"""
Severity of the control number
"""
return pulumi.get(self, "severity")
@severity.setter
def severity(self, value: pulumi.Input[str]):
pulumi.set(self, "severity", value)
@property
@pulumi.getter
def type(self) -> pulumi.Input[str]:
"""
Rules to be applied to the request or response type
"""
return pulumi.get(self, "type")
@type.setter
def type(self, value: pulumi.Input[str]):
pulumi.set(self, "type", value)
@property
@pulumi.getter
def action(self) -> Optional[pulumi.Input[str]]:
"""
The performed action
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action", value)
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "action_value")
@action_value.setter
def action_value(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action_value", value)
@property
@pulumi.getter(name="associatedInspectionProfileNames")
def associated_inspection_profile_names(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]]]:
"""
Name of the inspection profile
"""
return pulumi.get(self, "associated_inspection_profile_names")
@associated_inspection_profile_names.setter
def associated_inspection_profile_names(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]]]):
pulumi.set(self, "associated_inspection_profile_names", value)
@property
@pulumi.getter(name="controlNumber")
def control_number(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "control_number")
@control_number.setter
def control_number(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "control_number", value)
@property
@pulumi.getter(name="controlRuleJson")
def control_rule_json(self) -> Optional[pulumi.Input[str]]:
"""
The control rule in JSON format that has the conditions and type of control for the inspection control
"""
return pulumi.get(self, "control_rule_json")
@control_rule_json.setter
def control_rule_json(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "control_rule_json", value)
@property
@pulumi.getter(name="controlType")
def control_type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "control_type")
@control_type.setter
def control_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "control_type", value)
@property
@pulumi.getter(name="defaultActionValue")
def default_action_value(self) -> Optional[pulumi.Input[str]]:
"""
This is used to provide the redirect URL if the default action is set to REDIRECT
"""
return pulumi.get(self, "default_action_value")
@default_action_value.setter
def default_action_value(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "default_action_value", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description of the custom control
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> Optional[pulumi.Input[str]]:
"""
OWASP Predefined Paranoia Level. Range: [1-4], inclusive
"""
return pulumi.get(self, "paranoia_level")
@paranoia_level.setter
def paranoia_level(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "paranoia_level", value)
@property
@pulumi.getter(name="protocolType")
def protocol_type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "protocol_type")
@protocol_type.setter
def protocol_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "protocol_type", value)
@property
@pulumi.getter
def rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsRuleArgs']]]]:
"""
Rules of the custom controls applied as conditions (JSON)
"""
return pulumi.get(self, "rules")
@rules.setter
def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsRuleArgs']]]]):
pulumi.set(self, "rules", value)
@property
@pulumi.getter
def version(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "version")
@version.setter
def version(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "version", value)
@pulumi.input_type
class _InspectionCustomControlsState:
def __init__(__self__, *,
action: Optional[pulumi.Input[str]] = None,
action_value: Optional[pulumi.Input[str]] = None,
associated_inspection_profile_names: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]]] = None,
control_number: Optional[pulumi.Input[str]] = None,
control_rule_json: Optional[pulumi.Input[str]] = None,
control_type: Optional[pulumi.Input[str]] = None,
default_action: Optional[pulumi.Input[str]] = None,
default_action_value: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
paranoia_level: Optional[pulumi.Input[str]] = None,
protocol_type: Optional[pulumi.Input[str]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsRuleArgs']]]] = None,
severity: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering InspectionCustomControls resources.
:param pulumi.Input[str] action: The performed action
:param pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]] associated_inspection_profile_names: Name of the inspection profile
:param pulumi.Input[str] control_rule_json: The control rule in JSON format that has the conditions and type of control for the inspection control
:param pulumi.Input[str] default_action: The performed action
:param pulumi.Input[str] default_action_value: This is used to provide the redirect URL if the default action is set to REDIRECT
:param pulumi.Input[str] description: Description of the custom control
:param pulumi.Input[str] paranoia_level: OWASP Predefined Paranoia Level. Range: [1-4], inclusive
:param pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsRuleArgs']]] rules: Rules of the custom controls applied as conditions (JSON)
:param pulumi.Input[str] severity: Severity of the control number
:param pulumi.Input[str] type: Rules to be applied to the request or response type
"""
if action is not None:
pulumi.set(__self__, "action", action)
if action_value is not None:
pulumi.set(__self__, "action_value", action_value)
if associated_inspection_profile_names is not None:
pulumi.set(__self__, "associated_inspection_profile_names", associated_inspection_profile_names)
if control_number is not None:
pulumi.set(__self__, "control_number", control_number)
if control_rule_json is not None:
pulumi.set(__self__, "control_rule_json", control_rule_json)
if control_type is not None:
pulumi.set(__self__, "control_type", control_type)
if default_action is not None:
pulumi.set(__self__, "default_action", default_action)
if default_action_value is not None:
pulumi.set(__self__, "default_action_value", default_action_value)
if description is not None:
pulumi.set(__self__, "description", description)
if name is not None:
pulumi.set(__self__, "name", name)
if paranoia_level is not None:
pulumi.set(__self__, "paranoia_level", paranoia_level)
if protocol_type is not None:
pulumi.set(__self__, "protocol_type", protocol_type)
if rules is not None:
pulumi.set(__self__, "rules", rules)
if severity is not None:
pulumi.set(__self__, "severity", severity)
if type is not None:
pulumi.set(__self__, "type", type)
if version is not None:
pulumi.set(__self__, "version", version)
@property
@pulumi.getter
def action(self) -> Optional[pulumi.Input[str]]:
"""
The performed action
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action", value)
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "action_value")
@action_value.setter
def action_value(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action_value", value)
@property
@pulumi.getter(name="associatedInspectionProfileNames")
def associated_inspection_profile_names(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]]]:
"""
Name of the inspection profile
"""
return pulumi.get(self, "associated_inspection_profile_names")
@associated_inspection_profile_names.setter
def associated_inspection_profile_names(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]]]):
pulumi.set(self, "associated_inspection_profile_names", value)
@property
@pulumi.getter(name="controlNumber")
def control_number(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "control_number")
@control_number.setter
def control_number(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "control_number", value)
@property
@pulumi.getter(name="controlRuleJson")
def control_rule_json(self) -> Optional[pulumi.Input[str]]:
"""
The control rule in JSON format that has the conditions and type of control for the inspection control
"""
return pulumi.get(self, "control_rule_json")
@control_rule_json.setter
def control_rule_json(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "control_rule_json", value)
@property
@pulumi.getter(name="controlType")
def control_type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "control_type")
@control_type.setter
def control_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "control_type", value)
@property
@pulumi.getter(name="defaultAction")
def default_action(self) -> Optional[pulumi.Input[str]]:
"""
The performed action
"""
return pulumi.get(self, "default_action")
@default_action.setter
def default_action(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "default_action", value)
@property
@pulumi.getter(name="defaultActionValue")
def default_action_value(self) -> Optional[pulumi.Input[str]]:
"""
This is used to provide the redirect URL if the default action is set to REDIRECT
"""
return pulumi.get(self, "default_action_value")
@default_action_value.setter
def default_action_value(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "default_action_value", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description of the custom control
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> Optional[pulumi.Input[str]]:
"""
OWASP Predefined Paranoia Level. Range: [1-4], inclusive
"""
return pulumi.get(self, "paranoia_level")
@paranoia_level.setter
def paranoia_level(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "paranoia_level", value)
@property
@pulumi.getter(name="protocolType")
def protocol_type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "protocol_type")
@protocol_type.setter
def protocol_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "protocol_type", value)
@property
@pulumi.getter
def rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsRuleArgs']]]]:
"""
Rules of the custom controls applied as conditions (JSON)
"""
return pulumi.get(self, "rules")
@rules.setter
def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionCustomControlsRuleArgs']]]]):
pulumi.set(self, "rules", value)
@property
@pulumi.getter
def severity(self) -> Optional[pulumi.Input[str]]:
"""
Severity of the control number
"""
return pulumi.get(self, "severity")
@severity.setter
def severity(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "severity", value)
@property
@pulumi.getter
def type(self) -> Optional[pulumi.Input[str]]:
"""
Rules to be applied to the request or response type
"""
return pulumi.get(self, "type")
@type.setter
def type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "type", value)
@property
@pulumi.getter
def version(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "version")
@version.setter
def version(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "version", value)
class InspectionCustomControls(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
action_value: Optional[pulumi.Input[str]] = None,
associated_inspection_profile_names: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]]]] = None,
control_number: Optional[pulumi.Input[str]] = None,
control_rule_json: Optional[pulumi.Input[str]] = None,
control_type: Optional[pulumi.Input[str]] = None,
default_action: Optional[pulumi.Input[str]] = None,
default_action_value: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
paranoia_level: Optional[pulumi.Input[str]] = None,
protocol_type: Optional[pulumi.Input[str]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionCustomControlsRuleArgs']]]]] = None,
severity: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Create a InspectionCustomControls resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] action: The performed action
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]]] associated_inspection_profile_names: Name of the inspection profile
:param pulumi.Input[str] control_rule_json: The control rule in JSON format that has the conditions and type of control for the inspection control
:param pulumi.Input[str] default_action: The performed action
:param pulumi.Input[str] default_action_value: This is used to provide the redirect URL if the default action is set to REDIRECT
:param pulumi.Input[str] description: Description of the custom control
:param pulumi.Input[str] paranoia_level: OWASP Predefined Paranoia Level. Range: [1-4], inclusive
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionCustomControlsRuleArgs']]]] rules: Rules of the custom controls applied as conditions (JSON)
:param pulumi.Input[str] severity: Severity of the control number
:param pulumi.Input[str] type: Rules to be applied to the request or response type
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: InspectionCustomControlsArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Create a InspectionCustomControls resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param InspectionCustomControlsArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(InspectionCustomControlsArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
action_value: Optional[pulumi.Input[str]] = None,
associated_inspection_profile_names: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]]]] = None,
control_number: Optional[pulumi.Input[str]] = None,
control_rule_json: Optional[pulumi.Input[str]] = None,
control_type: Optional[pulumi.Input[str]] = None,
default_action: Optional[pulumi.Input[str]] = None,
default_action_value: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
paranoia_level: Optional[pulumi.Input[str]] = None,
protocol_type: Optional[pulumi.Input[str]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionCustomControlsRuleArgs']]]]] = None,
severity: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None,
__props__=None):
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = InspectionCustomControlsArgs.__new__(InspectionCustomControlsArgs)
__props__.__dict__["action"] = action
__props__.__dict__["action_value"] = action_value
__props__.__dict__["associated_inspection_profile_names"] = associated_inspection_profile_names
__props__.__dict__["control_number"] = control_number
__props__.__dict__["control_rule_json"] = control_rule_json
__props__.__dict__["control_type"] = control_type
if default_action is None and not opts.urn:
raise TypeError("Missing required property 'default_action'")
__props__.__dict__["default_action"] = default_action
__props__.__dict__["default_action_value"] = default_action_value
__props__.__dict__["description"] = description
__props__.__dict__["name"] = name
__props__.__dict__["paranoia_level"] = paranoia_level
__props__.__dict__["protocol_type"] = protocol_type
__props__.__dict__["rules"] = rules
if severity is None and not opts.urn:
raise TypeError("Missing required property 'severity'")
__props__.__dict__["severity"] = severity
if type is None and not opts.urn:
raise TypeError("Missing required property 'type'")
__props__.__dict__["type"] = type
__props__.__dict__["version"] = version
super(InspectionCustomControls, __self__).__init__(
'zpa:Inspection/inspectionCustomControls:InspectionCustomControls',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
action_value: Optional[pulumi.Input[str]] = None,
associated_inspection_profile_names: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]]]] = None,
control_number: Optional[pulumi.Input[str]] = None,
control_rule_json: Optional[pulumi.Input[str]] = None,
control_type: Optional[pulumi.Input[str]] = None,
default_action: Optional[pulumi.Input[str]] = None,
default_action_value: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
paranoia_level: Optional[pulumi.Input[str]] = None,
protocol_type: Optional[pulumi.Input[str]] = None,
rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionCustomControlsRuleArgs']]]]] = None,
severity: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None) -> 'InspectionCustomControls':
"""
Get an existing InspectionCustomControls resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] action: The performed action
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionCustomControlsAssociatedInspectionProfileNameArgs']]]] associated_inspection_profile_names: Name of the inspection profile
:param pulumi.Input[str] control_rule_json: The control rule in JSON format that has the conditions and type of control for the inspection control
:param pulumi.Input[str] default_action: The performed action
:param pulumi.Input[str] default_action_value: This is used to provide the redirect URL if the default action is set to REDIRECT
:param pulumi.Input[str] description: Description of the custom control
:param pulumi.Input[str] paranoia_level: OWASP Predefined Paranoia Level. Range: [1-4], inclusive
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionCustomControlsRuleArgs']]]] rules: Rules of the custom controls applied as conditions (JSON)
:param pulumi.Input[str] severity: Severity of the control number
:param pulumi.Input[str] type: Rules to be applied to the request or response type
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _InspectionCustomControlsState.__new__(_InspectionCustomControlsState)
__props__.__dict__["action"] = action
__props__.__dict__["action_value"] = action_value
__props__.__dict__["associated_inspection_profile_names"] = associated_inspection_profile_names
__props__.__dict__["control_number"] = control_number
__props__.__dict__["control_rule_json"] = control_rule_json
__props__.__dict__["control_type"] = control_type
__props__.__dict__["default_action"] = default_action
__props__.__dict__["default_action_value"] = default_action_value
__props__.__dict__["description"] = description
__props__.__dict__["name"] = name
__props__.__dict__["paranoia_level"] = paranoia_level
__props__.__dict__["protocol_type"] = protocol_type
__props__.__dict__["rules"] = rules
__props__.__dict__["severity"] = severity
__props__.__dict__["type"] = type
__props__.__dict__["version"] = version
return InspectionCustomControls(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def action(self) -> pulumi.Output[str]:
"""
The performed action
"""
return pulumi.get(self, "action")
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> pulumi.Output[str]:
return pulumi.get(self, "action_value")
@property
@pulumi.getter(name="associatedInspectionProfileNames")
def associated_inspection_profile_names(self) -> pulumi.Output[Sequence['outputs.InspectionCustomControlsAssociatedInspectionProfileName']]:
"""
Name of the inspection profile
"""
return pulumi.get(self, "associated_inspection_profile_names")
@property
@pulumi.getter(name="controlNumber")
def control_number(self) -> pulumi.Output[str]:
return pulumi.get(self, "control_number")
@property
@pulumi.getter(name="controlRuleJson")
def control_rule_json(self) -> pulumi.Output[str]:
"""
The control rule in JSON format that has the conditions and type of control for the inspection control
"""
return pulumi.get(self, "control_rule_json")
@property
@pulumi.getter(name="controlType")
def control_type(self) -> pulumi.Output[str]:
return pulumi.get(self, "control_type")
@property
@pulumi.getter(name="defaultAction")
def default_action(self) -> pulumi.Output[str]:
"""
The performed action
"""
return pulumi.get(self, "default_action")
@property
@pulumi.getter(name="defaultActionValue")
def default_action_value(self) -> pulumi.Output[str]:
"""
This is used to provide the redirect URL if the default action is set to REDIRECT
"""
return pulumi.get(self, "default_action_value")
@property
@pulumi.getter
def description(self) -> pulumi.Output[str]:
"""
Description of the custom control
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
return pulumi.get(self, "name")
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> pulumi.Output[str]:
"""
OWASP Predefined Paranoia Level. Range: [1-4], inclusive
"""
return pulumi.get(self, "paranoia_level")
@property
@pulumi.getter(name="protocolType")
def protocol_type(self) -> pulumi.Output[str]:
return pulumi.get(self, "protocol_type")
@property
@pulumi.getter
def rules(self) -> pulumi.Output[Sequence['outputs.InspectionCustomControlsRule']]:
"""
Rules of the custom controls applied as conditions (JSON)
"""
return pulumi.get(self, "rules")
@property
@pulumi.getter
def severity(self) -> pulumi.Output[str]:
"""
Severity of the control number
"""
return pulumi.get(self, "severity")
@property
@pulumi.getter
def type(self) -> pulumi.Output[str]:
"""
Rules to be applied to the request or response type
"""
return pulumi.get(self, "type")
@property
@pulumi.getter
def version(self) -> pulumi.Output[str]:
return pulumi.get(self, "version") | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/inspection/inspection_custom_controls.py | inspection_custom_controls.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'InspectionCustomControlsAssociatedInspectionProfileName',
'InspectionCustomControlsRule',
'InspectionCustomControlsRuleConditions',
'InspectionProfileControlsInfo',
'InspectionProfileCustomControl',
'InspectionProfilePredefinedControl',
'InspectionProfileWebSocketControl',
'GetInspectionAllPredefinedControlsListResult',
'GetInspectionAllPredefinedControlsListAssociatedInspectionProfileNameResult',
'GetInspectionCustomControlsRuleResult',
'GetInspectionCustomControlsRuleConditionResult',
'GetInspectionPredefinedControlsAssociatedInspectionProfileNameResult',
'GetInspectionProfileControlsInfoResult',
'GetInspectionProfileCustomControlResult',
'GetInspectionProfileCustomControlAssociatedInspectionProfileNameResult',
'GetInspectionProfileCustomControlRuleResult',
'GetInspectionProfileCustomControlRuleConditionResult',
'GetInspectionProfilePredefinedControlResult',
'GetInspectionProfilePredefinedControlAssociatedInspectionProfileNameResult',
'GetInspectionProfileWebSocketControlResult',
'GetInspectionProfileWebSocketControlAssociatedInspectionProfileNameResult',
]
@pulumi.output_type
class InspectionCustomControlsAssociatedInspectionProfileName(dict):
def __init__(__self__, *,
ids: Optional[Sequence[str]] = None):
if ids is not None:
pulumi.set(__self__, "ids", ids)
@property
@pulumi.getter
def ids(self) -> Optional[Sequence[str]]:
return pulumi.get(self, "ids")
@pulumi.output_type
class InspectionCustomControlsRule(dict):
def __init__(__self__, *,
conditions: Optional['outputs.InspectionCustomControlsRuleConditions'] = None,
names: Optional[Sequence[str]] = None,
type: Optional[str] = None):
if conditions is not None:
pulumi.set(__self__, "conditions", conditions)
if names is not None:
pulumi.set(__self__, "names", names)
if type is not None:
pulumi.set(__self__, "type", type)
@property
@pulumi.getter
def conditions(self) -> Optional['outputs.InspectionCustomControlsRuleConditions']:
return pulumi.get(self, "conditions")
@property
@pulumi.getter
def names(self) -> Optional[Sequence[str]]:
return pulumi.get(self, "names")
@property
@pulumi.getter
def type(self) -> Optional[str]:
return pulumi.get(self, "type")
@pulumi.output_type
class InspectionCustomControlsRuleConditions(dict):
def __init__(__self__, *,
lhs: Optional[str] = None,
op: Optional[str] = None,
rhs: Optional[str] = None):
if lhs is not None:
pulumi.set(__self__, "lhs", lhs)
if op is not None:
pulumi.set(__self__, "op", op)
if rhs is not None:
pulumi.set(__self__, "rhs", rhs)
@property
@pulumi.getter
def lhs(self) -> Optional[str]:
return pulumi.get(self, "lhs")
@property
@pulumi.getter
def op(self) -> Optional[str]:
return pulumi.get(self, "op")
@property
@pulumi.getter
def rhs(self) -> Optional[str]:
return pulumi.get(self, "rhs")
@pulumi.output_type
class InspectionProfileControlsInfo(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "controlType":
suggest = "control_type"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in InspectionProfileControlsInfo. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
InspectionProfileControlsInfo.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
InspectionProfileControlsInfo.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
control_type: Optional[str] = None,
count: Optional[str] = None):
"""
:param str control_type: (string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
:param str count: (Optional) Control information counts `Long`
"""
if control_type is not None:
pulumi.set(__self__, "control_type", control_type)
if count is not None:
pulumi.set(__self__, "count", count)
@property
@pulumi.getter(name="controlType")
def control_type(self) -> Optional[str]:
"""
(string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
return pulumi.get(self, "control_type")
@property
@pulumi.getter
def count(self) -> Optional[str]:
"""
(Optional) Control information counts `Long`
"""
return pulumi.get(self, "count")
@pulumi.output_type
class InspectionProfileCustomControl(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "actionValue":
suggest = "action_value"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in InspectionProfileCustomControl. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
InspectionProfileCustomControl.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
InspectionProfileCustomControl.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
id: str,
action: Optional[str] = None,
action_value: Optional[str] = None):
"""
:param str id: ID of the predefined control
:param str action: The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
:param str action_value: Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
"""
pulumi.set(__self__, "id", id)
if action is not None:
pulumi.set(__self__, "action", action)
if action_value is not None:
pulumi.set(__self__, "action_value", action_value)
@property
@pulumi.getter
def id(self) -> str:
"""
ID of the predefined control
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def action(self) -> Optional[str]:
"""
The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
"""
return pulumi.get(self, "action")
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> Optional[str]:
"""
Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
"""
return pulumi.get(self, "action_value")
@pulumi.output_type
class InspectionProfilePredefinedControl(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "actionValue":
suggest = "action_value"
elif key == "controlType":
suggest = "control_type"
elif key == "protocolType":
suggest = "protocol_type"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in InspectionProfilePredefinedControl. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
InspectionProfilePredefinedControl.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
InspectionProfilePredefinedControl.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
action: str,
id: str,
action_value: Optional[str] = None,
control_type: Optional[str] = None,
protocol_type: Optional[str] = None):
"""
:param str action: The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
:param str id: ID of the predefined control
:param str action_value: Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
:param str control_type: (string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
pulumi.set(__self__, "action", action)
pulumi.set(__self__, "id", id)
if action_value is not None:
pulumi.set(__self__, "action_value", action_value)
if control_type is not None:
pulumi.set(__self__, "control_type", control_type)
if protocol_type is not None:
pulumi.set(__self__, "protocol_type", protocol_type)
@property
@pulumi.getter
def action(self) -> str:
"""
The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
"""
return pulumi.get(self, "action")
@property
@pulumi.getter
def id(self) -> str:
"""
ID of the predefined control
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> Optional[str]:
"""
Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
"""
return pulumi.get(self, "action_value")
@property
@pulumi.getter(name="controlType")
def control_type(self) -> Optional[str]:
"""
(string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
return pulumi.get(self, "control_type")
@property
@pulumi.getter(name="protocolType")
def protocol_type(self) -> Optional[str]:
return pulumi.get(self, "protocol_type")
@pulumi.output_type
class InspectionProfileWebSocketControl(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "actionValue":
suggest = "action_value"
elif key == "controlType":
suggest = "control_type"
elif key == "protocolType":
suggest = "protocol_type"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in InspectionProfileWebSocketControl. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
InspectionProfileWebSocketControl.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
InspectionProfileWebSocketControl.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
action: str,
id: str,
action_value: Optional[str] = None,
control_type: Optional[str] = None,
protocol_type: Optional[str] = None):
"""
:param str action: The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
:param str id: ID of the predefined control
:param str action_value: Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
:param str control_type: (string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
pulumi.set(__self__, "action", action)
pulumi.set(__self__, "id", id)
if action_value is not None:
pulumi.set(__self__, "action_value", action_value)
if control_type is not None:
pulumi.set(__self__, "control_type", control_type)
if protocol_type is not None:
pulumi.set(__self__, "protocol_type", protocol_type)
@property
@pulumi.getter
def action(self) -> str:
"""
The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
"""
return pulumi.get(self, "action")
@property
@pulumi.getter
def id(self) -> str:
"""
ID of the predefined control
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> Optional[str]:
"""
Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
"""
return pulumi.get(self, "action_value")
@property
@pulumi.getter(name="controlType")
def control_type(self) -> Optional[str]:
"""
(string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
return pulumi.get(self, "control_type")
@property
@pulumi.getter(name="protocolType")
def protocol_type(self) -> Optional[str]:
return pulumi.get(self, "protocol_type")
@pulumi.output_type
class GetInspectionAllPredefinedControlsListResult(dict):
def __init__(__self__, *,
action: str,
action_value: str,
associated_inspection_profile_names: Sequence['outputs.GetInspectionAllPredefinedControlsListAssociatedInspectionProfileNameResult'],
attachment: str,
control_group: str,
control_number: str,
control_type: str,
creation_time: str,
default_action: str,
default_action_value: str,
description: str,
id: str,
modified_time: str,
modifiedby: str,
name: str,
paranoia_level: str,
protocol_type: str,
severity: str,
version: str):
"""
:param str action: (string)
:param str action_value: (string)
:param Sequence['GetInspectionAllPredefinedControlsListAssociatedInspectionProfileNameArgs'] associated_inspection_profile_names: (string)
:param str attachment: (string)
:param str control_group: (string)
:param str control_number: (string)
:param str control_type: (string) Returned values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `ZSCALER`, `CUSTOM`, `PREDEFINED`
:param str creation_time: (string)
:param str default_action: (string)
:param str default_action_value: (string)
:param str description: (string)
:param str id: (string)
:param str modified_time: (string)
:param str name: (string)
:param str paranoia_level: (string)
:param str protocol_type: (string) Returned values: `HTTP`, `HTTPS`, `FTP`, `RDP`, `SSH`, `WEBSOCKET`
:param str severity: (string)
:param str version: The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
pulumi.set(__self__, "action", action)
pulumi.set(__self__, "action_value", action_value)
pulumi.set(__self__, "associated_inspection_profile_names", associated_inspection_profile_names)
pulumi.set(__self__, "attachment", attachment)
pulumi.set(__self__, "control_group", control_group)
pulumi.set(__self__, "control_number", control_number)
pulumi.set(__self__, "control_type", control_type)
pulumi.set(__self__, "creation_time", creation_time)
pulumi.set(__self__, "default_action", default_action)
pulumi.set(__self__, "default_action_value", default_action_value)
pulumi.set(__self__, "description", description)
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "modified_time", modified_time)
pulumi.set(__self__, "modifiedby", modifiedby)
pulumi.set(__self__, "name", name)
pulumi.set(__self__, "paranoia_level", paranoia_level)
pulumi.set(__self__, "protocol_type", protocol_type)
pulumi.set(__self__, "severity", severity)
pulumi.set(__self__, "version", version)
@property
@pulumi.getter
def action(self) -> str:
"""
(string)
"""
return pulumi.get(self, "action")
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> str:
"""
(string)
"""
return pulumi.get(self, "action_value")
@property
@pulumi.getter(name="associatedInspectionProfileNames")
def associated_inspection_profile_names(self) -> Sequence['outputs.GetInspectionAllPredefinedControlsListAssociatedInspectionProfileNameResult']:
"""
(string)
"""
return pulumi.get(self, "associated_inspection_profile_names")
@property
@pulumi.getter
def attachment(self) -> str:
"""
(string)
"""
return pulumi.get(self, "attachment")
@property
@pulumi.getter(name="controlGroup")
def control_group(self) -> str:
"""
(string)
"""
return pulumi.get(self, "control_group")
@property
@pulumi.getter(name="controlNumber")
def control_number(self) -> str:
"""
(string)
"""
return pulumi.get(self, "control_number")
@property
@pulumi.getter(name="controlType")
def control_type(self) -> str:
"""
(string) Returned values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `ZSCALER`, `CUSTOM`, `PREDEFINED`
"""
return pulumi.get(self, "control_type")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "creation_time")
@property
@pulumi.getter(name="defaultAction")
def default_action(self) -> str:
"""
(string)
"""
return pulumi.get(self, "default_action")
@property
@pulumi.getter(name="defaultActionValue")
def default_action_value(self) -> str:
"""
(string)
"""
return pulumi.get(self, "default_action_value")
@property
@pulumi.getter
def description(self) -> str:
"""
(string)
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def id(self) -> str:
"""
(string)
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def modifiedby(self) -> str:
return pulumi.get(self, "modifiedby")
@property
@pulumi.getter
def name(self) -> str:
"""
(string)
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> str:
"""
(string)
"""
return pulumi.get(self, "paranoia_level")
@property
@pulumi.getter(name="protocolType")
def protocol_type(self) -> str:
"""
(string) Returned values: `HTTP`, `HTTPS`, `FTP`, `RDP`, `SSH`, `WEBSOCKET`
"""
return pulumi.get(self, "protocol_type")
@property
@pulumi.getter
def severity(self) -> str:
"""
(string)
"""
return pulumi.get(self, "severity")
@property
@pulumi.getter
def version(self) -> str:
"""
The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
return pulumi.get(self, "version")
@pulumi.output_type
class GetInspectionAllPredefinedControlsListAssociatedInspectionProfileNameResult(dict):
def __init__(__self__, *,
id: str,
name: str):
"""
:param str id: (string)
:param str name: (string)
"""
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "name", name)
@property
@pulumi.getter
def id(self) -> str:
"""
(string)
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def name(self) -> str:
"""
(string)
"""
return pulumi.get(self, "name")
@pulumi.output_type
class GetInspectionCustomControlsRuleResult(dict):
def __init__(__self__, *,
conditions: Sequence['outputs.GetInspectionCustomControlsRuleConditionResult'],
names: Sequence[str],
type: str):
pulumi.set(__self__, "conditions", conditions)
pulumi.set(__self__, "names", names)
pulumi.set(__self__, "type", type)
@property
@pulumi.getter
def conditions(self) -> Sequence['outputs.GetInspectionCustomControlsRuleConditionResult']:
return pulumi.get(self, "conditions")
@property
@pulumi.getter
def names(self) -> Sequence[str]:
return pulumi.get(self, "names")
@property
@pulumi.getter
def type(self) -> str:
return pulumi.get(self, "type")
@pulumi.output_type
class GetInspectionCustomControlsRuleConditionResult(dict):
def __init__(__self__, *,
lhs: str,
op: str,
rhs: str):
pulumi.set(__self__, "lhs", lhs)
pulumi.set(__self__, "op", op)
pulumi.set(__self__, "rhs", rhs)
@property
@pulumi.getter
def lhs(self) -> str:
return pulumi.get(self, "lhs")
@property
@pulumi.getter
def op(self) -> str:
return pulumi.get(self, "op")
@property
@pulumi.getter
def rhs(self) -> str:
return pulumi.get(self, "rhs")
@pulumi.output_type
class GetInspectionPredefinedControlsAssociatedInspectionProfileNameResult(dict):
def __init__(__self__, *,
id: str,
name: str):
"""
:param str id: (Computed)
:param str name: The name of the predefined control.
"""
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "name", name)
@property
@pulumi.getter
def id(self) -> str:
"""
(Computed)
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def name(self) -> str:
"""
The name of the predefined control.
"""
return pulumi.get(self, "name")
@pulumi.output_type
class GetInspectionProfileControlsInfoResult(dict):
def __init__(__self__, *,
control_type: str,
count: str):
"""
:param str control_type: (string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
:param str count: (string) Control information counts `Long`
"""
pulumi.set(__self__, "control_type", control_type)
pulumi.set(__self__, "count", count)
@property
@pulumi.getter(name="controlType")
def control_type(self) -> str:
"""
(string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
return pulumi.get(self, "control_type")
@property
@pulumi.getter
def count(self) -> str:
"""
(string) Control information counts `Long`
"""
return pulumi.get(self, "count")
@pulumi.output_type
class GetInspectionProfileCustomControlResult(dict):
def __init__(__self__, *,
action: str,
action_value: str,
associated_inspection_profile_names: Sequence['outputs.GetInspectionProfileCustomControlAssociatedInspectionProfileNameResult'],
control_number: str,
control_rule_json: str,
creation_time: str,
default_action: str,
default_action_value: str,
description: str,
id: str,
modified_by: str,
modified_time: str,
name: str,
paranoia_level: str,
rules: Sequence['outputs.GetInspectionProfileCustomControlRuleResult'],
severity: str,
type: str,
version: str):
"""
:param str action: (string) The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
:param str action_value: (string) Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
:param Sequence['GetInspectionProfileCustomControlAssociatedInspectionProfileNameArgs'] associated_inspection_profile_names: (string) Name of the inspection profile
:param str control_rule_json: (string) Custom controls string in JSON format
:param str description: (string) Description of the inspection profile.
:param str id: This field defines the id of the application server.
:param str name: This field defines the name of the server.
:param str paranoia_level: (string) OWASP Predefined Paranoia Level. Range: [1-4], inclusive
:param Sequence['GetInspectionProfileCustomControlRuleArgs'] rules: (string) Rules of the custom controls applied as conditions `JSON`
:param str type: (string) Type value for the rules
:param str version: (string) The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
pulumi.set(__self__, "action", action)
pulumi.set(__self__, "action_value", action_value)
pulumi.set(__self__, "associated_inspection_profile_names", associated_inspection_profile_names)
pulumi.set(__self__, "control_number", control_number)
pulumi.set(__self__, "control_rule_json", control_rule_json)
pulumi.set(__self__, "creation_time", creation_time)
pulumi.set(__self__, "default_action", default_action)
pulumi.set(__self__, "default_action_value", default_action_value)
pulumi.set(__self__, "description", description)
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "modified_by", modified_by)
pulumi.set(__self__, "modified_time", modified_time)
pulumi.set(__self__, "name", name)
pulumi.set(__self__, "paranoia_level", paranoia_level)
pulumi.set(__self__, "rules", rules)
pulumi.set(__self__, "severity", severity)
pulumi.set(__self__, "type", type)
pulumi.set(__self__, "version", version)
@property
@pulumi.getter
def action(self) -> str:
"""
(string) The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
"""
return pulumi.get(self, "action")
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> str:
"""
(string) Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
"""
return pulumi.get(self, "action_value")
@property
@pulumi.getter(name="associatedInspectionProfileNames")
def associated_inspection_profile_names(self) -> Sequence['outputs.GetInspectionProfileCustomControlAssociatedInspectionProfileNameResult']:
"""
(string) Name of the inspection profile
"""
return pulumi.get(self, "associated_inspection_profile_names")
@property
@pulumi.getter(name="controlNumber")
def control_number(self) -> str:
return pulumi.get(self, "control_number")
@property
@pulumi.getter(name="controlRuleJson")
def control_rule_json(self) -> str:
"""
(string) Custom controls string in JSON format
"""
return pulumi.get(self, "control_rule_json")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter(name="defaultAction")
def default_action(self) -> str:
return pulumi.get(self, "default_action")
@property
@pulumi.getter(name="defaultActionValue")
def default_action_value(self) -> str:
return pulumi.get(self, "default_action_value")
@property
@pulumi.getter
def description(self) -> str:
"""
(string) Description of the inspection profile.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def id(self) -> str:
"""
This field defines the id of the application server.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="modifiedBy")
def modified_by(self) -> str:
return pulumi.get(self, "modified_by")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def name(self) -> str:
"""
This field defines the name of the server.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> str:
"""
(string) OWASP Predefined Paranoia Level. Range: [1-4], inclusive
"""
return pulumi.get(self, "paranoia_level")
@property
@pulumi.getter
def rules(self) -> Sequence['outputs.GetInspectionProfileCustomControlRuleResult']:
"""
(string) Rules of the custom controls applied as conditions `JSON`
"""
return pulumi.get(self, "rules")
@property
@pulumi.getter
def severity(self) -> str:
return pulumi.get(self, "severity")
@property
@pulumi.getter
def type(self) -> str:
"""
(string) Type value for the rules
"""
return pulumi.get(self, "type")
@property
@pulumi.getter
def version(self) -> str:
"""
(string) The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
return pulumi.get(self, "version")
@pulumi.output_type
class GetInspectionProfileCustomControlAssociatedInspectionProfileNameResult(dict):
def __init__(__self__, *,
id: str,
name: str):
"""
:param str id: This field defines the id of the application server.
:param str name: This field defines the name of the server.
"""
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "name", name)
@property
@pulumi.getter
def id(self) -> str:
"""
This field defines the id of the application server.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def name(self) -> str:
"""
This field defines the name of the server.
"""
return pulumi.get(self, "name")
@pulumi.output_type
class GetInspectionProfileCustomControlRuleResult(dict):
def __init__(__self__, *,
conditions: Sequence['outputs.GetInspectionProfileCustomControlRuleConditionResult'],
names: str,
type: str):
"""
:param Sequence['GetInspectionProfileCustomControlRuleConditionArgs'] conditions: (string)
:param str names: (string) Name of the rules. If rules.type is set to `REQUEST_HEADERS`, `REQUEST_COOKIES`, or `RESPONSE_HEADERS`, the rules.name field is required.
:param str type: (string) Type value for the rules
"""
pulumi.set(__self__, "conditions", conditions)
pulumi.set(__self__, "names", names)
pulumi.set(__self__, "type", type)
@property
@pulumi.getter
def conditions(self) -> Sequence['outputs.GetInspectionProfileCustomControlRuleConditionResult']:
"""
(string)
"""
return pulumi.get(self, "conditions")
@property
@pulumi.getter
def names(self) -> str:
"""
(string) Name of the rules. If rules.type is set to `REQUEST_HEADERS`, `REQUEST_COOKIES`, or `RESPONSE_HEADERS`, the rules.name field is required.
"""
return pulumi.get(self, "names")
@property
@pulumi.getter
def type(self) -> str:
"""
(string) Type value for the rules
"""
return pulumi.get(self, "type")
@pulumi.output_type
class GetInspectionProfileCustomControlRuleConditionResult(dict):
def __init__(__self__, *,
lhs: str,
op: str,
rhs: str):
"""
:param str lhs: (string) Signifies the key for the object type Supported values: `SIZE`, `VALUE`
:param str op: (string) If lhs is set to SIZE, then the user may pass one of the following: `EQ: Equals`, `LE: Less than or equal to`, `GE: Greater than or equal to`. If the lhs is set to `VALUE`, then the user may pass one of the following: `CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `RX`.
:param str rhs: (string) Denotes the value for the given object type. Its value depends on the key. If rules.type is set to REQUEST_METHOD, the conditions.rhs field must have one of the following values: `GET`,`HEAD`, `POST`, `OPTIONS`, `PUT`, `DELETE`, `TRACE`
"""
pulumi.set(__self__, "lhs", lhs)
pulumi.set(__self__, "op", op)
pulumi.set(__self__, "rhs", rhs)
@property
@pulumi.getter
def lhs(self) -> str:
"""
(string) Signifies the key for the object type Supported values: `SIZE`, `VALUE`
"""
return pulumi.get(self, "lhs")
@property
@pulumi.getter
def op(self) -> str:
"""
(string) If lhs is set to SIZE, then the user may pass one of the following: `EQ: Equals`, `LE: Less than or equal to`, `GE: Greater than or equal to`. If the lhs is set to `VALUE`, then the user may pass one of the following: `CONTAINS`, `STARTS_WITH`, `ENDS_WITH`, `RX`.
"""
return pulumi.get(self, "op")
@property
@pulumi.getter
def rhs(self) -> str:
"""
(string) Denotes the value for the given object type. Its value depends on the key. If rules.type is set to REQUEST_METHOD, the conditions.rhs field must have one of the following values: `GET`,`HEAD`, `POST`, `OPTIONS`, `PUT`, `DELETE`, `TRACE`
"""
return pulumi.get(self, "rhs")
@pulumi.output_type
class GetInspectionProfilePredefinedControlResult(dict):
def __init__(__self__, *,
action: str,
action_value: str,
associated_inspection_profile_names: Sequence['outputs.GetInspectionProfilePredefinedControlAssociatedInspectionProfileNameResult'],
attachment: str,
control_group: str,
control_number: str,
control_type: str,
creation_time: str,
default_action: str,
default_action_value: str,
description: str,
id: str,
modified_by: str,
modified_time: str,
name: str,
paranoia_level: str,
severity: str,
version: str):
"""
:param str action: (string) The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
:param str action_value: (string) Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
:param Sequence['GetInspectionProfilePredefinedControlAssociatedInspectionProfileNameArgs'] associated_inspection_profile_names: (string) Name of the inspection profile
:param str attachment: (string) Control attachment
:param str control_group: (string) Control group
:param str control_type: (string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
:param str description: (string) Description of the inspection profile.
:param str id: This field defines the id of the application server.
:param str name: This field defines the name of the server.
:param str paranoia_level: (string) OWASP Predefined Paranoia Level. Range: [1-4], inclusive
:param str version: (string) The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
pulumi.set(__self__, "action", action)
pulumi.set(__self__, "action_value", action_value)
pulumi.set(__self__, "associated_inspection_profile_names", associated_inspection_profile_names)
pulumi.set(__self__, "attachment", attachment)
pulumi.set(__self__, "control_group", control_group)
pulumi.set(__self__, "control_number", control_number)
pulumi.set(__self__, "control_type", control_type)
pulumi.set(__self__, "creation_time", creation_time)
pulumi.set(__self__, "default_action", default_action)
pulumi.set(__self__, "default_action_value", default_action_value)
pulumi.set(__self__, "description", description)
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "modified_by", modified_by)
pulumi.set(__self__, "modified_time", modified_time)
pulumi.set(__self__, "name", name)
pulumi.set(__self__, "paranoia_level", paranoia_level)
pulumi.set(__self__, "severity", severity)
pulumi.set(__self__, "version", version)
@property
@pulumi.getter
def action(self) -> str:
"""
(string) The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
"""
return pulumi.get(self, "action")
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> str:
"""
(string) Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
"""
return pulumi.get(self, "action_value")
@property
@pulumi.getter(name="associatedInspectionProfileNames")
def associated_inspection_profile_names(self) -> Sequence['outputs.GetInspectionProfilePredefinedControlAssociatedInspectionProfileNameResult']:
"""
(string) Name of the inspection profile
"""
return pulumi.get(self, "associated_inspection_profile_names")
@property
@pulumi.getter
def attachment(self) -> str:
"""
(string) Control attachment
"""
return pulumi.get(self, "attachment")
@property
@pulumi.getter(name="controlGroup")
def control_group(self) -> str:
"""
(string) Control group
"""
return pulumi.get(self, "control_group")
@property
@pulumi.getter(name="controlNumber")
def control_number(self) -> str:
return pulumi.get(self, "control_number")
@property
@pulumi.getter(name="controlType")
def control_type(self) -> str:
"""
(string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
return pulumi.get(self, "control_type")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter(name="defaultAction")
def default_action(self) -> str:
return pulumi.get(self, "default_action")
@property
@pulumi.getter(name="defaultActionValue")
def default_action_value(self) -> str:
return pulumi.get(self, "default_action_value")
@property
@pulumi.getter
def description(self) -> str:
"""
(string) Description of the inspection profile.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def id(self) -> str:
"""
This field defines the id of the application server.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="modifiedBy")
def modified_by(self) -> str:
return pulumi.get(self, "modified_by")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def name(self) -> str:
"""
This field defines the name of the server.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> str:
"""
(string) OWASP Predefined Paranoia Level. Range: [1-4], inclusive
"""
return pulumi.get(self, "paranoia_level")
@property
@pulumi.getter
def severity(self) -> str:
return pulumi.get(self, "severity")
@property
@pulumi.getter
def version(self) -> str:
"""
(string) The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
return pulumi.get(self, "version")
@pulumi.output_type
class GetInspectionProfilePredefinedControlAssociatedInspectionProfileNameResult(dict):
def __init__(__self__, *,
id: str,
name: str):
"""
:param str id: This field defines the id of the application server.
:param str name: This field defines the name of the server.
"""
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "name", name)
@property
@pulumi.getter
def id(self) -> str:
"""
This field defines the id of the application server.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def name(self) -> str:
"""
This field defines the name of the server.
"""
return pulumi.get(self, "name")
@pulumi.output_type
class GetInspectionProfileWebSocketControlResult(dict):
def __init__(__self__, *,
action: str,
action_value: str,
associated_inspection_profile_names: Sequence['outputs.GetInspectionProfileWebSocketControlAssociatedInspectionProfileNameResult'],
attachment: str,
control_group: str,
control_number: str,
control_type: str,
creation_time: str,
default_action: str,
default_action_value: str,
description: str,
id: str,
modified_by: str,
modified_time: str,
name: str,
paranoia_level: str,
protocol_type: str,
severity: str,
version: str):
"""
:param str action: (string) The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
:param str action_value: (string) Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
:param Sequence['GetInspectionProfileWebSocketControlAssociatedInspectionProfileNameArgs'] associated_inspection_profile_names: (string) Name of the inspection profile
:param str attachment: (string) Control attachment
:param str control_group: (string) Control group
:param str control_type: (string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
:param str description: (string) Description of the inspection profile.
:param str id: This field defines the id of the application server.
:param str name: This field defines the name of the server.
:param str paranoia_level: (string) OWASP Predefined Paranoia Level. Range: [1-4], inclusive
:param str version: (string) The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
pulumi.set(__self__, "action", action)
pulumi.set(__self__, "action_value", action_value)
pulumi.set(__self__, "associated_inspection_profile_names", associated_inspection_profile_names)
pulumi.set(__self__, "attachment", attachment)
pulumi.set(__self__, "control_group", control_group)
pulumi.set(__self__, "control_number", control_number)
pulumi.set(__self__, "control_type", control_type)
pulumi.set(__self__, "creation_time", creation_time)
pulumi.set(__self__, "default_action", default_action)
pulumi.set(__self__, "default_action_value", default_action_value)
pulumi.set(__self__, "description", description)
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "modified_by", modified_by)
pulumi.set(__self__, "modified_time", modified_time)
pulumi.set(__self__, "name", name)
pulumi.set(__self__, "paranoia_level", paranoia_level)
pulumi.set(__self__, "protocol_type", protocol_type)
pulumi.set(__self__, "severity", severity)
pulumi.set(__self__, "version", version)
@property
@pulumi.getter
def action(self) -> str:
"""
(string) The action of the predefined control. Supported values: `PASS`, `BLOCK` and `REDIRECT`
"""
return pulumi.get(self, "action")
@property
@pulumi.getter(name="actionValue")
def action_value(self) -> str:
"""
(string) Value for the predefined controls action. This field is only required if the action is set to REDIRECT. This field is only required if the action is set to `REDIRECT`.
"""
return pulumi.get(self, "action_value")
@property
@pulumi.getter(name="associatedInspectionProfileNames")
def associated_inspection_profile_names(self) -> Sequence['outputs.GetInspectionProfileWebSocketControlAssociatedInspectionProfileNameResult']:
"""
(string) Name of the inspection profile
"""
return pulumi.get(self, "associated_inspection_profile_names")
@property
@pulumi.getter
def attachment(self) -> str:
"""
(string) Control attachment
"""
return pulumi.get(self, "attachment")
@property
@pulumi.getter(name="controlGroup")
def control_group(self) -> str:
"""
(string) Control group
"""
return pulumi.get(self, "control_group")
@property
@pulumi.getter(name="controlNumber")
def control_number(self) -> str:
return pulumi.get(self, "control_number")
@property
@pulumi.getter(name="controlType")
def control_type(self) -> str:
"""
(string) Control types. Supported Values: `WEBSOCKET_PREDEFINED`, `WEBSOCKET_CUSTOM`, `CUSTOM`, `PREDEFINED`, `ZSCALER`
"""
return pulumi.get(self, "control_type")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter(name="defaultAction")
def default_action(self) -> str:
return pulumi.get(self, "default_action")
@property
@pulumi.getter(name="defaultActionValue")
def default_action_value(self) -> str:
return pulumi.get(self, "default_action_value")
@property
@pulumi.getter
def description(self) -> str:
"""
(string) Description of the inspection profile.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def id(self) -> str:
"""
This field defines the id of the application server.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="modifiedBy")
def modified_by(self) -> str:
return pulumi.get(self, "modified_by")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def name(self) -> str:
"""
This field defines the name of the server.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> str:
"""
(string) OWASP Predefined Paranoia Level. Range: [1-4], inclusive
"""
return pulumi.get(self, "paranoia_level")
@property
@pulumi.getter(name="protocolType")
def protocol_type(self) -> str:
return pulumi.get(self, "protocol_type")
@property
@pulumi.getter
def severity(self) -> str:
return pulumi.get(self, "severity")
@property
@pulumi.getter
def version(self) -> str:
"""
(string) The version of the predefined control, the default is: `OWASP_CRS/3.3.0`
"""
return pulumi.get(self, "version")
@pulumi.output_type
class GetInspectionProfileWebSocketControlAssociatedInspectionProfileNameResult(dict):
def __init__(__self__, *,
id: str,
name: str):
"""
:param str id: This field defines the id of the application server.
:param str name: This field defines the name of the server.
"""
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "name", name)
@property
@pulumi.getter
def id(self) -> str:
"""
This field defines the id of the application server.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def name(self) -> str:
"""
This field defines the name of the server.
"""
return pulumi.get(self, "name") | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/inspection/outputs.py | outputs.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'GetInspectionProfileResult',
'AwaitableGetInspectionProfileResult',
'get_inspection_profile',
'get_inspection_profile_output',
]
@pulumi.output_type
class GetInspectionProfileResult:
"""
A collection of values returned by getInspectionProfile.
"""
def __init__(__self__, common_global_override_actions_config=None, controls_infos=None, creation_time=None, custom_controls=None, description=None, global_control_actions=None, id=None, incarnation_number=None, modified_by=None, modified_time=None, name=None, paranoia_level=None, predefined_controls=None, predefined_controls_version=None, web_socket_controls=None):
if common_global_override_actions_config and not isinstance(common_global_override_actions_config, dict):
raise TypeError("Expected argument 'common_global_override_actions_config' to be a dict")
pulumi.set(__self__, "common_global_override_actions_config", common_global_override_actions_config)
if controls_infos and not isinstance(controls_infos, list):
raise TypeError("Expected argument 'controls_infos' to be a list")
pulumi.set(__self__, "controls_infos", controls_infos)
if creation_time and not isinstance(creation_time, str):
raise TypeError("Expected argument 'creation_time' to be a str")
pulumi.set(__self__, "creation_time", creation_time)
if custom_controls and not isinstance(custom_controls, list):
raise TypeError("Expected argument 'custom_controls' to be a list")
pulumi.set(__self__, "custom_controls", custom_controls)
if description and not isinstance(description, str):
raise TypeError("Expected argument 'description' to be a str")
pulumi.set(__self__, "description", description)
if global_control_actions and not isinstance(global_control_actions, list):
raise TypeError("Expected argument 'global_control_actions' to be a list")
pulumi.set(__self__, "global_control_actions", global_control_actions)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if incarnation_number and not isinstance(incarnation_number, str):
raise TypeError("Expected argument 'incarnation_number' to be a str")
pulumi.set(__self__, "incarnation_number", incarnation_number)
if modified_by and not isinstance(modified_by, str):
raise TypeError("Expected argument 'modified_by' to be a str")
pulumi.set(__self__, "modified_by", modified_by)
if modified_time and not isinstance(modified_time, str):
raise TypeError("Expected argument 'modified_time' to be a str")
pulumi.set(__self__, "modified_time", modified_time)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
if paranoia_level and not isinstance(paranoia_level, str):
raise TypeError("Expected argument 'paranoia_level' to be a str")
pulumi.set(__self__, "paranoia_level", paranoia_level)
if predefined_controls and not isinstance(predefined_controls, list):
raise TypeError("Expected argument 'predefined_controls' to be a list")
pulumi.set(__self__, "predefined_controls", predefined_controls)
if predefined_controls_version and not isinstance(predefined_controls_version, str):
raise TypeError("Expected argument 'predefined_controls_version' to be a str")
pulumi.set(__self__, "predefined_controls_version", predefined_controls_version)
if web_socket_controls and not isinstance(web_socket_controls, list):
raise TypeError("Expected argument 'web_socket_controls' to be a list")
pulumi.set(__self__, "web_socket_controls", web_socket_controls)
@property
@pulumi.getter(name="commonGlobalOverrideActionsConfig")
def common_global_override_actions_config(self) -> Mapping[str, str]:
"""
(string)
"""
return pulumi.get(self, "common_global_override_actions_config")
@property
@pulumi.getter(name="controlsInfos")
def controls_infos(self) -> Sequence['outputs.GetInspectionProfileControlsInfoResult']:
"""
(string) Types for custom controls
"""
return pulumi.get(self, "controls_infos")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter(name="customControls")
def custom_controls(self) -> Sequence['outputs.GetInspectionProfileCustomControlResult']:
"""
(string) Types for custom controls
"""
return pulumi.get(self, "custom_controls")
@property
@pulumi.getter
def description(self) -> str:
"""
(string) Description of the inspection profile.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter(name="globalControlActions")
def global_control_actions(self) -> Sequence[str]:
return pulumi.get(self, "global_control_actions")
@property
@pulumi.getter
def id(self) -> str:
"""
(string) ID of the predefined control
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="incarnationNumber")
def incarnation_number(self) -> str:
return pulumi.get(self, "incarnation_number")
@property
@pulumi.getter(name="modifiedBy")
def modified_by(self) -> str:
return pulumi.get(self, "modified_by")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def name(self) -> str:
"""
(string)
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> str:
"""
(string) OWASP Predefined Paranoia Level. Range: [1-4], inclusive
"""
return pulumi.get(self, "paranoia_level")
@property
@pulumi.getter(name="predefinedControls")
def predefined_controls(self) -> Sequence['outputs.GetInspectionProfilePredefinedControlResult']:
"""
(string) The predefined controls
"""
return pulumi.get(self, "predefined_controls")
@property
@pulumi.getter(name="predefinedControlsVersion")
def predefined_controls_version(self) -> str:
return pulumi.get(self, "predefined_controls_version")
@property
@pulumi.getter(name="webSocketControls")
def web_socket_controls(self) -> Sequence['outputs.GetInspectionProfileWebSocketControlResult']:
"""
(string)
"""
return pulumi.get(self, "web_socket_controls")
class AwaitableGetInspectionProfileResult(GetInspectionProfileResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetInspectionProfileResult(
common_global_override_actions_config=self.common_global_override_actions_config,
controls_infos=self.controls_infos,
creation_time=self.creation_time,
custom_controls=self.custom_controls,
description=self.description,
global_control_actions=self.global_control_actions,
id=self.id,
incarnation_number=self.incarnation_number,
modified_by=self.modified_by,
modified_time=self.modified_time,
name=self.name,
paranoia_level=self.paranoia_level,
predefined_controls=self.predefined_controls,
predefined_controls_version=self.predefined_controls_version,
web_socket_controls=self.web_socket_controls)
def get_inspection_profile(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInspectionProfileResult:
"""
Use the **zpa_inspection_profile** data source to get information about an inspection profile in the Zscaler Private Access cloud. This resource can then be referenced in an inspection custom control resource.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
this = zpa.Inspection.get_inspection_profile(name="Example")
```
:param str id: This field defines the id of the application server.
:param str name: This field defines the name of the server.
"""
__args__ = dict()
__args__['id'] = id
__args__['name'] = name
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('zpa:Inspection/getInspectionProfile:getInspectionProfile', __args__, opts=opts, typ=GetInspectionProfileResult).value
return AwaitableGetInspectionProfileResult(
common_global_override_actions_config=__ret__.common_global_override_actions_config,
controls_infos=__ret__.controls_infos,
creation_time=__ret__.creation_time,
custom_controls=__ret__.custom_controls,
description=__ret__.description,
global_control_actions=__ret__.global_control_actions,
id=__ret__.id,
incarnation_number=__ret__.incarnation_number,
modified_by=__ret__.modified_by,
modified_time=__ret__.modified_time,
name=__ret__.name,
paranoia_level=__ret__.paranoia_level,
predefined_controls=__ret__.predefined_controls,
predefined_controls_version=__ret__.predefined_controls_version,
web_socket_controls=__ret__.web_socket_controls)
@_utilities.lift_output_func(get_inspection_profile)
def get_inspection_profile_output(id: Optional[pulumi.Input[Optional[str]]] = None,
name: Optional[pulumi.Input[Optional[str]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetInspectionProfileResult]:
"""
Use the **zpa_inspection_profile** data source to get information about an inspection profile in the Zscaler Private Access cloud. This resource can then be referenced in an inspection custom control resource.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
this = zpa.Inspection.get_inspection_profile(name="Example")
```
:param str id: This field defines the id of the application server.
:param str name: This field defines the name of the server.
"""
... | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/inspection/get_inspection_profile.py | get_inspection_profile.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *
__all__ = ['InspectionProfileArgs', 'InspectionProfile']
@pulumi.input_type
class InspectionProfileArgs:
def __init__(__self__, *,
associate_all_controls: Optional[pulumi.Input[bool]] = None,
common_global_override_actions_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
controls_infos: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileControlsInfoArgs']]]] = None,
custom_controls: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileCustomControlArgs']]]] = None,
description: Optional[pulumi.Input[str]] = None,
global_control_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
incarnation_number: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
paranoia_level: Optional[pulumi.Input[str]] = None,
predefined_controls: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfilePredefinedControlArgs']]]] = None,
predefined_controls_version: Optional[pulumi.Input[str]] = None,
web_socket_controls: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileWebSocketControlArgs']]]] = None):
"""
The set of arguments for constructing a InspectionProfile resource.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] common_global_override_actions_config: (Optional)
:param pulumi.Input[Sequence[pulumi.Input['InspectionProfileControlsInfoArgs']]] controls_infos: (Optional) Types for custom controls
:param pulumi.Input[Sequence[pulumi.Input['InspectionProfileCustomControlArgs']]] custom_controls: (Optional) Types for custom controls
:param pulumi.Input[str] description: Description of the inspection profile.
:param pulumi.Input[str] name: The name of the inspection profile.
:param pulumi.Input[str] paranoia_level: OWASP Predefined Paranoia Level. Range: [1-4], inclusive
:param pulumi.Input[Sequence[pulumi.Input['InspectionProfilePredefinedControlArgs']]] predefined_controls: The predefined controls. The default predefined control `Preprocessors` are mandatory and injected in the request by default. Individual `predefined_controls` can be set by using the data source `data_source_zpa_predefined_controls` or by group using the data source `_inspection.get_inspection_all_predefined_controls`.
:param pulumi.Input[Sequence[pulumi.Input['InspectionProfileWebSocketControlArgs']]] web_socket_controls: (string)
"""
if associate_all_controls is not None:
pulumi.set(__self__, "associate_all_controls", associate_all_controls)
if common_global_override_actions_config is not None:
pulumi.set(__self__, "common_global_override_actions_config", common_global_override_actions_config)
if controls_infos is not None:
pulumi.set(__self__, "controls_infos", controls_infos)
if custom_controls is not None:
pulumi.set(__self__, "custom_controls", custom_controls)
if description is not None:
pulumi.set(__self__, "description", description)
if global_control_actions is not None:
pulumi.set(__self__, "global_control_actions", global_control_actions)
if incarnation_number is not None:
pulumi.set(__self__, "incarnation_number", incarnation_number)
if name is not None:
pulumi.set(__self__, "name", name)
if paranoia_level is not None:
pulumi.set(__self__, "paranoia_level", paranoia_level)
if predefined_controls is not None:
pulumi.set(__self__, "predefined_controls", predefined_controls)
if predefined_controls_version is not None:
pulumi.set(__self__, "predefined_controls_version", predefined_controls_version)
if web_socket_controls is not None:
pulumi.set(__self__, "web_socket_controls", web_socket_controls)
@property
@pulumi.getter(name="associateAllControls")
def associate_all_controls(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "associate_all_controls")
@associate_all_controls.setter
def associate_all_controls(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "associate_all_controls", value)
@property
@pulumi.getter(name="commonGlobalOverrideActionsConfig")
def common_global_override_actions_config(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
"""
(Optional)
"""
return pulumi.get(self, "common_global_override_actions_config")
@common_global_override_actions_config.setter
def common_global_override_actions_config(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
pulumi.set(self, "common_global_override_actions_config", value)
@property
@pulumi.getter(name="controlsInfos")
def controls_infos(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileControlsInfoArgs']]]]:
"""
(Optional) Types for custom controls
"""
return pulumi.get(self, "controls_infos")
@controls_infos.setter
def controls_infos(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileControlsInfoArgs']]]]):
pulumi.set(self, "controls_infos", value)
@property
@pulumi.getter(name="customControls")
def custom_controls(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileCustomControlArgs']]]]:
"""
(Optional) Types for custom controls
"""
return pulumi.get(self, "custom_controls")
@custom_controls.setter
def custom_controls(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileCustomControlArgs']]]]):
pulumi.set(self, "custom_controls", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description of the inspection profile.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="globalControlActions")
def global_control_actions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "global_control_actions")
@global_control_actions.setter
def global_control_actions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "global_control_actions", value)
@property
@pulumi.getter(name="incarnationNumber")
def incarnation_number(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "incarnation_number")
@incarnation_number.setter
def incarnation_number(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "incarnation_number", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the inspection profile.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> Optional[pulumi.Input[str]]:
"""
OWASP Predefined Paranoia Level. Range: [1-4], inclusive
"""
return pulumi.get(self, "paranoia_level")
@paranoia_level.setter
def paranoia_level(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "paranoia_level", value)
@property
@pulumi.getter(name="predefinedControls")
def predefined_controls(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfilePredefinedControlArgs']]]]:
"""
The predefined controls. The default predefined control `Preprocessors` are mandatory and injected in the request by default. Individual `predefined_controls` can be set by using the data source `data_source_zpa_predefined_controls` or by group using the data source `_inspection.get_inspection_all_predefined_controls`.
"""
return pulumi.get(self, "predefined_controls")
@predefined_controls.setter
def predefined_controls(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfilePredefinedControlArgs']]]]):
pulumi.set(self, "predefined_controls", value)
@property
@pulumi.getter(name="predefinedControlsVersion")
def predefined_controls_version(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "predefined_controls_version")
@predefined_controls_version.setter
def predefined_controls_version(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "predefined_controls_version", value)
@property
@pulumi.getter(name="webSocketControls")
def web_socket_controls(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileWebSocketControlArgs']]]]:
"""
(string)
"""
return pulumi.get(self, "web_socket_controls")
@web_socket_controls.setter
def web_socket_controls(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileWebSocketControlArgs']]]]):
pulumi.set(self, "web_socket_controls", value)
@pulumi.input_type
class _InspectionProfileState:
def __init__(__self__, *,
associate_all_controls: Optional[pulumi.Input[bool]] = None,
common_global_override_actions_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
controls_infos: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileControlsInfoArgs']]]] = None,
custom_controls: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileCustomControlArgs']]]] = None,
description: Optional[pulumi.Input[str]] = None,
global_control_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
incarnation_number: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
paranoia_level: Optional[pulumi.Input[str]] = None,
predefined_controls: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfilePredefinedControlArgs']]]] = None,
predefined_controls_version: Optional[pulumi.Input[str]] = None,
web_socket_controls: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileWebSocketControlArgs']]]] = None):
"""
Input properties used for looking up and filtering InspectionProfile resources.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] common_global_override_actions_config: (Optional)
:param pulumi.Input[Sequence[pulumi.Input['InspectionProfileControlsInfoArgs']]] controls_infos: (Optional) Types for custom controls
:param pulumi.Input[Sequence[pulumi.Input['InspectionProfileCustomControlArgs']]] custom_controls: (Optional) Types for custom controls
:param pulumi.Input[str] description: Description of the inspection profile.
:param pulumi.Input[str] name: The name of the inspection profile.
:param pulumi.Input[str] paranoia_level: OWASP Predefined Paranoia Level. Range: [1-4], inclusive
:param pulumi.Input[Sequence[pulumi.Input['InspectionProfilePredefinedControlArgs']]] predefined_controls: The predefined controls. The default predefined control `Preprocessors` are mandatory and injected in the request by default. Individual `predefined_controls` can be set by using the data source `data_source_zpa_predefined_controls` or by group using the data source `_inspection.get_inspection_all_predefined_controls`.
:param pulumi.Input[Sequence[pulumi.Input['InspectionProfileWebSocketControlArgs']]] web_socket_controls: (string)
"""
if associate_all_controls is not None:
pulumi.set(__self__, "associate_all_controls", associate_all_controls)
if common_global_override_actions_config is not None:
pulumi.set(__self__, "common_global_override_actions_config", common_global_override_actions_config)
if controls_infos is not None:
pulumi.set(__self__, "controls_infos", controls_infos)
if custom_controls is not None:
pulumi.set(__self__, "custom_controls", custom_controls)
if description is not None:
pulumi.set(__self__, "description", description)
if global_control_actions is not None:
pulumi.set(__self__, "global_control_actions", global_control_actions)
if incarnation_number is not None:
pulumi.set(__self__, "incarnation_number", incarnation_number)
if name is not None:
pulumi.set(__self__, "name", name)
if paranoia_level is not None:
pulumi.set(__self__, "paranoia_level", paranoia_level)
if predefined_controls is not None:
pulumi.set(__self__, "predefined_controls", predefined_controls)
if predefined_controls_version is not None:
pulumi.set(__self__, "predefined_controls_version", predefined_controls_version)
if web_socket_controls is not None:
pulumi.set(__self__, "web_socket_controls", web_socket_controls)
@property
@pulumi.getter(name="associateAllControls")
def associate_all_controls(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "associate_all_controls")
@associate_all_controls.setter
def associate_all_controls(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "associate_all_controls", value)
@property
@pulumi.getter(name="commonGlobalOverrideActionsConfig")
def common_global_override_actions_config(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
"""
(Optional)
"""
return pulumi.get(self, "common_global_override_actions_config")
@common_global_override_actions_config.setter
def common_global_override_actions_config(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
pulumi.set(self, "common_global_override_actions_config", value)
@property
@pulumi.getter(name="controlsInfos")
def controls_infos(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileControlsInfoArgs']]]]:
"""
(Optional) Types for custom controls
"""
return pulumi.get(self, "controls_infos")
@controls_infos.setter
def controls_infos(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileControlsInfoArgs']]]]):
pulumi.set(self, "controls_infos", value)
@property
@pulumi.getter(name="customControls")
def custom_controls(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileCustomControlArgs']]]]:
"""
(Optional) Types for custom controls
"""
return pulumi.get(self, "custom_controls")
@custom_controls.setter
def custom_controls(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileCustomControlArgs']]]]):
pulumi.set(self, "custom_controls", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
Description of the inspection profile.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="globalControlActions")
def global_control_actions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "global_control_actions")
@global_control_actions.setter
def global_control_actions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "global_control_actions", value)
@property
@pulumi.getter(name="incarnationNumber")
def incarnation_number(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "incarnation_number")
@incarnation_number.setter
def incarnation_number(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "incarnation_number", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the inspection profile.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> Optional[pulumi.Input[str]]:
"""
OWASP Predefined Paranoia Level. Range: [1-4], inclusive
"""
return pulumi.get(self, "paranoia_level")
@paranoia_level.setter
def paranoia_level(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "paranoia_level", value)
@property
@pulumi.getter(name="predefinedControls")
def predefined_controls(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfilePredefinedControlArgs']]]]:
"""
The predefined controls. The default predefined control `Preprocessors` are mandatory and injected in the request by default. Individual `predefined_controls` can be set by using the data source `data_source_zpa_predefined_controls` or by group using the data source `_inspection.get_inspection_all_predefined_controls`.
"""
return pulumi.get(self, "predefined_controls")
@predefined_controls.setter
def predefined_controls(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfilePredefinedControlArgs']]]]):
pulumi.set(self, "predefined_controls", value)
@property
@pulumi.getter(name="predefinedControlsVersion")
def predefined_controls_version(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "predefined_controls_version")
@predefined_controls_version.setter
def predefined_controls_version(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "predefined_controls_version", value)
@property
@pulumi.getter(name="webSocketControls")
def web_socket_controls(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileWebSocketControlArgs']]]]:
"""
(string)
"""
return pulumi.get(self, "web_socket_controls")
@web_socket_controls.setter
def web_socket_controls(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['InspectionProfileWebSocketControlArgs']]]]):
pulumi.set(self, "web_socket_controls", value)
class InspectionProfile(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
associate_all_controls: Optional[pulumi.Input[bool]] = None,
common_global_override_actions_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
controls_infos: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileControlsInfoArgs']]]]] = None,
custom_controls: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileCustomControlArgs']]]]] = None,
description: Optional[pulumi.Input[str]] = None,
global_control_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
incarnation_number: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
paranoia_level: Optional[pulumi.Input[str]] = None,
predefined_controls: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfilePredefinedControlArgs']]]]] = None,
predefined_controls_version: Optional[pulumi.Input[str]] = None,
web_socket_controls: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileWebSocketControlArgs']]]]] = None,
__props__=None):
"""
The **zpa_inspection_profile** resource creates an inspection profile in the Zscaler Private Access cloud. This resource can then be referenced in an inspection custom control resource.
## Import
Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language. [Visit](https://github.com/zscaler/zscaler-terraformer)
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] common_global_override_actions_config: (Optional)
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileControlsInfoArgs']]]] controls_infos: (Optional) Types for custom controls
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileCustomControlArgs']]]] custom_controls: (Optional) Types for custom controls
:param pulumi.Input[str] description: Description of the inspection profile.
:param pulumi.Input[str] name: The name of the inspection profile.
:param pulumi.Input[str] paranoia_level: OWASP Predefined Paranoia Level. Range: [1-4], inclusive
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfilePredefinedControlArgs']]]] predefined_controls: The predefined controls. The default predefined control `Preprocessors` are mandatory and injected in the request by default. Individual `predefined_controls` can be set by using the data source `data_source_zpa_predefined_controls` or by group using the data source `_inspection.get_inspection_all_predefined_controls`.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileWebSocketControlArgs']]]] web_socket_controls: (string)
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[InspectionProfileArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
The **zpa_inspection_profile** resource creates an inspection profile in the Zscaler Private Access cloud. This resource can then be referenced in an inspection custom control resource.
## Import
Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language. [Visit](https://github.com/zscaler/zscaler-terraformer)
:param str resource_name: The name of the resource.
:param InspectionProfileArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(InspectionProfileArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
associate_all_controls: Optional[pulumi.Input[bool]] = None,
common_global_override_actions_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
controls_infos: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileControlsInfoArgs']]]]] = None,
custom_controls: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileCustomControlArgs']]]]] = None,
description: Optional[pulumi.Input[str]] = None,
global_control_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
incarnation_number: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
paranoia_level: Optional[pulumi.Input[str]] = None,
predefined_controls: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfilePredefinedControlArgs']]]]] = None,
predefined_controls_version: Optional[pulumi.Input[str]] = None,
web_socket_controls: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileWebSocketControlArgs']]]]] = None,
__props__=None):
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = InspectionProfileArgs.__new__(InspectionProfileArgs)
__props__.__dict__["associate_all_controls"] = associate_all_controls
__props__.__dict__["common_global_override_actions_config"] = common_global_override_actions_config
__props__.__dict__["controls_infos"] = controls_infos
__props__.__dict__["custom_controls"] = custom_controls
__props__.__dict__["description"] = description
__props__.__dict__["global_control_actions"] = global_control_actions
__props__.__dict__["incarnation_number"] = incarnation_number
__props__.__dict__["name"] = name
__props__.__dict__["paranoia_level"] = paranoia_level
__props__.__dict__["predefined_controls"] = predefined_controls
__props__.__dict__["predefined_controls_version"] = predefined_controls_version
__props__.__dict__["web_socket_controls"] = web_socket_controls
super(InspectionProfile, __self__).__init__(
'zpa:Inspection/inspectionProfile:InspectionProfile',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
associate_all_controls: Optional[pulumi.Input[bool]] = None,
common_global_override_actions_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
controls_infos: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileControlsInfoArgs']]]]] = None,
custom_controls: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileCustomControlArgs']]]]] = None,
description: Optional[pulumi.Input[str]] = None,
global_control_actions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
incarnation_number: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
paranoia_level: Optional[pulumi.Input[str]] = None,
predefined_controls: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfilePredefinedControlArgs']]]]] = None,
predefined_controls_version: Optional[pulumi.Input[str]] = None,
web_socket_controls: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileWebSocketControlArgs']]]]] = None) -> 'InspectionProfile':
"""
Get an existing InspectionProfile resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] common_global_override_actions_config: (Optional)
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileControlsInfoArgs']]]] controls_infos: (Optional) Types for custom controls
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileCustomControlArgs']]]] custom_controls: (Optional) Types for custom controls
:param pulumi.Input[str] description: Description of the inspection profile.
:param pulumi.Input[str] name: The name of the inspection profile.
:param pulumi.Input[str] paranoia_level: OWASP Predefined Paranoia Level. Range: [1-4], inclusive
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfilePredefinedControlArgs']]]] predefined_controls: The predefined controls. The default predefined control `Preprocessors` are mandatory and injected in the request by default. Individual `predefined_controls` can be set by using the data source `data_source_zpa_predefined_controls` or by group using the data source `_inspection.get_inspection_all_predefined_controls`.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['InspectionProfileWebSocketControlArgs']]]] web_socket_controls: (string)
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _InspectionProfileState.__new__(_InspectionProfileState)
__props__.__dict__["associate_all_controls"] = associate_all_controls
__props__.__dict__["common_global_override_actions_config"] = common_global_override_actions_config
__props__.__dict__["controls_infos"] = controls_infos
__props__.__dict__["custom_controls"] = custom_controls
__props__.__dict__["description"] = description
__props__.__dict__["global_control_actions"] = global_control_actions
__props__.__dict__["incarnation_number"] = incarnation_number
__props__.__dict__["name"] = name
__props__.__dict__["paranoia_level"] = paranoia_level
__props__.__dict__["predefined_controls"] = predefined_controls
__props__.__dict__["predefined_controls_version"] = predefined_controls_version
__props__.__dict__["web_socket_controls"] = web_socket_controls
return InspectionProfile(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter(name="associateAllControls")
def associate_all_controls(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "associate_all_controls")
@property
@pulumi.getter(name="commonGlobalOverrideActionsConfig")
def common_global_override_actions_config(self) -> pulumi.Output[Mapping[str, str]]:
"""
(Optional)
"""
return pulumi.get(self, "common_global_override_actions_config")
@property
@pulumi.getter(name="controlsInfos")
def controls_infos(self) -> pulumi.Output[Sequence['outputs.InspectionProfileControlsInfo']]:
"""
(Optional) Types for custom controls
"""
return pulumi.get(self, "controls_infos")
@property
@pulumi.getter(name="customControls")
def custom_controls(self) -> pulumi.Output[Sequence['outputs.InspectionProfileCustomControl']]:
"""
(Optional) Types for custom controls
"""
return pulumi.get(self, "custom_controls")
@property
@pulumi.getter
def description(self) -> pulumi.Output[str]:
"""
Description of the inspection profile.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter(name="globalControlActions")
def global_control_actions(self) -> pulumi.Output[Sequence[str]]:
return pulumi.get(self, "global_control_actions")
@property
@pulumi.getter(name="incarnationNumber")
def incarnation_number(self) -> pulumi.Output[str]:
return pulumi.get(self, "incarnation_number")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The name of the inspection profile.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="paranoiaLevel")
def paranoia_level(self) -> pulumi.Output[str]:
"""
OWASP Predefined Paranoia Level. Range: [1-4], inclusive
"""
return pulumi.get(self, "paranoia_level")
@property
@pulumi.getter(name="predefinedControls")
def predefined_controls(self) -> pulumi.Output[Sequence['outputs.InspectionProfilePredefinedControl']]:
"""
The predefined controls. The default predefined control `Preprocessors` are mandatory and injected in the request by default. Individual `predefined_controls` can be set by using the data source `data_source_zpa_predefined_controls` or by group using the data source `_inspection.get_inspection_all_predefined_controls`.
"""
return pulumi.get(self, "predefined_controls")
@property
@pulumi.getter(name="predefinedControlsVersion")
def predefined_controls_version(self) -> pulumi.Output[str]:
return pulumi.get(self, "predefined_controls_version")
@property
@pulumi.getter(name="webSocketControls")
def web_socket_controls(self) -> pulumi.Output[Sequence['outputs.InspectionProfileWebSocketControl']]:
"""
(string)
"""
return pulumi.get(self, "web_socket_controls") | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/inspection/inspection_profile.py | inspection_profile.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'GetSCIMAttributeHeaderResult',
'AwaitableGetSCIMAttributeHeaderResult',
'get_scim_attribute_header',
'get_scim_attribute_header_output',
]
@pulumi.output_type
class GetSCIMAttributeHeaderResult:
"""
A collection of values returned by getSCIMAttributeHeader.
"""
def __init__(__self__, canonical_values=None, case_sensitive=None, creation_time=None, data_type=None, description=None, id=None, idp_id=None, idp_name=None, modified_time=None, modifiedby=None, multivalued=None, mutability=None, name=None, required=None, returned=None, schema_uri=None, uniqueness=None, values=None):
if canonical_values and not isinstance(canonical_values, list):
raise TypeError("Expected argument 'canonical_values' to be a list")
pulumi.set(__self__, "canonical_values", canonical_values)
if case_sensitive and not isinstance(case_sensitive, bool):
raise TypeError("Expected argument 'case_sensitive' to be a bool")
pulumi.set(__self__, "case_sensitive", case_sensitive)
if creation_time and not isinstance(creation_time, str):
raise TypeError("Expected argument 'creation_time' to be a str")
pulumi.set(__self__, "creation_time", creation_time)
if data_type and not isinstance(data_type, str):
raise TypeError("Expected argument 'data_type' to be a str")
pulumi.set(__self__, "data_type", data_type)
if description and not isinstance(description, str):
raise TypeError("Expected argument 'description' to be a str")
pulumi.set(__self__, "description", description)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if idp_id and not isinstance(idp_id, str):
raise TypeError("Expected argument 'idp_id' to be a str")
pulumi.set(__self__, "idp_id", idp_id)
if idp_name and not isinstance(idp_name, str):
raise TypeError("Expected argument 'idp_name' to be a str")
pulumi.set(__self__, "idp_name", idp_name)
if modified_time and not isinstance(modified_time, str):
raise TypeError("Expected argument 'modified_time' to be a str")
pulumi.set(__self__, "modified_time", modified_time)
if modifiedby and not isinstance(modifiedby, str):
raise TypeError("Expected argument 'modifiedby' to be a str")
pulumi.set(__self__, "modifiedby", modifiedby)
if multivalued and not isinstance(multivalued, bool):
raise TypeError("Expected argument 'multivalued' to be a bool")
pulumi.set(__self__, "multivalued", multivalued)
if mutability and not isinstance(mutability, str):
raise TypeError("Expected argument 'mutability' to be a str")
pulumi.set(__self__, "mutability", mutability)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
if required and not isinstance(required, bool):
raise TypeError("Expected argument 'required' to be a bool")
pulumi.set(__self__, "required", required)
if returned and not isinstance(returned, str):
raise TypeError("Expected argument 'returned' to be a str")
pulumi.set(__self__, "returned", returned)
if schema_uri and not isinstance(schema_uri, str):
raise TypeError("Expected argument 'schema_uri' to be a str")
pulumi.set(__self__, "schema_uri", schema_uri)
if uniqueness and not isinstance(uniqueness, bool):
raise TypeError("Expected argument 'uniqueness' to be a bool")
pulumi.set(__self__, "uniqueness", uniqueness)
if values and not isinstance(values, list):
raise TypeError("Expected argument 'values' to be a list")
pulumi.set(__self__, "values", values)
@property
@pulumi.getter(name="canonicalValues")
def canonical_values(self) -> Sequence[str]:
"""
(string)
"""
return pulumi.get(self, "canonical_values")
@property
@pulumi.getter(name="caseSensitive")
def case_sensitive(self) -> bool:
"""
(bool)
"""
return pulumi.get(self, "case_sensitive")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "creation_time")
@property
@pulumi.getter(name="dataType")
def data_type(self) -> str:
"""
(string)
"""
return pulumi.get(self, "data_type")
@property
@pulumi.getter
def description(self) -> str:
"""
(string)
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def id(self) -> str:
"""
(string)
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="idpId")
def idp_id(self) -> Optional[str]:
"""
(string) The ID of the IdP corresponding to the SAML attribute.
"""
return pulumi.get(self, "idp_id")
@property
@pulumi.getter(name="idpName")
def idp_name(self) -> Optional[str]:
return pulumi.get(self, "idp_name")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def modifiedby(self) -> str:
return pulumi.get(self, "modifiedby")
@property
@pulumi.getter
def multivalued(self) -> bool:
"""
(bool)
"""
return pulumi.get(self, "multivalued")
@property
@pulumi.getter
def mutability(self) -> str:
"""
(string)
"""
return pulumi.get(self, "mutability")
@property
@pulumi.getter
def name(self) -> Optional[str]:
return pulumi.get(self, "name")
@property
@pulumi.getter
def required(self) -> bool:
"""
(bool)
"""
return pulumi.get(self, "required")
@property
@pulumi.getter
def returned(self) -> str:
"""
(string)
"""
return pulumi.get(self, "returned")
@property
@pulumi.getter(name="schemaUri")
def schema_uri(self) -> str:
"""
(string)
"""
return pulumi.get(self, "schema_uri")
@property
@pulumi.getter
def uniqueness(self) -> bool:
"""
(bool)
"""
return pulumi.get(self, "uniqueness")
@property
@pulumi.getter
def values(self) -> Sequence[str]:
return pulumi.get(self, "values")
class AwaitableGetSCIMAttributeHeaderResult(GetSCIMAttributeHeaderResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetSCIMAttributeHeaderResult(
canonical_values=self.canonical_values,
case_sensitive=self.case_sensitive,
creation_time=self.creation_time,
data_type=self.data_type,
description=self.description,
id=self.id,
idp_id=self.idp_id,
idp_name=self.idp_name,
modified_time=self.modified_time,
modifiedby=self.modifiedby,
multivalued=self.multivalued,
mutability=self.mutability,
name=self.name,
required=self.required,
returned=self.returned,
schema_uri=self.schema_uri,
uniqueness=self.uniqueness,
values=self.values)
def get_scim_attribute_header(idp_id: Optional[str] = None,
idp_name: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSCIMAttributeHeaderResult:
"""
Use the **zpa_scim_attribute_header** data source to get information about a SCIM attribute from an Identity Provider (IdP). This data source can then be referenced in an Access Policy, Timeout policy, Forwarding Policy, Inspection Policy or Inspection Policy.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
given_name = zpa.ScimAttribute.get_scim_attribute_header(idp_name="IdP_Name",
name="name.givenName")
family_name = zpa.ScimAttribute.get_scim_attribute_header(idp_name="IdP_Name",
name="name.familyName")
```
:param str idp_id: (string) The ID of the IdP corresponding to the SAML attribute.
:param str idp_name: The name of the scim attribute header that must be exported.
:param str name: The name of the scim attribute header to be exported.
"""
__args__ = dict()
__args__['idpId'] = idp_id
__args__['idpName'] = idp_name
__args__['name'] = name
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('zpa:ScimAttribute/getSCIMAttributeHeader:getSCIMAttributeHeader', __args__, opts=opts, typ=GetSCIMAttributeHeaderResult).value
return AwaitableGetSCIMAttributeHeaderResult(
canonical_values=__ret__.canonical_values,
case_sensitive=__ret__.case_sensitive,
creation_time=__ret__.creation_time,
data_type=__ret__.data_type,
description=__ret__.description,
id=__ret__.id,
idp_id=__ret__.idp_id,
idp_name=__ret__.idp_name,
modified_time=__ret__.modified_time,
modifiedby=__ret__.modifiedby,
multivalued=__ret__.multivalued,
mutability=__ret__.mutability,
name=__ret__.name,
required=__ret__.required,
returned=__ret__.returned,
schema_uri=__ret__.schema_uri,
uniqueness=__ret__.uniqueness,
values=__ret__.values)
@_utilities.lift_output_func(get_scim_attribute_header)
def get_scim_attribute_header_output(idp_id: Optional[pulumi.Input[Optional[str]]] = None,
idp_name: Optional[pulumi.Input[Optional[str]]] = None,
name: Optional[pulumi.Input[Optional[str]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetSCIMAttributeHeaderResult]:
"""
Use the **zpa_scim_attribute_header** data source to get information about a SCIM attribute from an Identity Provider (IdP). This data source can then be referenced in an Access Policy, Timeout policy, Forwarding Policy, Inspection Policy or Inspection Policy.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
given_name = zpa.ScimAttribute.get_scim_attribute_header(idp_name="IdP_Name",
name="name.givenName")
family_name = zpa.ScimAttribute.get_scim_attribute_header(idp_name="IdP_Name",
name="name.familyName")
```
:param str idp_id: (string) The ID of the IdP corresponding to the SAML attribute.
:param str idp_name: The name of the scim attribute header that must be exported.
:param str name: The name of the scim attribute header to be exported.
"""
... | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/scimattribute/get_scim_attribute_header.py | get_scim_attribute_header.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'GetSCIMGroupsResult',
'AwaitableGetSCIMGroupsResult',
'get_scim_groups',
'get_scim_groups_output',
]
@pulumi.output_type
class GetSCIMGroupsResult:
"""
A collection of values returned by getSCIMGroups.
"""
def __init__(__self__, creation_time=None, id=None, idp_group_id=None, idp_id=None, idp_name=None, modified_time=None, name=None):
if creation_time and not isinstance(creation_time, int):
raise TypeError("Expected argument 'creation_time' to be a int")
pulumi.set(__self__, "creation_time", creation_time)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if idp_group_id and not isinstance(idp_group_id, str):
raise TypeError("Expected argument 'idp_group_id' to be a str")
pulumi.set(__self__, "idp_group_id", idp_group_id)
if idp_id and not isinstance(idp_id, int):
raise TypeError("Expected argument 'idp_id' to be a int")
pulumi.set(__self__, "idp_id", idp_id)
if idp_name and not isinstance(idp_name, str):
raise TypeError("Expected argument 'idp_name' to be a str")
pulumi.set(__self__, "idp_name", idp_name)
if modified_time and not isinstance(modified_time, int):
raise TypeError("Expected argument 'modified_time' to be a int")
pulumi.set(__self__, "modified_time", modified_time)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> int:
"""
(string)
"""
return pulumi.get(self, "creation_time")
@property
@pulumi.getter
def id(self) -> Optional[str]:
return pulumi.get(self, "id")
@property
@pulumi.getter(name="idpGroupId")
def idp_group_id(self) -> str:
"""
(string)
"""
return pulumi.get(self, "idp_group_id")
@property
@pulumi.getter(name="idpId")
def idp_id(self) -> Optional[int]:
"""
(string) The ID of the IdP corresponding to the SAML attribute.
"""
return pulumi.get(self, "idp_id")
@property
@pulumi.getter(name="idpName")
def idp_name(self) -> Optional[str]:
return pulumi.get(self, "idp_name")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> int:
"""
(string)
"""
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def name(self) -> Optional[str]:
return pulumi.get(self, "name")
class AwaitableGetSCIMGroupsResult(GetSCIMGroupsResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetSCIMGroupsResult(
creation_time=self.creation_time,
id=self.id,
idp_group_id=self.idp_group_id,
idp_id=self.idp_id,
idp_name=self.idp_name,
modified_time=self.modified_time,
name=self.name)
def get_scim_groups(id: Optional[str] = None,
idp_id: Optional[int] = None,
idp_name: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSCIMGroupsResult:
"""
Use the **zpa_scim_groups** data source to get information about a SCIM Group from an Identity Provider (IdP). This data source can then be referenced in an Access Policy, Timeout policy, Forwarding Policy, Inspection Policy or Isolation Policy.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
engineering = zpa.scimGroup.get_scim_groups(idp_name="idp_name",
name="Engineering")
```
:param int idp_id: (string) The ID of the IdP corresponding to the SAML attribute.
:param str idp_name: Name. The name of the IdP where the scim group must be exported from.
:param str name: Name. The name of the scim group to be exported.
"""
__args__ = dict()
__args__['id'] = id
__args__['idpId'] = idp_id
__args__['idpName'] = idp_name
__args__['name'] = name
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('zpa:scimGroup/getSCIMGroups:getSCIMGroups', __args__, opts=opts, typ=GetSCIMGroupsResult).value
return AwaitableGetSCIMGroupsResult(
creation_time=__ret__.creation_time,
id=__ret__.id,
idp_group_id=__ret__.idp_group_id,
idp_id=__ret__.idp_id,
idp_name=__ret__.idp_name,
modified_time=__ret__.modified_time,
name=__ret__.name)
@_utilities.lift_output_func(get_scim_groups)
def get_scim_groups_output(id: Optional[pulumi.Input[Optional[str]]] = None,
idp_id: Optional[pulumi.Input[Optional[int]]] = None,
idp_name: Optional[pulumi.Input[Optional[str]]] = None,
name: Optional[pulumi.Input[Optional[str]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetSCIMGroupsResult]:
"""
Use the **zpa_scim_groups** data source to get information about a SCIM Group from an Identity Provider (IdP). This data source can then be referenced in an Access Policy, Timeout policy, Forwarding Policy, Inspection Policy or Isolation Policy.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
engineering = zpa.scimGroup.get_scim_groups(idp_name="idp_name",
name="Engineering")
```
:param int idp_id: (string) The ID of the IdP corresponding to the SAML attribute.
:param str idp_name: Name. The name of the IdP where the scim group must be exported from.
:param str name: Name. The name of the scim group to be exported.
"""
... | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/scimgroup/get_scim_groups.py | get_scim_groups.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'GetPostureProfileResult',
'AwaitableGetPostureProfileResult',
'get_posture_profile',
'get_posture_profile_output',
]
@pulumi.output_type
class GetPostureProfileResult:
"""
A collection of values returned by getPostureProfile.
"""
def __init__(__self__, creation_time=None, domain=None, id=None, master_customer_id=None, modified_time=None, modifiedby=None, name=None, posture_udid=None, zscaler_cloud=None, zscaler_customer_id=None):
if creation_time and not isinstance(creation_time, str):
raise TypeError("Expected argument 'creation_time' to be a str")
pulumi.set(__self__, "creation_time", creation_time)
if domain and not isinstance(domain, str):
raise TypeError("Expected argument 'domain' to be a str")
pulumi.set(__self__, "domain", domain)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if master_customer_id and not isinstance(master_customer_id, str):
raise TypeError("Expected argument 'master_customer_id' to be a str")
pulumi.set(__self__, "master_customer_id", master_customer_id)
if modified_time and not isinstance(modified_time, str):
raise TypeError("Expected argument 'modified_time' to be a str")
pulumi.set(__self__, "modified_time", modified_time)
if modifiedby and not isinstance(modifiedby, str):
raise TypeError("Expected argument 'modifiedby' to be a str")
pulumi.set(__self__, "modifiedby", modifiedby)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
if posture_udid and not isinstance(posture_udid, str):
raise TypeError("Expected argument 'posture_udid' to be a str")
pulumi.set(__self__, "posture_udid", posture_udid)
if zscaler_cloud and not isinstance(zscaler_cloud, str):
raise TypeError("Expected argument 'zscaler_cloud' to be a str")
pulumi.set(__self__, "zscaler_cloud", zscaler_cloud)
if zscaler_customer_id and not isinstance(zscaler_customer_id, str):
raise TypeError("Expected argument 'zscaler_customer_id' to be a str")
pulumi.set(__self__, "zscaler_customer_id", zscaler_customer_id)
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "creation_time")
@property
@pulumi.getter
def domain(self) -> str:
"""
(string)
"""
return pulumi.get(self, "domain")
@property
@pulumi.getter
def id(self) -> str:
return pulumi.get(self, "id")
@property
@pulumi.getter(name="masterCustomerId")
def master_customer_id(self) -> str:
"""
(string)
"""
return pulumi.get(self, "master_customer_id")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def modifiedby(self) -> str:
return pulumi.get(self, "modifiedby")
@property
@pulumi.getter
def name(self) -> Optional[str]:
return pulumi.get(self, "name")
@property
@pulumi.getter(name="postureUdid")
def posture_udid(self) -> str:
"""
(string)
"""
return pulumi.get(self, "posture_udid")
@property
@pulumi.getter(name="zscalerCloud")
def zscaler_cloud(self) -> str:
"""
(string)
"""
return pulumi.get(self, "zscaler_cloud")
@property
@pulumi.getter(name="zscalerCustomerId")
def zscaler_customer_id(self) -> str:
"""
(string)
"""
return pulumi.get(self, "zscaler_customer_id")
class AwaitableGetPostureProfileResult(GetPostureProfileResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetPostureProfileResult(
creation_time=self.creation_time,
domain=self.domain,
id=self.id,
master_customer_id=self.master_customer_id,
modified_time=self.modified_time,
modifiedby=self.modifiedby,
name=self.name,
posture_udid=self.posture_udid,
zscaler_cloud=self.zscaler_cloud,
zscaler_customer_id=self.zscaler_customer_id)
def get_posture_profile(name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPostureProfileResult:
"""
Use the **zpa_posture_profile** data source to get information about a posture profile created in the Zscaler Private Access Mobile Portal. This data source can then be referenced in an Access Policy, Timeout policy, Forwarding Policy, Inspection Policy or Isolation Policy.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
example1 = zpa.postureProfile.get_posture_profile(name="CrowdStrike_ZPA_ZTA_40")
```
```python
import pulumi
import pulumi_zpa as zpa
example2 = zpa.postureProfile.get_posture_profile(name="Detect SentinelOne")
```
```python
import pulumi
import pulumi_zpa as zpa
example3 = zpa.postureProfile.get_posture_profile(name="domain_joined")
```
> **NOTE** To query posture profiles that are associated with a specific Zscaler cloud, it is required to append the cloud name to the name of the posture profile as the below example:
```python
import pulumi
import pulumi_zpa as zpa
example1 = zpa.postureProfile.get_posture_profile(name="CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)")
```
> **NOTE** When associating a posture profile with one of supported resources, the following parameter must be exported: ``posture_udid`` instead of the ``id`` of the resource.
```python
import pulumi
import pulumi_zpa as zpa
example1 = zpa.postureProfile.get_posture_profile(name="CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)")
pulumi.export("zpaPostureProfile", example1.posture_udid)
```
:param str name: The name of the posture profile to be exported.
"""
__args__ = dict()
__args__['name'] = name
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('zpa:postureProfile/getPostureProfile:getPostureProfile', __args__, opts=opts, typ=GetPostureProfileResult).value
return AwaitableGetPostureProfileResult(
creation_time=__ret__.creation_time,
domain=__ret__.domain,
id=__ret__.id,
master_customer_id=__ret__.master_customer_id,
modified_time=__ret__.modified_time,
modifiedby=__ret__.modifiedby,
name=__ret__.name,
posture_udid=__ret__.posture_udid,
zscaler_cloud=__ret__.zscaler_cloud,
zscaler_customer_id=__ret__.zscaler_customer_id)
@_utilities.lift_output_func(get_posture_profile)
def get_posture_profile_output(name: Optional[pulumi.Input[Optional[str]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPostureProfileResult]:
"""
Use the **zpa_posture_profile** data source to get information about a posture profile created in the Zscaler Private Access Mobile Portal. This data source can then be referenced in an Access Policy, Timeout policy, Forwarding Policy, Inspection Policy or Isolation Policy.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
example1 = zpa.postureProfile.get_posture_profile(name="CrowdStrike_ZPA_ZTA_40")
```
```python
import pulumi
import pulumi_zpa as zpa
example2 = zpa.postureProfile.get_posture_profile(name="Detect SentinelOne")
```
```python
import pulumi
import pulumi_zpa as zpa
example3 = zpa.postureProfile.get_posture_profile(name="domain_joined")
```
> **NOTE** To query posture profiles that are associated with a specific Zscaler cloud, it is required to append the cloud name to the name of the posture profile as the below example:
```python
import pulumi
import pulumi_zpa as zpa
example1 = zpa.postureProfile.get_posture_profile(name="CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)")
```
> **NOTE** When associating a posture profile with one of supported resources, the following parameter must be exported: ``posture_udid`` instead of the ``id`` of the resource.
```python
import pulumi
import pulumi_zpa as zpa
example1 = zpa.postureProfile.get_posture_profile(name="CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)")
pulumi.export("zpaPostureProfile", example1.posture_udid)
```
:param str name: The name of the posture profile to be exported.
"""
... | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/postureprofile/get_posture_profile.py | get_posture_profile.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'PolicyAccessForwardingRuleConditionArgs',
'PolicyAccessForwardingRuleConditionOperandArgs',
]
@pulumi.input_type
class PolicyAccessForwardingRuleConditionArgs:
def __init__(__self__, *,
operator: pulumi.Input[str],
id: Optional[pulumi.Input[str]] = None,
negated: Optional[pulumi.Input[bool]] = None,
operands: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessForwardingRuleConditionOperandArgs']]]] = None):
pulumi.set(__self__, "operator", operator)
if id is not None:
pulumi.set(__self__, "id", id)
if negated is not None:
pulumi.set(__self__, "negated", negated)
if operands is not None:
pulumi.set(__self__, "operands", operands)
@property
@pulumi.getter
def operator(self) -> pulumi.Input[str]:
return pulumi.get(self, "operator")
@operator.setter
def operator(self, value: pulumi.Input[str]):
pulumi.set(self, "operator", value)
@property
@pulumi.getter
def id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "id")
@id.setter
def id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "id", value)
@property
@pulumi.getter
def negated(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "negated")
@negated.setter
def negated(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "negated", value)
@property
@pulumi.getter
def operands(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessForwardingRuleConditionOperandArgs']]]]:
return pulumi.get(self, "operands")
@operands.setter
def operands(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessForwardingRuleConditionOperandArgs']]]]):
pulumi.set(self, "operands", value)
@pulumi.input_type
class PolicyAccessForwardingRuleConditionOperandArgs:
def __init__(__self__, *,
lhs: pulumi.Input[str],
object_type: pulumi.Input[str],
id: Optional[pulumi.Input[str]] = None,
idp_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
rhs: Optional[pulumi.Input[str]] = None,
rhs_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
pulumi.set(__self__, "lhs", lhs)
pulumi.set(__self__, "object_type", object_type)
if id is not None:
pulumi.set(__self__, "id", id)
if idp_id is not None:
pulumi.set(__self__, "idp_id", idp_id)
if name is not None:
pulumi.set(__self__, "name", name)
if rhs is not None:
pulumi.set(__self__, "rhs", rhs)
if rhs_lists is not None:
pulumi.set(__self__, "rhs_lists", rhs_lists)
@property
@pulumi.getter
def lhs(self) -> pulumi.Input[str]:
return pulumi.get(self, "lhs")
@lhs.setter
def lhs(self, value: pulumi.Input[str]):
pulumi.set(self, "lhs", value)
@property
@pulumi.getter(name="objectType")
def object_type(self) -> pulumi.Input[str]:
return pulumi.get(self, "object_type")
@object_type.setter
def object_type(self, value: pulumi.Input[str]):
pulumi.set(self, "object_type", value)
@property
@pulumi.getter
def id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "id")
@id.setter
def id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "id", value)
@property
@pulumi.getter(name="idpId")
def idp_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "idp_id")
@idp_id.setter
def idp_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "idp_id", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def rhs(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "rhs")
@rhs.setter
def rhs(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "rhs", value)
@property
@pulumi.getter(name="rhsLists")
def rhs_lists(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "rhs_lists")
@rhs_lists.setter
def rhs_lists(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "rhs_lists", value) | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/forwardpolicy/_inputs.py | _inputs.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'PolicyAccessForwardingRuleCondition',
'PolicyAccessForwardingRuleConditionOperand',
]
@pulumi.output_type
class PolicyAccessForwardingRuleCondition(dict):
def __init__(__self__, *,
operator: str,
id: Optional[str] = None,
negated: Optional[bool] = None,
operands: Optional[Sequence['outputs.PolicyAccessForwardingRuleConditionOperand']] = None):
pulumi.set(__self__, "operator", operator)
if id is not None:
pulumi.set(__self__, "id", id)
if negated is not None:
pulumi.set(__self__, "negated", negated)
if operands is not None:
pulumi.set(__self__, "operands", operands)
@property
@pulumi.getter
def operator(self) -> str:
return pulumi.get(self, "operator")
@property
@pulumi.getter
def id(self) -> Optional[str]:
return pulumi.get(self, "id")
@property
@pulumi.getter
def negated(self) -> Optional[bool]:
return pulumi.get(self, "negated")
@property
@pulumi.getter
def operands(self) -> Optional[Sequence['outputs.PolicyAccessForwardingRuleConditionOperand']]:
return pulumi.get(self, "operands")
@pulumi.output_type
class PolicyAccessForwardingRuleConditionOperand(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "objectType":
suggest = "object_type"
elif key == "idpId":
suggest = "idp_id"
elif key == "rhsLists":
suggest = "rhs_lists"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PolicyAccessForwardingRuleConditionOperand. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PolicyAccessForwardingRuleConditionOperand.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PolicyAccessForwardingRuleConditionOperand.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
lhs: str,
object_type: str,
id: Optional[str] = None,
idp_id: Optional[str] = None,
name: Optional[str] = None,
rhs: Optional[str] = None,
rhs_lists: Optional[Sequence[str]] = None):
pulumi.set(__self__, "lhs", lhs)
pulumi.set(__self__, "object_type", object_type)
if id is not None:
pulumi.set(__self__, "id", id)
if idp_id is not None:
pulumi.set(__self__, "idp_id", idp_id)
if name is not None:
pulumi.set(__self__, "name", name)
if rhs is not None:
pulumi.set(__self__, "rhs", rhs)
if rhs_lists is not None:
pulumi.set(__self__, "rhs_lists", rhs_lists)
@property
@pulumi.getter
def lhs(self) -> str:
return pulumi.get(self, "lhs")
@property
@pulumi.getter(name="objectType")
def object_type(self) -> str:
return pulumi.get(self, "object_type")
@property
@pulumi.getter
def id(self) -> Optional[str]:
return pulumi.get(self, "id")
@property
@pulumi.getter(name="idpId")
def idp_id(self) -> Optional[str]:
return pulumi.get(self, "idp_id")
@property
@pulumi.getter
def name(self) -> Optional[str]:
return pulumi.get(self, "name")
@property
@pulumi.getter
def rhs(self) -> Optional[str]:
return pulumi.get(self, "rhs")
@property
@pulumi.getter(name="rhsLists")
def rhs_lists(self) -> Optional[Sequence[str]]:
return pulumi.get(self, "rhs_lists") | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/forwardpolicy/outputs.py | outputs.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *
__all__ = ['PolicyAccessForwardingRuleArgs', 'PolicyAccessForwardingRule']
@pulumi.input_type
class PolicyAccessForwardingRuleArgs:
def __init__(__self__, *,
action: Optional[pulumi.Input[str]] = None,
action_id: Optional[pulumi.Input[str]] = None,
bypass_default_rule: Optional[pulumi.Input[bool]] = None,
conditions: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessForwardingRuleConditionArgs']]]] = None,
custom_msg: Optional[pulumi.Input[str]] = None,
default_rule: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
lss_default_rule: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
operator: Optional[pulumi.Input[str]] = None,
policy_set_id: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[str]] = None,
reauth_default_rule: Optional[pulumi.Input[bool]] = None,
reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
reauth_timeout: Optional[pulumi.Input[str]] = None,
rule_order: Optional[pulumi.Input[str]] = None,
zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a PolicyAccessForwardingRule resource.
:param pulumi.Input[str] action: This is for providing the rule action.
:param pulumi.Input[str] action_id: This field defines the description of the server.
:param pulumi.Input[Sequence[pulumi.Input['PolicyAccessForwardingRuleConditionArgs']]] conditions: This is for proviidng the set of conditions for the policy.
:param pulumi.Input[str] custom_msg: This is for providing a customer message for the user.
:param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
:param pulumi.Input[str] description: This is the description of the access policy.
:param pulumi.Input[str] name: This is the name of the policy.
"""
if action is not None:
pulumi.set(__self__, "action", action)
if action_id is not None:
pulumi.set(__self__, "action_id", action_id)
if bypass_default_rule is not None:
pulumi.set(__self__, "bypass_default_rule", bypass_default_rule)
if conditions is not None:
pulumi.set(__self__, "conditions", conditions)
if custom_msg is not None:
pulumi.set(__self__, "custom_msg", custom_msg)
if default_rule is not None:
pulumi.set(__self__, "default_rule", default_rule)
if description is not None:
pulumi.set(__self__, "description", description)
if lss_default_rule is not None:
pulumi.set(__self__, "lss_default_rule", lss_default_rule)
if name is not None:
pulumi.set(__self__, "name", name)
if operator is not None:
pulumi.set(__self__, "operator", operator)
if policy_set_id is not None:
pulumi.set(__self__, "policy_set_id", policy_set_id)
if policy_type is not None:
pulumi.set(__self__, "policy_type", policy_type)
if priority is not None:
pulumi.set(__self__, "priority", priority)
if reauth_default_rule is not None:
pulumi.set(__self__, "reauth_default_rule", reauth_default_rule)
if reauth_idle_timeout is not None:
pulumi.set(__self__, "reauth_idle_timeout", reauth_idle_timeout)
if reauth_timeout is not None:
pulumi.set(__self__, "reauth_timeout", reauth_timeout)
if rule_order is not None:
pulumi.set(__self__, "rule_order", rule_order)
if zpn_inspection_profile_id is not None:
pulumi.set(__self__, "zpn_inspection_profile_id", zpn_inspection_profile_id)
@property
@pulumi.getter
def action(self) -> Optional[pulumi.Input[str]]:
"""
This is for providing the rule action.
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action", value)
@property
@pulumi.getter(name="actionId")
def action_id(self) -> Optional[pulumi.Input[str]]:
"""
This field defines the description of the server.
"""
return pulumi.get(self, "action_id")
@action_id.setter
def action_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action_id", value)
@property
@pulumi.getter(name="bypassDefaultRule")
def bypass_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "bypass_default_rule")
@bypass_default_rule.setter
def bypass_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "bypass_default_rule", value)
@property
@pulumi.getter
def conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessForwardingRuleConditionArgs']]]]:
"""
This is for proviidng the set of conditions for the policy.
"""
return pulumi.get(self, "conditions")
@conditions.setter
def conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessForwardingRuleConditionArgs']]]]):
pulumi.set(self, "conditions", value)
@property
@pulumi.getter(name="customMsg")
def custom_msg(self) -> Optional[pulumi.Input[str]]:
"""
This is for providing a customer message for the user.
"""
return pulumi.get(self, "custom_msg")
@custom_msg.setter
def custom_msg(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "custom_msg", value)
@property
@pulumi.getter(name="defaultRule")
def default_rule(self) -> Optional[pulumi.Input[bool]]:
"""
This is for providing a customer message for the user.
"""
return pulumi.get(self, "default_rule")
@default_rule.setter
def default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "default_rule", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
This is the description of the access policy.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="lssDefaultRule")
def lss_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "lss_default_rule")
@lss_default_rule.setter
def lss_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "lss_default_rule", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
This is the name of the policy.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def operator(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "operator")
@operator.setter
def operator(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "operator", value)
@property
@pulumi.getter(name="policySetId")
def policy_set_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "policy_set_id")
@policy_set_id.setter
def policy_set_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "policy_set_id", value)
@property
@pulumi.getter(name="policyType")
def policy_type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "policy_type")
@policy_type.setter
def policy_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "policy_type", value)
@property
@pulumi.getter
def priority(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "priority")
@priority.setter
def priority(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "priority", value)
@property
@pulumi.getter(name="reauthDefaultRule")
def reauth_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "reauth_default_rule")
@reauth_default_rule.setter
def reauth_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "reauth_default_rule", value)
@property
@pulumi.getter(name="reauthIdleTimeout")
def reauth_idle_timeout(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "reauth_idle_timeout")
@reauth_idle_timeout.setter
def reauth_idle_timeout(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "reauth_idle_timeout", value)
@property
@pulumi.getter(name="reauthTimeout")
def reauth_timeout(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "reauth_timeout")
@reauth_timeout.setter
def reauth_timeout(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "reauth_timeout", value)
@property
@pulumi.getter(name="ruleOrder")
def rule_order(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "rule_order")
@rule_order.setter
def rule_order(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "rule_order", value)
@property
@pulumi.getter(name="zpnInspectionProfileId")
def zpn_inspection_profile_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "zpn_inspection_profile_id")
@zpn_inspection_profile_id.setter
def zpn_inspection_profile_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "zpn_inspection_profile_id", value)
@pulumi.input_type
class _PolicyAccessForwardingRuleState:
def __init__(__self__, *,
action: Optional[pulumi.Input[str]] = None,
action_id: Optional[pulumi.Input[str]] = None,
bypass_default_rule: Optional[pulumi.Input[bool]] = None,
conditions: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessForwardingRuleConditionArgs']]]] = None,
custom_msg: Optional[pulumi.Input[str]] = None,
default_rule: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
lss_default_rule: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
operator: Optional[pulumi.Input[str]] = None,
policy_set_id: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[str]] = None,
reauth_default_rule: Optional[pulumi.Input[bool]] = None,
reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
reauth_timeout: Optional[pulumi.Input[str]] = None,
rule_order: Optional[pulumi.Input[str]] = None,
zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering PolicyAccessForwardingRule resources.
:param pulumi.Input[str] action: This is for providing the rule action.
:param pulumi.Input[str] action_id: This field defines the description of the server.
:param pulumi.Input[Sequence[pulumi.Input['PolicyAccessForwardingRuleConditionArgs']]] conditions: This is for proviidng the set of conditions for the policy.
:param pulumi.Input[str] custom_msg: This is for providing a customer message for the user.
:param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
:param pulumi.Input[str] description: This is the description of the access policy.
:param pulumi.Input[str] name: This is the name of the policy.
"""
if action is not None:
pulumi.set(__self__, "action", action)
if action_id is not None:
pulumi.set(__self__, "action_id", action_id)
if bypass_default_rule is not None:
pulumi.set(__self__, "bypass_default_rule", bypass_default_rule)
if conditions is not None:
pulumi.set(__self__, "conditions", conditions)
if custom_msg is not None:
pulumi.set(__self__, "custom_msg", custom_msg)
if default_rule is not None:
pulumi.set(__self__, "default_rule", default_rule)
if description is not None:
pulumi.set(__self__, "description", description)
if lss_default_rule is not None:
pulumi.set(__self__, "lss_default_rule", lss_default_rule)
if name is not None:
pulumi.set(__self__, "name", name)
if operator is not None:
pulumi.set(__self__, "operator", operator)
if policy_set_id is not None:
pulumi.set(__self__, "policy_set_id", policy_set_id)
if policy_type is not None:
pulumi.set(__self__, "policy_type", policy_type)
if priority is not None:
pulumi.set(__self__, "priority", priority)
if reauth_default_rule is not None:
pulumi.set(__self__, "reauth_default_rule", reauth_default_rule)
if reauth_idle_timeout is not None:
pulumi.set(__self__, "reauth_idle_timeout", reauth_idle_timeout)
if reauth_timeout is not None:
pulumi.set(__self__, "reauth_timeout", reauth_timeout)
if rule_order is not None:
pulumi.set(__self__, "rule_order", rule_order)
if zpn_inspection_profile_id is not None:
pulumi.set(__self__, "zpn_inspection_profile_id", zpn_inspection_profile_id)
@property
@pulumi.getter
def action(self) -> Optional[pulumi.Input[str]]:
"""
This is for providing the rule action.
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action", value)
@property
@pulumi.getter(name="actionId")
def action_id(self) -> Optional[pulumi.Input[str]]:
"""
This field defines the description of the server.
"""
return pulumi.get(self, "action_id")
@action_id.setter
def action_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action_id", value)
@property
@pulumi.getter(name="bypassDefaultRule")
def bypass_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "bypass_default_rule")
@bypass_default_rule.setter
def bypass_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "bypass_default_rule", value)
@property
@pulumi.getter
def conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessForwardingRuleConditionArgs']]]]:
"""
This is for proviidng the set of conditions for the policy.
"""
return pulumi.get(self, "conditions")
@conditions.setter
def conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessForwardingRuleConditionArgs']]]]):
pulumi.set(self, "conditions", value)
@property
@pulumi.getter(name="customMsg")
def custom_msg(self) -> Optional[pulumi.Input[str]]:
"""
This is for providing a customer message for the user.
"""
return pulumi.get(self, "custom_msg")
@custom_msg.setter
def custom_msg(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "custom_msg", value)
@property
@pulumi.getter(name="defaultRule")
def default_rule(self) -> Optional[pulumi.Input[bool]]:
"""
This is for providing a customer message for the user.
"""
return pulumi.get(self, "default_rule")
@default_rule.setter
def default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "default_rule", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
This is the description of the access policy.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="lssDefaultRule")
def lss_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "lss_default_rule")
@lss_default_rule.setter
def lss_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "lss_default_rule", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
This is the name of the policy.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def operator(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "operator")
@operator.setter
def operator(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "operator", value)
@property
@pulumi.getter(name="policySetId")
def policy_set_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "policy_set_id")
@policy_set_id.setter
def policy_set_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "policy_set_id", value)
@property
@pulumi.getter(name="policyType")
def policy_type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "policy_type")
@policy_type.setter
def policy_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "policy_type", value)
@property
@pulumi.getter
def priority(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "priority")
@priority.setter
def priority(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "priority", value)
@property
@pulumi.getter(name="reauthDefaultRule")
def reauth_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "reauth_default_rule")
@reauth_default_rule.setter
def reauth_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "reauth_default_rule", value)
@property
@pulumi.getter(name="reauthIdleTimeout")
def reauth_idle_timeout(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "reauth_idle_timeout")
@reauth_idle_timeout.setter
def reauth_idle_timeout(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "reauth_idle_timeout", value)
@property
@pulumi.getter(name="reauthTimeout")
def reauth_timeout(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "reauth_timeout")
@reauth_timeout.setter
def reauth_timeout(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "reauth_timeout", value)
@property
@pulumi.getter(name="ruleOrder")
def rule_order(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "rule_order")
@rule_order.setter
def rule_order(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "rule_order", value)
@property
@pulumi.getter(name="zpnInspectionProfileId")
def zpn_inspection_profile_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "zpn_inspection_profile_id")
@zpn_inspection_profile_id.setter
def zpn_inspection_profile_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "zpn_inspection_profile_id", value)
class PolicyAccessForwardingRule(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
action_id: Optional[pulumi.Input[str]] = None,
bypass_default_rule: Optional[pulumi.Input[bool]] = None,
conditions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessForwardingRuleConditionArgs']]]]] = None,
custom_msg: Optional[pulumi.Input[str]] = None,
default_rule: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
lss_default_rule: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
operator: Optional[pulumi.Input[str]] = None,
policy_set_id: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[str]] = None,
reauth_default_rule: Optional[pulumi.Input[bool]] = None,
reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
reauth_timeout: Optional[pulumi.Input[str]] = None,
rule_order: Optional[pulumi.Input[str]] = None,
zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Create a PolicyAccessForwardingRule resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] action: This is for providing the rule action.
:param pulumi.Input[str] action_id: This field defines the description of the server.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessForwardingRuleConditionArgs']]]] conditions: This is for proviidng the set of conditions for the policy.
:param pulumi.Input[str] custom_msg: This is for providing a customer message for the user.
:param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
:param pulumi.Input[str] description: This is the description of the access policy.
:param pulumi.Input[str] name: This is the name of the policy.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[PolicyAccessForwardingRuleArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Create a PolicyAccessForwardingRule resource with the given unique name, props, and options.
:param str resource_name: The name of the resource.
:param PolicyAccessForwardingRuleArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(PolicyAccessForwardingRuleArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
action_id: Optional[pulumi.Input[str]] = None,
bypass_default_rule: Optional[pulumi.Input[bool]] = None,
conditions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessForwardingRuleConditionArgs']]]]] = None,
custom_msg: Optional[pulumi.Input[str]] = None,
default_rule: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
lss_default_rule: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
operator: Optional[pulumi.Input[str]] = None,
policy_set_id: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[str]] = None,
reauth_default_rule: Optional[pulumi.Input[bool]] = None,
reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
reauth_timeout: Optional[pulumi.Input[str]] = None,
rule_order: Optional[pulumi.Input[str]] = None,
zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None,
__props__=None):
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = PolicyAccessForwardingRuleArgs.__new__(PolicyAccessForwardingRuleArgs)
__props__.__dict__["action"] = action
__props__.__dict__["action_id"] = action_id
__props__.__dict__["bypass_default_rule"] = bypass_default_rule
__props__.__dict__["conditions"] = conditions
__props__.__dict__["custom_msg"] = custom_msg
__props__.__dict__["default_rule"] = default_rule
__props__.__dict__["description"] = description
__props__.__dict__["lss_default_rule"] = lss_default_rule
__props__.__dict__["name"] = name
__props__.__dict__["operator"] = operator
__props__.__dict__["policy_set_id"] = policy_set_id
__props__.__dict__["policy_type"] = policy_type
__props__.__dict__["priority"] = priority
__props__.__dict__["reauth_default_rule"] = reauth_default_rule
__props__.__dict__["reauth_idle_timeout"] = reauth_idle_timeout
__props__.__dict__["reauth_timeout"] = reauth_timeout
__props__.__dict__["rule_order"] = rule_order
__props__.__dict__["zpn_inspection_profile_id"] = zpn_inspection_profile_id
super(PolicyAccessForwardingRule, __self__).__init__(
'zpa:ForwardPolicy/policyAccessForwardingRule:PolicyAccessForwardingRule',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
action_id: Optional[pulumi.Input[str]] = None,
bypass_default_rule: Optional[pulumi.Input[bool]] = None,
conditions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessForwardingRuleConditionArgs']]]]] = None,
custom_msg: Optional[pulumi.Input[str]] = None,
default_rule: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
lss_default_rule: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
operator: Optional[pulumi.Input[str]] = None,
policy_set_id: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[str]] = None,
reauth_default_rule: Optional[pulumi.Input[bool]] = None,
reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
reauth_timeout: Optional[pulumi.Input[str]] = None,
rule_order: Optional[pulumi.Input[str]] = None,
zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None) -> 'PolicyAccessForwardingRule':
"""
Get an existing PolicyAccessForwardingRule resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] action: This is for providing the rule action.
:param pulumi.Input[str] action_id: This field defines the description of the server.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessForwardingRuleConditionArgs']]]] conditions: This is for proviidng the set of conditions for the policy.
:param pulumi.Input[str] custom_msg: This is for providing a customer message for the user.
:param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
:param pulumi.Input[str] description: This is the description of the access policy.
:param pulumi.Input[str] name: This is the name of the policy.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _PolicyAccessForwardingRuleState.__new__(_PolicyAccessForwardingRuleState)
__props__.__dict__["action"] = action
__props__.__dict__["action_id"] = action_id
__props__.__dict__["bypass_default_rule"] = bypass_default_rule
__props__.__dict__["conditions"] = conditions
__props__.__dict__["custom_msg"] = custom_msg
__props__.__dict__["default_rule"] = default_rule
__props__.__dict__["description"] = description
__props__.__dict__["lss_default_rule"] = lss_default_rule
__props__.__dict__["name"] = name
__props__.__dict__["operator"] = operator
__props__.__dict__["policy_set_id"] = policy_set_id
__props__.__dict__["policy_type"] = policy_type
__props__.__dict__["priority"] = priority
__props__.__dict__["reauth_default_rule"] = reauth_default_rule
__props__.__dict__["reauth_idle_timeout"] = reauth_idle_timeout
__props__.__dict__["reauth_timeout"] = reauth_timeout
__props__.__dict__["rule_order"] = rule_order
__props__.__dict__["zpn_inspection_profile_id"] = zpn_inspection_profile_id
return PolicyAccessForwardingRule(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def action(self) -> pulumi.Output[Optional[str]]:
"""
This is for providing the rule action.
"""
return pulumi.get(self, "action")
@property
@pulumi.getter(name="actionId")
def action_id(self) -> pulumi.Output[Optional[str]]:
"""
This field defines the description of the server.
"""
return pulumi.get(self, "action_id")
@property
@pulumi.getter(name="bypassDefaultRule")
def bypass_default_rule(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "bypass_default_rule")
@property
@pulumi.getter
def conditions(self) -> pulumi.Output[Sequence['outputs.PolicyAccessForwardingRuleCondition']]:
"""
This is for proviidng the set of conditions for the policy.
"""
return pulumi.get(self, "conditions")
@property
@pulumi.getter(name="customMsg")
def custom_msg(self) -> pulumi.Output[Optional[str]]:
"""
This is for providing a customer message for the user.
"""
return pulumi.get(self, "custom_msg")
@property
@pulumi.getter(name="defaultRule")
def default_rule(self) -> pulumi.Output[Optional[bool]]:
"""
This is for providing a customer message for the user.
"""
return pulumi.get(self, "default_rule")
@property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
"""
This is the description of the access policy.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter(name="lssDefaultRule")
def lss_default_rule(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "lss_default_rule")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
This is the name of the policy.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def operator(self) -> pulumi.Output[str]:
return pulumi.get(self, "operator")
@property
@pulumi.getter(name="policySetId")
def policy_set_id(self) -> pulumi.Output[str]:
return pulumi.get(self, "policy_set_id")
@property
@pulumi.getter(name="policyType")
def policy_type(self) -> pulumi.Output[str]:
return pulumi.get(self, "policy_type")
@property
@pulumi.getter
def priority(self) -> pulumi.Output[str]:
return pulumi.get(self, "priority")
@property
@pulumi.getter(name="reauthDefaultRule")
def reauth_default_rule(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "reauth_default_rule")
@property
@pulumi.getter(name="reauthIdleTimeout")
def reauth_idle_timeout(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "reauth_idle_timeout")
@property
@pulumi.getter(name="reauthTimeout")
def reauth_timeout(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "reauth_timeout")
@property
@pulumi.getter(name="ruleOrder")
def rule_order(self) -> pulumi.Output[str]:
return pulumi.get(self, "rule_order")
@property
@pulumi.getter(name="zpnInspectionProfileId")
def zpn_inspection_profile_id(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "zpn_inspection_profile_id") | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/forwardpolicy/policy_access_forwarding_rule.py | policy_access_forwarding_rule.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *
__all__ = ['PolicyAccessRuleArgs', 'PolicyAccessRule']
@pulumi.input_type
class PolicyAccessRuleArgs:
def __init__(__self__, *,
action: Optional[pulumi.Input[str]] = None,
action_id: Optional[pulumi.Input[str]] = None,
app_connector_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]] = None,
app_server_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]] = None,
bypass_default_rule: Optional[pulumi.Input[bool]] = None,
conditions: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]] = None,
custom_msg: Optional[pulumi.Input[str]] = None,
default_rule: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
lss_default_rule: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
operator: Optional[pulumi.Input[str]] = None,
policy_set_id: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[str]] = None,
reauth_default_rule: Optional[pulumi.Input[bool]] = None,
reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
reauth_timeout: Optional[pulumi.Input[str]] = None,
rule_order: Optional[pulumi.Input[str]] = None,
zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a PolicyAccessRule resource.
:param pulumi.Input[str] action: (Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``
:param pulumi.Input[str] action_id: This field defines the description of the server.
:param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]] app_connector_groups: List of app-connector IDs.
:param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]] app_server_groups: List of the server group IDs.
:param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]] conditions: (Optional)
:param pulumi.Input[str] custom_msg: (Optional) This is for providing a customer message for the user.
:param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
:param pulumi.Input[str] description: (Optional) This is the description of the access policy rule.
:param pulumi.Input[str] name: (Optional)
:param pulumi.Input[str] operator: (Optional) Supported values: ``AND``, and ``OR``
:param pulumi.Input[str] policy_type: (Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
:param pulumi.Input[str] rule_order: (Optional)
"""
if action is not None:
pulumi.set(__self__, "action", action)
if action_id is not None:
pulumi.set(__self__, "action_id", action_id)
if app_connector_groups is not None:
pulumi.set(__self__, "app_connector_groups", app_connector_groups)
if app_server_groups is not None:
pulumi.set(__self__, "app_server_groups", app_server_groups)
if bypass_default_rule is not None:
pulumi.set(__self__, "bypass_default_rule", bypass_default_rule)
if conditions is not None:
pulumi.set(__self__, "conditions", conditions)
if custom_msg is not None:
pulumi.set(__self__, "custom_msg", custom_msg)
if default_rule is not None:
pulumi.set(__self__, "default_rule", default_rule)
if description is not None:
pulumi.set(__self__, "description", description)
if lss_default_rule is not None:
pulumi.set(__self__, "lss_default_rule", lss_default_rule)
if name is not None:
pulumi.set(__self__, "name", name)
if operator is not None:
pulumi.set(__self__, "operator", operator)
if policy_set_id is not None:
pulumi.set(__self__, "policy_set_id", policy_set_id)
if policy_type is not None:
pulumi.set(__self__, "policy_type", policy_type)
if priority is not None:
pulumi.set(__self__, "priority", priority)
if reauth_default_rule is not None:
pulumi.set(__self__, "reauth_default_rule", reauth_default_rule)
if reauth_idle_timeout is not None:
pulumi.set(__self__, "reauth_idle_timeout", reauth_idle_timeout)
if reauth_timeout is not None:
pulumi.set(__self__, "reauth_timeout", reauth_timeout)
if rule_order is not None:
pulumi.set(__self__, "rule_order", rule_order)
if zpn_inspection_profile_id is not None:
pulumi.set(__self__, "zpn_inspection_profile_id", zpn_inspection_profile_id)
@property
@pulumi.getter
def action(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action", value)
@property
@pulumi.getter(name="actionId")
def action_id(self) -> Optional[pulumi.Input[str]]:
"""
This field defines the description of the server.
"""
return pulumi.get(self, "action_id")
@action_id.setter
def action_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action_id", value)
@property
@pulumi.getter(name="appConnectorGroups")
def app_connector_groups(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]]:
"""
List of app-connector IDs.
"""
return pulumi.get(self, "app_connector_groups")
@app_connector_groups.setter
def app_connector_groups(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]]):
pulumi.set(self, "app_connector_groups", value)
@property
@pulumi.getter(name="appServerGroups")
def app_server_groups(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]]:
"""
List of the server group IDs.
"""
return pulumi.get(self, "app_server_groups")
@app_server_groups.setter
def app_server_groups(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]]):
pulumi.set(self, "app_server_groups", value)
@property
@pulumi.getter(name="bypassDefaultRule")
def bypass_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "bypass_default_rule")
@bypass_default_rule.setter
def bypass_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "bypass_default_rule", value)
@property
@pulumi.getter
def conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]]:
"""
(Optional)
"""
return pulumi.get(self, "conditions")
@conditions.setter
def conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]]):
pulumi.set(self, "conditions", value)
@property
@pulumi.getter(name="customMsg")
def custom_msg(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) This is for providing a customer message for the user.
"""
return pulumi.get(self, "custom_msg")
@custom_msg.setter
def custom_msg(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "custom_msg", value)
@property
@pulumi.getter(name="defaultRule")
def default_rule(self) -> Optional[pulumi.Input[bool]]:
"""
This is for providing a customer message for the user.
"""
return pulumi.get(self, "default_rule")
@default_rule.setter
def default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "default_rule", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) This is the description of the access policy rule.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="lssDefaultRule")
def lss_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "lss_default_rule")
@lss_default_rule.setter
def lss_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "lss_default_rule", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
(Optional)
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def operator(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) Supported values: ``AND``, and ``OR``
"""
return pulumi.get(self, "operator")
@operator.setter
def operator(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "operator", value)
@property
@pulumi.getter(name="policySetId")
def policy_set_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "policy_set_id")
@policy_set_id.setter
def policy_set_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "policy_set_id", value)
@property
@pulumi.getter(name="policyType")
def policy_type(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
"""
return pulumi.get(self, "policy_type")
@policy_type.setter
def policy_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "policy_type", value)
@property
@pulumi.getter
def priority(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "priority")
@priority.setter
def priority(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "priority", value)
@property
@pulumi.getter(name="reauthDefaultRule")
def reauth_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "reauth_default_rule")
@reauth_default_rule.setter
def reauth_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "reauth_default_rule", value)
@property
@pulumi.getter(name="reauthIdleTimeout")
def reauth_idle_timeout(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "reauth_idle_timeout")
@reauth_idle_timeout.setter
def reauth_idle_timeout(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "reauth_idle_timeout", value)
@property
@pulumi.getter(name="reauthTimeout")
def reauth_timeout(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "reauth_timeout")
@reauth_timeout.setter
def reauth_timeout(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "reauth_timeout", value)
@property
@pulumi.getter(name="ruleOrder")
def rule_order(self) -> Optional[pulumi.Input[str]]:
"""
(Optional)
"""
return pulumi.get(self, "rule_order")
@rule_order.setter
def rule_order(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "rule_order", value)
@property
@pulumi.getter(name="zpnInspectionProfileId")
def zpn_inspection_profile_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "zpn_inspection_profile_id")
@zpn_inspection_profile_id.setter
def zpn_inspection_profile_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "zpn_inspection_profile_id", value)
@pulumi.input_type
class _PolicyAccessRuleState:
def __init__(__self__, *,
action: Optional[pulumi.Input[str]] = None,
action_id: Optional[pulumi.Input[str]] = None,
app_connector_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]] = None,
app_server_groups: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]] = None,
bypass_default_rule: Optional[pulumi.Input[bool]] = None,
conditions: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]] = None,
custom_msg: Optional[pulumi.Input[str]] = None,
default_rule: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
lss_default_rule: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
operator: Optional[pulumi.Input[str]] = None,
policy_set_id: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[str]] = None,
reauth_default_rule: Optional[pulumi.Input[bool]] = None,
reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
reauth_timeout: Optional[pulumi.Input[str]] = None,
rule_order: Optional[pulumi.Input[str]] = None,
zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering PolicyAccessRule resources.
:param pulumi.Input[str] action: (Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``
:param pulumi.Input[str] action_id: This field defines the description of the server.
:param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]] app_connector_groups: List of app-connector IDs.
:param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]] app_server_groups: List of the server group IDs.
:param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]] conditions: (Optional)
:param pulumi.Input[str] custom_msg: (Optional) This is for providing a customer message for the user.
:param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
:param pulumi.Input[str] description: (Optional) This is the description of the access policy rule.
:param pulumi.Input[str] name: (Optional)
:param pulumi.Input[str] operator: (Optional) Supported values: ``AND``, and ``OR``
:param pulumi.Input[str] policy_type: (Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
:param pulumi.Input[str] rule_order: (Optional)
"""
if action is not None:
pulumi.set(__self__, "action", action)
if action_id is not None:
pulumi.set(__self__, "action_id", action_id)
if app_connector_groups is not None:
pulumi.set(__self__, "app_connector_groups", app_connector_groups)
if app_server_groups is not None:
pulumi.set(__self__, "app_server_groups", app_server_groups)
if bypass_default_rule is not None:
pulumi.set(__self__, "bypass_default_rule", bypass_default_rule)
if conditions is not None:
pulumi.set(__self__, "conditions", conditions)
if custom_msg is not None:
pulumi.set(__self__, "custom_msg", custom_msg)
if default_rule is not None:
pulumi.set(__self__, "default_rule", default_rule)
if description is not None:
pulumi.set(__self__, "description", description)
if lss_default_rule is not None:
pulumi.set(__self__, "lss_default_rule", lss_default_rule)
if name is not None:
pulumi.set(__self__, "name", name)
if operator is not None:
pulumi.set(__self__, "operator", operator)
if policy_set_id is not None:
pulumi.set(__self__, "policy_set_id", policy_set_id)
if policy_type is not None:
pulumi.set(__self__, "policy_type", policy_type)
if priority is not None:
pulumi.set(__self__, "priority", priority)
if reauth_default_rule is not None:
pulumi.set(__self__, "reauth_default_rule", reauth_default_rule)
if reauth_idle_timeout is not None:
pulumi.set(__self__, "reauth_idle_timeout", reauth_idle_timeout)
if reauth_timeout is not None:
pulumi.set(__self__, "reauth_timeout", reauth_timeout)
if rule_order is not None:
pulumi.set(__self__, "rule_order", rule_order)
if zpn_inspection_profile_id is not None:
pulumi.set(__self__, "zpn_inspection_profile_id", zpn_inspection_profile_id)
@property
@pulumi.getter
def action(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``
"""
return pulumi.get(self, "action")
@action.setter
def action(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action", value)
@property
@pulumi.getter(name="actionId")
def action_id(self) -> Optional[pulumi.Input[str]]:
"""
This field defines the description of the server.
"""
return pulumi.get(self, "action_id")
@action_id.setter
def action_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "action_id", value)
@property
@pulumi.getter(name="appConnectorGroups")
def app_connector_groups(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]]:
"""
List of app-connector IDs.
"""
return pulumi.get(self, "app_connector_groups")
@app_connector_groups.setter
def app_connector_groups(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppConnectorGroupArgs']]]]):
pulumi.set(self, "app_connector_groups", value)
@property
@pulumi.getter(name="appServerGroups")
def app_server_groups(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]]:
"""
List of the server group IDs.
"""
return pulumi.get(self, "app_server_groups")
@app_server_groups.setter
def app_server_groups(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleAppServerGroupArgs']]]]):
pulumi.set(self, "app_server_groups", value)
@property
@pulumi.getter(name="bypassDefaultRule")
def bypass_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "bypass_default_rule")
@bypass_default_rule.setter
def bypass_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "bypass_default_rule", value)
@property
@pulumi.getter
def conditions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]]:
"""
(Optional)
"""
return pulumi.get(self, "conditions")
@conditions.setter
def conditions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionArgs']]]]):
pulumi.set(self, "conditions", value)
@property
@pulumi.getter(name="customMsg")
def custom_msg(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) This is for providing a customer message for the user.
"""
return pulumi.get(self, "custom_msg")
@custom_msg.setter
def custom_msg(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "custom_msg", value)
@property
@pulumi.getter(name="defaultRule")
def default_rule(self) -> Optional[pulumi.Input[bool]]:
"""
This is for providing a customer message for the user.
"""
return pulumi.get(self, "default_rule")
@default_rule.setter
def default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "default_rule", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) This is the description of the access policy rule.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter(name="lssDefaultRule")
def lss_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "lss_default_rule")
@lss_default_rule.setter
def lss_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "lss_default_rule", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
(Optional)
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def operator(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) Supported values: ``AND``, and ``OR``
"""
return pulumi.get(self, "operator")
@operator.setter
def operator(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "operator", value)
@property
@pulumi.getter(name="policySetId")
def policy_set_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "policy_set_id")
@policy_set_id.setter
def policy_set_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "policy_set_id", value)
@property
@pulumi.getter(name="policyType")
def policy_type(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
"""
return pulumi.get(self, "policy_type")
@policy_type.setter
def policy_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "policy_type", value)
@property
@pulumi.getter
def priority(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "priority")
@priority.setter
def priority(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "priority", value)
@property
@pulumi.getter(name="reauthDefaultRule")
def reauth_default_rule(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "reauth_default_rule")
@reauth_default_rule.setter
def reauth_default_rule(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "reauth_default_rule", value)
@property
@pulumi.getter(name="reauthIdleTimeout")
def reauth_idle_timeout(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "reauth_idle_timeout")
@reauth_idle_timeout.setter
def reauth_idle_timeout(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "reauth_idle_timeout", value)
@property
@pulumi.getter(name="reauthTimeout")
def reauth_timeout(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "reauth_timeout")
@reauth_timeout.setter
def reauth_timeout(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "reauth_timeout", value)
@property
@pulumi.getter(name="ruleOrder")
def rule_order(self) -> Optional[pulumi.Input[str]]:
"""
(Optional)
"""
return pulumi.get(self, "rule_order")
@rule_order.setter
def rule_order(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "rule_order", value)
@property
@pulumi.getter(name="zpnInspectionProfileId")
def zpn_inspection_profile_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "zpn_inspection_profile_id")
@zpn_inspection_profile_id.setter
def zpn_inspection_profile_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "zpn_inspection_profile_id", value)
class PolicyAccessRule(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
action_id: Optional[pulumi.Input[str]] = None,
app_connector_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppConnectorGroupArgs']]]]] = None,
app_server_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppServerGroupArgs']]]]] = None,
bypass_default_rule: Optional[pulumi.Input[bool]] = None,
conditions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleConditionArgs']]]]] = None,
custom_msg: Optional[pulumi.Input[str]] = None,
default_rule: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
lss_default_rule: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
operator: Optional[pulumi.Input[str]] = None,
policy_set_id: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[str]] = None,
reauth_default_rule: Optional[pulumi.Input[bool]] = None,
reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
reauth_timeout: Optional[pulumi.Input[str]] = None,
rule_order: Optional[pulumi.Input[str]] = None,
zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
## Import
Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language. [Visit](https://github.com/zscaler/zscaler-terraformer) Policy access rule can be imported by using `<POLICY ACCESS RULE ID>` as the import ID. For example
```sh
$ pulumi import zpa:AccessPolicy/policyAccessRule:PolicyAccessRule example <policy_access_rule_id>
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] action: (Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``
:param pulumi.Input[str] action_id: This field defines the description of the server.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppConnectorGroupArgs']]]] app_connector_groups: List of app-connector IDs.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppServerGroupArgs']]]] app_server_groups: List of the server group IDs.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleConditionArgs']]]] conditions: (Optional)
:param pulumi.Input[str] custom_msg: (Optional) This is for providing a customer message for the user.
:param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
:param pulumi.Input[str] description: (Optional) This is the description of the access policy rule.
:param pulumi.Input[str] name: (Optional)
:param pulumi.Input[str] operator: (Optional) Supported values: ``AND``, and ``OR``
:param pulumi.Input[str] policy_type: (Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
:param pulumi.Input[str] rule_order: (Optional)
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[PolicyAccessRuleArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
## Import
Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language. [Visit](https://github.com/zscaler/zscaler-terraformer) Policy access rule can be imported by using `<POLICY ACCESS RULE ID>` as the import ID. For example
```sh
$ pulumi import zpa:AccessPolicy/policyAccessRule:PolicyAccessRule example <policy_access_rule_id>
```
:param str resource_name: The name of the resource.
:param PolicyAccessRuleArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(PolicyAccessRuleArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
action_id: Optional[pulumi.Input[str]] = None,
app_connector_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppConnectorGroupArgs']]]]] = None,
app_server_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppServerGroupArgs']]]]] = None,
bypass_default_rule: Optional[pulumi.Input[bool]] = None,
conditions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleConditionArgs']]]]] = None,
custom_msg: Optional[pulumi.Input[str]] = None,
default_rule: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
lss_default_rule: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
operator: Optional[pulumi.Input[str]] = None,
policy_set_id: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[str]] = None,
reauth_default_rule: Optional[pulumi.Input[bool]] = None,
reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
reauth_timeout: Optional[pulumi.Input[str]] = None,
rule_order: Optional[pulumi.Input[str]] = None,
zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None,
__props__=None):
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = PolicyAccessRuleArgs.__new__(PolicyAccessRuleArgs)
__props__.__dict__["action"] = action
__props__.__dict__["action_id"] = action_id
__props__.__dict__["app_connector_groups"] = app_connector_groups
__props__.__dict__["app_server_groups"] = app_server_groups
__props__.__dict__["bypass_default_rule"] = bypass_default_rule
__props__.__dict__["conditions"] = conditions
__props__.__dict__["custom_msg"] = custom_msg
__props__.__dict__["default_rule"] = default_rule
__props__.__dict__["description"] = description
__props__.__dict__["lss_default_rule"] = lss_default_rule
__props__.__dict__["name"] = name
__props__.__dict__["operator"] = operator
__props__.__dict__["policy_set_id"] = policy_set_id
__props__.__dict__["policy_type"] = policy_type
__props__.__dict__["priority"] = priority
__props__.__dict__["reauth_default_rule"] = reauth_default_rule
__props__.__dict__["reauth_idle_timeout"] = reauth_idle_timeout
__props__.__dict__["reauth_timeout"] = reauth_timeout
__props__.__dict__["rule_order"] = rule_order
__props__.__dict__["zpn_inspection_profile_id"] = zpn_inspection_profile_id
super(PolicyAccessRule, __self__).__init__(
'zpa:AccessPolicy/policyAccessRule:PolicyAccessRule',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
action: Optional[pulumi.Input[str]] = None,
action_id: Optional[pulumi.Input[str]] = None,
app_connector_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppConnectorGroupArgs']]]]] = None,
app_server_groups: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppServerGroupArgs']]]]] = None,
bypass_default_rule: Optional[pulumi.Input[bool]] = None,
conditions: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleConditionArgs']]]]] = None,
custom_msg: Optional[pulumi.Input[str]] = None,
default_rule: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
lss_default_rule: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
operator: Optional[pulumi.Input[str]] = None,
policy_set_id: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
priority: Optional[pulumi.Input[str]] = None,
reauth_default_rule: Optional[pulumi.Input[bool]] = None,
reauth_idle_timeout: Optional[pulumi.Input[str]] = None,
reauth_timeout: Optional[pulumi.Input[str]] = None,
rule_order: Optional[pulumi.Input[str]] = None,
zpn_inspection_profile_id: Optional[pulumi.Input[str]] = None) -> 'PolicyAccessRule':
"""
Get an existing PolicyAccessRule resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] action: (Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``
:param pulumi.Input[str] action_id: This field defines the description of the server.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppConnectorGroupArgs']]]] app_connector_groups: List of app-connector IDs.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleAppServerGroupArgs']]]] app_server_groups: List of the server group IDs.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PolicyAccessRuleConditionArgs']]]] conditions: (Optional)
:param pulumi.Input[str] custom_msg: (Optional) This is for providing a customer message for the user.
:param pulumi.Input[bool] default_rule: This is for providing a customer message for the user.
:param pulumi.Input[str] description: (Optional) This is the description of the access policy rule.
:param pulumi.Input[str] name: (Optional)
:param pulumi.Input[str] operator: (Optional) Supported values: ``AND``, and ``OR``
:param pulumi.Input[str] policy_type: (Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
:param pulumi.Input[str] rule_order: (Optional)
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _PolicyAccessRuleState.__new__(_PolicyAccessRuleState)
__props__.__dict__["action"] = action
__props__.__dict__["action_id"] = action_id
__props__.__dict__["app_connector_groups"] = app_connector_groups
__props__.__dict__["app_server_groups"] = app_server_groups
__props__.__dict__["bypass_default_rule"] = bypass_default_rule
__props__.__dict__["conditions"] = conditions
__props__.__dict__["custom_msg"] = custom_msg
__props__.__dict__["default_rule"] = default_rule
__props__.__dict__["description"] = description
__props__.__dict__["lss_default_rule"] = lss_default_rule
__props__.__dict__["name"] = name
__props__.__dict__["operator"] = operator
__props__.__dict__["policy_set_id"] = policy_set_id
__props__.__dict__["policy_type"] = policy_type
__props__.__dict__["priority"] = priority
__props__.__dict__["reauth_default_rule"] = reauth_default_rule
__props__.__dict__["reauth_idle_timeout"] = reauth_idle_timeout
__props__.__dict__["reauth_timeout"] = reauth_timeout
__props__.__dict__["rule_order"] = rule_order
__props__.__dict__["zpn_inspection_profile_id"] = zpn_inspection_profile_id
return PolicyAccessRule(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def action(self) -> pulumi.Output[Optional[str]]:
"""
(Optional) This is for providing the rule action. Supported values: ``ALLOW``, ``DENY``
"""
return pulumi.get(self, "action")
@property
@pulumi.getter(name="actionId")
def action_id(self) -> pulumi.Output[Optional[str]]:
"""
This field defines the description of the server.
"""
return pulumi.get(self, "action_id")
@property
@pulumi.getter(name="appConnectorGroups")
def app_connector_groups(self) -> pulumi.Output[Sequence['outputs.PolicyAccessRuleAppConnectorGroup']]:
"""
List of app-connector IDs.
"""
return pulumi.get(self, "app_connector_groups")
@property
@pulumi.getter(name="appServerGroups")
def app_server_groups(self) -> pulumi.Output[Sequence['outputs.PolicyAccessRuleAppServerGroup']]:
"""
List of the server group IDs.
"""
return pulumi.get(self, "app_server_groups")
@property
@pulumi.getter(name="bypassDefaultRule")
def bypass_default_rule(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "bypass_default_rule")
@property
@pulumi.getter
def conditions(self) -> pulumi.Output[Sequence['outputs.PolicyAccessRuleCondition']]:
"""
(Optional)
"""
return pulumi.get(self, "conditions")
@property
@pulumi.getter(name="customMsg")
def custom_msg(self) -> pulumi.Output[Optional[str]]:
"""
(Optional) This is for providing a customer message for the user.
"""
return pulumi.get(self, "custom_msg")
@property
@pulumi.getter(name="defaultRule")
def default_rule(self) -> pulumi.Output[Optional[bool]]:
"""
This is for providing a customer message for the user.
"""
return pulumi.get(self, "default_rule")
@property
@pulumi.getter
def description(self) -> pulumi.Output[Optional[str]]:
"""
(Optional) This is the description of the access policy rule.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter(name="lssDefaultRule")
def lss_default_rule(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "lss_default_rule")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
(Optional)
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def operator(self) -> pulumi.Output[str]:
"""
(Optional) Supported values: ``AND``, and ``OR``
"""
return pulumi.get(self, "operator")
@property
@pulumi.getter(name="policySetId")
def policy_set_id(self) -> pulumi.Output[str]:
return pulumi.get(self, "policy_set_id")
@property
@pulumi.getter(name="policyType")
def policy_type(self) -> pulumi.Output[str]:
"""
(Optional) Supported values: ``ACCESS_POLICY`` or ``GLOBAL_POLICY``
"""
return pulumi.get(self, "policy_type")
@property
@pulumi.getter
def priority(self) -> pulumi.Output[str]:
return pulumi.get(self, "priority")
@property
@pulumi.getter(name="reauthDefaultRule")
def reauth_default_rule(self) -> pulumi.Output[Optional[bool]]:
return pulumi.get(self, "reauth_default_rule")
@property
@pulumi.getter(name="reauthIdleTimeout")
def reauth_idle_timeout(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "reauth_idle_timeout")
@property
@pulumi.getter(name="reauthTimeout")
def reauth_timeout(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "reauth_timeout")
@property
@pulumi.getter(name="ruleOrder")
def rule_order(self) -> pulumi.Output[str]:
"""
(Optional)
"""
return pulumi.get(self, "rule_order")
@property
@pulumi.getter(name="zpnInspectionProfileId")
def zpn_inspection_profile_id(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "zpn_inspection_profile_id") | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/accesspolicy/policy_access_rule.py | policy_access_rule.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'PolicyAccessRuleAppConnectorGroupArgs',
'PolicyAccessRuleAppServerGroupArgs',
'PolicyAccessRuleConditionArgs',
'PolicyAccessRuleConditionOperandArgs',
]
@pulumi.input_type
class PolicyAccessRuleAppConnectorGroupArgs:
def __init__(__self__, *,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
"""
:param pulumi.Input[Sequence[pulumi.Input[str]]] ids: (Optional) The ID of a server group resource
"""
if ids is not None:
pulumi.set(__self__, "ids", ids)
@property
@pulumi.getter
def ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
(Optional) The ID of a server group resource
"""
return pulumi.get(self, "ids")
@ids.setter
def ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "ids", value)
@pulumi.input_type
class PolicyAccessRuleAppServerGroupArgs:
def __init__(__self__, *,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
"""
:param pulumi.Input[Sequence[pulumi.Input[str]]] ids: (Optional) The ID of a server group resource
"""
if ids is not None:
pulumi.set(__self__, "ids", ids)
@property
@pulumi.getter
def ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
(Optional) The ID of a server group resource
"""
return pulumi.get(self, "ids")
@ids.setter
def ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "ids", value)
@pulumi.input_type
class PolicyAccessRuleConditionArgs:
def __init__(__self__, *,
operator: pulumi.Input[str],
id: Optional[pulumi.Input[str]] = None,
negated: Optional[pulumi.Input[bool]] = None,
operands: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionOperandArgs']]]] = None):
"""
:param pulumi.Input[str] operator: (Optional) Supported values: ``AND``, and ``OR``
:param pulumi.Input[str] id: (Optional) The ID of a server group resource
:param pulumi.Input[bool] negated: (Optional) Supported values: ``true`` or ``false``
:param pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionOperandArgs']]] operands: (Optional) - Operands block must be repeated if multiple per `object_type` conditions are to be added to the rule.
"""
pulumi.set(__self__, "operator", operator)
if id is not None:
pulumi.set(__self__, "id", id)
if negated is not None:
pulumi.set(__self__, "negated", negated)
if operands is not None:
pulumi.set(__self__, "operands", operands)
@property
@pulumi.getter
def operator(self) -> pulumi.Input[str]:
"""
(Optional) Supported values: ``AND``, and ``OR``
"""
return pulumi.get(self, "operator")
@operator.setter
def operator(self, value: pulumi.Input[str]):
pulumi.set(self, "operator", value)
@property
@pulumi.getter
def id(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) The ID of a server group resource
"""
return pulumi.get(self, "id")
@id.setter
def id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "id", value)
@property
@pulumi.getter
def negated(self) -> Optional[pulumi.Input[bool]]:
"""
(Optional) Supported values: ``true`` or ``false``
"""
return pulumi.get(self, "negated")
@negated.setter
def negated(self, value: Optional[pulumi.Input[bool]]):
pulumi.set(self, "negated", value)
@property
@pulumi.getter
def operands(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionOperandArgs']]]]:
"""
(Optional) - Operands block must be repeated if multiple per `object_type` conditions are to be added to the rule.
"""
return pulumi.get(self, "operands")
@operands.setter
def operands(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PolicyAccessRuleConditionOperandArgs']]]]):
pulumi.set(self, "operands", value)
@pulumi.input_type
class PolicyAccessRuleConditionOperandArgs:
def __init__(__self__, *,
lhs: pulumi.Input[str],
object_type: pulumi.Input[str],
id: Optional[pulumi.Input[str]] = None,
idp_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
rhs: Optional[pulumi.Input[str]] = None,
rhs_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
"""
:param pulumi.Input[str] lhs: (Optional) LHS must always carry the string value ``id`` or the attribute ID of the resource being associated with the rule.
:param pulumi.Input[str] object_type: (Optional) This is for specifying the policy critiera. Supported values: `APP`, `APP_GROUP`, `SAML`, `IDP`, `CLIENT_TYPE`, `TRUSTED_NETWORK`, `POSTURE`, `SCIM`, `SCIM_GROUP`, and `CLOUD_CONNECTOR_GROUP`. `TRUSTED_NETWORK`, and `CLIENT_TYPE`.
:param pulumi.Input[str] id: (Optional) The ID of a server group resource
:param pulumi.Input[str] idp_id: (Optional)
:param pulumi.Input[str] name: (Optional)
:param pulumi.Input[str] rhs: (Optional) RHS is either the ID attribute of a resource or fixed string value. Refer to the chart below for further details.
"""
pulumi.set(__self__, "lhs", lhs)
pulumi.set(__self__, "object_type", object_type)
if id is not None:
pulumi.set(__self__, "id", id)
if idp_id is not None:
pulumi.set(__self__, "idp_id", idp_id)
if name is not None:
pulumi.set(__self__, "name", name)
if rhs is not None:
pulumi.set(__self__, "rhs", rhs)
if rhs_lists is not None:
pulumi.set(__self__, "rhs_lists", rhs_lists)
@property
@pulumi.getter
def lhs(self) -> pulumi.Input[str]:
"""
(Optional) LHS must always carry the string value ``id`` or the attribute ID of the resource being associated with the rule.
"""
return pulumi.get(self, "lhs")
@lhs.setter
def lhs(self, value: pulumi.Input[str]):
pulumi.set(self, "lhs", value)
@property
@pulumi.getter(name="objectType")
def object_type(self) -> pulumi.Input[str]:
"""
(Optional) This is for specifying the policy critiera. Supported values: `APP`, `APP_GROUP`, `SAML`, `IDP`, `CLIENT_TYPE`, `TRUSTED_NETWORK`, `POSTURE`, `SCIM`, `SCIM_GROUP`, and `CLOUD_CONNECTOR_GROUP`. `TRUSTED_NETWORK`, and `CLIENT_TYPE`.
"""
return pulumi.get(self, "object_type")
@object_type.setter
def object_type(self, value: pulumi.Input[str]):
pulumi.set(self, "object_type", value)
@property
@pulumi.getter
def id(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) The ID of a server group resource
"""
return pulumi.get(self, "id")
@id.setter
def id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "id", value)
@property
@pulumi.getter(name="idpId")
def idp_id(self) -> Optional[pulumi.Input[str]]:
"""
(Optional)
"""
return pulumi.get(self, "idp_id")
@idp_id.setter
def idp_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "idp_id", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
(Optional)
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def rhs(self) -> Optional[pulumi.Input[str]]:
"""
(Optional) RHS is either the ID attribute of a resource or fixed string value. Refer to the chart below for further details.
"""
return pulumi.get(self, "rhs")
@rhs.setter
def rhs(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "rhs", value)
@property
@pulumi.getter(name="rhsLists")
def rhs_lists(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
return pulumi.get(self, "rhs_lists")
@rhs_lists.setter
def rhs_lists(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "rhs_lists", value) | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/accesspolicy/_inputs.py | _inputs.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'PolicyAccessRuleAppConnectorGroup',
'PolicyAccessRuleAppServerGroup',
'PolicyAccessRuleCondition',
'PolicyAccessRuleConditionOperand',
]
@pulumi.output_type
class PolicyAccessRuleAppConnectorGroup(dict):
def __init__(__self__, *,
ids: Optional[Sequence[str]] = None):
"""
:param Sequence[str] ids: (Optional) The ID of a server group resource
"""
if ids is not None:
pulumi.set(__self__, "ids", ids)
@property
@pulumi.getter
def ids(self) -> Optional[Sequence[str]]:
"""
(Optional) The ID of a server group resource
"""
return pulumi.get(self, "ids")
@pulumi.output_type
class PolicyAccessRuleAppServerGroup(dict):
def __init__(__self__, *,
ids: Optional[Sequence[str]] = None):
"""
:param Sequence[str] ids: (Optional) The ID of a server group resource
"""
if ids is not None:
pulumi.set(__self__, "ids", ids)
@property
@pulumi.getter
def ids(self) -> Optional[Sequence[str]]:
"""
(Optional) The ID of a server group resource
"""
return pulumi.get(self, "ids")
@pulumi.output_type
class PolicyAccessRuleCondition(dict):
def __init__(__self__, *,
operator: str,
id: Optional[str] = None,
negated: Optional[bool] = None,
operands: Optional[Sequence['outputs.PolicyAccessRuleConditionOperand']] = None):
"""
:param str operator: (Optional) Supported values: ``AND``, and ``OR``
:param str id: (Optional) The ID of a server group resource
:param bool negated: (Optional) Supported values: ``true`` or ``false``
:param Sequence['PolicyAccessRuleConditionOperandArgs'] operands: (Optional) - Operands block must be repeated if multiple per `object_type` conditions are to be added to the rule.
"""
pulumi.set(__self__, "operator", operator)
if id is not None:
pulumi.set(__self__, "id", id)
if negated is not None:
pulumi.set(__self__, "negated", negated)
if operands is not None:
pulumi.set(__self__, "operands", operands)
@property
@pulumi.getter
def operator(self) -> str:
"""
(Optional) Supported values: ``AND``, and ``OR``
"""
return pulumi.get(self, "operator")
@property
@pulumi.getter
def id(self) -> Optional[str]:
"""
(Optional) The ID of a server group resource
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def negated(self) -> Optional[bool]:
"""
(Optional) Supported values: ``true`` or ``false``
"""
return pulumi.get(self, "negated")
@property
@pulumi.getter
def operands(self) -> Optional[Sequence['outputs.PolicyAccessRuleConditionOperand']]:
"""
(Optional) - Operands block must be repeated if multiple per `object_type` conditions are to be added to the rule.
"""
return pulumi.get(self, "operands")
@pulumi.output_type
class PolicyAccessRuleConditionOperand(dict):
@staticmethod
def __key_warning(key: str):
suggest = None
if key == "objectType":
suggest = "object_type"
elif key == "idpId":
suggest = "idp_id"
elif key == "rhsLists":
suggest = "rhs_lists"
if suggest:
pulumi.log.warn(f"Key '{key}' not found in PolicyAccessRuleConditionOperand. Access the value via the '{suggest}' property getter instead.")
def __getitem__(self, key: str) -> Any:
PolicyAccessRuleConditionOperand.__key_warning(key)
return super().__getitem__(key)
def get(self, key: str, default = None) -> Any:
PolicyAccessRuleConditionOperand.__key_warning(key)
return super().get(key, default)
def __init__(__self__, *,
lhs: str,
object_type: str,
id: Optional[str] = None,
idp_id: Optional[str] = None,
name: Optional[str] = None,
rhs: Optional[str] = None,
rhs_lists: Optional[Sequence[str]] = None):
"""
:param str lhs: (Optional) LHS must always carry the string value ``id`` or the attribute ID of the resource being associated with the rule.
:param str object_type: (Optional) This is for specifying the policy critiera. Supported values: `APP`, `APP_GROUP`, `SAML`, `IDP`, `CLIENT_TYPE`, `TRUSTED_NETWORK`, `POSTURE`, `SCIM`, `SCIM_GROUP`, and `CLOUD_CONNECTOR_GROUP`. `TRUSTED_NETWORK`, and `CLIENT_TYPE`.
:param str id: (Optional) The ID of a server group resource
:param str idp_id: (Optional)
:param str name: (Optional)
:param str rhs: (Optional) RHS is either the ID attribute of a resource or fixed string value. Refer to the chart below for further details.
"""
pulumi.set(__self__, "lhs", lhs)
pulumi.set(__self__, "object_type", object_type)
if id is not None:
pulumi.set(__self__, "id", id)
if idp_id is not None:
pulumi.set(__self__, "idp_id", idp_id)
if name is not None:
pulumi.set(__self__, "name", name)
if rhs is not None:
pulumi.set(__self__, "rhs", rhs)
if rhs_lists is not None:
pulumi.set(__self__, "rhs_lists", rhs_lists)
@property
@pulumi.getter
def lhs(self) -> str:
"""
(Optional) LHS must always carry the string value ``id`` or the attribute ID of the resource being associated with the rule.
"""
return pulumi.get(self, "lhs")
@property
@pulumi.getter(name="objectType")
def object_type(self) -> str:
"""
(Optional) This is for specifying the policy critiera. Supported values: `APP`, `APP_GROUP`, `SAML`, `IDP`, `CLIENT_TYPE`, `TRUSTED_NETWORK`, `POSTURE`, `SCIM`, `SCIM_GROUP`, and `CLOUD_CONNECTOR_GROUP`. `TRUSTED_NETWORK`, and `CLIENT_TYPE`.
"""
return pulumi.get(self, "object_type")
@property
@pulumi.getter
def id(self) -> Optional[str]:
"""
(Optional) The ID of a server group resource
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="idpId")
def idp_id(self) -> Optional[str]:
"""
(Optional)
"""
return pulumi.get(self, "idp_id")
@property
@pulumi.getter
def name(self) -> Optional[str]:
"""
(Optional)
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def rhs(self) -> Optional[str]:
"""
(Optional) RHS is either the ID attribute of a resource or fixed string value. Refer to the chart below for further details.
"""
return pulumi.get(self, "rhs")
@property
@pulumi.getter(name="rhsLists")
def rhs_lists(self) -> Optional[Sequence[str]]:
return pulumi.get(self, "rhs_lists") | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/accesspolicy/outputs.py | outputs.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'GetMachineGroupMachineResult',
]
@pulumi.output_type
class GetMachineGroupMachineResult(dict):
def __init__(__self__, *,
creation_time: str,
description: str,
fingerprint: str,
id: str,
issued_cert_id: str,
machine_group_id: str,
machine_group_name: str,
machine_token_id: str,
modified_by: str,
modified_time: str,
name: str,
signing_cert: Mapping[str, str]):
"""
:param str creation_time: (string)
:param str description: (string)
:param str fingerprint: (string)
:param str id: The ID of the machine group to be exported.
:param str issued_cert_id: (string)
:param str machine_group_id: (string)
:param str machine_group_name: (string)
:param str machine_token_id: (string)
:param str modified_by: (string)
:param str modified_time: (string)
:param str name: The name of the machine group to be exported.
:param Mapping[str, str] signing_cert: (string)
"""
pulumi.set(__self__, "creation_time", creation_time)
pulumi.set(__self__, "description", description)
pulumi.set(__self__, "fingerprint", fingerprint)
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "issued_cert_id", issued_cert_id)
pulumi.set(__self__, "machine_group_id", machine_group_id)
pulumi.set(__self__, "machine_group_name", machine_group_name)
pulumi.set(__self__, "machine_token_id", machine_token_id)
pulumi.set(__self__, "modified_by", modified_by)
pulumi.set(__self__, "modified_time", modified_time)
pulumi.set(__self__, "name", name)
pulumi.set(__self__, "signing_cert", signing_cert)
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "creation_time")
@property
@pulumi.getter
def description(self) -> str:
"""
(string)
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def fingerprint(self) -> str:
"""
(string)
"""
return pulumi.get(self, "fingerprint")
@property
@pulumi.getter
def id(self) -> str:
"""
The ID of the machine group to be exported.
"""
return pulumi.get(self, "id")
@property
@pulumi.getter(name="issuedCertId")
def issued_cert_id(self) -> str:
"""
(string)
"""
return pulumi.get(self, "issued_cert_id")
@property
@pulumi.getter(name="machineGroupId")
def machine_group_id(self) -> str:
"""
(string)
"""
return pulumi.get(self, "machine_group_id")
@property
@pulumi.getter(name="machineGroupName")
def machine_group_name(self) -> str:
"""
(string)
"""
return pulumi.get(self, "machine_group_name")
@property
@pulumi.getter(name="machineTokenId")
def machine_token_id(self) -> str:
"""
(string)
"""
return pulumi.get(self, "machine_token_id")
@property
@pulumi.getter(name="modifiedBy")
def modified_by(self) -> str:
"""
(string)
"""
return pulumi.get(self, "modified_by")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def name(self) -> str:
"""
The name of the machine group to be exported.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="signingCert")
def signing_cert(self) -> Mapping[str, str]:
"""
(string)
"""
return pulumi.get(self, "signing_cert") | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/machinegroup/outputs.py | outputs.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'GetMachineGroupResult',
'AwaitableGetMachineGroupResult',
'get_machine_group',
'get_machine_group_output',
]
@pulumi.output_type
class GetMachineGroupResult:
"""
A collection of values returned by getMachineGroup.
"""
def __init__(__self__, creation_time=None, description=None, enabled=None, id=None, machines=None, modified_by=None, modified_time=None, name=None):
if creation_time and not isinstance(creation_time, str):
raise TypeError("Expected argument 'creation_time' to be a str")
pulumi.set(__self__, "creation_time", creation_time)
if description and not isinstance(description, str):
raise TypeError("Expected argument 'description' to be a str")
pulumi.set(__self__, "description", description)
if enabled and not isinstance(enabled, bool):
raise TypeError("Expected argument 'enabled' to be a bool")
pulumi.set(__self__, "enabled", enabled)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if machines and not isinstance(machines, list):
raise TypeError("Expected argument 'machines' to be a list")
pulumi.set(__self__, "machines", machines)
if modified_by and not isinstance(modified_by, str):
raise TypeError("Expected argument 'modified_by' to be a str")
pulumi.set(__self__, "modified_by", modified_by)
if modified_time and not isinstance(modified_time, str):
raise TypeError("Expected argument 'modified_time' to be a str")
pulumi.set(__self__, "modified_time", modified_time)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "creation_time")
@property
@pulumi.getter
def description(self) -> str:
"""
(string)
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def enabled(self) -> bool:
"""
(bool)
"""
return pulumi.get(self, "enabled")
@property
@pulumi.getter
def id(self) -> Optional[str]:
"""
(string)
"""
return pulumi.get(self, "id")
@property
@pulumi.getter
def machines(self) -> Sequence['outputs.GetMachineGroupMachineResult']:
"""
(string)
"""
return pulumi.get(self, "machines")
@property
@pulumi.getter(name="modifiedBy")
def modified_by(self) -> str:
"""
(string)
"""
return pulumi.get(self, "modified_by")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def name(self) -> Optional[str]:
"""
(string)
"""
return pulumi.get(self, "name")
class AwaitableGetMachineGroupResult(GetMachineGroupResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetMachineGroupResult(
creation_time=self.creation_time,
description=self.description,
enabled=self.enabled,
id=self.id,
machines=self.machines,
modified_by=self.modified_by,
modified_time=self.modified_time,
name=self.name)
def get_machine_group(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetMachineGroupResult:
"""
Use the **zpa_machine_group** data source to get information about a machine group created in the Zscaler Private Access cloud. This data source can then be referenced in an Access Policy, Timeout policy, Forwarding Policy, Inspection Policy or Isolation Policy.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
example = zpa.machineGroup.get_machine_group(name="MGR01")
```
```python
import pulumi
import pulumi_zpa as zpa
example = zpa.machineGroup.get_machine_group(id="1234567890")
```
:param str id: The ID of the machine group to be exported.
:param str name: The name of the machine group to be exported.
"""
__args__ = dict()
__args__['id'] = id
__args__['name'] = name
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('zpa:machineGroup/getMachineGroup:getMachineGroup', __args__, opts=opts, typ=GetMachineGroupResult).value
return AwaitableGetMachineGroupResult(
creation_time=__ret__.creation_time,
description=__ret__.description,
enabled=__ret__.enabled,
id=__ret__.id,
machines=__ret__.machines,
modified_by=__ret__.modified_by,
modified_time=__ret__.modified_time,
name=__ret__.name)
@_utilities.lift_output_func(get_machine_group)
def get_machine_group_output(id: Optional[pulumi.Input[Optional[str]]] = None,
name: Optional[pulumi.Input[Optional[str]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetMachineGroupResult]:
"""
Use the **zpa_machine_group** data source to get information about a machine group created in the Zscaler Private Access cloud. This data source can then be referenced in an Access Policy, Timeout policy, Forwarding Policy, Inspection Policy or Isolation Policy.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
example = zpa.machineGroup.get_machine_group(name="MGR01")
```
```python
import pulumi
import pulumi_zpa as zpa
example = zpa.machineGroup.get_machine_group(id="1234567890")
```
:param str id: The ID of the machine group to be exported.
:param str name: The name of the machine group to be exported.
"""
... | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/machinegroup/get_machine_group.py | get_machine_group.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__all__ = [
'GetEnrollmentCertResult',
'AwaitableGetEnrollmentCertResult',
'get_enrollment_cert',
'get_enrollment_cert_output',
]
@pulumi.output_type
class GetEnrollmentCertResult:
"""
A collection of values returned by getEnrollmentCert.
"""
def __init__(__self__, allow_signing=None, certificate=None, client_cert_type=None, cname=None, creation_time=None, csr=None, description=None, id=None, issued_by=None, issued_to=None, modified_by=None, modified_time=None, name=None, parent_cert_id=None, parent_cert_name=None, private_key=None, private_key_present=None, serial_no=None, valid_from_in_epoch_sec=None, valid_to_in_epoch_sec=None, zrsa_encrypted_private_key=None, zrsa_encrypted_session_key=None):
if allow_signing and not isinstance(allow_signing, bool):
raise TypeError("Expected argument 'allow_signing' to be a bool")
pulumi.set(__self__, "allow_signing", allow_signing)
if certificate and not isinstance(certificate, str):
raise TypeError("Expected argument 'certificate' to be a str")
pulumi.set(__self__, "certificate", certificate)
if client_cert_type and not isinstance(client_cert_type, str):
raise TypeError("Expected argument 'client_cert_type' to be a str")
pulumi.set(__self__, "client_cert_type", client_cert_type)
if cname and not isinstance(cname, str):
raise TypeError("Expected argument 'cname' to be a str")
pulumi.set(__self__, "cname", cname)
if creation_time and not isinstance(creation_time, str):
raise TypeError("Expected argument 'creation_time' to be a str")
pulumi.set(__self__, "creation_time", creation_time)
if csr and not isinstance(csr, str):
raise TypeError("Expected argument 'csr' to be a str")
pulumi.set(__self__, "csr", csr)
if description and not isinstance(description, str):
raise TypeError("Expected argument 'description' to be a str")
pulumi.set(__self__, "description", description)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if issued_by and not isinstance(issued_by, str):
raise TypeError("Expected argument 'issued_by' to be a str")
pulumi.set(__self__, "issued_by", issued_by)
if issued_to and not isinstance(issued_to, str):
raise TypeError("Expected argument 'issued_to' to be a str")
pulumi.set(__self__, "issued_to", issued_to)
if modified_by and not isinstance(modified_by, str):
raise TypeError("Expected argument 'modified_by' to be a str")
pulumi.set(__self__, "modified_by", modified_by)
if modified_time and not isinstance(modified_time, str):
raise TypeError("Expected argument 'modified_time' to be a str")
pulumi.set(__self__, "modified_time", modified_time)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
if parent_cert_id and not isinstance(parent_cert_id, str):
raise TypeError("Expected argument 'parent_cert_id' to be a str")
pulumi.set(__self__, "parent_cert_id", parent_cert_id)
if parent_cert_name and not isinstance(parent_cert_name, str):
raise TypeError("Expected argument 'parent_cert_name' to be a str")
pulumi.set(__self__, "parent_cert_name", parent_cert_name)
if private_key and not isinstance(private_key, str):
raise TypeError("Expected argument 'private_key' to be a str")
pulumi.set(__self__, "private_key", private_key)
if private_key_present and not isinstance(private_key_present, bool):
raise TypeError("Expected argument 'private_key_present' to be a bool")
pulumi.set(__self__, "private_key_present", private_key_present)
if serial_no and not isinstance(serial_no, str):
raise TypeError("Expected argument 'serial_no' to be a str")
pulumi.set(__self__, "serial_no", serial_no)
if valid_from_in_epoch_sec and not isinstance(valid_from_in_epoch_sec, str):
raise TypeError("Expected argument 'valid_from_in_epoch_sec' to be a str")
pulumi.set(__self__, "valid_from_in_epoch_sec", valid_from_in_epoch_sec)
if valid_to_in_epoch_sec and not isinstance(valid_to_in_epoch_sec, str):
raise TypeError("Expected argument 'valid_to_in_epoch_sec' to be a str")
pulumi.set(__self__, "valid_to_in_epoch_sec", valid_to_in_epoch_sec)
if zrsa_encrypted_private_key and not isinstance(zrsa_encrypted_private_key, str):
raise TypeError("Expected argument 'zrsa_encrypted_private_key' to be a str")
pulumi.set(__self__, "zrsa_encrypted_private_key", zrsa_encrypted_private_key)
if zrsa_encrypted_session_key and not isinstance(zrsa_encrypted_session_key, str):
raise TypeError("Expected argument 'zrsa_encrypted_session_key' to be a str")
pulumi.set(__self__, "zrsa_encrypted_session_key", zrsa_encrypted_session_key)
@property
@pulumi.getter(name="allowSigning")
def allow_signing(self) -> bool:
"""
(bool)
"""
return pulumi.get(self, "allow_signing")
@property
@pulumi.getter
def certificate(self) -> str:
"""
(string) The certificate text is in PEM format.
"""
return pulumi.get(self, "certificate")
@property
@pulumi.getter(name="clientCertType")
def client_cert_type(self) -> str:
"""
(string) Returned values are:
"""
return pulumi.get(self, "client_cert_type")
@property
@pulumi.getter
def cname(self) -> str:
"""
(string)
"""
return pulumi.get(self, "cname")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "creation_time")
@property
@pulumi.getter
def csr(self) -> str:
"""
(string)
"""
return pulumi.get(self, "csr")
@property
@pulumi.getter
def description(self) -> str:
"""
(string)
"""
return pulumi.get(self, "description")
@property
@pulumi.getter
def id(self) -> Optional[str]:
return pulumi.get(self, "id")
@property
@pulumi.getter(name="issuedBy")
def issued_by(self) -> str:
"""
(string)
"""
return pulumi.get(self, "issued_by")
@property
@pulumi.getter(name="issuedTo")
def issued_to(self) -> str:
"""
(string)
"""
return pulumi.get(self, "issued_to")
@property
@pulumi.getter(name="modifiedBy")
def modified_by(self) -> str:
"""
(string)
"""
return pulumi.get(self, "modified_by")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
"""
(string)
"""
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def name(self) -> Optional[str]:
return pulumi.get(self, "name")
@property
@pulumi.getter(name="parentCertId")
def parent_cert_id(self) -> str:
"""
(string)
"""
return pulumi.get(self, "parent_cert_id")
@property
@pulumi.getter(name="parentCertName")
def parent_cert_name(self) -> str:
"""
(string)
"""
return pulumi.get(self, "parent_cert_name")
@property
@pulumi.getter(name="privateKey")
def private_key(self) -> str:
return pulumi.get(self, "private_key")
@property
@pulumi.getter(name="privateKeyPresent")
def private_key_present(self) -> bool:
return pulumi.get(self, "private_key_present")
@property
@pulumi.getter(name="serialNo")
def serial_no(self) -> str:
"""
(string)
"""
return pulumi.get(self, "serial_no")
@property
@pulumi.getter(name="validFromInEpochSec")
def valid_from_in_epoch_sec(self) -> str:
"""
(string)
"""
return pulumi.get(self, "valid_from_in_epoch_sec")
@property
@pulumi.getter(name="validToInEpochSec")
def valid_to_in_epoch_sec(self) -> str:
return pulumi.get(self, "valid_to_in_epoch_sec")
@property
@pulumi.getter(name="zrsaEncryptedPrivateKey")
def zrsa_encrypted_private_key(self) -> str:
return pulumi.get(self, "zrsa_encrypted_private_key")
@property
@pulumi.getter(name="zrsaEncryptedSessionKey")
def zrsa_encrypted_session_key(self) -> str:
return pulumi.get(self, "zrsa_encrypted_session_key")
class AwaitableGetEnrollmentCertResult(GetEnrollmentCertResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetEnrollmentCertResult(
allow_signing=self.allow_signing,
certificate=self.certificate,
client_cert_type=self.client_cert_type,
cname=self.cname,
creation_time=self.creation_time,
csr=self.csr,
description=self.description,
id=self.id,
issued_by=self.issued_by,
issued_to=self.issued_to,
modified_by=self.modified_by,
modified_time=self.modified_time,
name=self.name,
parent_cert_id=self.parent_cert_id,
parent_cert_name=self.parent_cert_name,
private_key=self.private_key,
private_key_present=self.private_key_present,
serial_no=self.serial_no,
valid_from_in_epoch_sec=self.valid_from_in_epoch_sec,
valid_to_in_epoch_sec=self.valid_to_in_epoch_sec,
zrsa_encrypted_private_key=self.zrsa_encrypted_private_key,
zrsa_encrypted_session_key=self.zrsa_encrypted_session_key)
def get_enrollment_cert(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEnrollmentCertResult:
"""
Use the **zpa_enrollment_cert** data source to get information about all configured enrollment certificate details created in the Zscaler Private Access cloud. This data source is required when creating provisioning key resources.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
root = zpa.EnrollmentCertificate.get_enrollment_cert(name="Root")
client = zpa.EnrollmentCertificate.get_enrollment_cert(name="Client")
connector = zpa.EnrollmentCertificate.get_enrollment_cert(name="Connector")
service_edge = zpa.EnrollmentCertificate.get_enrollment_cert(name="Service Edge")
isolation_client = zpa.EnrollmentCertificate.get_enrollment_cert(name="Isolation Client")
```
:param str id: The id of the enrollment certificate to be exported.
:param str name: The name of the enrollment certificate to be exported.
"""
__args__ = dict()
__args__['id'] = id
__args__['name'] = name
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('zpa:EnrollmentCertificate/getEnrollmentCert:getEnrollmentCert', __args__, opts=opts, typ=GetEnrollmentCertResult).value
return AwaitableGetEnrollmentCertResult(
allow_signing=__ret__.allow_signing,
certificate=__ret__.certificate,
client_cert_type=__ret__.client_cert_type,
cname=__ret__.cname,
creation_time=__ret__.creation_time,
csr=__ret__.csr,
description=__ret__.description,
id=__ret__.id,
issued_by=__ret__.issued_by,
issued_to=__ret__.issued_to,
modified_by=__ret__.modified_by,
modified_time=__ret__.modified_time,
name=__ret__.name,
parent_cert_id=__ret__.parent_cert_id,
parent_cert_name=__ret__.parent_cert_name,
private_key=__ret__.private_key,
private_key_present=__ret__.private_key_present,
serial_no=__ret__.serial_no,
valid_from_in_epoch_sec=__ret__.valid_from_in_epoch_sec,
valid_to_in_epoch_sec=__ret__.valid_to_in_epoch_sec,
zrsa_encrypted_private_key=__ret__.zrsa_encrypted_private_key,
zrsa_encrypted_session_key=__ret__.zrsa_encrypted_session_key)
@_utilities.lift_output_func(get_enrollment_cert)
def get_enrollment_cert_output(id: Optional[pulumi.Input[Optional[str]]] = None,
name: Optional[pulumi.Input[Optional[str]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetEnrollmentCertResult]:
"""
Use the **zpa_enrollment_cert** data source to get information about all configured enrollment certificate details created in the Zscaler Private Access cloud. This data source is required when creating provisioning key resources.
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
root = zpa.EnrollmentCertificate.get_enrollment_cert(name="Root")
client = zpa.EnrollmentCertificate.get_enrollment_cert(name="Client")
connector = zpa.EnrollmentCertificate.get_enrollment_cert(name="Connector")
service_edge = zpa.EnrollmentCertificate.get_enrollment_cert(name="Service Edge")
isolation_client = zpa.EnrollmentCertificate.get_enrollment_cert(name="Isolation Client")
```
:param str id: The id of the enrollment certificate to be exported.
:param str name: The name of the enrollment certificate to be exported.
"""
... | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/enrollmentcertificate/get_enrollment_cert.py | get_enrollment_cert.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'GetPolicyTypeRuleResult',
'GetPolicyTypeRuleConditionResult',
'GetPolicyTypeRuleConditionOperandResult',
]
@pulumi.output_type
class GetPolicyTypeRuleResult(dict):
def __init__(__self__, *,
action: str,
action_id: str,
bypass_default_rule: bool,
conditions: Sequence['outputs.GetPolicyTypeRuleConditionResult'],
creation_time: str,
custom_msg: str,
description: str,
id: str,
isolation_default_rule: bool,
modified_by: str,
modified_time: str,
name: str,
operator: str,
policy_set_id: str,
policy_type: str,
priority: str,
reauth_default_rule: bool,
reauth_idle_timeout: str,
reauth_timeout: str,
rule_order: str,
zpn_cbi_profile_id: str,
zpn_inspection_profile_id: str):
"""
:param str policy_set_id: The ID of the global policy set.
:param str policy_type: The value for differentiating the policy types.
"""
pulumi.set(__self__, "action", action)
pulumi.set(__self__, "action_id", action_id)
pulumi.set(__self__, "bypass_default_rule", bypass_default_rule)
pulumi.set(__self__, "conditions", conditions)
pulumi.set(__self__, "creation_time", creation_time)
pulumi.set(__self__, "custom_msg", custom_msg)
pulumi.set(__self__, "description", description)
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "isolation_default_rule", isolation_default_rule)
pulumi.set(__self__, "modified_by", modified_by)
pulumi.set(__self__, "modified_time", modified_time)
pulumi.set(__self__, "name", name)
pulumi.set(__self__, "operator", operator)
pulumi.set(__self__, "policy_set_id", policy_set_id)
pulumi.set(__self__, "policy_type", policy_type)
pulumi.set(__self__, "priority", priority)
pulumi.set(__self__, "reauth_default_rule", reauth_default_rule)
pulumi.set(__self__, "reauth_idle_timeout", reauth_idle_timeout)
pulumi.set(__self__, "reauth_timeout", reauth_timeout)
pulumi.set(__self__, "rule_order", rule_order)
pulumi.set(__self__, "zpn_cbi_profile_id", zpn_cbi_profile_id)
pulumi.set(__self__, "zpn_inspection_profile_id", zpn_inspection_profile_id)
@property
@pulumi.getter
def action(self) -> str:
return pulumi.get(self, "action")
@property
@pulumi.getter(name="actionId")
def action_id(self) -> str:
return pulumi.get(self, "action_id")
@property
@pulumi.getter(name="bypassDefaultRule")
def bypass_default_rule(self) -> bool:
return pulumi.get(self, "bypass_default_rule")
@property
@pulumi.getter
def conditions(self) -> Sequence['outputs.GetPolicyTypeRuleConditionResult']:
return pulumi.get(self, "conditions")
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter(name="customMsg")
def custom_msg(self) -> str:
return pulumi.get(self, "custom_msg")
@property
@pulumi.getter
def description(self) -> str:
return pulumi.get(self, "description")
@property
@pulumi.getter
def id(self) -> str:
return pulumi.get(self, "id")
@property
@pulumi.getter(name="isolationDefaultRule")
def isolation_default_rule(self) -> bool:
return pulumi.get(self, "isolation_default_rule")
@property
@pulumi.getter(name="modifiedBy")
def modified_by(self) -> str:
return pulumi.get(self, "modified_by")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def name(self) -> str:
return pulumi.get(self, "name")
@property
@pulumi.getter
def operator(self) -> str:
return pulumi.get(self, "operator")
@property
@pulumi.getter(name="policySetId")
def policy_set_id(self) -> str:
"""
The ID of the global policy set.
"""
return pulumi.get(self, "policy_set_id")
@property
@pulumi.getter(name="policyType")
def policy_type(self) -> str:
"""
The value for differentiating the policy types.
"""
return pulumi.get(self, "policy_type")
@property
@pulumi.getter
def priority(self) -> str:
return pulumi.get(self, "priority")
@property
@pulumi.getter(name="reauthDefaultRule")
def reauth_default_rule(self) -> bool:
return pulumi.get(self, "reauth_default_rule")
@property
@pulumi.getter(name="reauthIdleTimeout")
def reauth_idle_timeout(self) -> str:
return pulumi.get(self, "reauth_idle_timeout")
@property
@pulumi.getter(name="reauthTimeout")
def reauth_timeout(self) -> str:
return pulumi.get(self, "reauth_timeout")
@property
@pulumi.getter(name="ruleOrder")
def rule_order(self) -> str:
return pulumi.get(self, "rule_order")
@property
@pulumi.getter(name="zpnCbiProfileId")
def zpn_cbi_profile_id(self) -> str:
return pulumi.get(self, "zpn_cbi_profile_id")
@property
@pulumi.getter(name="zpnInspectionProfileId")
def zpn_inspection_profile_id(self) -> str:
return pulumi.get(self, "zpn_inspection_profile_id")
@pulumi.output_type
class GetPolicyTypeRuleConditionResult(dict):
def __init__(__self__, *,
creation_time: str,
id: str,
modified_by: str,
modified_time: str,
negated: bool,
operands: Sequence['outputs.GetPolicyTypeRuleConditionOperandResult'],
operator: str):
pulumi.set(__self__, "creation_time", creation_time)
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "modified_by", modified_by)
pulumi.set(__self__, "modified_time", modified_time)
pulumi.set(__self__, "negated", negated)
pulumi.set(__self__, "operands", operands)
pulumi.set(__self__, "operator", operator)
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter
def id(self) -> str:
return pulumi.get(self, "id")
@property
@pulumi.getter(name="modifiedBy")
def modified_by(self) -> str:
return pulumi.get(self, "modified_by")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def negated(self) -> bool:
return pulumi.get(self, "negated")
@property
@pulumi.getter
def operands(self) -> Sequence['outputs.GetPolicyTypeRuleConditionOperandResult']:
return pulumi.get(self, "operands")
@property
@pulumi.getter
def operator(self) -> str:
return pulumi.get(self, "operator")
@pulumi.output_type
class GetPolicyTypeRuleConditionOperandResult(dict):
def __init__(__self__, *,
creation_time: str,
id: str,
idp_id: str,
lhs: str,
modified_by: str,
modified_time: str,
name: str,
object_type: str,
operator: str,
rhs: str):
pulumi.set(__self__, "creation_time", creation_time)
pulumi.set(__self__, "id", id)
pulumi.set(__self__, "idp_id", idp_id)
pulumi.set(__self__, "lhs", lhs)
pulumi.set(__self__, "modified_by", modified_by)
pulumi.set(__self__, "modified_time", modified_time)
pulumi.set(__self__, "name", name)
pulumi.set(__self__, "object_type", object_type)
pulumi.set(__self__, "operator", operator)
pulumi.set(__self__, "rhs", rhs)
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter
def id(self) -> str:
return pulumi.get(self, "id")
@property
@pulumi.getter(name="idpId")
def idp_id(self) -> str:
return pulumi.get(self, "idp_id")
@property
@pulumi.getter
def lhs(self) -> str:
return pulumi.get(self, "lhs")
@property
@pulumi.getter(name="modifiedBy")
def modified_by(self) -> str:
return pulumi.get(self, "modified_by")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def name(self) -> str:
return pulumi.get(self, "name")
@property
@pulumi.getter(name="objectType")
def object_type(self) -> str:
return pulumi.get(self, "object_type")
@property
@pulumi.getter
def operator(self) -> str:
return pulumi.get(self, "operator")
@property
@pulumi.getter
def rhs(self) -> str:
return pulumi.get(self, "rhs") | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/policytype/outputs.py | outputs.py |
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'GetPolicyTypeResult',
'AwaitableGetPolicyTypeResult',
'get_policy_type',
'get_policy_type_output',
]
@pulumi.output_type
class GetPolicyTypeResult:
"""
A collection of values returned by getPolicyType.
"""
def __init__(__self__, creation_time=None, description=None, enabled=None, id=None, modified_by=None, modified_time=None, name=None, policy_type=None, rules=None, sorted=None):
if creation_time and not isinstance(creation_time, str):
raise TypeError("Expected argument 'creation_time' to be a str")
pulumi.set(__self__, "creation_time", creation_time)
if description and not isinstance(description, str):
raise TypeError("Expected argument 'description' to be a str")
pulumi.set(__self__, "description", description)
if enabled and not isinstance(enabled, bool):
raise TypeError("Expected argument 'enabled' to be a bool")
pulumi.set(__self__, "enabled", enabled)
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if modified_by and not isinstance(modified_by, str):
raise TypeError("Expected argument 'modified_by' to be a str")
pulumi.set(__self__, "modified_by", modified_by)
if modified_time and not isinstance(modified_time, str):
raise TypeError("Expected argument 'modified_time' to be a str")
pulumi.set(__self__, "modified_time", modified_time)
if name and not isinstance(name, str):
raise TypeError("Expected argument 'name' to be a str")
pulumi.set(__self__, "name", name)
if policy_type and not isinstance(policy_type, str):
raise TypeError("Expected argument 'policy_type' to be a str")
pulumi.set(__self__, "policy_type", policy_type)
if rules and not isinstance(rules, list):
raise TypeError("Expected argument 'rules' to be a list")
pulumi.set(__self__, "rules", rules)
if sorted and not isinstance(sorted, bool):
raise TypeError("Expected argument 'sorted' to be a bool")
pulumi.set(__self__, "sorted", sorted)
@property
@pulumi.getter(name="creationTime")
def creation_time(self) -> str:
return pulumi.get(self, "creation_time")
@property
@pulumi.getter
def description(self) -> str:
return pulumi.get(self, "description")
@property
@pulumi.getter
def enabled(self) -> bool:
return pulumi.get(self, "enabled")
@property
@pulumi.getter
def id(self) -> Optional[str]:
return pulumi.get(self, "id")
@property
@pulumi.getter(name="modifiedBy")
def modified_by(self) -> str:
return pulumi.get(self, "modified_by")
@property
@pulumi.getter(name="modifiedTime")
def modified_time(self) -> str:
return pulumi.get(self, "modified_time")
@property
@pulumi.getter
def name(self) -> str:
return pulumi.get(self, "name")
@property
@pulumi.getter(name="policyType")
def policy_type(self) -> str:
return pulumi.get(self, "policy_type")
@property
@pulumi.getter
def rules(self) -> Sequence['outputs.GetPolicyTypeRuleResult']:
return pulumi.get(self, "rules")
@property
@pulumi.getter
def sorted(self) -> bool:
return pulumi.get(self, "sorted")
class AwaitableGetPolicyTypeResult(GetPolicyTypeResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetPolicyTypeResult(
creation_time=self.creation_time,
description=self.description,
enabled=self.enabled,
id=self.id,
modified_by=self.modified_by,
modified_time=self.modified_time,
name=self.name,
policy_type=self.policy_type,
rules=self.rules,
sorted=self.sorted)
def get_policy_type(id: Optional[str] = None,
policy_type: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPolicyTypeResult:
"""
Use the **zpa_policy_type** data source to get information about an a ``policy_set_id`` and ``policy_type``. This data source is required when creating:
1. Access policy Rules
2. Access policy timeout rules
3. Access policy forwarding rules
4. Access policy inspection rules
> **NOTE** The parameters ``policy_set_id`` is required in all circumstances and is exported when checking for the policy_type parameter. The policy_type value is used for differentiating the policy types, in the request endpoint. The supported values are:
* ``ACCESS_POLICY/GLOBAL_POLICY``
* ``TIMEOUT_POLICY/REAUTH_POLICY``
* ``BYPASS_POLICY/CLIENT_FORWARDING_POLICY``
* ``INSPECTION_POLICY``
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
access_policy = zpa.PolicyType.get_policy_type(policy_type="ACCESS_POLICY")
pulumi.export("zpaPolicyTypeAccessPolicy", access_policy.id)
```
```python
import pulumi
import pulumi_zpa as zpa
global_policy = zpa.PolicyType.get_policy_type(policy_type="GLOBAL_POLICY")
pulumi.export("zpaPolicyTypeAccessPolicy", global_policy.id)
```
```python
import pulumi
import pulumi_zpa as zpa
timeout_policy = zpa.PolicyType.get_policy_type(policy_type="TIMEOUT_POLICY")
pulumi.export("zpaPolicyTypeTimeoutPolicy", timeout_policy.id)
```
```python
import pulumi
import pulumi_zpa as zpa
reauth_policy = zpa.PolicyType.get_policy_type(policy_type="REAUTH_POLICY")
pulumi.export("zpaPolicyTypeReauthPolicy", reauth_policy.id)
```
```python
import pulumi
import pulumi_zpa as zpa
client_forwarding_policy = zpa.PolicyType.get_policy_type(policy_type="CLIENT_FORWARDING_POLICY")
pulumi.export("zpaPolicyTypeClientForwardingPolicy", client_forwarding_policy.id)
```
```python
import pulumi
import pulumi_zpa as zpa
inspection_policy = zpa.PolicyType.get_policy_type(policy_type="INSPECTION_POLICY")
pulumi.export("zpaPolicyTypeInspectionPolicy", inspection_policy.id)
```
:param str policy_type: The value for differentiating the policy types.
"""
__args__ = dict()
__args__['id'] = id
__args__['policyType'] = policy_type
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('zpa:PolicyType/getPolicyType:getPolicyType', __args__, opts=opts, typ=GetPolicyTypeResult).value
return AwaitableGetPolicyTypeResult(
creation_time=__ret__.creation_time,
description=__ret__.description,
enabled=__ret__.enabled,
id=__ret__.id,
modified_by=__ret__.modified_by,
modified_time=__ret__.modified_time,
name=__ret__.name,
policy_type=__ret__.policy_type,
rules=__ret__.rules,
sorted=__ret__.sorted)
@_utilities.lift_output_func(get_policy_type)
def get_policy_type_output(id: Optional[pulumi.Input[Optional[str]]] = None,
policy_type: Optional[pulumi.Input[Optional[str]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPolicyTypeResult]:
"""
Use the **zpa_policy_type** data source to get information about an a ``policy_set_id`` and ``policy_type``. This data source is required when creating:
1. Access policy Rules
2. Access policy timeout rules
3. Access policy forwarding rules
4. Access policy inspection rules
> **NOTE** The parameters ``policy_set_id`` is required in all circumstances and is exported when checking for the policy_type parameter. The policy_type value is used for differentiating the policy types, in the request endpoint. The supported values are:
* ``ACCESS_POLICY/GLOBAL_POLICY``
* ``TIMEOUT_POLICY/REAUTH_POLICY``
* ``BYPASS_POLICY/CLIENT_FORWARDING_POLICY``
* ``INSPECTION_POLICY``
## Example Usage
```python
import pulumi
import pulumi_zpa as zpa
access_policy = zpa.PolicyType.get_policy_type(policy_type="ACCESS_POLICY")
pulumi.export("zpaPolicyTypeAccessPolicy", access_policy.id)
```
```python
import pulumi
import pulumi_zpa as zpa
global_policy = zpa.PolicyType.get_policy_type(policy_type="GLOBAL_POLICY")
pulumi.export("zpaPolicyTypeAccessPolicy", global_policy.id)
```
```python
import pulumi
import pulumi_zpa as zpa
timeout_policy = zpa.PolicyType.get_policy_type(policy_type="TIMEOUT_POLICY")
pulumi.export("zpaPolicyTypeTimeoutPolicy", timeout_policy.id)
```
```python
import pulumi
import pulumi_zpa as zpa
reauth_policy = zpa.PolicyType.get_policy_type(policy_type="REAUTH_POLICY")
pulumi.export("zpaPolicyTypeReauthPolicy", reauth_policy.id)
```
```python
import pulumi
import pulumi_zpa as zpa
client_forwarding_policy = zpa.PolicyType.get_policy_type(policy_type="CLIENT_FORWARDING_POLICY")
pulumi.export("zpaPolicyTypeClientForwardingPolicy", client_forwarding_policy.id)
```
```python
import pulumi
import pulumi_zpa as zpa
inspection_policy = zpa.PolicyType.get_policy_type(policy_type="INSPECTION_POLICY")
pulumi.export("zpaPolicyTypeInspectionPolicy", inspection_policy.id)
```
:param str policy_type: The value for differentiating the policy types.
"""
... | zscaler-pulumi-zpa | /zscaler_pulumi_zpa-0.0.4.tar.gz/zscaler_pulumi_zpa-0.0.4/zscaler_pulumi_zpa/policytype/get_policy_type.py | get_policy_type.py |
# Zscaler Python SDK
This is a Python SDK for Zscaler Internet Access. This client library is designed to support the Zscaler Internet Access (ZIA) API. Now This library does not support Zscaler Private Access (ZPA), but this will be implemented in the future.
This SDK has been developed mainly using Python 3.9.0 .
NOTE: This repository is not official. Zscaler does not support this repository.
## Preparation
You need a ZIA credentials like below.
- ZIA Admin Username (like `[email protected]`)
- ZIA Admin Password
- ZIA Hostname (like `zscaler.net`)
- ZIA APIKEY (You need to request an api key to Zscaler support team.)
## Set profile
If you have verified your credentials, set up your credentials to use this repository. Please replace `/Users/utah18` to your arbitrary directory path.
```
$ mkdir /Users/utah18/.zscaler && cat > /Users/utah18/.zscaler/config.ini <<EOF
[zia]
[email protected]
PASSWORD=P@ssw0rd
HOSTNAME=zscaler.net
APIKEY=xxxxxxxxxxxxxxxxxxxxxxx
EOF
```
## Clone and Install Repository
In this case, we use `poetry`. If you don't have this, please install poetry from [HERE](https://python-poetry.org/docs/)
```
$ poetry add zscaler-python-sdk
```
## Quick Start
After installing, you can try below to check if you could use this library.
```
$ python
$ from zscaler_python_sdk.zia import Zia
$ zia = Zia("/Users/utah18/.zscaler/config.ini")
$print(zia.fetch_admin_users())
```
...
Reporting Issues
If you have bugs or other issues specifically pertaining to this library, file them here.
## References
- https://help.zscaler.com/zia/api
- https://help.zscaler.com/zia/zscaler-api-developer-guide
- https://help.zscaler.com/zia/sd-wan-api-integration
| zscaler-python-sdk | /zscaler-python-sdk-0.2.1.tar.gz/zscaler-python-sdk-0.2.1/README.md | README.md |
import configparser
from typing import Optional
from zscaler_python_sdk.lib import admin
from zscaler_python_sdk.lib import auth
from zscaler_python_sdk.lib import url_categories
from zscaler_python_sdk.lib import url_filtering_rules
from zscaler_python_sdk.lib import users
class Zia(object):
def __init__(self, config_path: str) -> None:
config = configparser.ConfigParser()
config.read(config_path)
zia = config["zia"]
self.cloud_name = zia["HOSTNAME"]
self.base_url = f"https://admin.{self.cloud_name}/api/v1"
self.api_key = zia["APIKEY"]
self.admin_user = zia["USERNAME"]
self.admin_password = zia["PASSWORD"]
def fetch_admin_users(self, search_query: str = None) -> list[str]:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
admin_users = admin.fetch_adminusers(api_token, self.base_url, search_query)
auth.logout(api_token, self.base_url)
return admin_users
def fetch_admin_roles(self) -> list[str]:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
admin_roles = admin.fetch_adminroles(api_token, self.base_url)
auth.logout(api_token, self.base_url)
return admin_roles
def create_admin_users(
self, login_name, user_name, email, password, role
) -> list[str]:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
result = admin.create_adminuser(
api_token, self.base_url, login_name, user_name, email, password, role
)
auth.logout(api_token, self.base_url)
return result
def fetch_users(
self,
name: Optional[str] = None,
department: Optional[str] = None,
group: Optional[str] = None,
page: Optional[int] = None,
size: Optional[int] = None,
) -> list[str]:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
user_list = users.fetch_users(
api_token, self.base_url, name, department, group, page, size
)
auth.logout(api_token, self.base_url)
return user_list
def fetch_departments(self, search: Optional[int] = None) -> list[str]:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
departments = users.fetch_departments(api_token, self.base_url, search)
auth.logout(api_token, self.base_url)
return departments
def fetch_groups(self, search: Optional[int] = None) -> list[str]:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
groups = users.fetch_groups(api_token, self.base_url, search)
auth.logout(api_token, self.base_url)
return groups
def fetch_url_categories(self, is_custom_only: Optional[str] = None) -> list[str]:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
categories = url_categories.fetch_url_categories(
api_token, self.base_url, is_custom_only
)
auth.logout(api_token, self.base_url)
return categories
def lookup_url_category(self, target_urls: list[str]) -> list[str]:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
lookuped_categories = url_categories.lookup_url_classification(
api_token, self.base_url, target_urls
)
auth.logout(api_token, self.base_url)
return lookuped_categories
def create_custom_url_category(
self,
configured_names: str,
urls: list[str],
db_categorized_urls: list[str],
description: str,
) -> str:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
new_category = url_categories.create_custom_url_category(
api_token,
self.base_url,
configured_names,
urls,
db_categorized_urls,
description,
)
auth.logout(api_token, self.base_url)
return new_category
def update_url_in_category(self, category_name: str, urls: list[str]) -> dict:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
category_id: str = url_categories.fetch_category_id_by_category_name(
api_token, self.base_url, category_name
)
if category_id is None:
raise RuntimeError
result = url_categories.update_custom_url_category(
api_token, self.base_url, category_id, urls
)
auth.logout(api_token, self.base_url)
return result
def fetch_all_url_filtering_rules(self, is_full: bool = False) -> list[str]:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
rules: list[str] = url_filtering_rules.fetch_all(
api_token, self.base_url, is_full
)
auth.logout(api_token, self.base_url)
return rules
def fetch_one_url_filtering_rules(self, rule_name: str) -> list[str]:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
rule: dict[str, str] = url_filtering_rules.fetch_one_by_rulename(
api_token, self.base_url, rule_name
)
auth.logout(api_token, self.base_url)
return rule
def create_url_filtering_rule(
self,
name: str,
order: int,
protocols: list[str],
locations: list[str],
groups: list[str],
departments: list[str],
users: list[str],
url_categories: list[str],
state: str,
rank: int,
action: str,
):
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
result = url_filtering_rules.create(
api_token,
self.base_url,
name,
order,
protocols,
locations,
groups,
departments,
users,
url_categories,
state,
rank,
action,
)
auth.logout(api_token, self.base_url)
return result
def update_url_filtering_rule(
self,
rule_name: str,
name: Optional[str] = None,
order: Optional[int] = None,
rank: Optional[int] = None,
state: Optional[str] = None,
protocols: Optional[list] = None,
action: Optional[str] = None,
) -> str:
api_token: str = auth.login(
self.base_url, self.admin_user, self.admin_password, self.api_key
)
result = url_filtering_rules.update(
api_token,
self.base_url,
rule_name,
name,
order,
rank,
state,
protocols,
action,
)
auth.logout(api_token, self.base_url)
return result | zscaler-python-sdk | /zscaler-python-sdk-0.2.1.tar.gz/zscaler-python-sdk-0.2.1/zscaler_python_sdk/zia.py | zia.py |
from typing import Any, Dict, Optional
from zscaler_python_sdk.zia import api_get
def fetch_firewall_rules(
rule_id: Optional[str] = None,
tenant: Optional[str] = None,
) -> Dict[str, Any]:
firewall_rules: Dict[str, Any] = api_get(
"/firewallFilteringRules"
if rule_id is None
else f"/firewallFilteringRules/{rule_id}",
tenant,
)
return firewall_rules
def create_new_firewall_rule() -> str:
pass
def update_firewall_rule() -> str:
pass
def fetch_ip_destination_groups(
ip_group_id: Optional[int] = None,
tenant: Optional[str] = None,
) -> Dict[str, Any]:
ip_destination_groups: Dict[str, Any] = api_get(
"/ipDestinationGroups"
if ip_group_id is None
else f"/ipDestinationGroups/{ip_group_id}",
tenant,
)
return ip_destination_groups
def create_ip_destination_groups() -> str:
pass
def update_ip_destination_group() -> str:
pass
def fetch_ip_source_groups(
ip_group_id: Optional[int] = None,
tenant: Optional[str] = None,
) -> Dict[str, Any]:
ip_source_groups: Dict[str, Any] = api_get(
"/ipSourceGroups" if ip_group_id is None else f"/ipSourceGroups/{ip_group_id}",
tenant,
)
return ip_source_groups
def create_ip_source_groups() -> str:
pass
def update_ip_source_group() -> str:
pass
def fetch_network_application_groups(
group_id: Optional[int] = None,
tenant: Optional[str] = None,
) -> Dict[str, Any]:
nw_app_groups: Dict[str, Any] = api_get(
"/networkApplicationGroups"
if group_id is None
else f"/networkApplicationGroups/{group_id}",
tenant,
)
return nw_app_groups
def fetch_network_applications(
app_id: Optional[int] = None,
tenant: Optional[str] = None,
) -> Dict[str, Any]:
nw_apps: Dict[str, Any] = api_get(
"/networkApplications" if app_id is None else f"/networkApplications/{app_id}",
tenant,
)
return nw_apps
def fetch_network_service_groups(
group_id: Optional[int] = None,
tenant: Optional[str] = None,
) -> Dict[str, Any]:
nw_app_groups: Dict[str, Any] = api_get(
"/networkServiceGroups"
if group_id is None
else f"/networkServiceGroups/{group_id}",
tenant,
)
return nw_app_groups
def fetch_network_services(
service_id: Optional[int] = None,
tenant: Optional[str] = None,
) -> Dict[str, Any]:
nw_apps: Dict[str, Any] = api_get(
"/networkServices" if service_id is None else f"/networkServices/{service_id}",
tenant,
)
return nw_apps | zscaler-python-sdk | /zscaler-python-sdk-0.2.1.tar.gz/zscaler-python-sdk-0.2.1/zscaler_python_sdk/lib/firewall_rules.py | firewall_rules.py |
from typing import Optional
from typing import Union
from zscaler_python_sdk.lib import api
def fetch_all(api_token: str, base_url, is_full: bool) -> dict[str, str]:
"""Get Zscaler's url filtering rules."""
url_filtering_rules: dict = api.get(api_token, f"{base_url}/urlFilteringRules")
if not is_full:
for url_filtering_rule in url_filtering_rules:
del (
url_filtering_rule["rank"],
url_filtering_rule["requestMethods"],
url_filtering_rule["blockOverride"],
url_filtering_rule["enforceTimeValidity"],
url_filtering_rule["cbiProfileId"],
)
url_filtering_rules = sorted(url_filtering_rules, key=lambda x: x["order"])
return url_filtering_rules
def fetch_one_by_rulename(api_token: str, base_url: str, rule_name: str) -> dict:
url_filtering_rules: list[str] = fetch_all(api_token, base_url, False)
for rule in url_filtering_rules:
if rule["name"] == rule_name:
return rule
return None
def create(
api_token: str,
base_url: str,
name: str,
order: int,
protocols: list[str],
locations: list[str],
groups: list[str],
departments: list[str],
users: list[str],
url_categories: list[str],
state: str,
rank: int,
action: str,
) -> str:
payload: dict[str, Union[str, int, list[str]]] = {
"name": name,
"order": order,
"protocols": protocols,
"locations": locations,
"groups": groups,
"departments": departments,
"users": users,
"urlCategories": url_categories,
"state": state,
"rank": rank,
"action": action,
}
response: list[str] = api.post(api_token, f"{base_url}/urlFilteringRules", payload)
return response
def update(
api_token: str,
base_url: str,
rule_name: str,
name: str,
order: int,
rank: int,
state: str,
protocols: list,
action: str,
) -> str:
rule: Optional[dict] = fetch_one_by_rulename(api_token, base_url, rule_name)
if rule is None:
return "[Error] Invalied URL Filtering Rule Name"
payload: dict[str, str] = {
"name": name if name is not None else rule["name"],
"order": order if order is not None else rule["order"],
"state": state if state is not None else rule["state"],
"protocols": protocols if protocols is not None else rule["protocols"],
"action": action if action is not None else rule["action"],
}
if rank is not None:
payload["rank"] = rank
else:
payload["rank"] = rule["rank"] if "rank" in rule.keys() else 7
message = api.put(api_token, f"{base_url}/urlFilteringRules/{rule['id']}", payload)
return message | zscaler-python-sdk | /zscaler-python-sdk-0.2.1.tar.gz/zscaler-python-sdk-0.2.1/zscaler_python_sdk/lib/url_filtering_rules.py | url_filtering_rules.py |
# zscaler-sdk
## 概要
[Zscaler API](https://help.zscaler.com/zia/api)を利用して、
ユーザから渡されたURLについて、Zscalerのカテゴライゼーション情報を表示します。
## 各種ファイルの説明
+ `.env-sample` : Zscaler API利用にあたって必要な管理者アカウント情報やAPIトークンを格納
+ `zia.py` : Zscaler API利用での関数を定義
+ `main.py` : Zscaler API利用にあたってのmain関数を定義
## pythonバージョン
+ python3.7+
## python外部ライブラリ
+ requests
```
pip install requests
```
## Zscaler必要情報
+ クラウドのドメイン
+ 管理者アカウント
+ 管理者アカウントのパスワード
+ APIキー
## 使用方法
+ URLルックアップ
> python main.py lookup -u *Target URL*
+ ZscalerのURLカテゴリー取得
> python main.py categories
## 注意事項
+ hoge
## ライセンス
+ [MIT license](https://en.wikipedia.org/wiki/MIT_License).
| zscaler-python-sdk | /zscaler-python-sdk-0.2.1.tar.gz/zscaler-python-sdk-0.2.1/zscaler_python_sdk/lib/README.md | README.md |
from re import match
from typing import Any
from typing import Optional
from urllib.parse import urlparse
from requests.models import Response
from zscaler_python_sdk.lib import api
def _extract_url_domain(target_url):
"""Extract domain from url given by user."""
url_pattern = "https?://[\w/:%#\$&\?\(\)~\.=\+\-]+"
if match(url_pattern, target_url):
parsed_url = urlparse(target_url)
domain = parsed_url.netloc
return domain
else:
return target_url
def fetch_url_categories(
api_token: str, base_url: str, is_custom_only: bool = False
) -> dict[Any, Any]:
"""Get Zscaler's url catergories."""
response = api.get(
api_token,
f"{base_url}/urlCategories?customOnly=true"
if is_custom_only
else f"{base_url}/urlCategories",
)
return response
def lookup_url_classification(
api_token: str, base_url: str, target_urls: list[str]
) -> dict[str, str]:
"""Lookup url category classifications to given url."""
domains = [_extract_url_domain(url) for url in target_urls]
response: Response = api.post(api_token, f"{base_url}/urlLookup", domains)
return response
def create_custom_url_category(
api_token: str,
base_url: str,
configured_name: str,
urls: list[str],
db_categorized_urls: list[str],
description: Optional[str],
) -> str:
payload = {
"configuredName": configured_name,
"urls": [_extract_url_domain(url) for url in urls],
"dbCategorizedUrls": db_categorized_urls,
"customCategory": True,
"editable": True,
"description": description,
"superCategory": "USER_DEFINED",
"urlsRetainingParentCategoryCount": 0,
"type": "URL_CATEGORY",
}
response = api.post(api_token, f"{base_url}/urlCategories", payload)
return response
def fetch_category_id_by_category_name(
api_token: str, base_url: str, category_name: str
) -> str:
categories: list[str] = fetch_url_categories(api_token, base_url)
for category in categories:
if category["customCategory"] is False:
if category["id"] == category_name:
return category["id"]
else:
if category["configuredName"] == category_name:
return category["id"]
return None
# TODO: Does not work well. Improve
def update_custom_url_category(
api_token: str,
base_url: str,
category_id: str,
urls: list[str],
) -> str:
"""Update an existing Zscaler's url catergory."""
response = api.put(api_token, f"{base_url}/urlCategories/{category_id}", urls)
return response | zscaler-python-sdk | /zscaler-python-sdk-0.2.1.tar.gz/zscaler-python-sdk-0.2.1/zscaler_python_sdk/lib/url_categories.py | url_categories.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
import time
from box import Box, BoxList
from restfly import APIIterator
def snake_to_camel(name: str):
"""Converts Python Snake Case to Zscaler's lower camelCase."""
if "_" not in name:
return name
# Edge-cases where camelCase is breaking
edge_cases = {
"routable_ip": "routableIP",
"is_name_l10n_tag": "isNameL10nTag",
"name_l10n_tag": "nameL10nTag",
"surrogate_ip": "surrogateIP",
"surrogate_ip_enforced_for_known_browsers": "surrogateIPEnforcedForKnownBrowsers",
}
return edge_cases.get(name, name[0].lower() + name.title()[1:].replace("_", ""))
def chunker(lst, n):
"""Yield successive n-sized chunks from lst."""
for i in range(0, len(lst), n):
yield lst[i : i + n]
# Recursive function to convert all keys and nested keys from snake case
# to camel case.
def convert_keys(data):
if isinstance(data, (list, BoxList)):
return [convert_keys(inner_dict) for inner_dict in data]
elif isinstance(data, (dict, Box)):
new_dict = {}
for k in data.keys():
v = data[k]
new_key = snake_to_camel(k)
new_dict[new_key] = convert_keys(v) if isinstance(v, (dict, list)) else v
return new_dict
else:
return data
def keys_exists(element: dict, *keys):
"""
Check if *keys (nested) exists in `element` (dict).
"""
if not isinstance(element, dict):
raise AttributeError("keys_exists() expects dict as first argument.")
if not keys:
raise AttributeError("keys_exists() expects at least two arguments, one given.")
_element = element
for key in keys:
try:
_element = _element[key]
except KeyError:
return False
return True
# Takes a tuple if id_groups, kwargs and the payload dict; reformat for API call
def add_id_groups(id_groups: list, kwargs: dict, payload: dict):
for entry in id_groups:
if kwargs.get(entry[0]):
payload[entry[1]] = [{"id": param_id} for param_id in kwargs.pop(entry[0])]
return
def obfuscate_api_key(seed: list):
now = int(time.time() * 1000)
n = str(now)[-6:]
r = str(int(n) >> 1).zfill(6)
key = "".join(seed[int(str(n)[i])] for i in range(len(str(n))))
for j in range(len(r)):
key += seed[int(r[j]) + 2]
return {"timestamp": now, "key": key}
def pick_version_profile(kwargs: list, payload: list):
# Used in ZPA endpoints.
# This function is used to convert the name of the version profile to
# the version profile id. This means our users don't need to look up the
# version profile id mapping themselves.
version_profile = kwargs.pop("version_profile", None)
if version_profile:
payload["overrideVersionProfile"] = True
if version_profile == "default":
payload["versionProfileId"] = 0
elif version_profile == "previous_default":
payload["versionProfileId"] = 1
elif version_profile == "new_release":
payload["versionProfileId"] = 2
class Iterator(APIIterator):
"""Iterator class."""
page_size = 100
def __init__(self, api, path: str = "", **kw):
"""Initialize Iterator class."""
super().__init__(api, **kw)
self.path = path
self.max_items = kw.pop("max_items", 0)
self.max_pages = kw.pop("max_pages", 0)
self.payload = {}
if kw:
self.payload = {snake_to_camel(key): value for key, value in kw.items()}
def _get_page(self) -> None:
"""Iterator function to get the page."""
resp = self._api.get(
self.path,
params={**self.payload, "page": self.num_pages + 1},
)
try:
# If we are using ZPA then the API will return records under the
# 'list' key.
self.page = resp.get("list") or []
except AttributeError:
# If the list key doesn't exist then we're likely using ZIA so just
# return the full response.
self.page = resp
finally:
# If we use the default retry-after logic in Restfly then we are
# going to keep seeing 429 messages in stdout. ZIA and ZPA have a
# standard 1 sec rate limit on the API endpoints with pagination so
# we are going to include it here.
time.sleep(1) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/utils.py | utils.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly import APISession
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator
class TrustedNetworksAPI(APIEndpoint):
def __init__(self, api: APISession):
super().__init__(api)
self.v2_url = api.v2_url
def list_networks(self, **kwargs) -> BoxList:
"""
Returns a list of all configured trusted networks.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: A list of all configured trusted networks.
Examples:
>>> for trusted_network in zpa.trusted_networks.list_networks():
... pprint(trusted_network)
"""
return BoxList(Iterator(self._api, f"{self.v2_url}/network", **kwargs))
def get_network(self, network_id: str) -> Box:
"""
Returns information on the specified trusted network.
Args:
network_id (str):
The unique identifier for the trusted network.
Returns:
:obj:`Box`: The resource record for the trusted network.
Examples:
>>> pprint(zpa.trusted_networks.get_network('99999'))
"""
return self._get(f"network/{network_id}") | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/trusted_networks.py | trusted_networks.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, add_id_groups, pick_version_profile, snake_to_camel
class ConnectorsAPI(APIEndpoint):
reformat_params = [
("connector_ids", "connectors"),
("server_group_ids", "serverGroups"),
]
def list_connectors(self, **kwargs) -> BoxList:
"""
Returns a list of all configured App Connectors.
Args:
**kwargs: Optional keyword args.
Keyword Args:
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**pagesize (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
**search (str, optional):
The search string used to match against a department's name or comments attributes.
Returns:
:obj:`BoxList`: List containing all configured ZPA App Connectors.
Examples:
List all configured App Connectors:
>>> for connector in zpa.connectors.list_connectors():
... print(connector)
"""
return BoxList(Iterator(self._api, "connector", **kwargs))
def get_connector(self, connector_id: str) -> Box:
"""
Returns information on the specified App Connector.
Args:
connector_id (str): The unique id for the ZPA App Connector.
Returns:
:obj:`Box`: The specified App Connector resource record.
Examples:
>>> app_connector = zpa.connectors.get_connector('99999')
"""
return self._get(f"connector/{connector_id}")
def update_connector(self, connector_id: str, **kwargs):
"""
Updates an existing ZPA App Connector.
Args:
connector_id (str): The unique id of the ZPA App Connector.
**kwargs: Optional keyword args.
Keyword Args:
**description (str): Additional information about the App Connector.
**enabled (bool): True if the App Connector is enabled.
**name (str): The name of the App Connector.
Returns:
:obj:`Box`: The updated App Connector resource record.
Examples:
Update an App Connector name and disable it.
>>> app_connector = zpa.connectors.update_connector('999999',
... name="Updated App Connector Name",
... enabled=False)
"""
# Set payload to equal existing record
payload = {snake_to_camel(k): v for k, v in self.get_connector(connector_id).items()}
# Perform formatting on simplified params
add_id_groups(self.reformat_params, kwargs, payload)
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
resp = self._put(f"connector/{connector_id}", json=payload).status_code
if resp == 204:
return self.get_connector(connector_id)
def delete_connector(self, connector_id: str) -> int:
"""
Deletes the specified App Connector from ZPA.
Args:
connector_id (str): The unique id for the ZPA App Connector that will be deleted.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zpa.connectors.delete_connector('999999')
"""
return self._delete(f"connector/{connector_id}", box=False).status_code
def bulk_delete_connectors(self, connector_ids: list) -> int:
"""
Deletes all specified App Connectors from ZPA.
Args:
connector_ids (list): The list of unique ids for the ZPA App Connectors that will be deleted.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zpa.connectors.bulk_delete_connectors(['111111', '222222', '333333'])
"""
payload = {"ids": connector_ids}
return self._post("connector/bulkDelete", json=payload, box=False).status_code
def list_connector_groups(self, **kwargs) -> BoxList:
"""
Returns a list of all connector groups.
Keyword Args:
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**pagesize (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
**search (str, optional):
The search string used to match against a department's name or comments attributes.
Returns:
:obj:`BoxList`: List of all configured connector groups.
Examples:
>>> connector_groups = zpa.connector_groups.list_groups()
"""
return BoxList(Iterator(self._api, "appConnectorGroup", **kwargs))
def get_connector_group(self, group_id: str) -> Box:
"""
Gets information for a specified connector group.
Args:
group_id (str):
The unique identifier for the connector group.
Returns:
:obj:`Box`:
The connector group resource record.
Examples:
>>> connector_group = zpa.connector_groups.get_group('99999')
"""
return self._get(f"appConnectorGroup/{group_id}")
def add_connector_group(self, name: str, latitude: int, location: str, longitude: int, **kwargs) -> Box:
"""
Adds a new ZPA App Connector Group.
Args:
name (str): The name of the App Connector Group.
latitude (int): The latitude representing the App Connector's physical location.
location (str): The name of the location that the App Connector Group represents.
longitude (int): The longitude representing the App Connector's physical location.
**kwargs: Optional keyword args.
Keyword Args:
**connector_ids (list):
The unique ids for the App Connectors that will be added to this App Connector Group.
**city_country (str):
The City and Country for where the App Connectors are located. Format is:
``<City>, <Country Code>`` e.g. ``Sydney, AU``
**country_code (str):
The ISO<std> Country Code that represents the country where the App Connectors are located.
**description (str):
Additional information about the App Connector Group.
**dns_query_type (str):
The type of DNS queries that are enabled for this App Connector Group. Accepted values are:
``IPV4_IPV6``, ``IPV4`` and ``IPV6``
**enabled (bool):
Is the App Connector Group enabled? Defaults to ``True``.
**override_version_profile (bool):
Override the local App Connector version according to ``version_profile``. Defaults to ``False``.
**server_group_ids (list):
The unique ids of the Server Groups that are associated with this App Connector Group
**lss_app_connector_group (bool):
**upgrade_day (str):
The day of the week that upgrades will be pushed to the App Connector.
**upgrade_time_in_secs (str):
The time of the day that upgrades will be pushed to the App Connector.
**version_profile (str):
The version profile to use. This will automatically set ``override_version_profile`` to True.
Accepted values are:
``default``, ``previous_default`` and ``new_release``
Returns:
:obj:`Box`: The resource record of the newly created App Connector Group.
Examples:
Add a new ZPA App Connector Group with parameters.
>>> group = zpa.connectors.add_connector_group(name="New App Connector Group",
... location="Sydney",
... latitude="33.8688",
... longitude="151.2093",
... version_profile="default")
"""
payload = {
"name": name,
"latitude": latitude,
"location": location,
"longitude": longitude,
}
# Perform formatting on simplified params
add_id_groups(self.reformat_params, kwargs, payload)
pick_version_profile(kwargs, payload)
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("appConnectorGroup", json=payload)
def update_connector_group(self, group_id: str, **kwargs) -> Box:
"""
Updates an existing ZPA App Connector Group.
Args:
group_id (str): The unique id for the App Connector Group in ZPA.
**kwargs: Optional keyword args.
Keyword Args:
**connector_ids (list):
The unique ids for the App Connectors that will be added to this App Connector Group.
**city_country (str):
The City and Country for where the App Connectors are located. Format is:
``<City>, <Country Code>`` e.g. ``Sydney, AU``
**country_code (str):
The ISO<std> Country Code that represents the country where the App Connectors are located.
**description (str):
Additional information about the App Connector Group.
**dns_query_type (str):
The type of DNS queries that are enabled for this App Connector Group. Accepted values are:
``IPV4_IPV6``, ``IPV4`` and ``IPV6``
**enabled (bool):
Is the App Connector Group enabled? Defaults to ``True``.
**name (str): The name of the App Connector Group.
**latitude (int): The latitude representing the App Connector's physical location.
**location (str): The name of the location that the App Connector Group represents.
**longitude (int): The longitude representing the App Connector's physical location.
**override_version_profile (bool):
Override the local App Connector version according to ``version_profile``. Defaults to ``False``.
**server_group_ids (list):
The unique ids of the Server Groups that are associated with this App Connector Group
**lss_app_connector_group (bool):
**upgrade_day (str):
The day of the week that upgrades will be pushed to the App Connector.
**upgrade_time_in_secs (str):
The time of the day that upgrades will be pushed to the App Connector.
**version_profile (str):
The version profile to use. This will automatically set ``override_version_profile`` to True.
Accepted values are:
``default``, ``previous_default`` and ``new_release``
Returns:
:obj:`Box`: The updated ZPA App Connector Group resource record.
Examples:
Update the name of an App Connector Group in ZPA, change the version profile to new releases and disable
the group.
>>> group = zpa.connectors.update_connector_group('99999',
... name="Updated App Connector Group",
... version_profile="new_release",
... enabled=False)
"""
# Set payload to equal existing record
payload = {snake_to_camel(k): v for k, v in self.get_connector_group(group_id).items()}
# Perform formatting on simplified params
add_id_groups(self.reformat_params, kwargs, payload)
pick_version_profile(kwargs, payload)
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
resp = self._put(f"appConnectorGroup/{group_id}", json=payload).status_code
if resp == 204:
return self.get_connector_group(group_id)
def delete_connector_group(self, group_id: str) -> int:
"""
Deletes the specified App Connector Group from ZPA.
Args:
group_id (str): The unique identifier for the App Connector Group.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zpa.connectors.delete_connector_group('1876541121')
"""
return self._delete(f"appConnectorGroup/{group_id}").status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/connectors.py | connectors.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, convert_keys, snake_to_camel
class InspectionControllerAPI(APIEndpoint):
@staticmethod
def _create_rule(rule: dict) -> dict:
"""
Creates a rule template for the ZPA Inspection Control API when adding or updating a custom control.
Args:
rule (dict): Custom Control rule.
Returns:
:obj:`dict`: The Custom Control Rule template.
"""
rule_set = {
"names": rule["names"],
"type": rule["type"],
"conditions": [],
}
for condition in rule["conditions"]:
rule_set["conditions"].append(
{
"lhs": condition[0],
"op": condition[1],
"rhs": condition[2],
}
)
return rule_set
def add_custom_control(
self,
name: str,
default_action: str,
severity: str,
type: str,
rules: list,
**kwargs,
) -> Box:
"""
Adds a new ZPA Inspection Custom Control.
Args:
name (str):
The name of the custom control.
default_action (str):
The default action to take for matches against this custom control. Valid options are:
- ``PASS``
- ``BLOCK``
- ``REDIRECT``
severity (str):
The severity for events that match this custom control. Valid options are:
- ``CRITICAL``
- ``ERROR``
- ``WARNING``
- ``INFO``
type (str):
The type of HTTP message this control matches. Valid options are:
- ``REQUEST``
- ``RESPONSE``
rules (list):
A list of Inspection Control rule objects, with each object using the format::
{
"names": ["name1", "name2"],
"type": "rule_type",
"conditions": [
("LHS", "OP", "RHS"),
("LHS", "OP", "RHS"),
],
}
**kwargs: Optional keyword args.
Keyword Args:
**description (str):
Additional information about the custom control.
**paranoia_level (int):
The paranoia level for the custom control.
Returns:
:obj:`Box`: The newly created custom Inspection Control resource record.
Examples:
Create a new custom Inspection Control with the minimum required parameters
.. code-block:: python
print(
zpa.inspection.add_custom_control(
"test8",
severity="INFO",
description="test descr",
paranoia_level="3",
type="REQUEST",
default_action="BLOCK",
rules=[
{
"names": ["test"],
"type": "REQUEST_HEADERS",
"conditions": [("SIZE", "GE", "10"), ("VALUE", "CONTAINS", "test")],
}
],
)
)
"""
payload = {
"name": name,
"defaultAction": default_action,
"severity": severity,
"rules": [],
"type": type,
}
# Use the create_rule method to restructure the Inspection Control rule and add to the payload.
for rule in rules:
payload["rules"].append(self._create_rule(rule))
# Add optional parameters to payload
for key, value in kwargs.items():
payload[key] = value
# Convert snake to camelcase
payload = convert_keys(payload)
return self._post("inspectionControls/custom", json=payload)
def add_profile(self, name: str, paranoia_level: int, predef_controls_version: str, **kwargs):
"""
Adds a ZPA Inspection Profile.
Args:
name (str):
The name of the Inspection Profile.
paranoia_level (int):
The paranoia level for the Inspection Profile.
predef_controls_version (str):
The version of the predefined controls that will be added.
**kwargs:
Additional keyword args.
Keyword Args:
**description (str):
Additional information about the Inspection Profile.
**custom_controls (list):
A tuple list of custom controls to be added to the Inspection profile.
Custom control tuples must follow the convention below:
``(control_id, action)``
e.g.
.. code-block:: python
custom_controls = [(99999, "BLOCK"), (88888, "PASS")]
**predef_controls (list):
A tuple list of predefined controls to be added to the Inspection profile.
Predefined control tuples must follow the convention below:
``(control_id, action)``
e.g.
.. code-block:: python
predef_controls = [(77777, "BLOCK"), (66666, "PASS")]
Returns:
:obj:`Box`: The newly created Inspection Profile resource record.
Examples:
Add a new ZPA Inspection Profile with the minimum required parameters, printing the object to
console after creation:
.. code-block:: python
print(
zpa.inspection.add_profile(
name="predefined_controls",
paranoia_level=3,
predef_controls_version="OWASP_CRS/3.3.0",
)
)
Add a new ZPA Inspection Profile that uses additional predefined controls and custom controls, printing the
object to console after creation:
.. code-block:: python
print(
zpa.inspection.add_profile(
name="block_common_xss",
paranoia_level=2,
predefined_controls=[("99999", "BLOCK")],
predef_controls_version="OWASP_CRS/3.3.0",
custom_controls=[("88888", "BLOCK")],
)
)
"""
# Inspection Profiles require the default predefined controls to be added. zscaler-sdk-python adds these in
# automatically for our users.
predef_controls = self.list_predef_controls("OWASP_CRS/3.3.0")
default_controls = []
for group in predef_controls:
if group.default_group:
default_controls = group.predefined_inspection_controls
payload = {
"name": name,
"paranoiaLevel": paranoia_level,
"predefinedControls": default_controls,
"predefinedControlsVersion": predef_controls_version,
}
# Extend existing list of default predefined controls if the user supplies more
if kwargs.get("predef_controls"):
controls = kwargs.pop("predef_controls")
for control in controls:
payload["predefinedControls"].append({"id": control[0], "action": control[1]})
# Add custom controls if provided
if kwargs.get("custom_controls"):
controls = kwargs.pop("custom_controls")
payload["customControls"] = [{"id": control[0], "action": control[1]} for control in controls]
# Add optional parameters to payload
for key, value in kwargs.items():
payload[key] = value
payload = convert_keys(payload)
return self._post("inspectionProfile", json=payload)
def delete_custom_control(self, control_id: str) -> int:
"""
Deletes the specified custom ZPA Inspection Control.
Args:
control_id (str):
The unique id for the custom control that will be deleted.
Returns:
:obj:`int`: The status code for the operation.
Examples:
Delete a custom ZPA Inspection Control with an id of `99999`.
.. code-block:: python
zpa.inspection.delete_custom_control("99999")
"""
return self._delete(f"inspectionControls/custom/{control_id}").status_code
def delete_profile(self, profile_id: str):
"""
Deletes the specified Inspection Profile.
Args:
profile_id (str):
The unique id for the Inspection Profile that will be deleted.
Returns:
:obj:`int`: The status code for the operation.
Examples:
Delete an Inspection Profile with an id of *999999*:
.. code-block:: python
zpa.inspection.delete_profile("999999")
"""
return self._delete(f"inspectionProfile/{profile_id}").status_code
def get_custom_control(self, control_id: str) -> Box:
"""
Returns the specified custom ZPA Inspection Control.
Args:
control_id (str):
The unique id of the custom ZPA Inspection Control to be returned.
Returns:
:obj:`Box`: The custom ZPA Inspection Control resource record.
Examples:
Print the Custom Inspection Control with an id of `99999`:
.. code-block:: python
print(zpa.inspection.get_custom_control("99999"))
"""
return self._get(f"inspectionControls/custom/{control_id}")
def get_predef_control(self, control_id: str):
"""
Returns the specified predefined ZPA Inspection Control.
Args:
control_id (str):
The unique id of the predefined ZPA Inspection Control to be returned.
Returns:
:obj:`Box`: The ZPA Inspection Predefined Control resource record.
Examples:
Print the ZPA Inspection Predefined Control with an id of `99999`:
.. code-block:: python
print(zpa.inspection.get_predef_control("99999"))
"""
return self._get(f"inspectionControls/predefined/{control_id}")
def get_profile(self, profile_id: str) -> Box:
"""
Returns the specified ZPA Inspection Profile.
Args:
profile_id (str):
The unique id of the ZPA Inspection Profile
Returns:
:obj:`Box`: The specified ZPA Inspection Profile resource record.
Examples:
Print the ZPA Inspection Profile with an id of `99999`:
.. code-block:: python
print(zpa.inspection.get_profile("99999"))
"""
return self._get(f"inspectionProfile/{profile_id}")
def list_control_action_types(self) -> Box:
"""
Returns a list of ZPA Inspection Control Action Types.
Returns:
:obj:`BoxList`: A list containing the ZPA Inspection Control Action Types.
Examples:
Iterate over the ZPA Inspection Control Action Types and print each one:
.. code-block:: python
for action_type in zpa.inspection.list_control_action_types():
print(action_type)
"""
return self._get("inspectionControls/actionTypes")
def list_control_severity_types(self) -> BoxList:
"""
Returns a list of Inspection Control Severity Types.
Returns:
:obj:`BoxList`: A list containing all valid Inspection Control Severity Types.
Examples:
Print all Inspection Control Severity Types
.. code-block:: python
for severity in zpa.inspection.list_control_severity_types():
print(severity)
"""
return self._get("inspectionControls/severityTypes")
def list_control_types(self) -> BoxList:
"""
Returns a list of ZPA Inspection Control Types.
Returns:
:obj:`BoxList`: A list containing ZPA Inspection Control Types.
Examples:
Print all ZPA Inspection Control Types:
.. code-block:: python
for control_type in zpa.inspection.list_control_types():
print(control_type)
"""
return self._get("inspectionControls/controlTypes")
def list_custom_control_types(self) -> BoxList:
"""
Returns a list of custom ZPA Inspection Control Types.
Returns:
:obj:`BoxList`: A list containing custom ZPA Inspection Control Types.
Examples:
Print all custom ZPA Inspection Control Types
.. code-block:: python
for control_type in zpa.inspection.list_custom_control_types():
print(control_type)
"""
return self._get("https://config.private.zscaler.com/mgmtconfig/v1/admin/inspectionControls/customControlTypes")
def list_custom_controls(self, **kwargs) -> BoxList:
"""
Returns a list of all custom ZPA Inspection Controls.
Args:
**kwargs: Optional keyword arguments.
Keyword Args:
**search (str):
The string used to search for a custom control by features and fields.
**sortdir (str):
Specifies the sorting order for the search results.
Accepted values are:
- ``ASC`` - ascending order
- ``DESC`` - descending order
Returns:
:obj:`BoxList`: A list containing all custom ZPA Inspection Controls.
Examples:
Print a list of all custom ZPA Inspection Controls:
.. code-block:: python
for control in zpa.inspection.list_custom_controls():
print(control)
"""
return BoxList(Iterator(self._api, "inspectionControls/custom", **kwargs))
def list_custom_http_methods(self) -> BoxList:
"""
Returns a list of custom ZPA Inspection Control HTTP Methods.
Returns:
:obj:`BoxList`: A list containing custom ZPA Inspection Control HTTP Methods.
Examples:
Print all custom ZPA Inspection Control HTTP Methods:
.. code-block:: python
for method in zpa.inspection.list_custom_http_methods():
print(method)
"""
return self._get("inspectionControls/custom/httpMethods")
def list_predef_control_versions(self) -> BoxList:
"""
Returns a list of predefined ZPA Inspection Control versions.
Returns:
:obj:`BoxList`: A list containing all predefined ZPA Inspection Control versions.
Examples:
Print all predefined ZPA Inspection Control versions::
for version in zpa.inspection.list_predef_control_versions():
print(version)
"""
return self._get("inspectionControls/predefined/versions")
def list_predef_controls(self, version: str, **kwargs) -> BoxList:
"""
Returns a list of predefined ZPA Inspection Controls.
Args:
version (str):
The version of the predefined controls to return.
**kwargs:
Optional keyword args.
Keyword Args:
**search (str):
The string used to search for predefined inspection controls by features and fields.
Returns:
:obj:`BoxList`: A list containing all predefined ZPA Inspection Controls that match the Version and Search
string.
Examples:
Return all predefined ZPA Inspection Controls for the given version:
.. code-block:: python
for control in zpa.inspection.list_predef_controls(version="OWASP_CRS/3.3.0"):
print(control)
Return predefined ZPA Inspection Controls matching a search string:
.. code-block:: python
for control in zpa.inspection.list_predef_controls(search="new_control", version="OWASP_CRS/3.3.0"):
print(control)
"""
payload = {
"version": version,
}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[key] = value
# Convert snake to camelcase
payload = convert_keys(payload)
return self._get("inspectionControls/predefined", params=payload)
def list_profiles(self, **kwargs) -> BoxList:
"""
Returns the list of ZPA Inspection Profiles.
Args:
**kwargs:
Optional keyword args.
Keyword Args:
**pagesize (int):
Specifies the page size. The default size is 20 and the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: The list of ZPA Inspection Profile resource records.
Examples:
Iterate over all ZPA Inspection Profiles and print them:
.. code-block:: python
for profile in zpa.inspection.list_profiles():
print(profile)
"""
return BoxList(Iterator(self._api, "inspectionProfile", **kwargs))
def profile_control_attach(self, profile_id: str, action: str, **kwargs) -> Box:
"""
Attaches or detaches all predefined ZPA Inspection Controls to a ZPA Inspection Profile.
Args:
profile_id (str):
The unique id for the ZPA Inspection Profile that will be modified.
action (str):
The association action that will be taken, accepted values are:
* ``attach``: Attaches all predefined controls to the Inspection Profile with the specified version.
* ``detach``: Detaches all predefined controls from the Inspection Profile.
**kwargs:
Additional keyword arguments.
Keyword Args:
profile_version (str):
The version of the Predefined Controls to attach. Only required when using the
attach action. Defaults to ``OWASP_CRS/3.3.0``.
Returns:
:obj:`Box`: The updated ZPA Inspection Profile resource record.
Examples:
Attach all predefined controls to a ZPA Inspection Profile with an id of 99999:
.. code-block:: python
updated_profile = zpa.inspection.profile_control_attach("99999", action="attach")
Attach all predefined controls to a ZPA Inspection Profile with an id of 99999 and specified version:
.. code-block:: python
updated_profile = zpa.inspection.profile_control_attach(
"99999",
action="attach",
profile_version="OWASP_CRS/3.2.0",
)
Detach all predefined controls from a ZPA Inspection Profile with an id of 99999:
.. code-block:: python
updated_profile = zpa.inspection.profile_control_attach(
"99999",
action="detach",
)
Raises:
ValueError: If an incorrect value is supplied for `action`.
"""
if action == "attach":
payload = {"version": kwargs.pop("profile_version", "OWASP_CRS/3.3.0")}
resp = self._put(
f"inspectionProfile/{profile_id}/associateAllPredefinedControls",
params=payload,
)
return self.get_profile(profile_id) if resp.status_code == 204 else resp.status_code
elif action == "detach":
resp = self._put(f"inspectionProfile/{profile_id}/deAssociateAllPredefinedControls")
return self.get_profile(profile_id) if resp.status_code == 204 else resp.status_code
else:
raise ValueError("Unknown action provided. Valid actions are 'attach' or 'detach'.")
def update_custom_control(self, control_id: str, **kwargs) -> Box:
"""
Updates the specified custom ZPA Inspection Control.
Args:
control_id (str):
The unique id for the custom control that will be updated.
**kwargs:
Optional keyword args.
Keyword Args:
**description (str):
Additional information about the custom control.
**default_action (str):
The default action to take for matches against this custom control. Valid options are:
- ``PASS``
- ``BLOCK``
- ``REDIRECT``
**name (str):
The name of the custom control.
**paranoia_level (int):
The paranoia level for the custom control.
**rules (list):
A list of Inspection Control rule objects, with each object using the format::
{
"names": ["name1", "name2"],
"type": "rule_type",
"conditions": [
("LHS", "OP", "RHS"),
("LHS", "OP", "RHS"),
],
}
**severity (str):
The severity for events that match this custom control. Valid options are:
- ``CRITICAL``
- ``ERROR``
- ``WARNING``
- ``INFO``
**type (str):
The type of HTTP message this control matches. Valid options are:
- ``REQUEST``
- ``RESPONSE``
Returns:
:obj:`Box`: The updated custom ZPA Inspection Control resource record.
Examples:
Update the description of a custom ZPA Inspection Control with an id of 99999:
.. code-block:: python
print(
zpa.inspection.update_custom_control(
"99999",
description="Updated description",
)
)
Update the rules of a custom ZPA Inspection Control with an id of 88888:
.. code-block:: python
print(
zpa.inspection.update_custom_control(
"88888",
rules=[
{
"names": ["xforwardedfor_ge_20"],
"type": "REQUEST_HEADERS",
"conditions": [
("SIZE", "GE", "20"),
("VALUE", "CONTAINS", "X-Forwarded-For"),
],
}
],
)
)
"""
# Set payload to value of existing record and recursively convert nested dict keys from snake_case
# to camelCase.
payload = convert_keys(self.get_custom_control(control_id))
# If the user provides rules for an update, clear the current rules then use the create_rule method to
# restructure the Inspection Control rule and add to the payload.
if kwargs.get("rules"):
payload["rules"] = []
for rule in kwargs.pop("rules"):
payload["rules"].append(self._create_rule(rule))
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
resp = self._put(f"inspectionControls/custom/{control_id}", json=payload).status_code
# Return the object if it was updated successfully
if resp == 204:
return self.get_custom_control(control_id)
def update_profile(self, profile_id: str, **kwargs):
"""
Updates the specified ZPA Inspection Profile.
Args:
profile_id (str):
The unique id for the ZPA Inspection Profile that will be updated.
predef_controls_version (str):
The predefined controls version for the ZPA Inspection Profile. Defaults to `OWASP_CRS/3.3.0`.
**kwargs:
Optional keyword args.
Keyword Args:
**custom_controls (list):
A tuple list of custom controls to be added to the Inspection profile.
Custom control tuples must follow the convention below:
``(control_id, action)``
e.g.
.. code-block:: python
custom_controls = [(99999, "BLOCK"), (88888, "PASS")]
**description (str):
Additional information about the Inspection Profile.
**name (str):
The name of the Inspection Profile.
**paranoia_level (int):
The paranoia level for the Inspection Profile.
**predef_controls (list):
A tuple list of predefined controls to be added to the Inspection profile.
Predefined control tuples must follow the convention below:
``(control_id, action)``
e.g.
.. code-block:: python
predef_controls = [(77777, "BLOCK"), (66666, "PASS")]
**predef_controls_version (str):
The version of the predefined controls that will be added.
Returns:
:obj:`Box`: The updated ZPA Inspection Profile resource record.
Examples:
Update the name and description of a ZPA Inspection Profile with the id 99999:
.. code-block:: python
print(
zpa.inspection.update_profile(
"99999",
name="inspect_common_predef_controls",
description="Inspects common controls from the Predefined set.",
)
)
Add a custom control to the ZPA Inspection Profile with the id 88888:
.. code-block:: python
print(
zpa.inspection.update_profile(
"88888",
custom_controls=[("2", "BLOCK")],
)
)
"""
# Set payload to value of existing record
payload = self.get_profile(profile_id)
payload["predefinedControlsVersion"] = kwargs.get("predef_controls_version", "OWASP_CRS/3.3.0")
# Extend existing list of default predefined controls if the user supplies more
if kwargs.get("predef_controls"):
controls = kwargs.pop("predef_controls")
for control in controls:
payload["predefined_controls"] = [{"id": control[0], "action": control[1]} for control in controls]
# Add custom controls if provided
if kwargs.get("custom_controls"):
controls = kwargs.pop("custom_controls")
payload["custom_controls"] = [{"id": control[0], "action": control[1]} for control in controls]
# Add optional parameters to payload
for key, value in kwargs.items():
payload[key] = value
# Convert from snake case to camel case
payload = convert_keys(payload)
resp = self._put(f"inspectionProfile/{profile_id}", json=payload).status_code
# Return the object if it was updated successfully
if resp == 204:
return self.get_profile(profile_id)
def update_profile_and_controls(self, profile_id: str, inspection_profile: dict, **kwargs):
"""
Updates the inspection profile and controls for the specified ID.
Note:
This method has not been fully implemented and will not be maintained. There seems to be functionality
duplication with the default Inspection Profile update API call. `**kwargs` has been provided as a parameter
for you to be able to add any additional args that Zscaler may add.
If you feel that this is in error and that this functionality should be correctly implemented by zscaler-sdk-python,
`raise an issue <https://github.com/zscaler/zscaler-sdk-python/issues>`_ in the zscaler-sdk-python Github repo.
Args:
profile_id (str):
The unique id of the inspection profile.
inspection_profile (dict):
The new inspection profile object.
**kwargs:
Additional keyword args.
"""
payload = {
"inspection_profile_id": profile_id,
"inspection_profile": inspection_profile,
}
payload = convert_keys(payload)
return self._patch(f"inspectionProfile/{profile_id}/patch", json=payload).status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/inspection.py | inspection.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint, APISession
from zscaler.utils import Iterator
class CertificatesAPI(APIEndpoint):
def __init__(self, api: APISession):
super().__init__(api)
self.v2_url = api.v2_url
def list_browser_access(self, **kwargs) -> BoxList:
"""
Returns a list of all Browser Access certificates.
Args:
**kwargs: Optional keyword args.
Keyword Args:
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**pagesize (int, optional):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: List of all Browser Access certificates.
Examples:
>>> for cert in zpa.certificates.list_browser_access():
... print(cert)
"""
return BoxList(Iterator(self._api, f"{self.v2_url}/clientlessCertificate/issued", **kwargs))
def get_browser_access(self, certificate_id: str) -> Box:
"""
Returns information on a specified Browser Access certificate.
Args:
certificate_id (str):
The unique identifier for the Browser Access certificate.
Returns:
:obj:`Box`:
The Browser Access certificate resource record.
Examples:
>>> ba_certificate = zpa.certificates.get_browser_access('99999')
"""
return self._get(f"clientlessCertificate/{certificate_id}")
def get_enrolment(self, certificate_id: str) -> Box:
"""
Returns information on the specified enrollment certificate.
Args:
certificate_id (str): The unique id of the enrollment certificate.
Returns:
:obj:`Box`: The enrollment certificate resource record.
Examples:
enrolment_cert = zpa.certificates.get_enrolment('99999999')
"""
return self._get(f"enrollmentCert/{certificate_id}")
def list_enrolment(self, **kwargs) -> BoxList:
"""
Returns a list of all configured enrollment certificates.
Args:
**kwargs: Optional keyword args.
Keyword Args:
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**pagesize (int, optional):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: List of all enrollment certificates.
Examples:
>>> for cert in zpa.certificates.list_enrolment():
... print(cert)
"""
return BoxList(Iterator(self._api, f"{self.v2_url}/enrollmentCert", **kwargs)) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/certificates.py | certificates.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, convert_keys, snake_to_camel
class PolicySetsAPI(APIEndpoint):
POLICY_MAP = {
"access": "ACCESS_POLICY",
"timeout": "TIMEOUT_POLICY",
"client_forwarding": "CLIENT_FORWARDING_POLICY",
"siem": "SIEM_POLICY",
}
@staticmethod
def _create_conditions(conditions: list):
"""
Creates a dict template for feeding conditions into the ZPA Policies API when adding or updating a policy.
Args:
conditions (list): List of condition tuples.
Returns:
:obj:`dict`: The conditions template.
"""
template = []
for condition in conditions:
if isinstance(condition, tuple) and len(condition) == 3:
operand = {
"operands": [
{
"objectType": condition[0].upper(),
"lhs": condition[1],
"rhs": condition[2],
}
]
}
template.append(operand)
return template
def get_policy(self, policy_type: str) -> Box:
"""
Returns the policy and rule sets for the given policy type.
Args:
policy_type (str): The type of policy to be returned. Accepted values are:
| ``access`` - returns the Access Policy
| ``timeout`` - returns the Timeout Policy
| ``client_forwarding`` - returns the Client Forwarding Policy
| ``siem`` - returns the SIEM Policy
Returns:
:obj:`Box`: The resource record of the specified policy type.
Examples:
Request the specified Policy.
>>> pprint(zpa.policies.get_policy('access'))
"""
# Map the simplified policy_type name to the name expected by the Zscaler API
mapped_policy_type = self.POLICY_MAP.get(policy_type, None)
# If the user provided an incorrect name, raise an error
if not mapped_policy_type:
raise ValueError(
f"Incorrect policy type provided: {policy_type}\n "
f"Policy type must be 'access', 'timeout', 'client_forwarding' or 'siem'."
)
return self._get(f"policySet/policyType/{mapped_policy_type}")
def get_rule(self, policy_type: str, rule_id: str) -> Box:
"""
Returns the specified policy rule.
Args:
policy_type (str): The type of policy to be returned. Accepted values are:
| ``access``
| ``timeout``
| ``client_forwarding``
| ``siem``
rule_id (str): The unique identifier for the policy rule.
Returns:
:obj:`Box`: The resource record for the requested rule.
Examples:
>>> policy_rule = zpa.policies.get_rule(policy_id='99999',
... rule_id='88888')
"""
# Get the policy id for the supplied policy_type
policy_id = self.get_policy(policy_type).id
return self._get(f"policySet/{policy_id}/rule/{rule_id}")
def list_rules(self, policy_type: str, **kwargs) -> BoxList:
"""
Returns policy rules for a given policy type.
Args:
policy_type (str):
The policy type. Accepted values are:
| ``access`` - returns Access Policy rules
| ``timeout`` - returns Timeout Policy rules
| ``client_forwarding`` - returns Client Forwarding Policy rules
Returns:
:obj:`list`: A list of all policy rules that match the requested type.
Examples:
>>> for policy in zpa.policies.list_type('type')
... pprint(policy)
"""
# Map the simplified policy_type name to the name expected by the Zscaler API
mapped_policy_type = self.POLICY_MAP.get(policy_type, None)
# If the user provided an incorrect name, raise an error
if not mapped_policy_type:
raise ValueError(
f"Incorrect policy type provided: {policy_type}\n "
f"Policy type must be 'access', 'timeout', 'client_forwarding' or 'siem'."
)
return BoxList(Iterator(self._api, f"policySet/rules/policyType/{mapped_policy_type}", **kwargs))
def delete_rule(self, policy_type: str, rule_id: str) -> int:
"""
Deletes the specified policy rule.
Args:
policy_type (str):
The type of policy the rule belongs to. Accepted values are:
| ``access``
| ``timeout``
| ``client_forwarding``
| ``siem``
rule_id (str):
The unique identifier for the policy rule.
Returns:
:obj:`int`: The response code for the operation.
Examples:
>>> zpa.policies.delete_rule(policy_id='99999',
... rule_id='88888')
"""
# Get policy id for specified policy type
policy_id = self.get_policy(policy_type).id
return self._delete(f"policySet/{policy_id}/rule/{rule_id}").status_code
def add_access_rule(self, name: str, action: str, **kwargs) -> Box:
"""
Add a new Access Policy rule.
See the `ZPA Access Policy API reference <https://help.zscaler.com/zpa/access-policy-use-cases>`_
for further detail on optional keyword parameter structures.
Args:
name (str):
The name of the new rule.
action (str):
The action for the policy. Accepted values are:
| ``allow``
| ``deny``
**kwargs:
Optional keyword args.
Keyword Args:
conditions (list):
A list of conditional rule tuples. Tuples must follow the convention: `Object Type`, `LHS value`,
`RHS value`. If you are adding multiple values for the same object type then you will need
a new entry for each value.
E.g.
.. code-block:: python
[('app', 'id', '99999'),
('app', 'id', '88888'),
('app_group', 'id', '77777),
('client_type', 'zpn_client_type_exporter', 'zpn_client_type_zapp'),
('trusted_network', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx', True)]
custom_msg (str):
A custom message.
description (str):
A description for the rule.
Returns:
:obj:`Box`: The resource record of the newly created access policy rule.
"""
# Initialise the payload
payload = {
"name": name,
"action": action.upper(),
"conditions": self._create_conditions(kwargs.pop("conditions", [])),
}
# Get the policy id of the provided policy type for the URL.
policy_id = self.get_policy("access").id
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post(f"policySet/{policy_id}/rule", json=payload)
def add_timeout_rule(self, name: str, **kwargs) -> Box:
"""
Add a new Timeout Policy rule.
See the `ZPA Timeout Policy API reference <https://help.zscaler.com/zpa/timeout-policy-use-cases>`_
for further detail on optional keyword parameter structures.
Args:
name (str):
The name of the new rule.
**kwargs:
Optional parameters.
Keyword Args:
conditions (list):
A list of conditional rule tuples. Tuples must follow the convention: `Object Type`, `LHS value`,
`RHS value`. If you are adding multiple values for the same object type then you will need
a new entry for each value.
E.g.
.. code-block:: python
[('app', 'id', '926196382959075416'),
('app', 'id', '926196382959075417'),
('app_group', 'id', '926196382959075332),
('client_type', 'zpn_client_type_exporter', 'zpn_client_type_zapp'),
('trusted_network', 'b15e4cad-fa6e-8182-9fc3-8125ee6a65e1', True)]
custom_msg (str):
A custom message.
description (str):
A description for the rule.
re_auth_idle_timeout (int):
The re-authentication idle timeout value in seconds.
re_auth_timeout (int):
The re-authentication timeout value in seconds.
Returns:
:obj:`Box`: The resource record of the newly created Timeout Policy rule.
"""
# Initialise the payload
payload = {
"name": name,
"action": "RE_AUTH",
"conditions": self._create_conditions(kwargs.pop("conditions", [])),
}
# Get the policy id of the provided policy type for the URL.
_policy_id = self.get_policy("timeout").id
# Use specified timeouts or default to UI values
payload["reauthTimeout"] = kwargs.get("re_auth_timeout", 172800)
payload["reauthIdleTimeout"] = kwargs.get("re_auth_idle_timeout", 600)
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post(f"policySet/{_policy_id}/rule", json=payload)
def add_client_forwarding_rule(self, name: str, action: str, **kwargs) -> Box:
"""
Add a new Client Forwarding Policy rule.
See the
`ZPA Client Forwarding Policy API reference <https://help.zscaler.com/zpa/client-forwarding-policy-use-cases>`_
for further detail on optional keyword parameter structures.
Args:
name (str):
The name of the new rule.
action (str):
The action for the policy. Accepted values are:
| ``intercept``
| ``intercept_accessible``
| ``bypass``
**kwargs:
Optional keyword args.
Keyword Args:
conditions (list):
A list of conditional rule tuples. Tuples must follow the convention: `Object Type`, `LHS value`,
`RHS value`. If you are adding multiple values for the same object type then you will need
a new entry for each value.
E.g.
.. code-block:: python
[('app', 'id', '926196382959075416'),
('app', 'id', '926196382959075417'),
('app_group', 'id', '926196382959075332),
('client_type', 'zpn_client_type_exporter', 'zpn_client_type_zapp'),
('trusted_network', 'b15e4cad-fa6e-8182-9fc3-8125ee6a65e1', True)]
custom_msg (str):
A custom message.
description (str):
A description for the rule.
Returns:
:obj:`Box`: The resource record of the newly created Client Forwarding Policy rule.
"""
# Initialise the payload
payload = {
"name": name,
"action": action.upper(),
"conditions": self._create_conditions(kwargs.pop("conditions", [])),
}
# Get the policy id of the provided policy type for the URL.
policy_id = self.get_policy("client_forwarding").id
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post(f"policySet/{policy_id}/rule", json=payload)
def update_rule(self, policy_type: str, rule_id: str, **kwargs) -> Box:
"""
Update an existing policy rule.
Ensure you are using the correct arguments for the policy type that you want to update.
Args:
policy_type (str):
The policy type. Accepted values are:
| ``access``
| ``timeout``
| ``client_forwarding``
rule_id (str):
The unique identifier for the rule to be updated.
**kwargs:
Optional keyword args.
Keyword Args:
action (str):
The action for the policy. Accepted values are:
| ``allow``
| ``deny``
| ``intercept``
| ``intercept_accessible``
| ``bypass``
conditions (list):
A list of conditional rule tuples. Tuples must follow the convention: `Object Type`, `LHS value`,
`RHS value`. If you are adding multiple values for the same object type then you will need
a new entry for each value.
E.g.
.. code-block:: python
[('app', 'id', '926196382959075416'),
('app', 'id', '926196382959075417'),
('app_group', 'id', '926196382959075332),
('client_type', 'zpn_client_type_exporter', 'zpn_client_type_zapp'),
('trusted_network', 'b15e4cad-fa6e-8182-9fc3-8125ee6a65e1', True)]
custom_msg (str):
A custom message.
description (str):
A description for the rule.
re_auth_idle_timeout (int):
The re-authentication idle timeout value in seconds.
re_auth_timeout (int):
The re-authentication timeout value in seconds.
Returns:
:obj:`Box`: The updated policy-rule resource record.
Examples:
Updates the name only for an Access Policy rule:
>>> zpa.policies.update_rule('access', '99999', name='new_rule_name')
Updates the action only for a Client Forwarding Policy rule:
>>> zpa.policies.update_rule('client_forwarding', '888888', action='BYPASS')
"""
# Get policy id for specified policy type
policy_id = self.get_policy(policy_type).id
payload = convert_keys(self.get_rule(policy_type, rule_id))
# Add optional parameters to payload
for key, value in kwargs.items():
if key == "conditions":
payload["conditions"] = self._create_conditions(value)
else:
payload[snake_to_camel(key)] = value
resp = self._put(f"policySet/{policy_id}/rule/{rule_id}", json=payload, box=False).status_code
if resp == 204:
return self.get_rule(policy_type, rule_id)
def reorder_rule(self, policy_type: str, rule_id: str, order: str) -> Box:
"""
Change the order of an existing policy rule.
Args:
rule_id (str):
The unique id of the rule that will be reordered.
order (str):
The new order for the rule.
policy_type (str):
The policy type. Accepted values are:
| ``access``
| ``timeout``
| ``client_forwarding``
Returns:
:obj:`Box`: The updated policy rule resource record.
Examples:
Updates the order for an existing policy rule:
>>> zpa.policies.reorder_rule(policy_type='access',
... rule_id='88888',
... order='2')
"""
# Get policy id for specified policy type
policy_id = self.get_policy(policy_type).id
resp = self._put(f"policySet/{policy_id}/rule/{rule_id}/reorder/{order}").status_code
if resp == 204:
return self.get_rule(policy_type, rule_id) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/policies.py | policies.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator
class CloudConnectorGroupsAPI(APIEndpoint):
def list_groups(self, **kwargs) -> BoxList:
"""
Returns a list of all configured cloud connector groups.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: A list of all configured cloud connector groups.
Examples:
>>> for cloud_connector_group in zpa.cloud_connector_groups.list_groups():
... pprint(cloud_connector_group)
"""
return BoxList(Iterator(self._api, "cloudConnectorGroup", **kwargs))
def get_group(self, group_id: str) -> Box:
"""
Returns information on the specified cloud connector group.
Args:
group_id (str):
The unique identifier for the cloud connector group.
Returns:
:obj:`Box`: The resource record for the cloud connector group.
Examples:
>>> pprint(zpa.cloud_connector_groups.get_group('99999'))
"""
return self._get(f"cloudConnectorGroup/{group_id}") | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/cloud_connector_groups.py | cloud_connector_groups.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly import APISession
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator
class IDPControllerAPI(APIEndpoint):
def __init__(self, api: APISession):
super().__init__(api)
self.v2_url = api.v2_url
def list_idps(self, **kwargs) -> BoxList:
"""
Returns a list of all configured IdPs.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**scim_enabled (bool):
Returns all SCIM IdPs if ``True``. Returns all non-SCIM IdPs if ``False``.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: A list of all configured IdPs.
Examples:
>>> for idp in zpa.idp.list_idps():
... pprint(idp)
"""
return BoxList(Iterator(self._api, f"{self.v2_url}/idp", **kwargs))
def get_idp(self, idp_id: str) -> Box:
"""
Returns information on the specified IdP.
Args:
idp_id (str):
The unique identifier for the IdP.
Returns:
:obj:`Box`: The resource record for the IdP.
Examples:
>>> pprint(zpa.idp.get_idp('99999'))
"""
return self._get(f"idp/{idp_id}") | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/idp.py | idp.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, add_id_groups, snake_to_camel
class ServerGroupsAPI(APIEndpoint):
reformat_params = [
("application_ids", "applications"),
("server_ids", "servers"),
("app_connector_group_ids", "appConnectorGroups"),
]
def list_groups(self, **kwargs) -> BoxList:
"""
Returns a list of all configured server groups.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: A list of all configured server groups.
Examples:
>>> for server_group in zpa.server_groups.list_groups():
... pprint(server_group)
"""
return BoxList(Iterator(self._api, "serverGroup", **kwargs))
def get_group(self, group_id: str) -> Box:
"""
Provides information on the specified server group.
Args:
group_id (str):
The unique id for the server group.
Returns:
:obj:`Box`: The resource record for the server group.
Examples:
>>> pprint(zpa.server_groups.get_group('99999'))
"""
return self._get(f"serverGroup/{group_id}")
def delete_group(self, group_id: str) -> int:
"""
Deletes the specified server group.
Args:
group_id (str):
The unique id for the server group to be deleted.
Returns:
:obj:`int`: The response code for the operation.
Examples:
>>> zpa.server_groups.delete_group('99999')
"""
return self._delete(f"serverGroup/{group_id}").status_code
def add_group(self, app_connector_group_ids: list, name: str, **kwargs) -> Box:
"""
Adds a server group.
Args:
name (str):
The name for the server group.
app_connector_group_ids (:obj:`list` of :obj:`str`):
A list of application connector IDs that will be attached to the server group.
**kwargs:
Optional params.
Keyword Args:
application_ids (:obj:`list` of :obj:`str`):
A list of unique IDs of applications to associate with this server group.
config_space (str): The configuration space. Accepted values are `DEFAULT` or `SIEM`.
description (str): Additional information about the server group.
enabled (bool): Enable the server group.
ip_anchored (bool): Enable IP Anchoring.
dynamic_discovery (bool): Enable Dynamic Discovery.
server_ids (:obj:`list` of :obj:`str`):
A list of unique IDs of servers to associate with this server group.
Returns:
:obj:`Box`: The resource record for the newly created server group.
Examples:
Create a server group with the minimum params:
>>> zpa.server_groups.add_group('new_server_group'
... app_connector_group_ids['99999'])
Create a server group and define a new server on the fly:
>>> zpa.server_groups.add_group('new_server_group',
... app_connector_group_ids=['99999'],
... enabled=True,
... servers=[{
... 'name': 'new_server',
... 'address': '10.0.0.30',
... 'enabled': True}])
"""
# Initialise payload
payload = {
"name": name,
"appConnectorGroups": [{"id": group_id} for group_id in app_connector_group_ids],
}
add_id_groups(self.reformat_params, kwargs, payload)
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("serverGroup", json=payload)
def update_group(self, group_id: str, **kwargs) -> Box:
"""
Updates a server group.
Args:
group_id (str, required):
The unique identifier for the server group.
**kwargs: Optional keyword args.
Keyword Args:
app_connector_group_ids (:obj:`list` of :obj:`str`):
A list of application connector IDs that will be attached to the server group.
application_ids (:obj:`list` of :obj:`str`):
A list of unique IDs of applications to associate with this server group.
config_space (str): The configuration space. Accepted values are `DEFAULT` or `SIEM`.
description (str): Additional information about the server group.
enabled (bool): Enable the server group.
ip_anchored (bool): Enable IP Anchoring.
dynamic_discovery (bool): Enable Dynamic Discovery.
server_ids (:obj:`list` of :obj:`str`):
A list of unique IDs of servers to associate with this server group
Returns:
:obj:`Box`: The resource record for the updated server group.
Examples:
Update the name of a server group:
>>> zpa.server_groups.update_group(name='Updated Name')
Enable IP anchoring and Dynamic Discovery:
>>> zpa.server_groups.update_group(ip_anchored=True,
... dynamic_discovery=True)
"""
# Set payload to value of existing record
payload = {snake_to_camel(k): v for k, v in self.get_group(group_id).items()}
add_id_groups(self.reformat_params, kwargs, payload)
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
resp = self._put(f"serverGroup/{group_id}", json=payload, box=False).status_code
if resp == 204:
return self.get_group(group_id) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/server_groups.py | server_groups.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, add_id_groups, convert_keys, snake_to_camel
class AppSegmentsAPI(APIEndpoint):
# Params that need reformatting
reformat_params = [
("clientless_app_ids", "clientlessApps"),
("server_group_ids", "serverGroups"),
]
def list_segments(self, **kwargs) -> BoxList:
"""
Retrieve all configured application segments.
Returns:
:obj:`BoxList`: List of application segments.
Examples:
>>> app_segments = zpa.app_segments.list_segments()
"""
return BoxList(Iterator(self._api, "application", **kwargs))
def get_segment(self, segment_id: str) -> Box:
"""
Get information for an application segment.
Args:
segment_id (str):
The unique identifier for the application segment.
Returns:
:obj:`Box`: The application segment resource record.
Examples:
>>> app_segment = zpa.app_segments.details('99999')
"""
return self._get(f"application/{segment_id}")
def delete_segment(self, segment_id: str, force_delete: bool = False) -> int:
"""
Delete an application segment.
Args:
force_delete (bool):
Setting this field to true deletes the mapping between Application Segment and Segment Group.
segment_id (str):
The unique identifier for the application segment.
Returns:
:obj:`int`: The operation response code.
Examples:
Delete an Application Segment with an id of 99999.
>>> zpa.app_segments.delete('99999')
Force deletion of an Application Segment with an id of 88888.
>>> zpa.app_segments.delete('88888', force_delete=True)
"""
payload = {"forceDelete": force_delete}
return self._delete(f"application/{segment_id}", params=payload).status_code
def add_segment(
self,
name: str,
domain_names: list,
segment_group_id: str,
server_group_ids: list,
tcp_ports: list = None,
udp_ports: list = None,
**kwargs,
) -> Box:
"""
Create an application segment.
Args:
segment_group_id (str):
The unique identifer for the segment group this application segment belongs to.
udp_ports (:obj:`list` of :obj:`str`):
List of udp port range pairs, e.g. ['35000', '35000'] for port 35000.
tcp_ports (:obj:`list` of :obj:`str`):
List of tcp port range pairs, e.g. ['22', '22'] for port 22-22, ['80', '100'] for 80-100.
domain_names (:obj:`list` of :obj:`str`):
List of domain names or IP addresses for the application segment.
name (str):
The name of the application segment.
server_group_ids (:obj:`list` of :obj:`str`):
The list of server group IDs that belong to this application segment.
**kwargs:
Optional keyword args.
Keyword Args:
bypass_type (str):
The type of bypass for the Application Segment. Accepted values are `ALWAYS`, `NEVER` and `ON_NET`.
clientless_app_ids (:obj:`list`):
List of unique IDs for clientless apps to associate with this Application Segment.
config_space (str):
The config space for this Application Segment. Accepted values are `DEFAULT` and `SIEM`.
default_idle_timeout (int):
The Default Idle Timeout for the Application Segment.
default_max_age (int):
The Default Max Age for the Application Segment.
description (str):
Additional information about this Application Segment.
double_encrypt (bool):
Double Encrypt the Application Segment micro-tunnel.
enabled (bool):
Enable the Application Segment.
health_check_type (str):
Set the Health Check Type. Accepted values are `DEFAULT` and `NONE`.
health_reporting (str):
Set the Health Reporting. Accepted values are `NONE`, `ON_ACCESS` and `CONTINUOUS`.
ip_anchored (bool):
Enable IP Anchoring for this Application Segment.
is_cname_enabled (bool):
Enable CNAMEs for this Application Segment.
passive_health_enabled (bool):
Enable Passive Health Checks for this Application Segment.
Returns:
:obj:`Box`: The newly created application segment resource record.
Examples:
Add a new application segment for example.com, ports 8080-8085.
>>> zpa.app_segments.add_segment('new_app_segment',
... domain_names=['example.com'],
... segment_group_id='99999',
... tcp_ports=['8080', '8085'],
... server_group_ids=['99999', '88888'])
"""
# Initialise payload
payload = {
"name": name,
"domainNames": domain_names,
"tcpPortRanges": tcp_ports,
"udpPortRanges": udp_ports,
"segmentGroupId": segment_group_id,
"serverGroups": [{"id": group_id} for group_id in server_group_ids],
}
add_id_groups(self.reformat_params, kwargs, payload)
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("application", json=payload)
def update_segment(self, segment_id: str, **kwargs) -> Box:
"""
Update an application segment.
Args:
segment_id (str):
The unique identifier for the application segment.
**kwargs:
Optional params.
Keyword Args:
bypass_type (str):
The type of bypass for the Application Segment. Accepted values are `ALWAYS`, `NEVER` and `ON_NET`.
clientless_app_ids (:obj:`list`):
List of unique IDs for clientless apps to associate with this Application Segment.
config_space (str):
The config space for this Application Segment. Accepted values are `DEFAULT` and `SIEM`.
default_idle_timeout (int):
The Default Idle Timeout for the Application Segment.
default_max_age (int):
The Default Max Age for the Application Segment.
description (str):
Additional information about this Application Segment.
domain_names (:obj:`list` of :obj:`str`):
List of domain names or IP addresses for the application segment.
double_encrypt (bool):
Double Encrypt the Application Segment micro-tunnel.
enabled (bool):
Enable the Application Segment.
health_check_type (str):
Set the Health Check Type. Accepted values are `DEFAULT` and `NONE`.
health_reporting (str):
Set the Health Reporting. Accepted values are `NONE`, `ON_ACCESS` and `CONTINUOUS`.
ip_anchored (bool):
Enable IP Anchoring for this Application Segment.
is_cname_enabled (bool):
Enable CNAMEs for this Application Segment.
name (str):
The name of the application segment.
passive_health_enabled (bool):
Enable Passive Health Checks for this Application Segment.
segment_group_id (str):
The unique identifer for the segment group this application segment belongs to.
server_group_ids (:obj:`list` of :obj:`str`):
The list of server group IDs that belong to this application segment.
tcp_ports (:obj:`list` of :obj:`tuple`):
List of TCP port ranges specified as a tuple pair, e.g. for ports 21-23, 8080-8085 and 443:
[(21, 23), (8080, 8085), (443, 443)]
udp_ports (:obj:`list` of :obj:`tuple`):
List of UDP port ranges specified as a tuple pair, e.g. for ports 34000-35000 and 36000:
[(34000, 35000), (36000, 36000)]
Returns:
:obj:`Box`: The updated application segment resource record.
Examples:
Rename the application segment for example.com.
>>> zpa.app_segments.update('99999',
... name='new_app_name',
"""
# Set payload to value of existing record and recursively convert nested dict keys from snake_case
# to camelCase.
payload = convert_keys(self.get_segment(segment_id))
if kwargs.get("tcp_ports"):
payload["tcpPortRange"] = [{"from": ports[0], "to": ports[1]} for ports in kwargs.pop("tcp_ports")]
if kwargs.get("udp_ports"):
payload["udpPortRange"] = [{"from": ports[0], "to": ports[1]} for ports in kwargs.pop("udp_ports")]
# Reformat keys that we've simplified for our users
add_id_groups(self.reformat_params, kwargs, payload)
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
resp = self._put(f"application/{segment_id}", json=payload).status_code
# Return the object if it was updated successfully
if resp == 204:
return self.get_segment(segment_id) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/app_segments.py | app_segments.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly import APISession
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, convert_keys, keys_exists, snake_to_camel
class LSSConfigControllerAPI(APIEndpoint):
source_log_map = {
"app_connector_metrics": "zpn_ast_comprehensive_stats",
"app_connector_status": "zpn_ast_auth_log",
"audit_logs": "zpn_audit_log",
"browser_access": "zpn_http_trans_log",
"private_svc_edge_status": "zpn_sys_auth_log",
"user_activity": "zpn_trans_log",
"user_status": "zpn_auth_log",
"web_inspection": "zpn_waf_http_exchanges_log",
}
def __init__(self, api: APISession):
super().__init__(api)
self.v2_url = api.v2_url
self.v2_admin_url = "https://config.private.zscaler.com/mgmtconfig/v2/admin/lssConfig"
def _create_policy(self, conditions: list) -> list:
"""
Creates a dict template for feeding conditions into the ZPA Policies API when adding or updating a policy.
Args:
conditions (list): List of condition tuples.
Returns:
:obj:`dict`: Dictionary containing the LSS Log Receiver Policy conditions template.
"""
template = []
for condition in conditions:
# Template for SAML Policy Rule objects
if isinstance(condition, tuple) and len(condition) == 2 and condition[0] == "saml":
operand = {"operands": [{"objectType": "SAML", "entryValues": []}]}
for item in condition[1]:
entry_values = {
"lhs": item[0],
"rhs": item[1],
}
operand["operands"][0]["entryValues"].append(entry_values)
# Template for client_type Policy Rule objects
elif condition[0] == "client_type":
operand = {
"operands": [
{
"objectType": condition[0].upper(),
"values": [self.get_client_types()[item] for item in condition[1]],
}
]
}
# Template for all other object types
else:
operand = {
"operands": [
{
"objectType": condition[0].upper(),
"values": condition[1],
}
]
}
template.append(operand)
return template
def get_client_types(self) -> Box:
"""
Returns all available LSS Client Types.
Client Types are used when creating LSS Receiver configs. ZPA uses an internal code for Client Types, e.g.
``zpn_client_type_ip_anchoring`` is the Client Type for a ZIA Service Edge. zscaler-sdk-python inverts the key/value so
that you can perform a lookup using a human-readable name in your code (e.g. ``cloud_connector``).
Returns:
:obj:`Box`: Dictionary containing all LSS Client Types with human-readable name as the key.
Examples:
Print all LSS Client Types:
>>> print(zpa.lss.get_client_types())
"""
# ZPA returns a dictionary of client types but the keys are the internal ZPA codes, which our users probably
# won't know. This method reverses the dictionary, converts the 'normalised' Client Type name to snake_case
# before returning it so that a lookup can be easily performed using the Client Type name in plain english.
#
# Example before:
# {'zpn_client_type_exporter': 'Web Browser'}
# Example after:
# {'web_browser': 'zpn_client_type_exporter'}
resp = self._get(f"{self.v2_admin_url}/clientTypes")
reverse_map = {v.lower().replace(" ", "_"): k for k, v in resp.items()}
return Box(reverse_map)
def list_configs(self, **kwargs) -> BoxList:
"""
Returns all configured LSS receivers.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: List of all configured LSS receivers.
Examples:
Print all configured LSS Receivers.
>>> for lss_config in zpa.lss.list_configs():
... print(config)
"""
return BoxList(Iterator(self._api, f"{self.v2_url}/lssConfig", **kwargs))
def get_config(self, lss_id: str) -> Box:
"""
Returns information on the specified LSS Receiver config.
Args:
lss_id (str):
The unique identifier for the LSS Receiver config.
Returns:
:obj:`Box`: The resource record for the LSS Receiver config.
Examples:
Print information on the specified LSS Receiver config.
>>> print(zpa.lss.get_config('99999'))
"""
return self._get(f"{self.v2_url}/lssConfig/{lss_id}")
def get_log_formats(self) -> Box:
"""
Returns all available pre-configured LSS Log Formats.
LSS Log Formats are provided as either CSV, JSON or TSV. LSS Log Format values can be used when
creating or updating LSS Log Receiver configs.
Returns:
:obj:`Box`: Dictionary containing pre-configured LSS Log Formats.
Examples:
>>> for item in zpa.lss.get_log_formats():
... print(item)
"""
return self._get(f"{self.v2_admin_url}/logType/formats")
def get_status_codes(self, log_type: str = "all") -> Box:
"""
Returns a list of LSS Session Status Codes.
The LSS Session Status codes are used to filter the messages received by LSS. LSS Session Status Codes can be
used when adding or updating the filters for an LSS Log Receiver.
Args:
log_type (str):
Filter the LSS Session Status Codes by Log Type, accepted values are:
- ``all``
- ``app_connector_status``
- ``private_svc_edge_status``
- ``user_activity``
- ``user_status``
`Defaults to all.`
Returns:
:obj:`Box`: Dictionary containing all LSS Session Status Codes.
Examples:
Print all LSS Session Status Codes.
>>> for item in zpa.lss.get_status_codes():
... print(item)
Print LSS Session Status Codes for `User Activity` log types.
>>> for item in zpa.lss.get_status_codes(log_type="user_activity"):
... print(item)
"""
if log_type == "all":
return self._get(f"{self.v2_admin_url}/statusCodes")
elif log_type in [
"user_activity",
"user_status",
"private_svc_edge_status",
"app_connector_status",
]:
return self._get(f"{self.v2_admin_url}/statusCodes")[self.source_log_map[log_type]]
else:
raise ValueError("Incorrect log_type provided.")
def add_lss_config(
self,
lss_host: str,
lss_port: str,
name: str,
source_log_type: str,
app_connector_group_ids: list = None,
enabled: bool = True,
source_log_format: str = "csv",
use_tls: bool = False,
**kwargs,
) -> Box:
"""
Adds a new LSS Receiver Config to ZPA.
Args:
app_connector_group_ids (list): A list of unique IDs for the App Connector Groups associated with this
LSS Config. `Defaults to None.`
enabled (bool): Enable the LSS Receiver. `Defaults to True`.
lss_host (str): The IP address of the LSS Receiver.
lss_port (str): The port number for the LSS Receiver.
name (str): The name of the LSS Config.
source_log_format (str):
The format for the logs. Must be one of the following options:
- ``csv`` - send logs in CSV format
- ``json`` - send logs in JSON format
- ``tsv`` - send logs in TSV format
`Defaults to csv.`
source_log_type (str):
The type of logs that will be sent to the receiver as part of this config. Must be one of the following
options:
- ``app_connector_metrics``
- ``app_connector_status``
- ``audit_logs``
- ``browser_access``
- ``private_svc_edge_status``
- ``user_activity``
- ``user_status``
use_tls (bool):
Enable to use TLS on the log traffic between LSS components. `Defaults to False.`
Keyword Args:
description (str):
Additional information about the LSS Config.
filter_status_codes (list):
A list of Session Status Codes that will be excluded by LSS.
log_stream_content (str):
Formatter for the log stream content that will be sent to the LSS Host. Only pass this parameter if you
intend on using custom log stream content.
policy_rules (list):
A list of policy rule tuples. Tuples must follow the convention:
(`object_type`, [`object_id`]).
E.g.
.. code-block:: python
('app_segment_ids', ['11111', '22222']),
('segment_group_ids', ['88888']),
('idp_ids', ['99999']),
('client_type', ['zia_service_edge'])
('saml', [('33333', 'value')])
Returns:
:obj:`Box`: The newly created LSS Config resource record.
Examples:
Add an LSS Receiver config that receives App Connector Metrics logs.
.. code-block:: python
zpa.lss.add_config(
app_connector_group_ids=["app_conn_group_id"],
lss_host="192.0.2.100,
lss_port="8080",
name="app_con_metrics_to_siem",
source_log_type="app_connector_metrics")
Add an LSS Receiver config that receives User Activity logs.
.. code-block:: python
zpa.lss.add_config(
app_connector_group_ids=["app_conn_group_id"],
lss_host="192.0.2.100,
lss_port="8080",
name="user_activity_to_siem",
policy_rules=[
("idp", ["idp_id"]),
("app", ["app_seg_id"]),
("app_group", ["app_seg_group_id"]),
("saml", [("saml_attr_id", "saml_attr_value")]),
],
source_log_type="user_activity")
Add an LSS Receiver config that receives User Status logs.
.. code-block:: python
zpa.lss.add_config(
app_connector_group_ids=["app_conn_group_id"],
lss_host="192.0.2.100,
lss_port="8080",
name="user_activity_to_siem",
policy_rules=[
("idp", ["idp_id"]),
("client_type", ["web_browser", "client_connector"]),
("saml", [("attribute_id", "test3")]),
],
source_log_type="user_status")
"""
source_log_type = self.source_log_map[source_log_type]
# If the user has supplied custom log stream content formatting then we'll use that. Otherwise map the log
# type to internal ZPA log codes and get the preformatted log stream content formatting directly from ZPA.
if kwargs.get("log_stream_content"):
log_stream_content = kwargs.pop("log_stream_content")
else:
log_stream_content = self.get_log_formats()[source_log_type][source_log_format]
payload = {
"config": {
"enabled": enabled,
"lssHost": lss_host,
"lssPort": lss_port,
"name": name,
"format": log_stream_content,
"sourceLogType": source_log_type,
"useTls": use_tls,
},
"connectorGroups": [{"id": group_id} for group_id in app_connector_group_ids],
}
# Convert tuple list to dict and add to payload
if kwargs.get("policy_rules"):
payload["policyRuleResource"] = {
"conditions": self._create_policy(kwargs.pop("policy_rules")),
"name": kwargs.get("policy_name", "placeholder"),
}
# Add Session Status Codes to filter if provided
if kwargs.get("filter_status_codes"):
payload["config"]["filter"] = kwargs.pop("filter_status_codes")
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
# return payload
return self._post(f"{self.v2_url}/lssConfig", json=payload)
def update_lss_config(self, lss_config_id: str, **kwargs):
"""
Update the LSS Receiver Config.
Args:
lss_config_id (str): The unique id for the LSS Receiver config.
**kwargs: Optional keyword args.
Keyword Args:
description (str):
Additional information about the LSS Config.
enabled (bool):
Enable the LSS host. Defaults to ``True``.
filter_status_codes (list):
A list of Session Status Codes that will be excluded by LSS. If you would like to filter all error codes
then pass the string "all".
log_stream_content (str):
Formatter for the log stream content that will be sent to the LSS Host.
policy_rules (list):
A list of policy rule tuples. Tuples must follow the convention:
(`object_type`, [`object_id`]).
E.g.
.. code-block:: python
('app_segment_ids', ['11111', '22222']),
('segment_group_ids', ['88888']),
('idp_ids', ['99999']),
('client_type', ['zpn_client_type_exporter'])
('saml_attributes', [('33333', 'value')])
source_log_format (str):
The format for the logs. Must be one of the following options:
- ``csv`` - send logs in CSV format
- ``json`` - send logs in JSON format
- ``tsv`` - send logs in TSV format
source_log_type (str):
The type of logs that will be sent to the receiver as part of this config. Must be one of the following
options:
- ``app_connector_metrics``
- ``app_connector_status``
- ``audit_logs``
- ``browser_access``
- ``private_svc_edge_status``
- ``user_activity``
- ``user_status``
use_tls (bool):
Enable to use TLS on the log traffic between LSS components. Defaults to ``False``.
Examples:
Update an LSS Log Receiver config to change from user activity to user status.
Note that the ``policy_rules`` will need to be modified to be compatible with the chosen
``source_log_type``.
.. code-block:: python
zpa.lss.update_config(
name="user_status_to_siem",
policy_rules=[
("idp", ["idp_id"]),
("client_type", ["machine_tunnel"]),
("saml", [("attribute_id", "11111")]),
],
source_log_type="user_status")
"""
# Set payload to value of existing record
payload = convert_keys(self.get_config(lss_config_id))
# If the user has supplied custom log stream content formatting then we'll use that. Otherwise, map the log
# type to internal ZPA log codes and get the preformatted log stream content formatting directly from ZPA.
if kwargs.get("log_stream_content"):
payload["config"]["format"] = kwargs.pop("log_stream_content")
elif kwargs.get("source_log_type"):
source_log_type = self.source_log_map[kwargs.pop("source_log_type")]
payload["config"]["sourceLogType"] = source_log_type
payload["config"]["format"] = self.get_log_formats()[source_log_type][kwargs.pop("source_log_format", "csv")]
# Iterate kwargs and update payload for keys that we've renamed.
for k in list(kwargs):
if k in ["name", "lss_host", "lss_port", "enabled", "use_tls"]:
payload["config"][snake_to_camel(k)] = kwargs.pop(k)
elif k == "filter_status_codes":
payload["config"]["filter"] = kwargs.pop(k)
# Convert tuple list to dict and add to payload
if kwargs.get("policy_rules"):
if keys_exists(payload, "policyRuleResource", "name"):
policy_name = payload["policyRuleResource"]["name"]
else:
policy_name = "placeholder"
payload["policyRuleResource"] = {
"conditions": self._create_policy(kwargs.pop("policy_rules")),
"name": kwargs.pop("policy_name", policy_name),
}
# Add additional provided parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
resp = self._put(f"{self.v2_url}/lssConfig/{lss_config_id}", json=payload).status_code
if resp == 204:
return self.get_config(lss_config_id)
def delete_lss_config(self, lss_id: str) -> int:
"""
Delete the specified LSS Receiver Config.
Args:
lss_id (str): The unique identifier for the LSS Receiver Config to be deleted.
Returns:
:obj:`int`:
The response code for the operation.
Examples:
Delete an LSS Receiver config.
>>> zpa.lss.delete_config('99999')
"""
return self._delete(f"{self.v2_url}/lssConfig/{lss_id}").status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/lss.py | lss.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, snake_to_camel
def simplify_key_type(key_type):
# Simplify the key type for our users
if key_type == "connector":
return "CONNECTOR_GRP"
elif key_type == "service_edge":
return "SERVICE_EDGE_GRP"
else:
raise ValueError("Unexpected key type.")
class ProvisioningAPI(APIEndpoint):
def list_provisioning_keys(self, key_type: str, **kwargs) -> BoxList:
"""
Returns a list of all configured provisioning keys that match the specified ``key_type``.
Args:
key_type (str): The type of provisioning key, accepted values are:
``connector`` and ``service_edge``.
**kwargs: Optional keyword args.
Keyword Args:
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**pagesize (int, optional):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: A list containing the requested provisioning keys.
Examples:
List all App Connector provisioning keys.
>>> for key in zpa.provisioning.list_provisioning_keys(key_type="connector"):
... print(key)
List all Service Edge provisioning keys.
>>> for key in zpa.provisioning.list_provisioning_keys(key_type="service_edge"):
... print(key)
"""
return BoxList(
Iterator(
self._api,
f"associationType/{simplify_key_type(key_type)}/provisioningKey",
**kwargs,
)
)
def get_provisioning_key(self, key_id: str, key_type: str) -> Box:
"""
Returns information on the specified provisioning key.
Args:
key_id (str): The unique id of the provisioning key.
key_type (str): The type of provisioning key, accepted values are:
``connector`` and ``service_edge``.
Returns:
:obj:`Box`: The requested provisioning key resource record.
Examples:
Get the specified App Connector key.
>>> provisioning_key = zpa.provisioning.get_provisioning_key("999999",
... key_type="connector")
Get the specified Service Edge key.
>>> provisioning_key = zpa.provisioning.get_provisioning_key("888888",
... key_type="service_edge")
"""
return self._get(f"associationType/{simplify_key_type(key_type)}/provisioningKey/{key_id}")
def add_provisioning_key(
self,
key_type: str,
name: str,
max_usage: str,
enrollment_cert_id: str,
component_id: str,
**kwargs,
) -> Box:
"""
Adds a new provisioning key to ZPA.
Args:
key_type (str): The type of provisioning key, accepted values are:
``connector`` and ``service_edge``.
name (str): The name of the provisioning key.
max_usage (int): The maximum amount of times this key can be used.
enrollment_cert_id (str):
The unique id of the enrollment certificate that will be used for this provisioning key.
component_id (str):
The unique id of the component that this provisioning key will be linked to. For App Connectors, this
will be the App Connector Group Id. For Service Edges, this will be the Service Edge Group Id.
**kwargs: Optional keyword args.
Keyword Args:
enabled (bool): Enable the provisioning key. Defaults to ``True``.
Returns:
:obj:`Box`: The newly created Provisioning Key resource record.
Examples:
Add a new App Connector Provisioning Key that can be used a maximum of 2 times.
>>> key = zpa.provisioning.add_provisioning_key(key_type="connector",
... name="Example App Connector Provisioning Key",
... max_usage=2,
... enrollment_cert_id="99999",
... component_id="888888")
Add a new Service Edge Provisioning Key in the disabled state that can be used once.
>>> key = zpa.provisioning.add_provisioning_key(key_type="service_edge",
... name="Example Service Edge Provisioning Key",
... max_usage=1,
... enrollment_cert_id="99999",
... component_id="777777"
... enabled=False)
"""
payload = {
"name": name,
"maxUsage": max_usage,
"enrollmentCertId": enrollment_cert_id,
"zcomponentId": component_id,
}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post(
f"associationType/{simplify_key_type(key_type)}/provisioningKey",
json=payload,
)
def update_provisioning_key(self, key_id: str, key_type: str, **kwargs) -> Box:
"""
Updates the specified provisioning key.
Args:
key_id (str): The unique id of the Provisioning Key being updated.
key_type (str): The type of provisioning key, accepted values are:
``connector`` and ``service_edge``.
**kwargs: Optional keyword args.
Keyword Args:
name (str): The name of the provisioning key.
max_usage (int): The maximum amount of times this key can be used.
enrollment_cert_id (str):
The unique id of the enrollment certificate that will be used for this provisioning key.
component_id (str):
The unique id of the component that this provisioning key will be linked to. For App Connectors, this
will be the App Connector Group Id. For Service Edges, this will be the Service Edge Group Id.
Returns:
:obj:`Box`: The updated Provisioning Key resource record.
Examples:
Update the name of an App Connector provisioning key:
>>> updated_key = zpa.provisioning.update_provisioning_key('999999',
... key_type="connector",
... name="Updated Name")
Change the max usage of a Service Edge provisioning key:
>>> updated_key = zpa.provisioning.update_provisioning_key('888888',
... key_type="service_edge",
... max_usage=10)
"""
# Get the provided provisioning key record
payload = {snake_to_camel(k): v for k, v in self.get_provisioning_key(key_id, key_type=key_type).items()}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
resp = self._put(
f"associationType/{simplify_key_type(key_type)}/provisioningKey/{key_id}",
json=payload,
).status_code
if resp == 204:
return self.get_provisioning_key(key_id, key_type=key_type)
def delete_provisioning_key(self, key_id: str, key_type: str) -> int:
"""
Deletes the specified provisioning key from ZPA.
Args:
key_id (str): The unique id of the provisioning key that will be deleted.
key_type (str): The type of provisioning key, accepted values are:
``connector`` and ``service_edge``.
Returns:
:obj:`int`: The status code for the operation.
Examples:
Delete an App Connector provisioning key:
>>> zpa.provisioning.delete_provisioning_key(key_id="999999",
... key_type="connector")
Delete a Service Edge provisioning key:
>>> zpa.provisioning.delete_provisioning_key(key_id="888888",
... key_type="service_edge")
"""
return self._delete(
f"associationType/{simplify_key_type(key_type)}/provisioningKey/{key_id}",
box=False,
).status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/provisioning.py | provisioning.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly import APISession
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator
class PostureProfilesAPI(APIEndpoint):
def __init__(self, api: APISession):
super().__init__(api)
self.v2_url = api.v2_url
def list_profiles(self, **kwargs) -> BoxList:
"""
Returns a list of all configured posture profiles.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: A list of all configured posture profiles.
Examples:
>>> for posture_profile in zpa.posture_profiles.list_profiles():
... pprint(posture_profile)
"""
return BoxList(Iterator(self._api, f"{self.v2_url}/posture", **kwargs))
def get_profile(self, profile_id: str) -> Box:
"""
Returns information on the specified posture profiles.
Args:
profile_id (str):
The unique identifier for the posture profiles.
Returns:
:obj:`Box`: The resource record for the posture profiles.
Examples:
>>> pprint(zpa.posture_profiles.get_profile('99999'))
"""
return self._get(f"posture/{profile_id}") | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/posture_profiles.py | posture_profiles.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, add_id_groups, pick_version_profile, snake_to_camel
class ServiceEdgesAPI(APIEndpoint):
# Parameter names that will be reformatted to be compatible with ZPAs API
reformat_params = [
("service_edge_ids", "serviceEdges"),
("trusted_network_ids", "trustedNetworks"),
]
def list_service_edges(self, **kwargs) -> BoxList:
"""
Returns information on all configured ZPA Service Edges.
Args:
**kwargs: Optional keyword args.
Keyword Args:
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**pagesize (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
**search (str, optional):
The search string used to match against a department's name or comments attributes.
Returns:
:obj:`BoxList`: List containing information on all configured ZPA Service Edges.
Examples:
>>> for service_edge in zpa.service_edges.list_service_edges():
... print(service_edge)
"""
return BoxList(Iterator(self._api, "serviceEdge", **kwargs))
def get_service_edge(self, service_edge_id: str) -> Box:
"""
Returns information on the specified Service Edge.
Args:
service_edge_id (str): The unique id of the ZPA Service Edge.
Returns:
:obj:`Box`: The Service Edge resource record.
Examples:
>>> service_edge = zpa.service_edges.get_service_edge('999999')
"""
return self._get(f"serviceEdge/{service_edge_id}")
def update_service_edge(self, service_edge_id: str, **kwargs) -> Box:
"""
Updates the specified ZPA Service Edge.
Args:
service_edge_id (str): The unique id of the Service Edge that will be updated in ZPA.
**kwargs: Optional keyword args.
Keyword Args:
**description (str): Additional information about the Service Edge.
**enabled (bool): Enable the Service Edge. Defaults to ``True``.
**name (str): The name of the Service Edge in ZPA.
Returns:
:obj:`Box`: The updated Service Edge resource record.
Examples:
>>> updated_service_edge = zpa.service_edge.update_service_edge('99999',
... description="Updated Description",
... name="Updated Name")
"""
# Set payload to equal existing record
payload = {snake_to_camel(k): v for k, v in self.get_service_edge(service_edge_id).items()}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
resp = self._put(f"serviceEdge/{service_edge_id}", json=payload).status_code
if resp == 204:
return self.get_service_edge(service_edge_id)
def delete_service_edge(self, service_edge_id: str) -> int:
"""
Deletes the specified Service Edge from ZPA.
Args:
service_edge_id (str): The unique id of the ZPA Service Edge that will be deleted.
Returns:
:obj:`int`: The status code of the operation.
Examples:
>>> zpa.service_edges.delete_service_edge('99999')
"""
return self._delete(f"serviceEdge/{service_edge_id}").status_code
def bulk_delete_service_edges(self, service_edge_ids: list) -> int:
"""
Bulk deletes the specified Service Edges from ZPA.
Args:
service_edge_ids (list): A list of Service Edge ids that will be deleted from ZPA.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zpa.service_edges.bulk_delete_service_edges(['99999', '88888'])
"""
payload = {
"ids": service_edge_ids,
}
return self._post("serviceEdge/bulkDelete", json=payload).status_code
def list_service_edge_groups(self, **kwargs) -> BoxList:
"""
Returns information on all configured Service Edge Groups in ZPA.
Args:
**kwargs: Optional keyword args.
Keyword Args:
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**pagesize (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
**search (str, optional):
The search string used to match against a department's name or comments attributes.
Returns:
:obj:`BoxList`: A list of all ZPA Service Edge Group resource records.
Examples:
Print all Service Edge Groups in ZPA.
>>> for group in zpa.service_edges.list_service_edge_groups():
... print(group)
"""
return BoxList(Iterator(self._api, "serviceEdgeGroup", **kwargs))
def get_service_edge_group(self, group_id: str) -> Box:
"""
Returns information on the specified ZPA Service Edge Group.
Args:
group_id (str): The unique id of the ZPA Service Edge Group.
Returns:
:obj:`Box`: The specified ZPA Service Edge Group resource record.
Examples:
>>> group = zpa.service_edges.get_service_edge_group("99999")
"""
return self._get(f"serviceEdgeGroup/{group_id}")
def add_service_edge_group(self, name: str, latitude: str, longitude: str, location: str, **kwargs):
"""
Adds a new Service Edge Group to ZPA.
Args:
latitude (str): The latitude representing the physical location of the ZPA Service Edges in this group.
longitude (str): The longitude representing the physical location of the ZPA Service Edges in this group.
location (str): The name of the physical location of the ZPA Service Edges in this group.
name (str): The name of the Service Edge Group.
**kwargs: Optional keyword args.
Keyword Args:
**cityCountry (str):
The City and Country for where the App Connectors are located. Format is:
``<City>, <Country Code>`` e.g. ``Sydney, AU``
**country_code (str):
The ISO<std> Country Code that represents the country where the App Connectors are located.
**enabled (bool):
Is the Service Edge Group enabled? Defaults to ``True``.
**is_public (bool):
Is the Service Edge publicly accessible? Defaults to ``False``.
**override_version_profile (bool):
Override the local App Connector version according to ``version_profile``. Defaults to ``False``.
**service_edge_ids (list):
A list of unique ids of ZPA Service Edges that belong to this Service Edge Group.
**trusted_network_ids (list):
A list of unique ids of Trusted Networks that are associated with this Service Edge Group.
**upgrade_day (str):
The day of the week that upgrades will be pushed to the App Connector.
**upgrade_time_in_secs (str):
The time of the day that upgrades will be pushed to the App Connector.
**version_profile (str):
The version profile to use. This will automatically set ``override_version_profile`` to True.
Accepted values are:
``default``, ``previous_default`` and ``new_release``
Returns:
:obj:`Box`: The resource record of the newly created Service Edge Group.
Examples:
Add a new Service Edge Group for Service Edges in Sydney and set the version profile to new releases.
>>> group = zpa.service_edges.add_service_edge_group(name="My SE Group",
... latitude="33.8688",
... longitude="151.2093",
... location="Sydney",
... version_profile="new_release)
"""
payload = {
"name": name,
"latitude": latitude,
"longitude": longitude,
"location": location,
}
# Perform formatting on simplified params
add_id_groups(self.reformat_params, kwargs, payload)
pick_version_profile(kwargs, payload)
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("serviceEdgeGroup", json=payload)
def update_service_edge_group(self, group_id: str, **kwargs) -> Box:
"""
Updates the specified ZPA Service Edge Group.
Args:
group_id (str): The unique id of the ZPA Service Edge Group that will be updated.
**kwargs: Optional keyword args.
Keyword Args:
**cityCountry (str):
The City and Country for where the App Connectors are located. Format is:
``<City>, <Country Code>`` e.g. ``Sydney, AU``
**country_code (str):
The ISO<std> Country Code that represents the country where the App Connectors are located.
**enabled (bool):
Is the Service Edge Group enabled? Defaults to ``True``.
**is_public (bool):
Is the Service Edge publicly accessible? Defaults to ``False``.
**latitude (str):
The latitude representing the physical location of the ZPA Service Edges in this group.
**longitude (str):
The longitude representing the physical location of the ZPA Service Edges in this group.
**location (str): T
he name of the physical location of the ZPA Service Edges in this group.
**name (str):
The name of the Service Edge Group.
**override_version_profile (bool):
Override the local App Connector version according to ``version_profile``. Defaults to ``False``.
**service_edge_ids (list):
A list of unique ids of ZPA Service Edges that belong to this Service Edge Group.
**trusted_network_ids (list):
A list of unique ids of Trusted Networks that are associated with this Service Edge Group.
**upgrade_day (str):
The day of the week that upgrades will be pushed to the Service Edges in this group.
**upgrade_time_in_secs (str):
The time of the day that upgrades will be pushed to the Service Edges in this group.
**version_profile (str):
The version profile to use. This will automatically set ``override_version_profile`` to True.
Accepted values are:
``default``, ``previous_default`` and ``new_release``
Returns:
:obj:`Box`: The updated ZPA Service Edge Group resource record.
Examples:
Update the name of a Service Edge Group, change the Version Profile to 'default' and the upgrade day to
Friday.
>>> group = zpa.service_edges.update_service_edge_group('99999',
... name="Updated Name",
... version_profile="default",
... upgrade_day="friday")
"""
# Set payload to equal existing record
payload = {snake_to_camel(k): v for k, v in self.get_service_edge_group(group_id).items()}
# Perform formatting on simplified params
add_id_groups(self.reformat_params, kwargs, payload)
pick_version_profile(kwargs, payload)
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
resp = self._put(f"serviceEdgeGroup/{group_id}", json=payload).status_code
if resp == 204:
return self.get_service_edge_group(group_id)
def delete_service_edge_group(self, service_edge_group_id: str) -> int:
"""
Deletes the specified Service Edge Group from ZPA.
Args:
service_edge_group_id (str): The unique id of the ZPA Service Edge Group.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zpa.service_edges.delete_service_edge_group("99999")
"""
return self._delete(f"serviceEdgeGroup/{service_edge_group_id}").status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/service_edges.py | service_edges.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, snake_to_camel
class SegmentGroupsAPI(APIEndpoint):
def list_groups(self, **kwargs) -> BoxList:
"""
Returns a list of all configured segment groups.
Returns:
:obj:`BoxList`: A list of all configured segment groups.
Examples:
>>> for segment_group in zpa.segment_groups.list_groups():
... pprint(segment_group)
"""
return BoxList(Iterator(self._api, "segmentGroup", **kwargs))
def get_group(self, group_id: str) -> Box:
"""
Returns information on the specified segment group.
Args:
group_id (str):
The unique identifier for the segment group.
Returns:
:obj:`Box`: The resource record for the segment group.
Examples:
>>> pprint(zpa.segment_groups.get_group('99999'))
"""
return self._get(f"segmentGroup/{group_id}")
def delete_group(self, group_id: str) -> int:
"""
Deletes the specified segment group.
Args:
group_id (str):
The unique identifier for the segment group to be deleted.
Returns:
:obj:`int`: The response code for the operation.
Examples:
>>> zpa.segment_groups.delete_group('99999')
"""
return self._delete(f"segmentGroup/{group_id}").status_code
def add_group(self, name: str, enabled: bool = False, **kwargs) -> Box:
"""
Adds a new segment group.
Args:
name (str):
The name of the new segment group.
enabled (bool):
Enable the segment group. Defaults to False.
**kwargs:
Keyword Args:
application_ids (:obj:`list` of :obj:`dict`):
Unique application IDs to associate with the segment group.
config_space (str):
The config space for the segment group. Can either be DEFAULT or SIEM.
description (str):
A description for the segment group.
policy_migrated (bool):
Returns:
:obj:`Box`: The resource record for the newly created segment group.
Examples:
Creating a segment group with the minimum required parameters:
>>> zpa.segment_groups.add_group('new_segment_group',
... True)
"""
payload = {
"name": name,
"enabled": enabled,
}
if kwargs.get("application_ids"):
payload["applications"] = [{"id": app_id} for app_id in kwargs.pop("application_ids")]
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("segmentGroup", json=payload)
def update_group(self, group_id: str, **kwargs) -> Box:
"""
Updates an existing segment group.
Args:
group_id (str):
The unique identifier for the segment group to be updated.
**kwargs: Optional keyword args.
Keyword Args:
name (str):
The name of the new segment group.
enabled (bool):
Enable the segment group.
application_ids (:obj:`list` of :obj:`dict`):
Unique application IDs to associate with the segment group.
config_space (str):
The config space for the segment group. Can either be DEFAULT or SIEM.
description (str):
A description for the segment group.
policy_migrated (bool):
Returns:
:obj:`Box`: The resource record for the updated segment group.
Examples:
Updating the name of a segment group:
>>> zpa.segment_groups.update_group('99999',
... name='updated_name')
"""
# Set payload to value of existing record
payload = {snake_to_camel(k): v for k, v in self.get_group(group_id).items()}
if kwargs.get("application_ids"):
payload["applications"] = [{"id": app_id} for app_id in kwargs.pop("application_ids")]
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
# ZPA doesn't return the updated resource so let's check our response
# was okay and then return the resource, else return None.
resp = self._put(f"segmentGroup/{group_id}", json=payload, box=False).status_code
if resp == 204:
return self.get_group(group_id) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/segment_groups.py | segment_groups.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint, APISession
from zscaler.utils import Iterator
class SCIMAttributesAPI(APIEndpoint):
def __init__(self, api: APISession):
super().__init__(api)
self.user_config_url = api.user_config_url
def list_attributes_by_idp(self, idp_id: str, **kwargs) -> BoxList:
"""
Returns a list of all configured SCIM attributes for the specified IdP.
Args:
idp_id (str): The unique id of the IdP to retrieve SCIM attributes for.
**kwargs: Optional keyword args.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: A list of all configured SCIM attributes for the specified IdP.
Examples:
>>> for scim_attribute in zpa.scim_attributes.list_attributes_by_idp('99999'):
... pprint(scim_attribute)
"""
return BoxList(Iterator(self._api, f"idp/{idp_id}/scimattribute", **kwargs))
def get_attribute(self, idp_id: str, attribute_id: str) -> Box:
"""
Returns information on the specified SCIM attribute.
Args:
idp_id (str):
The unique id of the Idp corresponding to the SCIM attribute.
attribute_id (str):
The unique id of the SCIM attribute.
Returns:
:obj:`Box`: The resource record for the SCIM attribute.
Examples:
>>> pprint(zpa.scim_attributes.get_attribute('99999',
... scim_attribute_id="88888"))
"""
return self._get(f"idp/{idp_id}/scimattribute/{attribute_id}")
def get_values(self, idp_id: str, attribute_id: str, **kwargs) -> BoxList:
"""
Returns information on the specified SCIM attributes.
Args:
idp_id (str):
The unique identifier for the IDP.
attribute_id (str):
The unique identifier for the attribute.
**kwargs:
Optional keyword args.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: The resource record for the SCIM attribute values.
Examples:
>>> pprint(zpa.scim_attributes.get_values('99999', '88888'))
"""
return BoxList(
Iterator(
self._api,
f"{self.user_config_url}/scimattribute/idpId/{idp_id}/attributeId/{attribute_id}",
**kwargs,
)
) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/scim_attributes.py | scim_attributes.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator
class MachineGroupsAPI(APIEndpoint):
def list_groups(self, **kwargs) -> BoxList:
"""
Returns a list of all configured machine groups.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`list`: A list of all configured machine groups.
Examples:
>>> for machine_group in zpa.machine_groups.list_groups():
... pprint(machine_group)
"""
return BoxList(Iterator(self._api, "machineGroup", **kwargs))
def get_group(self, group_id: str) -> Box:
"""
Returns information on the specified machine group.
Args:
group_id (str):
The unique identifier for the machine group.
Returns:
:obj:`Box`: The resource record for the machine group.
Examples:
>>> pprint(zpa.machine_groups.get_group('99999'))
"""
return self._get(f"machineGroup/{group_id}") | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/machine_groups.py | machine_groups.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly import APISession
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator
class SAMLAttributesAPI(APIEndpoint):
def __init__(self, api: APISession):
super().__init__(api)
self.v2_url = api.v2_url
def list_attributes(self, **kwargs) -> BoxList:
"""
Returns a list of all configured SAML attributes.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: A list of all configured SAML attributes.
Examples:
>>> for saml_attribute in zpa.saml_attributes.list_attributes():
... pprint(saml_attribute)
"""
return BoxList(Iterator(self._api, f"{self.v2_url}/samlAttribute", **kwargs))
def list_attributes_by_idp(self, idp_id: str, **kwargs) -> BoxList:
"""
Returns a list of all configured SAML attributes for the specified IdP.
Args:
idp_id (str): The unique id of the IdP to retrieve SAML attributes from.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: A list of all configured SAML attributes for the specified IdP.
Examples:
>>> for saml_attribute in zpa.saml_attributes.list_attributes_by_idp('99999'):
... pprint(saml_attribute)
"""
return BoxList(Iterator(self._api, f"{self.v2_url}/samlAttribute/idp/{idp_id}", **kwargs))
def get_attribute(self, attribute_id: str) -> Box:
"""
Returns information on the specified SAML attributes.
Args:
attribute_id (str):
The unique identifier for the SAML attributes.
Returns:
:obj:`dict`: The resource record for the SAML attributes.
Examples:
>>> pprint(zpa.saml_attributes.get_attribute('99999'))
"""
return self._get(f"samlAttribute/{attribute_id}") | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/saml_attributes.py | saml_attributes.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from warnings import warn
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator
class ConnectorGroupsAPI(APIEndpoint):
def list_groups(self, **kwargs) -> BoxList:
"""
Returns a list of all connector groups.
Warnings:
.. deprecated:: 0.13.0
Use :func:`zpa.connectors.list_connector_groups` instead.
Returns:
:obj:`BoxList`: List of all configured connector groups.
Examples:
>>> connector_groups = zpa.connector_groups.list_groups()
"""
warn(
"This endpoint is deprecated and will eventually be removed. "
"Use zpa.connectors.list_connector_groups() instead."
)
return BoxList(Iterator(self._api, "appConnectorGroup", **kwargs))
def get_group(self, group_id: str) -> Box:
"""
Get information for a specified connector group.
Warnings:
.. deprecated:: 0.13.0
Use :func:`zpa.connectors.get_connector_group` instead.
Args:
group_id (str):
The unique identifier for the connector group.
Returns:
:obj:`Box`:
The connector group resource record.
Examples:
>>> connector_group = zpa.connector_groups.get_group('2342342354545455')
"""
warn(
"This endpoint is deprecated and will eventually be removed. " "Use zpa.connectors.get_connector_group() instead."
)
return self._get(f"appConnectorGroup/{group_id}") | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/connector_groups.py | connector_groups.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, snake_to_camel
class AppServersAPI(APIEndpoint):
def add_server(self, name: str, address: str, enabled: bool = False, **kwargs) -> Box:
"""
Add a new application server.
Args:
name (str):
The name of the server.
address (str):
The IP address of the server.
enabled (bool):
Enable the server. Defaults to False.
**kwargs:
Optional keyword args.
Keyword Args:
description (str):
A description for the server.
app_server_group_ids (list):
Unique identifiers for the server groups the server belongs to.
config_space (str):
The configuration space for the server. Defaults to DEFAULT.
Returns:
:obj:`Box`: The resource record for the newly created server.
Examples:
Create a server with the minimum required parameters:
>>> zpa.servers.add_server(
... name='myserver.example',
... address='192.0.2.10',
... enabled=True)
"""
payload = {"name": name, "address": address, "enabled": enabled}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("server", json=payload)
def list_servers(self, **kwargs) -> BoxList:
"""
Returns all configured servers.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`BoxList`: List of all configured servers.
Examples:
>>> servers = zpa.servers.list_servers()
"""
return BoxList(Iterator(self._api, "server", **kwargs))
def get_server(self, server_id: str) -> Box:
"""
Gets information on the specified server.
Args:
server_id (str):
The unique identifier for the server.
Returns:
:obj:`Box`: The resource record for the server.
Examples:
>>> server = zpa.servers.get_server('99999')
"""
return self._get(f"server/{server_id}")
def delete_server(self, server_id: str) -> int:
"""
Delete the specified server.
The server must not be assigned to any Server Groups or the operation will fail.
Args:
server_id (str): The unique identifier for the server to be deleted.
Returns:
:obj:`int`: The response code for the operation.
Examples:
>>> zpa.servers.delete_server('99999')
"""
return self._delete(f"server/{server_id}", box=False).status_code
def update_server(self, server_id: str, **kwargs) -> Box:
"""
Updates the specified server.
Args:
server_id (str):
The unique identifier for the server being updated.
**kwargs:
Optional keyword args.
Keyword Args:
name (str):
The name of the server.
address (str):
The IP address of the server.
enabled (bool):
Enable the server.
description (str):
A description for the server.
app_server_group_ids (list):
Unique identifiers for the server groups the server belongs to.
config_space (str):
The configuration space for the server.
Returns:
:obj:`Box`: The resource record for the updated server.
Examples:
Update the name of a server:
>>> zpa.servers.update_server(
... '99999',
... name='newname.example')
Update the address and enable a server:
>>> zpa.servers.update_server(
... '99999',
... address='192.0.2.20',
... enabled=True)
"""
# Set payload to value of existing record
payload = {snake_to_camel(k): v for k, v in self.get_server(server_id).items()}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
resp = self._put(f"server/{server_id}", json=payload, box=False).status_code
if resp == 204:
return self.get_server(server_id) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/servers.py | servers.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"""Zscaler SDK for Python
The zscaler-sdk-python library is a SDK framework for interacting with
Zscaler Private Access (ZPA) and Zscaler Internet Access (ZIA)
Documentation available at https://zscaler-sdk-python.readthedocs.io
"""
__author__ = "Zscaler Inc."
__email__ = "[email protected]"
__version__ = "1.0.0"
import os
from restfly.session import APISession
from zscaler import __version__
from zscaler.zpa.app_segments import AppSegmentsAPI
from zscaler.zpa.certificates import CertificatesAPI
from zscaler.zpa.cloud_connector_groups import CloudConnectorGroupsAPI
from zscaler.zpa.connector_groups import ConnectorGroupsAPI
from zscaler.zpa.connectors import ConnectorsAPI
from zscaler.zpa.idp import IDPControllerAPI
from zscaler.zpa.inspection import InspectionControllerAPI
from zscaler.zpa.isolation_profile import IsolationProfileAPI
from zscaler.zpa.lss import LSSConfigControllerAPI
from zscaler.zpa.machine_groups import MachineGroupsAPI
from zscaler.zpa.policies import PolicySetsAPI
from zscaler.zpa.posture_profiles import PostureProfilesAPI
from zscaler.zpa.provisioning import ProvisioningAPI
from zscaler.zpa.saml_attributes import SAMLAttributesAPI
from zscaler.zpa.scim_attributes import SCIMAttributesAPI
from zscaler.zpa.scim_groups import SCIMGroupsAPI
from zscaler.zpa.segment_groups import SegmentGroupsAPI
from zscaler.zpa.server_groups import ServerGroupsAPI
from zscaler.zpa.servers import AppServersAPI
from zscaler.zpa.service_edges import ServiceEdgesAPI
from zscaler.zpa.session import AuthenticatedSessionAPI
from zscaler.zpa.trusted_networks import TrustedNetworksAPI
class ZPA(APISession):
"""A Controller to access Endpoints in the Zscaler Private Access (ZPA) API.
The ZPA object stores the session token and simplifies access to API interfaces within ZPA.
Attributes:
client_id (str): The ZPA API client ID generated from the ZPA console.
client_secret (str): The ZPA API client secret generated from the ZPA console.
customer_id (str): The ZPA tenant ID found in the Administration > Company menu in the ZPA console.
cloud (str): The Zscaler cloud for your tenancy, accepted values are:
* ``production``
* ``beta``
Defaults to ``production``.
override_url (str):
If supplied, this attribute can be used to override the production URL that is derived
from supplying the `cloud` attribute. Use this attribute if you have a non-standard tenant URL
(e.g. internal test instance etc). When using this attribute, there is no need to supply the `cloud`
attribute. The override URL will be prepended to the API endpoint suffixes. The protocol must be included
i.e. http:// or https://.
"""
_vendor = "Zscaler"
_product = "Zscaler Private Access"
_build = __version__
_box = True
_box_attrs = {"camel_killer_box": True}
_env_base = "ZPA"
_url = "https://config.private.zscaler.com"
def __init__(self, **kw):
self._client_id = kw.get("client_id", os.getenv(f"{self._env_base}_CLIENT_ID"))
self._client_secret = kw.get("client_secret", os.getenv(f"{self._env_base}_CLIENT_SECRET"))
self._customer_id = kw.get("customer_id", os.getenv(f"{self._env_base}_CUSTOMER_ID"))
self._cloud = kw.get("cloud", os.getenv(f"{self._env_base}_CLOUD"))
self._override_url = kw.get("override_url", os.getenv(f"{self._env_base}_OVERRIDE_URL"))
self.conv_box = True
super(ZPA, self).__init__(**kw)
def _build_session(self, **kwargs) -> None:
"""Creates a ZPA API authenticated session."""
super(ZPA, self)._build_session(**kwargs)
# Configure URL base for this API session
if self._override_url:
self.url_base = self._override_url
elif not self._cloud or self._cloud == "production":
self.url_base = "https://config.private.zscaler.com"
elif self._cloud == "beta":
self.url_base = "https://config.zpabeta.net"
else:
raise ValueError("Missing Attribute: You must specify either cloud or override_url")
# Configure URLs for this API session
self._url = f"{self.url_base}/mgmtconfig/v1/admin/customers/{self._customer_id}"
self.user_config_url = f"{self.url_base}/userconfig/v1/customers/{self._customer_id}"
# The v2 URL supports additional API endpoints
self.v2_url = f"{self.url_base}/mgmtconfig/v2/admin/customers/{self._customer_id}"
self._auth_token = self.session.create_token(client_id=self._client_id, client_secret=self._client_secret)
return self._session.headers.update({"Authorization": f"Bearer {self._auth_token}"})
@property
def app_segments(self):
"""
The interface object for the :ref:`ZPA Application Segments interface <zpa-app_segments>`.
"""
return AppSegmentsAPI(self)
@property
def certificates(self):
"""
The interface object for the :ref:`ZPA Browser Access Certificates interface <zpa-certificates>`.
"""
return CertificatesAPI(self)
@property
def isolation_profile(self):
"""
The interface object for the :ref:`ZPA Isolation Profiles <zpa-isolation_profile>`.
"""
return IsolationProfileAPI(self)
@property
def cloud_connector_groups(self):
"""
The interface object for the :ref:`ZPA Cloud Connector Groups interface <zpa-cloud_connector_groups>`.
"""
return CloudConnectorGroupsAPI(self)
@property
def connector_groups(self):
"""
The interface object for the :ref:`ZPA Connector Groups interface <zpa-connector_groups>`.
"""
return ConnectorGroupsAPI(self)
@property
def connectors(self):
"""
The interface object for the :ref:`ZPA Connectors interface <zpa-connectors>`.
"""
return ConnectorsAPI(self)
@property
def idp(self):
"""
The interface object for the :ref:`ZPA IDP interface <zpa-idp>`.
"""
return IDPControllerAPI(self)
@property
def inspection(self):
"""
The interface object for the :ref:`ZPA Inspection interface <zpa-inspection>`.
"""
return InspectionControllerAPI(self)
@property
def lss(self):
"""
The interface object for the :ref:`ZIA Log Streaming Service Config interface <zpa-lss>`.
"""
return LSSConfigControllerAPI(self)
@property
def machine_groups(self):
"""
The interface object for the :ref:`ZPA Machine Groups interface <zpa-machine_groups>`.
"""
return MachineGroupsAPI(self)
@property
def policies(self):
"""
The interface object for the :ref:`ZPA Policy Sets interface <zpa-policies>`.
"""
return PolicySetsAPI(self)
@property
def posture_profiles(self):
"""
The interface object for the :ref:`ZPA Posture Profiles interface <zpa-posture_profiles>`.
"""
return PostureProfilesAPI(self)
@property
def provisioning(self):
"""
The interface object for the :ref:`ZPA Provisioning interface <zpa-provisioning>`.
"""
return ProvisioningAPI(self)
@property
def saml_attributes(self):
"""
The interface object for the :ref:`ZPA SAML Attributes interface <zpa-saml_attributes>`.
"""
return SAMLAttributesAPI(self)
@property
def scim_attributes(self):
"""
The interface object for the :ref:`ZPA SCIM Attributes interface <zpa-scim_attributes>`.
"""
return SCIMAttributesAPI(self)
@property
def scim_groups(self):
"""
The interface object for the :ref:`ZPA SCIM Groups interface <zpa-scim_groups>`.
"""
return SCIMGroupsAPI(self)
@property
def segment_groups(self):
"""
The interface object for the :ref:`ZPA Segment Groups interface <zpa-segment_groups>`.
"""
return SegmentGroupsAPI(self)
@property
def server_groups(self):
"""
The interface object for the :ref:`ZPA Server Groups interface <zpa-server_groups>`.
"""
return ServerGroupsAPI(self)
@property
def servers(self):
"""
The interface object for the :ref:`ZPA Application Servers interface <zpa-app_servers>`.
"""
return AppServersAPI(self)
@property
def service_edges(self):
"""
The interface object for the :ref:`ZPA Service Edges interface <zpa-service_edges>`.
"""
return ServiceEdgesAPI(self)
@property
def session(self):
"""
The interface object for the :ref:`ZPA Session API calls <zpa-session>`.
"""
return AuthenticatedSessionAPI(self)
@property
def trusted_networks(self):
"""
The interface object for the :ref:`ZPA Trusted Networks interface <zpa-trusted_networks>`.
"""
return TrustedNetworksAPI(self) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/__init__.py | __init__.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator
class IsolationProfileAPI(APIEndpoint):
def list_profiles(self, **kwargs) -> BoxList:
"""
Returns a list of all configured isolation profiles.
Keyword Args:
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**search (str, optional):
The search string used to match against features and fields.
Returns:
:obj:`list`: A list of all configured isolation profiles.
Examples:
>>> for isolation_profiles in zpa.isolation_profiles.list_profiles():
... pprint(isolation_profiles)
"""
return BoxList(Iterator(self._api, "isolation/profiles", **kwargs))
def get_profile(self, profile_id: str) -> Box:
"""
Returns information on the specified isolation profile.
Args:
profile_id (str):
The unique identifier for the isolation profile.
Returns:
:obj:`Box`: The resource record for the isolation profile.
Examples:
>>> pprint(zpa.isolation_profiles.get_profile('99999'))
"""
return self._get(f"isolation/profiles/{profile_id}") | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/isolation_profile.py | isolation_profile.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint, APISession
from zscaler.utils import Iterator
class SCIMGroupsAPI(APIEndpoint):
def __init__(self, api: APISession):
super().__init__(api)
self.user_config_url = api.user_config_url
def list_groups(self, idp_id: str, **kwargs) -> BoxList:
"""
Returns a list of all configured SCIM groups for the specified IdP.
Args:
idp_id (str):
The unique id of the IdP.
Keyword Args:
**end_time (str):
The end of a time range for requesting last updated data (modified_time) for the SCIM group.
This requires setting the ``start_time`` parameter as well.
**idp_group_id (str):
The unique id of the IdP group.
**max_items (int):
The maximum number of items to request before stopping iteration.
**max_pages (int):
The maximum number of pages to request before stopping iteration.
**pagesize (int):
Specifies the page size. The default size is 20, but the maximum size is 500.
**scim_user_id (str):
The unique id for the SCIM user.
**search (str, optional):
The search string used to match against features and fields.
**sort_order (str):
Sort the last updated time (modified_time) by ascending ``ASC`` or descending ``DSC`` order. Defaults to
``DSC``.
**start_time (str):
The start of a time range for requesting last updated data (modified_time) for the SCIM group.
This requires setting the ``end_time`` parameter as well.
Returns:
:obj:`list`: A list of all configured SCIM groups.
Examples:
>>> for scim_group in zpa.scim_groups.list_groups("999999"):
... pprint(scim_group)
"""
return BoxList(Iterator(self._api, f"{self.user_config_url}/scimgroup/idpId/{idp_id}", **kwargs))
def get_group(self, group_id: str, **kwargs) -> Box:
"""
Returns information on the specified SCIM group.
Args:
group_id (str):
The unique identifier for the SCIM group.
**kwargs:
Optional keyword args.
Keyword Args:
all_entries (bool):
Return all SCIM groups including the deleted ones if ``True``. Defaults to ``False``.
Returns:
:obj:`dict`: The resource record for the SCIM group.
Examples:
>>> pprint(zpa.scim_groups.get_group('99999'))
"""
return self._get(f"{self.user_config_url}/scimgroup/{group_id}") | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zpa/scim_groups.py | scim_groups.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import BoxList
from restfly.endpoint import APIEndpoint
class SecurityPolicyAPI(APIEndpoint):
def get_whitelist(self) -> BoxList:
"""
Returns a list of whitelisted URLs.
Returns:
:obj:`BoxList`: A list of whitelisted URLs
Examples:
>>> for url in zia.security.get_whitelist():
... pprint(url)
"""
response = self._get("security")
# ZIA removes the whitelistUrls key from the JSON response when it's empty.
if "whitelist_urls" in self._get("security"):
return response.whitelist_urls
else:
return BoxList() # Return empty list so other methods in this class don't break
def get_blacklist(self) -> BoxList:
"""
Returns a list of blacklisted URLs.
Returns:
:obj:`BoxList`: A list of blacklisted URLs
Examples:
>>> for url in zia.security.get_blacklist():
... pprint(url)
"""
return self._get("security/advanced").blacklist_urls
def erase_whitelist(self) -> int:
"""
Erases all URLs in the whitelist.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zia.security.erase_whitelist()
"""
payload = {"whitelistUrls": []}
return self._put("security", json=payload).status_code
def replace_whitelist(self, url_list: list) -> BoxList:
"""
Replaces the existing whitelist with the URLs provided.
Args:
url_list (:obj:`list` of :obj:`str`):
The list of URLs for the new whitelist.
Returns:
:obj:`BoxList`: The complete and updated whitelist.
Examples:
>>> zia.security.replace_whitelist(['example.com'])
"""
payload = {"whitelistUrls": url_list}
return self._put("security", json=payload).whitelist_urls
def add_urls_to_whitelist(self, url_list: list) -> BoxList:
"""
Adds the provided URLs to the whitelist.
Args:
url_list (:obj:`list` of :obj:`str`):
The list of URLs to be added.
Returns:
:obj:`BoxList`: The complete and updated whitelist.
Examples:
>>> zia.security.add_urls_to_whitelist(['example.com', 'web.example.com'])
"""
# Get the current whitelist
whitelist = self.get_whitelist()
# Add existing URLs to whitelist
whitelist.extend(url for url in url_list if url not in whitelist)
payload = {"whitelistUrls": whitelist}
return self._put("security", json=payload).whitelist_urls
def delete_urls_from_whitelist(self, url_list: list) -> BoxList:
"""
Deletes the provided URLs from the whitelist.
Args:
url_list (:obj:`list` of :obj:`str`):
The list of URLs to be deleted.
Returns:
:obj:`BoxList`: The complete and updated whitelist.
Examples:
>>> zia.security.delete_urls_from_whitelist(['example.com', 'web.example.com'])
"""
# Get the current whitelist
whitelist = self.get_whitelist()
# If URLs provided, create new whitelist without them
whitelist = [url for url in whitelist if url not in url_list]
payload = {"whitelistUrls": whitelist}
return self._put("security", json=payload).whitelist_urls
def add_urls_to_blacklist(self, url_list: list) -> BoxList:
"""
Adds the provided URLs to the blacklist.
Args:
url_list (:obj:`list` of :obj:`str`):
The list of URLs to be added.
Returns:
:obj:`BoxList`: The complete and updated blacklist.
Examples:
>>> zia.security.add_urls_to_blacklist(['example.com', 'web.example.com'])
"""
payload = {"blacklistUrls": url_list}
resp = self._post("security/advanced/blacklistUrls?action=ADD_TO_LIST", json=payload).status_code
# Return the object if it was updated successfully
if resp == 204:
return self.get_blacklist()
def replace_blacklist(self, url_list: list) -> BoxList:
"""
Replaces the existing blacklist with the URLs provided.
Args:
url_list (:obj:`list` of :obj:`str`):
The list of URLs for the new blacklist.
Returns:
:obj:`BoxList`: The complete and updated blacklist.
Examples:
>>> zia.security.replace_blacklist(['example.com'])
"""
payload = {"blacklistUrls": url_list}
return self._put("security/advanced", json=payload).blacklist_urls
def erase_blacklist(self) -> int:
"""
Erases all URLs in the blacklist.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zia.security.erase_blacklist()
"""
payload = {"blacklistUrls": []}
return self._put("security/advanced", json=payload, box=False).status_code
def delete_urls_from_blacklist(self, url_list: list) -> int:
"""
Deletes the provided URLs from the blacklist.
Args:
url_list (:obj:`list` of :obj:`str`):
The list of URLs to be deleted.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zia.security.delete_urls_from_blacklist(['example.com', 'web.example.com'])
"""
payload = {"blacklistUrls": url_list}
return self._post(
"security/advanced/blacklistUrls?action=REMOVE_FROM_LIST",
json=payload,
box=False,
).status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/security.py | security.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import snake_to_camel
class URLFilteringAPI(APIEndpoint):
# URL Filtering Policy rule keys that only require an ID to be provided.
_key_id_list = [
"departments",
"devices",
"device_groups",
"groups",
"labels",
"locations",
"location_groups",
"override_users",
"override_groups",
"time_windows",
"users",
]
def list_rules(self) -> BoxList:
"""
Returns the list of URL Filtering Policy rules
Returns:
:obj:`BoxList`: The list of URL Filtering Policy rules.
Examples:
>>> for rule in zia.url_filters.list_rules():
... pprint(rule)
"""
return self._get("urlFilteringRules")
def get_rule(self, rule_id: str) -> Box:
"""
Returns information on the specified URL Filtering Policy rule.
Args:
rule_id (str): The unique ID for the URL Filtering Policy rule.
Returns:
:obj:`Box`: The URL Filtering Policy rule.
Examples:
>>> pprint(zia.url_filters.get_rule('977469'))
"""
return self._get(f"urlFilteringRules/{rule_id}")
def delete_rule(self, rule_id: str) -> int:
"""
Deletes the specified URL Filtering Policy rule.
Args:
rule_id (str): The unique ID for the URL Filtering Policy rule.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zia.url_filters.delete_rule('977463')
"""
return self._delete(f"urlFilteringRules/{rule_id}", box=False).status_code
def add_rule(self, rank: str, name: str, action: str, protocols: list, **kwargs) -> Box:
"""
Adds a new URL Filtering Policy rule.
Args:
rank (str): The admin rank of the user who creates the rule.
name (str): The name of the rule.
action (str): Action taken when traffic matches rule criteria. Accepted values are:
`ANY`, `NONE`, `BLOCK`, `CAUTION`, `ALLOW` and `ICAP_RESPONSE`
device_trust_levels (list): List of device trust levels for which the rule must be applied. Accepted values are:
`ANY`, `UNKNOWN_DEVICETRUSTLEVEL`, `LOW_TRUST`, `MEDIUM_TRUST`, and `HIGH_TRUST`
protocols (list): The protocol criteria for the rule.
**kwargs: Optional keyword args.
Keyword Args:
block_override (bool): When set to true, a 'BLOCK' action triggered by the rule could be overridden.
Defaults to `False`.
ciparule (bool): The CIPA compliance rule is enabled if this is set to `True`. Defaults to `False`.
departments (list): The IDs for the departments that this rule applies to.
devices (list): The IDs for the devices that this rule applies to.
device_groups (list): The IDs for the device groups that this rule applies to.
labels (list): The IDs for the labels that this rule applies to.
description (str): Additional information about the URL Filtering rule.
end_user_notification_url (str): URL of end user notification page to be displayed when the rule is matched.
Not applicable if either ``override_users`` or ``override_groups`` is specified.
enforce_time_validity (bool): Enforce a set validity time period for the URL Filtering rule.
groups (list): The IDs for the groups that this rule applies to.
locations (list): The IDs for the locations that this rule applies to.
location_groups (list): The IDs for the location groups that this rule applies to.
order (str): Order of execution of rule with respect to other URL Filtering rules. Defaults to placing rule
at the bottom of the list.
override_users (list): The IDs of users that this rule can be overridden for.
Only applies if ``block_override`` is True, ``action`` is `BLOCK` and ``override_groups`` is not set.
override_group (list): The IDs of groups that this rule can be overridden for.
Only applies if ``block_override`` is True and ``action`` is `BLOCK`.
request_methods (list): The request methods that this rule will apply to. If not specified, the rule will
apply to all methods.
size_quota (str): Size quota in KB for applying the URL Filtering rule.
time_quota (str): Time quota in minutes elapsed after the URL Filtering rule is applied.
time_windows (list): The IDs for the time windows that this rule applies to.
url_categories (list): The names of URL categories that this rule applies to.
users (list): The IDs for the users that this rule applies to.
validity_start_time (str): Date and time the rule's effects will be valid from. ``enforce_time_validity``
must be set to `True` for this to take effect.
validity_end_time (str): Date and time the rule's effects will end. ``enforce_time_validity`` must be set to
`True` for this to take effect.
validity_time_zone_id (str): The URL Filter rule validity date and time will be based on the TZ provided.
``enforce_time_validity`` must be set to `True` for this to take effect.
Returns:
:obj:`Box`: The newly created URL Filtering Policy rule.
Examples:
Add a rule with the minimum required parameters:
>>> zia.url_filters.add_rule(rank='7',
... name="Empty URL Filter",
... action="ALLOW",
... protocols=['ANY_RULE']
Add a rule to block HTTP POST to Social Media sites for the Finance department.
>>> zia.url_filters.add_rule(rank='7',
... name="Block POST to Social Media",
... action="BLOCK",
... protocols=["HTTP_PROXY", "HTTP_RULE", "HTTPS_RULE"],
... request_methods=['POST'],
... departments=["95022175"],
... url_categories=["SOCIAL_NETWORKING"])
"""
payload = {
"rank": rank,
"name": name,
"action": action,
"protocols": protocols,
"order": kwargs.pop("order", len(self.list_rules())),
}
# Add optional parameters to payload
for key, value in kwargs.items():
if key in self._key_id_list:
payload[snake_to_camel(key)] = []
for item in value:
payload[snake_to_camel(key)].append({"id": item})
else:
payload[snake_to_camel(key)] = value
return self._post("urlFilteringRules", json=payload)
def update_rule(self, rule_id: str, **kwargs) -> Box:
"""
Updates the specified URL Filtering Policy rule.
Args:
rule_id: The unique ID of the URL Filtering Policy rule to be updated.
**kwargs: Optional keyword args.
Keyword Args:
name (str): The name of the rule.
action (str): Action taken when traffic matches rule criteria. Accepted values are:
`ANY`, `NONE`, `BLOCK`, `CAUTION`, `ALLOW` and `ICAP_RESPONSE`
device_trust_levels (list): List of device trust levels for which the rule must be applied. Accepted values are:
`ANY`, `UNKNOWN_DEVICETRUSTLEVEL`, `LOW_TRUST`, `MEDIUM_TRUST`, and `HIGH_TRUST`
protocols (list): The protocol criteria for the rule.
block_override (bool): When set to true, a 'BLOCK' action triggered by the rule could be overridden.
Defaults to `False`.
ciparule (bool): The CIPA compliance rule is enabled if this is set to `True`. Defaults to `False`.
departments (list): The IDs for the departments that this rule applies to.
devices (list): The IDs for the devices that this rule applies to.
device_groups (list): The IDs for the device groups that this rule applies to.
labels (list): The IDs for the labels that this rule applies to.
description (str): Additional information about the URL Filtering rule.
end_user_notification_url (str): URL of end user notification page to be displayed when the rule is matched.
Not applicable if either ``override_users`` or ``override_groups`` is specified.
enforce_time_validity (bool): Enforce a set validity time period for the URL Filtering rule.
groups (list): The IDs for the groups that this rule applies to.
locations (list): The IDs for the locations that this rule applies to.
location_groups (list): The IDs for the location groups that this rule applies to.
order (str): Order of execution of rule with respect to other URL Filtering rules. Defaults to placing rule
at the bottom of the list.
override_users (list): The IDs of users that this rule can be overridden for.
Only applies if ``block_override`` is True, ``action`` is `BLOCK` and ``override_groups`` is not set.
override_group (list): The IDs of groups that this rule can be overridden for.
Only applies if ``block_override`` is True and ``action`` is `BLOCK`.
request_methods (list): The request methods that this rule will apply to. If not specified, the rule will
apply to all methods.
size_quota (str): Size quota in KB for applying the URL Filtering rule.
time_quota (str): Time quota in minutes elapsed after the URL Filtering rule is applied.
time_windows (list): The IDs for the time windows that this rule applies to.
url_categories (list): The names of URL categories that this rule applies to.
users (list): The IDs for the users that this rule applies to.
validity_start_time (str): Date and time the rule's effects will be valid from. ``enforce_time_validity``
must be set to `True` for this to take effect.
validity_end_time (str): Date and time the rule's effects will end. ``enforce_time_validity`` must be set to
`True` for this to take effect.
validity_time_zone_id (str): The URL Filter rule validity date and time will be based on the TZ provided.
``enforce_time_validity`` must be set to `True` for this to take effect.
Returns:
:obj:`Box`: The updated URL Filtering Policy rule.
Examples:
Update the name of a URL Filtering Policy rule:
>>> zia.url_filters.update_rule('977467',
... name="Updated Name")
Add GET to request methods and change action to ALLOW:
>>> zia.url_filters.update_rule('977468',
... request_methods=['POST', 'GET'],
... action="ALLOW")
"""
# Set payload to value of existing record
payload = {snake_to_camel(k): v for k, v in self.get_rule(rule_id).items()}
# Add optional parameters to payload
for key, value in kwargs.items():
if key in self._key_id_list:
payload[snake_to_camel(key)] = []
for item in value:
payload[snake_to_camel(key)].append({"id": item})
else:
payload[snake_to_camel(key)] = value
return self._put(f"urlFilteringRules/{rule_id}", json=payload) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/url_filters.py | url_filters.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box
from restfly.endpoint import APIEndpoint
class AuditLogsAPI(APIEndpoint):
def status(self) -> Box:
"""
Get the status of a request for an audit log report.
Returns:
:obj:`Box`: Audit log report request status.
Examples:
>>> print(zia.audit_logs.status())
"""
return self._get("auditlogEntryReport")
def create(self, start_time: str, end_time: str) -> int:
"""
Creates an audit log report for the specified time period and saves it as a CSV file. The report
includes audit information for every call made to the cloud service API during the specified time period.
Creating a new audit log report will overwrite a previously-generated report.
Args:
start_time (str):
The timestamp, in epoch, of the admin's last login.
end_time (str):
The timestamp, in epoch, of the admin's last logout.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zia.audit_logs.create(start_time='1627221600000',
... end_time='1627271676622')
"""
payload = {
"startTime": start_time,
"endTime": end_time,
}
return self._post("auditlogEntryReport", json=payload, box=False).status_code
def cancel(self) -> int:
"""
Cancels the request to create an audit log report.
Returns:
:obj:`int`: The operation response code.
Examples:
>>> zia.audit_logs.cancel()
"""
return self._delete("auditlogEntryReport", box=False).status_code
def get_report(self) -> str:
"""
Returns the most recently created audit log report.
Returns:
:obj:`str`: String representation of CSV file.
Examples:
Write report to CSV file:
>>> with open("audit_log.csv", "w+") as fh:
... fh.write(zia.audit_logs.get_report())
"""
return self._get("auditlogEntryReport/download").text | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/audit_logs.py | audit_logs.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, snake_to_camel
class LocationsAPI(APIEndpoint):
def list_locations(self, **kwargs) -> BoxList:
"""
Returns a list of locations.
Keyword Args:
**auth_required (bool, optional):
Filter based on whether the Enforce Authentication setting is enabled or disabled for a location.
**bw_enforced (bool, optional):
Filter based on whether Bandwith Control is being enforced for a location.
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
**search (str, optional):
The search string used to partially match against a location's name and port attributes.
**xff_enabled (bool, optional):
Filter based on whether the Enforce XFF Forwarding setting is enabled or disabled for a location.
Returns:
:obj:`BoxList`: List of configured locations.
Examples:
List locations using default settings:
>>> for location in zia.locations.list_locations():
... print(location)
List locations, limiting to a maximum of 10 items:
>>> for location in zia.locations.list_locations(max_items=10):
... print(location)
List locations, returning 200 items per page for a maximum of 2 pages:
>>> for location in zia.locations.list_locations(page_size=200, max_pages=2):
... print(location)
"""
return BoxList(Iterator(self._api, "locations", **kwargs))
def add_location(self, name: str, **kwargs) -> Box:
"""
Adds a new location.
Args:
name (str):
Location name.
Keyword Args:
ip_addresses (list):
For locations: IP addresses of the egress points that are provisioned in the Zscaler Cloud.
Each entry is a single IP address (e.g., 238.10.33.9).
For sub-locations: Egress, internal, or GRE tunnel IP addresses. Each entry is either a single
IP address, CIDR (e.g., 10.10.33.0/24), or range (e.g., 10.10.33.1-10.10.33.10)).
ports (:obj:`list` of :obj:`str`):
List of whitelisted Proxy ports for the location.
vpn_credentials (dict):
VPN credentials for the location.
Returns:
:obj:`Box`: The newly created location resource record
Examples:
Add a new location with an IP address.
>>> zia.locations.add_location(name='new_location',
... ip_addresses=['203.0.113.10'])
"""
payload = {
"name": name,
}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("locations", json=payload)
def get_location(self, location_id: str = None, location_name: str = None) -> Box:
"""
Returns information for the specified location based on the location id or location name.
Args:
location_id (str, optional):
The unique identifier for the location.
location_name (str, optional):
The unique name for the location.
Returns:
:obj:`Box`: The requested location resource record.
Examples:
>>> location = zia.locations.get_location('97456691')
>>> location = zia.locations.get_location_name(name='stockholm_office')
"""
if location_id and location_name:
raise ValueError("TOO MANY ARGUMENTS: Expected either location_id or location_name. Both were provided.")
elif location_name:
location = (record for record in self.list_locations(search=location_name) if record.name == location_name)
return next(location, None)
return self._get(f"locations/{location_id}")
def list_sub_locations(self, location_id: str, **kwargs) -> BoxList:
"""
Returns sub-location information for the specified location ID.
Args:
location_id (str):
The unique identifier for the parent location.
**kwargs:
Optional keyword args.
Keyword Args:
**auth_required (bool, optional):
Filter based on whether the Enforce Authentication setting is enabled or disabled for a location.
**bw_enforced (bool, optional):
Filter based on whether Bandwith Control is being enforced for a location.
**enable_firewall (bool, optional):
Filter based on whether Enable Firewall setting is enabled or disabled for a sub-location.
**enforce_aup (bool, optional):
Filter based on whether Enforce AUP setting is enabled or disabled for a sub-location.
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
**search (str, optional):
The search string used to partially match against a location's name and port attributes.
**xff_enabled (bool, optional):
Filter based on whether the Enforce XFF Forwarding setting is enabled or disabled for a location.
Returns:
:obj:`BoxList`: A list of sub-locations configured for the parent location.
Examples:
>>> for sub_location in zia.locations.list_sub_locations('97456691'):
... pprint(sub_location)
"""
return BoxList(
Iterator(
self._api,
f"locations/{location_id}/sublocations",
max_pages=1,
**kwargs,
)
)
def list_locations_lite(self, **kwargs) -> BoxList:
"""
Returns only the name and ID of all configured locations.
Keyword Args:
**include_parent_locations (bool, optional):
Only locations with sub-locations will be included in the response if `True`.
**include_sub_locations (bool, optional):
Sub-locations will be included in the response if `True`.
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
**search (str, optional):
The search string used to partially match against a location's name and port attributes.
Returns:
:obj:`BoxList`: A list of configured locations.
Examples:
List locations with default settings:
>>> for location in zia.locations.list_locations_lite():
... print(location)
List locations, limiting to a maximum of 10 items:
>>> for location in zia.locations.list_locations_lite(max_items=10):
... print(location)
List locations, returning 200 items per page for a maximum of 2 pages:
>>> for location in zia.locations.list_locations_lite(page_size=200, max_pages=2):
... print(location)
"""
return BoxList(Iterator(self._api, "locations/lite", **kwargs))
def update_location(self, location_id: str, **kwargs) -> Box:
"""
Update the specified location.
Note: Changes are not additive and will replace existing values.
Args:
location_id (str):
The unique identifier for the location you are updating.
**kwargs:
Optional keyword args.
Keyword Args:
ip_addresses (:obj:`list` of :obj:`str`):
List of updated ip addresses.
ports (:obj:`list` of :obj:`str`):
List of whitelisted Proxy ports for the location.
vpn_credentials (dict):
VPN credentials for the location.
Returns:
:obj:`Box`: The updated resource record.
Examples:
Update the name of a location:
>>> zia.locations.update('97456691',
... name='updated_location_name')
Upodate the IP address of a location:
>>> zia.locations.update('97456691',
... ip_addresses=['203.0.113.20'])
"""
# Set payload to value of existing record
payload = {snake_to_camel(k): v for k, v in self.get_location(location_id).items()}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._put(f"locations/{location_id}", json=payload)
def delete_location(self, location_id: str) -> int:
"""
Deletes the location or sub-location for the specified ID
Args:
location_id (str):
The unique identifier for the location or sub-location.
Returns:
:obj:`int`: Response code for the operation.
Examples:
>>> zia.locations.delete_location('97456691')
"""
return self._delete(f"locations/{location_id}", box=False).status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/locations.py | locations.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import snake_to_camel
class DLPAPI(APIEndpoint):
def add_dict(self, name: str, match_type: str, **kwargs) -> Box:
"""
Add a new Patterns and Phrases DLP Dictionary to ZIA.
Args:
name (str): The name of the DLP Dictionary.
match_type (str): The DLP custom phrase/pattern match type. Accepted values are ``all`` or ``any``.
**kwargs: Optional keyword args.
Keyword Args:
description (str): Additional information about the DLP Dictionary.
phrases (list):
A list of DLP phrases, with each phrase provided by a tuple following the convention
(`action`, `pattern`). Accepted actions are ``all`` or ``unique``. E.g.
.. code-block:: python
('all', 'TOP SECRET')
('unique', 'COMMERCIAL-IN-CONFIDENCE')
patterns (list):
A list of DLP patterns, with each pattern provided by a tuple following the convention
(`action`, `pattern`). Accepted actions are ``all`` or ``unique``. E.g.
.. code-block:: python
('all', '\d{2} \d{3} \d{3} \d{3}')
('unique', '[A-Z]{6}[A-Z0-9]{2,5}')
Returns:
:obj:`Box`: The newly created DLP Dictionary resource record.
Examples:
Match text found that contains an IPv4 address using patterns:
>>> zia.dlp.add_dict(name='IPv4 Addresses',
... description='Matches IPv4 address pattern.',
... match_type='all',
... patterns=[
... ('all', '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(/(\d|[1-2]\d|3[0-2]))?')
... ]))
Match text found that contains government document caveats using phrases.
>>> zia.dlp.add_dict(name='Gov Document Caveats',
... description='Matches government classification caveats.',
... match_type='any',
... phrases=[
... ('all', 'TOP SECRET'),
... ('all', 'SECRET'),
... ('all', 'CONFIDENTIAL')
... ]))
Match text found that meets the criteria for a Secret Project's document markings using phrases and
patterns:
>>> zia.dlp.add_dict(name='Secret Project Documents',
... description='Matches documents created for the Secret Project.',
... match_type='any',
... phrases=[
... ('all', 'Project Umbrella'),
... ('all', 'UMBRELLA')
... ],
... patterns=[
... ('unique', '\d{1,2}-\d{1,2}-[A-Z]{5}')
... ]))
"""
payload = {
"name": name,
"dictionaryType": "PATTERNS_AND_PHRASES",
}
# Simplify Zscaler's required values for our users.
if match_type == "all":
payload["customPhraseMatchType"] = "MATCH_ALL_CUSTOM_PHRASE_PATTERN_DICTIONARY"
elif match_type == "any":
payload["customPhraseMatchType"] = "MATCH_ANY_CUSTOM_PHRASE_PATTERN_DICTIONARY"
else:
raise ValueError
if kwargs.get("patterns"):
for pattern in kwargs.pop("patterns"):
payload.setdefault("patterns", []).append(
{
"action": f"PATTERN_COUNT_TYPE_{pattern[0].upper()}",
"pattern": pattern[1],
}
)
if kwargs.get("phrases"):
for phrase in kwargs.pop("phrases"):
payload.setdefault("phrases", []).append(
{
"action": f"PHRASE_COUNT_TYPE_{phrase[0].upper()}",
"phrase": phrase[1],
}
)
# Update payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("dlpDictionaries", json=payload)
def update_dict(self, dict_id: str, **kwargs) -> Box:
"""
Updates the specified DLP Dictionary.
Args:
dict_id (str): The unique id of the DLP Dictionary.
**kwargs: Optional keyword args.
Keyword Args:
description (str): Additional information about the DLP Dictionary.
match_type (str): The DLP custom phrase/pattern match type. Accepted values are ``all`` or ``any``.
name (str): The name of the DLP Dictionary.
phrases (list):
A list of DLP phrases, with each phrase provided by a tuple following the convention
(`action`, `pattern`). Accepted actions are ``all`` or ``unique``. E.g.
.. code-block:: python
('all', 'TOP SECRET')
('unique', 'COMMERCIAL-IN-CONFIDENCE')
patterns (list):
A list of DLP pattersn, with each pattern provided by a tuple following the convention
(`action`, `pattern`). Accepted actions are ``all`` or ``unique``. E.g.
.. code-block:: python
('all', '\d{2} \d{3} \d{3} \d{3}')
('unique', '[A-Z]{6}[A-Z0-9]{2,5}')
Returns:
:obj:`Box`: The updated DLP Dictionary resource record.
Examples:
Update the name of a DLP Dictionary:
>>> zia.dlp.update_dict('3',
... name='IPv4 and IPv6 Addresses')
Update the description and phrases for a DLP Dictionary.
>>> zia.dlp.update_dict('4',
... description='Updated government caveats.'
... phrases=[
... ('all', 'TOP SECRET'),
... ('all', 'SECRET'),
... ('all', 'PROTECTED')
... ])
"""
# Set payload to value of existing record
payload = {snake_to_camel(k): v for k, v in self.get_dict(dict_id).items()}
if kwargs.get("match_type"):
match_type = kwargs.pop("match_type")
if match_type == "all":
payload["customPhraseMatchType"] = "MATCH_ALL_CUSTOM_PHRASE_PATTERN_DICTIONARY"
elif match_type == "any":
payload["customPhraseMatchType"] = "MATCH_ANY_CUSTOM_PHRASE_PATTERN_DICTIONARY"
else:
raise ValueError
# If patterns or phrases provided, overwrite existing values
if kwargs.get("patterns"):
payload["patterns"] = []
for pattern in kwargs.pop("patterns"):
payload.setdefault("patterns", []).append(
{
"action": f"PATTERN_COUNT_TYPE_{pattern[0].upper()}",
"pattern": pattern[1],
}
)
if kwargs.get("phrases"):
payload["phrases"] = []
for phrase in kwargs.pop("phrases"):
payload["phrases"].append(
{
"action": f"PHRASE_COUNT_TYPE_{phrase[0].upper()}",
"phrase": phrase[1],
}
)
# Update payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._put(f"dlpDictionaries/{dict_id}", json=payload)
def list_dicts(self, query: str = None) -> BoxList:
"""
Returns a list of all custom and predefined ZIA DLP Dictionaries.
Args:
query (str): A search string used to match against a DLP dictionary's name or description attributes.
Returns:
:obj:`BoxList`: A list containing ZIA DLP Dictionaries.
Examples:
Print all dictionaries
>>> for dictionary in zia.dlp.list_dicts():
... pprint(dictionary)
Print dictionaries that match the name or description 'GDPR'
>>> pprint(zia.dlp.list_dicts('GDPR'))
"""
payload = {"search": query}
return self._get("dlpDictionaries", params=payload)
def get_dict(self, dict_id: str) -> Box:
"""
Returns the DLP Dictionary that matches the specified DLP Dictionary id.
Args:
dict_id (str): The unique id for the DLP Dictionary.
Returns:
:obj:`Box`: The ZIA DLP Dictionary resource record.
Examples:
>>> pprint(zia.dlp.get_dict('3'))
"""
return self._get(f"dlpDictionaries/{dict_id}")
def delete_dict(self, dict_id: str) -> int:
"""
Deletes the DLP Dictionary that matches the specified DLP Dictionary id.
Args:
dict_id (str): The unique id for the DLP Dictionary.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zia.dlp.delete_dict('8')
"""
return self._delete(f"dlpDictionaries/{dict_id}", box=False).status_code
def validate_dict(self, pattern: str) -> Box:
"""
Validates the provided pattern for usage in a DLP Dictionary.
Note: The ZIA API documentation doesn't provide information on how to structure a request for this API endpoint.
This endpoint is returning a valid response but validation isn't failing for obvious wrong patterns. Use at
own risk.
Args:
pattern (str): DLP Pattern for evaluation.
Returns:
:obj:`Box`: Information on the provided pattern.
"""
payload = {"data": pattern}
return self._post("dlpDictionaries/validateDlpPattern", json=payload) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/dlp.py | dlp.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box
from restfly.endpoint import APIEndpoint
from zscaler.utils import obfuscate_api_key
class AuthenticatedSessionAPI(APIEndpoint):
def status(self) -> Box:
"""
Returns the status of the authentication session if it exists.
Returns:
:obj:`Box`: Session authentication information.
Examples:
>>> print(zia.session.status())
"""
return self._get("authenticatedSession")
def create(self, api_key: str, username: str, password: str) -> Box:
"""
Creates a ZIA authentication session.
Args:
api_key (str): The ZIA API Key.
username (str): Username of admin user for the authentication session.
password (str): Password of the admin user for the authentication session.
Returns:
:obj:`Box`: The authenticated session information.
# THIS IS A FAKE (EXAMPLE) USERNAME AND PASSWORD AND NOT USED IN PRODUCTION
Examples:
>>> zia.session.create(api_key='12khsdfh3289',
... username='[email protected]',
... password='MyInsecurePassword')
"""
api_obf = obfuscate_api_key(api_key)
payload = {
"apiKey": api_obf["key"],
"username": username,
"password": password,
"timestamp": api_obf["timestamp"],
}
return self._post("authenticatedSession", json=payload)
def delete(self) -> int:
"""
Ends an authentication session.
Returns:
:obj:`int`: The status code of the operation.
Examples:
>>> zia.session.delete()
"""
return self._delete("authenticatedSession", box=False).status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/session.py | session.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
import json
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
class WebDLP(APIEndpoint):
def list_rules(self, **kwargs) -> BoxList:
"""
Returns a list of DLP policy rules, excluding SaaS Security API DLP policy rules.
Returns:
:obj:`BoxList`: List of Web DLP items.
Examples:
Get a list of all Web DLP Items
>>> results = zia.web_dlp.list_rules()
... for item in results:
... print(item)
"""
return self._get("webDlpRules")
def get_rule(self, rule_id: str) -> Box:
"""
Returns a DLP policy rule, excluding SaaS Security API DLP policy rules.
Args:
rule_id (str): The unique id for the Web DLP rule.
Returns:
:obj:`Box`: The Web DLP Rule resource record.
Examples:
Get information on a Web DLP item by ID
>>> results = zia.web_dlp.get_rule(rule_id='9999')
... print(results)
"""
return self._get(f"webDlpRules/{rule_id}")
def list_rules_lite(self) -> BoxList:
"""
Returns the name and ID for all DLP policy rules, excluding SaaS Security API DLP policy rules.
Returns:
:obj:`BoxList`: List of Web DLP name/ids.
Examples:
Get Web DLP Lite results
>>> results = zia.web_dlp.list_rules_lite()
... for item in results:
... print(item)
"""
return self._get("webDlpRules/lite")
def add_rule(self, payload: json) -> Box:
"""
Adds a new DLP policy rule.
Args:
payload (dict): Dictionary containing the Web DLP Policy rule to be added.
Returns:
:obj:`Box`: The newly added Web DLP Policy Rule resource record.
Payload:
Minimum items required in payload::
payload = {
'order': 1, # A number greater than 0.
'rank': 0,
'name': "zscaler-sdk-python post.",
'protocols': ["ANY_RULE"],
'action': "ALLOW",
}
Examples:
Add a Web DLP Policy rule with the minimum required parameters::
payload = {
'order': 1,
'rank': 0,
'name': "zscaler-sdk-python post.",
'protocols': ["ANY_RULE"],
'action': "ALLOW",
}
# Add new Web DLP item
print(zia.web_dlp.add_rule(payload=payload))
"""
return self._post("webDlpRules", json=payload)
def update_rule(self, rule_id: str, payload: dict) -> Box:
"""
Updates a DLP policy rule. This endpoint is not applicable to SaaS Security API DLP policy rules.
Args:
rule_id (str): String of ID.
payload (dict): Dictionary containing the updated Web DLP Policy Rule.
Returns:
:obj:`Box`: The updated Web DLP Policy Rule resource record.
Examples:
Update a Web DLP Policy Rule::
payload = zia.web_dlp.get_rule('9999')
payload['name'] = "daxm updated name."
results = zia.web_dlp.update_rule(rule_id=9999, payload=payload)
print(results)
"""
return self._put(f"webDlpRules/{rule_id}", json=payload)
def delete_rule(self, rule_id: str) -> Box:
"""
Deletes a DLP policy rule. This endpoint is not applicable to SaaS Security API DLP policy rules.
Args:
rule_id (str): Unique id of the Web DLP Policy Rule that will be deleted.
Returns:
:obj:`Box`: Response message from the ZIA API endpoint.
Examples:
Delete a rule with an id of 9999.
>>> results = zia.web_dlp.delete_rule(rule_id=9999)
... print(results)
"""
return self._delete(f"webDlpRules/{rule_id}") | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/web_dlp.py | web_dlp.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import snake_to_camel
class FirewallPolicyAPI(APIEndpoint):
# Firewall filter rule keys that only require an ID to be provided.
_key_id_list = [
"app_services",
"app_service_groups",
"departments",
"dest_ip_groups",
"devices",
"device_groups",
"groups",
"labels",
"locations",
"location_groups",
"nw_application_groups",
"nw_services",
"nw_service_groups",
"src_ip_groups",
"time_windows",
"users",
]
def list_rules(self) -> BoxList:
"""
Returns a list of all firewall filter rules.
Returns:
:obj:`BoxList`: The list of firewall filter rules
Examples:
>>> for rule in zia.firewall.list_rules():
... pprint(rule)
"""
return self._get("firewallFilteringRules")
def add_rule(self, name: str, action: str, **kwargs) -> Box:
"""
Adds a new firewall filter rule.
Args:
name (str): The name of the filter rule. 31 char limit.
action (str): The action for the filter rule.
device_trust_levels (list): List of device trust levels for which the rule must be applied. Accepted values are:
`ANY`, `UNKNOWN_DEVICETRUSTLEVEL`, `LOW_TRUST`, `MEDIUM_TRUST`, and `HIGH_TRUST`
**kwargs: Optional keyword args
Keyword Args:
order (str): The order of the rule, defaults to adding rule to bottom of list.
rank (str): The admin rank of the rule.
state (str): The rule state. Accepted values are 'ENABLED' or 'DISABLED'.
description (str): Additional information about the rule
src_ips (list): The source IPs that this rule applies to. Individual IP addresses or CIDR ranges accepted.
dest_addresses (list): The destination IP addresses that this rule applies to. Individual IP addresses or
CIDR ranges accepted.
dest_ip_categories (list): The IP address categories that this rule applies to.
dest_countries (list): The destination countries that this rule applies to.
enable_full_logging (bool): Enables full logging if True.
nw_applications (list): The network service applications that this rule applies to.
app_services (list): The IDs for the application services that this rule applies to.
app_service_groups (list): The IDs for the application service groups that this rule applies to.
departments (list): The IDs for the departments that this rule applies to.
dest_ip_groups (list): The IDs for the destination IP groups that this rule applies to.
devices (list): The IDs for the devices that are managed using Zscaler Client Connector that this rule applies to.
device_groups (list): The IDs for the device groups that are managed using Zscaler Client Connector that this rule applies to.
groups (list): The IDs for the groups that this rule applies to.
labels (list): The IDs for the labels that this rule applies to.
locations (list): The IDs for the locations that this rule applies to.
location_groups (list): The IDs for the location groups that this rule applies to.
nw_application_groups (list): The IDs for the network application groups that this rule applies to.
nw_services (list): The IDs for the network services that this rule applies to.
nw_service_groups (list): The IDs for the network service groups that this rule applies to.
time_windows (list): The IDs for the time windows that this rule applies to.
users (list): The IDs for the users that this rule applies to.
Returns:
:obj:`Box`: The new firewall filter rule resource record.
Examples:
Add a rule to allow all traffic to Google DNS (admin ranking is enabled):
>>> zia.firewall.add_rule(rank='7',
... dest_addresses=['8.8.8.8', '8.8.4.4'],
... name='ALLOW_ANY_TO_GOOG-DNS',
... action='ALLOW'
... description='TT#1965432122')
Add a rule to block all traffic to Quad9 DNS for all users in Finance Group and send an ICMP error:
>>> zia.firewall.add_rule(rank='7',
... dest_addresses=['9.9.9.9'],
... name='BLOCK_GROUP-FIN_TO_Q9-DNS',
... action='BLOCK_ICMP'
... groups=['95016183']
... description='TT#1965432122')
"""
payload = {
"name": name,
"action": action,
"order": kwargs.pop("order", len(self.list_rules())),
}
# Add optional parameters to payload
for key, value in kwargs.items():
if key in self._key_id_list:
payload[snake_to_camel(key)] = []
for item in value:
payload[snake_to_camel(key)].append({"id": item})
else:
payload[snake_to_camel(key)] = value
return self._post("firewallFilteringRules", json=payload)
def get_rule(self, rule_id: str) -> Box:
"""
Returns information for the specified firewall filter rule.
Args:
rule_id (str): The unique identifier for the firewall filter rule.
Returns:
:obj:`Box`: The resource record for the firewall filter rule.
Examples:
>>> pprint(zia.firewall.get_rule('431233'))
"""
return self._get(f"firewallFilteringRules/{rule_id}")
def update_rule(self, rule_id: str, **kwargs) -> Box:
"""
Updates an existing firewall filter rule.
Args:
rule_id (str): The unique ID for the rule that is being updated.
**kwargs: Optional keyword args.
Keyword Args:
order (str): The order of the rule, defaults to adding rule to bottom of list.
rank (str): The admin rank of the rule.
state (str): The rule state. Accepted values are 'ENABLED' or 'DISABLED'.
description (str): Additional information about the rule
src_ips (list): The source IPs that this rule applies to. Individual IP addresses or CIDR ranges accepted.
src_ip_groups (list): The IDs for the source IP groups that this rule applies to.
dest_addresses (list): The destination IP addresses that this rule applies to. Individual IP addresses or
CIDR ranges accepted.
dest_ip_categories (list): The IP address categories that this rule applies to.
dest_countries (list): The destination countries that this rule applies to.
enable_full_logging (bool): Enables full logging if True.
nw_applications (list): The network service applications that this rule applies to.
app_services (list): The IDs for the application services that this rule applies to.
app_service_groups (list): The IDs for the application service groups that this rule applies to.
departments (list): The IDs for the departments that this rule applies to.
dest_ip_groups (list): The IDs for the destination IP groups that this rule applies to.
device_trust_levels (list): The list of device trust levels for which the rule must be applied.
devices (list): The IDs for the devices that are managed using Zscaler Client Connector that this rule applies to.
device_groups (list): The IDs for the device groups that are managed using Zscaler Client Connector that this rule applies to.
groups (list): The IDs for the groups that this rule applies to.
labels (list): The IDs for the labels that this rule applies to.
locations (list): The IDs for the locations that this rule applies to.
location_groups (list): The IDs for the location groups that this rule applies to.
nw_application_groups (list): The IDs for the network application groups that this rule applies to.
nw_services (list): The IDs for the network services that this rule applies to.
nw_service_groups (list): The IDs for the network service groups that this rule applies to.
time_windows (list): The IDs for the time windows that this rule applies to.
users (list): The IDs for the users that this rule applies to.
Returns:
:obj:`Box`: The updated firewall filter rule resource record.
Examples:
Update the destination IP addresses for a rule:
>>> zia.firewall.update_rule('976598',
... dest_addresses=['1.1.1.1'],
... description="TT#1965232865")
Update a rule to enable full logging:
>>> zia.firewall.update_rule('976597',
... enable_full_logging=True,
... description="TT#1965232866")
"""
# Set payload to value of existing record
payload = {snake_to_camel(k): v for k, v in self.get_rule(rule_id).items()}
# Add optional parameters to payload
for key, value in kwargs.items():
if key in self._key_id_list:
payload[snake_to_camel(key)] = []
for item in value:
payload[snake_to_camel(key)].append({"id": item})
else:
payload[snake_to_camel(key)] = value
return self._put(f"firewallFilteringRules/{rule_id}", json=payload)
def delete_rule(self, rule_id: str) -> int:
"""
Deletes the specified firewall filter rule.
Args:
rule_id (str): The unique identifier for the firewall filter rule.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zia.firewall.delete_rule('278454')
"""
return self._delete(f"firewallFilteringRules/{rule_id}", box=False).status_code
def list_ip_destination_groups(self, exclude_type: str = None) -> BoxList:
"""
Returns a list of IP Destination Groups.
Args:
exclude_type (str): Exclude all groups that match the specified IP destination group's type.
Accepted values are: `DSTN_IP`, `DSTN_FQDN`, `DSTN_DOMAIN` and `DSTN_OTHER`.
Returns:
:obj:`BoxList`: List of IP Destination Group records.
Examples:
>>> for group in zia.firewall.list_ip_destination_groups():
... pprint(group)
"""
payload = {"excludeType": exclude_type}
return self._get("ipDestinationGroups", params=payload)
def get_ip_destination_group(self, group_id: str) -> Box:
"""
Returns information on the specified IP Destination Group.
Args:
group_id (str): The unique ID of the IP Destination Group.
Returns:
:obj:`Box`: The IP Destination Group resource record.
Examples:
>>> pprint(zia.firewall.get_ip_destination_group('287342'))
"""
return self._get(f"ipDestinationGroups/{group_id}")
def delete_ip_destination_group(self, group_id: str) -> int:
"""
Deletes the specified IP Destination Group.
Args:
group_id (str): The unique ID of the IP Destination Group.
Returns:
:obj:`int`: The status code of the operation.
Examples:
>>> zia.firewall.delete_ip_destination_group('287342')
"""
return self._delete(f"ipDestinationGroups/{group_id}", box=False).status_code
def add_ip_destination_group(self, name: str, **kwargs) -> Box:
"""
Adds a new IP Destination Group.
Args:
name (str): The name of the IP Destination Group.
**kwargs: Optional keyword args.
Keyword Args:
type (str): Destination IP group type. Allowed values are DSTN_IP and DSTN_FQDN.
addresses (list): Destination IP addresses or FQDNs within the group.
description (str): Additional information about the destination IP group.
ip_categories (list): Destination IP address URL categories.
countries (list): Destination IP address counties.
Returns:
:obj:`Box`: The newly created IP Destination Group resource record.
Examples:
Add a Destination IP Group with IP addresses:
>>> zia.firewall.add_ip_destination_group(name='Destination Group - IP',
... addresses=['203.0.113.0/25', '203.0.113.131'],
... type='DSTN_IP')
Add a Destination IP Group with FQDN:
>>> zia.firewall.add_ip_destination_group(name='Destination Group - FQDN',
... description='Covers domains for Example Inc.',
... addresses=['example.com', 'example.edu'],
... type='DSTN_FQDN')
Add a Destionation IP Group for the US:
>>> zia.firewall.add_ip_destination_group(name='Destination Group - US',
... description='Covers the US',
... countries=['COUNTRY_US'])
"""
payload = {"name": name}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("ipDestinationGroups", json=payload)
def update_ip_destination_group(self, group_id: str, **kwargs) -> Box:
"""
Updates the specified IP Destination Group.
Args:
group_id (str): The unique ID of the IP Destination Group.
**kwargs: Optional keyword args.
Keyword Args:
name (str): The name of the IP Destination Group.
addresses (list): Destination IP addresses or FQDNs within the group.
description (str): Additional information about the IP Destination Group.
ip_categories (list): Destination IP address URL categories.
countries (list): Destination IP address countries.
Returns:
:obj:`Box`: The updated IP Destination Group resource record.
Examples:
Update the name of an IP Destination Group:
>>> zia.firewall.update_ip_destination_group('9032667',
... name="Updated IP Destination Group")
Update the description and FQDNs for an IP Destination Group:
>>> zia.firewall.update_ip_destination_group('9032668',
... description="Tech News",
... addresses=['arstechnica.com', 'slashdot.org'])
"""
# Set payload to value of existing record
payload = {snake_to_camel(k): v for k, v in self.get_ip_destination_group(group_id).items()}
# Update payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._put(f"ipDestinationGroups/{group_id}", json=payload)
def list_ip_source_groups(self, search: str = None) -> BoxList:
"""
Returns a list of IP Source Groups.
Args:
search (str): The search string used to match against a group's name or description attributes.
Returns:
:obj:`BoxList`: List of IP Source Group records.
Examples:
List all IP Source Groups:
>>> for group in zia.firewall.list_ip_source_groups():
... pprint(group)
Use search parameter to find IP Source Groups with `fiji` in the name:
>>> for group in zia.firewall.list_ip_source_groups('fiji'):
... pprint(group)
"""
payload = {"search": search}
return self._get("ipSourceGroups", params=payload)
def get_ip_source_group(self, group_id: str) -> Box:
"""
Returns information for the specified IP Source Group.
Args:
group_id (str): The unique ID of the IP Source Group.
Returns:
:obj:`Box`: The IP Source Group resource record.
Examples:
>>> pprint(zia.firewall.get_ip_source_group('762398')
"""
return self._get(f"ipSourceGroups/{group_id}")
def delete_ip_source_group(self, group_id: str) -> int:
"""
Deletes an IP Source Group.
Args:
group_id (str): The unique ID of the IP Source Group to be deleted.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zia.firewall.delete_ip_source_group('762398')
"""
return self._delete(f"ipSourceGroups/{group_id}", box=False).status_code
def add_ip_source_group(self, name: str, ip_addresses: list, description: str = None) -> Box:
"""
Adds a new IP Source Group.
Args:
name (str): The name of the IP Source Group.
ip_addresses (str): The list of IP addresses for the IP Source Group.
description (str): Additional information for the IP Source Group.
Returns:
:obj:`Box`: The new IP Source Group resource record.
Examples:
Add a new IP Source Group:
>>> zia.firewall.add_ip_source_group(name='My IP Source Group',
... ip_addresses=['198.51.100.0/24', '192.0.2.1'],
... description='Contains the IP addresses for the local network.')
"""
payload = {
"name": name,
"ipAddresses": ip_addresses,
"description": description,
}
return self._post("ipSourceGroups", json=payload)
def update_ip_source_group(self, group_id: str, **kwargs) -> Box:
"""
Update an IP Source Group.
This method supports updating individual fields in the IP Source Group resource record.
Args:
group_id (str): The unique ID for the IP Source Group to update.
**kwargs: Optional keyword args.
Keyword Args:
name (str): The name of the IP Source Group.
ip_addresses (list): The list of IP addresses for the IP Source Group.
description (str): Additional information for the IP Source Group.
Returns:
:obj:`Box`: The updated IP Source Group resource record.
Examples:
Update the name of an IP Source Group:
>>> zia.firewall.update_ip_source_group('9032674',
... name='Updated Name')
Update the description and IP addresses of an IP Source Group:
>>> zia.firewall.update_ip_source_group('9032674',
... description='Local subnets, updated on 3 JUL 21'
... ip_addresses=['192.0.2.0/29', '192.0.2.8/29', '192.0.2.128/25'])
"""
# Set payload to value of existing record
payload = {snake_to_camel(k): v for k, v in self.get_ip_source_group(group_id).items()}
# Update payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._put(f"ipSourceGroups/{group_id}", json=payload)
def list_network_app_groups(self, search: str = None) -> BoxList:
"""
Returns a list of all Network Application Groups.
Returns:
:obj:`BoxList`: The list of Network Application Group resource records.
Examples:
>>> for group in zia.firewall.list_network_app_groups():
... pprint(group)
"""
payload = {"search": search}
return self._get("networkApplicationGroups", params=payload)
def get_network_app_group(self, group_id: str) -> Box:
"""
Returns information for the specified Network Application Group.
Args:
group_id (str):
The unique ID for the Network Application Group.
Returns:
:obj:`Box`: The Network Application Group resource record.
Examples:
>>> pprint(zia.firewall.get_network_app_group('762398'))
"""
return self._get(f"networkApplicationGroups/{group_id}")
def list_network_apps(self, search: str = None) -> BoxList:
"""
Returns a list of all predefined Network Applications.
Args:
search (str): The search string used to match against a network application's description attribute.
Returns:
:obj:`BoxList`: The list of Network Application resource records.
Examples:
>>> for app in zia.firewall.list_network_apps():
... pprint(app)
"""
payload = {"search": search}
return self._get("networkApplications", params=payload)
def get_network_app(self, app_id: str) -> Box:
"""
Returns information for the specified Network Application.
Args:
app_id (str): The unique ID for the Network Application.
Returns:
:obj:`Box`: The Network Application resource record.
Examples:
>>> pprint(zia.firewall.get_network_app('762398'))
"""
return self._get(f"networkApplications/{app_id}")
def list_network_svc_groups(self, search: str = None) -> BoxList:
"""
Returns a list of Network Service Groups.
Args:
search (str): The search string used to match against a group's name or description attributes.
Returns:
:obj:`BoxList`: List of Network Service Group resource records.
Examples:
>>> for group in zia.firewall.list_network_svc_groups():
... pprint(group)
"""
payload = {"search": search}
return self._get("networkServiceGroups", params=payload)
def get_network_svc_group(self, group_id: str) -> Box:
"""
Returns information for the specified Network Service Group.
Args:
group_id (str): The unique ID for the Network Service Group.
Returns:
:obj:`Box`: The Network Service Group resource record.
Examples:
>>> pprint(zia.firewall.get_network_svc_group('762398'))
"""
return self._get(f"networkServiceGroups/{group_id}")
def delete_network_svc_group(self, group_id: str) -> int:
"""
Deletes the specified Network Service Group.
Args:
group_id (str): The unique identifier for the Network Service Group.
Returns:
:obj:`int`: The response code for the operation.
Examples:
>>> zia.firewall.delete_network_svc_group('762398')
"""
return self._delete(f"networkServiceGroups/{group_id}", box=False).status_code
def add_network_svc_group(self, name: str, service_ids: list, description: str = None) -> Box:
"""
Adds a new Network Service Group.
Args:
name (str): The name of the Network Service Group.
service_ids (list): A list of Network Service IDs to add to the group.
description (str): Additional information about the Network Service Group.
Returns:
:obj:`Box`: The newly created Network Service Group resource record.
Examples:
Add a new Network Service Group:
>>> zia.firewall.add_network_svc_group(name='New Network Service Group',
... service_ids=['159143', '159144', '159145'],
... description='Group for the new Network Service.')
"""
payload = {"name": name, "services": [], "description": description}
for service_id in service_ids:
payload["services"].append({"id": service_id})
return self._post("networkServiceGroups", json=payload)
def list_network_services(self, search: str = None, protocol: str = None) -> BoxList:
"""
Returns a list of all Network Services.
The search parameters find matching values within the "name" or "description" attributes.
Args:
search (str): The search string used to match against a service's name or description attributes.
protocol (str): Filter based on the network service protocol. Accepted values are `ICMP`, `TCP`, `UDP`,
`GRE`, `ESP` and `OTHER`.
Returns:
:obj:`BoxList`: The list of Network Service resource records.
Examples:
>>> for service in zia.firewall.list_network_services():
... pprint(service)
"""
payload = {"search": search, "protocol": protocol}
return self._get("networkServices", params=payload)
def get_network_service(self, service_id: str) -> Box:
"""
Returns information for the specified Network Service.
Args:
service_id (str): The unique ID for the Network Service.
Returns:
:obj:`Box`: The Network Service resource record.
Examples:
>>> pprint(zia.firewall.get_network_service('762398'))
"""
return self._get(f"networkServices/{service_id}")
def delete_network_service(self, service_id: str) -> int:
"""
Deletes the specified Network Service.
Args:
service_id (str): The unique ID for the Network Service.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zia.firewall.delete_network_service('762398')
"""
return self._delete(f"networkServices/{service_id}", box=False).status_code
def add_network_service(self, name: str, ports: list = None, **kwargs) -> Box:
"""
Adds a new Network Service.
Args:
name: The name of the Network Service
ports (list):
A list of port protocol tuples. Tuples must follow the convention `src/dest`, `protocol`,
`start port`, `end port`. If this is a single port and not a port range then `end port` can be omitted.
E.g.
.. code-block:: python
('src', 'tcp', '49152', '65535'),
('dest', 'tcp', '22),
('dest', 'tcp', '9010', '9012'),
('dest', 'udp', '9010', '9012')
**kwargs: Optional keyword args.
Keyword Args:
description (str): Additional information on the Network Service.
Returns:
:obj:`Box`: The newly created Network Service resource record.
Examples:
Add Network Service for Microsoft Exchange:
>>> zia.firewall.add_network_service('MS LDAP',
... description='Covers all ports used by MS LDAP',
... ports=[
... ('dest', 'tcp', '389'),
... ('dest', 'udp', '389'),
... ('dest', 'tcp', '636'),
... ('dest', 'tcp', '3268', '3269')])
Add Network Service designed to match inbound SSH traffic:
>>> zia.firewall.add_network_service('Inbound SSH',
... description='Inbound SSH',
... ports=[
... ('src', 'tcp', '22'),
... ('dest', 'tcp', '1024', '65535')])
"""
payload = {"name": name}
# Convert tuple list to dict and add to payload
if ports is not None:
for items in ports:
port_range = [{"start": items[2]}]
if len(items) == 4:
port_range.append({"end": items[3]})
payload.setdefault(f"{items[0]}{items[1].title()}Ports", []).extend(port_range)
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("networkServices", json=payload)
def update_network_service(self, service_id: str, ports: list = None, **kwargs) -> Box:
"""
Updates the specified Network Service.
If ports aren't provided then no changes will be made to the ports already defined. If ports are provided then
the existing ports will be overwritten.
Args:
service_id (str): The unique ID for the Network Service.
ports (list):
A list of port protocol tuples. Tuples must follow the convention `src/dest`, `protocol`, `start port`,
`end port`. If this is a single port and not a port range then `end port` can be omitted. E.g.
.. code-block:: python
('src', 'tcp', '49152', '65535'),
('dest', 'tcp', '22),
('dest', 'tcp', '9010', '9012'),
('dest', 'udp', '9010', '9012')
**kwargs: Optional keyword args.
Keyword Args:
description (str): Additional information on the Network Service.
Returns:
:obj:`Box`: The newly created Network Service resource record.
Examples:
Update the name and description for a Network Service:
>>> zia.firewall.update_network_service('959093',
... name='MS Exchange',
... description='All ports related to the MS Exchange service.')
Updates the ports for a Network Service, leaving other fields intact:
>>> zia.firewall.add_network_service('959093',
... ports=[
... ('dest', 'tcp', '500', '510')])
"""
payload = {snake_to_camel(k): v for k, v in self.get_network_service(service_id).items()}
# Convert tuple list to dict and add to payload
if ports is not None:
# Clear existing ports and set new values
for items in ports:
port_key = f"{items[0]}{items[1].title()}Ports"
payload[port_key] = []
payload[port_key].append({"start": items[2]})
if len(items) == 4:
payload[port_key].append({"end": items[3]})
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._put(f"networkServices/{service_id}", json=payload) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/firewall.py | firewall.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
import time
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import chunker, convert_keys, snake_to_camel
class URLCategoriesAPI(APIEndpoint):
def lookup(self, urls: list) -> BoxList:
"""
Lookup the category for the provided URLs.
Args:
urls (list):
The list of URLs to perform a category lookup on.
Returns:
:obj:`BoxList`: A list of URL category reports.
Examples:
>>> zia.url_categories.lookup(['example.com', 'test.com'])
"""
# ZIA limits each API call to 100 URLs at a rate of 1 API call per second. zscaler-sdk-python simplifies this by allowing
# users to submit any number of URLs and handle the chunking of the API calls on their behalf.
if len(urls) > 100:
results = BoxList()
for chunk in chunker(urls, 100):
results.extend(self._post("urlLookup", json=chunk))
time.sleep(1)
return results
else:
payload = urls
return self._post("urlLookup", json=payload)
def list_categories(self, custom_only: bool = False, only_counts: bool = False) -> BoxList:
"""
Returns information on URL categories.
Args:
custom_only (bool):
Returns only custom categories if True.
only_counts (bool):
Returns only URL and keyword counts if True.
Returns:
:obj:`BoxList`: A list of information for all or custom URL categories.
Examples:
List all URL categories:
>>> zia.url_categories.list_categories()
List only custom URL categories:
>>> zia.url_categories.list_categories(custom_only=True)
"""
payload = {
"customOnly": custom_only,
"includeOnlyUrlKeywordCounts": only_counts,
}
return self._get("urlCategories", params=payload)
def get_quota(self) -> Box:
"""
Returns information on URL category quota usage.
Returns:
:obj:`Box`: The URL quota statistics.
Examples:
>>> zia.url_categories.get_quota()
"""
return self._get("urlCategories/urlQuota")
def get_category(self, category_id: str) -> Box:
"""
Returns URL category information for the provided category.
Args:
category_id (str):
The unique identifier for the category (e.g. 'MUSIC')
Returns:
:obj:`Box`: The resource record for the category.
Examples:
>>> zia.url_categories.get_category('ALCOHOL_TOBACCO')
"""
return self._get(f"urlCategories/{category_id}")
def add_url_category(self, name: str, super_category: str, urls: list, **kwargs) -> Box:
"""
Adds a new custom URL category.
Args:
name (str):
Name of the URL category.
super_category (str):
The name of the parent category.
urls (list):
Custom URLs to add to a URL category.
**kwargs:
Optional keyword args.
Keyword Args:
db_categorized_urls (list):
URLs entered will be covered by policies that reference the parent category, in addition to this one.
description (str):
Description of the category.
custom_category (bool):
Set to true for custom URL category. Up to 48 custom URL categories can be added per organisation.
ip_ranges (list):
Custom IP addpress ranges associated to a URL category. This feature must be enabled on your tenancy.
ip_ranges_retaining_parent_category (list):
The retaining parent custom IP addess ranges associated to a URL category.
keywords (list):
Custom keywords associated to a URL category.
keywords_retaining_parent_category (list):
Retained custom keywords from the parent URL category that are associated with a URL category.
Returns:
:obj:`Box`: The newly configured custom URL category resource record.
Examples:
Add a new category for beers that don't taste good:
>>> zia.url_categories.add_url_category(name='Beer',
... super_category='ALCOHOL_TOBACCO',
... urls=['xxxx.com.au', 'carltondraught.com.au'],
... description="Beers that don't taste good.")
Add a new category with IP ranges:
>>> zia.url_categories.add_url_category(name='Beer',
... super_category='FINANCE',
... urls=['finance.google.com'],
... description="Google Finance.",
... ip_ranges=['10.0.0.0/24'])
"""
payload = {
"type": "URL_CATEGORY",
"superCategory": super_category,
"configuredName": name,
"urls": urls,
}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("urlCategories", json=payload)
def add_tld_category(self, name: str, tlds: list, **kwargs) -> Box:
"""
Adds a new custom TLD category.
Args:
name (str):
The name of the TLD category.
tlds (list):
A list of TLDs in the format '.tld'.
**kwargs:
Optional keyword args.
Keyword Args:
description (str):
Description of the category.
Returns:
:obj:`Box`: The newly configured custom TLD category resource record.
Examples:
Create a category for all 'developer' sites:
>>> zia.url_categories.add_tld_category(name='Developer Sites',
... urls=['.dev'],
... description="Sites that are likely run by developers.")
"""
payload = {
"type": "TLD_CATEGORY",
"superCategory": "USER_DEFINED", # TLDs can only be added in USER_DEFINED category
"configuredName": name,
"urls": tlds, # ZIA API reuses the 'urls' key for tlds
}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("urlCategories", json=payload)
def update_url_category(self, category_id: str, **kwargs) -> Box:
"""
Updates a URL category.
Args:
category_id (str):
The unique identifier of the URL category.
**kwargs:
Optional keyword args.
Keyword Args:
name (str):
The name of the URL category.
urls (list):
Custom URLs to add to a URL category.
db_categorized_urls (list):
URLs entered will be covered by policies that reference the parent category, in addition to this one.
description (str):
Description of the category.
ip_ranges (list):
Custom IP addpress ranges associated to a URL category. This feature must be enabled on your tenancy.
ip_ranges_retaining_parent_category (list):
The retaining parent custom IP addess ranges associated to a URL category.
keywords (list):
Custom keywords associated to a URL category.
keywords_retaining_parent_category (list):
Retained custom keywords from the parent URL category that are associated with a URL category.
Returns:
:obj:`Box`: The updated URL category resource record.
Examples:
Update the name of a category:
>>> zia.url_categories.update_url_category('CUSTOM_01',
... name="Wines that don't taste good.")
Update the urls of a category:
>>> zia.url_categories.update_url_category('CUSTOM_01',
... urls=['www.yellowtailwine.com'])
"""
payload = convert_keys(self.get_category(category_id))
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._put(f"urlCategories/{category_id}", json=payload)
def add_urls_to_category(self, category_id: str, urls: list) -> Box:
"""
Adds URLS to a URL category.
Args:
category_id (str):
The unique identifier of the URL category.
urls (list):
Custom URLs to add to a URL category.
Returns:
:obj:`Box`: The updated URL category resource record.
Examples:
>>> zia.url_categories.add_urls_to_category('CUSTOM_01',
... urls=['example.com'])
"""
payload = convert_keys(self.get_category(category_id))
payload["urls"] = urls
return self._put(f"urlCategories/{category_id}?action=ADD_TO_LIST", json=payload)
def delete_urls_from_category(self, category_id: str, urls: list) -> Box:
"""
Deletes URLS from a URL category.
Args:
category_id (str):
The unique identifier of the URL category.
urls (list):
Custom URLs to delete from a URL category.
Returns:
:obj:`Box`: The updated URL category resource record.
Examples:
>>> zia.url_categories.delete_urls_from_category('CUSTOM_01',
... urls=['example.com'])
"""
current_config = self.get_category(category_id)
payload = {
"configuredName": current_config["configured_name"],
"urls": urls,
} # Required for successful call
return self._put(f"urlCategories/{category_id}?action=REMOVE_FROM_LIST", json=payload)
def delete_from_category(self, category_id: str, **kwargs):
"""
Deletes the specified items from a URL category.
Args:
category_id (str):
The unique id for the URL category.
**kwargs:
Optional parameters.
Keyword Args:
keywords (list):
A list of keywords that will be deleted.
keywords_retaining_parent_category (list):
A list of keywords retaining their parent category that will be deleted.
urls (list):
A list of URLs that will be deleted.
db_categorized_urls (list):
A list of URLs retaining their parent category that will be deleted
Returns:
:obj:`Box`: The updated URL category resource record.
Examples:
Delete URLs retaining parent category from a custom category:
>>> zia.url_categories.delete_from_category(
... category_id="CUSTOM_01",
... db_categorized_urls=['twitter.com'])
Delete URLs and URLs retaining parent category from a custom category:
>>> zia.url_categories.delete_from_category(
... category_id="CUSTOM_01",
... urls=['news.com', 'cnn.com'],
... db_categorized_urls=['google.com, bing.com'])
"""
current_config = self.get_category(category_id)
payload = {
"configured_name": current_config["configured_name"], # Required for successful call
}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[key] = value
# Convert snake to camelcase
payload = convert_keys(payload)
return self._put(f"urlCategories/{category_id}?action=REMOVE_FROM_LIST", json=payload)
def delete_category(self, category_id: str) -> int:
"""
Deletes the specified URL category.
Args:
category_id (str):
The unique identifier for the category.
Returns:
:obj:`int`: The status code for the operation.
Examples:
>>> zia.url_categories.delete_category('CUSTOM_01')
"""
return self._delete(f"urlCategories/{category_id}", box=False).status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/url_categories.py | url_categories.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
class DataCenterVIPSAPI(APIEndpoint):
def list_public_se(self, cloud: str, continent: str = None) -> Box:
"""
Returns a list of the Zscaler Public Service Edge information for the specified cloud.
Args:
cloud (str): The ZIA cloud that this request applies to.
continent (str, opt):
Filter entries by the specified continent. Accepted values are `apac`, `emea` and `amer`.
Returns:
:obj:`Box`: The Public Service Edge VIPs
Examples:
Print all Public Service Edge information for ``zscaler.net``:
>>> pprint(zia.vips.list_public_se('zscaler'))
Print all Public Service Edge information for ``zscalerthree.net`` in ``apac``:
>>> pprint(zia.vips.list_public_se('zscalerthree',
... continent='apac')
"""
if continent is not None:
if continent == "amer":
# This return is an edge-case to handle the JSON structure for _americas which is in the format
# continent :_americas. All other continents have whitespace, e.g. continent : emea.
return self._get(f"https://api.config.zscaler.com/{cloud}.net/cenr/json")[f"{cloud}.net"][
"continent :_americas"
]
return self._get(f"https://api.config.zscaler.com/{cloud}.net/cenr/json")[f"{cloud}.net"][
f"continent : {continent}"
]
return self._get(f"https://api.config.zscaler.com/{cloud}.net/cenr/json")[f"{cloud}.net"]
def list_ca(self, cloud: str) -> BoxList:
"""
Returns a list of Zscaler Central Authority server IPs for the specified cloud.
Args:
cloud (str): The ZIA cloud that this request applies to.
Returns:
:obj:`BoxList`: A list of CA server IPs.
Examples:
Print the IP address of Central Authority servers in `zscalertwo.net`:
>>> for ip in zia.vips.list_ca('zscalertwo'):
... print(ip)
"""
return self._get(f"https://api.config.zscaler.com/{cloud}.net/ca/json")["ranges"]
def list_pac(self, cloud: str) -> BoxList:
"""
Returns a list of Proxy Auto-configuration (PAC) server IPs for the specified cloud.
Args:
cloud (str): The ZIA cloud that this request applies to.
Returns:
:obj:`BoxList`: A list of PAC server IPs.
Examples:
Print the IP address of PAC servers in `zscloud.net`:
>>> for ip in zia.vips.list_pac('zscloud'):
... print(ip)
"""
return self._get(f"https://api.config.zscaler.com/{cloud}.net/pac/json")["ip"] | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/vips.py | vips.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, convert_keys, snake_to_camel
class RuleLabelsAPI(APIEndpoint):
def list_labels(self, **kwargs) -> BoxList:
"""
Returns the list of ZIA Rule Labels.
Keyword Args:
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
Returns:
:obj:`BoxList`: The list of Rule Labels configured in ZIA.
Examples:
List Rule Labels using default settings:
>>> for label in zia.labels.list_labels():
... print(label)
List labels, limiting to a maximum of 10 items:
>>> for label in zia.labels.list_labels(max_items=10):
... print(label)
List labels, returning 200 items per page for a maximum of 2 pages:
>>> for label in zia.labels.list_labels(page_size=200, max_pages=2):
... print(label)
"""
return BoxList(Iterator(self._api, "ruleLabels", **kwargs))
def get_label(self, label_id: str) -> Box:
"""
Returns the label details for a given Rule Label.
Args:
label_id (str): The unique identifier for the Rule Label.
Returns:
:obj:`Box`: The Rule Label resource record.
Examples:
>>> label = zia.labels.get_label('99999')
"""
return self._get(f"ruleLabels/{label_id}")
def add_label(self, name: str, **kwargs) -> Box:
"""
Creates a new ZIA Rule Label.
Args:
name (str):
The name of the Rule Label.
Keyword Args:
description (str):
Additional information about the Rule Label.
Returns:
:obj:`Box`: The newly added Rule Label resource record.
Examples:
Add a label with default parameters:
>>> label = zia.labels.add_label("My New Label")
Add a label with description:
>>> label = zia.labels.add_label("My Second Label":
... description="My second label description")
"""
payload = {"name": name}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("ruleLabels", json=payload)
def update_label(self, label_id: str, **kwargs):
"""
Updates information for the specified ZIA Rule Label.
Args:
label_id (str): The unique id for the Rule Label that will be updated.
Keyword Args:
name (str): The name of the Rule Label.
description (str): Additional information for the Rule Label.
Returns:
:obj:`Box`: The updated Rule Label resource record.
Examples:
Update the name of a Rule Label:
>>> label = zia.labels.update_label(99999,
... name="Updated Label Name")
Update the name and description of a Rule Label:
>>> label = zia.labels.update_label(99999,
... name="Updated Label Name",
... description="Updated Label Description")
"""
# Get the label data from ZIA
payload = convert_keys(self.get_label(label_id))
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._put(f"ruleLabels/{label_id}", json=payload)
def delete_label(self, label_id):
"""
Deletes the specified Rule Label.
Args:
label_id (str): The unique identifier of the Rule Label that will be deleted.
Returns:
:obj:`int`: The response code for the request.
Examples
>>> user = zia.labels.delete_label('99999')
"""
return self._delete(f"ruleLabels/{label_id}", box=False).status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/labels.py | labels.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box
from restfly import APISession
from restfly.endpoint import APIEndpoint
class CloudSandboxAPI(APIEndpoint):
def __init__(self, api: APISession):
super().__init__(api)
self.sandbox_token = api.sandbox_token
self.env_cloud = api.env_cloud
def submit_file(self, file: str, force: bool = False) -> Box:
"""
Submits a file to the ZIA Advanced Cloud Sandbox for analysis.
Args:
file (str): The filename that will be submitted for sandbox analysis.
force (bool): Force ZIA to analyse the file even if it has been submitted previously.
Returns:
:obj:`Box`: The Cloud Sandbox submission response information.
Examples:
Submit a file in the current directory called malware.exe to the cloud sandbox, forcing analysis.
>>> zia.sandbox.submit_file('malware.exe', force=True)
"""
with open(file, "rb") as f:
data = f.read()
params = {
"api_token": self.sandbox_token,
"force": int(force), # convert boolean to int for ZIA
}
return self._post(
f"https://csbapi.{self.env_cloud}.net/zscsb/submit",
params=params,
data=data,
)
def get_quota(self) -> Box:
"""
Returns the Cloud Sandbox API quota information for the organisation.
Returns:
:obj:`Box`: The Cloud Sandbox quota report.
Examples:
>>> pprint(zia.sandbox.get_quota())
"""
return self._get("sandbox/report/quota")[0]
def get_report(self, md5_hash: str, report_details: str = "summary") -> Box:
"""
Returns the Cloud Sandbox Report for the provided hash.
Args:
md5_hash (str):
The MD5 hash of the file that was analysed by Cloud Sandbox.
report_details (str):
The type of report. Accepted values are 'full' or 'summary'. Defaults to 'summary'.
Returns:
:obj:`Box`: The cloud sandbox report.
Examples:
Get a summary report:
>>> zia.sandbox.get_report('8350dED6D39DF158E51D6CFBE36FB012')
Get a full report:
>>> zia.sandbox.get_report('8350dED6D39DF158E51D6CFBE36FB012', 'full')
"""
return self._get(f"sandbox/report/{md5_hash}?details={report_details}") | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/sandbox.py | sandbox.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box
from restfly.endpoint import APIEndpoint
class SSLInspectionAPI(APIEndpoint):
def get_csr(self) -> str:
"""
Downloads a CSR after it has been generated.
Returns:
:obj:`str`: Base64 encoded PKCS#10 CSR text.
Examples:
Retrieve the CSR for use in another function.
>>> csr = zia.ssl.get_csr()
"""
return self._get("sslSettings/downloadcsr").text
def get_intermediate_ca(self) -> Box:
"""
Returns information on the signed Intermediate Root CA certificate.
Returns:
:obj:`Box`: The Intermediate Root CA resource record.
Examples:
>>> pprint(zia.ssl.get_intermediate_ca())
"""
return self._get("sslSettings/showcert")
def generate_csr(
self,
cert_name: str,
cn: str,
org: str,
dept: str,
city: str,
state: str,
country: str,
signature: str,
) -> int:
"""
Generates a Certificate Signing Request.
Args:
cert_name (str): Certificate Name
cn (str): Common Name
org (str): Organisation
dept (str): Department
city (str): City
state (str): State
country (str): Country. Must be in the two-letter country code (ISO 3166-1 alpha-2) format and prefixed by
`COUNTRY`. E.g.::
United States = US = COUNTRY_US
Australia = AU = COUNTRY_AU
signature (str): Certificate signature algorithm. Accepted values are `SHA_1` and `SHA_256`.
Returns:
:obj:`int`: The response code for the operation.
Examples:
>>> zia.ssl.generate_csr(cert_name='Example.com Intermediate CA 2',
... cn='Example.com Intermediate CA 2',
... org='Example.com',
... dept='IT',
... city='Sydney',
... state='NSW',
... country='COUNTRY_AU',
... signature='SHA_256')
"""
payload = {
"certName": cert_name,
"commName": cn,
"orgName": org,
"deptName": dept,
"city": city,
"state": state,
"country": country,
"signatureAlgorithm": signature,
}
return self._post("sslSettings/generatecsr", json=payload, box=False).status_code
def upload_int_ca_cert(self, cert: tuple) -> int:
"""
Uploads a signed Intermediate Root CA certificate.
Args:
cert (tuple): The Intermediate Root CA certificate tuple in the following format, where `int_ca_pem` is a
``File Object`` representation of the Intermediate Root CA certificate PEM file::
('filename.pem', int_ca_pem)
Returns:
:obj:`int`: The status code for the operation.
Examples:
Upload an Intermediate Root CA certificate from a file:
>>> zia.ssl.upload_int_ca_cert(('int_ca.pem', open('int_ca.pem', 'rb')))
"""
payload = {"fileUpload": cert}
return self._post("sslSettings/uploadcert/text", files=payload, box=False).status_code
def upload_int_ca_chain(self, cert: tuple) -> int:
"""
Uploads the Intermediate Root CA certificate chain.
Args:
cert (tuple): The Intermediate Root CA chain certificate tuple in the following format, where
`int_ca_chain_pem` is a ``File Object`` representation of the Intermediate Root CA certificate chain
PEM file::
('filename.pem', int_ca_chain_pem)
Returns:
:obj:`int`: The status code for the operation
Examples:
Upload an Intermediate Root CA chain from a file:
>>> zia.ssl.upload_int_ca_chain(('int_ca_chain.pem', open('int_ca_chain.pem', 'rb')))
"""
payload = {"fileUpload": cert}
return self._post("sslSettings/uploadcertchain/text", files=payload, box=False).status_code
def delete_int_chain(self) -> int:
"""
Deletes the Intermediate Root CA certificate chain.
Returns:
:obj:`int`: The status code for the operation.
"""
return self._delete("sslSettings/certchain", box=False).status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/ssl_inspection.py | ssl_inspection.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, snake_to_camel
class AdminAndRoleManagementAPI(APIEndpoint):
def add_user(self, name: str, login_name: str, email: str, password: str, **kwargs) -> Box:
"""
Adds a new admin user to ZIA.
Args:
name (str): The user's full name.
login_name (str):
The name that the admin user will use to login to ZIA in email format, i.e. `[email protected].`
email (str): The email address for the admin user.
password (str): The password for the admin user.
**kwargs: Optional keyword args.
Keyword Args:
admin_scope (str): The scope of the admin's permissions, accepted values are:
``organization``, ``department``, ``location``, ``location_group``
comments (str): Additional information about the admin user.
disabled (bool): Set to ``True`` if you want the account disabled upon creation.
is_password_login_allowed (bool): Set to ``True`` to allow password login.
is_security_report_comm_enabled (bool):
Set to ``True`` to allow ZIA Security Update emails to be sent to the admin user.
is_service_update_comm_enabled (bool):
Set to ``True`` to allow ZIA Service Update emails to be sent to the admin user.
is_product_update_comm_enabled (bool):
Set to ``True`` to allow ZIA Product Update emails to be sent to the admin user.
is_password_expired (bool):
Set to ``True`` to expire the admin user's password upon creation.
is_exec_mobile_app_enabled (bool):
Set to ``True`` to enable to executive insights mobile application for the admin user.
role_id (str): The unique id for the admin role being assigned to the admin user.
scope_ids (list):
A list of entity ids for the admin user's scope. e.g. if the admin user has admin_scope set to
``department`` then you will need to provide a list of department ids.
**NOTE**: This param doesn't need to
be provided if the admin user's scope is set to ``organization``.
Returns:
:obj:`Box`: The newly created admin user resource record.
Examples:
Add an admin user with the minimum required params:
>>> admin_user = zia.admin_and_role_management.add_user(
... name="Jim Bob",
... login_name="[email protected]",
... password="hunter2",
... email="[email protected]")
Add an admin user with a department admin scope:
>>> admin_user = zia.admin_and_role_management.add_user(
... name="Jane Bob",
... login_name="[email protected]",
... password="hunter3",
... email="[email protected],
... admin_scope="department",
... scope_ids = ['376542', '245688'])
Add an auditor user:
>>> auditor_user = zia.admin_and_role_management.add_user(
... name="Head Bob",
... login_name="[email protected]",
... password="hunter4",
... email="[email protected],
... is_auditor=True)
"""
payload = {
"userName": name,
"loginName": login_name,
"email": email,
"password": password,
}
# Get the admin scope if provided
admin_scope = kwargs.pop("admin_scope", None)
# The default admin scope is organization so we don't really need to
# send it to ZIA as part of this API call. Otherwise if the user has
# supplied something different then we want to explicitly set that for
# the adminScopeType.
if admin_scope and admin_scope != "organization":
payload["adminScopeType"] = admin_scope.upper()
payload["adminScopeScopeEntities"] = []
# Add optional parameters to payload
for key, value in kwargs.items():
# If the user has supplied ids for the admin scope then we'll add
# them to the payload here. If the user doesn't supply them then
# ZIA will return an error.
if key == "scope_ids":
for scope_id in value:
payload["adminScopeScopeEntities"].append({"id": scope_id})
elif key == "role_id":
payload["role"] = {"id": value}
else:
payload[snake_to_camel(key)] = value
return self._post("adminUsers", json=payload)
def list_users(self, **kwargs) -> BoxList:
"""
Returns a list of admin users.
Keyword Args:
**include_auditor_users (bool, optional):
Include or exclude auditor user information in the list.
**include_admin_users (bool, optional):
Include or exclude admin user information in the list. (default: True)
**search (str, optional):
The search string used to partially match against an admin/auditor user's Login ID or Name.
**page (int, optional):
Specifies the page offset.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
Returns:
:obj:`BoxList`: The admin_users resource record.
Examples:
>>> users = zia.admin_and_role_management.list_users(search='login_name')
"""
return BoxList(Iterator(self._api, "adminUsers", **kwargs))
def list_roles(self, **kwargs) -> BoxList:
"""
Return a list of the configured admin roles in ZIA.
Args:
**kwargs: Optional keyword args.
Keyword Args:
include_auditor_role (bool): Set to ``True`` to include auditor role information in the response.
include_partner_role (bool): Set to ``True`` to include partner admin role information in the response.
Returns:
:obj:`BoxList`: A list of admin role resource records.
Examples:
Get a list of all configured admin roles:
>>> roles = zia.admin_and_management_roles.list_roles()
"""
payload = {snake_to_camel(key): value for key, value in kwargs.items()}
return self._get("adminRoles/lite", params=payload)
def get_user(self, user_id: str) -> Box:
"""
Returns information on the specified admin user id.
Args:
user_id (str): The unique id of the admin user.
Returns:
:obj:`Box`: The admin user resource record.
Examples:
>>> print(zia.admin_and_role_management.get_user('987321202'))
"""
admin_user = next(user for user in self.list_users() if user.id == int(user_id))
return admin_user
def delete_user(self, user_id: str) -> int:
"""
Deletes the specified admin user by id.
Args:
user_id (str): The unique id of the admin user.
Returns:
:obj:`int`: The response code for the request.
Examples:
>>> zia.admin_role_management.delete_admin_user('99272455')
"""
return self._delete(f"adminUsers/{user_id}", box=False).status_code
def update_user(self, user_id: str, **kwargs) -> dict:
"""
Update an admin user.
Args:
user_id (str): The unique id of the admin user to be updated.
**kwargs: Optional keyword args.
Keyword Args:
admin_scope (str): The scope of the admin's permissions, accepted values are:
``organization``, ``department``, ``location``, ``location_group``
comments (str): Additional information about the admin user.
disabled (bool): Set to ``True`` if you want the account disabled upon creation.
email (str): The email address for the admin user.
is_password_login_allowed (bool): Set to ``True`` to allow password login.
is_security_report_comm_enabled (bool):
Set to ``True`` to allow ZIA Security Update emails to be sent to the admin user.
is_service_update_comm_enabled (bool):
Set to ``True`` to allow ZIA Service Update emails to be sent to the admin user.
is_product_update_comm_enabled (bool):
Set to ``True`` to allow ZIA Product Update emails to be sent to the admin user.
is_password_expired (bool):
Set to ``True`` to expire the admin user's password upon creation.
is_exec_mobile_app_enabled (bool):
Set to ``True`` to enable to executive insights mobile application for the admin user.
name (str): The user's full name.
password (str): The password for the admin user.
role_id (str): The unique id for the admin role being assigned to the admin user.
scope_ids (list):
A list of entity ids for the admin user's scope. e.g. if the admin user has ``admin_scope`` set to
``department`` then you will need to provide a list of department ids.
**NOTE:** This param doesn't need to
be provided if the admin user's scope is set to `organization`.
Returns:
:obj:`dict`: The updated admin user resource record.
Examples:
Update the email address for an admin user:
>>> user = zia.admin_and_role_management.update_user('99695301',
... email='[email protected]')
Update the admin scope for an admin user to department:
>>> user = zia.admin_and_role_management.update_user('99695301',
... admin_scope='department',
... scope_ids=['3846532', '3846541'])
"""
# Get the resource record for the provided user id
payload = {snake_to_camel(k): v for k, v in self.get_user(user_id).items()}
# Get the admin scope if provided
admin_scope = kwargs.pop("admin_scope", None)
# The default admin scope is organization so we don't really need to
# send it to ZIA as part of this API call. Otherwise if the user has
# supplied something different then we want to explicitly set that for
# the adminScopeType.
if admin_scope and admin_scope != "organization":
payload["adminScopeType"] = admin_scope.upper()
payload["adminScopeScopeEntities"] = []
# Add optional parameters to payload
for key, value in kwargs.items():
# If the user has supplied ids for the admin scope then we'll add
# them to the payload here. If the user doesn't supply them then
# ZIA will return an error.
if key == "scope_ids":
for scope_id in value:
payload["adminScopeScopeEntities"].append({"id": scope_id})
elif key == "name":
# We renamed the username param to make it more meaningful for zscaler-sdk-python users
payload["userName"] = value
else:
payload[snake_to_camel(key)] = value
return self._put(f"adminUsers/{user_id}", json=payload) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/admin_and_role_management.py | admin_and_role_management.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, convert_keys, snake_to_camel
class TrafficForwardingAPI(APIEndpoint):
def list_gre_tunnels(self, **kwargs) -> BoxList:
"""
Returns the list of all configured GRE tunnels.
Keyword Args:
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
Returns:
:obj:`BoxList`: A list of GRE tunnels configured in ZIA.
Examples:
List GRE tunnels with default settings:
>>> for tunnel in zia.traffic.list_gre_tunnels():
... print(tunnel)
List GRE tunnels, limiting to a maximum of 10 items:
>>> for tunnel in zia.traffic.list_gre_tunnels(max_items=10):
... print(tunnel)
List GRE tunnels, returning 200 items per page for a maximum of 2 pages:
>>> for tunnel in zia.traffic.list_gre_tunnels(page_size=200, max_pages=2):
... print(tunnel)
"""
return BoxList(Iterator(self._api, "greTunnels", **kwargs))
def get_gre_tunnel(self, tunnel_id: str) -> Box:
"""
Returns information for the specified GRE tunnel.
Args:
tunnel_id (str):
The unique identifier for the GRE tunnel.
Returns:
:obj:`Box`: The GRE tunnel resource record.
Examples:
>>> gre_tunnel = zia.traffic.get_gre_tunnel('967134')
"""
return self._get(f"greTunnels/{tunnel_id}")
def list_gre_ranges(self, **kwargs) -> BoxList:
"""
Returns a list of available GRE tunnel ranges.
Keyword Args:
**internal_ip_range (str, optional):
Internal IP range information.
**static_ip (str, optional):
Static IP information.
**limit (int, optional):
The maximum number of GRE tunnel IP ranges that can be added. Defaults to `10`.
Returns:
:obj:`BoxList`: A list of available GRE tunnel ranges.
Examples:
>>> gre_tunnel_ranges = zia.traffic.list_gre_ranges()
"""
payload = {snake_to_camel(key): value for key, value in kwargs.items()}
return self._get("greTunnels/availableInternalIpRanges", params=payload)
def add_gre_tunnel(
self,
source_ip: str,
primary_dest_vip_id: str = None,
secondary_dest_vip_id: str = None,
**kwargs,
) -> Box:
"""
Add a new GRE tunnel.
Note: If the `primary_dest_vip_id` and `secondary_dest_vip_id` aren't specified then the closest recommended
VIPs will be automatically chosen.
Args:
source_ip (str):
The source IP address of the GRE tunnel. This is typically a static IP address in the organisation
or SD-WAN.
primary_dest_vip_id (str):
The unique identifier for the primary destination virtual IP address (VIP) of the GRE tunnel.
Defaults to the closest recommended VIP.
secondary_dest_vip_id (str):
The unique identifier for the secondary destination virtual IP address (VIP) of the GRE tunnel.
Defaults to the closest recommended VIP that isn't in the same city as the primary VIP.
Keyword Args:
**comment (str):
Additional information about this GRE tunnel
**ip_unnumbered (bool):
This is required to support the automated SD-WAN provisioning of GRE tunnels, when set to true
gre_tun_ip and gre_tun_id are set to null
**internal_ip_range (str):
The start of the internal IP address in /29 CIDR range.
**within_country (bool):
Restrict the data center virtual IP addresses (VIPs) only to those within the same country as the
source IP address.
Returns:
:obj:`Box`: The resource record for the newly created GRE tunnel.
Examples:
Add a GRE tunnel with closest recommended VIPs:
>>> zia.traffic.add_gre_tunnel('203.0.113.10')
Add a GRE tunnel with explicit VIPs:
>>> zia.traffic.add_gre_tunnel('203.0.113.11',
... primary_dest_vip_id='88088',
... secondary_dest_vip_id='54590',
... comment='GRE Tunnel for Manufacturing Plant')
"""
# If primary/secondary VIPs not provided, add the closest diverse VIPs
if primary_dest_vip_id is None and secondary_dest_vip_id is None:
recommended_vips = self.get_closest_diverse_vip_ids(source_ip)
primary_dest_vip_id = recommended_vips[0]
secondary_dest_vip_id = recommended_vips[1]
payload = {
"sourceIp": source_ip,
"primaryDestVip": {"id": primary_dest_vip_id},
"secondaryDestVip": {"id": secondary_dest_vip_id},
}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("greTunnels", json=payload)
def list_static_ips(self, **kwargs) -> BoxList:
"""
Returns the list of all configured static IPs.
Keyword Args:
**available_for_gre_tunnel (bool, optional):
Only return the static IP addresses that are not yet associated with a GRE tunnel if True.
Defaults to False.
**ip_address (str, optional):
Filter based on IP address.
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
Returns:
:obj:`BoxList`: A list of the configured static IPs
Examples:
List static IPs using default settings:
>>> for ip_address in zia.traffic.list_static_ips():
... print(ip_address)
List static IPs, limiting to a maximum of 10 items:
>>> for ip_address in zia.traffic.list_static_ips(max_items=10):
... print(ip_address)
List static IPs, returning 200 items per page for a maximum of 2 pages:
>>> for ip_address in zia.traffic.list_static_ips(page_size=200, max_pages=2):
... print(ip_address)
"""
return BoxList(Iterator(self._api, "staticIP", **kwargs))
def get_static_ip(self, static_ip_id: str) -> Box:
"""
Returns information for the specified static IP.
Args:
static_ip_id (str):
The unique identifier for the static IP.
Returns:
:obj:`dict`: The resource record for the static IP
Examples:
>>> static_ip = zia.traffic.get_static_ip('967134')
"""
return self._get(f"staticIP/{static_ip_id}")
def add_static_ip(self, ip_address: str, **kwargs) -> Box:
"""
Adds a new static IP.
Args:
ip_address (str):
The static IP address
Keyword Args:
**comment (str):
Additional information about this static IP address.
**geo_override (bool):
If not set, geographic coordinates and city are automatically determined from the IP address.
Otherwise, the latitude and longitude coordinates must be provided.
**routable_ip (bool):
Indicates whether a non-RFC 1918 IP address is publicly routable. This attribute is ignored if there
is no ZIA Private Service Edge associated to the organization.
**latitude (float):
Required only if the geoOverride attribute is set. Latitude with 7 digit precision after
decimal point, ranges between -90 and 90 degrees.
**longitude (float):
Required only if the geoOverride attribute is set. Longitude with 7 digit precision after decimal
point, ranges between -180 and 180 degrees.
Returns:
:obj:`Box`: The resource record for the newly created static IP.
Examples:
Add a new static IP address:
>>> zia.traffic.add_static_ip(ip_address='203.0.113.10',
... comment="Los Angeles Branch Office")
"""
payload = {
"ipAddress": ip_address,
}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("staticIP", json=payload)
def check_static_ip(self, ip_address: str) -> int:
"""
Validates if a static IP object is correct.
Args:
ip_address (str):
The static IP address
Returns:
:obj:`int`: 200 if the static IP provided is valid.
Examples:
>>> zia.traffic.check_static_ip(ip_address='203.0.113.11')
"""
payload = {
"ipAddress": ip_address,
}
return self._post("staticIP/validate", json=payload, box=False).status_code
def update_static_ip(self, static_ip_id: str, **kwargs) -> Box:
"""
Updates information relating to the specified static IP.
Args:
static_ip_id (str):
The unique identifier for the static IP
**kwargs:
Optional keyword args.
Keyword Args:
**comment (str):
Additional information about this static IP address.
**geo_override (bool):
If not set, geographic coordinates and city are automatically determined from the IP address.
Otherwise, the latitude and longitude coordinates must be provided.
**routable_ip (bool):
Indicates whether a non-RFC 1918 IP address is publicly routable. This attribute is ignored if there
is no ZIA Private Service Edge associated to the organization.
**latitude (float):
Required only if the geoOverride attribute is set. Latitude with 7 digit precision after
decimal point, ranges between -90 and 90 degrees.
**longitude (float):
Required only if the geoOverride attribute is set. Longitude with 7 digit precision after decimal
point, ranges between -180 and 180 degrees.
Returns:
:obj:`Box`: The updated static IP resource record.
Examples:
>>> zia.traffic.update_static_ip('972494', comment='NY Branch Office')
"""
payload = convert_keys(self.get_static_ip(static_ip_id))
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._put(f"staticIP/{static_ip_id}", json=payload)
def delete_static_ip(self, static_ip_id: str) -> int:
"""
Delete the specified static IP.
Args:
static_ip_id (str):
The unique identifier for the static IP.
Returns:
:obj:`int`: The response code for the operation.
Examples:
>>> zia.traffic.delete_static_ip('972494')
"""
return self._delete(f"staticIP/{static_ip_id}", box=False).status_code
def list_vips(self, **kwargs) -> BoxList:
"""
Returns a list of virtual IP addresses (VIPs) available in the Zscaler cloud.
Keyword Args:
**dc (str, optional):
Filter based on data center.
**include (str, optional):
Include all, private, or public VIPs in the list. Available choices are `all`, `private`, `public`.
Defaults to `public`.
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
**region (str, optional):
Filter based on region.
Returns:
:obj:`BoxList`: List of VIP resource records.
Examples:
List VIPs using default settings:
>>> for vip in zia.traffic.list_vips():
... pprint(vip)
List VIPs, limiting to a maximum of 10 items:
>>> for vip in zia.traffic.list_vips(max_items=10):
... print(vip)
List VIPs, returning 200 items per page for a maximum of 2 pages:
>>> for vip in zia.traffic.list_vips(page_size=200, max_pages=2):
... print(vip)
"""
return BoxList(Iterator(self._api, "vips", **kwargs))
def list_vips_recommended(self, source_ip: str, **kwargs) -> BoxList:
"""
Returns a list of recommended virtual IP addresses (VIPs) based on parameters.
Args:
source_ip (str):
The source IP address.
**kwargs:
Optional keywords args.
Keyword Args:
routable_ip (bool):
The routable IP address. Default: True.
within_country_only (bool):
Search within country only. Default: False.
include_private_service_edge (bool):
Include ZIA Private Service Edge VIPs. Default: True.
include_current_vips (bool):
Include currently assigned VIPs. Default: True.
latitude (str):
Latitude coordinate of GRE tunnel source.
longitude (str):
Longitude coordinate of GRE tunnel source.
geo_override (bool):
Override the geographic coordinates. Default: False.
Returns:
:obj:`BoxList`: List of VIP resource records.
Examples:
Return recommended VIPs for a given source IP:
>>> for vip in zia.traffic.list_vips_recommended(source_ip='203.0.113.30'):
... pprint(vip)
"""
payload = {"sourceIp": source_ip}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._get("vips/recommendedList", params=payload)
def get_closest_diverse_vip_ids(self, ip_address: str) -> tuple:
"""
Returns the closest diverse Zscaler destination VIPs for a given IP address.
Args:
ip_address (str):
The IP address used for locating the closest diverse VIPs.
Returns:
:obj:`tuple`: Tuple containing the preferred and secondary VIP IDs.
Examples:
>>> closest_vips = zia.traffic.get_closest_diverse_vip_ids('203.0.113.20')
"""
vips_list = self.list_vips_recommended(source_ip=ip_address)
preferred_vip = vips_list[0] # First entry is closest vip
# Generator to find the next closest vip not in the same city as our preferred
secondary_vip = next((vip for vip in vips_list if vip.city != preferred_vip.city))
recommended_vips = (preferred_vip.id, secondary_vip.id)
return recommended_vips
def list_vpn_credentials(self, **kwargs) -> BoxList:
"""
Returns the list of all configured VPN credentials.
Args:
**kwargs:
Optional keyword search filters.
Keyword Args:
**include_only_without_location (bool, optional):
Include VPN credential only if not associated to any location.
**location_id (int, optional):
Gets the VPN credentials for the specified location ID.
**NOTE**: Included for completeness as per documentation, but the ZIA API does not respond with
filtered results.
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
**search (str, optional):
The search string used to match against a VPN credential's commonName, fqdn, ipAddress,
comments, or locationName
**type (str, optional):
Only gets VPN credentials for the specified type (CN, IP, UFQDN, XAUTH)
Returns:
:obj:`BoxList`: List containing the VPN credential resource records.
Examples:
List VPN credentials using default settings:
>>> for credential in zia.traffic.list_vpn_credentials:
... pprint(credential)
List VPN credentials, limiting to a maximum of 10 items:
>>> for credential in zia.traffic.list_vpn_credentials(max_items=10):
... print(credential)
List VPN credentials, returning 200 items per page for a maximum of 2 pages:
>>> for credential in zia.traffic.list_vpn_credentials(page_size=200, max_pages=2):
... print(credential)
"""
return BoxList(Iterator(self._api, "vpnCredentials", **kwargs))
def add_vpn_credential(self, authentication_type: str, pre_shared_key: str, **kwargs) -> Box:
"""
Add new VPN credentials.
Args:
authentication_type (str):
VPN authentication type (i.e., how the VPN credential is sent to the server). It is not modifiable
after VpnCredential is created.
Only ``IP`` and ``UFQDN`` supported via API.
pre_shared_key (str):
Pre-shared key. This is a required field for UFQDN and IP auth type.
Keyword Args:
ip_address (str):
The static IP address associated with these VPN credentials.
fqdn (str):
Fully Qualified Domain Name. Applicable only to UFQDN auth type. This must be provided in the format
`userid@fqdn`, where the `fqdn` is an authorised domain for your tenancy.
comments (str):
Additional information about this VPN credential.
location_id (str):
Associate the VPN credential with an existing location.
Returns:
:obj:`Box`: The newly created VPN credential resource record.
Examples:
Add a VPN credential using IP authentication type before location has been defined:
>>> zia.traffic.add_vpn_credential(authentication_type='IP',
... pre_shared_key='MyInsecurePSK',
... ip_address='203.0.113.40',
... comments='NY Branch Office')
Add a VPN credential using UFQDN authentication type and associate with location:
>>> zia.traffic.add_vpn_credential(authentication_type='UFQDN',
... pre_shared_key='MyInsecurePSK',
... fqdn='[email protected]',
... comments='London Branch Office',
... location_id='94963682')
"""
payload = {
"type": authentication_type,
"preSharedKey": pre_shared_key,
}
# Add location ID to payload if specified.
if kwargs.get("location_id"):
payload["location"] = {"id": kwargs.pop("location_id")}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._post("vpnCredentials", json=payload)
def bulk_delete_vpn_credentials(self, credential_ids: list) -> int:
"""
Bulk delete VPN credentials.
Args:
credential_ids (list):
List of credential IDs that will be deleted.
Returns:
:obj:`int`: Response code for operation.
Examples:
>>> zia.traffic.bulk_delete_vpn_credentials(['94963984', '97679232'])
"""
payload = {"ids": credential_ids}
return self._post("vpnCredentials/bulkDelete", json=payload, box=False).status_code
def get_vpn_credential(self, credential_id: str = None, fqdn: str = None) -> Box:
"""
Get VPN credentials for the specified ID or fqdn.
Args:
credential_id (str, optional):
The unique identifier for the VPN credentials.
fqdn (str, optional):
The unique FQDN for the VPN credentials.
Returns:
:obj:`Box`: The resource record for the requested VPN credentials.
Examples:
>>> pprint(zia.traffic.get_vpn_credential('97679391'))
>>> pprint(zia.traffic.get_vpn_credential(fqdn='userid@fqdn'))
"""
if credential_id and fqdn:
raise ValueError("TOO MANY ARGUMENTS: Expected either a credential_id or an fqdn. Both were provided.")
elif fqdn:
credential = (record for record in self.list_vpn_credentials(search=fqdn) if record.fqdn == fqdn)
return next(credential, None)
return self._get(f"vpnCredentials/{credential_id}")
def update_vpn_credential(self, credential_id: str, **kwargs) -> Box:
"""
Update VPN credentials with the specified ID.
Args:
credential_id (str):
The unique identifier for the credential that will be updated.
Keyword Args:
pre_shared_key (str):
Pre-shared key. This is a required field for UFQDN and IP auth type.
comments (str):
Additional information about this VPN credential.
location_id (str):
The unique identifier for an existing location.
Returns:
:obj:`Box`: The newly updated VPN credential resource record.
Examples:
Add a comment:
>>> zia.traffic.update_vpn_credential('94963984',
... comments='Adding a comment')
Update the pre-shared key:
>>> zia.traffic.update_vpn_credential('94963984',
... pre_shared_key='MyNewInsecureKey',
... comments='Pre-shared key rotated on 21 JUL 21')
"""
# Cache the credential record
payload = convert_keys(self.get_vpn_credential(credential_id))
# Add location ID to payload if specified.
if kwargs.get("location_id"):
payload["location"] = {"id": kwargs.pop("location_id")}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._put(f"vpnCredentials/{credential_id}", json=payload)
def delete_vpn_credential(self, credential_id: str) -> int:
"""
Delete VPN credentials for the specified ID.
Args:
credential_id (str):
The unique identifier for the VPN credentials that will be deleted.
Returns:
:obj:`int`: Response code for the operation.
Examples:
>>> zia.traffic.delete_vpn_credential('97679391')
"""
return self._delete(f"vpnCredentials/{credential_id}", box=False).status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/traffic.py | traffic.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
import os
from box import Box
from restfly.session import APISession
from zscaler import __version__
from .admin_and_role_management import AdminAndRoleManagementAPI
from .audit_logs import AuditLogsAPI
from .config import ActivationAPI
from .dlp import DLPAPI
from .firewall import FirewallPolicyAPI
from .labels import RuleLabelsAPI
from .locations import LocationsAPI
from .sandbox import CloudSandboxAPI
from .security import SecurityPolicyAPI
from .session import AuthenticatedSessionAPI
from .ssl_inspection import SSLInspectionAPI
from .traffic import TrafficForwardingAPI
from .url_categories import URLCategoriesAPI
from .url_filters import URLFilteringAPI
from .users import UserManagementAPI
from .vips import DataCenterVIPSAPI
from .web_dlp import WebDLP
class ZIA(APISession):
"""
A Controller to access Endpoints in the Zscaler Internet Access (ZIA) API.
The ZIA object stores the session token and simplifies access to CRUD options within the ZIA platform.
Attributes:
api_key (str): The ZIA API key generated from the ZIA console.
username (str): The ZIA administrator username.
password (str): The ZIA administrator password.
cloud (str): The Zscaler cloud for your tenancy, accepted values are:
* ``zscaler``
* ``zscalerone``
* ``zscalertwo``
* ``zscalerthree``
* ``zscloud``
* ``zscalerbeta``
override_url (str):
If supplied, this attribute can be used to override the production URL that is derived
from supplying the `cloud` attribute. Use this attribute if you have a non-standard tenant URL
(e.g. internal test instance etc). When using this attribute, there is no need to supply the `cloud`
attribute. The override URL will be prepended to the API endpoint suffixes. The protocol must be included
i.e. http:// or https://.
"""
_vendor = "Zscaler"
_product = "Zscaler Internet Access"
_backoff = 3
_build = __version__
_box = True
_box_attrs = {"camel_killer_box": True}
_env_base = "ZIA"
_url = "https://zsapi.zscaler.net/api/v1"
env_cloud = "zscaler"
def __init__(self, **kw):
self._api_key = kw.get("api_key", os.getenv(f"{self._env_base}_API_KEY"))
self._username = kw.get("username", os.getenv(f"{self._env_base}_USERNAME"))
self._password = kw.get("password", os.getenv(f"{self._env_base}_PASSWORD"))
self.env_cloud = kw.get("cloud", os.getenv(f"{self._env_base}_CLOUD"))
self._url = (
kw.get("override_url", os.getenv(f"{self._env_base}_OVERRIDE_URL")) or f"https://zsapi.{self.env_cloud}.net/api/v1"
)
self.conv_box = True
self.sandbox_token = kw.get("sandbox_token", os.getenv(f"{self._env_base}_SANDBOX_TOKEN"))
super(ZIA, self).__init__(**kw)
def _build_session(self, **kwargs) -> Box:
"""Creates a ZIA API session."""
super(ZIA, self)._build_session(**kwargs)
return self.session.create(
api_key=self._api_key,
username=self._username,
password=self._password,
)
def _deauthenticate(self):
"""Ends the authentication session."""
return self.session.delete()
@property
def session(self):
"""The interface object for the :ref:`ZIA Authenticated Session interface <zia-session>`."""
return AuthenticatedSessionAPI(self)
@property
def admin_and_role_management(self):
"""
The interface object for the :ref:`ZIA Admin and Role Management interface <zia-admin_and_role_management>`.
"""
return AdminAndRoleManagementAPI(self)
@property
def audit_logs(self):
"""
The interface object for the :ref:`ZIA Admin Audit Logs interface <zia-audit_logs>`.
"""
return AuditLogsAPI(self)
@property
def config(self):
"""
The interface object for the :ref:`ZIA Activation interface <zia-config>`.
"""
return ActivationAPI(self)
@property
def dlp(self):
"""
The interface object for the :ref:`ZIA DLP Dictionaries interface <zia-dlp>`.
"""
return DLPAPI(self)
@property
def firewall(self):
"""
The interface object for the :ref:`ZIA Firewall Policies interface <zia-firewall>`.
"""
return FirewallPolicyAPI(self)
@property
def labels(self):
"""
The interface object for the :ref:`ZIA Rule Labels interface <zia-labels>`.
"""
return RuleLabelsAPI(self)
@property
def locations(self):
"""
The interface object for the :ref:`ZIA Locations interface <zia-locations>`.
"""
return LocationsAPI(self)
@property
def sandbox(self):
"""
The interface object for the :ref:`ZIA Cloud Sandbox interface <zia-sandbox>`.
"""
return CloudSandboxAPI(self)
@property
def security(self):
"""
The interface object for the :ref:`ZIA Security Policy Settings interface <zia-security>`.
"""
return SecurityPolicyAPI(self)
@property
def ssl(self):
"""
The interface object for the :ref:`ZIA SSL Inspection interface <zia-ssl_inspection>`.
"""
return SSLInspectionAPI(self)
@property
def traffic(self):
"""
The interface object for the :ref:`ZIA Traffic Forwarding interface <zia-traffic>`.
"""
return TrafficForwardingAPI(self)
@property
def url_categories(self):
"""
The interface object for the :ref:`ZIA URL Categories interface <zia-url_categories>`.
"""
return URLCategoriesAPI(self)
@property
def url_filters(self):
"""
The interface object for the :ref:`ZIA URL Filtering interface <zia-url_filters>`.
"""
return URLFilteringAPI(self)
@property
def users(self):
"""
The interface object for the :ref:`ZIA User Management interface <zia-users>`.
"""
return UserManagementAPI(self)
@property
def vips(self):
"""
The interface object for the :ref:`ZIA Data Center VIPs interface <zia-vips>`.
"""
return DataCenterVIPSAPI(self)
@property
def web_dlp(self):
"""
The interface object for the :ref: `ZIA Data-Loss-Prevention Web DLP Rules`.
"""
return WebDLP(self) | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/__init__.py | __init__.py |
# Copyright (c) 2023, Zscaler Inc.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
from box import Box, BoxList
from restfly.endpoint import APIEndpoint
from zscaler.utils import Iterator, convert_keys, snake_to_camel
class UserManagementAPI(APIEndpoint):
"""
The methods within this section use the ZIA User Management API and are accessed via ``ZIA.users``.
"""
def list_departments(self, **kwargs) -> BoxList:
"""
Returns the list of departments.
Keyword Args:
**limit_search (bool, optional):
Limits the search to match against the department name only.
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
**search (str, optional):
The search string used to match against a department's name or comments attributes.
Returns:
:obj:`BoxList`: The list of departments configured in ZIA.
Examples:
List departments using default settings:
>>> for department in zia.users.list_departments():
... print(department)
List departments, limiting to a maximum of 10 items:
>>> for department in zia.users.list_departments(max_items=10):
... print(department)
List departments, returning 200 items per page for a maximum of 2 pages:
>>> for department in zia.users.list_departments(page_size=200, max_pages=2):
... print(department)
"""
return BoxList(Iterator(self._api, "departments", **kwargs))
def get_department(self, department_id: str) -> Box:
"""
Returns the department details for a given department.
Args:
department_id (str): The unique identifier for the department.
Returns:
:obj:`Box`: The department resource record.
Examples:
>>> department = zia.users.get_department('99999')
"""
return self._get(f"departments/{department_id}")
def list_groups(self, **kwargs) -> BoxList:
"""
Returns the list of user groups.
Keyword Args:
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
**search (str, optional):
The search string used to match against a group's name or comments attributes.
Returns:
:obj:`BoxList`: The list of user groups configured in ZIA.
Examples:
List groups using default settings:
>>> for group in zia.users.list_groups():
... print(group)
List groups, limiting to a maximum of 10 items:
>>> for group in zia.users.list_groups(max_items=10):
... print(group)
List groups, returning 200 items per page for a maximum of 2 pages:
>>> for group in zia.users.list_groups(page_size=200, max_pages=2):
... print(group)
"""
return BoxList(Iterator(self._api, "groups", **kwargs))
def get_group(self, group_id: str) -> Box:
"""
Returns the user group details for a given user group.
Args:
group_id (str): The unique identifier for the user group.
Returns:
:obj:`Box`: The user group resource record.
Examples:
>>> user_group = zia.users.get_group('99999')
"""
return self._get(f"groups/{group_id}")
def list_users(self, **kwargs) -> BoxList:
"""
Returns the list of users.
Keyword Args:
**dept (str, optional):
Filters by department name. This is a `starts with` match.
**group (str, optional):
Filters by group name. This is a `starts with` match.
**max_items (int, optional):
The maximum number of items to request before stopping iteration.
**max_pages (int, optional):
The maximum number of pages to request before stopping iteration.
**name (str, optional):
Filters by user name. This is a `partial` match.
**page_size (int, optional):
Specifies the page size. The default size is 100, but the maximum size is 1000.
Returns:
:obj:`BoxList`: The list of users configured in ZIA.
Examples:
List users using default settings:
>>> for user in zia.users.list_users():
... print(user)
List users, limiting to a maximum of 10 items:
>>> for user in zia.users.list_users(max_items=10):
... print(user)
List users, returning 200 items per page for a maximum of 2 pages:
>>> for user in zia.users.list_users(page_size=200, max_pages=2):
... print(user)
"""
return BoxList(Iterator(self._api, "users", **kwargs))
def add_user(self, name: str, email: str, groups: list, department: dict, **kwargs) -> Box:
"""
Creates a new ZIA user.
Args:
name (str):
User name.
email (str):
User email consists of a user name and domain name. It does not have to be a valid email address,
but it must be unique and its domain must belong to the organisation.
groups (list):
List of Groups a user belongs to.
department (dict):
The department the user belongs to.
Keyword Args:
**comments (str):
Additional information about this user.
**tempAuthEmail (str):
Temporary Authentication Email. If you enabled one-time tokens or links, enter the email address to
which the Zscaler service sends the tokens or links. If this is empty, the service will send the
email to the User email.
**adminUser (bool):
True if this user is an Admin user.
**password (str):
User's password. Applicable only when authentication type is Hosted DB. Password strength must follow
what is defined in the auth settings.
**type (str):
User type. Provided only if this user is not an end user. Accepted values are SUPERADMIN, ADMIN,
AUDITOR, GUEST, REPORT_USER and UNAUTH_TRAFFIC_DEFAULT.
Returns:
:obj:`Box`: The resource record for the new user.
Examples:
Add a user with the minimum required params:
>>> zia.users.add_user(name='Jane Doe',
... email='[email protected]',
... groups=[{
... 'id': '49916183'}]
... department={
... 'id': '49814321'})
"""
payload = {
"name": name,
"email": email,
"groups": groups,
"department": department,
}
# Add optional parameters to payload
for key, value in kwargs.items():
payload[key] = value
return self._post("users", json=payload)
def bulk_delete_users(self, user_ids: list) -> Box:
"""
Bulk delete ZIA users.
Args:
user_ids (list): List containing id int of each user that will be deleted.
Returns:
:obj:`Box`: Object containing list of users that were deleted.
Examples:
>>> bulk_delete_users = zia.users.bulk_delete_users(['99999', '88888', '77777'])
"""
payload = {"ids": user_ids}
return self._post("users/bulkDelete", json=payload)
def get_user(self, user_id: str = None, email: str = None) -> Box:
"""
Returns the user information for the specified ID or email.
Args:
user_id (optional, str): The unique identifier for the requested user.
email (optional, str): The unique email for the requested user.
Returns:
:obj:`Box`: The resource record for the requested user.
Examples
>>> user = zia.users.get_user('99999')
>>> user = zia.users.get_user(email='[email protected]')
"""
if user_id and email:
raise ValueError("TOO MANY ARGUMENTS: Expected either a user_id or an email. Both were provided.")
elif email:
user = (record for record in self.list_users(search=email) if record.email == email)
return next(user, None)
return self._get(f"users/{user_id}")
def update_user(
self,
user_id: str,
**kwargs,
) -> Box:
"""
Updates the details for the specified user.
Args:
user_id (str):
The unique identifier for the user.
**kwargs:
Optional parameters
Keyword Args:
**adminUser (bool):
True if this user is an Admin user.
**comments (str):
Additional information about this user.
**department (dict, optional):
The updated department object. Defaults to existing department if not specified.
**email (str, optional):
The updated email. Defaults to existing email if not specified.
**groups (:obj:`list` of :obj:`dict`, optional):
The updated list of groups. Defaults to existing groups if not specified.
**name (str, optional):
The updated name. Defaults to existing name if not specified.
**password (str):
User's password. Applicable only when authentication type is Hosted DB. Password strength must follow
what is defined in the auth settings.
**tempAuthEmail (str):
Temporary Authentication Email. If you enabled one-time tokens or links, enter the email address to
which the Zscaler service sends the tokens or links. If this is empty, the service will send the
email to the User email.
**type (str):
User type. Provided only if this user is not an end user. Accepted values are SUPERADMIN, ADMIN,
AUDITOR, GUEST, REPORT_USER and UNAUTH_TRAFFIC_DEFAULT.
Returns:
:obj:`Box`: The resource record of the updated user.
Examples:
Update the user name:
>>> zia.users.update_user('99999',
... name='Joe Bloggs')
Update the email and add a comment:
>>> zia.users.update_user('99999',
... name='Joe Bloggs',
... comment='External auditor.')
"""
payload = convert_keys(self.get_user(user_id))
# Add optional parameters to payload
for key, value in kwargs.items():
payload[snake_to_camel(key)] = value
return self._put(f"users/{user_id}", json=payload)
def delete_user(self, user_id: str) -> int:
"""
Deletes the specified user ID.
Args:
user_id (str): The unique identifier of the user that will be deleted.
Returns:
:obj:`int`: The response code for the request.
Examples
>>> user = zia.users.delete_user('99999')
"""
return self._delete(f"users/{user_id}", box=False).status_code | zscaler-sdk-python | /zscaler_sdk_python-1.0.0-py3-none-any.whl/zscaler/zia/users.py | users.py |
# Zscaler Tools
Python Library used for interacting with Zscaler's public API
## General Information
This Python Library is being devloped to provide an easily usable interface with Zscaler API.
> https://help.zscaler.com/zia/api
Zscaler API Functions in this Library
- ZIA
- [x] Activation
- [ ] Admin Audit Logs
- [ ] Admin & Role Management
- [x] API Authentication
- [ ] Cloud Sandbox Report
- [ ] Firewall Policies
- [x] Location Management
- [ ] Security Policy Settings
- [ ] SSL Inspection Settings
- [ ] Traffic Forwarding
- [x] User Management
- [ ] URL Categories
- [ ] URL Filtering Policies
- [ ] User Authentication Settings
- ZPA
- API not released by Zscaler
## Features
- Manage Request Sessions to Zscaler API
- You do not need to explicitly call the login() function
- Manage Auto-Retry (3 retries per call)
- Manage 429 API Rate Limit Reponse
- Library will read response and wait for Rate Limit before continuing
## How to install:
```
pip install zscalertools
```
## How to use:
```
import zscalertools
ztools_zia_api = zscalertools.zia('admin.zscalerbeta.net', '[email protected]', 'password', 'Apikey')
ztools_zia_api.get_users()
```
Attributes
----------
```
cloud : str
a string containing the zscaler cloud to use
username : str
the username of the account to connect to the zscaler cloud
password : str
the password for the username string
apikey : str
apikey needed to connect to zscaler cloud
```
Zscaler Methods
---------------
API Authentication
------------------
login()
Attempts to create a web session to Zscaler API
logout()
Delete's existing web session to Zscaler API
Activation
----------
get_status()
Gets the activation status for a configuration change
activate_status()
Activates configuration changes
User Management
---------------
get_users(name=None, dept=None, group=None, page=None, pageSize=None)
Gets a list of all users and allows user filtering by name, department, or group
get_user(id)
Gets the user information for the specified ID
get_groups(search=None, page=None, pageSize=None)
Gets a list of groups
get_group(id)
Gets the group for the specified ID
get_departments(search=None, name=None, page=None, pageSize=None)
Gets a list of departments
get_department(id)
Gets the department for the specified ID
add_user(user_object)
Adds a new user
update_user(id, user_object)
Updates the user information for the specified ID
delete_user(id)
Deletes the user for the specified ID
bulk_delete_users(ids=[])
Bulk delete users up to a maximum of 500 users per request
Location Management
-------------------
get_locations(search=None, sslScanEnabled=None, xffEnabled=None, authRequired=None, bwEnforced=None, page=None, pageSize=None)
Gets information on locations
get_location(id)
Gets the location information for the specified ID
get_sublocations(id, search=None, sslScanEnabled=None, xffEnabled=None, authRequired=None, bwEnforced=None, page=None, pageSize=None, enforceAup=None, enableFirewall=None)
Gets the sub-location information for the location with the specified ID. These are the sub-locations associated to the parent location
add_location(location_object)
Adds new locations and sub-locations
get_locations_lite(includeSubLocations=None, includeParentLocations=None, sslScanEnabled=None, search=None, page=None, pageSize=None)
Gets a name and ID dictionary of locations
update_location(id, location_object)
Updates the location and sub-location information for the specified ID
delete_location(id)
Deletes the location or sub-location for the specified ID
buld_delete_locations(ids=[])
Bulk delete locations up to a maximum of 100 users per request. The response returns the location IDs that were successfully deleted.
Custom Methods
--------------
```
pull_all_user_data()
Pulls all users, departments and groups and returns 3 arrays (up to 999,999 entries a piece)
```
## Contributing
Pull requests are welcome. Initial development is focused on building out the rest of the library.
Please make sure to update tests as appropriate. | zscalertools | /zscalertools-0.0.11.tar.gz/zscalertools-0.0.11/README.md | README.md |
[](https://travis-ci.org/zmap/zschema)
ZSchema
=======
ZSchema is a generic (meta-)schema language for defining database schemas
that facilitates (1) validating JSON documents against a schema definition and
(2) compilation into multiple database engines. For example, if you wanted to
maintain a single database schema for both MongoDB and ElasticSearch.
Properties can also be documented inline and documentation compiled to HTML
or a console-friendly text document.
Schemas are defined in native Python code. Example:
```python
Record({
"name":String(required=True),
"addresses":ListOf(SubRecord({
"street":String(),
"zipcode":String()
}),
"area_code":Integer()
})
```
Command Line Interface
----------------------
`zschema [command] [schema] [file]`
Commands:
* elasticsearch (compile to Elastic Search)
* bigquery (compile to Google BigQuery)
* json (compile documentation to JSON)
* proto (compile documentation to proto3)
* text (compile documentation to plain text)
* html (compile documentation to HTML)
* validate (validate JSON file (one document per line) against schema)
The schema file can be defined on the command line as module:var.
Running Tests
-------------
Tests are run with [nose](http://nose.readthedocs.io/en/latest/). Run them via `python setup.py test`.
License and Copyright
---------------------
ZSchema Copyright 2018 Regents of the University of Michigan
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See LICENSE for the specific
language governing permissions and limitations under the License.
| zschema | /zschema-0.10.2.tar.gz/zschema-0.10.2/README.md | README.md |
=====
zscli
=====





ZeroSSL API CLI Tool
* Free software: MIT license
* Documentation: https://zscli.readthedocs.io.
Credits
-------
This package was created with Cookiecutter and `rstms/cookiecutter-python-cli`, a fork of the `audreyr/cookiecutter-pypackage` project template.
[audreyr/cookiecutter](https://github.com/audreyr/cookiecutter)
[audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage)
[rstms/cookiecutter-python-cli](https://github.com/rstms/cookiecutter-python-cli)
| zscli | /zscli-0.1.0.tar.gz/zscli-0.1.0/README.md | README.md |
.. highlight:: shell
============
Installation
============
Stable release
--------------
To install zscli, run this command in your terminal:
.. code-block:: console
$ pip install zscli
This is the preferred method to install zscli, as it will always install the most recent stable release.
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.
.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
From sources
------------
The sources for zscli can be downloaded from the `Github repo`_.
You can either clone the public repository:
.. code-block:: console
$ git clone git://github.com/rstms/zscli
Or download the `tarball`_:
.. code-block:: console
$ curl -OJL https://github.com/rstms/zscli/tarball/master
Once you have a copy of the source, you can install it with:
.. code-block:: console
$ python setup.py install
.. _Github repo: https://github.com/rstms/zscli
.. _tarball: https://github.com/rstms/zscli/tarball/master
| zscli | /zscli-0.1.0.tar.gz/zscli-0.1.0/docs/installation.rst | installation.rst |
zscli package
=============
Submodules
----------
zscli.cli module
----------------
.. automodule:: zscli.cli
:members:
:undoc-members:
:show-inheritance:
zscli.version module
--------------------
.. automodule:: zscli.version
:members:
:undoc-members:
:show-inheritance:
zscli.zscli module
------------------
.. automodule:: zscli.zscli
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: zscli
:members:
:undoc-members:
:show-inheritance:
| zscli | /zscli-0.1.0.tar.gz/zscli-0.1.0/docs/zscli.rst | zscli.rst |
# Zscaler SDK (zsdk)
The Zscaler SDK (zsdk) is a Python library designed to provide an easy and programmatic way to interact with publicly available Zscaler API endpoints. With zsdk, developers can manage and automate tasks across Zscaler's suite of security services, including Zscaler Internet Access (ZIA), Zscaler Private Access (ZPA), and Zscaler Digital Experience (ZDX).
## Features
- Comprehensive coverage of Zscaler's public API.
- Easy-to-use Pythonic interfaces.
- Examples and guides to get started quickly.
## Installation
You can install zsdk via pip:
```bash
pip install zsdk
```
## Getting Started
Here's a quick example to get you started with ZIA:
```python
from zsdk.zia import zia
zscaler = zia(username='YOUR_USERNAME', password='YOUR_PASSWORD', api_key='YOUR_API_KEY', cloud_name="zscaler.net")
print(zscaler.locations.list())
```
See the [examples](https://github.com/SYNically-ACKward/zsdk/tree/main/examples) directory for more comprehensive examples and the [documentation](https://help.zscaler.com/zia/getting-started-zia-api) for detailed API reference.
## Support and Contributions
For questions, issues, or contributions, please see the [CONTRIBUTING.md](https://github.com/SYNically-ACKward/zsdk/blob/1bfe49df609474e7820274460238fac2288d3964/CONTRIBUTING.md) file.
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/SYNically-ACKward/zsdk/blob/1bfe49df609474e7820274460238fac2288d3964/LICENSE) file for details.
| zsdk | /zsdk-1.1.2.tar.gz/zsdk-1.1.2/README.md | README.md |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
import common_pb2 as common__pb2
import pubkey_pb2 as pubkey__pb2
import ct_pb2 as ct__pb2
import certificate_pb2 as certificate__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='anonstore.proto',
package='zsearch',
syntax='proto3',
serialized_pb=_b('\n\x0f\x61nonstore.proto\x12\x07zsearch\x1a\x0c\x63ommon.proto\x1a\x0cpubkey.proto\x1a\x08\x63t.proto\x1a\x11\x63\x65rtificate.proto\"\x88\x03\n\x0f\x41nonymousRecord\x12\x10\n\x08sha256fp\x18\x01 \x01(\x0c\x12\x11\n\ttimestamp\x18\x02 \x01(\x10\x12\x0f\n\x07scan_id\x18\x03 \x01(\r\x12\x14\n\x08\x65xported\x18\x04 \x01(\x08\x42\x02\x18\x01\x12\'\n\x08userdata\x18\x05 \x01(\x0b\x32\x15.zsearch.UserdataAtom\x12\x0e\n\x04\x64\x61ta\x18\x06 \x01(\tH\x00\x12\x12\n\x08raw_data\x18\x07 \x01(\x0cH\x00\x12+\n\x0b\x63\x65rtificate\x18\x08 \x01(\x0b\x32\x14.zsearch.CertificateH\x00\x12(\n\x03key\x18\t \x01(\x0b\x32\x19.zsearch.CryptographicKeyH\x00\x12\x1d\n\x02\x61s\x18\n \x01(\x0b\x32\x0f.zsearch.ASAtomH\x00\x12$\n\x08metadata\x18\x0e \x03(\x0b\x32\x12.zsearch.Metadatum\x12\x0c\n\x04tags\x18\x0f \x03(\t\x12\x12\n\nupdated_at\x18\x10 \x01(\x07\x12\x10\n\x08\x61\x64\x64\x65\x64_at\x18\x11 \x01(\x07\x42\x0c\n\noneof_data\"\xbe\x02\n\x0e\x41nonymousDelta\x12\x35\n\ndelta_type\x18\x01 \x01(\x0e\x32!.zsearch.AnonymousDelta.DeltaType\x12\x37\n\x0b\x64\x65lta_scope\x18\x02 \x01(\x0e\x32\".zsearch.AnonymousDelta.DeltaScope\x12(\n\x06record\x18\x03 \x01(\x0b\x32\x18.zsearch.AnonymousRecord\":\n\tDeltaType\x12\x0f\n\x0b\x44T_RESERVED\x10\x00\x12\r\n\tDT_UPDATE\x10\x01\x12\r\n\tDT_DELETE\x10\x02\"V\n\nDeltaScope\x12\x12\n\x0eSCOPE_RESERVED\x10\x00\x12\x13\n\x0fSCOPE_NO_CHANGE\x10\x01\x12\r\n\tSCOPE_NEW\x10\x02\x12\x10\n\x0cSCOPE_UPDATE\x10\x03\"\x8e\x02\n\x13\x45xternalCertificate\x12*\n\x06source\x18\x01 \x01(\x0e\x32\x1a.zsearch.CertificateSource\x12\x32\n\x10\x61nonymous_record\x18\x02 \x01(\x0b\x32\x18.zsearch.AnonymousRecord\x12$\n\tct_server\x18\x03 \x01(\x0e\x32\x11.zsearch.CTServer\x12*\n\tct_status\x18\x04 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x34\n\nnss_status\x18\x05 \x01(\x0b\x32 .zsearch.MozillaSalesForceStatus\x12\x0f\n\x07tbsHash\x18\x06 \x01(\x0c\x62\x06proto3')
,
dependencies=[common__pb2.DESCRIPTOR,pubkey__pb2.DESCRIPTOR,ct__pb2.DESCRIPTOR,certificate__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_ANONYMOUSDELTA_DELTATYPE = _descriptor.EnumDescriptor(
name='DeltaType',
full_name='zsearch.AnonymousDelta.DeltaType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='DT_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='DT_UPDATE', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='DT_DELETE', index=2, number=2,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=653,
serialized_end=711,
)
_sym_db.RegisterEnumDescriptor(_ANONYMOUSDELTA_DELTATYPE)
_ANONYMOUSDELTA_DELTASCOPE = _descriptor.EnumDescriptor(
name='DeltaScope',
full_name='zsearch.AnonymousDelta.DeltaScope',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='SCOPE_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SCOPE_NO_CHANGE', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SCOPE_NEW', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SCOPE_UPDATE', index=3, number=3,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=713,
serialized_end=799,
)
_sym_db.RegisterEnumDescriptor(_ANONYMOUSDELTA_DELTASCOPE)
_ANONYMOUSRECORD = _descriptor.Descriptor(
name='AnonymousRecord',
full_name='zsearch.AnonymousRecord',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='sha256fp', full_name='zsearch.AnonymousRecord.sha256fp', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='timestamp', full_name='zsearch.AnonymousRecord.timestamp', index=1,
number=2, type=16, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='scan_id', full_name='zsearch.AnonymousRecord.scan_id', index=2,
number=3, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='exported', full_name='zsearch.AnonymousRecord.exported', index=3,
number=4, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='userdata', full_name='zsearch.AnonymousRecord.userdata', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='data', full_name='zsearch.AnonymousRecord.data', index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='raw_data', full_name='zsearch.AnonymousRecord.raw_data', index=6,
number=7, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='certificate', full_name='zsearch.AnonymousRecord.certificate', index=7,
number=8, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='key', full_name='zsearch.AnonymousRecord.key', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='as', full_name='zsearch.AnonymousRecord.as', index=9,
number=10, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='metadata', full_name='zsearch.AnonymousRecord.metadata', index=10,
number=14, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='tags', full_name='zsearch.AnonymousRecord.tags', index=11,
number=15, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='updated_at', full_name='zsearch.AnonymousRecord.updated_at', index=12,
number=16, type=7, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='added_at', full_name='zsearch.AnonymousRecord.added_at', index=13,
number=17, type=7, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='oneof_data', full_name='zsearch.AnonymousRecord.oneof_data',
index=0, containing_type=None, fields=[]),
],
serialized_start=86,
serialized_end=478,
)
_ANONYMOUSDELTA = _descriptor.Descriptor(
name='AnonymousDelta',
full_name='zsearch.AnonymousDelta',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='delta_type', full_name='zsearch.AnonymousDelta.delta_type', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='delta_scope', full_name='zsearch.AnonymousDelta.delta_scope', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='record', full_name='zsearch.AnonymousDelta.record', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_ANONYMOUSDELTA_DELTATYPE,
_ANONYMOUSDELTA_DELTASCOPE,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=481,
serialized_end=799,
)
_EXTERNALCERTIFICATE = _descriptor.Descriptor(
name='ExternalCertificate',
full_name='zsearch.ExternalCertificate',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='source', full_name='zsearch.ExternalCertificate.source', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='anonymous_record', full_name='zsearch.ExternalCertificate.anonymous_record', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='ct_server', full_name='zsearch.ExternalCertificate.ct_server', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='ct_status', full_name='zsearch.ExternalCertificate.ct_status', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='nss_status', full_name='zsearch.ExternalCertificate.nss_status', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='tbsHash', full_name='zsearch.ExternalCertificate.tbsHash', index=5,
number=6, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=802,
serialized_end=1072,
)
_ANONYMOUSRECORD.fields_by_name['userdata'].message_type = common__pb2._USERDATAATOM
_ANONYMOUSRECORD.fields_by_name['certificate'].message_type = certificate__pb2._CERTIFICATE
_ANONYMOUSRECORD.fields_by_name['key'].message_type = pubkey__pb2._CRYPTOGRAPHICKEY
_ANONYMOUSRECORD.fields_by_name['as'].message_type = common__pb2._ASATOM
_ANONYMOUSRECORD.fields_by_name['metadata'].message_type = common__pb2._METADATUM
_ANONYMOUSRECORD.oneofs_by_name['oneof_data'].fields.append(
_ANONYMOUSRECORD.fields_by_name['data'])
_ANONYMOUSRECORD.fields_by_name['data'].containing_oneof = _ANONYMOUSRECORD.oneofs_by_name['oneof_data']
_ANONYMOUSRECORD.oneofs_by_name['oneof_data'].fields.append(
_ANONYMOUSRECORD.fields_by_name['raw_data'])
_ANONYMOUSRECORD.fields_by_name['raw_data'].containing_oneof = _ANONYMOUSRECORD.oneofs_by_name['oneof_data']
_ANONYMOUSRECORD.oneofs_by_name['oneof_data'].fields.append(
_ANONYMOUSRECORD.fields_by_name['certificate'])
_ANONYMOUSRECORD.fields_by_name['certificate'].containing_oneof = _ANONYMOUSRECORD.oneofs_by_name['oneof_data']
_ANONYMOUSRECORD.oneofs_by_name['oneof_data'].fields.append(
_ANONYMOUSRECORD.fields_by_name['key'])
_ANONYMOUSRECORD.fields_by_name['key'].containing_oneof = _ANONYMOUSRECORD.oneofs_by_name['oneof_data']
_ANONYMOUSRECORD.oneofs_by_name['oneof_data'].fields.append(
_ANONYMOUSRECORD.fields_by_name['as'])
_ANONYMOUSRECORD.fields_by_name['as'].containing_oneof = _ANONYMOUSRECORD.oneofs_by_name['oneof_data']
_ANONYMOUSDELTA.fields_by_name['delta_type'].enum_type = _ANONYMOUSDELTA_DELTATYPE
_ANONYMOUSDELTA.fields_by_name['delta_scope'].enum_type = _ANONYMOUSDELTA_DELTASCOPE
_ANONYMOUSDELTA.fields_by_name['record'].message_type = _ANONYMOUSRECORD
_ANONYMOUSDELTA_DELTATYPE.containing_type = _ANONYMOUSDELTA
_ANONYMOUSDELTA_DELTASCOPE.containing_type = _ANONYMOUSDELTA
_EXTERNALCERTIFICATE.fields_by_name['source'].enum_type = certificate__pb2._CERTIFICATESOURCE
_EXTERNALCERTIFICATE.fields_by_name['anonymous_record'].message_type = _ANONYMOUSRECORD
_EXTERNALCERTIFICATE.fields_by_name['ct_server'].enum_type = ct__pb2._CTSERVER
_EXTERNALCERTIFICATE.fields_by_name['ct_status'].message_type = ct__pb2._CTSERVERSTATUS
_EXTERNALCERTIFICATE.fields_by_name['nss_status'].message_type = certificate__pb2._MOZILLASALESFORCESTATUS
DESCRIPTOR.message_types_by_name['AnonymousRecord'] = _ANONYMOUSRECORD
DESCRIPTOR.message_types_by_name['AnonymousDelta'] = _ANONYMOUSDELTA
DESCRIPTOR.message_types_by_name['ExternalCertificate'] = _EXTERNALCERTIFICATE
AnonymousRecord = _reflection.GeneratedProtocolMessageType('AnonymousRecord', (_message.Message,), dict(
DESCRIPTOR = _ANONYMOUSRECORD,
__module__ = 'anonstore_pb2'
# @@protoc_insertion_point(class_scope:zsearch.AnonymousRecord)
))
_sym_db.RegisterMessage(AnonymousRecord)
AnonymousDelta = _reflection.GeneratedProtocolMessageType('AnonymousDelta', (_message.Message,), dict(
DESCRIPTOR = _ANONYMOUSDELTA,
__module__ = 'anonstore_pb2'
# @@protoc_insertion_point(class_scope:zsearch.AnonymousDelta)
))
_sym_db.RegisterMessage(AnonymousDelta)
ExternalCertificate = _reflection.GeneratedProtocolMessageType('ExternalCertificate', (_message.Message,), dict(
DESCRIPTOR = _EXTERNALCERTIFICATE,
__module__ = 'anonstore_pb2'
# @@protoc_insertion_point(class_scope:zsearch.ExternalCertificate)
))
_sym_db.RegisterMessage(ExternalCertificate)
_ANONYMOUSRECORD.fields_by_name['exported'].has_options = True
_ANONYMOUSRECORD.fields_by_name['exported']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
# @@protoc_insertion_point(module_scope) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/anonstore_pb2.py | anonstore_pb2.py |
import socket
import struct
import hashlib
import json
import dateutil.parser
import dateutil.tz
import time
import zsearch_definitions.common_pb2
import zsearch_definitions.hoststore_pb2
class Metadatum(object):
def __init__(self, key, value):
self._pb = zsearch_definitions.common_pb2.Metadatum()
self._pb.key = key
self._pb.value = value
@property
def key(self):
return self._pb.key
@property
def value(self):
return self._pb.value
@classmethod
def from_dict(cls, d):
'''Turns a dictionary into a list of Metadatum objects'''
g = [cls(key, value) for key, value in d.iteritems()]
return g
@property
def protobuf(self):
return self._pb
class ProtocolAtom(object):
def __init__(self, tags=None, metadata=None, data=None):
self._pb = zsearch_definitions.hoststore_pb2.ProtocolAtom()
# Tags
if tags is None:
tags = list()
self._pb.tags.extend(sorted(tags))
# Globals / values
if metadata is None:
metadata = list()
self._metadata = sorted(metadata, key=lambda m: m.key)
# Data
self._data = data or {}
self._pb.data = json.dumps(self.data, sort_keys=True)
@property
def metadata(self):
return self._metadata
@property
def tags(self):
return self._pb.tags
@property
def data(self):
return self._data
@property
def protobuf(self):
del self._pb.metadata[:]
self._pb.metadata.extend([x.protobuf for x in self.metadata])
return self._pb
def calculate_sha256fp(self, serialized=None):
if serialized is not None:
b = serialized
else:
b = self.protobuf.SerializeToString()
m = hashlib.sha1()
m.update(b)
return m.digest()
class Record(object):
def __init__(self, ip, port, protocol, subprotocol,
domain=None, timestamp=None, protocol_atom=None,
scan_id=None, sha256fp=None):
if ip is None or port is None or protocol is None or \
subprotocol is None or protocol_atom is None or \
scan_id is None or timestamp is None:
raise Exception("Missing parameter")
self._pb = zsearch_definitions.hoststore_pb2.Record()
self._ip = ip
self._pb.port = port
self._pb.protocol = protocol
self._pb.subprotocol = subprotocol
self._pb.scanid = scan_id
self._protocol_atom = protocol_atom
# Set optional members
if domain is not None:
self._pb.domain = domain
self._pb.sha256fp = sha256fp or protocol_atom.calculate_sha256fp()
# We store IPs in network order whenever they're integers
ip_bytes = socket.inet_aton(self._ip)
(ip_net, ) = struct.unpack("I", ip_bytes)
self._pb.ip = ip_net
# Convert the time to an int
dt = dateutil.parser.parse(timestamp).astimezone(dateutil.tz.tzutc())
self._pb.timestamp = int(time.mktime(dt.timetuple()))
# Set the protobuf atom, etc.
self._pb.atom.CopyFrom(protocol_atom.protobuf)
@property
def ip(self):
return self._ip
@property
def port(self):
return self._pb.port
@property
def protocol(self):
return self._protocol
@property
def subprotocol(self):
return self._subprotocol
@property
def atom(self):
return self._atom
@property
def scan_id(self):
return self._pb.scanid
@property
def sha256fp(self):
return self._pb.sha256fp
@property
def timestamp(self):
return self._pb.timestamp
@property
def protobuf(self):
return self._pb | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/hoststore.py | hoststore.py |
import grpc
import socket
import os.path
import sys
from zsearch_definitions import search_pb2
from zsearch_definitions import rpc_pb2
from zsearch_definitions import hoststore_pb2
from zsearch_definitions.protocols import Protocol, Subprotocol
class AdminService(object):
TIMEOUT = 60*60*4 # second
HOST = "localhost"
PORT = 8080
VALID_DATASTORES = [
"IPV4",
"DOMAIN",
"CERTIFICATE",
"KEY"
]
def __init__(self, host=None, port=None):
host = host or self.HOST
port = port or self.PORT
channel = grpc.insecure_channel('%s:%s' % (str(host), str(port)))
self._service = search_pb2.AdminServiceStub(channel)
@property
def service(self):
return self._service
def shutdown(self):
return self._service.Shutdown(rpc_pb2.Command(), self.TIMEOUT)
def status(self):
return self._service.Status(rpc_pb2.Command(), self.TIMEOUT)
def statistics(self, datastore):
ds = rpc_pb2.Command.Datastore.Value(datastore)
return self._service.Statistics(rpc_pb2.Command(datastore=ds), self.TIMEOUT)
def update_ases(self, path):
retv = self._service.UpdateASData(rpc_pb2.Command(filepath=path), self.TIMEOUT)
if retv.status != rpc_pb2.CommandReply.SUCCESS:
raise Exception("ZDB failure: %s" % retv.error)
return retv
def validate_certificates(self, path):
retv = self._service.ValidateCertificates(rpc_pb2.Command(filepath=path),
600*60*60)
if retv.status != rpc_pb2.CommandReply.SUCCESS:
raise Exception("ZDB failure: %s" % retv.error)
return retv
def regenerate_certificates(self):
retv = self._service.RegenerateCertificateDeltas(rpc_pb2.Command(), 10*60*60)
if retv.status != rpc_pb2.CommandReply.SUCCESS:
raise Exception("ZDB failure: %s" % retv.error)
return retv
def dump_certificates(self, path, incremental=False, max_records=0,
start_prefix=0, stop_prefix=0, num_threads=16):
cmd = rpc_pb2.Command(filepath=path, incremental_dump=False,
max_records=max_records, start_ip=start_prefix,
stop_ip=stop_prefix, threads=num_threads)
retv = self._service.DumpCertificatesToJSON(cmd, 8*60*60)
if retv.status != rpc_pb2.CommandReply.SUCCESS:
raise Exception("ZDB failure: %s" % retv.error)
return retv
def dump_ipv4(self, path, max_records=0, min_scan_ids=None):
if min_scan_ids:
cmd = self._make_prune_cmd(min_scan_ids)
else:
cmd = rpc_pb2.Command()
cmd.filepath = path
cmd.max_records = max_records
retv = self._service.DumpIPv4ToJSON(cmd, 12*60*60)
if retv.status != rpc_pb2.CommandReply.SUCCESS:
raise Exception("ZDB failure: %s" % retv.error)
return retv
def dump_domain(self, path, max_records=0, min_scan_ids=None):
if min_scan_ids:
cmd = self._make_prune_cmd(min_scan_ids)
else:
cmd = rpc_pb2.Command()
cmd.filepath = path
cmd.max_records = max_records
retv = self._service.DumpDomainToJSON(cmd, 60*60)
if retv.status != rpc_pb2.CommandReply.SUCCESS:
raise Exception("ZDB failure: %s" % retv.error)
return retv
def _make_prune_cmd(self, min_scan_ids):
cmd = rpc_pb2.Command()
for (host_port, pretty_protocol, pretty_subprotocol), min_scan_id in \
min_scan_ids.iteritems():
network_port = socket.htons(host_port)
protocol = Protocol.from_pretty_name(pretty_protocol)
subprotocol = Subprotocol.from_pretty_name(pretty_subprotocol)
ak = hoststore_pb2.AnonymousKey(
port=network_port,
protocol=protocol.value,
subprotocol=subprotocol.value,
)
min_id_obj = cmd.min_scan_ids.add()
min_id_obj.key.CopyFrom(ak)
min_id_obj.min_scan_id = min_scan_id
return cmd
def prune_domain(self, min_scan_ids):
cmd = self._make_prune_cmd(min_scan_ids)
retv = self._service.PruneDomain(cmd, self.TIMEOUT)
if retv.status != rpc_pb2.CommandReply.SUCCESS:
raise Exception("ZDB failure: %s" % retv.error)
return retv
def prune_ipv4(self, min_scan_ids):
'''min_scan_ids is a dictionary of the tuple
(host_order_port, pretty_protocol_name, pretty_subprotocol_name):min_id
'''
cmd = self._make_prune_cmd(min_scan_ids)
retv = self._service.PruneIPv4(cmd, self.TIMEOUT)
if retv.status != rpc_pb2.CommandReply.SUCCESS:
raise Exception("ZDB failure: %s" % retv.error)
return retv
#def __del__(self):
# if self._service:
# self._service.__exit__(None, None, None) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/admin.py | admin.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
import common_pb2 as common__pb2
import zlint_pb2 as zlint__pb2
import ct_pb2 as ct__pb2
import caa_pb2 as caa__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='certificate.proto',
package='zsearch',
syntax='proto3',
serialized_pb=_b('\n\x11\x63\x65rtificate.proto\x12\x07zsearch\x1a\x0c\x63ommon.proto\x1a\x0bzlint.proto\x1a\x08\x63t.proto\x1a\tcaa.proto\"\x18\n\x04Path\x12\x10\n\x08sha256fp\x18\x01 \x03(\x0c\"\x87\x02\n\x0fRootStoreStatus\x12\r\n\x05valid\x18\x01 \x01(\x08\x12\x11\n\twas_valid\x18\x02 \x01(\x08\x12\x14\n\x0ctrusted_path\x18\x03 \x01(\x08\x12\x18\n\x10had_trusted_path\x18\x04 \x01(\x08\x12\x13\n\x0b\x62lacklisted\x18\x05 \x01(\x08\x12\x13\n\x0bwhitelisted\x18\x06 \x01(\x08\x12&\n\x04type\x18\x07 \x01(\x0e\x32\x18.zsearch.CertificateType\x12$\n\rtrusted_paths\x18\x08 \x03(\x0b\x32\r.zsearch.Path\x12\x19\n\x11in_revocation_set\x18\t \x01(\x08\x12\x0f\n\x07parents\x18\n \x03(\x0c\"\x9c\x02\n\x15\x43\x65rtificateValidation\x12%\n\x03nss\x18\x01 \x01(\x0b\x32\x18.zsearch.RootStoreStatus\x12+\n\tmicrosoft\x18\x02 \x01(\x0b\x32\x18.zsearch.RootStoreStatus\x12\'\n\x05\x61pple\x18\x03 \x01(\x0b\x32\x18.zsearch.RootStoreStatus\x12&\n\x04java\x18\x04 \x01(\x0b\x32\x18.zsearch.RootStoreStatus\x12)\n\x07\x61ndroid\x18\x05 \x01(\x0b\x32\x18.zsearch.RootStoreStatus\x12\x33\n\x11google_ct_primary\x18\n \x01(\x0b\x32\x18.zsearch.RootStoreStatus\"\xf1\x05\n\x17MozillaSalesForceStatus\x12 \n\x18\x63urrent_in_intermediates\x18\x01 \x01(\x08\x12\x1c\n\x14was_in_intermediates\x18\x02 \x01(\x08\x12\x12\n\nowner_name\x18\x03 \x01(\t\x12\x13\n\x0bparent_name\x18\x04 \x01(\t\x12\x18\n\x10\x63\x65rtificate_name\x18\x05 \x01(\t\x12\x1a\n\x12\x63\x65rtificate_policy\x18\x06 \x01(\t\x12(\n certification_practice_statement\x18\x07 \x01(\t\x12\x19\n\x11\x63p_same_as_parent\x18\x08 \x01(\x08\x12\x1c\n\x14\x61udit_same_as_parent\x18\t \x01(\x08\x12\x16\n\x0estandard_audit\x18\n \x01(\t\x12\x10\n\x08\x62r_audit\x18\x0b \x01(\t\x12\x0f\n\x07\x61uditor\x18\x0c \x01(\t\x12*\n\"standard_audit_statement_timestamp\x18\r \x01(\r\x12 \n\x18management_assertions_by\x18\x0e \x01(\t\x12\x10\n\x08\x63omments\x18\x0f \x01(\t\x12\x16\n\x0e\x65v_policy_oids\x18\x10 \x01(\t\x12\x14\n\x0c\x61pproval_bug\x18\x11 \x01(\t\x12\x19\n\x11\x66irst_nss_release\x18\x12 \x01(\t\x12\x1d\n\x15\x66irst_firefox_release\x18\x13 \x01(\t\x12\x10\n\x08\x65v_audit\x18\x14 \x01(\t\x12\x18\n\x10\x63urrent_in_roots\x18\x15 \x01(\x08\x12\x14\n\x0cwas_in_roots\x18\x16 \x01(\x08\x12\x1a\n\x12test_website_valid\x18\x17 \x01(\t\x12#\n\x1bmozilla_applied_constraints\x18\x18 \x01(\t\x12\x17\n\x0f\x63ompany_website\x18\x19 \x01(\t\x12\x18\n\x10geographic_focus\x18\x1a \x01(\t\x12\x1b\n\x13standard_audit_type\x18\x1b \x01(\t\"^\n\x15\x43\x65rtificateRevocation\x12\x0f\n\x07revoked\x18\x01 \x01(\x08\x12\x34\n\x06reason\x18\x02 \x01(\x0e\x32$.zsearch.CertificateRevocationReason\"E\n\x10\x43\x65rtificateAudit\x12\x31\n\x07mozilla\x18\x01 \x01(\x0b\x32 .zsearch.MozillaSalesForceStatus\"\xc0\n\n\x0b\x43\x65rtificate\x12\x0e\n\x06sha1fp\x18\x01 \x01(\x0c\x12\x10\n\x08sha256fp\x18\x02 \x01(\x0c\x12\x0b\n\x03raw\x18\x03 \x01(\x0c\x12\x0e\n\x06parsed\x18\x04 \x01(\t\x12\x35\n\x0cparse_status\x18, \x01(\x0e\x32\x1f.zsearch.CertificateParseStatus\x12\x15\n\rparse_version\x18\' \x01(\r\x12\x13\n\x0bparse_error\x18/ \x01(\t\x12\x0f\n\x07parents\x18\x05 \x03(\x0c\x12\x17\n\x0fpresented_chain\x18- \x03(\x0c\x12\x1e\n\x16parent_spki_subject_fp\x18\x32 \x01(\x0c\x12*\n\x06source\x18\x1c \x01(\x0e\x32\x1a.zsearch.CertificateSource\x12\x14\n\x0cseen_in_scan\x18\x1d \x01(\x08\x12\x16\n\x0epost_processed\x18\x1a \x01(\x08\x12\x1e\n\x16post_process_timestamp\x18% \x01(\r\x12\x32\n\nvalidation\x18# \x01(\x0b\x32\x1e.zsearch.CertificateValidation\x12\x1d\n\x02\x63t\x18\x1e \x01(\x0b\x32\x11.zsearch.CTStatus\x12\x1d\n\x05zlint\x18& \x01(\x0b\x32\x0e.zsearch.ZLint\x12\x1f\n\x03\x63\x61\x61\x18\x31 \x01(\x0b\x32\x12.zsearch.CAALookup\x12\x32\n\nrevocation\x18+ \x01(\x0b\x32\x1e.zsearch.CertificateRevocation\x12(\n\x05\x61udit\x18. \x01(\x0b\x32\x19.zsearch.CertificateAudit\x12\x12\n\nis_precert\x18 \x01(\x08\x12\x17\n\x0fnot_valid_after\x18) \x01(\r\x12\x18\n\x10not_valid_before\x18* \x01(\r\x12\x0f\n\x07\x65xpired\x18\x30 \x01(\x08\x12\x0e\n\x06in_nss\x18\x06 \x01(\x08\x12\x18\n\x0cin_microsoft\x18\x07 \x01(\x08\x42\x02\x18\x01\x12\x14\n\x08in_apple\x18\x08 \x01(\x08\x42\x02\x18\x01\x12\x1c\n\x14validation_timestamp\x18\n \x01(\r\x12\x15\n\tvalid_nss\x18\x0b \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x0fvalid_microsoft\x18\x0c \x01(\x08\x42\x02\x18\x01\x12\x17\n\x0bvalid_apple\x18\r \x01(\x08\x42\x02\x18\x01\x12\x15\n\rwas_valid_nss\x18\x0e \x01(\x08\x12\x1f\n\x13was_valid_microsoft\x18\x0f \x01(\x08\x42\x02\x18\x01\x12\x1b\n\x0fwas_valid_apple\x18\x10 \x01(\x08\x42\x02\x18\x01\x12\x16\n\nwas_in_nss\x18\x11 \x01(\x08\x42\x02\x18\x01\x12\x1c\n\x10was_in_microsoft\x18\x12 \x01(\x08\x42\x02\x18\x01\x12\x18\n\x0cwas_in_apple\x18\x13 \x01(\x08\x42\x02\x18\x01\x12\x19\n\x11\x63urrent_valid_nss\x18\x14 \x01(\x08\x12#\n\x17\x63urrent_valid_microsoft\x18\x15 \x01(\x08\x42\x02\x18\x01\x12\x1f\n\x13\x63urrent_valid_apple\x18\x16 \x01(\x08\x42\x02\x18\x01\x12\x16\n\x0e\x63urrent_in_nss\x18\x17 \x01(\x08\x12 \n\x14\x63urrent_in_microsoft\x18\x18 \x01(\x08\x42\x02\x18\x01\x12\x1c\n\x10\x63urrent_in_apple\x18\x19 \x01(\x08\x42\x02\x18\x01\x12\x37\n\tnss_audit\x18\x1f \x01(\x0b\x32 .zsearch.MozillaSalesForceStatusB\x02\x18\x01\x12\x1f\n\x13should_post_process\x18\x1b \x01(\x08\x42\x02\x18\x01\x12\x1f\n\x13\x64o_not_post_process\x18$ \x01(\x08\x42\x02\x18\x01*\xa7\x01\n\x0f\x43\x65rtificateType\x12\x1d\n\x19\x43\x45RTIFICATE_TYPE_RESERVED\x10\x00\x12\x1c\n\x18\x43\x45RTIFICATE_TYPE_UNKNOWN\x10\x01\x12\x19\n\x15\x43\x45RTIFICATE_TYPE_LEAF\x10\x02\x12!\n\x1d\x43\x45RTIFICATE_TYPE_INTERMEDIATE\x10\x03\x12\x19\n\x15\x43\x45RTIFICATE_TYPE_ROOT\x10\x04*\xb7\x02\n\x11\x43\x65rtificateSource\x12\x1f\n\x1b\x43\x45RTIFICATE_SOURCE_RESERVED\x10\x00\x12\x1e\n\x1a\x43\x45RTIFICATE_SOURCE_UNKNOWN\x10\x01\x12\x1b\n\x17\x43\x45RTIFICATE_SOURCE_SCAN\x10\x02\x12\x19\n\x15\x43\x45RTIFICATE_SOURCE_CT\x10\x03\x12)\n%CERTIFICATE_SOURCE_MOZILLA_SALESFORCE\x10\x04\x12\x1f\n\x1b\x43\x45RTIFICATE_SOURCE_RESEARCH\x10\x05\x12\x1d\n\x19\x43\x45RTIFICATE_SOURCE_RAPID7\x10\x06\x12\x1d\n\x19\x43\x45RTIFICATE_SOURCE_HUBBLE\x10\x07\x12\x1f\n\x1b\x43\x45RTIFICATE_SOURCE_CT_CHAIN\x10\x08*\xd7\x01\n\x16\x43\x65rtificateParseStatus\x12%\n!CERTIFICATE_PARSE_STATUS_RESERVED\x10\x00\x12$\n CERTIFICATE_PARSE_STATUS_UNKNOWN\x10\x01\x12$\n CERTIFICATE_PARSE_STATUS_SUCCESS\x10\x02\x12!\n\x1d\x43\x45RTIFICATE_PARSE_STATUS_FAIL\x10\x03\x12\'\n#CERTIFICATE_PARSE_STATUS_NOT_PARSED\x10\x04*\xf4\x04\n\x1b\x43\x65rtificateRevocationReason\x12*\n&CERTIFICATE_REVOCATION_REASON_RESERVED\x10\x00\x12)\n%CERTIFICATE_REVOCATION_REASON_UNKNOWN\x10\x01\x12-\n)CERTIFICATE_REVOCATION_REASON_UNSPECIFIED\x10\x02\x12\x30\n,CERTIFICATE_REVOCATION_REASON_KEY_COMPROMISE\x10\x03\x12/\n+CERTIFICATE_REVOCATION_REASON_CA_COMPROMISE\x10\x04\x12\x35\n1CERTIFICATE_REVOCATION_REASON_AFFILIATION_CHANGED\x10\x05\x12,\n(CERTIFICATE_REVOCATION_REASON_SUPERSEDED\x10\x06\x12\x38\n4CERTIFICATE_REVOCATION_REASON_CESSATION_OF_OPERATION\x10\x07\x12\x32\n.CERTIFICATE_REVOCATION_REASON_CERTIFICATE_HOLD\x10\x08\x12\x31\n-CERTIFICATE_REVOCATION_REASON_REMOVE_FROM_CRL\x10\t\x12\x35\n1CERTIFICATE_REVOCATION_REASON_PRIVILEGE_WITHDRAWN\x10\n\x12/\n+CERTIFICATE_REVOCATION_REASON_AA_COMPROMISE\x10\x0b\x62\x06proto3')
,
dependencies=[common__pb2.DESCRIPTOR,zlint__pb2.DESCRIPTOR,ct__pb2.DESCRIPTOR,caa__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_CERTIFICATETYPE = _descriptor.EnumDescriptor(
name='CertificateType',
full_name='zsearch.CertificateType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_TYPE_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_TYPE_UNKNOWN', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_TYPE_LEAF', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_TYPE_INTERMEDIATE', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_TYPE_ROOT', index=4, number=4,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=2928,
serialized_end=3095,
)
_sym_db.RegisterEnumDescriptor(_CERTIFICATETYPE)
CertificateType = enum_type_wrapper.EnumTypeWrapper(_CERTIFICATETYPE)
_CERTIFICATESOURCE = _descriptor.EnumDescriptor(
name='CertificateSource',
full_name='zsearch.CertificateSource',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_SOURCE_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_SOURCE_UNKNOWN', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_SOURCE_SCAN', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_SOURCE_CT', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_SOURCE_MOZILLA_SALESFORCE', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_SOURCE_RESEARCH', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_SOURCE_RAPID7', index=6, number=6,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_SOURCE_HUBBLE', index=7, number=7,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_SOURCE_CT_CHAIN', index=8, number=8,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=3098,
serialized_end=3409,
)
_sym_db.RegisterEnumDescriptor(_CERTIFICATESOURCE)
CertificateSource = enum_type_wrapper.EnumTypeWrapper(_CERTIFICATESOURCE)
_CERTIFICATEPARSESTATUS = _descriptor.EnumDescriptor(
name='CertificateParseStatus',
full_name='zsearch.CertificateParseStatus',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_PARSE_STATUS_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_PARSE_STATUS_UNKNOWN', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_PARSE_STATUS_SUCCESS', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_PARSE_STATUS_FAIL', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_PARSE_STATUS_NOT_PARSED', index=4, number=4,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=3412,
serialized_end=3627,
)
_sym_db.RegisterEnumDescriptor(_CERTIFICATEPARSESTATUS)
CertificateParseStatus = enum_type_wrapper.EnumTypeWrapper(_CERTIFICATEPARSESTATUS)
_CERTIFICATEREVOCATIONREASON = _descriptor.EnumDescriptor(
name='CertificateRevocationReason',
full_name='zsearch.CertificateRevocationReason',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_UNKNOWN', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_UNSPECIFIED', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_KEY_COMPROMISE', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_CA_COMPROMISE', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_AFFILIATION_CHANGED', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_SUPERSEDED', index=6, number=6,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_CESSATION_OF_OPERATION', index=7, number=7,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_CERTIFICATE_HOLD', index=8, number=8,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_REMOVE_FROM_CRL', index=9, number=9,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_PRIVILEGE_WITHDRAWN', index=10, number=10,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CERTIFICATE_REVOCATION_REASON_AA_COMPROMISE', index=11, number=11,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=3630,
serialized_end=4258,
)
_sym_db.RegisterEnumDescriptor(_CERTIFICATEREVOCATIONREASON)
CertificateRevocationReason = enum_type_wrapper.EnumTypeWrapper(_CERTIFICATEREVOCATIONREASON)
CERTIFICATE_TYPE_RESERVED = 0
CERTIFICATE_TYPE_UNKNOWN = 1
CERTIFICATE_TYPE_LEAF = 2
CERTIFICATE_TYPE_INTERMEDIATE = 3
CERTIFICATE_TYPE_ROOT = 4
CERTIFICATE_SOURCE_RESERVED = 0
CERTIFICATE_SOURCE_UNKNOWN = 1
CERTIFICATE_SOURCE_SCAN = 2
CERTIFICATE_SOURCE_CT = 3
CERTIFICATE_SOURCE_MOZILLA_SALESFORCE = 4
CERTIFICATE_SOURCE_RESEARCH = 5
CERTIFICATE_SOURCE_RAPID7 = 6
CERTIFICATE_SOURCE_HUBBLE = 7
CERTIFICATE_SOURCE_CT_CHAIN = 8
CERTIFICATE_PARSE_STATUS_RESERVED = 0
CERTIFICATE_PARSE_STATUS_UNKNOWN = 1
CERTIFICATE_PARSE_STATUS_SUCCESS = 2
CERTIFICATE_PARSE_STATUS_FAIL = 3
CERTIFICATE_PARSE_STATUS_NOT_PARSED = 4
CERTIFICATE_REVOCATION_REASON_RESERVED = 0
CERTIFICATE_REVOCATION_REASON_UNKNOWN = 1
CERTIFICATE_REVOCATION_REASON_UNSPECIFIED = 2
CERTIFICATE_REVOCATION_REASON_KEY_COMPROMISE = 3
CERTIFICATE_REVOCATION_REASON_CA_COMPROMISE = 4
CERTIFICATE_REVOCATION_REASON_AFFILIATION_CHANGED = 5
CERTIFICATE_REVOCATION_REASON_SUPERSEDED = 6
CERTIFICATE_REVOCATION_REASON_CESSATION_OF_OPERATION = 7
CERTIFICATE_REVOCATION_REASON_CERTIFICATE_HOLD = 8
CERTIFICATE_REVOCATION_REASON_REMOVE_FROM_CRL = 9
CERTIFICATE_REVOCATION_REASON_PRIVILEGE_WITHDRAWN = 10
CERTIFICATE_REVOCATION_REASON_AA_COMPROMISE = 11
_PATH = _descriptor.Descriptor(
name='Path',
full_name='zsearch.Path',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='sha256fp', full_name='zsearch.Path.sha256fp', index=0,
number=1, type=12, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=78,
serialized_end=102,
)
_ROOTSTORESTATUS = _descriptor.Descriptor(
name='RootStoreStatus',
full_name='zsearch.RootStoreStatus',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='valid', full_name='zsearch.RootStoreStatus.valid', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='was_valid', full_name='zsearch.RootStoreStatus.was_valid', index=1,
number=2, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='trusted_path', full_name='zsearch.RootStoreStatus.trusted_path', index=2,
number=3, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='had_trusted_path', full_name='zsearch.RootStoreStatus.had_trusted_path', index=3,
number=4, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='blacklisted', full_name='zsearch.RootStoreStatus.blacklisted', index=4,
number=5, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='whitelisted', full_name='zsearch.RootStoreStatus.whitelisted', index=5,
number=6, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='type', full_name='zsearch.RootStoreStatus.type', index=6,
number=7, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='trusted_paths', full_name='zsearch.RootStoreStatus.trusted_paths', index=7,
number=8, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='in_revocation_set', full_name='zsearch.RootStoreStatus.in_revocation_set', index=8,
number=9, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='parents', full_name='zsearch.RootStoreStatus.parents', index=9,
number=10, type=12, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=105,
serialized_end=368,
)
_CERTIFICATEVALIDATION = _descriptor.Descriptor(
name='CertificateValidation',
full_name='zsearch.CertificateValidation',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='nss', full_name='zsearch.CertificateValidation.nss', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='microsoft', full_name='zsearch.CertificateValidation.microsoft', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='apple', full_name='zsearch.CertificateValidation.apple', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='java', full_name='zsearch.CertificateValidation.java', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='android', full_name='zsearch.CertificateValidation.android', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_ct_primary', full_name='zsearch.CertificateValidation.google_ct_primary', index=5,
number=10, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=371,
serialized_end=655,
)
_MOZILLASALESFORCESTATUS = _descriptor.Descriptor(
name='MozillaSalesForceStatus',
full_name='zsearch.MozillaSalesForceStatus',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='current_in_intermediates', full_name='zsearch.MozillaSalesForceStatus.current_in_intermediates', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='was_in_intermediates', full_name='zsearch.MozillaSalesForceStatus.was_in_intermediates', index=1,
number=2, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='owner_name', full_name='zsearch.MozillaSalesForceStatus.owner_name', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='parent_name', full_name='zsearch.MozillaSalesForceStatus.parent_name', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='certificate_name', full_name='zsearch.MozillaSalesForceStatus.certificate_name', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='certificate_policy', full_name='zsearch.MozillaSalesForceStatus.certificate_policy', index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='certification_practice_statement', full_name='zsearch.MozillaSalesForceStatus.certification_practice_statement', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cp_same_as_parent', full_name='zsearch.MozillaSalesForceStatus.cp_same_as_parent', index=7,
number=8, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='audit_same_as_parent', full_name='zsearch.MozillaSalesForceStatus.audit_same_as_parent', index=8,
number=9, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='standard_audit', full_name='zsearch.MozillaSalesForceStatus.standard_audit', index=9,
number=10, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='br_audit', full_name='zsearch.MozillaSalesForceStatus.br_audit', index=10,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='auditor', full_name='zsearch.MozillaSalesForceStatus.auditor', index=11,
number=12, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='standard_audit_statement_timestamp', full_name='zsearch.MozillaSalesForceStatus.standard_audit_statement_timestamp', index=12,
number=13, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='management_assertions_by', full_name='zsearch.MozillaSalesForceStatus.management_assertions_by', index=13,
number=14, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='comments', full_name='zsearch.MozillaSalesForceStatus.comments', index=14,
number=15, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='ev_policy_oids', full_name='zsearch.MozillaSalesForceStatus.ev_policy_oids', index=15,
number=16, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='approval_bug', full_name='zsearch.MozillaSalesForceStatus.approval_bug', index=16,
number=17, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='first_nss_release', full_name='zsearch.MozillaSalesForceStatus.first_nss_release', index=17,
number=18, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='first_firefox_release', full_name='zsearch.MozillaSalesForceStatus.first_firefox_release', index=18,
number=19, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='ev_audit', full_name='zsearch.MozillaSalesForceStatus.ev_audit', index=19,
number=20, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='current_in_roots', full_name='zsearch.MozillaSalesForceStatus.current_in_roots', index=20,
number=21, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='was_in_roots', full_name='zsearch.MozillaSalesForceStatus.was_in_roots', index=21,
number=22, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='test_website_valid', full_name='zsearch.MozillaSalesForceStatus.test_website_valid', index=22,
number=23, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='mozilla_applied_constraints', full_name='zsearch.MozillaSalesForceStatus.mozilla_applied_constraints', index=23,
number=24, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='company_website', full_name='zsearch.MozillaSalesForceStatus.company_website', index=24,
number=25, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='geographic_focus', full_name='zsearch.MozillaSalesForceStatus.geographic_focus', index=25,
number=26, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='standard_audit_type', full_name='zsearch.MozillaSalesForceStatus.standard_audit_type', index=26,
number=27, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=658,
serialized_end=1411,
)
_CERTIFICATEREVOCATION = _descriptor.Descriptor(
name='CertificateRevocation',
full_name='zsearch.CertificateRevocation',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='revoked', full_name='zsearch.CertificateRevocation.revoked', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='reason', full_name='zsearch.CertificateRevocation.reason', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1413,
serialized_end=1507,
)
_CERTIFICATEAUDIT = _descriptor.Descriptor(
name='CertificateAudit',
full_name='zsearch.CertificateAudit',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='mozilla', full_name='zsearch.CertificateAudit.mozilla', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1509,
serialized_end=1578,
)
_CERTIFICATE = _descriptor.Descriptor(
name='Certificate',
full_name='zsearch.Certificate',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='sha1fp', full_name='zsearch.Certificate.sha1fp', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='sha256fp', full_name='zsearch.Certificate.sha256fp', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='raw', full_name='zsearch.Certificate.raw', index=2,
number=3, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='parsed', full_name='zsearch.Certificate.parsed', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='parse_status', full_name='zsearch.Certificate.parse_status', index=4,
number=44, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='parse_version', full_name='zsearch.Certificate.parse_version', index=5,
number=39, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='parse_error', full_name='zsearch.Certificate.parse_error', index=6,
number=47, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='parents', full_name='zsearch.Certificate.parents', index=7,
number=5, type=12, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='presented_chain', full_name='zsearch.Certificate.presented_chain', index=8,
number=45, type=12, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='parent_spki_subject_fp', full_name='zsearch.Certificate.parent_spki_subject_fp', index=9,
number=50, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='source', full_name='zsearch.Certificate.source', index=10,
number=28, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='seen_in_scan', full_name='zsearch.Certificate.seen_in_scan', index=11,
number=29, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='post_processed', full_name='zsearch.Certificate.post_processed', index=12,
number=26, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='post_process_timestamp', full_name='zsearch.Certificate.post_process_timestamp', index=13,
number=37, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='validation', full_name='zsearch.Certificate.validation', index=14,
number=35, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='ct', full_name='zsearch.Certificate.ct', index=15,
number=30, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='zlint', full_name='zsearch.Certificate.zlint', index=16,
number=38, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='caa', full_name='zsearch.Certificate.caa', index=17,
number=49, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='revocation', full_name='zsearch.Certificate.revocation', index=18,
number=43, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='audit', full_name='zsearch.Certificate.audit', index=19,
number=46, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='is_precert', full_name='zsearch.Certificate.is_precert', index=20,
number=32, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='not_valid_after', full_name='zsearch.Certificate.not_valid_after', index=21,
number=41, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='not_valid_before', full_name='zsearch.Certificate.not_valid_before', index=22,
number=42, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='expired', full_name='zsearch.Certificate.expired', index=23,
number=48, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='in_nss', full_name='zsearch.Certificate.in_nss', index=24,
number=6, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='in_microsoft', full_name='zsearch.Certificate.in_microsoft', index=25,
number=7, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='in_apple', full_name='zsearch.Certificate.in_apple', index=26,
number=8, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='validation_timestamp', full_name='zsearch.Certificate.validation_timestamp', index=27,
number=10, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='valid_nss', full_name='zsearch.Certificate.valid_nss', index=28,
number=11, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='valid_microsoft', full_name='zsearch.Certificate.valid_microsoft', index=29,
number=12, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='valid_apple', full_name='zsearch.Certificate.valid_apple', index=30,
number=13, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='was_valid_nss', full_name='zsearch.Certificate.was_valid_nss', index=31,
number=14, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='was_valid_microsoft', full_name='zsearch.Certificate.was_valid_microsoft', index=32,
number=15, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='was_valid_apple', full_name='zsearch.Certificate.was_valid_apple', index=33,
number=16, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='was_in_nss', full_name='zsearch.Certificate.was_in_nss', index=34,
number=17, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='was_in_microsoft', full_name='zsearch.Certificate.was_in_microsoft', index=35,
number=18, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='was_in_apple', full_name='zsearch.Certificate.was_in_apple', index=36,
number=19, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='current_valid_nss', full_name='zsearch.Certificate.current_valid_nss', index=37,
number=20, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='current_valid_microsoft', full_name='zsearch.Certificate.current_valid_microsoft', index=38,
number=21, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='current_valid_apple', full_name='zsearch.Certificate.current_valid_apple', index=39,
number=22, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='current_in_nss', full_name='zsearch.Certificate.current_in_nss', index=40,
number=23, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='current_in_microsoft', full_name='zsearch.Certificate.current_in_microsoft', index=41,
number=24, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='current_in_apple', full_name='zsearch.Certificate.current_in_apple', index=42,
number=25, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='nss_audit', full_name='zsearch.Certificate.nss_audit', index=43,
number=31, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='should_post_process', full_name='zsearch.Certificate.should_post_process', index=44,
number=27, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
_descriptor.FieldDescriptor(
name='do_not_post_process', full_name='zsearch.Certificate.do_not_post_process', index=45,
number=36, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1581,
serialized_end=2925,
)
_ROOTSTORESTATUS.fields_by_name['type'].enum_type = _CERTIFICATETYPE
_ROOTSTORESTATUS.fields_by_name['trusted_paths'].message_type = _PATH
_CERTIFICATEVALIDATION.fields_by_name['nss'].message_type = _ROOTSTORESTATUS
_CERTIFICATEVALIDATION.fields_by_name['microsoft'].message_type = _ROOTSTORESTATUS
_CERTIFICATEVALIDATION.fields_by_name['apple'].message_type = _ROOTSTORESTATUS
_CERTIFICATEVALIDATION.fields_by_name['java'].message_type = _ROOTSTORESTATUS
_CERTIFICATEVALIDATION.fields_by_name['android'].message_type = _ROOTSTORESTATUS
_CERTIFICATEVALIDATION.fields_by_name['google_ct_primary'].message_type = _ROOTSTORESTATUS
_CERTIFICATEREVOCATION.fields_by_name['reason'].enum_type = _CERTIFICATEREVOCATIONREASON
_CERTIFICATEAUDIT.fields_by_name['mozilla'].message_type = _MOZILLASALESFORCESTATUS
_CERTIFICATE.fields_by_name['parse_status'].enum_type = _CERTIFICATEPARSESTATUS
_CERTIFICATE.fields_by_name['source'].enum_type = _CERTIFICATESOURCE
_CERTIFICATE.fields_by_name['validation'].message_type = _CERTIFICATEVALIDATION
_CERTIFICATE.fields_by_name['ct'].message_type = ct__pb2._CTSTATUS
_CERTIFICATE.fields_by_name['zlint'].message_type = zlint__pb2._ZLINT
_CERTIFICATE.fields_by_name['caa'].message_type = caa__pb2._CAALOOKUP
_CERTIFICATE.fields_by_name['revocation'].message_type = _CERTIFICATEREVOCATION
_CERTIFICATE.fields_by_name['audit'].message_type = _CERTIFICATEAUDIT
_CERTIFICATE.fields_by_name['nss_audit'].message_type = _MOZILLASALESFORCESTATUS
DESCRIPTOR.message_types_by_name['Path'] = _PATH
DESCRIPTOR.message_types_by_name['RootStoreStatus'] = _ROOTSTORESTATUS
DESCRIPTOR.message_types_by_name['CertificateValidation'] = _CERTIFICATEVALIDATION
DESCRIPTOR.message_types_by_name['MozillaSalesForceStatus'] = _MOZILLASALESFORCESTATUS
DESCRIPTOR.message_types_by_name['CertificateRevocation'] = _CERTIFICATEREVOCATION
DESCRIPTOR.message_types_by_name['CertificateAudit'] = _CERTIFICATEAUDIT
DESCRIPTOR.message_types_by_name['Certificate'] = _CERTIFICATE
DESCRIPTOR.enum_types_by_name['CertificateType'] = _CERTIFICATETYPE
DESCRIPTOR.enum_types_by_name['CertificateSource'] = _CERTIFICATESOURCE
DESCRIPTOR.enum_types_by_name['CertificateParseStatus'] = _CERTIFICATEPARSESTATUS
DESCRIPTOR.enum_types_by_name['CertificateRevocationReason'] = _CERTIFICATEREVOCATIONREASON
Path = _reflection.GeneratedProtocolMessageType('Path', (_message.Message,), dict(
DESCRIPTOR = _PATH,
__module__ = 'certificate_pb2'
# @@protoc_insertion_point(class_scope:zsearch.Path)
))
_sym_db.RegisterMessage(Path)
RootStoreStatus = _reflection.GeneratedProtocolMessageType('RootStoreStatus', (_message.Message,), dict(
DESCRIPTOR = _ROOTSTORESTATUS,
__module__ = 'certificate_pb2'
# @@protoc_insertion_point(class_scope:zsearch.RootStoreStatus)
))
_sym_db.RegisterMessage(RootStoreStatus)
CertificateValidation = _reflection.GeneratedProtocolMessageType('CertificateValidation', (_message.Message,), dict(
DESCRIPTOR = _CERTIFICATEVALIDATION,
__module__ = 'certificate_pb2'
# @@protoc_insertion_point(class_scope:zsearch.CertificateValidation)
))
_sym_db.RegisterMessage(CertificateValidation)
MozillaSalesForceStatus = _reflection.GeneratedProtocolMessageType('MozillaSalesForceStatus', (_message.Message,), dict(
DESCRIPTOR = _MOZILLASALESFORCESTATUS,
__module__ = 'certificate_pb2'
# @@protoc_insertion_point(class_scope:zsearch.MozillaSalesForceStatus)
))
_sym_db.RegisterMessage(MozillaSalesForceStatus)
CertificateRevocation = _reflection.GeneratedProtocolMessageType('CertificateRevocation', (_message.Message,), dict(
DESCRIPTOR = _CERTIFICATEREVOCATION,
__module__ = 'certificate_pb2'
# @@protoc_insertion_point(class_scope:zsearch.CertificateRevocation)
))
_sym_db.RegisterMessage(CertificateRevocation)
CertificateAudit = _reflection.GeneratedProtocolMessageType('CertificateAudit', (_message.Message,), dict(
DESCRIPTOR = _CERTIFICATEAUDIT,
__module__ = 'certificate_pb2'
# @@protoc_insertion_point(class_scope:zsearch.CertificateAudit)
))
_sym_db.RegisterMessage(CertificateAudit)
Certificate = _reflection.GeneratedProtocolMessageType('Certificate', (_message.Message,), dict(
DESCRIPTOR = _CERTIFICATE,
__module__ = 'certificate_pb2'
# @@protoc_insertion_point(class_scope:zsearch.Certificate)
))
_sym_db.RegisterMessage(Certificate)
_CERTIFICATE.fields_by_name['in_microsoft'].has_options = True
_CERTIFICATE.fields_by_name['in_microsoft']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['in_apple'].has_options = True
_CERTIFICATE.fields_by_name['in_apple']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['valid_nss'].has_options = True
_CERTIFICATE.fields_by_name['valid_nss']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['valid_microsoft'].has_options = True
_CERTIFICATE.fields_by_name['valid_microsoft']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['valid_apple'].has_options = True
_CERTIFICATE.fields_by_name['valid_apple']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['was_valid_microsoft'].has_options = True
_CERTIFICATE.fields_by_name['was_valid_microsoft']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['was_valid_apple'].has_options = True
_CERTIFICATE.fields_by_name['was_valid_apple']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['was_in_nss'].has_options = True
_CERTIFICATE.fields_by_name['was_in_nss']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['was_in_microsoft'].has_options = True
_CERTIFICATE.fields_by_name['was_in_microsoft']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['was_in_apple'].has_options = True
_CERTIFICATE.fields_by_name['was_in_apple']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['current_valid_microsoft'].has_options = True
_CERTIFICATE.fields_by_name['current_valid_microsoft']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['current_valid_apple'].has_options = True
_CERTIFICATE.fields_by_name['current_valid_apple']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['current_in_microsoft'].has_options = True
_CERTIFICATE.fields_by_name['current_in_microsoft']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['current_in_apple'].has_options = True
_CERTIFICATE.fields_by_name['current_in_apple']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['nss_audit'].has_options = True
_CERTIFICATE.fields_by_name['nss_audit']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['should_post_process'].has_options = True
_CERTIFICATE.fields_by_name['should_post_process']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
_CERTIFICATE.fields_by_name['do_not_post_process'].has_options = True
_CERTIFICATE.fields_by_name['do_not_post_process']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
# @@protoc_insertion_point(module_scope) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/certificate_pb2.py | certificate_pb2.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='common.proto',
package='zsearch',
syntax='proto3',
serialized_pb=_b('\n\x0c\x63ommon.proto\x12\x07zsearch\"\'\n\tMetadatum\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\xc1\x01\n\x0cUserdataAtom\x12\x15\n\rprivate_notes\x18\x01 \x01(\t\x12\x14\n\x0cpublic_notes\x18\x02 \x01(\t\x12,\n\x10private_metadata\x18\x03 \x03(\x0b\x32\x12.zsearch.Metadatum\x12+\n\x0fpublic_metadata\x18\x04 \x03(\x0b\x32\x12.zsearch.Metadatum\x12\x14\n\x0cprivate_tags\x18\x05 \x03(\t\x12\x13\n\x0bpublic_tags\x18\x06 \x03(\t\"\xb3\x01\n\x06\x41SAtom\x12\x0b\n\x03\x61sn\x18\x01 \x01(\r\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x10\n\x04path\x18\x03 \x03(\rB\x02\x10\x01\x12\'\n\x03rir\x18\x04 \x01(\x0e\x32\x1a.zsearch.RegionalRegistrar\x12\x12\n\nbgp_prefix\x18\x05 \x01(\t\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x14\n\x0c\x63ountry_code\x18\x07 \x01(\t\x12\x14\n\x0corganization\x18\x08 \x01(\t*L\n\tDeltaType\x12\x0f\n\x0b\x44T_RESERVED\x10\x00\x12\r\n\tDT_UPDATE\x10\x01\x12\r\n\tDT_DELETE\x10\x02\x12\x10\n\x0c\x44T_NO_CHANGE\x10\x03*\x82\x01\n\x11RegionalRegistrar\x12\x10\n\x0cRIR_RESERVED\x10\x00\x12\x0c\n\x08RIR_ARIN\x10\x01\x12\x0c\n\x08RIR_RIPE\x10\x02\x12\r\n\tRIR_APNIC\x10\x03\x12\x0f\n\x0bRIR_AFRINIC\x10\x04\x12\x0e\n\nRIR_LACNIC\x10\x05\x12\x0f\n\x0bRIR_UNKNOWN\x10\x06\x62\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_DELTATYPE = _descriptor.EnumDescriptor(
name='DeltaType',
full_name='zsearch.DeltaType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='DT_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='DT_UPDATE', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='DT_DELETE', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='DT_NO_CHANGE', index=3, number=3,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=444,
serialized_end=520,
)
_sym_db.RegisterEnumDescriptor(_DELTATYPE)
DeltaType = enum_type_wrapper.EnumTypeWrapper(_DELTATYPE)
_REGIONALREGISTRAR = _descriptor.EnumDescriptor(
name='RegionalRegistrar',
full_name='zsearch.RegionalRegistrar',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='RIR_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='RIR_ARIN', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='RIR_RIPE', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='RIR_APNIC', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='RIR_AFRINIC', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='RIR_LACNIC', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='RIR_UNKNOWN', index=6, number=6,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=523,
serialized_end=653,
)
_sym_db.RegisterEnumDescriptor(_REGIONALREGISTRAR)
RegionalRegistrar = enum_type_wrapper.EnumTypeWrapper(_REGIONALREGISTRAR)
DT_RESERVED = 0
DT_UPDATE = 1
DT_DELETE = 2
DT_NO_CHANGE = 3
RIR_RESERVED = 0
RIR_ARIN = 1
RIR_RIPE = 2
RIR_APNIC = 3
RIR_AFRINIC = 4
RIR_LACNIC = 5
RIR_UNKNOWN = 6
_METADATUM = _descriptor.Descriptor(
name='Metadatum',
full_name='zsearch.Metadatum',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='zsearch.Metadatum.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='value', full_name='zsearch.Metadatum.value', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=25,
serialized_end=64,
)
_USERDATAATOM = _descriptor.Descriptor(
name='UserdataAtom',
full_name='zsearch.UserdataAtom',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='private_notes', full_name='zsearch.UserdataAtom.private_notes', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='public_notes', full_name='zsearch.UserdataAtom.public_notes', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='private_metadata', full_name='zsearch.UserdataAtom.private_metadata', index=2,
number=3, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='public_metadata', full_name='zsearch.UserdataAtom.public_metadata', index=3,
number=4, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='private_tags', full_name='zsearch.UserdataAtom.private_tags', index=4,
number=5, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='public_tags', full_name='zsearch.UserdataAtom.public_tags', index=5,
number=6, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=67,
serialized_end=260,
)
_ASATOM = _descriptor.Descriptor(
name='ASAtom',
full_name='zsearch.ASAtom',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='asn', full_name='zsearch.ASAtom.asn', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='description', full_name='zsearch.ASAtom.description', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='path', full_name='zsearch.ASAtom.path', index=2,
number=3, type=13, cpp_type=3, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\020\001'))),
_descriptor.FieldDescriptor(
name='rir', full_name='zsearch.ASAtom.rir', index=3,
number=4, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='bgp_prefix', full_name='zsearch.ASAtom.bgp_prefix', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='name', full_name='zsearch.ASAtom.name', index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='country_code', full_name='zsearch.ASAtom.country_code', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='organization', full_name='zsearch.ASAtom.organization', index=7,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=263,
serialized_end=442,
)
_USERDATAATOM.fields_by_name['private_metadata'].message_type = _METADATUM
_USERDATAATOM.fields_by_name['public_metadata'].message_type = _METADATUM
_ASATOM.fields_by_name['rir'].enum_type = _REGIONALREGISTRAR
DESCRIPTOR.message_types_by_name['Metadatum'] = _METADATUM
DESCRIPTOR.message_types_by_name['UserdataAtom'] = _USERDATAATOM
DESCRIPTOR.message_types_by_name['ASAtom'] = _ASATOM
DESCRIPTOR.enum_types_by_name['DeltaType'] = _DELTATYPE
DESCRIPTOR.enum_types_by_name['RegionalRegistrar'] = _REGIONALREGISTRAR
Metadatum = _reflection.GeneratedProtocolMessageType('Metadatum', (_message.Message,), dict(
DESCRIPTOR = _METADATUM,
__module__ = 'common_pb2'
# @@protoc_insertion_point(class_scope:zsearch.Metadatum)
))
_sym_db.RegisterMessage(Metadatum)
UserdataAtom = _reflection.GeneratedProtocolMessageType('UserdataAtom', (_message.Message,), dict(
DESCRIPTOR = _USERDATAATOM,
__module__ = 'common_pb2'
# @@protoc_insertion_point(class_scope:zsearch.UserdataAtom)
))
_sym_db.RegisterMessage(UserdataAtom)
ASAtom = _reflection.GeneratedProtocolMessageType('ASAtom', (_message.Message,), dict(
DESCRIPTOR = _ASATOM,
__module__ = 'common_pb2'
# @@protoc_insertion_point(class_scope:zsearch.ASAtom)
))
_sym_db.RegisterMessage(ASAtom)
_ASATOM.fields_by_name['path'].has_options = True
_ASATOM.fields_by_name['path']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\020\001'))
# @@protoc_insertion_point(module_scope) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/common_pb2.py | common_pb2.py |
import sys
import zsearch_definitions.certificate_pb2
import zsearch_definitions.zlint_pb2
class ZProtobufEnum(object):
def __init__(self, value, name, pretty_name):
self.value = value
self.name = name
self.pretty_name = pretty_name
@classmethod
def from_value(cls, value):
return cls._by_value[value]
@classmethod
def from_name(cls, name):
return cls._by_name[name]
@classmethod
def from_pretty_name(cls, name):
return cls._by_pretty_name[name]
def __hash__(self):
return self.value.__hash__()
def __cmp__(self, other):
return self.value.__cmp__(other.value)
def make_enum(name, definition, prefix):
class X(ZProtobufEnum):
_by_pretty_name = {}
_by_name = {}
_by_value = {}
X.__name__ = name
for _spid in definition.values():
enum_name = definition.Name(_spid)
simple_name = enum_name[len(prefix) + 1:]
pretty_name = simple_name.lower()
object_ = X(_spid, enum_name, pretty_name)
X._by_name[enum_name] = object_
X._by_value[_spid] = object_
X._by_pretty_name[pretty_name] = object_
setattr(X, simple_name, object_)
return X
CertificateSource = make_enum(
"CertificateSource",
zsearch_definitions.certificate_pb2.CertificateSource,
"CERTIFICATE_SOURCE")
CTPushStatus = make_enum(
"CTPushStatus",
zsearch_definitions.ct_pb2.CTPushStatus,
"CT_PUSH_STATUS")
CertificateParseStatus = make_enum(
"CertificateParseStatus",
zsearch_definitions.certificate_pb2.CertificateParseStatus,
"CERTIFICATE_PARSE_STATUS")
CertificateType = make_enum(
"CertificateType",
zsearch_definitions.certificate_pb2.CertificateType,
"CERTIFICATE_TYPE")
CertificateRevocationReason = make_enum(
"CertificateRevocationReason",
zsearch_definitions.certificate_pb2.CertificateRevocationReason,
"CERTIFICATE_REVOCATION_REASON")
LintResultStatus = make_enum(
"LintResultStatus",
zsearch_definitions.zlint_pb2.LintResultStatus,
"LINT_RESULT")
ZLintStatus = make_enum(
"ZLintStatus",
zsearch_definitions.zlint_pb2.ZLintStatus,
"ZLINT_STATUS")
CTPushStatus = make_enum(
"CTPushStatus",
zsearch_definitions.ct_pb2.CTPushStatus,
"CT_PUSH_STATUS")
CTServer = make_enum(
"CTServer",
zsearch_definitions.ct_pb2.CTServer,
"CT_SERVER") | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/anonstore.py | anonstore.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
import common_pb2 as common__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='pubkey.proto',
package='zsearch',
syntax='proto3',
serialized_pb=_b('\n\x0cpubkey.proto\x12\x07zsearch\x1a\x0c\x63ommon.proto\"N\n\x13RSACryptographicKey\x12\x0f\n\x07modulus\x18\x01 \x01(\x0c\x12\x10\n\x08\x65xponent\x18\x02 \x01(\x0c\x12\t\n\x01p\x18\x03 \x01(\x0c\x12\t\n\x01q\x18\x04 \x01(\x0c\"L\n\x13\x44SACryptographicKey\x12\t\n\x01p\x18\x01 \x01(\x0c\x12\t\n\x01q\x18\x02 \x01(\x0c\x12\t\n\x01g\x18\x03 \x01(\x0c\x12\t\n\x01y\x18\x04 \x01(\x0c\x12\t\n\x01x\x18\x05 \x01(\x0c\"K\n\x13\x45\x43\x43\x43ryptographicKey\x12\r\n\x05\x63urve\x18\x01 \x01(\r\x12\t\n\x01x\x18\x02 \x01(\x0c\x12\t\n\x01y\x18\x03 \x01(\x0c\x12\x0f\n\x07private\x18\x04 \x01(\x0c\"\xc8\x02\n\x10\x43ryptographicKey\x12/\n\x04type\x18\x01 \x01(\x0e\x32!.zsearch.CryptographicKey.KeyType\x12+\n\x03rsa\x18\x02 \x01(\x0b\x32\x1c.zsearch.RSACryptographicKeyH\x00\x12+\n\x03\x64sa\x18\x03 \x01(\x0b\x32\x1c.zsearch.DSACryptographicKeyH\x00\x12+\n\x03\x65\x63\x63\x18\x04 \x01(\x0b\x32\x1c.zsearch.ECCCryptographicKeyH\x00\x12\x0e\n\x06\x62roken\x18\x05 \x01(\x08\x12\x0e\n\x06\x63ommon\x18\x06 \x01(\x08\x12\x0e\n\x06\x64\x65\x62ian\x18\x07 \x01(\x08\"?\n\x07KeyType\x12\x0c\n\x08RESERVED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x07\n\x03RSA\x10\x02\x12\x07\n\x03\x44SA\x10\x03\x12\x07\n\x03\x45\x43\x43\x10\x04\x42\x0b\n\tkey_oneofb\x06proto3')
,
dependencies=[common__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_CRYPTOGRAPHICKEY_KEYTYPE = _descriptor.EnumDescriptor(
name='KeyType',
full_name='zsearch.CryptographicKey.KeyType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='UNKNOWN', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='RSA', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='DSA', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='ECC', index=4, number=4,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=527,
serialized_end=590,
)
_sym_db.RegisterEnumDescriptor(_CRYPTOGRAPHICKEY_KEYTYPE)
_RSACRYPTOGRAPHICKEY = _descriptor.Descriptor(
name='RSACryptographicKey',
full_name='zsearch.RSACryptographicKey',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='modulus', full_name='zsearch.RSACryptographicKey.modulus', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='exponent', full_name='zsearch.RSACryptographicKey.exponent', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='p', full_name='zsearch.RSACryptographicKey.p', index=2,
number=3, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='q', full_name='zsearch.RSACryptographicKey.q', index=3,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=39,
serialized_end=117,
)
_DSACRYPTOGRAPHICKEY = _descriptor.Descriptor(
name='DSACryptographicKey',
full_name='zsearch.DSACryptographicKey',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='p', full_name='zsearch.DSACryptographicKey.p', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='q', full_name='zsearch.DSACryptographicKey.q', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='g', full_name='zsearch.DSACryptographicKey.g', index=2,
number=3, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='y', full_name='zsearch.DSACryptographicKey.y', index=3,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='x', full_name='zsearch.DSACryptographicKey.x', index=4,
number=5, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=119,
serialized_end=195,
)
_ECCCRYPTOGRAPHICKEY = _descriptor.Descriptor(
name='ECCCryptographicKey',
full_name='zsearch.ECCCryptographicKey',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='curve', full_name='zsearch.ECCCryptographicKey.curve', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='x', full_name='zsearch.ECCCryptographicKey.x', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='y', full_name='zsearch.ECCCryptographicKey.y', index=2,
number=3, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='private', full_name='zsearch.ECCCryptographicKey.private', index=3,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=197,
serialized_end=272,
)
_CRYPTOGRAPHICKEY = _descriptor.Descriptor(
name='CryptographicKey',
full_name='zsearch.CryptographicKey',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='type', full_name='zsearch.CryptographicKey.type', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='rsa', full_name='zsearch.CryptographicKey.rsa', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='dsa', full_name='zsearch.CryptographicKey.dsa', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='ecc', full_name='zsearch.CryptographicKey.ecc', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='broken', full_name='zsearch.CryptographicKey.broken', index=4,
number=5, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='common', full_name='zsearch.CryptographicKey.common', index=5,
number=6, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='debian', full_name='zsearch.CryptographicKey.debian', index=6,
number=7, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_CRYPTOGRAPHICKEY_KEYTYPE,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='key_oneof', full_name='zsearch.CryptographicKey.key_oneof',
index=0, containing_type=None, fields=[]),
],
serialized_start=275,
serialized_end=603,
)
_CRYPTOGRAPHICKEY.fields_by_name['type'].enum_type = _CRYPTOGRAPHICKEY_KEYTYPE
_CRYPTOGRAPHICKEY.fields_by_name['rsa'].message_type = _RSACRYPTOGRAPHICKEY
_CRYPTOGRAPHICKEY.fields_by_name['dsa'].message_type = _DSACRYPTOGRAPHICKEY
_CRYPTOGRAPHICKEY.fields_by_name['ecc'].message_type = _ECCCRYPTOGRAPHICKEY
_CRYPTOGRAPHICKEY_KEYTYPE.containing_type = _CRYPTOGRAPHICKEY
_CRYPTOGRAPHICKEY.oneofs_by_name['key_oneof'].fields.append(
_CRYPTOGRAPHICKEY.fields_by_name['rsa'])
_CRYPTOGRAPHICKEY.fields_by_name['rsa'].containing_oneof = _CRYPTOGRAPHICKEY.oneofs_by_name['key_oneof']
_CRYPTOGRAPHICKEY.oneofs_by_name['key_oneof'].fields.append(
_CRYPTOGRAPHICKEY.fields_by_name['dsa'])
_CRYPTOGRAPHICKEY.fields_by_name['dsa'].containing_oneof = _CRYPTOGRAPHICKEY.oneofs_by_name['key_oneof']
_CRYPTOGRAPHICKEY.oneofs_by_name['key_oneof'].fields.append(
_CRYPTOGRAPHICKEY.fields_by_name['ecc'])
_CRYPTOGRAPHICKEY.fields_by_name['ecc'].containing_oneof = _CRYPTOGRAPHICKEY.oneofs_by_name['key_oneof']
DESCRIPTOR.message_types_by_name['RSACryptographicKey'] = _RSACRYPTOGRAPHICKEY
DESCRIPTOR.message_types_by_name['DSACryptographicKey'] = _DSACRYPTOGRAPHICKEY
DESCRIPTOR.message_types_by_name['ECCCryptographicKey'] = _ECCCRYPTOGRAPHICKEY
DESCRIPTOR.message_types_by_name['CryptographicKey'] = _CRYPTOGRAPHICKEY
RSACryptographicKey = _reflection.GeneratedProtocolMessageType('RSACryptographicKey', (_message.Message,), dict(
DESCRIPTOR = _RSACRYPTOGRAPHICKEY,
__module__ = 'pubkey_pb2'
# @@protoc_insertion_point(class_scope:zsearch.RSACryptographicKey)
))
_sym_db.RegisterMessage(RSACryptographicKey)
DSACryptographicKey = _reflection.GeneratedProtocolMessageType('DSACryptographicKey', (_message.Message,), dict(
DESCRIPTOR = _DSACRYPTOGRAPHICKEY,
__module__ = 'pubkey_pb2'
# @@protoc_insertion_point(class_scope:zsearch.DSACryptographicKey)
))
_sym_db.RegisterMessage(DSACryptographicKey)
ECCCryptographicKey = _reflection.GeneratedProtocolMessageType('ECCCryptographicKey', (_message.Message,), dict(
DESCRIPTOR = _ECCCRYPTOGRAPHICKEY,
__module__ = 'pubkey_pb2'
# @@protoc_insertion_point(class_scope:zsearch.ECCCryptographicKey)
))
_sym_db.RegisterMessage(ECCCryptographicKey)
CryptographicKey = _reflection.GeneratedProtocolMessageType('CryptographicKey', (_message.Message,), dict(
DESCRIPTOR = _CRYPTOGRAPHICKEY,
__module__ = 'pubkey_pb2'
# @@protoc_insertion_point(class_scope:zsearch.CryptographicKey)
))
_sym_db.RegisterMessage(CryptographicKey)
# @@protoc_insertion_point(module_scope) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/pubkey_pb2.py | pubkey_pb2.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='ct.proto',
package='zsearch',
syntax='proto3',
serialized_pb=_b('\n\x08\x63t.proto\x12\x07zsearch\"\xb2\x01\n\x0e\x43TServerStatus\x12\r\n\x05index\x18\x01 \x01(\x03\x12\x14\n\x0c\x63t_timestamp\x18\x02 \x01(\x03\x12\x16\n\x0epull_timestamp\x18\x03 \x01(\x03\x12\x16\n\x0epush_timestamp\x18\x04 \x01(\x03\x12*\n\x0bpush_status\x18\x05 \x01(\x0e\x32\x15.zsearch.CTPushStatus\x12\x0b\n\x03sct\x18\x06 \x01(\x0c\x12\x12\n\npush_error\x18\x07 \x01(\t\"\x90\x13\n\x08\x43TStatus\x12+\n\ncensys_dev\x18\x01 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\'\n\x06\x63\x65nsys\x18\x02 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12/\n\x0egoogle_aviator\x18\n \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12-\n\x0cgoogle_pilot\x18\x0b \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x31\n\x10google_rocketeer\x18\x0c \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x32\n\x11google_submariner\x18\r \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x30\n\x0fgoogle_testtube\x18\x0e \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12.\n\rgoogle_icarus\x18\x0f \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x30\n\x0fgoogle_skydiver\x18\x10 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x30\n\x0fgoogle_daedalus\x18\x11 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x32\n\x11google_argon_2017\x18\x32 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x32\n\x11google_argon_2018\x18\x33 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x32\n\x11google_argon_2019\x18\x34 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x32\n\x11google_argon_2020\x18\x35 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x32\n\x11google_argon_2021\x18\x36 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x37\n\x16\x63loudflare_nimbus_2017\x18< \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x37\n\x16\x63loudflare_nimbus_2018\x18= \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x37\n\x16\x63loudflare_nimbus_2019\x18> \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x37\n\x16\x63loudflare_nimbus_2020\x18? \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x37\n\x16\x63loudflare_nimbus_2021\x18@ \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12-\n\x0c\x64igicert_ct1\x18\x14 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12-\n\x0c\x64igicert_ct2\x18( \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12.\n\rizenpe_com_ct\x18\x15 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12.\n\rizenpe_eus_ct\x18\x16 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12/\n\x0esymantec_ws_ct\x18\x17 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x31\n\x10symantec_ws_vega\x18\x18 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x33\n\x12symantec_ws_sirius\x18% \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x32\n\x11symantec_ws_deneb\x18 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12,\n\x0b\x63omodo_dodo\x18\" \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12/\n\x0e\x63omodo_mammoth\x18# \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12-\n\x0c\x63omodo_sabre\x18) \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12-\n\x0cwosign_ctlog\x18\x19 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12*\n\twosign_ct\x18\x1a \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12,\n\x0bstartssl_ct\x18\x1d \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12-\n\x0cwotrus_ctlog\x18/ \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12.\n\rwotrus_ctlog3\x18\x30 \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12(\n\x07gdca_ct\x18\x1c \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12+\n\ngdca_ctlog\x18$ \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12)\n\x08gdca_log\x18- \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12*\n\tgdca_log2\x18. \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x31\n\x10venafi_api_ctlog\x18\x1f \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x36\n\x15venafi_api_ctlog_gen2\x18\' \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x33\n\x12nordu_ct_plausible\x18! \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x36\n\x15letsencrypt_ct_clicky\x18+ \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12/\n\x0e\x63nnic_ctserver\x18\x1b \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12+\n\ncertly_log\x18\x1e \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12)\n\x08sheca_ct\x18* \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12\x30\n\x0f\x62\x65hind_the_sofa\x18, \x01(\x0b\x32\x17.zsearch.CTServerStatus\x12>\n\x1d\x63\x65rtificatetransparency_cn_ct\x18& \x01(\x0b\x32\x17.zsearch.CTServerStatus\"c\n\x03SCT\x12\x10\n\x08sha256fp\x18\x01 \x01(\x0c\x12!\n\x06server\x18\x02 \x01(\x0e\x32\x11.zsearch.CTServer\x12\'\n\x06status\x18\x03 \x01(\x0b\x32\x17.zsearch.CTServerStatus*\xeb\x01\n\x0c\x43TPushStatus\x12\x1b\n\x17\x43T_PUSH_STATUS_RESERVED\x10\x00\x12\x1a\n\x16\x43T_PUSH_STATUS_UNKNOWN\x10\x01\x12\x1a\n\x16\x43T_PUSH_STATUS_SUCCESS\x10\x02\x12 \n\x1c\x43T_PUSH_STATUS_UNKNOWN_ERROR\x10\x03\x12\x1f\n\x1b\x43T_PUSH_STATUS_INVALID_ROOT\x10\x04\x12!\n\x1d\x43T_PUSH_STATUS_ALREADY_EXISTS\x10\x05\x12 \n\x1c\x43T_PUSH_STATUS_WILL_NOT_PUSH\x10\x06*\x98\x0c\n\x08\x43TServer\x12\x16\n\x12\x43T_SERVER_RESERVED\x10\x00\x12 \n\x1c\x43T_SERVER_CENSYS_DEVELOPMENT\x10\x01\x12\x1f\n\x1b\x43T_SERVER_CENSYS_PRODUCTION\x10\x02\x12\x1c\n\x18\x43T_SERVER_GOOGLE_AVIATOR\x10\n\x12\x1a\n\x16\x43T_SERVER_GOOGLE_PILOT\x10\x0b\x12\x1e\n\x1a\x43T_SERVER_GOOGLE_ROCKETEER\x10\x0c\x12\x1f\n\x1b\x43T_SERVER_GOOGLE_SUBMARINER\x10\r\x12\x1d\n\x19\x43T_SERVER_GOOGLE_TESTTUBE\x10\x0e\x12\x1b\n\x17\x43T_SERVER_GOOGLE_ICARUS\x10\x0f\x12\x1d\n\x19\x43T_SERVER_GOOGLE_SKYDIVER\x10\x10\x12\x1d\n\x19\x43T_SERVER_GOOGLE_DAEDALUS\x10\x11\x12\x1f\n\x1b\x43T_SERVER_GOOGLE_ARGON_2017\x10\x32\x12\x1f\n\x1b\x43T_SERVER_GOOGLE_ARGON_2018\x10\x33\x12\x1f\n\x1b\x43T_SERVER_GOOGLE_ARGON_2019\x10\x34\x12\x1f\n\x1b\x43T_SERVER_GOOGLE_ARGON_2020\x10\x35\x12\x1f\n\x1b\x43T_SERVER_GOOGLE_ARGON_2021\x10\x36\x12$\n CT_SERVER_CLOUDFLARE_NIMBUS_2017\x10<\x12$\n CT_SERVER_CLOUDFLARE_NIMBUS_2018\x10=\x12$\n CT_SERVER_CLOUDFLARE_NIMBUS_2019\x10>\x12$\n CT_SERVER_CLOUDFLARE_NIMBUS_2020\x10?\x12$\n CT_SERVER_CLOUDFLARE_NIMBUS_2021\x10@\x12\x1a\n\x16\x43T_SERVER_DIGICERT_CT1\x10\x14\x12\x1a\n\x16\x43T_SERVER_DIGICERT_CT2\x10(\x12\x1b\n\x17\x43T_SERVER_IZENPE_COM_CT\x10\x15\x12\x1b\n\x17\x43T_SERVER_IZENPE_EUS_CT\x10\x16\x12\x1c\n\x18\x43T_SERVER_SYMANTEC_WS_CT\x10\x17\x12\x1e\n\x1a\x43T_SERVER_SYMANTEC_WS_VEGA\x10\x18\x12 \n\x1c\x43T_SERVER_SYMANTEC_WS_SIRIUS\x10%\x12\x1f\n\x1b\x43T_SERVER_SYMANTEC_WS_DENEB\x10 \x12\x19\n\x15\x43T_SERVER_COMODO_DODO\x10#\x12\x1c\n\x18\x43T_SERVER_COMODO_MAMMOTH\x10$\x12\x1a\n\x16\x43T_SERVER_COMODO_SABRE\x10)\x12\x1a\n\x16\x43T_SERVER_WOSIGN_CTLOG\x10\x19\x12\x17\n\x13\x43T_SERVER_WOSIGN_CT\x10\x1a\x12\x1a\n\x16\x43T_SERVER_WOTRUS_CTLOG\x10/\x12\x1b\n\x17\x43T_SERVER_WOTRUS_CTLOG3\x10\x30\x12\x19\n\x15\x43T_SERVER_STARTSSL_CT\x10\x1d\x12\x15\n\x11\x43T_SERVER_GDCA_CT\x10\x1c\x12\x18\n\x14\x43T_SERVER_GDCA_CTLOG\x10\"\x12\x16\n\x12\x43T_SERVER_GDCA_LOG\x10-\x12\x17\n\x13\x43T_SERVER_GDCA_LOG2\x10.\x12\x1e\n\x1a\x43T_SERVER_VENAFI_API_CTLOG\x10\x1f\x12#\n\x1f\x43T_SERVER_VENAFI_API_CTLOG_GEN2\x10\'\x12 \n\x1c\x43T_SERVER_NORDU_CT_PLAUSIBLE\x10!\x12#\n\x1f\x43T_SERVER_LETSENCRYPT_CT_CLICKY\x10+\x12\x18\n\x14\x43T_SERVER_CERTLY_LOG\x10\x1e\x12\x1c\n\x18\x43T_SERVER_CNNIC_CTSERVER\x10\x1b\x12+\n\'CT_SERVER_CERTIFICATETRANSPARENCY_CN_CT\x10&\x12\x16\n\x12\x43T_SERVER_SHECA_CT\x10*\x12\x1d\n\x19\x43T_SERVER_BEHIND_THE_SOFA\x10,b\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_CTPUSHSTATUS = _descriptor.EnumDescriptor(
name='CTPushStatus',
full_name='zsearch.CTPushStatus',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='CT_PUSH_STATUS_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_PUSH_STATUS_UNKNOWN', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_PUSH_STATUS_SUCCESS', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_PUSH_STATUS_UNKNOWN_ERROR', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_PUSH_STATUS_INVALID_ROOT', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_PUSH_STATUS_ALREADY_EXISTS', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_PUSH_STATUS_WILL_NOT_PUSH', index=6, number=6,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=2755,
serialized_end=2990,
)
_sym_db.RegisterEnumDescriptor(_CTPUSHSTATUS)
CTPushStatus = enum_type_wrapper.EnumTypeWrapper(_CTPUSHSTATUS)
_CTSERVER = _descriptor.EnumDescriptor(
name='CTServer',
full_name='zsearch.CTServer',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='CT_SERVER_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_CENSYS_DEVELOPMENT', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_CENSYS_PRODUCTION', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_AVIATOR', index=3, number=10,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_PILOT', index=4, number=11,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_ROCKETEER', index=5, number=12,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_SUBMARINER', index=6, number=13,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_TESTTUBE', index=7, number=14,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_ICARUS', index=8, number=15,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_SKYDIVER', index=9, number=16,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_DAEDALUS', index=10, number=17,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_ARGON_2017', index=11, number=50,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_ARGON_2018', index=12, number=51,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_ARGON_2019', index=13, number=52,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_ARGON_2020', index=14, number=53,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GOOGLE_ARGON_2021', index=15, number=54,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_CLOUDFLARE_NIMBUS_2017', index=16, number=60,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_CLOUDFLARE_NIMBUS_2018', index=17, number=61,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_CLOUDFLARE_NIMBUS_2019', index=18, number=62,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_CLOUDFLARE_NIMBUS_2020', index=19, number=63,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_CLOUDFLARE_NIMBUS_2021', index=20, number=64,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_DIGICERT_CT1', index=21, number=20,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_DIGICERT_CT2', index=22, number=40,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_IZENPE_COM_CT', index=23, number=21,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_IZENPE_EUS_CT', index=24, number=22,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_SYMANTEC_WS_CT', index=25, number=23,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_SYMANTEC_WS_VEGA', index=26, number=24,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_SYMANTEC_WS_SIRIUS', index=27, number=37,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_SYMANTEC_WS_DENEB', index=28, number=32,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_COMODO_DODO', index=29, number=35,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_COMODO_MAMMOTH', index=30, number=36,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_COMODO_SABRE', index=31, number=41,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_WOSIGN_CTLOG', index=32, number=25,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_WOSIGN_CT', index=33, number=26,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_WOTRUS_CTLOG', index=34, number=47,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_WOTRUS_CTLOG3', index=35, number=48,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_STARTSSL_CT', index=36, number=29,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GDCA_CT', index=37, number=28,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GDCA_CTLOG', index=38, number=34,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GDCA_LOG', index=39, number=45,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_GDCA_LOG2', index=40, number=46,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_VENAFI_API_CTLOG', index=41, number=31,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_VENAFI_API_CTLOG_GEN2', index=42, number=39,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_NORDU_CT_PLAUSIBLE', index=43, number=33,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_LETSENCRYPT_CT_CLICKY', index=44, number=43,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_CERTLY_LOG', index=45, number=30,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_CNNIC_CTSERVER', index=46, number=27,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_CERTIFICATETRANSPARENCY_CN_CT', index=47, number=38,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_SHECA_CT', index=48, number=42,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CT_SERVER_BEHIND_THE_SOFA', index=49, number=44,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=2993,
serialized_end=4553,
)
_sym_db.RegisterEnumDescriptor(_CTSERVER)
CTServer = enum_type_wrapper.EnumTypeWrapper(_CTSERVER)
CT_PUSH_STATUS_RESERVED = 0
CT_PUSH_STATUS_UNKNOWN = 1
CT_PUSH_STATUS_SUCCESS = 2
CT_PUSH_STATUS_UNKNOWN_ERROR = 3
CT_PUSH_STATUS_INVALID_ROOT = 4
CT_PUSH_STATUS_ALREADY_EXISTS = 5
CT_PUSH_STATUS_WILL_NOT_PUSH = 6
CT_SERVER_RESERVED = 0
CT_SERVER_CENSYS_DEVELOPMENT = 1
CT_SERVER_CENSYS_PRODUCTION = 2
CT_SERVER_GOOGLE_AVIATOR = 10
CT_SERVER_GOOGLE_PILOT = 11
CT_SERVER_GOOGLE_ROCKETEER = 12
CT_SERVER_GOOGLE_SUBMARINER = 13
CT_SERVER_GOOGLE_TESTTUBE = 14
CT_SERVER_GOOGLE_ICARUS = 15
CT_SERVER_GOOGLE_SKYDIVER = 16
CT_SERVER_GOOGLE_DAEDALUS = 17
CT_SERVER_GOOGLE_ARGON_2017 = 50
CT_SERVER_GOOGLE_ARGON_2018 = 51
CT_SERVER_GOOGLE_ARGON_2019 = 52
CT_SERVER_GOOGLE_ARGON_2020 = 53
CT_SERVER_GOOGLE_ARGON_2021 = 54
CT_SERVER_CLOUDFLARE_NIMBUS_2017 = 60
CT_SERVER_CLOUDFLARE_NIMBUS_2018 = 61
CT_SERVER_CLOUDFLARE_NIMBUS_2019 = 62
CT_SERVER_CLOUDFLARE_NIMBUS_2020 = 63
CT_SERVER_CLOUDFLARE_NIMBUS_2021 = 64
CT_SERVER_DIGICERT_CT1 = 20
CT_SERVER_DIGICERT_CT2 = 40
CT_SERVER_IZENPE_COM_CT = 21
CT_SERVER_IZENPE_EUS_CT = 22
CT_SERVER_SYMANTEC_WS_CT = 23
CT_SERVER_SYMANTEC_WS_VEGA = 24
CT_SERVER_SYMANTEC_WS_SIRIUS = 37
CT_SERVER_SYMANTEC_WS_DENEB = 32
CT_SERVER_COMODO_DODO = 35
CT_SERVER_COMODO_MAMMOTH = 36
CT_SERVER_COMODO_SABRE = 41
CT_SERVER_WOSIGN_CTLOG = 25
CT_SERVER_WOSIGN_CT = 26
CT_SERVER_WOTRUS_CTLOG = 47
CT_SERVER_WOTRUS_CTLOG3 = 48
CT_SERVER_STARTSSL_CT = 29
CT_SERVER_GDCA_CT = 28
CT_SERVER_GDCA_CTLOG = 34
CT_SERVER_GDCA_LOG = 45
CT_SERVER_GDCA_LOG2 = 46
CT_SERVER_VENAFI_API_CTLOG = 31
CT_SERVER_VENAFI_API_CTLOG_GEN2 = 39
CT_SERVER_NORDU_CT_PLAUSIBLE = 33
CT_SERVER_LETSENCRYPT_CT_CLICKY = 43
CT_SERVER_CERTLY_LOG = 30
CT_SERVER_CNNIC_CTSERVER = 27
CT_SERVER_CERTIFICATETRANSPARENCY_CN_CT = 38
CT_SERVER_SHECA_CT = 42
CT_SERVER_BEHIND_THE_SOFA = 44
_CTSERVERSTATUS = _descriptor.Descriptor(
name='CTServerStatus',
full_name='zsearch.CTServerStatus',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='index', full_name='zsearch.CTServerStatus.index', index=0,
number=1, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='ct_timestamp', full_name='zsearch.CTServerStatus.ct_timestamp', index=1,
number=2, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='pull_timestamp', full_name='zsearch.CTServerStatus.pull_timestamp', index=2,
number=3, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='push_timestamp', full_name='zsearch.CTServerStatus.push_timestamp', index=3,
number=4, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='push_status', full_name='zsearch.CTServerStatus.push_status', index=4,
number=5, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='sct', full_name='zsearch.CTServerStatus.sct', index=5,
number=6, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='push_error', full_name='zsearch.CTServerStatus.push_error', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=22,
serialized_end=200,
)
_CTSTATUS = _descriptor.Descriptor(
name='CTStatus',
full_name='zsearch.CTStatus',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='censys_dev', full_name='zsearch.CTStatus.censys_dev', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='censys', full_name='zsearch.CTStatus.censys', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_aviator', full_name='zsearch.CTStatus.google_aviator', index=2,
number=10, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_pilot', full_name='zsearch.CTStatus.google_pilot', index=3,
number=11, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_rocketeer', full_name='zsearch.CTStatus.google_rocketeer', index=4,
number=12, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_submariner', full_name='zsearch.CTStatus.google_submariner', index=5,
number=13, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_testtube', full_name='zsearch.CTStatus.google_testtube', index=6,
number=14, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_icarus', full_name='zsearch.CTStatus.google_icarus', index=7,
number=15, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_skydiver', full_name='zsearch.CTStatus.google_skydiver', index=8,
number=16, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_daedalus', full_name='zsearch.CTStatus.google_daedalus', index=9,
number=17, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_argon_2017', full_name='zsearch.CTStatus.google_argon_2017', index=10,
number=50, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_argon_2018', full_name='zsearch.CTStatus.google_argon_2018', index=11,
number=51, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_argon_2019', full_name='zsearch.CTStatus.google_argon_2019', index=12,
number=52, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_argon_2020', full_name='zsearch.CTStatus.google_argon_2020', index=13,
number=53, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='google_argon_2021', full_name='zsearch.CTStatus.google_argon_2021', index=14,
number=54, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cloudflare_nimbus_2017', full_name='zsearch.CTStatus.cloudflare_nimbus_2017', index=15,
number=60, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cloudflare_nimbus_2018', full_name='zsearch.CTStatus.cloudflare_nimbus_2018', index=16,
number=61, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cloudflare_nimbus_2019', full_name='zsearch.CTStatus.cloudflare_nimbus_2019', index=17,
number=62, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cloudflare_nimbus_2020', full_name='zsearch.CTStatus.cloudflare_nimbus_2020', index=18,
number=63, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cloudflare_nimbus_2021', full_name='zsearch.CTStatus.cloudflare_nimbus_2021', index=19,
number=64, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='digicert_ct1', full_name='zsearch.CTStatus.digicert_ct1', index=20,
number=20, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='digicert_ct2', full_name='zsearch.CTStatus.digicert_ct2', index=21,
number=40, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='izenpe_com_ct', full_name='zsearch.CTStatus.izenpe_com_ct', index=22,
number=21, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='izenpe_eus_ct', full_name='zsearch.CTStatus.izenpe_eus_ct', index=23,
number=22, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='symantec_ws_ct', full_name='zsearch.CTStatus.symantec_ws_ct', index=24,
number=23, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='symantec_ws_vega', full_name='zsearch.CTStatus.symantec_ws_vega', index=25,
number=24, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='symantec_ws_sirius', full_name='zsearch.CTStatus.symantec_ws_sirius', index=26,
number=37, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='symantec_ws_deneb', full_name='zsearch.CTStatus.symantec_ws_deneb', index=27,
number=32, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='comodo_dodo', full_name='zsearch.CTStatus.comodo_dodo', index=28,
number=34, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='comodo_mammoth', full_name='zsearch.CTStatus.comodo_mammoth', index=29,
number=35, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='comodo_sabre', full_name='zsearch.CTStatus.comodo_sabre', index=30,
number=41, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='wosign_ctlog', full_name='zsearch.CTStatus.wosign_ctlog', index=31,
number=25, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='wosign_ct', full_name='zsearch.CTStatus.wosign_ct', index=32,
number=26, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='startssl_ct', full_name='zsearch.CTStatus.startssl_ct', index=33,
number=29, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='wotrus_ctlog', full_name='zsearch.CTStatus.wotrus_ctlog', index=34,
number=47, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='wotrus_ctlog3', full_name='zsearch.CTStatus.wotrus_ctlog3', index=35,
number=48, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='gdca_ct', full_name='zsearch.CTStatus.gdca_ct', index=36,
number=28, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='gdca_ctlog', full_name='zsearch.CTStatus.gdca_ctlog', index=37,
number=36, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='gdca_log', full_name='zsearch.CTStatus.gdca_log', index=38,
number=45, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='gdca_log2', full_name='zsearch.CTStatus.gdca_log2', index=39,
number=46, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='venafi_api_ctlog', full_name='zsearch.CTStatus.venafi_api_ctlog', index=40,
number=31, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='venafi_api_ctlog_gen2', full_name='zsearch.CTStatus.venafi_api_ctlog_gen2', index=41,
number=39, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='nordu_ct_plausible', full_name='zsearch.CTStatus.nordu_ct_plausible', index=42,
number=33, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='letsencrypt_ct_clicky', full_name='zsearch.CTStatus.letsencrypt_ct_clicky', index=43,
number=43, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cnnic_ctserver', full_name='zsearch.CTStatus.cnnic_ctserver', index=44,
number=27, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='certly_log', full_name='zsearch.CTStatus.certly_log', index=45,
number=30, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='sheca_ct', full_name='zsearch.CTStatus.sheca_ct', index=46,
number=42, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='behind_the_sofa', full_name='zsearch.CTStatus.behind_the_sofa', index=47,
number=44, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='certificatetransparency_cn_ct', full_name='zsearch.CTStatus.certificatetransparency_cn_ct', index=48,
number=38, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=203,
serialized_end=2651,
)
_SCT = _descriptor.Descriptor(
name='SCT',
full_name='zsearch.SCT',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='sha256fp', full_name='zsearch.SCT.sha256fp', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='server', full_name='zsearch.SCT.server', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='status', full_name='zsearch.SCT.status', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2653,
serialized_end=2752,
)
_CTSERVERSTATUS.fields_by_name['push_status'].enum_type = _CTPUSHSTATUS
_CTSTATUS.fields_by_name['censys_dev'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['censys'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_aviator'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_pilot'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_rocketeer'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_submariner'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_testtube'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_icarus'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_skydiver'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_daedalus'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_argon_2017'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_argon_2018'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_argon_2019'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_argon_2020'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['google_argon_2021'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['cloudflare_nimbus_2017'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['cloudflare_nimbus_2018'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['cloudflare_nimbus_2019'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['cloudflare_nimbus_2020'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['cloudflare_nimbus_2021'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['digicert_ct1'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['digicert_ct2'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['izenpe_com_ct'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['izenpe_eus_ct'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['symantec_ws_ct'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['symantec_ws_vega'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['symantec_ws_sirius'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['symantec_ws_deneb'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['comodo_dodo'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['comodo_mammoth'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['comodo_sabre'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['wosign_ctlog'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['wosign_ct'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['startssl_ct'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['wotrus_ctlog'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['wotrus_ctlog3'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['gdca_ct'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['gdca_ctlog'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['gdca_log'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['gdca_log2'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['venafi_api_ctlog'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['venafi_api_ctlog_gen2'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['nordu_ct_plausible'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['letsencrypt_ct_clicky'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['cnnic_ctserver'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['certly_log'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['sheca_ct'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['behind_the_sofa'].message_type = _CTSERVERSTATUS
_CTSTATUS.fields_by_name['certificatetransparency_cn_ct'].message_type = _CTSERVERSTATUS
_SCT.fields_by_name['server'].enum_type = _CTSERVER
_SCT.fields_by_name['status'].message_type = _CTSERVERSTATUS
DESCRIPTOR.message_types_by_name['CTServerStatus'] = _CTSERVERSTATUS
DESCRIPTOR.message_types_by_name['CTStatus'] = _CTSTATUS
DESCRIPTOR.message_types_by_name['SCT'] = _SCT
DESCRIPTOR.enum_types_by_name['CTPushStatus'] = _CTPUSHSTATUS
DESCRIPTOR.enum_types_by_name['CTServer'] = _CTSERVER
CTServerStatus = _reflection.GeneratedProtocolMessageType('CTServerStatus', (_message.Message,), dict(
DESCRIPTOR = _CTSERVERSTATUS,
__module__ = 'ct_pb2'
# @@protoc_insertion_point(class_scope:zsearch.CTServerStatus)
))
_sym_db.RegisterMessage(CTServerStatus)
CTStatus = _reflection.GeneratedProtocolMessageType('CTStatus', (_message.Message,), dict(
DESCRIPTOR = _CTSTATUS,
__module__ = 'ct_pb2'
# @@protoc_insertion_point(class_scope:zsearch.CTStatus)
))
_sym_db.RegisterMessage(CTStatus)
SCT = _reflection.GeneratedProtocolMessageType('SCT', (_message.Message,), dict(
DESCRIPTOR = _SCT,
__module__ = 'ct_pb2'
# @@protoc_insertion_point(class_scope:zsearch.SCT)
))
_sym_db.RegisterMessage(SCT)
# @@protoc_insertion_point(module_scope) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/ct_pb2.py | ct_pb2.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='zlint.proto',
package='zsearch',
syntax='proto3',
serialized_pb=_b('\n\x0bzlint.proto\x12\x07zsearch\"H\n\nLintResult\x12)\n\x06result\x18\x01 \x01(\x0e\x32\x19.zsearch.LintResultStatus\x12\x0f\n\x07\x64\x65tails\x18\x02 \x01(\t\"\xea\x01\n\x05ZLint\x12\x0f\n\x07version\x18\x01 \x01(\x03\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\x12$\n\x06status\x18\x03 \x01(\x0e\x32\x14.zsearch.ZLintStatus\x12\x15\n\rinfos_present\x18\x04 \x01(\x08\x12\x17\n\x0fnotices_present\x18\x05 \x01(\x08\x12\x18\n\x10warnings_present\x18\x06 \x01(\x08\x12\x16\n\x0e\x65rrors_present\x18\x07 \x01(\x08\x12\x16\n\x0e\x66\x61tals_present\x18\x08 \x01(\x08\x12\x1d\n\x05lints\x18\t \x01(\x0b\x32\x0e.zsearch.Lints\"\xd0n\n\x05Lints\x12=\n e_basic_constraints_not_critical\x18\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x30\n\x13\x65_ian_bare_wildcard\x18\x02 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x35\n\x18\x65_ian_wildcard_not_first\x18\x03 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x30\n\x13\x65_san_bare_wildcard\x18\x04 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x35\n\x18\x65_san_wildcard_not_first\x18\x05 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x36\n\x19\x65_ca_country_name_invalid\x18\x06 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x36\n\x19\x65_ca_country_name_missing\x18\x07 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x32\n\x15\x65_ca_crl_sign_not_set\x18\x08 \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1en_ca_digital_signature_not_set\x18\t \x01(\x0b\x32\x13.zsearch.LintResult\x12\x37\n\x1a\x65_ca_key_cert_sign_not_set\x18\n \x01(\x0b\x32\x13.zsearch.LintResult\x12\x33\n\x16\x65_ca_key_usage_missing\x18\x0b \x01(\x0b\x32\x13.zsearch.LintResult\x12\x38\n\x1b\x65_ca_key_usage_not_critical\x18\x0c \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1e\x65_ca_organization_name_missing\x18\r \x01(\x0b\x32\x13.zsearch.LintResult\x12\x35\n\x18\x65_ca_subject_field_empty\x18\x0e \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n!e_cert_contains_unique_identifier\x18\x0f \x01(\x0b\x32\x13.zsearch.LintResult\x12<\n\x1f\x65_cert_extensions_version_not_3\x18\x10 \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n e_cab_dv_conflicts_with_locality\x18\x11 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x38\n\x1b\x65_cab_dv_conflicts_with_org\x18\x12 \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1e\x65_cab_dv_conflicts_with_postal\x18\x13 \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n e_cab_dv_conflicts_with_province\x18\x14 \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1e\x65_cab_dv_conflicts_with_street\x18\x15 \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n!e_cert_policy_iv_requires_country\x18\x16 \x01(\x0b\x32\x13.zsearch.LintResult\x12K\n.e_cert_policy_iv_requires_province_or_locality\x18\x17 \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n!e_cert_policy_ov_requires_country\x18\x18 \x01(\x0b\x32\x13.zsearch.LintResult\x12K\n.e_cert_policy_ov_requires_province_or_locality\x18\x19 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x32\n\x15\x65_cab_ov_requires_org\x18\x1a \x01(\x0b\x32\x13.zsearch.LintResult\x12<\n\x1f\x65_cab_iv_requires_personal_name\x18\x1b \x01(\x0b\x32\x13.zsearch.LintResult\x12H\n+e_cert_unique_identifier_version_not_2_or_3\x18\x1c \x01(\x0b\x32\x13.zsearch.LintResult\x12<\n\x1f\x65_distribution_point_incomplete\x18\x1e \x01(\x0b\x32\x13.zsearch.LintResult\x12\x45\n(w_distribution_point_missing_ldap_or_uri\x18\x1f \x01(\x0b\x32\x13.zsearch.LintResult\x12\x43\n&e_dsa_improper_modulus_or_divisor_size\x18 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1c\x65_dsa_shorter_than_2048_bits\x18! \x01(\x0b\x32\x13.zsearch.LintResult\x12\x31\n\x14\x65_ec_improper_curves\x18\" \x01(\x0b\x32\x13.zsearch.LintResult\x12\x36\n\x19w_eku_critical_improperly\x18# \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1e\x65_ev_business_category_missing\x18$ \x01(\x0b\x32\x13.zsearch.LintResult\x12\x36\n\x19\x65_ev_country_name_missing\x18% \x01(\x0b\x32\x13.zsearch.LintResult\x12\x37\n\x1a\x65_ev_locality_name_missing\x18& \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1e\x65_ev_organization_name_missing\x18\' \x01(\x0b\x32\x13.zsearch.LintResult\x12\x37\n\x1a\x65_ev_serial_number_missing\x18( \x01(\x0b\x32\x13.zsearch.LintResult\x12\x35\n\x18\x65_ev_valid_time_too_long\x18) \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n!w_ext_aia_access_location_missing\x18* \x01(\x0b\x32\x13.zsearch.LintResult\x12\x36\n\x19\x65_ext_aia_marked_critical\x18+ \x01(\x0b\x32\x13.zsearch.LintResult\x12\x44\n\'e_ext_authority_key_identifier_critical\x18, \x01(\x0b\x32\x13.zsearch.LintResult\x12\x43\n&e_ext_authority_key_identifier_missing\x18- \x01(\x0b\x32\x13.zsearch.LintResult\x12M\n0e_ext_authority_key_identifier_no_key_identifier\x18. \x01(\x0b\x32\x13.zsearch.LintResult\x12\x41\n$w_ext_cert_policy_contains_noticeref\x18/ \x01(\x0b\x32\x13.zsearch.LintResult\x12N\n1e_ext_cert_policy_disallowed_any_policy_qualifier\x18\x30 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x38\n\x1b\x65_ext_cert_policy_duplicate\x18\x31 \x01(\x0b\x32\x13.zsearch.LintResult\x12G\n*e_ext_cert_policy_explicit_text_ia5_string\x18\x32 \x01(\x0b\x32\x13.zsearch.LintResult\x12M\n0w_ext_cert_policy_explicit_text_includes_control\x18\x33 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x44\n\'w_ext_cert_policy_explicit_text_not_nfc\x18\x34 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x45\n(w_ext_cert_policy_explicit_text_not_utf8\x18\x35 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x45\n(e_ext_cert_policy_explicit_text_too_long\x18\x36 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x43\n&w_ext_crl_distribution_marked_critical\x18\x37 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x36\n\x19\x65_ext_duplicate_extension\x18\x38 \x01(\x0b\x32\x13.zsearch.LintResult\x12?\n\"e_ext_freshest_crl_marked_critical\x18\x39 \x01(\x0b\x32\x13.zsearch.LintResult\x12/\n\x12w_ext_ian_critical\x18: \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1c\x65_ext_ian_dns_not_ia5_string\x18; \x01(\x0b\x32\x13.zsearch.LintResult\x12\x31\n\x14\x65_ext_ian_empty_name\x18< \x01(\x0b\x32\x13.zsearch.LintResult\x12\x31\n\x14\x65_ext_ian_no_entries\x18= \x01(\x0b\x32\x13.zsearch.LintResult\x12<\n\x1f\x65_ext_ian_rfc822_format_invalid\x18> \x01(\x0b\x32\x13.zsearch.LintResult\x12\x35\n\x18\x65_ext_ian_space_dns_name\x18? \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1c\x65_ext_ian_uri_format_invalid\x18@ \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n!e_ext_ian_uri_host_not_fqdn_or_ip\x18\x41 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x32\n\x15\x65_ext_ian_uri_not_ia5\x18\x42 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x33\n\x16\x65_ext_ian_uri_relative\x18\x43 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x41\n$e_ext_key_usage_cert_sign_without_ca\x18\x44 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1cw_ext_key_usage_not_critical\x18\x45 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1c\x65_ext_key_usage_without_bits\x18\x46 \x01(\x0b\x32\x13.zsearch.LintResult\x12@\n#e_ext_name_constraints_not_critical\x18G \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n e_ext_name_constraints_not_in_ca\x18H \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1e\x65_ext_policy_constraints_empty\x18I \x01(\x0b\x32\x13.zsearch.LintResult\x12\x42\n%e_ext_policy_constraints_not_critical\x18J \x01(\x0b\x32\x13.zsearch.LintResult\x12\x38\n\x1b\x65_ext_policy_map_any_policy\x18K \x01(\x0b\x32\x13.zsearch.LintResult\x12:\n\x1dw_ext_policy_map_not_critical\x18L \x01(\x0b\x32\x13.zsearch.LintResult\x12@\n#w_ext_policy_map_not_in_cert_policy\x18M \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1e\x65_ext_san_contains_reserved_ip\x18N \x01(\x0b\x32\x13.zsearch.LintResult\x12?\n\"w_ext_san_critical_with_subject_dn\x18O \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n e_ext_san_directory_name_present\x18P \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1c\x65_ext_san_dns_not_ia5_string\x18Q \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n e_ext_san_edi_party_name_present\x18T \x01(\x0b\x32\x13.zsearch.LintResult\x12\x31\n\x14\x65_ext_san_empty_name\x18U \x01(\x0b\x32\x13.zsearch.LintResult\x12.\n\x11\x65_ext_san_missing\x18V \x01(\x0b\x32\x13.zsearch.LintResult\x12\x31\n\x14\x65_ext_san_no_entries\x18W \x01(\x0b\x32\x13.zsearch.LintResult\x12\x43\n&e_ext_san_not_critical_without_subject\x18X \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1c\x65_ext_san_other_name_present\x18Y \x01(\x0b\x32\x13.zsearch.LintResult\x12<\n\x1f\x65_ext_san_registered_id_present\x18Z \x01(\x0b\x32\x13.zsearch.LintResult\x12<\n\x1f\x65_ext_san_rfc822_format_invalid\x18[ \x01(\x0b\x32\x13.zsearch.LintResult\x12:\n\x1d\x65_ext_san_rfc822_name_present\x18\\ \x01(\x0b\x32\x13.zsearch.LintResult\x12\x35\n\x18\x65_ext_san_space_dns_name\x18] \x01(\x0b\x32\x13.zsearch.LintResult\x12J\n-e_ext_san_uniform_resource_identifier_present\x18^ \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1c\x65_ext_san_uri_format_invalid\x18_ \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n!e_ext_san_uri_host_not_fqdn_or_ip\x18` \x01(\x0b\x32\x13.zsearch.LintResult\x12\x32\n\x15\x65_ext_san_uri_not_ia5\x18\x61 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x33\n\x16\x65_ext_san_uri_relative\x18\x62 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x42\n%e_ext_subject_directory_attr_critical\x18\x63 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x42\n%e_ext_subject_key_identifier_critical\x18\x64 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x44\n\'e_ext_subject_key_identifier_missing_ca\x18\x65 \x01(\x0b\x32\x13.zsearch.LintResult\x12J\n-w_ext_subject_key_identifier_missing_sub_cert\x18\x66 \x01(\x0b\x32\x13.zsearch.LintResult\x12H\n+e_generalized_time_does_not_include_seconds\x18g \x01(\x0b\x32\x13.zsearch.LintResult\x12I\n,e_generalized_time_includes_fraction_seconds\x18h \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1e\x65_generalized_time_not_in_zulu\x18i \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n!e_ian_dns_name_includes_null_char\x18k \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n!e_ian_dns_name_starts_with_period\x18l \x01(\x0b\x32\x13.zsearch.LintResult\x12\x38\n\x1bw_ian_iana_pub_suffix_empty\x18m \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n!e_inhibit_any_policy_not_critical\x18n \x01(\x0b\x32\x13.zsearch.LintResult\x12:\n\x1d\x65_invalid_certificate_version\x18o \x01(\x0b\x32\x13.zsearch.LintResult\x12\x31\n\x14\x65_issuer_field_empty\x18p \x01(\x0b\x32\x13.zsearch.LintResult\x12\x34\n\x17\x65_name_constraint_empty\x18q \x01(\x0b\x32\x13.zsearch.LintResult\x12\x41\n$e_name_constraint_maximum_not_absent\x18r \x01(\x0b\x32\x13.zsearch.LintResult\x12?\n\"e_name_constraint_minimum_non_zero\x18s \x01(\x0b\x32\x13.zsearch.LintResult\x12@\n#w_name_constraint_on_edi_party_name\x18t \x01(\x0b\x32\x13.zsearch.LintResult\x12?\n\"w_name_constraint_on_registered_id\x18u \x01(\x0b\x32\x13.zsearch.LintResult\x12\x36\n\x19w_name_constraint_on_x400\x18v \x01(\x0b\x32\x13.zsearch.LintResult\x12\x46\n)e_old_root_ca_rsa_mod_less_than_2048_bits\x18w \x01(\x0b\x32\x13.zsearch.LintResult\x12\x45\n(e_old_sub_ca_rsa_mod_less_than_1024_bits\x18x \x01(\x0b\x32\x13.zsearch.LintResult\x12G\n*e_old_sub_cert_rsa_mod_less_than_1024_bits\x18y \x01(\x0b\x32\x13.zsearch.LintResult\x12\x46\n)e_path_len_constraint_improperly_included\x18z \x01(\x0b\x32\x13.zsearch.LintResult\x12?\n\"e_path_len_constraint_zero_or_less\x18{ \x01(\x0b\x32\x13.zsearch.LintResult\x12:\n\x1d\x65_public_key_type_not_allowed\x18| \x01(\x0b\x32\x13.zsearch.LintResult\x12Z\n=w_root_ca_basic_constraints_path_len_constraint_field_present\x18} \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1ew_root_ca_contains_cert_policy\x18~ \x01(\x0b\x32\x13.zsearch.LintResult\x12\x41\n$e_root_ca_extended_key_usage_present\x18\x7f \x01(\x0b\x32\x13.zsearch.LintResult\x12\x30\n\x12\x65_rsa_exp_negative\x18\x80\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12@\n\"w_rsa_mod_factors_smaller_than_752\x18\x81\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1d\x65_rsa_mod_less_than_2048_bits\x18\x82\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12/\n\x11w_rsa_mod_not_odd\x18\x83\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12@\n\"w_rsa_public_exponent_not_in_range\x18\x84\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1d\x65_rsa_public_exponent_not_odd\x18\x85\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n\x1f\x65_rsa_public_exponent_too_small\x18\x86\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12?\n!e_san_dns_name_includes_null_char\x18\x87\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12?\n!e_san_dns_name_starts_with_period\x18\x88\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1bw_san_iana_pub_suffix_empty\x18\x89\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x43\n%e_serial_number_longer_than_20_octets\x18\x8a\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12:\n\x1c\x65_serial_number_not_positive\x18\x8b\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12J\n,w_sub_ca_aia_does_not_contain_issuing_ca_url\x18\x8c\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x44\n&e_sub_ca_aia_does_not_contain_ocsp_url\x18\x8d\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x32\n\x14\x65_sub_ca_aia_missing\x18\x8e\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12K\n-w_sub_ca_certificate_policies_marked_critical\x18\x8f\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x43\n%e_sub_ca_certificate_policies_missing\x18\x90\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12S\n5e_sub_ca_crl_distribution_points_does_not_contain_url\x18\x91\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12N\n0e_sub_ca_crl_distribution_points_marked_critical\x18\x92\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x46\n(e_sub_ca_crl_distribution_points_missing\x18\x93\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x33\n\x15w_sub_ca_eku_critical\x18\x94\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x44\n&w_sub_ca_name_constraints_not_critical\x18\x95\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x46\n(e_sub_cert_aia_does_not_contain_ocsp_url\x18\x99\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x34\n\x16\x65_sub_cert_aia_missing\x18\x9a\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12:\n\x1c\x65_sub_cert_cert_policy_empty\x18\x9b\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12M\n/w_sub_cert_certificate_policies_marked_critical\x18\x9c\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12U\n7e_sub_cert_crl_distribution_points_does_not_contain_url\x18\x9d\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12P\n2e_sub_cert_crl_distribution_points_marked_critical\x18\x9e\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1bw_sub_cert_eku_extra_values\x18\x9f\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x34\n\x16\x65_sub_cert_eku_missing\x18\xa0\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12L\n.e_sub_cert_eku_server_auth_client_auth_missing\x18\xa1\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x44\n&e_sub_cert_key_usage_cert_sign_bit_set\x18\xa2\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n\x1f\x65_sub_cert_or_sub_ca_using_sha1\x18\xa3\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x41\n#w_sub_cert_sha1_expiration_too_long\x18\xa4\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12<\n\x1en_subject_common_name_included\x18\xa6\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12@\n\"e_subject_common_name_not_from_san\x18\xa7\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12G\n)e_subject_contains_noninformational_value\x18\xa8\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12<\n\x1e\x65_subject_contains_reserved_ip\x18\xa9\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x37\n\x19\x65_subject_country_not_iso\x18\xaa\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1b\x65_subject_empty_without_san\x18\xab\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x43\n%e_subject_info_access_marked_critical\x18\xac\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12.\n\x10\x65_subject_not_dn\x18\xae\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x41\n#e_utc_time_does_not_include_seconds\x18\xb4\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x34\n\x16\x65_utc_time_not_in_zulu\x18\xb5\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12:\n\x1c\x65_validity_time_not_positive\x18\xb6\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1b\x65_wrong_time_format_pre2050\x18\xb7\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x31\n\x13\x65_rsa_no_public_key\x18\xb8\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x45\n\'e_sub_cert_certificate_policies_missing\x18\xb9\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x43\n%e_sub_cert_key_usage_crl_sign_bit_set\x18\xba\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n e_subject_common_name_max_length\x18\xbb\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12@\n\"e_subject_locality_name_max_length\x18\xbc\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x44\n&e_subject_organization_name_max_length\x18\xbd\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12K\n-e_subject_organizational_unit_name_max_length\x18\xbe\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n\x1f\x65_subject_state_name_max_length\x18\xbf\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x34\n\x16w_multiple_subject_rdn\x18\xc0\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x33\n\x15w_multiple_issuer_rdn\x18\xc1\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n\x1fw_issuer_dn_trailing_whitespace\x18\xc2\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12<\n\x1ew_issuer_dn_leading_whitespace\x18\xc3\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n w_subject_dn_trailing_whitespace\x18\xc4\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n\x1fw_subject_dn_leading_whitespace\x18\xc5\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x42\n$e_sub_cert_locality_name_must_appear\x18\xc6\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x41\n#e_signature_algorithm_not_supported\x18\xc7\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x35\n\x17\x65_dnsname_hyphen_in_sld\x18\xc8\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n\x1f\x65_dsa_correct_order_in_subgroup\x18\xc9\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x46\n(n_sub_ca_eku_not_technically_constrained\x18\xca\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x33\n\x15\x65_dnsname_empty_label\x18\xcb\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x36\n\x18\x65_ca_common_name_missing\x18\xcc\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x43\n%e_dnsname_wildcard_only_in_left_label\x18\xcd\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12<\n\x1e\x65_sub_cert_valid_time_too_long\x18\xce\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x43\n%e_dnsname_left_label_wildcard_correct\x18\xcf\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1bw_serial_number_low_entropy\x18\xd0\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x36\n\x18\x65_dnsname_label_too_long\x18\xd1\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1b\x65_root_ca_key_usage_present\x18\xd2\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x46\n(w_dnsname_wildcard_left_of_public_suffix\x18\xd3\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x42\n$e_international_dns_name_not_unicode\x18\xd4\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1bw_dnsname_underscore_in_trd\x18\xd5\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12L\n.w_sub_cert_aia_does_not_contain_issuing_ca_url\x18\xd6\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x46\n(e_sub_cert_locality_name_must_not_appear\x18\xd7\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x41\n#e_sub_cert_country_name_must_appear\x18\xd8\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12>\n e_dnsname_bad_character_in_label\x18\xd9\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x42\n$e_sub_ca_must_not_contain_any_policy\x18\xda\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12?\n!e_international_dns_name_not_nfkc\x18\xdb\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12<\n\x1e\x65_sub_cert_aia_marked_critical\x18\xdc\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12(\n\ne_ca_is_ca\x18\xdd\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12H\n*e_sub_cert_street_address_should_not_exist\x18\xde\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x32\n\x14\x65_sub_ca_eku_missing\x18\xdf\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x41\n#e_sub_cert_province_must_not_appear\x18\xe0\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1b\x65_dnsname_underscore_in_sld\x18\xe1\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12;\n\x1d\x65_sub_ca_eku_name_constraints\x18\xe2\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x32\n\x14\x65_sub_cert_not_is_ca\x18\xe3\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x41\n#e_dsa_unique_correct_representation\x18\xe4\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12=\n\x1f\x65_sub_cert_province_must_appear\x18\xe5\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x42\n$e_root_ca_key_usage_must_be_critical\x18\xe6\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1b\x65_ext_san_dns_name_too_long\x18\xe7\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x32\n\x14\x65_dsa_params_missing\x18\xe8\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12:\n\x1c\x65_sub_ca_aia_marked_critical\x18\xe9\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12S\n5e_sub_cert_given_name_surname_contains_correct_policy\x18\xea\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x44\n&e_sub_cert_postal_code_must_not_appear\x18\xeb\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x35\n\x17\x65_dnsname_not_valid_tld\x18\xec\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x39\n\x1bn_contains_redacted_dnsname\x18\xed\x01 \x01(\x0b\x32\x13.zsearch.LintResult\x12\x41\n#e_dnsname_contains_bare_iana_suffix\x18\xee\x01 \x01(\x0b\x32\x13.zsearch.LintResult*\xf5\x01\n\x10LintResultStatus\x12\x18\n\x14LINT_RESULT_RESERVED\x10\x00\x12\x12\n\x0eLINT_RESULT_NA\x10\x01\x12\x12\n\x0eLINT_RESULT_NE\x10\x02\x12\x14\n\x10LINT_RESULT_PASS\x10\x03\x12\x14\n\x10LINT_RESULT_INFO\x10\x04\x12\x16\n\x12LINT_RESULT_NOTICE\x10\x05\x12\x14\n\x10LINT_RESULT_WARN\x10\x06\x12\x15\n\x11LINT_RESULT_ERROR\x10\x07\x12\x15\n\x11LINT_RESULT_FATAL\x10\x08\x12\x17\n\x13LINT_RESULT_UNKNOWN\x10\t*[\n\x0bZLintStatus\x12\x19\n\x15ZLINT_STATUS_RESERVED\x10\x00\x12\x18\n\x14ZLINT_STATUS_SUCCESS\x10\x01\x12\x17\n\x13ZLINT_STATUS_FAILED\x10\x02\x62\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_LINTRESULTSTATUS = _descriptor.EnumDescriptor(
name='LintResultStatus',
full_name='zsearch.LintResultStatus',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='LINT_RESULT_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='LINT_RESULT_NA', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='LINT_RESULT_NE', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='LINT_RESULT_PASS', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='LINT_RESULT_INFO', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='LINT_RESULT_NOTICE', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='LINT_RESULT_WARN', index=6, number=6,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='LINT_RESULT_ERROR', index=7, number=7,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='LINT_RESULT_FATAL', index=8, number=8,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='LINT_RESULT_UNKNOWN', index=9, number=9,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=14499,
serialized_end=14744,
)
_sym_db.RegisterEnumDescriptor(_LINTRESULTSTATUS)
LintResultStatus = enum_type_wrapper.EnumTypeWrapper(_LINTRESULTSTATUS)
_ZLINTSTATUS = _descriptor.EnumDescriptor(
name='ZLintStatus',
full_name='zsearch.ZLintStatus',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='ZLINT_STATUS_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='ZLINT_STATUS_SUCCESS', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='ZLINT_STATUS_FAILED', index=2, number=2,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=14746,
serialized_end=14837,
)
_sym_db.RegisterEnumDescriptor(_ZLINTSTATUS)
ZLintStatus = enum_type_wrapper.EnumTypeWrapper(_ZLINTSTATUS)
LINT_RESULT_RESERVED = 0
LINT_RESULT_NA = 1
LINT_RESULT_NE = 2
LINT_RESULT_PASS = 3
LINT_RESULT_INFO = 4
LINT_RESULT_NOTICE = 5
LINT_RESULT_WARN = 6
LINT_RESULT_ERROR = 7
LINT_RESULT_FATAL = 8
LINT_RESULT_UNKNOWN = 9
ZLINT_STATUS_RESERVED = 0
ZLINT_STATUS_SUCCESS = 1
ZLINT_STATUS_FAILED = 2
_LINTRESULT = _descriptor.Descriptor(
name='LintResult',
full_name='zsearch.LintResult',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='result', full_name='zsearch.LintResult.result', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='details', full_name='zsearch.LintResult.details', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=24,
serialized_end=96,
)
_ZLINT = _descriptor.Descriptor(
name='ZLint',
full_name='zsearch.ZLint',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='version', full_name='zsearch.ZLint.version', index=0,
number=1, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='timestamp', full_name='zsearch.ZLint.timestamp', index=1,
number=2, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='status', full_name='zsearch.ZLint.status', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='infos_present', full_name='zsearch.ZLint.infos_present', index=3,
number=4, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='notices_present', full_name='zsearch.ZLint.notices_present', index=4,
number=5, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='warnings_present', full_name='zsearch.ZLint.warnings_present', index=5,
number=6, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='errors_present', full_name='zsearch.ZLint.errors_present', index=6,
number=7, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='fatals_present', full_name='zsearch.ZLint.fatals_present', index=7,
number=8, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='lints', full_name='zsearch.ZLint.lints', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=99,
serialized_end=333,
)
_LINTS = _descriptor.Descriptor(
name='Lints',
full_name='zsearch.Lints',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='e_basic_constraints_not_critical', full_name='zsearch.Lints.e_basic_constraints_not_critical', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ian_bare_wildcard', full_name='zsearch.Lints.e_ian_bare_wildcard', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ian_wildcard_not_first', full_name='zsearch.Lints.e_ian_wildcard_not_first', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_san_bare_wildcard', full_name='zsearch.Lints.e_san_bare_wildcard', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_san_wildcard_not_first', full_name='zsearch.Lints.e_san_wildcard_not_first', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ca_country_name_invalid', full_name='zsearch.Lints.e_ca_country_name_invalid', index=5,
number=6, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ca_country_name_missing', full_name='zsearch.Lints.e_ca_country_name_missing', index=6,
number=7, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ca_crl_sign_not_set', full_name='zsearch.Lints.e_ca_crl_sign_not_set', index=7,
number=8, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='n_ca_digital_signature_not_set', full_name='zsearch.Lints.n_ca_digital_signature_not_set', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ca_key_cert_sign_not_set', full_name='zsearch.Lints.e_ca_key_cert_sign_not_set', index=9,
number=10, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ca_key_usage_missing', full_name='zsearch.Lints.e_ca_key_usage_missing', index=10,
number=11, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ca_key_usage_not_critical', full_name='zsearch.Lints.e_ca_key_usage_not_critical', index=11,
number=12, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ca_organization_name_missing', full_name='zsearch.Lints.e_ca_organization_name_missing', index=12,
number=13, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ca_subject_field_empty', full_name='zsearch.Lints.e_ca_subject_field_empty', index=13,
number=14, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cert_contains_unique_identifier', full_name='zsearch.Lints.e_cert_contains_unique_identifier', index=14,
number=15, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cert_extensions_version_not_3', full_name='zsearch.Lints.e_cert_extensions_version_not_3', index=15,
number=16, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cab_dv_conflicts_with_locality', full_name='zsearch.Lints.e_cab_dv_conflicts_with_locality', index=16,
number=17, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cab_dv_conflicts_with_org', full_name='zsearch.Lints.e_cab_dv_conflicts_with_org', index=17,
number=18, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cab_dv_conflicts_with_postal', full_name='zsearch.Lints.e_cab_dv_conflicts_with_postal', index=18,
number=19, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cab_dv_conflicts_with_province', full_name='zsearch.Lints.e_cab_dv_conflicts_with_province', index=19,
number=20, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cab_dv_conflicts_with_street', full_name='zsearch.Lints.e_cab_dv_conflicts_with_street', index=20,
number=21, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cert_policy_iv_requires_country', full_name='zsearch.Lints.e_cert_policy_iv_requires_country', index=21,
number=22, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cert_policy_iv_requires_province_or_locality', full_name='zsearch.Lints.e_cert_policy_iv_requires_province_or_locality', index=22,
number=23, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cert_policy_ov_requires_country', full_name='zsearch.Lints.e_cert_policy_ov_requires_country', index=23,
number=24, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cert_policy_ov_requires_province_or_locality', full_name='zsearch.Lints.e_cert_policy_ov_requires_province_or_locality', index=24,
number=25, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cab_ov_requires_org', full_name='zsearch.Lints.e_cab_ov_requires_org', index=25,
number=26, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cab_iv_requires_personal_name', full_name='zsearch.Lints.e_cab_iv_requires_personal_name', index=26,
number=27, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_cert_unique_identifier_version_not_2_or_3', full_name='zsearch.Lints.e_cert_unique_identifier_version_not_2_or_3', index=27,
number=28, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_distribution_point_incomplete', full_name='zsearch.Lints.e_distribution_point_incomplete', index=28,
number=30, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_distribution_point_missing_ldap_or_uri', full_name='zsearch.Lints.w_distribution_point_missing_ldap_or_uri', index=29,
number=31, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dsa_improper_modulus_or_divisor_size', full_name='zsearch.Lints.e_dsa_improper_modulus_or_divisor_size', index=30,
number=32, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dsa_shorter_than_2048_bits', full_name='zsearch.Lints.e_dsa_shorter_than_2048_bits', index=31,
number=33, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ec_improper_curves', full_name='zsearch.Lints.e_ec_improper_curves', index=32,
number=34, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_eku_critical_improperly', full_name='zsearch.Lints.w_eku_critical_improperly', index=33,
number=35, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ev_business_category_missing', full_name='zsearch.Lints.e_ev_business_category_missing', index=34,
number=36, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ev_country_name_missing', full_name='zsearch.Lints.e_ev_country_name_missing', index=35,
number=37, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ev_locality_name_missing', full_name='zsearch.Lints.e_ev_locality_name_missing', index=36,
number=38, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ev_organization_name_missing', full_name='zsearch.Lints.e_ev_organization_name_missing', index=37,
number=39, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ev_serial_number_missing', full_name='zsearch.Lints.e_ev_serial_number_missing', index=38,
number=40, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ev_valid_time_too_long', full_name='zsearch.Lints.e_ev_valid_time_too_long', index=39,
number=41, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_aia_access_location_missing', full_name='zsearch.Lints.w_ext_aia_access_location_missing', index=40,
number=42, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_aia_marked_critical', full_name='zsearch.Lints.e_ext_aia_marked_critical', index=41,
number=43, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_authority_key_identifier_critical', full_name='zsearch.Lints.e_ext_authority_key_identifier_critical', index=42,
number=44, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_authority_key_identifier_missing', full_name='zsearch.Lints.e_ext_authority_key_identifier_missing', index=43,
number=45, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_authority_key_identifier_no_key_identifier', full_name='zsearch.Lints.e_ext_authority_key_identifier_no_key_identifier', index=44,
number=46, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_cert_policy_contains_noticeref', full_name='zsearch.Lints.w_ext_cert_policy_contains_noticeref', index=45,
number=47, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_cert_policy_disallowed_any_policy_qualifier', full_name='zsearch.Lints.e_ext_cert_policy_disallowed_any_policy_qualifier', index=46,
number=48, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_cert_policy_duplicate', full_name='zsearch.Lints.e_ext_cert_policy_duplicate', index=47,
number=49, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_cert_policy_explicit_text_ia5_string', full_name='zsearch.Lints.e_ext_cert_policy_explicit_text_ia5_string', index=48,
number=50, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_cert_policy_explicit_text_includes_control', full_name='zsearch.Lints.w_ext_cert_policy_explicit_text_includes_control', index=49,
number=51, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_cert_policy_explicit_text_not_nfc', full_name='zsearch.Lints.w_ext_cert_policy_explicit_text_not_nfc', index=50,
number=52, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_cert_policy_explicit_text_not_utf8', full_name='zsearch.Lints.w_ext_cert_policy_explicit_text_not_utf8', index=51,
number=53, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_cert_policy_explicit_text_too_long', full_name='zsearch.Lints.e_ext_cert_policy_explicit_text_too_long', index=52,
number=54, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_crl_distribution_marked_critical', full_name='zsearch.Lints.w_ext_crl_distribution_marked_critical', index=53,
number=55, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_duplicate_extension', full_name='zsearch.Lints.e_ext_duplicate_extension', index=54,
number=56, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_freshest_crl_marked_critical', full_name='zsearch.Lints.e_ext_freshest_crl_marked_critical', index=55,
number=57, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_ian_critical', full_name='zsearch.Lints.w_ext_ian_critical', index=56,
number=58, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_ian_dns_not_ia5_string', full_name='zsearch.Lints.e_ext_ian_dns_not_ia5_string', index=57,
number=59, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_ian_empty_name', full_name='zsearch.Lints.e_ext_ian_empty_name', index=58,
number=60, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_ian_no_entries', full_name='zsearch.Lints.e_ext_ian_no_entries', index=59,
number=61, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_ian_rfc822_format_invalid', full_name='zsearch.Lints.e_ext_ian_rfc822_format_invalid', index=60,
number=62, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_ian_space_dns_name', full_name='zsearch.Lints.e_ext_ian_space_dns_name', index=61,
number=63, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_ian_uri_format_invalid', full_name='zsearch.Lints.e_ext_ian_uri_format_invalid', index=62,
number=64, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_ian_uri_host_not_fqdn_or_ip', full_name='zsearch.Lints.e_ext_ian_uri_host_not_fqdn_or_ip', index=63,
number=65, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_ian_uri_not_ia5', full_name='zsearch.Lints.e_ext_ian_uri_not_ia5', index=64,
number=66, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_ian_uri_relative', full_name='zsearch.Lints.e_ext_ian_uri_relative', index=65,
number=67, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_key_usage_cert_sign_without_ca', full_name='zsearch.Lints.e_ext_key_usage_cert_sign_without_ca', index=66,
number=68, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_key_usage_not_critical', full_name='zsearch.Lints.w_ext_key_usage_not_critical', index=67,
number=69, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_key_usage_without_bits', full_name='zsearch.Lints.e_ext_key_usage_without_bits', index=68,
number=70, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_name_constraints_not_critical', full_name='zsearch.Lints.e_ext_name_constraints_not_critical', index=69,
number=71, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_name_constraints_not_in_ca', full_name='zsearch.Lints.e_ext_name_constraints_not_in_ca', index=70,
number=72, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_policy_constraints_empty', full_name='zsearch.Lints.e_ext_policy_constraints_empty', index=71,
number=73, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_policy_constraints_not_critical', full_name='zsearch.Lints.e_ext_policy_constraints_not_critical', index=72,
number=74, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_policy_map_any_policy', full_name='zsearch.Lints.e_ext_policy_map_any_policy', index=73,
number=75, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_policy_map_not_critical', full_name='zsearch.Lints.w_ext_policy_map_not_critical', index=74,
number=76, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_policy_map_not_in_cert_policy', full_name='zsearch.Lints.w_ext_policy_map_not_in_cert_policy', index=75,
number=77, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_contains_reserved_ip', full_name='zsearch.Lints.e_ext_san_contains_reserved_ip', index=76,
number=78, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_san_critical_with_subject_dn', full_name='zsearch.Lints.w_ext_san_critical_with_subject_dn', index=77,
number=79, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_directory_name_present', full_name='zsearch.Lints.e_ext_san_directory_name_present', index=78,
number=80, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_dns_not_ia5_string', full_name='zsearch.Lints.e_ext_san_dns_not_ia5_string', index=79,
number=81, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_edi_party_name_present', full_name='zsearch.Lints.e_ext_san_edi_party_name_present', index=80,
number=84, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_empty_name', full_name='zsearch.Lints.e_ext_san_empty_name', index=81,
number=85, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_missing', full_name='zsearch.Lints.e_ext_san_missing', index=82,
number=86, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_no_entries', full_name='zsearch.Lints.e_ext_san_no_entries', index=83,
number=87, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_not_critical_without_subject', full_name='zsearch.Lints.e_ext_san_not_critical_without_subject', index=84,
number=88, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_other_name_present', full_name='zsearch.Lints.e_ext_san_other_name_present', index=85,
number=89, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_registered_id_present', full_name='zsearch.Lints.e_ext_san_registered_id_present', index=86,
number=90, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_rfc822_format_invalid', full_name='zsearch.Lints.e_ext_san_rfc822_format_invalid', index=87,
number=91, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_rfc822_name_present', full_name='zsearch.Lints.e_ext_san_rfc822_name_present', index=88,
number=92, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_space_dns_name', full_name='zsearch.Lints.e_ext_san_space_dns_name', index=89,
number=93, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_uniform_resource_identifier_present', full_name='zsearch.Lints.e_ext_san_uniform_resource_identifier_present', index=90,
number=94, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_uri_format_invalid', full_name='zsearch.Lints.e_ext_san_uri_format_invalid', index=91,
number=95, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_uri_host_not_fqdn_or_ip', full_name='zsearch.Lints.e_ext_san_uri_host_not_fqdn_or_ip', index=92,
number=96, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_uri_not_ia5', full_name='zsearch.Lints.e_ext_san_uri_not_ia5', index=93,
number=97, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_uri_relative', full_name='zsearch.Lints.e_ext_san_uri_relative', index=94,
number=98, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_subject_directory_attr_critical', full_name='zsearch.Lints.e_ext_subject_directory_attr_critical', index=95,
number=99, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_subject_key_identifier_critical', full_name='zsearch.Lints.e_ext_subject_key_identifier_critical', index=96,
number=100, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_subject_key_identifier_missing_ca', full_name='zsearch.Lints.e_ext_subject_key_identifier_missing_ca', index=97,
number=101, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ext_subject_key_identifier_missing_sub_cert', full_name='zsearch.Lints.w_ext_subject_key_identifier_missing_sub_cert', index=98,
number=102, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_generalized_time_does_not_include_seconds', full_name='zsearch.Lints.e_generalized_time_does_not_include_seconds', index=99,
number=103, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_generalized_time_includes_fraction_seconds', full_name='zsearch.Lints.e_generalized_time_includes_fraction_seconds', index=100,
number=104, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_generalized_time_not_in_zulu', full_name='zsearch.Lints.e_generalized_time_not_in_zulu', index=101,
number=105, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ian_dns_name_includes_null_char', full_name='zsearch.Lints.e_ian_dns_name_includes_null_char', index=102,
number=107, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ian_dns_name_starts_with_period', full_name='zsearch.Lints.e_ian_dns_name_starts_with_period', index=103,
number=108, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_ian_iana_pub_suffix_empty', full_name='zsearch.Lints.w_ian_iana_pub_suffix_empty', index=104,
number=109, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_inhibit_any_policy_not_critical', full_name='zsearch.Lints.e_inhibit_any_policy_not_critical', index=105,
number=110, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_invalid_certificate_version', full_name='zsearch.Lints.e_invalid_certificate_version', index=106,
number=111, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_issuer_field_empty', full_name='zsearch.Lints.e_issuer_field_empty', index=107,
number=112, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_name_constraint_empty', full_name='zsearch.Lints.e_name_constraint_empty', index=108,
number=113, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_name_constraint_maximum_not_absent', full_name='zsearch.Lints.e_name_constraint_maximum_not_absent', index=109,
number=114, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_name_constraint_minimum_non_zero', full_name='zsearch.Lints.e_name_constraint_minimum_non_zero', index=110,
number=115, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_name_constraint_on_edi_party_name', full_name='zsearch.Lints.w_name_constraint_on_edi_party_name', index=111,
number=116, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_name_constraint_on_registered_id', full_name='zsearch.Lints.w_name_constraint_on_registered_id', index=112,
number=117, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_name_constraint_on_x400', full_name='zsearch.Lints.w_name_constraint_on_x400', index=113,
number=118, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_old_root_ca_rsa_mod_less_than_2048_bits', full_name='zsearch.Lints.e_old_root_ca_rsa_mod_less_than_2048_bits', index=114,
number=119, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_old_sub_ca_rsa_mod_less_than_1024_bits', full_name='zsearch.Lints.e_old_sub_ca_rsa_mod_less_than_1024_bits', index=115,
number=120, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_old_sub_cert_rsa_mod_less_than_1024_bits', full_name='zsearch.Lints.e_old_sub_cert_rsa_mod_less_than_1024_bits', index=116,
number=121, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_path_len_constraint_improperly_included', full_name='zsearch.Lints.e_path_len_constraint_improperly_included', index=117,
number=122, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_path_len_constraint_zero_or_less', full_name='zsearch.Lints.e_path_len_constraint_zero_or_less', index=118,
number=123, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_public_key_type_not_allowed', full_name='zsearch.Lints.e_public_key_type_not_allowed', index=119,
number=124, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_root_ca_basic_constraints_path_len_constraint_field_present', full_name='zsearch.Lints.w_root_ca_basic_constraints_path_len_constraint_field_present', index=120,
number=125, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_root_ca_contains_cert_policy', full_name='zsearch.Lints.w_root_ca_contains_cert_policy', index=121,
number=126, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_root_ca_extended_key_usage_present', full_name='zsearch.Lints.e_root_ca_extended_key_usage_present', index=122,
number=127, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_rsa_exp_negative', full_name='zsearch.Lints.e_rsa_exp_negative', index=123,
number=128, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_rsa_mod_factors_smaller_than_752', full_name='zsearch.Lints.w_rsa_mod_factors_smaller_than_752', index=124,
number=129, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_rsa_mod_less_than_2048_bits', full_name='zsearch.Lints.e_rsa_mod_less_than_2048_bits', index=125,
number=130, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_rsa_mod_not_odd', full_name='zsearch.Lints.w_rsa_mod_not_odd', index=126,
number=131, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_rsa_public_exponent_not_in_range', full_name='zsearch.Lints.w_rsa_public_exponent_not_in_range', index=127,
number=132, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_rsa_public_exponent_not_odd', full_name='zsearch.Lints.e_rsa_public_exponent_not_odd', index=128,
number=133, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_rsa_public_exponent_too_small', full_name='zsearch.Lints.e_rsa_public_exponent_too_small', index=129,
number=134, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_san_dns_name_includes_null_char', full_name='zsearch.Lints.e_san_dns_name_includes_null_char', index=130,
number=135, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_san_dns_name_starts_with_period', full_name='zsearch.Lints.e_san_dns_name_starts_with_period', index=131,
number=136, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_san_iana_pub_suffix_empty', full_name='zsearch.Lints.w_san_iana_pub_suffix_empty', index=132,
number=137, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_serial_number_longer_than_20_octets', full_name='zsearch.Lints.e_serial_number_longer_than_20_octets', index=133,
number=138, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_serial_number_not_positive', full_name='zsearch.Lints.e_serial_number_not_positive', index=134,
number=139, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_sub_ca_aia_does_not_contain_issuing_ca_url', full_name='zsearch.Lints.w_sub_ca_aia_does_not_contain_issuing_ca_url', index=135,
number=140, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_ca_aia_does_not_contain_ocsp_url', full_name='zsearch.Lints.e_sub_ca_aia_does_not_contain_ocsp_url', index=136,
number=141, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_ca_aia_missing', full_name='zsearch.Lints.e_sub_ca_aia_missing', index=137,
number=142, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_sub_ca_certificate_policies_marked_critical', full_name='zsearch.Lints.w_sub_ca_certificate_policies_marked_critical', index=138,
number=143, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_ca_certificate_policies_missing', full_name='zsearch.Lints.e_sub_ca_certificate_policies_missing', index=139,
number=144, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_ca_crl_distribution_points_does_not_contain_url', full_name='zsearch.Lints.e_sub_ca_crl_distribution_points_does_not_contain_url', index=140,
number=145, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_ca_crl_distribution_points_marked_critical', full_name='zsearch.Lints.e_sub_ca_crl_distribution_points_marked_critical', index=141,
number=146, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_ca_crl_distribution_points_missing', full_name='zsearch.Lints.e_sub_ca_crl_distribution_points_missing', index=142,
number=147, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_sub_ca_eku_critical', full_name='zsearch.Lints.w_sub_ca_eku_critical', index=143,
number=148, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_sub_ca_name_constraints_not_critical', full_name='zsearch.Lints.w_sub_ca_name_constraints_not_critical', index=144,
number=149, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_aia_does_not_contain_ocsp_url', full_name='zsearch.Lints.e_sub_cert_aia_does_not_contain_ocsp_url', index=145,
number=153, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_aia_missing', full_name='zsearch.Lints.e_sub_cert_aia_missing', index=146,
number=154, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_cert_policy_empty', full_name='zsearch.Lints.e_sub_cert_cert_policy_empty', index=147,
number=155, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_sub_cert_certificate_policies_marked_critical', full_name='zsearch.Lints.w_sub_cert_certificate_policies_marked_critical', index=148,
number=156, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_crl_distribution_points_does_not_contain_url', full_name='zsearch.Lints.e_sub_cert_crl_distribution_points_does_not_contain_url', index=149,
number=157, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_crl_distribution_points_marked_critical', full_name='zsearch.Lints.e_sub_cert_crl_distribution_points_marked_critical', index=150,
number=158, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_sub_cert_eku_extra_values', full_name='zsearch.Lints.w_sub_cert_eku_extra_values', index=151,
number=159, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_eku_missing', full_name='zsearch.Lints.e_sub_cert_eku_missing', index=152,
number=160, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_eku_server_auth_client_auth_missing', full_name='zsearch.Lints.e_sub_cert_eku_server_auth_client_auth_missing', index=153,
number=161, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_key_usage_cert_sign_bit_set', full_name='zsearch.Lints.e_sub_cert_key_usage_cert_sign_bit_set', index=154,
number=162, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_or_sub_ca_using_sha1', full_name='zsearch.Lints.e_sub_cert_or_sub_ca_using_sha1', index=155,
number=163, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_sub_cert_sha1_expiration_too_long', full_name='zsearch.Lints.w_sub_cert_sha1_expiration_too_long', index=156,
number=164, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='n_subject_common_name_included', full_name='zsearch.Lints.n_subject_common_name_included', index=157,
number=166, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_common_name_not_from_san', full_name='zsearch.Lints.e_subject_common_name_not_from_san', index=158,
number=167, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_contains_noninformational_value', full_name='zsearch.Lints.e_subject_contains_noninformational_value', index=159,
number=168, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_contains_reserved_ip', full_name='zsearch.Lints.e_subject_contains_reserved_ip', index=160,
number=169, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_country_not_iso', full_name='zsearch.Lints.e_subject_country_not_iso', index=161,
number=170, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_empty_without_san', full_name='zsearch.Lints.e_subject_empty_without_san', index=162,
number=171, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_info_access_marked_critical', full_name='zsearch.Lints.e_subject_info_access_marked_critical', index=163,
number=172, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_not_dn', full_name='zsearch.Lints.e_subject_not_dn', index=164,
number=174, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_utc_time_does_not_include_seconds', full_name='zsearch.Lints.e_utc_time_does_not_include_seconds', index=165,
number=180, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_utc_time_not_in_zulu', full_name='zsearch.Lints.e_utc_time_not_in_zulu', index=166,
number=181, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_validity_time_not_positive', full_name='zsearch.Lints.e_validity_time_not_positive', index=167,
number=182, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_wrong_time_format_pre2050', full_name='zsearch.Lints.e_wrong_time_format_pre2050', index=168,
number=183, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_rsa_no_public_key', full_name='zsearch.Lints.e_rsa_no_public_key', index=169,
number=184, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_certificate_policies_missing', full_name='zsearch.Lints.e_sub_cert_certificate_policies_missing', index=170,
number=185, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_key_usage_crl_sign_bit_set', full_name='zsearch.Lints.e_sub_cert_key_usage_crl_sign_bit_set', index=171,
number=186, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_common_name_max_length', full_name='zsearch.Lints.e_subject_common_name_max_length', index=172,
number=187, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_locality_name_max_length', full_name='zsearch.Lints.e_subject_locality_name_max_length', index=173,
number=188, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_organization_name_max_length', full_name='zsearch.Lints.e_subject_organization_name_max_length', index=174,
number=189, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_organizational_unit_name_max_length', full_name='zsearch.Lints.e_subject_organizational_unit_name_max_length', index=175,
number=190, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_subject_state_name_max_length', full_name='zsearch.Lints.e_subject_state_name_max_length', index=176,
number=191, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_multiple_subject_rdn', full_name='zsearch.Lints.w_multiple_subject_rdn', index=177,
number=192, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_multiple_issuer_rdn', full_name='zsearch.Lints.w_multiple_issuer_rdn', index=178,
number=193, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_issuer_dn_trailing_whitespace', full_name='zsearch.Lints.w_issuer_dn_trailing_whitespace', index=179,
number=194, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_issuer_dn_leading_whitespace', full_name='zsearch.Lints.w_issuer_dn_leading_whitespace', index=180,
number=195, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_subject_dn_trailing_whitespace', full_name='zsearch.Lints.w_subject_dn_trailing_whitespace', index=181,
number=196, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_subject_dn_leading_whitespace', full_name='zsearch.Lints.w_subject_dn_leading_whitespace', index=182,
number=197, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_locality_name_must_appear', full_name='zsearch.Lints.e_sub_cert_locality_name_must_appear', index=183,
number=198, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_signature_algorithm_not_supported', full_name='zsearch.Lints.e_signature_algorithm_not_supported', index=184,
number=199, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dnsname_hyphen_in_sld', full_name='zsearch.Lints.e_dnsname_hyphen_in_sld', index=185,
number=200, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dsa_correct_order_in_subgroup', full_name='zsearch.Lints.e_dsa_correct_order_in_subgroup', index=186,
number=201, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='n_sub_ca_eku_not_technically_constrained', full_name='zsearch.Lints.n_sub_ca_eku_not_technically_constrained', index=187,
number=202, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dnsname_empty_label', full_name='zsearch.Lints.e_dnsname_empty_label', index=188,
number=203, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ca_common_name_missing', full_name='zsearch.Lints.e_ca_common_name_missing', index=189,
number=204, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dnsname_wildcard_only_in_left_label', full_name='zsearch.Lints.e_dnsname_wildcard_only_in_left_label', index=190,
number=205, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_valid_time_too_long', full_name='zsearch.Lints.e_sub_cert_valid_time_too_long', index=191,
number=206, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dnsname_left_label_wildcard_correct', full_name='zsearch.Lints.e_dnsname_left_label_wildcard_correct', index=192,
number=207, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_serial_number_low_entropy', full_name='zsearch.Lints.w_serial_number_low_entropy', index=193,
number=208, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dnsname_label_too_long', full_name='zsearch.Lints.e_dnsname_label_too_long', index=194,
number=209, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_root_ca_key_usage_present', full_name='zsearch.Lints.e_root_ca_key_usage_present', index=195,
number=210, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_dnsname_wildcard_left_of_public_suffix', full_name='zsearch.Lints.w_dnsname_wildcard_left_of_public_suffix', index=196,
number=211, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_international_dns_name_not_unicode', full_name='zsearch.Lints.e_international_dns_name_not_unicode', index=197,
number=212, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_dnsname_underscore_in_trd', full_name='zsearch.Lints.w_dnsname_underscore_in_trd', index=198,
number=213, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='w_sub_cert_aia_does_not_contain_issuing_ca_url', full_name='zsearch.Lints.w_sub_cert_aia_does_not_contain_issuing_ca_url', index=199,
number=214, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_locality_name_must_not_appear', full_name='zsearch.Lints.e_sub_cert_locality_name_must_not_appear', index=200,
number=215, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_country_name_must_appear', full_name='zsearch.Lints.e_sub_cert_country_name_must_appear', index=201,
number=216, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dnsname_bad_character_in_label', full_name='zsearch.Lints.e_dnsname_bad_character_in_label', index=202,
number=217, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_ca_must_not_contain_any_policy', full_name='zsearch.Lints.e_sub_ca_must_not_contain_any_policy', index=203,
number=218, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_international_dns_name_not_nfkc', full_name='zsearch.Lints.e_international_dns_name_not_nfkc', index=204,
number=219, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_aia_marked_critical', full_name='zsearch.Lints.e_sub_cert_aia_marked_critical', index=205,
number=220, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ca_is_ca', full_name='zsearch.Lints.e_ca_is_ca', index=206,
number=221, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_street_address_should_not_exist', full_name='zsearch.Lints.e_sub_cert_street_address_should_not_exist', index=207,
number=222, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_ca_eku_missing', full_name='zsearch.Lints.e_sub_ca_eku_missing', index=208,
number=223, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_province_must_not_appear', full_name='zsearch.Lints.e_sub_cert_province_must_not_appear', index=209,
number=224, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dnsname_underscore_in_sld', full_name='zsearch.Lints.e_dnsname_underscore_in_sld', index=210,
number=225, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_ca_eku_name_constraints', full_name='zsearch.Lints.e_sub_ca_eku_name_constraints', index=211,
number=226, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_not_is_ca', full_name='zsearch.Lints.e_sub_cert_not_is_ca', index=212,
number=227, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dsa_unique_correct_representation', full_name='zsearch.Lints.e_dsa_unique_correct_representation', index=213,
number=228, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_province_must_appear', full_name='zsearch.Lints.e_sub_cert_province_must_appear', index=214,
number=229, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_root_ca_key_usage_must_be_critical', full_name='zsearch.Lints.e_root_ca_key_usage_must_be_critical', index=215,
number=230, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_ext_san_dns_name_too_long', full_name='zsearch.Lints.e_ext_san_dns_name_too_long', index=216,
number=231, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dsa_params_missing', full_name='zsearch.Lints.e_dsa_params_missing', index=217,
number=232, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_ca_aia_marked_critical', full_name='zsearch.Lints.e_sub_ca_aia_marked_critical', index=218,
number=233, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_given_name_surname_contains_correct_policy', full_name='zsearch.Lints.e_sub_cert_given_name_surname_contains_correct_policy', index=219,
number=234, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_sub_cert_postal_code_must_not_appear', full_name='zsearch.Lints.e_sub_cert_postal_code_must_not_appear', index=220,
number=235, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dnsname_not_valid_tld', full_name='zsearch.Lints.e_dnsname_not_valid_tld', index=221,
number=236, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='n_contains_redacted_dnsname', full_name='zsearch.Lints.n_contains_redacted_dnsname', index=222,
number=237, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='e_dnsname_contains_bare_iana_suffix', full_name='zsearch.Lints.e_dnsname_contains_bare_iana_suffix', index=223,
number=238, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=336,
serialized_end=14496,
)
_LINTRESULT.fields_by_name['result'].enum_type = _LINTRESULTSTATUS
_ZLINT.fields_by_name['status'].enum_type = _ZLINTSTATUS
_ZLINT.fields_by_name['lints'].message_type = _LINTS
_LINTS.fields_by_name['e_basic_constraints_not_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ian_bare_wildcard'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ian_wildcard_not_first'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_san_bare_wildcard'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_san_wildcard_not_first'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ca_country_name_invalid'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ca_country_name_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ca_crl_sign_not_set'].message_type = _LINTRESULT
_LINTS.fields_by_name['n_ca_digital_signature_not_set'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ca_key_cert_sign_not_set'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ca_key_usage_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ca_key_usage_not_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ca_organization_name_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ca_subject_field_empty'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cert_contains_unique_identifier'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cert_extensions_version_not_3'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cab_dv_conflicts_with_locality'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cab_dv_conflicts_with_org'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cab_dv_conflicts_with_postal'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cab_dv_conflicts_with_province'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cab_dv_conflicts_with_street'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cert_policy_iv_requires_country'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cert_policy_iv_requires_province_or_locality'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cert_policy_ov_requires_country'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cert_policy_ov_requires_province_or_locality'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cab_ov_requires_org'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cab_iv_requires_personal_name'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_cert_unique_identifier_version_not_2_or_3'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_distribution_point_incomplete'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_distribution_point_missing_ldap_or_uri'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dsa_improper_modulus_or_divisor_size'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dsa_shorter_than_2048_bits'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ec_improper_curves'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_eku_critical_improperly'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ev_business_category_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ev_country_name_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ev_locality_name_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ev_organization_name_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ev_serial_number_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ev_valid_time_too_long'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_aia_access_location_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_aia_marked_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_authority_key_identifier_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_authority_key_identifier_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_authority_key_identifier_no_key_identifier'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_cert_policy_contains_noticeref'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_cert_policy_disallowed_any_policy_qualifier'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_cert_policy_duplicate'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_cert_policy_explicit_text_ia5_string'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_cert_policy_explicit_text_includes_control'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_cert_policy_explicit_text_not_nfc'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_cert_policy_explicit_text_not_utf8'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_cert_policy_explicit_text_too_long'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_crl_distribution_marked_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_duplicate_extension'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_freshest_crl_marked_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_ian_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_ian_dns_not_ia5_string'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_ian_empty_name'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_ian_no_entries'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_ian_rfc822_format_invalid'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_ian_space_dns_name'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_ian_uri_format_invalid'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_ian_uri_host_not_fqdn_or_ip'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_ian_uri_not_ia5'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_ian_uri_relative'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_key_usage_cert_sign_without_ca'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_key_usage_not_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_key_usage_without_bits'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_name_constraints_not_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_name_constraints_not_in_ca'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_policy_constraints_empty'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_policy_constraints_not_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_policy_map_any_policy'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_policy_map_not_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_policy_map_not_in_cert_policy'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_contains_reserved_ip'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_san_critical_with_subject_dn'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_directory_name_present'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_dns_not_ia5_string'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_edi_party_name_present'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_empty_name'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_no_entries'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_not_critical_without_subject'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_other_name_present'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_registered_id_present'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_rfc822_format_invalid'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_rfc822_name_present'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_space_dns_name'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_uniform_resource_identifier_present'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_uri_format_invalid'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_uri_host_not_fqdn_or_ip'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_uri_not_ia5'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_uri_relative'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_subject_directory_attr_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_subject_key_identifier_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_subject_key_identifier_missing_ca'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ext_subject_key_identifier_missing_sub_cert'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_generalized_time_does_not_include_seconds'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_generalized_time_includes_fraction_seconds'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_generalized_time_not_in_zulu'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ian_dns_name_includes_null_char'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ian_dns_name_starts_with_period'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_ian_iana_pub_suffix_empty'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_inhibit_any_policy_not_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_invalid_certificate_version'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_issuer_field_empty'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_name_constraint_empty'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_name_constraint_maximum_not_absent'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_name_constraint_minimum_non_zero'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_name_constraint_on_edi_party_name'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_name_constraint_on_registered_id'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_name_constraint_on_x400'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_old_root_ca_rsa_mod_less_than_2048_bits'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_old_sub_ca_rsa_mod_less_than_1024_bits'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_old_sub_cert_rsa_mod_less_than_1024_bits'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_path_len_constraint_improperly_included'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_path_len_constraint_zero_or_less'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_public_key_type_not_allowed'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_root_ca_basic_constraints_path_len_constraint_field_present'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_root_ca_contains_cert_policy'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_root_ca_extended_key_usage_present'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_rsa_exp_negative'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_rsa_mod_factors_smaller_than_752'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_rsa_mod_less_than_2048_bits'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_rsa_mod_not_odd'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_rsa_public_exponent_not_in_range'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_rsa_public_exponent_not_odd'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_rsa_public_exponent_too_small'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_san_dns_name_includes_null_char'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_san_dns_name_starts_with_period'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_san_iana_pub_suffix_empty'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_serial_number_longer_than_20_octets'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_serial_number_not_positive'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_sub_ca_aia_does_not_contain_issuing_ca_url'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_ca_aia_does_not_contain_ocsp_url'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_ca_aia_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_sub_ca_certificate_policies_marked_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_ca_certificate_policies_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_ca_crl_distribution_points_does_not_contain_url'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_ca_crl_distribution_points_marked_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_ca_crl_distribution_points_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_sub_ca_eku_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_sub_ca_name_constraints_not_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_aia_does_not_contain_ocsp_url'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_aia_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_cert_policy_empty'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_sub_cert_certificate_policies_marked_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_crl_distribution_points_does_not_contain_url'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_crl_distribution_points_marked_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_sub_cert_eku_extra_values'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_eku_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_eku_server_auth_client_auth_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_key_usage_cert_sign_bit_set'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_or_sub_ca_using_sha1'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_sub_cert_sha1_expiration_too_long'].message_type = _LINTRESULT
_LINTS.fields_by_name['n_subject_common_name_included'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_common_name_not_from_san'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_contains_noninformational_value'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_contains_reserved_ip'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_country_not_iso'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_empty_without_san'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_info_access_marked_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_not_dn'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_utc_time_does_not_include_seconds'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_utc_time_not_in_zulu'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_validity_time_not_positive'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_wrong_time_format_pre2050'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_rsa_no_public_key'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_certificate_policies_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_key_usage_crl_sign_bit_set'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_common_name_max_length'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_locality_name_max_length'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_organization_name_max_length'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_organizational_unit_name_max_length'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_subject_state_name_max_length'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_multiple_subject_rdn'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_multiple_issuer_rdn'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_issuer_dn_trailing_whitespace'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_issuer_dn_leading_whitespace'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_subject_dn_trailing_whitespace'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_subject_dn_leading_whitespace'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_locality_name_must_appear'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_signature_algorithm_not_supported'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dnsname_hyphen_in_sld'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dsa_correct_order_in_subgroup'].message_type = _LINTRESULT
_LINTS.fields_by_name['n_sub_ca_eku_not_technically_constrained'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dnsname_empty_label'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ca_common_name_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dnsname_wildcard_only_in_left_label'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_valid_time_too_long'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dnsname_left_label_wildcard_correct'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_serial_number_low_entropy'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dnsname_label_too_long'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_root_ca_key_usage_present'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_dnsname_wildcard_left_of_public_suffix'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_international_dns_name_not_unicode'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_dnsname_underscore_in_trd'].message_type = _LINTRESULT
_LINTS.fields_by_name['w_sub_cert_aia_does_not_contain_issuing_ca_url'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_locality_name_must_not_appear'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_country_name_must_appear'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dnsname_bad_character_in_label'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_ca_must_not_contain_any_policy'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_international_dns_name_not_nfkc'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_aia_marked_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ca_is_ca'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_street_address_should_not_exist'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_ca_eku_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_province_must_not_appear'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dnsname_underscore_in_sld'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_ca_eku_name_constraints'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_not_is_ca'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dsa_unique_correct_representation'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_province_must_appear'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_root_ca_key_usage_must_be_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_ext_san_dns_name_too_long'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dsa_params_missing'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_ca_aia_marked_critical'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_given_name_surname_contains_correct_policy'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_sub_cert_postal_code_must_not_appear'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dnsname_not_valid_tld'].message_type = _LINTRESULT
_LINTS.fields_by_name['n_contains_redacted_dnsname'].message_type = _LINTRESULT
_LINTS.fields_by_name['e_dnsname_contains_bare_iana_suffix'].message_type = _LINTRESULT
DESCRIPTOR.message_types_by_name['LintResult'] = _LINTRESULT
DESCRIPTOR.message_types_by_name['ZLint'] = _ZLINT
DESCRIPTOR.message_types_by_name['Lints'] = _LINTS
DESCRIPTOR.enum_types_by_name['LintResultStatus'] = _LINTRESULTSTATUS
DESCRIPTOR.enum_types_by_name['ZLintStatus'] = _ZLINTSTATUS
LintResult = _reflection.GeneratedProtocolMessageType('LintResult', (_message.Message,), dict(
DESCRIPTOR = _LINTRESULT,
__module__ = 'zlint_pb2'
# @@protoc_insertion_point(class_scope:zsearch.LintResult)
))
_sym_db.RegisterMessage(LintResult)
ZLint = _reflection.GeneratedProtocolMessageType('ZLint', (_message.Message,), dict(
DESCRIPTOR = _ZLINT,
__module__ = 'zlint_pb2'
# @@protoc_insertion_point(class_scope:zsearch.ZLint)
))
_sym_db.RegisterMessage(ZLint)
Lints = _reflection.GeneratedProtocolMessageType('Lints', (_message.Message,), dict(
DESCRIPTOR = _LINTS,
__module__ = 'zlint_pb2'
# @@protoc_insertion_point(class_scope:zsearch.Lints)
))
_sym_db.RegisterMessage(Lints)
# @@protoc_insertion_point(module_scope) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/zlint_pb2.py | zlint_pb2.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='caa.proto',
package='zsearch',
syntax='proto3',
serialized_pb=_b('\n\tcaa.proto\x12\x07zsearch\"D\n\x0b\x43\x41\x41TagValue\x12\x0c\n\x04\x66lag\x18\x01 \x01(\r\x12\x0b\n\x03tag\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\x12\x0b\n\x03ttl\x18\x04 \x01(\r\"k\n\tCAARecord\x12\x0e\n\x06\x64omain\x18\x01 \x01(\t\x12(\n\x06result\x18\x02 \x01(\x0e\x32\x18.zsearch.CAADomainStatus\x12$\n\x06values\x18\x03 \x03(\x0b\x32\x14.zsearch.CAATagValue\"g\n\tCAALookup\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12#\n\x07records\x18\x02 \x03(\x0b\x32\x12.zsearch.CAARecord\x12\"\n\x06result\x18\x03 \x01(\x0e\x32\x12.zsearch.CAAResult*\xb2\x01\n\tCAAResult\x12\x17\n\x13\x43\x41\x41_RESULT_RESERVED\x10\x00\x12!\n\x1d\x43\x41\x41_RESULT_VALIDATION_SUCCESS\x10\x01\x12\x1e\n\x1a\x43\x41\x41_RESULT_VALIDATION_FAIL\x10\x02\x12!\n\x1d\x43\x41\x41_RESULT_VALIDATION_SKIPPED\x10\x03\x12&\n\"CAA_RESULT_VALIDATION_NOT_REQUIRED\x10\x04*\xa9\x05\n\x0f\x43\x41\x41\x44omainStatus\x12\x1e\n\x1a\x43\x41\x41_DOMAIN_STATUS_RESERVED\x10\x00\x12(\n$CAA_DOMAIN_STATUS_VALIDATION_SUCCESS\x10\x01\x12%\n!CAA_DOMAIN_STATUS_VALIDATION_FAIL\x10\x02\x12(\n$CAA_DOMAIN_STATUS_VALIDATION_SKIPPED\x10\x03\x12\x1f\n\x1b\x43\x41\x41_DOMAIN_STATUS_DNS_ERROR\x10\x05\x12(\n$CAA_DOMAIN_STATUS_DNS_ERROR_SERVFAIL\x10\x06\x12(\n$CAA_DOMAIN_STATUS_DNS_ERROR_AUTHFAIL\x10\x07\x12)\n%CAA_DOMAIN_STATUS_DNS_ERROR_NO_RECORD\x10\x08\x12)\n%CAA_DOMAIN_STATUS_DNS_ERROR_BLACKLIST\x10\t\x12)\n%CAA_DOMAIN_STATUS_DNS_ERROR_NO_OUTPUT\x10\n\x12)\n%CAA_DOMAIN_STATUS_DNS_ERROR_NO_ANSWER\x10\x0b\x12-\n)CAA_DOMAIN_STATUS_DNS_ERROR_ILLEGAL_INPUT\x10\x0c\x12\'\n#CAA_DOMAIN_STATUS_DNS_ERROR_TIMEOUT\x10\r\x12,\n(CAA_DOMAIN_STATUS_DNS_ERROR_ITER_TIMEOUT\x10\x0e\x12)\n%CAA_DOMAIN_STATUS_DNS_ERROR_TEMPORARY\x10\x0f\x12)\n%CAA_DOMAIN_STATUS_DNS_ERROR_TRUNCATED\x10\x10\x62\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_CAARESULT = _descriptor.EnumDescriptor(
name='CAAResult',
full_name='zsearch.CAAResult',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='CAA_RESULT_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_RESULT_VALIDATION_SUCCESS', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_RESULT_VALIDATION_FAIL', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_RESULT_VALIDATION_SKIPPED', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_RESULT_VALIDATION_NOT_REQUIRED', index=4, number=4,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=307,
serialized_end=485,
)
_sym_db.RegisterEnumDescriptor(_CAARESULT)
CAAResult = enum_type_wrapper.EnumTypeWrapper(_CAARESULT)
_CAADOMAINSTATUS = _descriptor.EnumDescriptor(
name='CAADomainStatus',
full_name='zsearch.CAADomainStatus',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_VALIDATION_SUCCESS', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_VALIDATION_FAIL', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_VALIDATION_SKIPPED', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR', index=4, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR_SERVFAIL', index=5, number=6,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR_AUTHFAIL', index=6, number=7,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR_NO_RECORD', index=7, number=8,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR_BLACKLIST', index=8, number=9,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR_NO_OUTPUT', index=9, number=10,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR_NO_ANSWER', index=10, number=11,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR_ILLEGAL_INPUT', index=11, number=12,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR_TIMEOUT', index=12, number=13,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR_ITER_TIMEOUT', index=13, number=14,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR_TEMPORARY', index=14, number=15,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CAA_DOMAIN_STATUS_DNS_ERROR_TRUNCATED', index=15, number=16,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=488,
serialized_end=1169,
)
_sym_db.RegisterEnumDescriptor(_CAADOMAINSTATUS)
CAADomainStatus = enum_type_wrapper.EnumTypeWrapper(_CAADOMAINSTATUS)
CAA_RESULT_RESERVED = 0
CAA_RESULT_VALIDATION_SUCCESS = 1
CAA_RESULT_VALIDATION_FAIL = 2
CAA_RESULT_VALIDATION_SKIPPED = 3
CAA_RESULT_VALIDATION_NOT_REQUIRED = 4
CAA_DOMAIN_STATUS_RESERVED = 0
CAA_DOMAIN_STATUS_VALIDATION_SUCCESS = 1
CAA_DOMAIN_STATUS_VALIDATION_FAIL = 2
CAA_DOMAIN_STATUS_VALIDATION_SKIPPED = 3
CAA_DOMAIN_STATUS_DNS_ERROR = 5
CAA_DOMAIN_STATUS_DNS_ERROR_SERVFAIL = 6
CAA_DOMAIN_STATUS_DNS_ERROR_AUTHFAIL = 7
CAA_DOMAIN_STATUS_DNS_ERROR_NO_RECORD = 8
CAA_DOMAIN_STATUS_DNS_ERROR_BLACKLIST = 9
CAA_DOMAIN_STATUS_DNS_ERROR_NO_OUTPUT = 10
CAA_DOMAIN_STATUS_DNS_ERROR_NO_ANSWER = 11
CAA_DOMAIN_STATUS_DNS_ERROR_ILLEGAL_INPUT = 12
CAA_DOMAIN_STATUS_DNS_ERROR_TIMEOUT = 13
CAA_DOMAIN_STATUS_DNS_ERROR_ITER_TIMEOUT = 14
CAA_DOMAIN_STATUS_DNS_ERROR_TEMPORARY = 15
CAA_DOMAIN_STATUS_DNS_ERROR_TRUNCATED = 16
_CAATAGVALUE = _descriptor.Descriptor(
name='CAATagValue',
full_name='zsearch.CAATagValue',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='flag', full_name='zsearch.CAATagValue.flag', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='tag', full_name='zsearch.CAATagValue.tag', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='value', full_name='zsearch.CAATagValue.value', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='ttl', full_name='zsearch.CAATagValue.ttl', index=3,
number=4, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=22,
serialized_end=90,
)
_CAARECORD = _descriptor.Descriptor(
name='CAARecord',
full_name='zsearch.CAARecord',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='domain', full_name='zsearch.CAARecord.domain', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='result', full_name='zsearch.CAARecord.result', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='values', full_name='zsearch.CAARecord.values', index=2,
number=3, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=92,
serialized_end=199,
)
_CAALOOKUP = _descriptor.Descriptor(
name='CAALookup',
full_name='zsearch.CAALookup',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='timestamp', full_name='zsearch.CAALookup.timestamp', index=0,
number=1, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='records', full_name='zsearch.CAALookup.records', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='result', full_name='zsearch.CAALookup.result', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=201,
serialized_end=304,
)
_CAARECORD.fields_by_name['result'].enum_type = _CAADOMAINSTATUS
_CAARECORD.fields_by_name['values'].message_type = _CAATAGVALUE
_CAALOOKUP.fields_by_name['records'].message_type = _CAARECORD
_CAALOOKUP.fields_by_name['result'].enum_type = _CAARESULT
DESCRIPTOR.message_types_by_name['CAATagValue'] = _CAATAGVALUE
DESCRIPTOR.message_types_by_name['CAARecord'] = _CAARECORD
DESCRIPTOR.message_types_by_name['CAALookup'] = _CAALOOKUP
DESCRIPTOR.enum_types_by_name['CAAResult'] = _CAARESULT
DESCRIPTOR.enum_types_by_name['CAADomainStatus'] = _CAADOMAINSTATUS
CAATagValue = _reflection.GeneratedProtocolMessageType('CAATagValue', (_message.Message,), dict(
DESCRIPTOR = _CAATAGVALUE,
__module__ = 'caa_pb2'
# @@protoc_insertion_point(class_scope:zsearch.CAATagValue)
))
_sym_db.RegisterMessage(CAATagValue)
CAARecord = _reflection.GeneratedProtocolMessageType('CAARecord', (_message.Message,), dict(
DESCRIPTOR = _CAARECORD,
__module__ = 'caa_pb2'
# @@protoc_insertion_point(class_scope:zsearch.CAARecord)
))
_sym_db.RegisterMessage(CAARecord)
CAALookup = _reflection.GeneratedProtocolMessageType('CAALookup', (_message.Message,), dict(
DESCRIPTOR = _CAALOOKUP,
__module__ = 'caa_pb2'
# @@protoc_insertion_point(class_scope:zsearch.CAALookup)
))
_sym_db.RegisterMessage(CAALookup)
# @@protoc_insertion_point(module_scope) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/caa_pb2.py | caa_pb2.py |
import grpc
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
import anonstore_pb2 as anonstore__pb2
import hoststore_pb2 as hoststore__pb2
import rpc_pb2 as rpc__pb2
class AdminServiceStub(object):
"""Two gRPC interfaces. One from
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Shutdown = channel.unary_unary(
'/zsearch.AdminService/Shutdown',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.Status = channel.unary_unary(
'/zsearch.AdminService/Status',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.Statistics = channel.unary_unary(
'/zsearch.AdminService/Statistics',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.PruneIPv4 = channel.unary_unary(
'/zsearch.AdminService/PruneIPv4',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.PruneDomain = channel.unary_unary(
'/zsearch.AdminService/PruneDomain',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.UpdateASData = channel.unary_unary(
'/zsearch.AdminService/UpdateASData',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.UpdateLocationData = channel.unary_unary(
'/zsearch.AdminService/UpdateLocationData',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.ValidateCertificates = channel.unary_unary(
'/zsearch.AdminService/ValidateCertificates',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.FixCertificateSource = channel.unary_unary(
'/zsearch.AdminService/FixCertificateSource',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.DumpIPv4ToJSON = channel.unary_unary(
'/zsearch.AdminService/DumpIPv4ToJSON',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.DumpDomainToJSON = channel.unary_unary(
'/zsearch.AdminService/DumpDomainToJSON',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.DumpCertificatesToJSON = channel.unary_unary(
'/zsearch.AdminService/DumpCertificatesToJSON',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.DumpKeysToJSON = channel.unary_unary(
'/zsearch.AdminService/DumpKeysToJSON',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.RegenerateIPv4Deltas = channel.unary_unary(
'/zsearch.AdminService/RegenerateIPv4Deltas',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.RegenerateDomainDeltas = channel.unary_unary(
'/zsearch.AdminService/RegenerateDomainDeltas',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.RegenerateCertificateDeltas = channel.unary_unary(
'/zsearch.AdminService/RegenerateCertificateDeltas',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.RegenerateSingleCertificateDelta = channel.unary_unary(
'/zsearch.AdminService/RegenerateSingleCertificateDelta',
request_serializer=rpc__pb2.AnonymousQuery.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.ReprocessCertificates = channel.unary_unary(
'/zsearch.AdminService/ReprocessCertificates',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.ReprocessSingleCertificate = channel.unary_unary(
'/zsearch.AdminService/ReprocessSingleCertificate',
request_serializer=rpc__pb2.AnonymousQuery.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.Ping = channel.unary_unary(
'/zsearch.AdminService/Ping',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
class AdminServiceServicer(object):
"""Two gRPC interfaces. One from
"""
def Shutdown(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Status(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Statistics(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PruneIPv4(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PruneDomain(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateASData(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateLocationData(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ValidateCertificates(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def FixCertificateSource(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DumpIPv4ToJSON(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DumpDomainToJSON(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DumpCertificatesToJSON(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DumpKeysToJSON(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RegenerateIPv4Deltas(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RegenerateDomainDeltas(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RegenerateCertificateDeltas(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RegenerateSingleCertificateDelta(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ReprocessCertificates(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ReprocessSingleCertificate(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Ping(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_AdminServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'Shutdown': grpc.unary_unary_rpc_method_handler(
servicer.Shutdown,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'Status': grpc.unary_unary_rpc_method_handler(
servicer.Status,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'Statistics': grpc.unary_unary_rpc_method_handler(
servicer.Statistics,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'PruneIPv4': grpc.unary_unary_rpc_method_handler(
servicer.PruneIPv4,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'PruneDomain': grpc.unary_unary_rpc_method_handler(
servicer.PruneDomain,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'UpdateASData': grpc.unary_unary_rpc_method_handler(
servicer.UpdateASData,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'UpdateLocationData': grpc.unary_unary_rpc_method_handler(
servicer.UpdateLocationData,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'ValidateCertificates': grpc.unary_unary_rpc_method_handler(
servicer.ValidateCertificates,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'FixCertificateSource': grpc.unary_unary_rpc_method_handler(
servicer.FixCertificateSource,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'DumpIPv4ToJSON': grpc.unary_unary_rpc_method_handler(
servicer.DumpIPv4ToJSON,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'DumpDomainToJSON': grpc.unary_unary_rpc_method_handler(
servicer.DumpDomainToJSON,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'DumpCertificatesToJSON': grpc.unary_unary_rpc_method_handler(
servicer.DumpCertificatesToJSON,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'DumpKeysToJSON': grpc.unary_unary_rpc_method_handler(
servicer.DumpKeysToJSON,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'RegenerateIPv4Deltas': grpc.unary_unary_rpc_method_handler(
servicer.RegenerateIPv4Deltas,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'RegenerateDomainDeltas': grpc.unary_unary_rpc_method_handler(
servicer.RegenerateDomainDeltas,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'RegenerateCertificateDeltas': grpc.unary_unary_rpc_method_handler(
servicer.RegenerateCertificateDeltas,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'RegenerateSingleCertificateDelta': grpc.unary_unary_rpc_method_handler(
servicer.RegenerateSingleCertificateDelta,
request_deserializer=rpc__pb2.AnonymousQuery.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'ReprocessCertificates': grpc.unary_unary_rpc_method_handler(
servicer.ReprocessCertificates,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'ReprocessSingleCertificate': grpc.unary_unary_rpc_method_handler(
servicer.ReprocessSingleCertificate,
request_deserializer=rpc__pb2.AnonymousQuery.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'Ping': grpc.unary_unary_rpc_method_handler(
servicer.Ping,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'zsearch.AdminService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class QueryServiceStub(object):
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetHostIPv4Record = channel.unary_unary(
'/zsearch.QueryService/GetHostIPv4Record',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=rpc__pb2.HostQueryResponse.FromString,
)
self.PutHostIPv4Record = channel.unary_unary(
'/zsearch.QueryService/PutHostIPv4Record',
request_serializer=hoststore__pb2.Record.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.DelHostIPv4Record = channel.unary_unary(
'/zsearch.QueryService/DelHostIPv4Record',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.GetAllIPv4Records = channel.unary_unary(
'/zsearch.QueryService/GetAllIPv4Records',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=rpc__pb2.HostQueryResponse.FromString,
)
self.GetHostIPv4Delta = channel.unary_unary(
'/zsearch.QueryService/GetHostIPv4Delta',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.GetHostDomainRecord = channel.unary_unary(
'/zsearch.QueryService/GetHostDomainRecord',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=rpc__pb2.HostQueryResponse.FromString,
)
self.PutHostDomainRecord = channel.unary_unary(
'/zsearch.QueryService/PutHostDomainRecord',
request_serializer=hoststore__pb2.Record.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.DelHostDomainRecord = channel.unary_unary(
'/zsearch.QueryService/DelHostDomainRecord',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.GetAllDomainRecords = channel.unary_unary(
'/zsearch.QueryService/GetAllDomainRecords',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=rpc__pb2.HostQueryResponse.FromString,
)
self.GetHostDomainDelta = channel.unary_unary(
'/zsearch.QueryService/GetHostDomainDelta',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.GetCertificate = channel.unary_unary(
'/zsearch.QueryService/GetCertificate',
request_serializer=rpc__pb2.AnonymousQuery.SerializeToString,
response_deserializer=rpc__pb2.AnonymousQueryResponse.FromString,
)
self.UpsertCertificate = channel.unary_unary(
'/zsearch.QueryService/UpsertCertificate',
request_serializer=anonstore__pb2.AnonymousRecord.SerializeToString,
response_deserializer=anonstore__pb2.AnonymousDelta.FromString,
)
self.UpsertRawCertificate = channel.unary_unary(
'/zsearch.QueryService/UpsertRawCertificate',
request_serializer=anonstore__pb2.AnonymousRecord.SerializeToString,
response_deserializer=anonstore__pb2.AnonymousDelta.FromString,
)
self.GetCryptographicKey = channel.unary_unary(
'/zsearch.QueryService/GetCryptographicKey',
request_serializer=rpc__pb2.AnonymousQuery.SerializeToString,
response_deserializer=rpc__pb2.AnonymousQueryResponse.FromString,
)
self.UpsertCryptographicKey = channel.unary_unary(
'/zsearch.QueryService/UpsertCryptographicKey',
request_serializer=anonstore__pb2.AnonymousRecord.SerializeToString,
response_deserializer=anonstore__pb2.AnonymousDelta.FromString,
)
self.GetPublicLocation = channel.unary_unary(
'/zsearch.QueryService/GetPublicLocation',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.LocationAtom.FromString,
)
self.GetRestrictedLocation = channel.unary_unary(
'/zsearch.QueryService/GetRestrictedLocation',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.LocationAtom.FromString,
)
self.GetWHOIS = channel.unary_unary(
'/zsearch.QueryService/GetWHOIS',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Record.FromString,
)
self.GetUserMetadata = channel.unary_unary(
'/zsearch.QueryService/GetUserMetadata',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Record.FromString,
)
self.PutUserMetadata = channel.unary_unary(
'/zsearch.QueryService/PutUserMetadata',
request_serializer=hoststore__pb2.Record.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.GetRootStore = channel.unary_unary(
'/zsearch.QueryService/GetRootStore',
request_serializer=rpc__pb2.RootStoreQuery.SerializeToString,
response_deserializer=rpc__pb2.RootStoreReply.FromString,
)
class QueryServiceServicer(object):
def GetHostIPv4Record(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PutHostIPv4Record(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DelHostIPv4Record(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetAllIPv4Records(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetHostIPv4Delta(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetHostDomainRecord(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PutHostDomainRecord(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DelHostDomainRecord(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetAllDomainRecords(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetHostDomainDelta(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetCertificate(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpsertCertificate(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpsertRawCertificate(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetCryptographicKey(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpsertCryptographicKey(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetPublicLocation(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRestrictedLocation(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetWHOIS(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetUserMetadata(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PutUserMetadata(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRootStore(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_QueryServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetHostIPv4Record': grpc.unary_unary_rpc_method_handler(
servicer.GetHostIPv4Record,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=rpc__pb2.HostQueryResponse.SerializeToString,
),
'PutHostIPv4Record': grpc.unary_unary_rpc_method_handler(
servicer.PutHostIPv4Record,
request_deserializer=hoststore__pb2.Record.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'DelHostIPv4Record': grpc.unary_unary_rpc_method_handler(
servicer.DelHostIPv4Record,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'GetAllIPv4Records': grpc.unary_unary_rpc_method_handler(
servicer.GetAllIPv4Records,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=rpc__pb2.HostQueryResponse.SerializeToString,
),
'GetHostIPv4Delta': grpc.unary_unary_rpc_method_handler(
servicer.GetHostIPv4Delta,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'GetHostDomainRecord': grpc.unary_unary_rpc_method_handler(
servicer.GetHostDomainRecord,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=rpc__pb2.HostQueryResponse.SerializeToString,
),
'PutHostDomainRecord': grpc.unary_unary_rpc_method_handler(
servicer.PutHostDomainRecord,
request_deserializer=hoststore__pb2.Record.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'DelHostDomainRecord': grpc.unary_unary_rpc_method_handler(
servicer.DelHostDomainRecord,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'GetAllDomainRecords': grpc.unary_unary_rpc_method_handler(
servicer.GetAllDomainRecords,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=rpc__pb2.HostQueryResponse.SerializeToString,
),
'GetHostDomainDelta': grpc.unary_unary_rpc_method_handler(
servicer.GetHostDomainDelta,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'GetCertificate': grpc.unary_unary_rpc_method_handler(
servicer.GetCertificate,
request_deserializer=rpc__pb2.AnonymousQuery.FromString,
response_serializer=rpc__pb2.AnonymousQueryResponse.SerializeToString,
),
'UpsertCertificate': grpc.unary_unary_rpc_method_handler(
servicer.UpsertCertificate,
request_deserializer=anonstore__pb2.AnonymousRecord.FromString,
response_serializer=anonstore__pb2.AnonymousDelta.SerializeToString,
),
'UpsertRawCertificate': grpc.unary_unary_rpc_method_handler(
servicer.UpsertRawCertificate,
request_deserializer=anonstore__pb2.AnonymousRecord.FromString,
response_serializer=anonstore__pb2.AnonymousDelta.SerializeToString,
),
'GetCryptographicKey': grpc.unary_unary_rpc_method_handler(
servicer.GetCryptographicKey,
request_deserializer=rpc__pb2.AnonymousQuery.FromString,
response_serializer=rpc__pb2.AnonymousQueryResponse.SerializeToString,
),
'UpsertCryptographicKey': grpc.unary_unary_rpc_method_handler(
servicer.UpsertCryptographicKey,
request_deserializer=anonstore__pb2.AnonymousRecord.FromString,
response_serializer=anonstore__pb2.AnonymousDelta.SerializeToString,
),
'GetPublicLocation': grpc.unary_unary_rpc_method_handler(
servicer.GetPublicLocation,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.LocationAtom.SerializeToString,
),
'GetRestrictedLocation': grpc.unary_unary_rpc_method_handler(
servicer.GetRestrictedLocation,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.LocationAtom.SerializeToString,
),
'GetWHOIS': grpc.unary_unary_rpc_method_handler(
servicer.GetWHOIS,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Record.SerializeToString,
),
'GetUserMetadata': grpc.unary_unary_rpc_method_handler(
servicer.GetUserMetadata,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Record.SerializeToString,
),
'PutUserMetadata': grpc.unary_unary_rpc_method_handler(
servicer.PutUserMetadata,
request_deserializer=hoststore__pb2.Record.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'GetRootStore': grpc.unary_unary_rpc_method_handler(
servicer.GetRootStore,
request_deserializer=rpc__pb2.RootStoreQuery.FromString,
response_serializer=rpc__pb2.RootStoreReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'zsearch.QueryService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,)) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/search_pb2_grpc.py | search_pb2_grpc.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
import common_pb2 as common__pb2
import certificate_pb2 as certificate__pb2
import anonstore_pb2 as anonstore__pb2
import hoststore_pb2 as hoststore__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='rpc.proto',
package='zsearch',
syntax='proto3',
serialized_pb=_b('\n\trpc.proto\x12\x07zsearch\x1a\x0c\x63ommon.proto\x1a\x11\x63\x65rtificate.proto\x1a\x0f\x61nonstore.proto\x1a\x0fhoststore.proto\"D\n\tMinScanId\x12\"\n\x03key\x18\x01 \x01(\x0b\x32\x15.zsearch.AnonymousKey\x12\x13\n\x0bmin_scan_id\x18\x02 \x01(\r\"W\n\x12MozillaOneCRLEntry\x12\x0e\n\x06issuer\x18\x01 \x01(\x0c\x12\x0e\n\x06serial\x18\x02 \x01(\x0c\x12\n\n\x02id\x18\x03 \x01(\t\x12\x15\n\rlast_modified\x18\x04 \x01(\r\"\xde\x01\n\x07\x43ommand\x12\x18\n\x10incremental_dump\x18\x01 \x01(\x08\x12(\n\x0cmin_scan_ids\x18\x02 \x03(\x0b\x32\x12.zsearch.MinScanId\x12\x10\n\x08\x66ilepath\x18\x03 \x01(\t\x12\x13\n\x0bmax_records\x18\x04 \x01(\r\x12\x10\n\x08start_ip\x18\x05 \x01(\r\x12\x0f\n\x07stop_ip\x18\x06 \x01(\r\x12\x34\n\x0fone_crl_entries\x18\x07 \x03(\x0b\x32\x1b.zsearch.MozillaOneCRLEntry\x12\x0f\n\x07threads\x18\x08 \x01(\r\"\x9d\x02\n\x18\x41nonymousStoreStatistics\x12\x15\n\rtotal_records\x18\x01 \x01(\x04\x12 \n\x18records_added_last_reset\x18\x02 \x01(\x04\x12\"\n\x1arecords_updated_last_reset\x18\x03 \x01(\x04\x12$\n\x1crecords_unchanged_last_reset\x18\x04 \x01(\x04\x12\x18\n\x10records_received\x18\x05 \x01(\x04\x12\x1e\n\x16records_in_redis_queue\x18\x06 \x01(\r\x12\x18\n\x10redis_queue_name\x18\x07 \x01(\t\x12\x12\n\nqueue_type\x18\x08 \x01(\t\x12\x16\n\x0eworker_threads\x18\t \x01(\r\"|\n\x0eStatisticsPair\x12\x0c\n\x04port\x18\x01 \x01(\r\x12\x10\n\x08protocol\x18\x02 \x01(\r\x12\x13\n\x0bsubprotocol\x18\x03 \x01(\r\x12\x35\n\nstatistics\x18\x04 \x01(\x0b\x32!.zsearch.AnonymousStoreStatistics\"p\n\x0fStoreStatistics\x12\x31\n\x06global\x18\x01 \x01(\x0b\x32!.zsearch.AnonymousStoreStatistics\x12*\n\tprotocols\x18\x02 \x03(\x0b\x32\x17.zsearch.StatisticsPair\"\xef\x02\n\x10ServerStatistics\x12H\n\x10store_statistics\x18\x01 \x03(\x0b\x32..zsearch.ServerStatistics.StoreStatisticsEntry\x12[\n\x1a\x61nonymous_store_statistics\x18\x02 \x03(\x0b\x32\x37.zsearch.ServerStatistics.AnonymousStoreStatisticsEntry\x1aP\n\x14StoreStatisticsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.zsearch.StoreStatistics:\x02\x38\x01\x1a\x62\n\x1d\x41nonymousStoreStatisticsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32!.zsearch.AnonymousStoreStatistics:\x02\x38\x01\"M\n\x0fPruneStatistics\x12\"\n\x03key\x18\x01 \x01(\x0b\x32\x15.zsearch.AnonymousKey\x12\x16\n\x0erecords_pruned\x18\x02 \x01(\x04\"\xf3\x01\n\x0c\x43ommandReply\x12\x33\n\x06status\x18\x01 \x01(\x0e\x32#.zsearch.CommandReply.CommandStatus\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12(\n\x05stats\x18\x03 \x01(\x0b\x32\x19.zsearch.ServerStatistics\x12\x32\n\x10prune_statistics\x18\x04 \x03(\x0b\x32\x18.zsearch.PruneStatistics\"A\n\rCommandStatus\x12\t\n\x05\x46\x41TAL\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\r\n\tNO_RECORD\x10\x03\"q\n\tHostQuery\x12\n\n\x02ip\x18\x01 \x01(\x07\x12\x0e\n\x06\x64omain\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\x12\x10\n\x08protocol\x18\x04 \x01(\r\x12\x13\n\x0bsubprotocol\x18\x05 \x01(\r\x12\x13\n\x0bmax_records\x18\x06 \x01(\r\"\xb8\x02\n\x11HostQueryResponse\x12\x39\n\x06status\x18\x01 \x01(\x0e\x32).zsearch.HostQueryResponse.ResponseStatus\x12\n\n\x02ip\x18\x02 \x01(\x07\x12\x0e\n\x06\x64omain\x18\x03 \x01(\t\x12\x0c\n\x04port\x18\x04 \x01(\r\x12\x10\n\x08protocol\x18\x05 \x01(\r\x12\x13\n\x0bsubprotocol\x18\x06 \x01(\r\x12\x1f\n\x06record\x18\x07 \x01(\x0b\x32\x0f.zsearch.Record\x12 \n\x07records\x18\x08 \x03(\x0b\x32\x0f.zsearch.Record\x12\r\n\x05\x65rror\x18\t \x01(\t\"E\n\x0eResponseStatus\x12\x0c\n\x08RESERVED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\r\n\tNO_RECORD\x10\x02\x12\t\n\x05\x45RROR\x10\x03\"\"\n\x0e\x41nonymousQuery\x12\x10\n\x08sha256fp\x18\x01 \x01(\x0c\"\x95\x02\n\x16\x41nonymousQueryResponse\x12\x10\n\x08sha256fp\x18\x01 \x01(\x0c\x12>\n\x06status\x18\x02 \x01(\x0e\x32..zsearch.AnonymousQueryResponse.ResponseStatus\x12(\n\x06record\x18\x03 \x01(\x0b\x32\x18.zsearch.AnonymousRecord\x12)\n\x07records\x18\x04 \x03(\x0b\x32\x18.zsearch.AnonymousRecord\x12\r\n\x05\x65rror\x18; \x01(\t\"E\n\x0eResponseStatus\x12\x0c\n\x08RESERVED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\r\n\tNO_RECORD\x10\x02\x12\t\n\x05\x45RROR\x10\x03\"R\n\x0fUserDataRequest\x12\n\n\x02ip\x18\x01 \x01(\x07\x12\x0e\n\x06\x64omain\x18\x02 \x01(\t\x12#\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x15.zsearch.UserdataAtom\"\x9e\x01\n\x0eRootStoreQuery\x12\x38\n\x04type\x18\x01 \x01(\x0e\x32*.zsearch.RootStoreQuery.RootStoreQueryType\"R\n\x12RootStoreQueryType\x12\x0c\n\x08RESERVED\x10\x00\x12\x0b\n\x07MOZILLA\x10\x01\x12\r\n\tMICROSOFT\x10\x02\x12\t\n\x05\x41PPLE\x10\x03\x12\x07\n\x03\x41LL\x10\x04\"<\n\x0eRootStoreReply\x12*\n\x0c\x63\x65rtificates\x18\x01 \x03(\x0b\x32\x14.zsearch.Certificateb\x06proto3')
,
dependencies=[common__pb2.DESCRIPTOR,certificate__pb2.DESCRIPTOR,anonstore__pb2.DESCRIPTOR,hoststore__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_COMMANDREPLY_COMMANDSTATUS = _descriptor.EnumDescriptor(
name='CommandStatus',
full_name='zsearch.CommandReply.CommandStatus',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='FATAL', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUCCESS', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='ERROR', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='NO_RECORD', index=3, number=3,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=1629,
serialized_end=1694,
)
_sym_db.RegisterEnumDescriptor(_COMMANDREPLY_COMMANDSTATUS)
_HOSTQUERYRESPONSE_RESPONSESTATUS = _descriptor.EnumDescriptor(
name='ResponseStatus',
full_name='zsearch.HostQueryResponse.ResponseStatus',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUCCESS', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='NO_RECORD', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='ERROR', index=3, number=3,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=2055,
serialized_end=2124,
)
_sym_db.RegisterEnumDescriptor(_HOSTQUERYRESPONSE_RESPONSESTATUS)
_ANONYMOUSQUERYRESPONSE_RESPONSESTATUS = _descriptor.EnumDescriptor(
name='ResponseStatus',
full_name='zsearch.AnonymousQueryResponse.ResponseStatus',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUCCESS', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='NO_RECORD', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='ERROR', index=3, number=3,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=2055,
serialized_end=2124,
)
_sym_db.RegisterEnumDescriptor(_ANONYMOUSQUERYRESPONSE_RESPONSESTATUS)
_ROOTSTOREQUERY_ROOTSTOREQUERYTYPE = _descriptor.EnumDescriptor(
name='RootStoreQueryType',
full_name='zsearch.RootStoreQuery.RootStoreQueryType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='MOZILLA', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='MICROSOFT', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='APPLE', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='ALL', index=4, number=4,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=2603,
serialized_end=2685,
)
_sym_db.RegisterEnumDescriptor(_ROOTSTOREQUERY_ROOTSTOREQUERYTYPE)
_MINSCANID = _descriptor.Descriptor(
name='MinScanId',
full_name='zsearch.MinScanId',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='zsearch.MinScanId.key', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='min_scan_id', full_name='zsearch.MinScanId.min_scan_id', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=89,
serialized_end=157,
)
_MOZILLAONECRLENTRY = _descriptor.Descriptor(
name='MozillaOneCRLEntry',
full_name='zsearch.MozillaOneCRLEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='issuer', full_name='zsearch.MozillaOneCRLEntry.issuer', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='serial', full_name='zsearch.MozillaOneCRLEntry.serial', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='id', full_name='zsearch.MozillaOneCRLEntry.id', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='last_modified', full_name='zsearch.MozillaOneCRLEntry.last_modified', index=3,
number=4, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=159,
serialized_end=246,
)
_COMMAND = _descriptor.Descriptor(
name='Command',
full_name='zsearch.Command',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='incremental_dump', full_name='zsearch.Command.incremental_dump', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='min_scan_ids', full_name='zsearch.Command.min_scan_ids', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='filepath', full_name='zsearch.Command.filepath', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='max_records', full_name='zsearch.Command.max_records', index=3,
number=4, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='start_ip', full_name='zsearch.Command.start_ip', index=4,
number=5, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='stop_ip', full_name='zsearch.Command.stop_ip', index=5,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='one_crl_entries', full_name='zsearch.Command.one_crl_entries', index=6,
number=7, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='threads', full_name='zsearch.Command.threads', index=7,
number=8, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=249,
serialized_end=471,
)
_ANONYMOUSSTORESTATISTICS = _descriptor.Descriptor(
name='AnonymousStoreStatistics',
full_name='zsearch.AnonymousStoreStatistics',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='total_records', full_name='zsearch.AnonymousStoreStatistics.total_records', index=0,
number=1, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='records_added_last_reset', full_name='zsearch.AnonymousStoreStatistics.records_added_last_reset', index=1,
number=2, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='records_updated_last_reset', full_name='zsearch.AnonymousStoreStatistics.records_updated_last_reset', index=2,
number=3, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='records_unchanged_last_reset', full_name='zsearch.AnonymousStoreStatistics.records_unchanged_last_reset', index=3,
number=4, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='records_received', full_name='zsearch.AnonymousStoreStatistics.records_received', index=4,
number=5, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='records_in_redis_queue', full_name='zsearch.AnonymousStoreStatistics.records_in_redis_queue', index=5,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='redis_queue_name', full_name='zsearch.AnonymousStoreStatistics.redis_queue_name', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='queue_type', full_name='zsearch.AnonymousStoreStatistics.queue_type', index=7,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='worker_threads', full_name='zsearch.AnonymousStoreStatistics.worker_threads', index=8,
number=9, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=474,
serialized_end=759,
)
_STATISTICSPAIR = _descriptor.Descriptor(
name='StatisticsPair',
full_name='zsearch.StatisticsPair',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='port', full_name='zsearch.StatisticsPair.port', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='protocol', full_name='zsearch.StatisticsPair.protocol', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='subprotocol', full_name='zsearch.StatisticsPair.subprotocol', index=2,
number=3, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='statistics', full_name='zsearch.StatisticsPair.statistics', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=761,
serialized_end=885,
)
_STORESTATISTICS = _descriptor.Descriptor(
name='StoreStatistics',
full_name='zsearch.StoreStatistics',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='global', full_name='zsearch.StoreStatistics.global', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='protocols', full_name='zsearch.StoreStatistics.protocols', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=887,
serialized_end=999,
)
_SERVERSTATISTICS_STORESTATISTICSENTRY = _descriptor.Descriptor(
name='StoreStatisticsEntry',
full_name='zsearch.ServerStatistics.StoreStatisticsEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='zsearch.ServerStatistics.StoreStatisticsEntry.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='value', full_name='zsearch.ServerStatistics.StoreStatisticsEntry.value', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1189,
serialized_end=1269,
)
_SERVERSTATISTICS_ANONYMOUSSTORESTATISTICSENTRY = _descriptor.Descriptor(
name='AnonymousStoreStatisticsEntry',
full_name='zsearch.ServerStatistics.AnonymousStoreStatisticsEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='zsearch.ServerStatistics.AnonymousStoreStatisticsEntry.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='value', full_name='zsearch.ServerStatistics.AnonymousStoreStatisticsEntry.value', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1271,
serialized_end=1369,
)
_SERVERSTATISTICS = _descriptor.Descriptor(
name='ServerStatistics',
full_name='zsearch.ServerStatistics',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='store_statistics', full_name='zsearch.ServerStatistics.store_statistics', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='anonymous_store_statistics', full_name='zsearch.ServerStatistics.anonymous_store_statistics', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_SERVERSTATISTICS_STORESTATISTICSENTRY, _SERVERSTATISTICS_ANONYMOUSSTORESTATISTICSENTRY, ],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1002,
serialized_end=1369,
)
_PRUNESTATISTICS = _descriptor.Descriptor(
name='PruneStatistics',
full_name='zsearch.PruneStatistics',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='zsearch.PruneStatistics.key', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='records_pruned', full_name='zsearch.PruneStatistics.records_pruned', index=1,
number=2, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1371,
serialized_end=1448,
)
_COMMANDREPLY = _descriptor.Descriptor(
name='CommandReply',
full_name='zsearch.CommandReply',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='status', full_name='zsearch.CommandReply.status', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='error', full_name='zsearch.CommandReply.error', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='stats', full_name='zsearch.CommandReply.stats', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='prune_statistics', full_name='zsearch.CommandReply.prune_statistics', index=3,
number=4, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_COMMANDREPLY_COMMANDSTATUS,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1451,
serialized_end=1694,
)
_HOSTQUERY = _descriptor.Descriptor(
name='HostQuery',
full_name='zsearch.HostQuery',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='ip', full_name='zsearch.HostQuery.ip', index=0,
number=1, type=7, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='domain', full_name='zsearch.HostQuery.domain', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='port', full_name='zsearch.HostQuery.port', index=2,
number=3, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='protocol', full_name='zsearch.HostQuery.protocol', index=3,
number=4, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='subprotocol', full_name='zsearch.HostQuery.subprotocol', index=4,
number=5, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='max_records', full_name='zsearch.HostQuery.max_records', index=5,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1696,
serialized_end=1809,
)
_HOSTQUERYRESPONSE = _descriptor.Descriptor(
name='HostQueryResponse',
full_name='zsearch.HostQueryResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='status', full_name='zsearch.HostQueryResponse.status', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='ip', full_name='zsearch.HostQueryResponse.ip', index=1,
number=2, type=7, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='domain', full_name='zsearch.HostQueryResponse.domain', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='port', full_name='zsearch.HostQueryResponse.port', index=3,
number=4, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='protocol', full_name='zsearch.HostQueryResponse.protocol', index=4,
number=5, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='subprotocol', full_name='zsearch.HostQueryResponse.subprotocol', index=5,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='record', full_name='zsearch.HostQueryResponse.record', index=6,
number=7, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='records', full_name='zsearch.HostQueryResponse.records', index=7,
number=8, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='error', full_name='zsearch.HostQueryResponse.error', index=8,
number=9, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_HOSTQUERYRESPONSE_RESPONSESTATUS,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1812,
serialized_end=2124,
)
_ANONYMOUSQUERY = _descriptor.Descriptor(
name='AnonymousQuery',
full_name='zsearch.AnonymousQuery',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='sha256fp', full_name='zsearch.AnonymousQuery.sha256fp', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2126,
serialized_end=2160,
)
_ANONYMOUSQUERYRESPONSE = _descriptor.Descriptor(
name='AnonymousQueryResponse',
full_name='zsearch.AnonymousQueryResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='sha256fp', full_name='zsearch.AnonymousQueryResponse.sha256fp', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='status', full_name='zsearch.AnonymousQueryResponse.status', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='record', full_name='zsearch.AnonymousQueryResponse.record', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='records', full_name='zsearch.AnonymousQueryResponse.records', index=3,
number=4, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='error', full_name='zsearch.AnonymousQueryResponse.error', index=4,
number=59, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_ANONYMOUSQUERYRESPONSE_RESPONSESTATUS,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2163,
serialized_end=2440,
)
_USERDATAREQUEST = _descriptor.Descriptor(
name='UserDataRequest',
full_name='zsearch.UserDataRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='ip', full_name='zsearch.UserDataRequest.ip', index=0,
number=1, type=7, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='domain', full_name='zsearch.UserDataRequest.domain', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='data', full_name='zsearch.UserDataRequest.data', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2442,
serialized_end=2524,
)
_ROOTSTOREQUERY = _descriptor.Descriptor(
name='RootStoreQuery',
full_name='zsearch.RootStoreQuery',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='type', full_name='zsearch.RootStoreQuery.type', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_ROOTSTOREQUERY_ROOTSTOREQUERYTYPE,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2527,
serialized_end=2685,
)
_ROOTSTOREREPLY = _descriptor.Descriptor(
name='RootStoreReply',
full_name='zsearch.RootStoreReply',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='certificates', full_name='zsearch.RootStoreReply.certificates', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=2687,
serialized_end=2747,
)
_MINSCANID.fields_by_name['key'].message_type = hoststore__pb2._ANONYMOUSKEY
_COMMAND.fields_by_name['min_scan_ids'].message_type = _MINSCANID
_COMMAND.fields_by_name['one_crl_entries'].message_type = _MOZILLAONECRLENTRY
_STATISTICSPAIR.fields_by_name['statistics'].message_type = _ANONYMOUSSTORESTATISTICS
_STORESTATISTICS.fields_by_name['global'].message_type = _ANONYMOUSSTORESTATISTICS
_STORESTATISTICS.fields_by_name['protocols'].message_type = _STATISTICSPAIR
_SERVERSTATISTICS_STORESTATISTICSENTRY.fields_by_name['value'].message_type = _STORESTATISTICS
_SERVERSTATISTICS_STORESTATISTICSENTRY.containing_type = _SERVERSTATISTICS
_SERVERSTATISTICS_ANONYMOUSSTORESTATISTICSENTRY.fields_by_name['value'].message_type = _ANONYMOUSSTORESTATISTICS
_SERVERSTATISTICS_ANONYMOUSSTORESTATISTICSENTRY.containing_type = _SERVERSTATISTICS
_SERVERSTATISTICS.fields_by_name['store_statistics'].message_type = _SERVERSTATISTICS_STORESTATISTICSENTRY
_SERVERSTATISTICS.fields_by_name['anonymous_store_statistics'].message_type = _SERVERSTATISTICS_ANONYMOUSSTORESTATISTICSENTRY
_PRUNESTATISTICS.fields_by_name['key'].message_type = hoststore__pb2._ANONYMOUSKEY
_COMMANDREPLY.fields_by_name['status'].enum_type = _COMMANDREPLY_COMMANDSTATUS
_COMMANDREPLY.fields_by_name['stats'].message_type = _SERVERSTATISTICS
_COMMANDREPLY.fields_by_name['prune_statistics'].message_type = _PRUNESTATISTICS
_COMMANDREPLY_COMMANDSTATUS.containing_type = _COMMANDREPLY
_HOSTQUERYRESPONSE.fields_by_name['status'].enum_type = _HOSTQUERYRESPONSE_RESPONSESTATUS
_HOSTQUERYRESPONSE.fields_by_name['record'].message_type = hoststore__pb2._RECORD
_HOSTQUERYRESPONSE.fields_by_name['records'].message_type = hoststore__pb2._RECORD
_HOSTQUERYRESPONSE_RESPONSESTATUS.containing_type = _HOSTQUERYRESPONSE
_ANONYMOUSQUERYRESPONSE.fields_by_name['status'].enum_type = _ANONYMOUSQUERYRESPONSE_RESPONSESTATUS
_ANONYMOUSQUERYRESPONSE.fields_by_name['record'].message_type = anonstore__pb2._ANONYMOUSRECORD
_ANONYMOUSQUERYRESPONSE.fields_by_name['records'].message_type = anonstore__pb2._ANONYMOUSRECORD
_ANONYMOUSQUERYRESPONSE_RESPONSESTATUS.containing_type = _ANONYMOUSQUERYRESPONSE
_USERDATAREQUEST.fields_by_name['data'].message_type = common__pb2._USERDATAATOM
_ROOTSTOREQUERY.fields_by_name['type'].enum_type = _ROOTSTOREQUERY_ROOTSTOREQUERYTYPE
_ROOTSTOREQUERY_ROOTSTOREQUERYTYPE.containing_type = _ROOTSTOREQUERY
_ROOTSTOREREPLY.fields_by_name['certificates'].message_type = certificate__pb2._CERTIFICATE
DESCRIPTOR.message_types_by_name['MinScanId'] = _MINSCANID
DESCRIPTOR.message_types_by_name['MozillaOneCRLEntry'] = _MOZILLAONECRLENTRY
DESCRIPTOR.message_types_by_name['Command'] = _COMMAND
DESCRIPTOR.message_types_by_name['AnonymousStoreStatistics'] = _ANONYMOUSSTORESTATISTICS
DESCRIPTOR.message_types_by_name['StatisticsPair'] = _STATISTICSPAIR
DESCRIPTOR.message_types_by_name['StoreStatistics'] = _STORESTATISTICS
DESCRIPTOR.message_types_by_name['ServerStatistics'] = _SERVERSTATISTICS
DESCRIPTOR.message_types_by_name['PruneStatistics'] = _PRUNESTATISTICS
DESCRIPTOR.message_types_by_name['CommandReply'] = _COMMANDREPLY
DESCRIPTOR.message_types_by_name['HostQuery'] = _HOSTQUERY
DESCRIPTOR.message_types_by_name['HostQueryResponse'] = _HOSTQUERYRESPONSE
DESCRIPTOR.message_types_by_name['AnonymousQuery'] = _ANONYMOUSQUERY
DESCRIPTOR.message_types_by_name['AnonymousQueryResponse'] = _ANONYMOUSQUERYRESPONSE
DESCRIPTOR.message_types_by_name['UserDataRequest'] = _USERDATAREQUEST
DESCRIPTOR.message_types_by_name['RootStoreQuery'] = _ROOTSTOREQUERY
DESCRIPTOR.message_types_by_name['RootStoreReply'] = _ROOTSTOREREPLY
MinScanId = _reflection.GeneratedProtocolMessageType('MinScanId', (_message.Message,), dict(
DESCRIPTOR = _MINSCANID,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.MinScanId)
))
_sym_db.RegisterMessage(MinScanId)
MozillaOneCRLEntry = _reflection.GeneratedProtocolMessageType('MozillaOneCRLEntry', (_message.Message,), dict(
DESCRIPTOR = _MOZILLAONECRLENTRY,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.MozillaOneCRLEntry)
))
_sym_db.RegisterMessage(MozillaOneCRLEntry)
Command = _reflection.GeneratedProtocolMessageType('Command', (_message.Message,), dict(
DESCRIPTOR = _COMMAND,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.Command)
))
_sym_db.RegisterMessage(Command)
AnonymousStoreStatistics = _reflection.GeneratedProtocolMessageType('AnonymousStoreStatistics', (_message.Message,), dict(
DESCRIPTOR = _ANONYMOUSSTORESTATISTICS,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.AnonymousStoreStatistics)
))
_sym_db.RegisterMessage(AnonymousStoreStatistics)
StatisticsPair = _reflection.GeneratedProtocolMessageType('StatisticsPair', (_message.Message,), dict(
DESCRIPTOR = _STATISTICSPAIR,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.StatisticsPair)
))
_sym_db.RegisterMessage(StatisticsPair)
StoreStatistics = _reflection.GeneratedProtocolMessageType('StoreStatistics', (_message.Message,), dict(
DESCRIPTOR = _STORESTATISTICS,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.StoreStatistics)
))
_sym_db.RegisterMessage(StoreStatistics)
ServerStatistics = _reflection.GeneratedProtocolMessageType('ServerStatistics', (_message.Message,), dict(
StoreStatisticsEntry = _reflection.GeneratedProtocolMessageType('StoreStatisticsEntry', (_message.Message,), dict(
DESCRIPTOR = _SERVERSTATISTICS_STORESTATISTICSENTRY,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.ServerStatistics.StoreStatisticsEntry)
))
,
AnonymousStoreStatisticsEntry = _reflection.GeneratedProtocolMessageType('AnonymousStoreStatisticsEntry', (_message.Message,), dict(
DESCRIPTOR = _SERVERSTATISTICS_ANONYMOUSSTORESTATISTICSENTRY,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.ServerStatistics.AnonymousStoreStatisticsEntry)
))
,
DESCRIPTOR = _SERVERSTATISTICS,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.ServerStatistics)
))
_sym_db.RegisterMessage(ServerStatistics)
_sym_db.RegisterMessage(ServerStatistics.StoreStatisticsEntry)
_sym_db.RegisterMessage(ServerStatistics.AnonymousStoreStatisticsEntry)
PruneStatistics = _reflection.GeneratedProtocolMessageType('PruneStatistics', (_message.Message,), dict(
DESCRIPTOR = _PRUNESTATISTICS,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.PruneStatistics)
))
_sym_db.RegisterMessage(PruneStatistics)
CommandReply = _reflection.GeneratedProtocolMessageType('CommandReply', (_message.Message,), dict(
DESCRIPTOR = _COMMANDREPLY,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.CommandReply)
))
_sym_db.RegisterMessage(CommandReply)
HostQuery = _reflection.GeneratedProtocolMessageType('HostQuery', (_message.Message,), dict(
DESCRIPTOR = _HOSTQUERY,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.HostQuery)
))
_sym_db.RegisterMessage(HostQuery)
HostQueryResponse = _reflection.GeneratedProtocolMessageType('HostQueryResponse', (_message.Message,), dict(
DESCRIPTOR = _HOSTQUERYRESPONSE,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.HostQueryResponse)
))
_sym_db.RegisterMessage(HostQueryResponse)
AnonymousQuery = _reflection.GeneratedProtocolMessageType('AnonymousQuery', (_message.Message,), dict(
DESCRIPTOR = _ANONYMOUSQUERY,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.AnonymousQuery)
))
_sym_db.RegisterMessage(AnonymousQuery)
AnonymousQueryResponse = _reflection.GeneratedProtocolMessageType('AnonymousQueryResponse', (_message.Message,), dict(
DESCRIPTOR = _ANONYMOUSQUERYRESPONSE,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.AnonymousQueryResponse)
))
_sym_db.RegisterMessage(AnonymousQueryResponse)
UserDataRequest = _reflection.GeneratedProtocolMessageType('UserDataRequest', (_message.Message,), dict(
DESCRIPTOR = _USERDATAREQUEST,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.UserDataRequest)
))
_sym_db.RegisterMessage(UserDataRequest)
RootStoreQuery = _reflection.GeneratedProtocolMessageType('RootStoreQuery', (_message.Message,), dict(
DESCRIPTOR = _ROOTSTOREQUERY,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.RootStoreQuery)
))
_sym_db.RegisterMessage(RootStoreQuery)
RootStoreReply = _reflection.GeneratedProtocolMessageType('RootStoreReply', (_message.Message,), dict(
DESCRIPTOR = _ROOTSTOREREPLY,
__module__ = 'rpc_pb2'
# @@protoc_insertion_point(class_scope:zsearch.RootStoreReply)
))
_sym_db.RegisterMessage(RootStoreReply)
_SERVERSTATISTICS_STORESTATISTICSENTRY.has_options = True
_SERVERSTATISTICS_STORESTATISTICSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
_SERVERSTATISTICS_ANONYMOUSSTORESTATISTICSENTRY.has_options = True
_SERVERSTATISTICS_ANONYMOUSSTORESTATISTICSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
try:
# THESE ELEMENTS WILL BE DEPRECATED.
# Please use the generated *_pb2_grpc.py files instead.
import grpc
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
from grpc.beta import implementations as beta_implementations
from grpc.beta import interfaces as beta_interfaces
except ImportError:
pass
# @@protoc_insertion_point(module_scope) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/rpc_pb2.py | rpc_pb2.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='protocols.proto',
package='zsearch',
syntax='proto3',
serialized_pb=_b('\n\x0fprotocols.proto\x12\x07zsearch*\xf3\x04\n\x08Protocol\x12\x12\n\x0ePROTO_RESERVED\x10\x00\x12\x10\n\x0cPROTO_SYSTEM\x10\x01\x12\x0e\n\nPROTO_HTTP\x10\x02\x12\x0f\n\x0bPROTO_HTTPS\x10\x03\x12\x0e\n\nPROTO_IMAP\x10\x04\x12\x0f\n\x0bPROTO_IMAPS\x10\x05\x12\x0e\n\nPROTO_SMTP\x10\x06\x12\x0f\n\x0bPROTO_SMTPS\x10\x07\x12\x0e\n\nPROTO_POP3\x10\x08\x12\x0f\n\x0bPROTO_POP3S\x10\t\x12\x10\n\x0cPROTO_MODBUS\x10\n\x12\r\n\tPROTO_FTP\x10\x0b\x12\r\n\tPROTO_SSH\x10\x0c\x12\r\n\tPROTO_DNS\x10\r\x12\r\n\tPROTO_NTP\x10\x0e\x12\x10\n\x0cPROTO_TELNET\x10\x0f\x12\x0e\n\nPROTO_UPNP\x10\x10\x12\x0e\n\nPROTO_CWMP\x10\x11\x12\x10\n\x0cPROTO_HTTP_2\x10\x12\x12\x10\n\x0cPROTO_BACNET\x10\x13\x12\x0e\n\nPROTO_DNP3\x10\x14\x12\r\n\tPROTO_FOX\x10\x15\x12\x0c\n\x08PROTO_S7\x10\x16\x12\x10\n\x0cPROTO_GLOBAL\x10\x17\x12\x10\n\x0cPROTO_LOOKUP\x10\x18\x12\x12\n\x0ePROTO_HTTP_WWW\x10\x1a\x12\x13\n\x0fPROTO_HTTPS_WWW\x10\x1b\x12\r\n\tPROTO_SMB\x10\x1c\x12\r\n\tPROTO_IPP\x10\x1d\x12\x11\n\rPROTO_MONGODB\x10@\x12\x0f\n\x0bPROTO_MSSQL\x10\x41\x12\x0f\n\x0bPROTO_MYSQL\x10\x42\x12\x10\n\x0cPROTO_ORACLE\x10\x43\x12\x12\n\x0ePROTO_POSTGRES\x10\x44\x12\x14\n\x0fPROTO_MEMCACHED\x10\x80\x01\x12\x10\n\x0bPROTO_REDIS\x10\x81\x01*\x8b\x0b\n\x0bSubprotocol\x12\x15\n\x11SUBPROTO_RESERVED\x10\x00\x12\x14\n\x10SUBPROTO_DELETED\x10\x01\x12\x14\n\x10SUBPROTO_GENERIC\x10\x02\x12\x13\n\x0fSUBPROTO_BANNER\x10\x03\x12\x10\n\x0cSUBPROTO_TLS\x10\x04\x12\x14\n\x10SUBPROTO_TLS_1_0\x10\x05\x12\x14\n\x10SUBPROTO_TLS_1_1\x10\x06\x12\x14\n\x10SUBPROTO_TLS_1_2\x10\x07\x12\x14\n\x10SUBPROTO_TLS_1_3\x10\x08\x12\x17\n\x13SUBPROTO_HEARTBLEED\x10\t\x12\x14\n\x10SUBPROTO_CIPHERS\x10\n\x12\x12\n\x0eSUBPROTO_SSL_2\x10\x0b\x12\x12\n\x0eSUBPROTO_SSL_3\x10\x0c\x12\x10\n\x0cSUBPROTO_GET\x10\r\x12\x15\n\x11SUBPROTO_STARTTLS\x10\x0e\x12\x13\n\x0fSUBPROTO_EXPORT\x10\x0f\x12\x17\n\x13SUBPROTO_RSA_EXPORT\x10\x10\x12\x17\n\x13SUBPROTO_DHE_EXPORT\x10\x11\x12\x10\n\x0cSUBPROTO_DHE\x10\x12\x12\x12\n\x0eSUBPROTO_ECDHE\x10\x13\x12\x10\n\x0cSUBPROTO_SNI\x10\x14\x12\x13\n\x0fSUBPROTO_NO_SNI\x10\x15\x12\x11\n\rSUBPROTO_QUIC\x10\x16\x12\x11\n\rSUBPROTO_SPDY\x10\x17\x12\x10\n\x0cSUBPROTO_RSA\x10\x18\x12\x10\n\x0cSUBPROTO_DSA\x10\x19\x12\x12\n\x0eSUBPROTO_ECDSA\x10\x1a\x12\x16\n\x12SUBPROTO_DEVICE_ID\x10\x1b\x12\x1a\n\x16SUBPROTO_OPEN_RESOLVER\x10\x1c\x12\x17\n\x13SUBPROTO_OPEN_PROXY\x10\x1d\x12\x17\n\x13SUBPROTO_OPEN_RELAY\x10\x1e\x12\x11\n\rSUBPROTO_TIME\x10\x1f\x12\x19\n\x15SUBPROTO_HACKING_TEAM\x10 \x12\x1c\n\x18SUBPROTO_EXTENDED_RANDOM\x10!\x12\x16\n\x12SUBPROTO_DISCOVERY\x10\"\x12\x13\n\x0fSUBPROTO_GTLD_A\x10#\x12\x13\n\x0fSUBPROTO_LOOKUP\x10$\x12\x13\n\x0fSUBPROTO_STATUS\x10%\x12\x10\n\x0cSUBPROTO_SZL\x10&\x12\x0f\n\x0bSUBPROTO_V2\x10\'\x12\x10\n\x0cSUBPROTO_TCP\x10@\x12\x10\n\x0cSUBPROTO_UDP\x10\x41\x12!\n\x1cSUBPROTO_SYS_PUBLIC_LOCATION\x10\xc0\x01\x12\x14\n\x0fSUBPROTO_SYS_AS\x10\xc1\x01\x12\x16\n\x11SUBPROTO_SYS_TAGS\x10\xc2\x01\x12\x1a\n\x15SUBPROTO_SYS_METADATA\x10\xc3\x01\x12\x17\n\x12SUBPROTO_SYS_WHOIS\x10\xc4\x01\x12\x1a\n\x15SUBPROTO_SYS_USERDATA\x10\xc5\x01\x12\x1b\n\x16SUBPROTO_SYS_BLACKLIST\x10\xc6\x01\x12\x1c\n\x17SUBPROTO_SYS_ALEXA_RANK\x10\xc7\x01\x12%\n SUBPROTO_SYS_RESTRICTED_LOCATION\x10\xc8\x01\x12\x19\n\x14SUBPROTO_SYS_VERSION\x10\xc9\x01\x12 \n\x1bSUBPROTO_SYS_QUANTCAST_RANK\x10\xca\x01\x12%\n SUBPROTO_SYS_CISCO_UMBRELLA_RANK\x10\xcb\x01\x12\x1d\n\x18SUBPROTO_SYS_REVERSE_DNS\x10\xcc\x01\x12\x11\n\x0cSUBPROTO_SPF\x10\xdc\x01\x12\x13\n\x0eSUBPROTO_DMARC\x10\xdd\x01\x12\x12\n\rSUBPROTO_DKIM\x10\xde\x01\x12\x0f\n\nSUBPROTO_A\x10\xdf\x01\x12\x10\n\x0bSUBPROTO_MX\x10\xe0\x01\x12\x12\n\rSUBPROTO_AXFR\x10\xe1\x01\x62\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_PROTOCOL = _descriptor.EnumDescriptor(
name='Protocol',
full_name='zsearch.Protocol',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='PROTO_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_SYSTEM', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_HTTP', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_HTTPS', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_IMAP', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_IMAPS', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_SMTP', index=6, number=6,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_SMTPS', index=7, number=7,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_POP3', index=8, number=8,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_POP3S', index=9, number=9,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_MODBUS', index=10, number=10,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_FTP', index=11, number=11,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_SSH', index=12, number=12,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_DNS', index=13, number=13,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_NTP', index=14, number=14,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_TELNET', index=15, number=15,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_UPNP', index=16, number=16,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_CWMP', index=17, number=17,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_HTTP_2', index=18, number=18,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_BACNET', index=19, number=19,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_DNP3', index=20, number=20,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_FOX', index=21, number=21,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_S7', index=22, number=22,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_GLOBAL', index=23, number=23,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_LOOKUP', index=24, number=24,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_HTTP_WWW', index=25, number=26,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_HTTPS_WWW', index=26, number=27,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_SMB', index=27, number=28,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_IPP', index=28, number=29,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_MONGODB', index=29, number=64,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_MSSQL', index=30, number=65,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_MYSQL', index=31, number=66,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_ORACLE', index=32, number=67,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_POSTGRES', index=33, number=68,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_MEMCACHED', index=34, number=128,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PROTO_REDIS', index=35, number=129,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=29,
serialized_end=656,
)
_sym_db.RegisterEnumDescriptor(_PROTOCOL)
Protocol = enum_type_wrapper.EnumTypeWrapper(_PROTOCOL)
_SUBPROTOCOL = _descriptor.EnumDescriptor(
name='Subprotocol',
full_name='zsearch.Subprotocol',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='SUBPROTO_RESERVED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_DELETED', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_GENERIC', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_BANNER', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_TLS', index=4, number=4,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_TLS_1_0', index=5, number=5,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_TLS_1_1', index=6, number=6,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_TLS_1_2', index=7, number=7,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_TLS_1_3', index=8, number=8,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_HEARTBLEED', index=9, number=9,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_CIPHERS', index=10, number=10,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SSL_2', index=11, number=11,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SSL_3', index=12, number=12,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_GET', index=13, number=13,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_STARTTLS', index=14, number=14,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_EXPORT', index=15, number=15,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_RSA_EXPORT', index=16, number=16,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_DHE_EXPORT', index=17, number=17,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_DHE', index=18, number=18,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_ECDHE', index=19, number=19,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SNI', index=20, number=20,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_NO_SNI', index=21, number=21,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_QUIC', index=22, number=22,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SPDY', index=23, number=23,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_RSA', index=24, number=24,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_DSA', index=25, number=25,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_ECDSA', index=26, number=26,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_DEVICE_ID', index=27, number=27,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_OPEN_RESOLVER', index=28, number=28,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_OPEN_PROXY', index=29, number=29,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_OPEN_RELAY', index=30, number=30,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_TIME', index=31, number=31,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_HACKING_TEAM', index=32, number=32,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_EXTENDED_RANDOM', index=33, number=33,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_DISCOVERY', index=34, number=34,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_GTLD_A', index=35, number=35,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_LOOKUP', index=36, number=36,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_STATUS', index=37, number=37,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SZL', index=38, number=38,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_V2', index=39, number=39,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_TCP', index=40, number=64,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_UDP', index=41, number=65,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_PUBLIC_LOCATION', index=42, number=192,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_AS', index=43, number=193,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_TAGS', index=44, number=194,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_METADATA', index=45, number=195,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_WHOIS', index=46, number=196,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_USERDATA', index=47, number=197,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_BLACKLIST', index=48, number=198,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_ALEXA_RANK', index=49, number=199,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_RESTRICTED_LOCATION', index=50, number=200,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_VERSION', index=51, number=201,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_QUANTCAST_RANK', index=52, number=202,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_CISCO_UMBRELLA_RANK', index=53, number=203,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SYS_REVERSE_DNS', index=54, number=204,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_SPF', index=55, number=220,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_DMARC', index=56, number=221,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_DKIM', index=57, number=222,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_A', index=58, number=223,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_MX', index=59, number=224,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SUBPROTO_AXFR', index=60, number=225,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=659,
serialized_end=2078,
)
_sym_db.RegisterEnumDescriptor(_SUBPROTOCOL)
Subprotocol = enum_type_wrapper.EnumTypeWrapper(_SUBPROTOCOL)
PROTO_RESERVED = 0
PROTO_SYSTEM = 1
PROTO_HTTP = 2
PROTO_HTTPS = 3
PROTO_IMAP = 4
PROTO_IMAPS = 5
PROTO_SMTP = 6
PROTO_SMTPS = 7
PROTO_POP3 = 8
PROTO_POP3S = 9
PROTO_MODBUS = 10
PROTO_FTP = 11
PROTO_SSH = 12
PROTO_DNS = 13
PROTO_NTP = 14
PROTO_TELNET = 15
PROTO_UPNP = 16
PROTO_CWMP = 17
PROTO_HTTP_2 = 18
PROTO_BACNET = 19
PROTO_DNP3 = 20
PROTO_FOX = 21
PROTO_S7 = 22
PROTO_GLOBAL = 23
PROTO_LOOKUP = 24
PROTO_HTTP_WWW = 26
PROTO_HTTPS_WWW = 27
PROTO_SMB = 28
PROTO_IPP = 29
PROTO_MONGODB = 64
PROTO_MSSQL = 65
PROTO_MYSQL = 66
PROTO_ORACLE = 67
PROTO_POSTGRES = 68
PROTO_MEMCACHED = 128
PROTO_REDIS = 129
SUBPROTO_RESERVED = 0
SUBPROTO_DELETED = 1
SUBPROTO_GENERIC = 2
SUBPROTO_BANNER = 3
SUBPROTO_TLS = 4
SUBPROTO_TLS_1_0 = 5
SUBPROTO_TLS_1_1 = 6
SUBPROTO_TLS_1_2 = 7
SUBPROTO_TLS_1_3 = 8
SUBPROTO_HEARTBLEED = 9
SUBPROTO_CIPHERS = 10
SUBPROTO_SSL_2 = 11
SUBPROTO_SSL_3 = 12
SUBPROTO_GET = 13
SUBPROTO_STARTTLS = 14
SUBPROTO_EXPORT = 15
SUBPROTO_RSA_EXPORT = 16
SUBPROTO_DHE_EXPORT = 17
SUBPROTO_DHE = 18
SUBPROTO_ECDHE = 19
SUBPROTO_SNI = 20
SUBPROTO_NO_SNI = 21
SUBPROTO_QUIC = 22
SUBPROTO_SPDY = 23
SUBPROTO_RSA = 24
SUBPROTO_DSA = 25
SUBPROTO_ECDSA = 26
SUBPROTO_DEVICE_ID = 27
SUBPROTO_OPEN_RESOLVER = 28
SUBPROTO_OPEN_PROXY = 29
SUBPROTO_OPEN_RELAY = 30
SUBPROTO_TIME = 31
SUBPROTO_HACKING_TEAM = 32
SUBPROTO_EXTENDED_RANDOM = 33
SUBPROTO_DISCOVERY = 34
SUBPROTO_GTLD_A = 35
SUBPROTO_LOOKUP = 36
SUBPROTO_STATUS = 37
SUBPROTO_SZL = 38
SUBPROTO_V2 = 39
SUBPROTO_TCP = 64
SUBPROTO_UDP = 65
SUBPROTO_SYS_PUBLIC_LOCATION = 192
SUBPROTO_SYS_AS = 193
SUBPROTO_SYS_TAGS = 194
SUBPROTO_SYS_METADATA = 195
SUBPROTO_SYS_WHOIS = 196
SUBPROTO_SYS_USERDATA = 197
SUBPROTO_SYS_BLACKLIST = 198
SUBPROTO_SYS_ALEXA_RANK = 199
SUBPROTO_SYS_RESTRICTED_LOCATION = 200
SUBPROTO_SYS_VERSION = 201
SUBPROTO_SYS_QUANTCAST_RANK = 202
SUBPROTO_SYS_CISCO_UMBRELLA_RANK = 203
SUBPROTO_SYS_REVERSE_DNS = 204
SUBPROTO_SPF = 220
SUBPROTO_DMARC = 221
SUBPROTO_DKIM = 222
SUBPROTO_A = 223
SUBPROTO_MX = 224
SUBPROTO_AXFR = 225
DESCRIPTOR.enum_types_by_name['Protocol'] = _PROTOCOL
DESCRIPTOR.enum_types_by_name['Subprotocol'] = _SUBPROTOCOL
# @@protoc_insertion_point(module_scope) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/protocols_pb2.py | protocols_pb2.py |
import sys
import os.path
import base64
import argparse
import datetime
import time
import json
import hashlib
import struct
import socket
import grpc
from zsearch_definitions import search_pb2
from zsearch_definitions import protocols_pb2
from zsearch_definitions import rpc_pb2
from zsearch_definitions import common_pb2
from zsearch_definitions import anonstore_pb2
from zsearch_definitions import hoststore_pb2
import zsearch_definitions.protocols
class QueryService(object):
TIMEOUT = 30 # second
HOST = "localhost"
PORT = 9090
HQ_SUCCESS = rpc_pb2.HostQueryResponse.ResponseStatus.Value("SUCCESS")
HQ_RESERVED= rpc_pb2.HostQueryResponse.ResponseStatus.Value("RESERVED")
HQ_NO_RECORD = rpc_pb2.HostQueryResponse.ResponseStatus.Value("NO_RECORD")
HQ_ERROR = rpc_pb2.HostQueryResponse.ResponseStatus.Value("ERROR")
AQ_SUCCESS = rpc_pb2.AnonymousQueryResponse.ResponseStatus.Value("SUCCESS")
AQ_RESERVED= rpc_pb2.AnonymousQueryResponse.ResponseStatus.Value("RESERVED")
AQ_NO_RECORD = rpc_pb2.AnonymousQueryResponse.ResponseStatus.Value("NO_RECORD")
AQ_ERROR = rpc_pb2.AnonymousQueryResponse.ResponseStatus.Value("ERROR")
@staticmethod
def _port_to_pb(port):
return socket.htons(port)
@staticmethod
def _ip_to_pb(ip):
if isinstance(ip, (str, unicode)):
network_bytes = socket.inet_aton(ip)
(network_int, ) = struct.unpack("I", network_bytes)
return network_int
return socket.htonl(ip)
@staticmethod
def _get_atom_fp(atom):
a = atom.SerializeToString()
m = hashlib.sha256()
m.update(a)
return m.digest()
def __init__(self, host=None, port=None):
host = host or self.HOST
port = port or self.PORT
channel = grpc.insecure_channel('%s:%s' % (str(host), str(port)))
self._service = search_pb2.QueryServiceStub(channel)
@property
def service(self):
return self._service
def get_certificate(self, sha256_fp):
sha256_fp = sha256_fp.decode("hex")
aq = rpc_pb2.AnonymousQuery(
sha256fp=sha256_fp)
resp = self._service.GetCertificate(aq)
assert(resp.status != self.AQ_RESERVED)
if resp.status == self.AQ_ERROR:
raise Exception("Request failed: %s" % resp.error)
elif resp.status == self.AQ_NO_RECORD:
return None
else: # (SUCCESS)
return resp.record.certificate
def put_certificate(self, raw, parsed):
sha256_fp = parsed["fingerprint_sha256"].decode("hex")
sha1_fp = parsed["fingerprint_sha1"].decode("hex")
c = anonstore_pb2.Certificate(
sha1fp=sha1_fp,
sha256fp=sha256_fp,
raw=base64.b64decode(raw),
parsed=json.dumps(parsed, sort_keys=True)
)
ar = anonstore_pb2.AnonymousRecord(
sha256fp=sha256_fp,
timestamp=self._get_int_timestamp(),
exported=False,
certificate=c
)
return self._service.UpsertCertificate(ar, self.TIMEOUT)
def put_raw_certificate(self, rawcert):
return self._service.UpsertRawCertificate(rawcert, self.TIMEOUT)
def _get_host_record(self, meth, ip, domain, port, proto, subproto):
ip = self._ip_to_pb(ip) if ip else 0
port = self._port_to_pb(port)
proto = zsearch_definitions.protocols.Protocol.from_pretty_name(proto)
subproto = zsearch_definitions.protocols.Subprotocol.from_pretty_name(subproto)
host_query = rpc_pb2.HostQuery(
ip=ip,
domain=domain,
port=port,
protocol=proto.value,
subprotocol=subproto.value
)
resp = meth(host_query, self.TIMEOUT)
assert(resp.status != self.HQ_RESERVED)
if resp.status == self.HQ_ERROR:
raise Exception("Request failed: %s" % resp.error)
elif resp.status == self.HQ_NO_RECORD:
return None
else: # (SUCCESS)
return resp.record
def get_host_ipv4_record(self, ip, port, proto, subproto):
return self._get_host_record(self._service.GetHostIPv4Record,
ip, "", port, proto, subproto)
def get_host_domain_record(self, domain, port, proto, subproto):
return self._get_host_record(self._service.GetHostDomainRecord,
None, domain, port, proto, subproto)
@staticmethod
def _get_int_timestamp():
return int(time.mktime(datetime.datetime.now().timetuple()))
def _make_atom(self, data, tags, metadata):
metadatums = []
for k, v in (metadata or {}).items():
m = common_pb2.Metadatum(key=k, value=v)
metadatums.append(m)
atom = hoststore_pb2.ProtocolAtom(metadata=metadatums,
tags=(tags or []), data=data)
return atom
def put_host_ipv4_record(self, ip, port, proto, subproto,
data, tags=None, metadata=None):
atom = self._make_atom(data, tags, metadata)
fp = self._get_atom_fp(atom)
record = hoststore_pb2.Record(
ip=self._ip_to_pb(ip),
port=self._port_to_pb(port),
protocol=protocols_pb2.Protocol.Value(proto),
subprotocol=protocols_pb2.Subprotocol.Value(subproto),
timestamp=self._get_int_timestamp(),
atom=atom,
sha256fp=fp,
)
return self._service.PutHostIPv4Record(record, self.TIMEOUT)
def put_host_domain_record(self, domain, ip, port, proto, subproto,
data, tags=None, metadata=None):
atom = self._make_atom(data, tags, metadata)
fp = self._get_atom_fp(atom)
record = hoststore_pb2.Record(
domain=domain,
ip=self._ip_to_pb(ip),
port=self._port_to_pb(port),
protocol=protocols_pb2.Protocol.Value(proto),
subprotocol=protocols_pb2.Subprotocol.Value(subproto),
timestamp=self._get_int_timestamp(),
atom=atom
)
return self._service.PutHostDomainRecord(record, self.TIMEOUT)
def delete_host_ipv4_record(self, ip, port, proto, subproto):
ip = self._ip_to_pb(ip)
port = self._port_to_pb(port)
proto = protocols_pb2.Protocol.Value(proto)
subproto = protocols_pb2.Subprotocol.Value(subproto)
host_query = rpc_pb2.HostQuery(
ip=ip,
port=port,
proto=proto,
subproto=subproto
)
return self._service.DelHostIPv4Record(host_query, self.TIMEOUT)
def delete_host_domain_record(self, domain, port, proto, subproto):
port = self._port_to_pb(port)
proto = zsearch_definitions.protocols.Protocol.from_pretty_name(proto)
subproto = zsearch_definitions.protocols.Subprotocol.from_pretty_name(subproto)
host_query = rpc_pb2.HostQuery(
domain=domain,
port=port,
protocol=proto.value,
subprotocol=subproto.value
)
return self._service.DelHostDomainRecord(host_query, self.TIMEOUT)
def get_host_ipv4_userdata(self, ip):
raise Exception("not implemented.")
def put_host_ipv4_userdata(self, ip, userdata):
raise Exception("not implemented.")
def iter_host_records(self, meth, max_records):
resp = meth(rpc_pb2.HostQuery(max_records=max_records), self.TIMEOUT)
assert(resp.status != self.HQ_RESERVED)
if resp.status == self.HQ_ERROR:
raise Exception("Request failed: %s" % resp.error)
for r in resp.records:
yield r
def iter_ipv4_records(self, max_records=0):
for record in self.iter_host_records(self._service.GetAllIPv4Records, max_records):
yield record
def iter_domain_records(self, max_records=0):
for record in self.iter_host_records(self._service.GetAllDomainRecords, max_records):
yield record
if __name__ == "__main__":
q = QueryService()
print q.get_certificate("bbf561e53fabf1a684d7cc1e890dab22ab0baabf73a1d85bb5063180424e9592") | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/query.py | query.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
import anonstore_pb2 as anonstore__pb2
import hoststore_pb2 as hoststore__pb2
import rpc_pb2 as rpc__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='search.proto',
package='zsearch',
syntax='proto3',
serialized_pb=_b('\n\x0csearch.proto\x12\x07zsearch\x1a\x0f\x61nonstore.proto\x1a\x0fhoststore.proto\x1a\trpc.proto2\x94\n\n\x0c\x41\x64minService\x12\x35\n\x08Shutdown\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12\x33\n\x06Status\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12\x37\n\nStatistics\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12\x36\n\tPruneIPv4\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12\x38\n\x0bPruneDomain\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12\x39\n\x0cUpdateASData\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12?\n\x12UpdateLocationData\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12\x41\n\x14ValidateCertificates\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12\x41\n\x14\x46ixCertificateSource\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12;\n\x0e\x44umpIPv4ToJSON\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12=\n\x10\x44umpDomainToJSON\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12\x43\n\x16\x44umpCertificatesToJSON\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12;\n\x0e\x44umpKeysToJSON\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12\x41\n\x14RegenerateIPv4Deltas\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12\x43\n\x16RegenerateDomainDeltas\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12H\n\x1bRegenerateCertificateDeltas\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12T\n RegenerateSingleCertificateDelta\x12\x17.zsearch.AnonymousQuery\x1a\x15.zsearch.CommandReply\"\x00\x12\x42\n\x15ReprocessCertificates\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x12N\n\x1aReprocessSingleCertificate\x12\x17.zsearch.AnonymousQuery\x1a\x15.zsearch.CommandReply\"\x00\x12\x31\n\x04Ping\x12\x10.zsearch.Command\x1a\x15.zsearch.CommandReply\"\x00\x32\x8b\x0b\n\x0cQueryService\x12\x45\n\x11GetHostIPv4Record\x12\x12.zsearch.HostQuery\x1a\x1a.zsearch.HostQueryResponse\"\x00\x12\x36\n\x11PutHostIPv4Record\x12\x0f.zsearch.Record\x1a\x0e.zsearch.Delta\"\x00\x12\x39\n\x11\x44\x65lHostIPv4Record\x12\x12.zsearch.HostQuery\x1a\x0e.zsearch.Delta\"\x00\x12\x45\n\x11GetAllIPv4Records\x12\x12.zsearch.HostQuery\x1a\x1a.zsearch.HostQueryResponse\"\x00\x12\x38\n\x10GetHostIPv4Delta\x12\x12.zsearch.HostQuery\x1a\x0e.zsearch.Delta\"\x00\x12G\n\x13GetHostDomainRecord\x12\x12.zsearch.HostQuery\x1a\x1a.zsearch.HostQueryResponse\"\x00\x12\x38\n\x13PutHostDomainRecord\x12\x0f.zsearch.Record\x1a\x0e.zsearch.Delta\"\x00\x12;\n\x13\x44\x65lHostDomainRecord\x12\x12.zsearch.HostQuery\x1a\x0e.zsearch.Delta\"\x00\x12G\n\x13GetAllDomainRecords\x12\x12.zsearch.HostQuery\x1a\x1a.zsearch.HostQueryResponse\"\x00\x12:\n\x12GetHostDomainDelta\x12\x12.zsearch.HostQuery\x1a\x0e.zsearch.Delta\"\x00\x12L\n\x0eGetCertificate\x12\x17.zsearch.AnonymousQuery\x1a\x1f.zsearch.AnonymousQueryResponse\"\x00\x12H\n\x11UpsertCertificate\x12\x18.zsearch.AnonymousRecord\x1a\x17.zsearch.AnonymousDelta\"\x00\x12K\n\x14UpsertRawCertificate\x12\x18.zsearch.AnonymousRecord\x1a\x17.zsearch.AnonymousDelta\"\x00\x12Q\n\x13GetCryptographicKey\x12\x17.zsearch.AnonymousQuery\x1a\x1f.zsearch.AnonymousQueryResponse\"\x00\x12M\n\x16UpsertCryptographicKey\x12\x18.zsearch.AnonymousRecord\x1a\x17.zsearch.AnonymousDelta\"\x00\x12@\n\x11GetPublicLocation\x12\x12.zsearch.HostQuery\x1a\x15.zsearch.LocationAtom\"\x00\x12\x44\n\x15GetRestrictedLocation\x12\x12.zsearch.HostQuery\x1a\x15.zsearch.LocationAtom\"\x00\x12\x31\n\x08GetWHOIS\x12\x12.zsearch.HostQuery\x1a\x0f.zsearch.Record\"\x00\x12\x38\n\x0fGetUserMetadata\x12\x12.zsearch.HostQuery\x1a\x0f.zsearch.Record\"\x00\x12;\n\x0fPutUserMetadata\x12\x0f.zsearch.Record\x1a\x15.zsearch.CommandReply\"\x00\x12\x42\n\x0cGetRootStore\x12\x17.zsearch.RootStoreQuery\x1a\x17.zsearch.RootStoreReply\"\x00\x62\x06proto3')
,
dependencies=[anonstore__pb2.DESCRIPTOR,hoststore__pb2.DESCRIPTOR,rpc__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
try:
# THESE ELEMENTS WILL BE DEPRECATED.
# Please use the generated *_pb2_grpc.py files instead.
import grpc
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
from grpc.beta import implementations as beta_implementations
from grpc.beta import interfaces as beta_interfaces
class AdminServiceStub(object):
"""Two gRPC interfaces. One from
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Shutdown = channel.unary_unary(
'/zsearch.AdminService/Shutdown',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.Status = channel.unary_unary(
'/zsearch.AdminService/Status',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.Statistics = channel.unary_unary(
'/zsearch.AdminService/Statistics',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.PruneIPv4 = channel.unary_unary(
'/zsearch.AdminService/PruneIPv4',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.PruneDomain = channel.unary_unary(
'/zsearch.AdminService/PruneDomain',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.UpdateASData = channel.unary_unary(
'/zsearch.AdminService/UpdateASData',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.UpdateLocationData = channel.unary_unary(
'/zsearch.AdminService/UpdateLocationData',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.ValidateCertificates = channel.unary_unary(
'/zsearch.AdminService/ValidateCertificates',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.FixCertificateSource = channel.unary_unary(
'/zsearch.AdminService/FixCertificateSource',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.DumpIPv4ToJSON = channel.unary_unary(
'/zsearch.AdminService/DumpIPv4ToJSON',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.DumpDomainToJSON = channel.unary_unary(
'/zsearch.AdminService/DumpDomainToJSON',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.DumpCertificatesToJSON = channel.unary_unary(
'/zsearch.AdminService/DumpCertificatesToJSON',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.DumpKeysToJSON = channel.unary_unary(
'/zsearch.AdminService/DumpKeysToJSON',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.RegenerateIPv4Deltas = channel.unary_unary(
'/zsearch.AdminService/RegenerateIPv4Deltas',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.RegenerateDomainDeltas = channel.unary_unary(
'/zsearch.AdminService/RegenerateDomainDeltas',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.RegenerateCertificateDeltas = channel.unary_unary(
'/zsearch.AdminService/RegenerateCertificateDeltas',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.RegenerateSingleCertificateDelta = channel.unary_unary(
'/zsearch.AdminService/RegenerateSingleCertificateDelta',
request_serializer=rpc__pb2.AnonymousQuery.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.ReprocessCertificates = channel.unary_unary(
'/zsearch.AdminService/ReprocessCertificates',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.ReprocessSingleCertificate = channel.unary_unary(
'/zsearch.AdminService/ReprocessSingleCertificate',
request_serializer=rpc__pb2.AnonymousQuery.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.Ping = channel.unary_unary(
'/zsearch.AdminService/Ping',
request_serializer=rpc__pb2.Command.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
class AdminServiceServicer(object):
"""Two gRPC interfaces. One from
"""
def Shutdown(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Status(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Statistics(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PruneIPv4(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PruneDomain(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateASData(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateLocationData(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ValidateCertificates(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def FixCertificateSource(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DumpIPv4ToJSON(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DumpDomainToJSON(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DumpCertificatesToJSON(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DumpKeysToJSON(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RegenerateIPv4Deltas(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RegenerateDomainDeltas(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RegenerateCertificateDeltas(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RegenerateSingleCertificateDelta(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ReprocessCertificates(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ReprocessSingleCertificate(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Ping(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_AdminServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'Shutdown': grpc.unary_unary_rpc_method_handler(
servicer.Shutdown,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'Status': grpc.unary_unary_rpc_method_handler(
servicer.Status,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'Statistics': grpc.unary_unary_rpc_method_handler(
servicer.Statistics,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'PruneIPv4': grpc.unary_unary_rpc_method_handler(
servicer.PruneIPv4,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'PruneDomain': grpc.unary_unary_rpc_method_handler(
servicer.PruneDomain,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'UpdateASData': grpc.unary_unary_rpc_method_handler(
servicer.UpdateASData,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'UpdateLocationData': grpc.unary_unary_rpc_method_handler(
servicer.UpdateLocationData,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'ValidateCertificates': grpc.unary_unary_rpc_method_handler(
servicer.ValidateCertificates,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'FixCertificateSource': grpc.unary_unary_rpc_method_handler(
servicer.FixCertificateSource,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'DumpIPv4ToJSON': grpc.unary_unary_rpc_method_handler(
servicer.DumpIPv4ToJSON,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'DumpDomainToJSON': grpc.unary_unary_rpc_method_handler(
servicer.DumpDomainToJSON,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'DumpCertificatesToJSON': grpc.unary_unary_rpc_method_handler(
servicer.DumpCertificatesToJSON,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'DumpKeysToJSON': grpc.unary_unary_rpc_method_handler(
servicer.DumpKeysToJSON,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'RegenerateIPv4Deltas': grpc.unary_unary_rpc_method_handler(
servicer.RegenerateIPv4Deltas,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'RegenerateDomainDeltas': grpc.unary_unary_rpc_method_handler(
servicer.RegenerateDomainDeltas,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'RegenerateCertificateDeltas': grpc.unary_unary_rpc_method_handler(
servicer.RegenerateCertificateDeltas,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'RegenerateSingleCertificateDelta': grpc.unary_unary_rpc_method_handler(
servicer.RegenerateSingleCertificateDelta,
request_deserializer=rpc__pb2.AnonymousQuery.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'ReprocessCertificates': grpc.unary_unary_rpc_method_handler(
servicer.ReprocessCertificates,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'ReprocessSingleCertificate': grpc.unary_unary_rpc_method_handler(
servicer.ReprocessSingleCertificate,
request_deserializer=rpc__pb2.AnonymousQuery.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'Ping': grpc.unary_unary_rpc_method_handler(
servicer.Ping,
request_deserializer=rpc__pb2.Command.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'zsearch.AdminService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class QueryServiceStub(object):
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetHostIPv4Record = channel.unary_unary(
'/zsearch.QueryService/GetHostIPv4Record',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=rpc__pb2.HostQueryResponse.FromString,
)
self.PutHostIPv4Record = channel.unary_unary(
'/zsearch.QueryService/PutHostIPv4Record',
request_serializer=hoststore__pb2.Record.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.DelHostIPv4Record = channel.unary_unary(
'/zsearch.QueryService/DelHostIPv4Record',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.GetAllIPv4Records = channel.unary_unary(
'/zsearch.QueryService/GetAllIPv4Records',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=rpc__pb2.HostQueryResponse.FromString,
)
self.GetHostIPv4Delta = channel.unary_unary(
'/zsearch.QueryService/GetHostIPv4Delta',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.GetHostDomainRecord = channel.unary_unary(
'/zsearch.QueryService/GetHostDomainRecord',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=rpc__pb2.HostQueryResponse.FromString,
)
self.PutHostDomainRecord = channel.unary_unary(
'/zsearch.QueryService/PutHostDomainRecord',
request_serializer=hoststore__pb2.Record.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.DelHostDomainRecord = channel.unary_unary(
'/zsearch.QueryService/DelHostDomainRecord',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.GetAllDomainRecords = channel.unary_unary(
'/zsearch.QueryService/GetAllDomainRecords',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=rpc__pb2.HostQueryResponse.FromString,
)
self.GetHostDomainDelta = channel.unary_unary(
'/zsearch.QueryService/GetHostDomainDelta',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Delta.FromString,
)
self.GetCertificate = channel.unary_unary(
'/zsearch.QueryService/GetCertificate',
request_serializer=rpc__pb2.AnonymousQuery.SerializeToString,
response_deserializer=rpc__pb2.AnonymousQueryResponse.FromString,
)
self.UpsertCertificate = channel.unary_unary(
'/zsearch.QueryService/UpsertCertificate',
request_serializer=anonstore__pb2.AnonymousRecord.SerializeToString,
response_deserializer=anonstore__pb2.AnonymousDelta.FromString,
)
self.UpsertRawCertificate = channel.unary_unary(
'/zsearch.QueryService/UpsertRawCertificate',
request_serializer=anonstore__pb2.AnonymousRecord.SerializeToString,
response_deserializer=anonstore__pb2.AnonymousDelta.FromString,
)
self.GetCryptographicKey = channel.unary_unary(
'/zsearch.QueryService/GetCryptographicKey',
request_serializer=rpc__pb2.AnonymousQuery.SerializeToString,
response_deserializer=rpc__pb2.AnonymousQueryResponse.FromString,
)
self.UpsertCryptographicKey = channel.unary_unary(
'/zsearch.QueryService/UpsertCryptographicKey',
request_serializer=anonstore__pb2.AnonymousRecord.SerializeToString,
response_deserializer=anonstore__pb2.AnonymousDelta.FromString,
)
self.GetPublicLocation = channel.unary_unary(
'/zsearch.QueryService/GetPublicLocation',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.LocationAtom.FromString,
)
self.GetRestrictedLocation = channel.unary_unary(
'/zsearch.QueryService/GetRestrictedLocation',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.LocationAtom.FromString,
)
self.GetWHOIS = channel.unary_unary(
'/zsearch.QueryService/GetWHOIS',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Record.FromString,
)
self.GetUserMetadata = channel.unary_unary(
'/zsearch.QueryService/GetUserMetadata',
request_serializer=rpc__pb2.HostQuery.SerializeToString,
response_deserializer=hoststore__pb2.Record.FromString,
)
self.PutUserMetadata = channel.unary_unary(
'/zsearch.QueryService/PutUserMetadata',
request_serializer=hoststore__pb2.Record.SerializeToString,
response_deserializer=rpc__pb2.CommandReply.FromString,
)
self.GetRootStore = channel.unary_unary(
'/zsearch.QueryService/GetRootStore',
request_serializer=rpc__pb2.RootStoreQuery.SerializeToString,
response_deserializer=rpc__pb2.RootStoreReply.FromString,
)
class QueryServiceServicer(object):
def GetHostIPv4Record(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PutHostIPv4Record(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DelHostIPv4Record(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetAllIPv4Records(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetHostIPv4Delta(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetHostDomainRecord(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PutHostDomainRecord(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DelHostDomainRecord(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetAllDomainRecords(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetHostDomainDelta(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetCertificate(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpsertCertificate(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpsertRawCertificate(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetCryptographicKey(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpsertCryptographicKey(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetPublicLocation(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRestrictedLocation(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetWHOIS(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetUserMetadata(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PutUserMetadata(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRootStore(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_QueryServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetHostIPv4Record': grpc.unary_unary_rpc_method_handler(
servicer.GetHostIPv4Record,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=rpc__pb2.HostQueryResponse.SerializeToString,
),
'PutHostIPv4Record': grpc.unary_unary_rpc_method_handler(
servicer.PutHostIPv4Record,
request_deserializer=hoststore__pb2.Record.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'DelHostIPv4Record': grpc.unary_unary_rpc_method_handler(
servicer.DelHostIPv4Record,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'GetAllIPv4Records': grpc.unary_unary_rpc_method_handler(
servicer.GetAllIPv4Records,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=rpc__pb2.HostQueryResponse.SerializeToString,
),
'GetHostIPv4Delta': grpc.unary_unary_rpc_method_handler(
servicer.GetHostIPv4Delta,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'GetHostDomainRecord': grpc.unary_unary_rpc_method_handler(
servicer.GetHostDomainRecord,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=rpc__pb2.HostQueryResponse.SerializeToString,
),
'PutHostDomainRecord': grpc.unary_unary_rpc_method_handler(
servicer.PutHostDomainRecord,
request_deserializer=hoststore__pb2.Record.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'DelHostDomainRecord': grpc.unary_unary_rpc_method_handler(
servicer.DelHostDomainRecord,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'GetAllDomainRecords': grpc.unary_unary_rpc_method_handler(
servicer.GetAllDomainRecords,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=rpc__pb2.HostQueryResponse.SerializeToString,
),
'GetHostDomainDelta': grpc.unary_unary_rpc_method_handler(
servicer.GetHostDomainDelta,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Delta.SerializeToString,
),
'GetCertificate': grpc.unary_unary_rpc_method_handler(
servicer.GetCertificate,
request_deserializer=rpc__pb2.AnonymousQuery.FromString,
response_serializer=rpc__pb2.AnonymousQueryResponse.SerializeToString,
),
'UpsertCertificate': grpc.unary_unary_rpc_method_handler(
servicer.UpsertCertificate,
request_deserializer=anonstore__pb2.AnonymousRecord.FromString,
response_serializer=anonstore__pb2.AnonymousDelta.SerializeToString,
),
'UpsertRawCertificate': grpc.unary_unary_rpc_method_handler(
servicer.UpsertRawCertificate,
request_deserializer=anonstore__pb2.AnonymousRecord.FromString,
response_serializer=anonstore__pb2.AnonymousDelta.SerializeToString,
),
'GetCryptographicKey': grpc.unary_unary_rpc_method_handler(
servicer.GetCryptographicKey,
request_deserializer=rpc__pb2.AnonymousQuery.FromString,
response_serializer=rpc__pb2.AnonymousQueryResponse.SerializeToString,
),
'UpsertCryptographicKey': grpc.unary_unary_rpc_method_handler(
servicer.UpsertCryptographicKey,
request_deserializer=anonstore__pb2.AnonymousRecord.FromString,
response_serializer=anonstore__pb2.AnonymousDelta.SerializeToString,
),
'GetPublicLocation': grpc.unary_unary_rpc_method_handler(
servicer.GetPublicLocation,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.LocationAtom.SerializeToString,
),
'GetRestrictedLocation': grpc.unary_unary_rpc_method_handler(
servicer.GetRestrictedLocation,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.LocationAtom.SerializeToString,
),
'GetWHOIS': grpc.unary_unary_rpc_method_handler(
servicer.GetWHOIS,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Record.SerializeToString,
),
'GetUserMetadata': grpc.unary_unary_rpc_method_handler(
servicer.GetUserMetadata,
request_deserializer=rpc__pb2.HostQuery.FromString,
response_serializer=hoststore__pb2.Record.SerializeToString,
),
'PutUserMetadata': grpc.unary_unary_rpc_method_handler(
servicer.PutUserMetadata,
request_deserializer=hoststore__pb2.Record.FromString,
response_serializer=rpc__pb2.CommandReply.SerializeToString,
),
'GetRootStore': grpc.unary_unary_rpc_method_handler(
servicer.GetRootStore,
request_deserializer=rpc__pb2.RootStoreQuery.FromString,
response_serializer=rpc__pb2.RootStoreReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'zsearch.QueryService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class BetaAdminServiceServicer(object):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This class was generated
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
"""Two gRPC interfaces. One from
"""
def Shutdown(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def Status(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def Statistics(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def PruneIPv4(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def PruneDomain(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def UpdateASData(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def UpdateLocationData(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ValidateCertificates(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def FixCertificateSource(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DumpIPv4ToJSON(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DumpDomainToJSON(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DumpCertificatesToJSON(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DumpKeysToJSON(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def RegenerateIPv4Deltas(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def RegenerateDomainDeltas(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def RegenerateCertificateDeltas(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def RegenerateSingleCertificateDelta(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ReprocessCertificates(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ReprocessSingleCertificate(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def Ping(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
class BetaAdminServiceStub(object):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This class was generated
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
"""Two gRPC interfaces. One from
"""
def Shutdown(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
Shutdown.future = None
def Status(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
Status.future = None
def Statistics(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
Statistics.future = None
def PruneIPv4(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
PruneIPv4.future = None
def PruneDomain(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
PruneDomain.future = None
def UpdateASData(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
UpdateASData.future = None
def UpdateLocationData(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
UpdateLocationData.future = None
def ValidateCertificates(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
ValidateCertificates.future = None
def FixCertificateSource(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
FixCertificateSource.future = None
def DumpIPv4ToJSON(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
DumpIPv4ToJSON.future = None
def DumpDomainToJSON(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
DumpDomainToJSON.future = None
def DumpCertificatesToJSON(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
DumpCertificatesToJSON.future = None
def DumpKeysToJSON(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
DumpKeysToJSON.future = None
def RegenerateIPv4Deltas(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
RegenerateIPv4Deltas.future = None
def RegenerateDomainDeltas(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
RegenerateDomainDeltas.future = None
def RegenerateCertificateDeltas(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
RegenerateCertificateDeltas.future = None
def RegenerateSingleCertificateDelta(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
RegenerateSingleCertificateDelta.future = None
def ReprocessCertificates(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
ReprocessCertificates.future = None
def ReprocessSingleCertificate(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
ReprocessSingleCertificate.future = None
def Ping(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
Ping.future = None
def beta_create_AdminService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('zsearch.AdminService', 'DumpCertificatesToJSON'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'DumpDomainToJSON'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'DumpIPv4ToJSON'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'DumpKeysToJSON'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'FixCertificateSource'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'Ping'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'PruneDomain'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'PruneIPv4'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'RegenerateCertificateDeltas'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'RegenerateDomainDeltas'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'RegenerateIPv4Deltas'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'RegenerateSingleCertificateDelta'): rpc__pb2.AnonymousQuery.FromString,
('zsearch.AdminService', 'ReprocessCertificates'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'ReprocessSingleCertificate'): rpc__pb2.AnonymousQuery.FromString,
('zsearch.AdminService', 'Shutdown'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'Statistics'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'Status'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'UpdateASData'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'UpdateLocationData'): rpc__pb2.Command.FromString,
('zsearch.AdminService', 'ValidateCertificates'): rpc__pb2.Command.FromString,
}
response_serializers = {
('zsearch.AdminService', 'DumpCertificatesToJSON'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'DumpDomainToJSON'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'DumpIPv4ToJSON'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'DumpKeysToJSON'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'FixCertificateSource'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'Ping'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'PruneDomain'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'PruneIPv4'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'RegenerateCertificateDeltas'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'RegenerateDomainDeltas'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'RegenerateIPv4Deltas'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'RegenerateSingleCertificateDelta'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'ReprocessCertificates'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'ReprocessSingleCertificate'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'Shutdown'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'Statistics'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'Status'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'UpdateASData'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'UpdateLocationData'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.AdminService', 'ValidateCertificates'): rpc__pb2.CommandReply.SerializeToString,
}
method_implementations = {
('zsearch.AdminService', 'DumpCertificatesToJSON'): face_utilities.unary_unary_inline(servicer.DumpCertificatesToJSON),
('zsearch.AdminService', 'DumpDomainToJSON'): face_utilities.unary_unary_inline(servicer.DumpDomainToJSON),
('zsearch.AdminService', 'DumpIPv4ToJSON'): face_utilities.unary_unary_inline(servicer.DumpIPv4ToJSON),
('zsearch.AdminService', 'DumpKeysToJSON'): face_utilities.unary_unary_inline(servicer.DumpKeysToJSON),
('zsearch.AdminService', 'FixCertificateSource'): face_utilities.unary_unary_inline(servicer.FixCertificateSource),
('zsearch.AdminService', 'Ping'): face_utilities.unary_unary_inline(servicer.Ping),
('zsearch.AdminService', 'PruneDomain'): face_utilities.unary_unary_inline(servicer.PruneDomain),
('zsearch.AdminService', 'PruneIPv4'): face_utilities.unary_unary_inline(servicer.PruneIPv4),
('zsearch.AdminService', 'RegenerateCertificateDeltas'): face_utilities.unary_unary_inline(servicer.RegenerateCertificateDeltas),
('zsearch.AdminService', 'RegenerateDomainDeltas'): face_utilities.unary_unary_inline(servicer.RegenerateDomainDeltas),
('zsearch.AdminService', 'RegenerateIPv4Deltas'): face_utilities.unary_unary_inline(servicer.RegenerateIPv4Deltas),
('zsearch.AdminService', 'RegenerateSingleCertificateDelta'): face_utilities.unary_unary_inline(servicer.RegenerateSingleCertificateDelta),
('zsearch.AdminService', 'ReprocessCertificates'): face_utilities.unary_unary_inline(servicer.ReprocessCertificates),
('zsearch.AdminService', 'ReprocessSingleCertificate'): face_utilities.unary_unary_inline(servicer.ReprocessSingleCertificate),
('zsearch.AdminService', 'Shutdown'): face_utilities.unary_unary_inline(servicer.Shutdown),
('zsearch.AdminService', 'Statistics'): face_utilities.unary_unary_inline(servicer.Statistics),
('zsearch.AdminService', 'Status'): face_utilities.unary_unary_inline(servicer.Status),
('zsearch.AdminService', 'UpdateASData'): face_utilities.unary_unary_inline(servicer.UpdateASData),
('zsearch.AdminService', 'UpdateLocationData'): face_utilities.unary_unary_inline(servicer.UpdateLocationData),
('zsearch.AdminService', 'ValidateCertificates'): face_utilities.unary_unary_inline(servicer.ValidateCertificates),
}
server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
return beta_implementations.server(method_implementations, options=server_options)
def beta_create_AdminService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_serializers = {
('zsearch.AdminService', 'DumpCertificatesToJSON'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'DumpDomainToJSON'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'DumpIPv4ToJSON'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'DumpKeysToJSON'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'FixCertificateSource'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'Ping'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'PruneDomain'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'PruneIPv4'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'RegenerateCertificateDeltas'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'RegenerateDomainDeltas'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'RegenerateIPv4Deltas'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'RegenerateSingleCertificateDelta'): rpc__pb2.AnonymousQuery.SerializeToString,
('zsearch.AdminService', 'ReprocessCertificates'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'ReprocessSingleCertificate'): rpc__pb2.AnonymousQuery.SerializeToString,
('zsearch.AdminService', 'Shutdown'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'Statistics'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'Status'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'UpdateASData'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'UpdateLocationData'): rpc__pb2.Command.SerializeToString,
('zsearch.AdminService', 'ValidateCertificates'): rpc__pb2.Command.SerializeToString,
}
response_deserializers = {
('zsearch.AdminService', 'DumpCertificatesToJSON'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'DumpDomainToJSON'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'DumpIPv4ToJSON'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'DumpKeysToJSON'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'FixCertificateSource'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'Ping'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'PruneDomain'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'PruneIPv4'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'RegenerateCertificateDeltas'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'RegenerateDomainDeltas'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'RegenerateIPv4Deltas'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'RegenerateSingleCertificateDelta'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'ReprocessCertificates'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'ReprocessSingleCertificate'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'Shutdown'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'Statistics'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'Status'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'UpdateASData'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'UpdateLocationData'): rpc__pb2.CommandReply.FromString,
('zsearch.AdminService', 'ValidateCertificates'): rpc__pb2.CommandReply.FromString,
}
cardinalities = {
'DumpCertificatesToJSON': cardinality.Cardinality.UNARY_UNARY,
'DumpDomainToJSON': cardinality.Cardinality.UNARY_UNARY,
'DumpIPv4ToJSON': cardinality.Cardinality.UNARY_UNARY,
'DumpKeysToJSON': cardinality.Cardinality.UNARY_UNARY,
'FixCertificateSource': cardinality.Cardinality.UNARY_UNARY,
'Ping': cardinality.Cardinality.UNARY_UNARY,
'PruneDomain': cardinality.Cardinality.UNARY_UNARY,
'PruneIPv4': cardinality.Cardinality.UNARY_UNARY,
'RegenerateCertificateDeltas': cardinality.Cardinality.UNARY_UNARY,
'RegenerateDomainDeltas': cardinality.Cardinality.UNARY_UNARY,
'RegenerateIPv4Deltas': cardinality.Cardinality.UNARY_UNARY,
'RegenerateSingleCertificateDelta': cardinality.Cardinality.UNARY_UNARY,
'ReprocessCertificates': cardinality.Cardinality.UNARY_UNARY,
'ReprocessSingleCertificate': cardinality.Cardinality.UNARY_UNARY,
'Shutdown': cardinality.Cardinality.UNARY_UNARY,
'Statistics': cardinality.Cardinality.UNARY_UNARY,
'Status': cardinality.Cardinality.UNARY_UNARY,
'UpdateASData': cardinality.Cardinality.UNARY_UNARY,
'UpdateLocationData': cardinality.Cardinality.UNARY_UNARY,
'ValidateCertificates': cardinality.Cardinality.UNARY_UNARY,
}
stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
return beta_implementations.dynamic_stub(channel, 'zsearch.AdminService', cardinalities, options=stub_options)
class BetaQueryServiceServicer(object):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This class was generated
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
def GetHostIPv4Record(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def PutHostIPv4Record(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DelHostIPv4Record(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetAllIPv4Records(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetHostIPv4Delta(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetHostDomainRecord(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def PutHostDomainRecord(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DelHostDomainRecord(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetAllDomainRecords(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetHostDomainDelta(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetCertificate(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def UpsertCertificate(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def UpsertRawCertificate(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetCryptographicKey(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def UpsertCryptographicKey(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetPublicLocation(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetRestrictedLocation(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetWHOIS(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetUserMetadata(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def PutUserMetadata(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetRootStore(self, request, context):
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
class BetaQueryServiceStub(object):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This class was generated
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
def GetHostIPv4Record(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetHostIPv4Record.future = None
def PutHostIPv4Record(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
PutHostIPv4Record.future = None
def DelHostIPv4Record(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
DelHostIPv4Record.future = None
def GetAllIPv4Records(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetAllIPv4Records.future = None
def GetHostIPv4Delta(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetHostIPv4Delta.future = None
def GetHostDomainRecord(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetHostDomainRecord.future = None
def PutHostDomainRecord(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
PutHostDomainRecord.future = None
def DelHostDomainRecord(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
DelHostDomainRecord.future = None
def GetAllDomainRecords(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetAllDomainRecords.future = None
def GetHostDomainDelta(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetHostDomainDelta.future = None
def GetCertificate(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetCertificate.future = None
def UpsertCertificate(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
UpsertCertificate.future = None
def UpsertRawCertificate(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
UpsertRawCertificate.future = None
def GetCryptographicKey(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetCryptographicKey.future = None
def UpsertCryptographicKey(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
UpsertCryptographicKey.future = None
def GetPublicLocation(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetPublicLocation.future = None
def GetRestrictedLocation(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetRestrictedLocation.future = None
def GetWHOIS(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetWHOIS.future = None
def GetUserMetadata(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetUserMetadata.future = None
def PutUserMetadata(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
PutUserMetadata.future = None
def GetRootStore(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
raise NotImplementedError()
GetRootStore.future = None
def beta_create_QueryService_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('zsearch.QueryService', 'DelHostDomainRecord'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'DelHostIPv4Record'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'GetAllDomainRecords'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'GetAllIPv4Records'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'GetCertificate'): rpc__pb2.AnonymousQuery.FromString,
('zsearch.QueryService', 'GetCryptographicKey'): rpc__pb2.AnonymousQuery.FromString,
('zsearch.QueryService', 'GetHostDomainDelta'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'GetHostDomainRecord'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'GetHostIPv4Delta'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'GetHostIPv4Record'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'GetPublicLocation'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'GetRestrictedLocation'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'GetRootStore'): rpc__pb2.RootStoreQuery.FromString,
('zsearch.QueryService', 'GetUserMetadata'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'GetWHOIS'): rpc__pb2.HostQuery.FromString,
('zsearch.QueryService', 'PutHostDomainRecord'): hoststore__pb2.Record.FromString,
('zsearch.QueryService', 'PutHostIPv4Record'): hoststore__pb2.Record.FromString,
('zsearch.QueryService', 'PutUserMetadata'): hoststore__pb2.Record.FromString,
('zsearch.QueryService', 'UpsertCertificate'): anonstore__pb2.AnonymousRecord.FromString,
('zsearch.QueryService', 'UpsertCryptographicKey'): anonstore__pb2.AnonymousRecord.FromString,
('zsearch.QueryService', 'UpsertRawCertificate'): anonstore__pb2.AnonymousRecord.FromString,
}
response_serializers = {
('zsearch.QueryService', 'DelHostDomainRecord'): hoststore__pb2.Delta.SerializeToString,
('zsearch.QueryService', 'DelHostIPv4Record'): hoststore__pb2.Delta.SerializeToString,
('zsearch.QueryService', 'GetAllDomainRecords'): rpc__pb2.HostQueryResponse.SerializeToString,
('zsearch.QueryService', 'GetAllIPv4Records'): rpc__pb2.HostQueryResponse.SerializeToString,
('zsearch.QueryService', 'GetCertificate'): rpc__pb2.AnonymousQueryResponse.SerializeToString,
('zsearch.QueryService', 'GetCryptographicKey'): rpc__pb2.AnonymousQueryResponse.SerializeToString,
('zsearch.QueryService', 'GetHostDomainDelta'): hoststore__pb2.Delta.SerializeToString,
('zsearch.QueryService', 'GetHostDomainRecord'): rpc__pb2.HostQueryResponse.SerializeToString,
('zsearch.QueryService', 'GetHostIPv4Delta'): hoststore__pb2.Delta.SerializeToString,
('zsearch.QueryService', 'GetHostIPv4Record'): rpc__pb2.HostQueryResponse.SerializeToString,
('zsearch.QueryService', 'GetPublicLocation'): hoststore__pb2.LocationAtom.SerializeToString,
('zsearch.QueryService', 'GetRestrictedLocation'): hoststore__pb2.LocationAtom.SerializeToString,
('zsearch.QueryService', 'GetRootStore'): rpc__pb2.RootStoreReply.SerializeToString,
('zsearch.QueryService', 'GetUserMetadata'): hoststore__pb2.Record.SerializeToString,
('zsearch.QueryService', 'GetWHOIS'): hoststore__pb2.Record.SerializeToString,
('zsearch.QueryService', 'PutHostDomainRecord'): hoststore__pb2.Delta.SerializeToString,
('zsearch.QueryService', 'PutHostIPv4Record'): hoststore__pb2.Delta.SerializeToString,
('zsearch.QueryService', 'PutUserMetadata'): rpc__pb2.CommandReply.SerializeToString,
('zsearch.QueryService', 'UpsertCertificate'): anonstore__pb2.AnonymousDelta.SerializeToString,
('zsearch.QueryService', 'UpsertCryptographicKey'): anonstore__pb2.AnonymousDelta.SerializeToString,
('zsearch.QueryService', 'UpsertRawCertificate'): anonstore__pb2.AnonymousDelta.SerializeToString,
}
method_implementations = {
('zsearch.QueryService', 'DelHostDomainRecord'): face_utilities.unary_unary_inline(servicer.DelHostDomainRecord),
('zsearch.QueryService', 'DelHostIPv4Record'): face_utilities.unary_unary_inline(servicer.DelHostIPv4Record),
('zsearch.QueryService', 'GetAllDomainRecords'): face_utilities.unary_unary_inline(servicer.GetAllDomainRecords),
('zsearch.QueryService', 'GetAllIPv4Records'): face_utilities.unary_unary_inline(servicer.GetAllIPv4Records),
('zsearch.QueryService', 'GetCertificate'): face_utilities.unary_unary_inline(servicer.GetCertificate),
('zsearch.QueryService', 'GetCryptographicKey'): face_utilities.unary_unary_inline(servicer.GetCryptographicKey),
('zsearch.QueryService', 'GetHostDomainDelta'): face_utilities.unary_unary_inline(servicer.GetHostDomainDelta),
('zsearch.QueryService', 'GetHostDomainRecord'): face_utilities.unary_unary_inline(servicer.GetHostDomainRecord),
('zsearch.QueryService', 'GetHostIPv4Delta'): face_utilities.unary_unary_inline(servicer.GetHostIPv4Delta),
('zsearch.QueryService', 'GetHostIPv4Record'): face_utilities.unary_unary_inline(servicer.GetHostIPv4Record),
('zsearch.QueryService', 'GetPublicLocation'): face_utilities.unary_unary_inline(servicer.GetPublicLocation),
('zsearch.QueryService', 'GetRestrictedLocation'): face_utilities.unary_unary_inline(servicer.GetRestrictedLocation),
('zsearch.QueryService', 'GetRootStore'): face_utilities.unary_unary_inline(servicer.GetRootStore),
('zsearch.QueryService', 'GetUserMetadata'): face_utilities.unary_unary_inline(servicer.GetUserMetadata),
('zsearch.QueryService', 'GetWHOIS'): face_utilities.unary_unary_inline(servicer.GetWHOIS),
('zsearch.QueryService', 'PutHostDomainRecord'): face_utilities.unary_unary_inline(servicer.PutHostDomainRecord),
('zsearch.QueryService', 'PutHostIPv4Record'): face_utilities.unary_unary_inline(servicer.PutHostIPv4Record),
('zsearch.QueryService', 'PutUserMetadata'): face_utilities.unary_unary_inline(servicer.PutUserMetadata),
('zsearch.QueryService', 'UpsertCertificate'): face_utilities.unary_unary_inline(servicer.UpsertCertificate),
('zsearch.QueryService', 'UpsertCryptographicKey'): face_utilities.unary_unary_inline(servicer.UpsertCryptographicKey),
('zsearch.QueryService', 'UpsertRawCertificate'): face_utilities.unary_unary_inline(servicer.UpsertRawCertificate),
}
server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
return beta_implementations.server(method_implementations, options=server_options)
def beta_create_QueryService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_serializers = {
('zsearch.QueryService', 'DelHostDomainRecord'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'DelHostIPv4Record'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'GetAllDomainRecords'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'GetAllIPv4Records'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'GetCertificate'): rpc__pb2.AnonymousQuery.SerializeToString,
('zsearch.QueryService', 'GetCryptographicKey'): rpc__pb2.AnonymousQuery.SerializeToString,
('zsearch.QueryService', 'GetHostDomainDelta'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'GetHostDomainRecord'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'GetHostIPv4Delta'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'GetHostIPv4Record'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'GetPublicLocation'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'GetRestrictedLocation'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'GetRootStore'): rpc__pb2.RootStoreQuery.SerializeToString,
('zsearch.QueryService', 'GetUserMetadata'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'GetWHOIS'): rpc__pb2.HostQuery.SerializeToString,
('zsearch.QueryService', 'PutHostDomainRecord'): hoststore__pb2.Record.SerializeToString,
('zsearch.QueryService', 'PutHostIPv4Record'): hoststore__pb2.Record.SerializeToString,
('zsearch.QueryService', 'PutUserMetadata'): hoststore__pb2.Record.SerializeToString,
('zsearch.QueryService', 'UpsertCertificate'): anonstore__pb2.AnonymousRecord.SerializeToString,
('zsearch.QueryService', 'UpsertCryptographicKey'): anonstore__pb2.AnonymousRecord.SerializeToString,
('zsearch.QueryService', 'UpsertRawCertificate'): anonstore__pb2.AnonymousRecord.SerializeToString,
}
response_deserializers = {
('zsearch.QueryService', 'DelHostDomainRecord'): hoststore__pb2.Delta.FromString,
('zsearch.QueryService', 'DelHostIPv4Record'): hoststore__pb2.Delta.FromString,
('zsearch.QueryService', 'GetAllDomainRecords'): rpc__pb2.HostQueryResponse.FromString,
('zsearch.QueryService', 'GetAllIPv4Records'): rpc__pb2.HostQueryResponse.FromString,
('zsearch.QueryService', 'GetCertificate'): rpc__pb2.AnonymousQueryResponse.FromString,
('zsearch.QueryService', 'GetCryptographicKey'): rpc__pb2.AnonymousQueryResponse.FromString,
('zsearch.QueryService', 'GetHostDomainDelta'): hoststore__pb2.Delta.FromString,
('zsearch.QueryService', 'GetHostDomainRecord'): rpc__pb2.HostQueryResponse.FromString,
('zsearch.QueryService', 'GetHostIPv4Delta'): hoststore__pb2.Delta.FromString,
('zsearch.QueryService', 'GetHostIPv4Record'): rpc__pb2.HostQueryResponse.FromString,
('zsearch.QueryService', 'GetPublicLocation'): hoststore__pb2.LocationAtom.FromString,
('zsearch.QueryService', 'GetRestrictedLocation'): hoststore__pb2.LocationAtom.FromString,
('zsearch.QueryService', 'GetRootStore'): rpc__pb2.RootStoreReply.FromString,
('zsearch.QueryService', 'GetUserMetadata'): hoststore__pb2.Record.FromString,
('zsearch.QueryService', 'GetWHOIS'): hoststore__pb2.Record.FromString,
('zsearch.QueryService', 'PutHostDomainRecord'): hoststore__pb2.Delta.FromString,
('zsearch.QueryService', 'PutHostIPv4Record'): hoststore__pb2.Delta.FromString,
('zsearch.QueryService', 'PutUserMetadata'): rpc__pb2.CommandReply.FromString,
('zsearch.QueryService', 'UpsertCertificate'): anonstore__pb2.AnonymousDelta.FromString,
('zsearch.QueryService', 'UpsertCryptographicKey'): anonstore__pb2.AnonymousDelta.FromString,
('zsearch.QueryService', 'UpsertRawCertificate'): anonstore__pb2.AnonymousDelta.FromString,
}
cardinalities = {
'DelHostDomainRecord': cardinality.Cardinality.UNARY_UNARY,
'DelHostIPv4Record': cardinality.Cardinality.UNARY_UNARY,
'GetAllDomainRecords': cardinality.Cardinality.UNARY_UNARY,
'GetAllIPv4Records': cardinality.Cardinality.UNARY_UNARY,
'GetCertificate': cardinality.Cardinality.UNARY_UNARY,
'GetCryptographicKey': cardinality.Cardinality.UNARY_UNARY,
'GetHostDomainDelta': cardinality.Cardinality.UNARY_UNARY,
'GetHostDomainRecord': cardinality.Cardinality.UNARY_UNARY,
'GetHostIPv4Delta': cardinality.Cardinality.UNARY_UNARY,
'GetHostIPv4Record': cardinality.Cardinality.UNARY_UNARY,
'GetPublicLocation': cardinality.Cardinality.UNARY_UNARY,
'GetRestrictedLocation': cardinality.Cardinality.UNARY_UNARY,
'GetRootStore': cardinality.Cardinality.UNARY_UNARY,
'GetUserMetadata': cardinality.Cardinality.UNARY_UNARY,
'GetWHOIS': cardinality.Cardinality.UNARY_UNARY,
'PutHostDomainRecord': cardinality.Cardinality.UNARY_UNARY,
'PutHostIPv4Record': cardinality.Cardinality.UNARY_UNARY,
'PutUserMetadata': cardinality.Cardinality.UNARY_UNARY,
'UpsertCertificate': cardinality.Cardinality.UNARY_UNARY,
'UpsertCryptographicKey': cardinality.Cardinality.UNARY_UNARY,
'UpsertRawCertificate': cardinality.Cardinality.UNARY_UNARY,
}
stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
return beta_implementations.dynamic_stub(channel, 'zsearch.QueryService', cardinalities, options=stub_options)
except ImportError:
pass
# @@protoc_insertion_point(module_scope) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/search_pb2.py | search_pb2.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
import common_pb2 as common__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='hoststore.proto',
package='zsearch',
syntax='proto3',
serialized_pb=_b('\n\x0fhoststore.proto\x12\x07zsearch\x1a\x0c\x63ommon.proto\"\x0b\n\tWHOISAtom\"\xf1\x01\n\x0cLocationAtom\x12\x11\n\tcontinent\x18\x01 \x01(\t\x12\x0f\n\x07\x63ountry\x18\x02 \x01(\t\x12\x14\n\x0c\x63ountry_code\x18\x03 \x01(\t\x12\x0c\n\x04\x63ity\x18\x04 \x01(\t\x12\x13\n\x0bpostal_code\x18\x05 \x01(\t\x12\x10\n\x08timezone\x18\x06 \x01(\t\x12\x10\n\x08province\x18\x07 \x01(\t\x12\x10\n\x08latitude\x18\x08 \x01(\x01\x12\x11\n\tlongitude\x18\t \x01(\x01\x12\x1a\n\x12registered_country\x18\n \x01(\t\x12\x1f\n\x17registered_country_code\x18\x0b \x01(\t\"P\n\x0cProtocolAtom\x12$\n\x08metadata\x18\x01 \x03(\x0b\x32\x12.zsearch.Metadatum\x12\x0c\n\x04tags\x18\x02 \x03(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\t\"C\n\x0c\x41nonymousKey\x12\x0c\n\x04port\x18\x01 \x01(\r\x12\x10\n\x08protocol\x18\x02 \x01(\r\x12\x13\n\x0bsubprotocol\x18\x03 \x01(\r\"\xb9\x04\n\x06Record\x12\n\n\x02ip\x18\x01 \x01(\x07\x12\x0c\n\x04port\x18\x02 \x01(\r\x12\x10\n\x08protocol\x18\x03 \x01(\r\x12\x13\n\x0bsubprotocol\x18\x04 \x01(\r\x12\x0e\n\x06\x64omain\x18\x05 \x01(\t\x12\x11\n\ttimestamp\x18\x06 \x01(\x07\x12\x0e\n\x06scanid\x18\x07 \x01(\r\x12\x10\n\x08sha256fp\x18\x08 \x01(\x0c\x12\x1d\n\x15\x66irst_seen_at_scan_id\x18\t \x01(\r\x12\x1c\n\x14last_seen_at_scan_id\x18\n \x01(\r\x12%\n\x04\x61tom\x18\x0b \x01(\x0b\x32\x15.zsearch.ProtocolAtomH\x00\x12\x31\n\x10private_location\x18\x0c \x01(\x0b\x32\x15.zsearch.LocationAtomH\x00\x12\"\n\x07\x61s_atom\x18\r \x01(\x0b\x32\x0f.zsearch.ASAtomH\x00\x12#\n\x05whois\x18\x0e \x01(\x0b\x32\x12.zsearch.WHOISAtomH\x00\x12)\n\x08userdata\x18\x0f \x01(\x0b\x32\x15.zsearch.UserdataAtomH\x00\x12\x30\n\x0fpublic_location\x18\x11 \x01(\x0b\x32\x15.zsearch.LocationAtomH\x00\x12\x14\n\nalexa_rank\x18\x10 \x01(\rH\x00\x12\x18\n\x0equantcast_rank\x18\x13 \x01(\rH\x00\x12\x1d\n\x13\x63isco_umbrella_rank\x18\x14 \x01(\rH\x00\x12\x0f\n\x07version\x18\x12 \x01(\x04\x42\x0c\n\ndata_oneof\"~\n\x05\x44\x65lta\x12&\n\ndelta_type\x18\x01 \x01(\x0e\x32\x12.zsearch.DeltaType\x12\n\n\x02ip\x18\x02 \x01(\x07\x12\x0e\n\x06\x64omain\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\x04\x12 \n\x07records\x18\x05 \x03(\x0b\x32\x0f.zsearch.Recordb\x06proto3')
,
dependencies=[common__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_WHOISATOM = _descriptor.Descriptor(
name='WHOISAtom',
full_name='zsearch.WHOISAtom',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=42,
serialized_end=53,
)
_LOCATIONATOM = _descriptor.Descriptor(
name='LocationAtom',
full_name='zsearch.LocationAtom',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='continent', full_name='zsearch.LocationAtom.continent', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='country', full_name='zsearch.LocationAtom.country', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='country_code', full_name='zsearch.LocationAtom.country_code', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='city', full_name='zsearch.LocationAtom.city', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='postal_code', full_name='zsearch.LocationAtom.postal_code', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='timezone', full_name='zsearch.LocationAtom.timezone', index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='province', full_name='zsearch.LocationAtom.province', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='latitude', full_name='zsearch.LocationAtom.latitude', index=7,
number=8, type=1, cpp_type=5, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='longitude', full_name='zsearch.LocationAtom.longitude', index=8,
number=9, type=1, cpp_type=5, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='registered_country', full_name='zsearch.LocationAtom.registered_country', index=9,
number=10, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='registered_country_code', full_name='zsearch.LocationAtom.registered_country_code', index=10,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=56,
serialized_end=297,
)
_PROTOCOLATOM = _descriptor.Descriptor(
name='ProtocolAtom',
full_name='zsearch.ProtocolAtom',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='metadata', full_name='zsearch.ProtocolAtom.metadata', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='tags', full_name='zsearch.ProtocolAtom.tags', index=1,
number=2, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='data', full_name='zsearch.ProtocolAtom.data', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=299,
serialized_end=379,
)
_ANONYMOUSKEY = _descriptor.Descriptor(
name='AnonymousKey',
full_name='zsearch.AnonymousKey',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='port', full_name='zsearch.AnonymousKey.port', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='protocol', full_name='zsearch.AnonymousKey.protocol', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='subprotocol', full_name='zsearch.AnonymousKey.subprotocol', index=2,
number=3, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=381,
serialized_end=448,
)
_RECORD = _descriptor.Descriptor(
name='Record',
full_name='zsearch.Record',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='ip', full_name='zsearch.Record.ip', index=0,
number=1, type=7, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='port', full_name='zsearch.Record.port', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='protocol', full_name='zsearch.Record.protocol', index=2,
number=3, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='subprotocol', full_name='zsearch.Record.subprotocol', index=3,
number=4, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='domain', full_name='zsearch.Record.domain', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='timestamp', full_name='zsearch.Record.timestamp', index=5,
number=6, type=7, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='scanid', full_name='zsearch.Record.scanid', index=6,
number=7, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='sha256fp', full_name='zsearch.Record.sha256fp', index=7,
number=8, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='first_seen_at_scan_id', full_name='zsearch.Record.first_seen_at_scan_id', index=8,
number=9, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='last_seen_at_scan_id', full_name='zsearch.Record.last_seen_at_scan_id', index=9,
number=10, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='atom', full_name='zsearch.Record.atom', index=10,
number=11, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='private_location', full_name='zsearch.Record.private_location', index=11,
number=12, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='as_atom', full_name='zsearch.Record.as_atom', index=12,
number=13, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='whois', full_name='zsearch.Record.whois', index=13,
number=14, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='userdata', full_name='zsearch.Record.userdata', index=14,
number=15, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='public_location', full_name='zsearch.Record.public_location', index=15,
number=17, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='alexa_rank', full_name='zsearch.Record.alexa_rank', index=16,
number=16, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='quantcast_rank', full_name='zsearch.Record.quantcast_rank', index=17,
number=19, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cisco_umbrella_rank', full_name='zsearch.Record.cisco_umbrella_rank', index=18,
number=20, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='version', full_name='zsearch.Record.version', index=19,
number=18, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='data_oneof', full_name='zsearch.Record.data_oneof',
index=0, containing_type=None, fields=[]),
],
serialized_start=451,
serialized_end=1020,
)
_DELTA = _descriptor.Descriptor(
name='Delta',
full_name='zsearch.Delta',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='delta_type', full_name='zsearch.Delta.delta_type', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='ip', full_name='zsearch.Delta.ip', index=1,
number=2, type=7, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='domain', full_name='zsearch.Delta.domain', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='version', full_name='zsearch.Delta.version', index=3,
number=4, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='records', full_name='zsearch.Delta.records', index=4,
number=5, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=1022,
serialized_end=1148,
)
_PROTOCOLATOM.fields_by_name['metadata'].message_type = common__pb2._METADATUM
_RECORD.fields_by_name['atom'].message_type = _PROTOCOLATOM
_RECORD.fields_by_name['private_location'].message_type = _LOCATIONATOM
_RECORD.fields_by_name['as_atom'].message_type = common__pb2._ASATOM
_RECORD.fields_by_name['whois'].message_type = _WHOISATOM
_RECORD.fields_by_name['userdata'].message_type = common__pb2._USERDATAATOM
_RECORD.fields_by_name['public_location'].message_type = _LOCATIONATOM
_RECORD.oneofs_by_name['data_oneof'].fields.append(
_RECORD.fields_by_name['atom'])
_RECORD.fields_by_name['atom'].containing_oneof = _RECORD.oneofs_by_name['data_oneof']
_RECORD.oneofs_by_name['data_oneof'].fields.append(
_RECORD.fields_by_name['private_location'])
_RECORD.fields_by_name['private_location'].containing_oneof = _RECORD.oneofs_by_name['data_oneof']
_RECORD.oneofs_by_name['data_oneof'].fields.append(
_RECORD.fields_by_name['as_atom'])
_RECORD.fields_by_name['as_atom'].containing_oneof = _RECORD.oneofs_by_name['data_oneof']
_RECORD.oneofs_by_name['data_oneof'].fields.append(
_RECORD.fields_by_name['whois'])
_RECORD.fields_by_name['whois'].containing_oneof = _RECORD.oneofs_by_name['data_oneof']
_RECORD.oneofs_by_name['data_oneof'].fields.append(
_RECORD.fields_by_name['userdata'])
_RECORD.fields_by_name['userdata'].containing_oneof = _RECORD.oneofs_by_name['data_oneof']
_RECORD.oneofs_by_name['data_oneof'].fields.append(
_RECORD.fields_by_name['public_location'])
_RECORD.fields_by_name['public_location'].containing_oneof = _RECORD.oneofs_by_name['data_oneof']
_RECORD.oneofs_by_name['data_oneof'].fields.append(
_RECORD.fields_by_name['alexa_rank'])
_RECORD.fields_by_name['alexa_rank'].containing_oneof = _RECORD.oneofs_by_name['data_oneof']
_RECORD.oneofs_by_name['data_oneof'].fields.append(
_RECORD.fields_by_name['quantcast_rank'])
_RECORD.fields_by_name['quantcast_rank'].containing_oneof = _RECORD.oneofs_by_name['data_oneof']
_RECORD.oneofs_by_name['data_oneof'].fields.append(
_RECORD.fields_by_name['cisco_umbrella_rank'])
_RECORD.fields_by_name['cisco_umbrella_rank'].containing_oneof = _RECORD.oneofs_by_name['data_oneof']
_DELTA.fields_by_name['delta_type'].enum_type = common__pb2._DELTATYPE
_DELTA.fields_by_name['records'].message_type = _RECORD
DESCRIPTOR.message_types_by_name['WHOISAtom'] = _WHOISATOM
DESCRIPTOR.message_types_by_name['LocationAtom'] = _LOCATIONATOM
DESCRIPTOR.message_types_by_name['ProtocolAtom'] = _PROTOCOLATOM
DESCRIPTOR.message_types_by_name['AnonymousKey'] = _ANONYMOUSKEY
DESCRIPTOR.message_types_by_name['Record'] = _RECORD
DESCRIPTOR.message_types_by_name['Delta'] = _DELTA
WHOISAtom = _reflection.GeneratedProtocolMessageType('WHOISAtom', (_message.Message,), dict(
DESCRIPTOR = _WHOISATOM,
__module__ = 'hoststore_pb2'
# @@protoc_insertion_point(class_scope:zsearch.WHOISAtom)
))
_sym_db.RegisterMessage(WHOISAtom)
LocationAtom = _reflection.GeneratedProtocolMessageType('LocationAtom', (_message.Message,), dict(
DESCRIPTOR = _LOCATIONATOM,
__module__ = 'hoststore_pb2'
# @@protoc_insertion_point(class_scope:zsearch.LocationAtom)
))
_sym_db.RegisterMessage(LocationAtom)
ProtocolAtom = _reflection.GeneratedProtocolMessageType('ProtocolAtom', (_message.Message,), dict(
DESCRIPTOR = _PROTOCOLATOM,
__module__ = 'hoststore_pb2'
# @@protoc_insertion_point(class_scope:zsearch.ProtocolAtom)
))
_sym_db.RegisterMessage(ProtocolAtom)
AnonymousKey = _reflection.GeneratedProtocolMessageType('AnonymousKey', (_message.Message,), dict(
DESCRIPTOR = _ANONYMOUSKEY,
__module__ = 'hoststore_pb2'
# @@protoc_insertion_point(class_scope:zsearch.AnonymousKey)
))
_sym_db.RegisterMessage(AnonymousKey)
Record = _reflection.GeneratedProtocolMessageType('Record', (_message.Message,), dict(
DESCRIPTOR = _RECORD,
__module__ = 'hoststore_pb2'
# @@protoc_insertion_point(class_scope:zsearch.Record)
))
_sym_db.RegisterMessage(Record)
Delta = _reflection.GeneratedProtocolMessageType('Delta', (_message.Message,), dict(
DESCRIPTOR = _DELTA,
__module__ = 'hoststore_pb2'
# @@protoc_insertion_point(class_scope:zsearch.Delta)
))
_sym_db.RegisterMessage(Delta)
# @@protoc_insertion_point(module_scope) | zsearch-definitions | /zsearch-definitions-0.1.29.tar.gz/zsearch-definitions-0.1.29/zsearch_definitions/hoststore_pb2.py | hoststore_pb2.py |
# Zserio PyPi package
Zserio PyPi package contains Zserio compiler and Zserio Python runtime. Zserio is serialization framework
available at [GitHub](http://zserio.org).
## Installation
To install Zserio compiler together with Zserio Python runtime, just run
```
pip install zserio
```
## Usage from command line
Consider the following zserio schema which is stored to the source `appl.zs`:
```
package appl;
struct TestStructure
{
int32 value;
};
```
To compile the schema by compiler and generate Python sources to the directory `gen`, you can run Zserio
compiler directly from command line by the following command:
```
zserio appl.zs -python gen
```
Then, if you run the python by the command
```
PYTHONPATH="gen" python
```
you will be able to use the generated Python sources by the following python commands
```py
import appl.api as api
test_structure = api.TestStructure()
```
## Usage from Python
Consider the following zserio schema which is stored to the source `appl.zs`:
```
package appl;
struct TestStructure
{
int32 value;
};
```
To compile the schema by compiler and generate Python sources to the directory `gen`, you can run the
following python commands:
```py
import zserio
api = zserio.generate("appl.zs", gen_dir = "gen")
test_structure = api.TestStructure()
```
For convenience, the method `generate` returns imported API for generated top level package.
Alternatively, you can run zserio compiler directly by the following python commands:
```py
import sys
import importlib
import zserio
completed_process = zserio.run_compiler(["appl.zs", "-python", "gen"])
if completed_process.returncode == 0:
sys.path.append("gen")
api = importlib.import_module("appl.api")
test_structure = api.TestStructure()
```
## Building
The easiest way how to build Zserio PyPi package is by using Bash script `build.sh` located in the project's
folder `scripts`:
```
scripts/build.sh
```
## Testing
Testing is available by using Bash script `test.sh` located in the project's folder `scripts`:
```
PYLINT_ENABLED=1 MYPY_ENABLED=1 scripts/test.sh
```
| zserio | /zserio-2.11.0.tar.gz/zserio-2.11.0/README.md | README.md |
ZFunds-Services
-----------------
Sahi. Asaan
## Development Setup
### System Dependency
* Python 3.10.2
* poetry
### Step
1) Clone the repo
2) cd zfunds-services
3) poetry install
4) poetry shell
Start developing
## Package zfunds-services
python version must be 3.10.2 or higher
### Build
python setup.py build
### Distribute
python setup.py sdist
### Upload
twine upload dist/*
### Python Dependency
* pymongo
* dynamodb
* s3
### Use
It wil load environment variable automatically, so all you need to do is make sure these environment variables are present.
It will also autoload .env ( example .env.dist , rename it to .env) file before running, so you can also put these variables in your .env file.
Needed Environment variables are
```
# Application
APP_NAME=redisconnection
LOG_LEVEL=DEBUG
ENVIRONMENT=staging
REGION=ind
#
```
from redisconnection import redis_connection
rc = redis_connection.RedisConnection()
conn = rc.connection
```
| zservices | /zservices-0.2.9.tar.gz/zservices-0.2.9/README.md | README.md |
from zsftp import logger
from zsftp.config import Config
import paramiko
class SFTP:
def __init__(self, connection_parameter=None):
logger.debug('[SFTP]: Initiating Sftp Connection Class')
self._connection_parameter = connection_parameter
if self._connection_parameter:
self.set_connection_parameter(**connection_parameter)
self._client = None
self._allow_agent = False
self._look_for_keys = False
def set_connection_parameter(self, **kwargs):
self._connection_parameter = {
'hostname': Config.SFTP['hostname'] if not kwargs.get('hostname') else kwargs.get('hostname'),
"username": Config.SFTP['username'] if not kwargs.get('username') else kwargs.get('username'),
"password": Config.SFTP['password'] if not kwargs.get('password') else kwargs.get('password'),
"port": Config.SFTP['port'] if not kwargs.get('port') else kwargs.get('port'),
}
def get_connection_parameter(self):
return self._connection_parameter
@property
def connection(self):
if self._client is None:
self.connect()
return self._client
def connect(self):
if self._connection_parameter is None:
self.set_connection_parameter()
try:
logger.debug('[SFTP]: Creating Sftp Connection')
sftp_client = paramiko.SSHClient()
sftp_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
sftp_client.connect(hostname=self._connection_parameter['hostname'],
username=self._connection_parameter['username'],
password=self._connection_parameter['password'],
port=int(self._connection_parameter['port']),
allow_agent=self._allow_agent, look_for_keys=self._look_for_keys)
sftp = sftp_client.open_sftp()
sftp.listdir()
self._client = sftp
return self._client
except Exception as e:
self._client = None
logger.error(f'[SFTP]: Connection issue, conn={self._client}', exc_info=True)
raise Exception(f'[SFTP]: Connection error {self._connection_parameter["hostname"]}. error={e}') | zservices | /zservices-0.2.9.tar.gz/zservices-0.2.9/zsftp/sftp.py | sftp.py |
from zdynamodb import logger, Config
import boto3
from botocore.config import Config as BConfig
class DynamoDB:
def __init__(self, connection_parameter=None, b_config=None):
logger.debug('[DynamoDB]: Initiating DynamoDB Connection Class')
self._connection_parameter = connection_parameter
if self._connection_parameter:
self.set_connection_parameter(**connection_parameter)
self._resource = None
self._config = BConfig(retries={'max_attempts': 3, 'mode': 'standard'})
def set_connection_parameter(self, **kwargs):
self._connection_parameter = {
'region': Config.AWS['region'] if not kwargs.get('region') else kwargs.get('region'),
"s3_key_id": Config.AWS['s3_key_id'] if not kwargs.get('s3_key_id') else kwargs.get('s3_key_id'),
"s3_key_secret": Config.AWS['s3_key_secret'] if not kwargs.get('s3_key_secret')
else kwargs.get('s3_key_secret'),
"dynamo_table": Config.AWS['dynamo_table'] if not kwargs.get('dynamo_table')
else kwargs.get('dynamo_table')
}
def get_connection_parameter(self):
return self._connection_parameter
@property
def connection(self):
if self._resource is None:
self.connect()
return self._resource
def connect(self):
if self._connection_parameter is None:
self.set_connection_parameter()
try:
logger.debug('[DynamoDB]: Creating DynamoDB connection')
dynamodb_resource = boto3.resource('dynamodb', region_name=self._connection_parameter['region'],
aws_access_key_id=self._connection_parameter['s3_key_id'],
aws_secret_access_key=self._connection_parameter['s3_key_secret'],
config=self._config)
self._resource = dynamodb_resource
# For testing connection only, because boto3 only return resource class not exactly a connection
table_name = self._connection_parameter.get('dynamo_table')
if table_name:
table = dynamodb_resource.Table(table_name)
if table.table_status == 'ACTIVE': # this throws exception as expected
logger.info(f'[DynamoDB]: Connection Successful. Connection={self._resource}')
else:
raise Exception('Unable to connect to table=connection_backend')
except Exception as e:
self._resource = None
logger.error(f'[DynamoDB]: connection issue, conn={self._resource}', exc_info=True)
raise Exception(f'[DynamoDB]: Connection Error with DynamoDB. Error={e}') | zservices | /zservices-0.2.9.tar.gz/zservices-0.2.9/zdynamodb/dynamo.py | dynamo.py |
from zdynamodb.dynamo import DynamoDB
from boto3.dynamodb.conditions import Key
from zdynamodb import logger
class DynamoQueries:
def __init__(self, table_name, connection_params=None):
logger.info('[DynamoDB]: Initiating DynamoQueries Class')
self.db = DynamoDB(connection_params)
self.table_name = table_name
self.table = self.db.connection.Table(table_name)
@staticmethod
def projection_expression_and_attributes(query: dict, projection: list) -> dict:
if not projection:
return query
projection_expression = ', '.join(map('#{0}'.format, projection))
expression_attribute_names = {}
for item in projection:
expression_attribute_names[f'#{item}'] = str(item)
query['ProjectionExpression'] = projection_expression
query['ExpressionAttributeNames'] = expression_attribute_names
return query
@staticmethod
def filter(model_data: dict | list, filter_fields: list) -> dict | list:
if not filter_fields:
return model_data
if isinstance(model_data, dict):
model_data_filtered = {k: v for k, v in model_data.items() if k not in filter_fields}
return model_data_filtered
if isinstance(model_data, list):
model_data_filtered = []
for item in model_data:
item_filtered = {k: v for k, v in item.items() if k not in filter_fields}
model_data_filtered.append(item_filtered)
return model_data_filtered
def get_pk_context(self, pk, pk_value, projection: list = None, model_filters: list = None):
try:
query = {
"KeyConditionExpression": Key(pk).eq(pk_value),
}
query = self.projection_expression_and_attributes(query, projection)
response = self.table.query(**query)
model_data = response['Items']
if model_filters:
model_data = self.filter(model_data, model_filters)
return model_data
except Exception as e:
logger.warning(f'[DynamoDB]: Unable to get data for {pk_value} from table {self.table_name}, e= {e}')
raise e
def get_index_context(self, index_key, index_value, index_name, projection: list = None,
model_filters: list = None):
try:
query = {
"IndexName": index_name,
"KeyConditionExpression": Key(index_key).eq(index_value)
}
query = self.projection_expression_and_attributes(query, projection)
response = self.table.query(**query)
model_data = response['Items']
while 'LastEvaluatedKey' in response:
query['ExclusiveStartKey'] = response['LastEvaluatedKey']
response = self.table.query(**query)
model_data.extend(response['Items'])
if model_filters:
model_data = self.filter(model_data, model_filters)
return model_data
except Exception as e:
logger.warning(f'[DynamoDB]: Unable to get data for {index_value} from table {self.table_name}, e= {e}')
raise e
def add_context(self, item: dict, return_values='ALL_OLD'):
try:
response = self.table.put_item(Item=item, ReturnValues=return_values)
model_data = response.get('Attributes', {}) | item
return model_data
except Exception as e:
logger.warning(f'[DynamoDB]: Unable to add data for from table {self.table_name}, e= {e}')
raise e | zservices | /zservices-0.2.9.tar.gz/zservices-0.2.9/zdynamodb/queries.py | queries.py |
from zs3 import logger
from zs3.config import Config
import boto3
from zs3.error_handler import parse_error
from botocore.config import Config as BConfig
import requests
from io import BytesIO
class S3:
def __init__(self, connection_parameter=None, b_config=None):
logger.debug('[S3]: Initiating S3 Connection Class')
self._connection_parameter = connection_parameter
if self._connection_parameter:
self.set_connection_parameter(**connection_parameter)
self._resource = None
self._config = BConfig(retries={'max_attempts': 3, 'mode': 'standard'})
def set_connection_parameter(self, **kwargs):
self._connection_parameter = {
'region': Config.AWS['region'] if not kwargs.get('region') else kwargs.get('region'),
"s3_key_id": Config.AWS['s3_key_id'] if not kwargs.get('s3_key_id') else kwargs.get('s3_key_id'),
"s3_key_secret": Config.AWS['s3_key_secret'] if not kwargs.get('s3_key_secret') else kwargs.get(
's3_key_secret'),
"s3_bucket_name": Config.AWS['s3_bucket_name'] if not kwargs.get('s3_bucket_name') else kwargs.get(
's3_bucket_name'),
}
def get_connection_parameter(self):
return self._connection_parameter
@property
def connection(self):
if self._resource is None:
self.connect()
return self._resource
def connect(self):
if self._connection_parameter is None:
self.set_connection_parameter()
try:
logger.debug('[S3]: Creating s3 connection')
s3_resource = boto3.resource('s3', region_name=self._connection_parameter['region'],
aws_access_key_id=self._connection_parameter['s3_key_id'],
aws_secret_access_key=self._connection_parameter['s3_key_secret'],
config=self._config)
bucket = s3_resource.meta.client.head_bucket(Bucket=self._connection_parameter['s3_bucket_name'])
if bucket.get('ResponseMetadata') and bucket.get('ResponseMetadata').get('HTTPStatusCode') == 200:
self._resource = s3_resource
logger.info(f'[S3]: Connection Successful. Connection={self._resource}')
else:
raise Exception(f'Unable to connect to bucket={self._connection_parameter["s3_bucket_name"]}')
except Exception as e:
self._resource = None
logger.error(f'[S3]: connection issue, conn={self._resource}', exc_info=True)
raise Exception(f'[S3]: Connection Error with S3. Error={e}')
def url_upload_to_s3(self, upload_from, object_id, folder_name=None, bucket=None, public_read=True,
extra_args=None):
r = requests.get(upload_from, stream=True)
bucket_name = bucket if bucket is not None else Config.AWS['s3_upload_bucket_name']
key = f'{folder_name}/{str(object_id)}' if folder_name else str(object_id)
bucket = self.connection.Bucket(bucket_name)
upload_to = f'https://{bucket_name}.s3.{self._connection_parameter["region"]}.amazonaws.com/{key}'
args = {'ACL': 'public-read'} if public_read else {}
if extra_args:
args = args | extra_args
try:
bucket.upload_fileobj(r.raw, key, ExtraArgs=args)
logger.info(f'[S3] Success {upload_from}->{upload_to}')
except Exception as e:
logger.error(f'[S3] Failed {upload_from}->{upload_to}', exc_info=True)
return False, parse_error('ZE002', details=f'{upload_from}->{upload_to}', description=str(e))
return True, {'message': 's3 upload success',
'upload_to': upload_to
}
def file_upload_to_s3(self, upload_from, object_id, folder_name=None, bucket=None, public_read=True,
extra_args=None):
bucket_name = bucket if bucket is not None else Config.AWS['s3_upload_bucket_name']
key = f'{folder_name}/{str(object_id)}' if folder_name else str(object_id)
bucket = self.connection.Bucket(bucket_name)
upload_to = f'https://{bucket_name}.s3.{self._connection_parameter["region"]}.amazonaws.com/{key}'
args = {'ACL': 'public-read'} if public_read else {}
if extra_args:
args = args | extra_args
try:
bucket.upload_file(Filename=upload_from, Key=key, ExtraArgs=args)
logger.info(f'[S3] Success {upload_from}->{upload_to}')
except Exception as e:
logger.error(f'[S3] Failed {upload_from}->{upload_to}', exc_info=True)
return False, parse_error('ZE002', details=f'{upload_from}->{upload_to}', description=str(e))
return True, {'message': 's3 upload success',
'upload_to': upload_to
}
def bytes_upload_to_s3(self, file_obj, object_id, folder_name=None, bucket=None, public_read=True, extra_args=None):
# Upload a file like object to s3
bucket_name = bucket if bucket is not None else Config.AWS['s3_upload_bucket_name']
key = f'{folder_name}/{str(object_id)}' if folder_name else str(object_id)
bucket = self.connection.Bucket(bucket_name)
upload_to = f'https://{bucket_name}.s3.{self._connection_parameter["region"]}.amazonaws.com/{key}'
args = {'ACL': 'public-read'} if public_read else {}
if extra_args:
args = args | extra_args
try:
bucket.upload_fileobj(file_obj, key, ExtraArgs=args)
logger.info(f'[S3] Upload Success {upload_to}')
except Exception as e:
logger.error(f'[S3] Upload Failed {upload_to}', exc_info=True)
return False, parse_error('ZE002', details=f'bytes_start {file_obj} bytes_end->{upload_to}',
description=str(e))
return True, {'message': 's3 upload success',
'upload_to': upload_to
}
def object_exists_on_s3(self, file_name, folder_name=None, bucket=None):
bucket_name = bucket if bucket is not None else Config.AWS['s3_upload_bucket_name']
key = f"{folder_name}/{file_name}" if folder_name else f"{file_name}"
try:
s3_object = self.connection.Object(bucket_name, key).json()
return True, s3_object
except Exception as e:
logger.error(f"[S3] Could not find object in bucket: {bucket_name} | key: {key}")
return False, parse_error('ZE004', details=f'Object not found : {bucket_name} > {key}', description=str(e),
exc=e)
def get_obj_from_url(self, url):
"""
returns a bytesIO s3 object.
"""
bucket_name = url.split('/')[2].split('.')[0]
obj_name = url.split('/')[-1]
folder = url.split('/')[3:-1]
key = f"{folder}/{obj_name}" if folder else f"{obj_name}"
try:
s3_file = BytesIO()
s3_object = self.connection.Object(bucket_name, key)
s3_object.download_fileobj(s3_file)
s3_file.seek(0)
return True, s3_file
except Exception as e:
logger.error(f"[S3] Could not find object in bucket: {bucket_name} | key: {key}")
return False, parse_error('ZE004', details=f'Object not found : {bucket_name} > {key}', description=str(e),
exc=e) | zservices | /zservices-0.2.9.tar.gz/zservices-0.2.9/zs3/s3.py | s3.py |
import requests as sync_req
from zrequests import logger
from zrequests.setting import Setting
import time
import json as f_json
def verify_success_text(s_text, response: sync_req.Response):
if isinstance(s_text, dict):
r_json = f_json.loads(response.text)
for k, v in s_text.items():
if k in r_json and v == r_json[k]:
continue
else:
return False, response
return True, response
if isinstance(s_text, str):
if s_text in response.text:
return True, response
else:
return False, response
return False, response
# todo remove sensitive info from url
def send_request(method, url, s_codes: list, params, headers, tag='N', json=None, data=None, count=0, sleep=False,
s_text=None):
response = None
if count < Setting.MAX_RETRY:
try:
response = sync_req.request(method, url=url, params=params, data=data, headers=headers, json=json)
if response.status_code in s_codes:
if not s_text:
return True, response
return verify_success_text(s_text, response)
else:
logger.warning(f'[ZREQUEST] [{tag}][{count}] {url}, e=HTTP code not in s_codes, r={response}')
count += 1
if count >= Setting.MAX_RETRY:
return False, response
if sleep:
time.sleep(2 ** count)
return send_request(method, url, s_codes, params, headers, tag, json, data, count, sleep, s_text)
except Exception as e:
logger.warning(f'[ZREQUEST] [{tag}][{count}] {url}, e={e}, r={response}', exc_info=True)
count += 1
if sleep:
time.sleep(2 ** count)
return send_request(method, url, s_codes, params, headers, tag, json, data, count, sleep, s_text)
logger.error(f'[ZREQUEST] [{tag}] Failed to get proper response for {url} r={response},', exc_info=True)
return False, response | zservices | /zservices-0.2.9.tar.gz/zservices-0.2.9/zrequests/z_requests.py | z_requests.py |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.