# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities

__all__ = [
    'AccessLevelBasicArgs',
    'AccessLevelBasicConditionArgs',
    'AccessLevelBasicConditionDevicePolicyArgs',
    'AccessLevelBasicConditionDevicePolicyOsConstraintArgs',
    'AccessLevelConditionDevicePolicyArgs',
    'AccessLevelConditionDevicePolicyOsConstraintArgs',
    'AccessLevelCustomArgs',
    'AccessLevelCustomExprArgs',
    'AccessLevelsAccessLevelArgs',
    'AccessLevelsAccessLevelBasicArgs',
    'AccessLevelsAccessLevelBasicConditionArgs',
    'AccessLevelsAccessLevelBasicConditionDevicePolicyArgs',
    'AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs',
    'AccessLevelsAccessLevelCustomArgs',
    'AccessLevelsAccessLevelCustomExprArgs',
    'ServicePerimeterSpecArgs',
    'ServicePerimeterSpecEgressPolicyArgs',
    'ServicePerimeterSpecEgressPolicyEgressFromArgs',
    'ServicePerimeterSpecEgressPolicyEgressToArgs',
    'ServicePerimeterSpecEgressPolicyEgressToOperationArgs',
    'ServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs',
    'ServicePerimeterSpecIngressPolicyArgs',
    'ServicePerimeterSpecIngressPolicyIngressFromArgs',
    'ServicePerimeterSpecIngressPolicyIngressFromSourceArgs',
    'ServicePerimeterSpecIngressPolicyIngressToArgs',
    'ServicePerimeterSpecIngressPolicyIngressToOperationArgs',
    'ServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs',
    'ServicePerimeterSpecVpcAccessibleServicesArgs',
    'ServicePerimeterStatusArgs',
    'ServicePerimeterStatusEgressPolicyArgs',
    'ServicePerimeterStatusEgressPolicyEgressFromArgs',
    'ServicePerimeterStatusEgressPolicyEgressToArgs',
    'ServicePerimeterStatusEgressPolicyEgressToOperationArgs',
    'ServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs',
    'ServicePerimeterStatusIngressPolicyArgs',
    'ServicePerimeterStatusIngressPolicyIngressFromArgs',
    'ServicePerimeterStatusIngressPolicyIngressFromSourceArgs',
    'ServicePerimeterStatusIngressPolicyIngressToArgs',
    'ServicePerimeterStatusIngressPolicyIngressToOperationArgs',
    'ServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs',
    'ServicePerimeterStatusVpcAccessibleServicesArgs',
    'ServicePerimetersServicePerimeterArgs',
    'ServicePerimetersServicePerimeterSpecArgs',
    'ServicePerimetersServicePerimeterSpecEgressPolicyArgs',
    'ServicePerimetersServicePerimeterSpecEgressPolicyEgressFromArgs',
    'ServicePerimetersServicePerimeterSpecEgressPolicyEgressToArgs',
    'ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationArgs',
    'ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs',
    'ServicePerimetersServicePerimeterSpecIngressPolicyArgs',
    'ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromArgs',
    'ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromSourceArgs',
    'ServicePerimetersServicePerimeterSpecIngressPolicyIngressToArgs',
    'ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationArgs',
    'ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs',
    'ServicePerimetersServicePerimeterSpecVpcAccessibleServicesArgs',
    'ServicePerimetersServicePerimeterStatusArgs',
    'ServicePerimetersServicePerimeterStatusEgressPolicyArgs',
    'ServicePerimetersServicePerimeterStatusEgressPolicyEgressFromArgs',
    'ServicePerimetersServicePerimeterStatusEgressPolicyEgressToArgs',
    'ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationArgs',
    'ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs',
    'ServicePerimetersServicePerimeterStatusIngressPolicyArgs',
    'ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromArgs',
    'ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromSourceArgs',
    'ServicePerimetersServicePerimeterStatusIngressPolicyIngressToArgs',
    'ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationArgs',
    'ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs',
    'ServicePerimetersServicePerimeterStatusVpcAccessibleServicesArgs',
]

@pulumi.input_type
class AccessLevelBasicArgs:
    def __init__(__self__, *,
                 conditions: pulumi.Input[Sequence[pulumi.Input['AccessLevelBasicConditionArgs']]],
                 combining_function: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['AccessLevelBasicConditionArgs']]] conditions: A set of requirements for the AccessLevel to be granted.
               Structure is documented below.
        :param pulumi.Input[str] combining_function: How the conditions list should be combined to determine if a request
               is granted this AccessLevel. If AND is used, each Condition in
               conditions must be satisfied for the AccessLevel to be applied. If
               OR is used, at least one Condition in conditions must be satisfied
               for the AccessLevel to be applied.
               Default value is `AND`.
               Possible values are `AND` and `OR`.
        """
        pulumi.set(__self__, "conditions", conditions)
        if combining_function is not None:
            pulumi.set(__self__, "combining_function", combining_function)

    @property
    @pulumi.getter
    def conditions(self) -> pulumi.Input[Sequence[pulumi.Input['AccessLevelBasicConditionArgs']]]:
        """
        A set of requirements for the AccessLevel to be granted.
        Structure is documented below.
        """
        return pulumi.get(self, "conditions")

    @conditions.setter
    def conditions(self, value: pulumi.Input[Sequence[pulumi.Input['AccessLevelBasicConditionArgs']]]):
        pulumi.set(self, "conditions", value)

    @property
    @pulumi.getter(name="combiningFunction")
    def combining_function(self) -> Optional[pulumi.Input[str]]:
        """
        How the conditions list should be combined to determine if a request
        is granted this AccessLevel. If AND is used, each Condition in
        conditions must be satisfied for the AccessLevel to be applied. If
        OR is used, at least one Condition in conditions must be satisfied
        for the AccessLevel to be applied.
        Default value is `AND`.
        Possible values are `AND` and `OR`.
        """
        return pulumi.get(self, "combining_function")

    @combining_function.setter
    def combining_function(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "combining_function", value)


@pulumi.input_type
class AccessLevelBasicConditionArgs:
    def __init__(__self__, *,
                 device_policy: Optional[pulumi.Input['AccessLevelBasicConditionDevicePolicyArgs']] = None,
                 ip_subnetworks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 members: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 negate: Optional[pulumi.Input[bool]] = None,
                 regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 required_access_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        :param pulumi.Input['AccessLevelBasicConditionDevicePolicyArgs'] device_policy: Device specific restrictions, all restrictions must hold for
               the Condition to be true. If not specified, all devices are
               allowed.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_subnetworks: A list of CIDR block IP subnetwork specification. May be IPv4
               or IPv6.
               Note that for a CIDR IP address block, the specified IP address
               portion must be properly truncated (i.e. all the host bits must
               be zero) or the input is considered malformed. For example,
               "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly,
               for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32"
               is not. The originating IP of a request must be in one of the
               listed subnets in order for this Condition to be true.
               If empty, all IP addresses are allowed.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] members: An allowed list of members (users, service accounts).
               Using groups is not supported yet.
               The signed-in user originating the request must be a part of one
               of the provided members. If not specified, a request may come
               from any user (logged in/not logged in, not present in any
               groups, etc.).
               Formats: `user:{emailid}`, `serviceAccount:{emailid}`
        :param pulumi.Input[bool] negate: Whether to negate the Condition. If true, the Condition becomes
               a NAND over its non-empty fields, each field must be false for
               the Condition overall to be satisfied. Defaults to false.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] regions: The request must originate from one of the provided
               countries/regions.
               Format: A valid ISO 3166-1 alpha-2 code.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] required_access_levels: A list of other access levels defined in the same Policy,
               referenced by resource name. Referencing an AccessLevel which
               does not exist is an error. All access levels listed must be
               granted for the Condition to be true.
               Format: accessPolicies/{policy_id}/accessLevels/{short_name}
        """
        if device_policy is not None:
            pulumi.set(__self__, "device_policy", device_policy)
        if ip_subnetworks is not None:
            pulumi.set(__self__, "ip_subnetworks", ip_subnetworks)
        if members is not None:
            pulumi.set(__self__, "members", members)
        if negate is not None:
            pulumi.set(__self__, "negate", negate)
        if regions is not None:
            pulumi.set(__self__, "regions", regions)
        if required_access_levels is not None:
            pulumi.set(__self__, "required_access_levels", required_access_levels)

    @property
    @pulumi.getter(name="devicePolicy")
    def device_policy(self) -> Optional[pulumi.Input['AccessLevelBasicConditionDevicePolicyArgs']]:
        """
        Device specific restrictions, all restrictions must hold for
        the Condition to be true. If not specified, all devices are
        allowed.
        Structure is documented below.
        """
        return pulumi.get(self, "device_policy")

    @device_policy.setter
    def device_policy(self, value: Optional[pulumi.Input['AccessLevelBasicConditionDevicePolicyArgs']]):
        pulumi.set(self, "device_policy", value)

    @property
    @pulumi.getter(name="ipSubnetworks")
    def ip_subnetworks(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of CIDR block IP subnetwork specification. May be IPv4
        or IPv6.
        Note that for a CIDR IP address block, the specified IP address
        portion must be properly truncated (i.e. all the host bits must
        be zero) or the input is considered malformed. For example,
        "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly,
        for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32"
        is not. The originating IP of a request must be in one of the
        listed subnets in order for this Condition to be true.
        If empty, all IP addresses are allowed.
        """
        return pulumi.get(self, "ip_subnetworks")

    @ip_subnetworks.setter
    def ip_subnetworks(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "ip_subnetworks", value)

    @property
    @pulumi.getter
    def members(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        An allowed list of members (users, service accounts).
        Using groups is not supported yet.
        The signed-in user originating the request must be a part of one
        of the provided members. If not specified, a request may come
        from any user (logged in/not logged in, not present in any
        groups, etc.).
        Formats: `user:{emailid}`, `serviceAccount:{emailid}`
        """
        return pulumi.get(self, "members")

    @members.setter
    def members(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "members", value)

    @property
    @pulumi.getter
    def negate(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to negate the Condition. If true, the Condition becomes
        a NAND over its non-empty fields, each field must be false for
        the Condition overall to be satisfied. Defaults to false.
        """
        return pulumi.get(self, "negate")

    @negate.setter
    def negate(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "negate", value)

    @property
    @pulumi.getter
    def regions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        The request must originate from one of the provided
        countries/regions.
        Format: A valid ISO 3166-1 alpha-2 code.
        """
        return pulumi.get(self, "regions")

    @regions.setter
    def regions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "regions", value)

    @property
    @pulumi.getter(name="requiredAccessLevels")
    def required_access_levels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of other access levels defined in the same Policy,
        referenced by resource name. Referencing an AccessLevel which
        does not exist is an error. All access levels listed must be
        granted for the Condition to be true.
        Format: accessPolicies/{policy_id}/accessLevels/{short_name}
        """
        return pulumi.get(self, "required_access_levels")

    @required_access_levels.setter
    def required_access_levels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "required_access_levels", value)


@pulumi.input_type
class AccessLevelBasicConditionDevicePolicyArgs:
    def __init__(__self__, *,
                 allowed_device_management_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 allowed_encryption_statuses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 os_constraints: Optional[pulumi.Input[Sequence[pulumi.Input['AccessLevelBasicConditionDevicePolicyOsConstraintArgs']]]] = None,
                 require_admin_approval: Optional[pulumi.Input[bool]] = None,
                 require_corp_owned: Optional[pulumi.Input[bool]] = None,
                 require_screen_lock: Optional[pulumi.Input[bool]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_device_management_levels: A list of allowed device management levels.
               An empty list allows all management levels.
               Each value may be one of `MANAGEMENT_UNSPECIFIED`, `NONE`, `BASIC`, and `COMPLETE`.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_encryption_statuses: A list of allowed encryptions statuses.
               An empty list allows all statuses.
               Each value may be one of `ENCRYPTION_UNSPECIFIED`, `ENCRYPTION_UNSUPPORTED`, `UNENCRYPTED`, and `ENCRYPTED`.
        :param pulumi.Input[Sequence[pulumi.Input['AccessLevelBasicConditionDevicePolicyOsConstraintArgs']]] os_constraints: A list of allowed OS versions.
               An empty list allows all types and all versions.
               Structure is documented below.
        :param pulumi.Input[bool] require_admin_approval: Whether the device needs to be approved by the customer admin.
        :param pulumi.Input[bool] require_corp_owned: Whether the device needs to be corp owned.
        :param pulumi.Input[bool] require_screen_lock: Whether or not screenlock is required for the DevicePolicy
               to be true. Defaults to false.
        """
        if allowed_device_management_levels is not None:
            pulumi.set(__self__, "allowed_device_management_levels", allowed_device_management_levels)
        if allowed_encryption_statuses is not None:
            pulumi.set(__self__, "allowed_encryption_statuses", allowed_encryption_statuses)
        if os_constraints is not None:
            pulumi.set(__self__, "os_constraints", os_constraints)
        if require_admin_approval is not None:
            pulumi.set(__self__, "require_admin_approval", require_admin_approval)
        if require_corp_owned is not None:
            pulumi.set(__self__, "require_corp_owned", require_corp_owned)
        if require_screen_lock is not None:
            pulumi.set(__self__, "require_screen_lock", require_screen_lock)

    @property
    @pulumi.getter(name="allowedDeviceManagementLevels")
    def allowed_device_management_levels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of allowed device management levels.
        An empty list allows all management levels.
        Each value may be one of `MANAGEMENT_UNSPECIFIED`, `NONE`, `BASIC`, and `COMPLETE`.
        """
        return pulumi.get(self, "allowed_device_management_levels")

    @allowed_device_management_levels.setter
    def allowed_device_management_levels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "allowed_device_management_levels", value)

    @property
    @pulumi.getter(name="allowedEncryptionStatuses")
    def allowed_encryption_statuses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of allowed encryptions statuses.
        An empty list allows all statuses.
        Each value may be one of `ENCRYPTION_UNSPECIFIED`, `ENCRYPTION_UNSUPPORTED`, `UNENCRYPTED`, and `ENCRYPTED`.
        """
        return pulumi.get(self, "allowed_encryption_statuses")

    @allowed_encryption_statuses.setter
    def allowed_encryption_statuses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "allowed_encryption_statuses", value)

    @property
    @pulumi.getter(name="osConstraints")
    def os_constraints(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AccessLevelBasicConditionDevicePolicyOsConstraintArgs']]]]:
        """
        A list of allowed OS versions.
        An empty list allows all types and all versions.
        Structure is documented below.
        """
        return pulumi.get(self, "os_constraints")

    @os_constraints.setter
    def os_constraints(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AccessLevelBasicConditionDevicePolicyOsConstraintArgs']]]]):
        pulumi.set(self, "os_constraints", value)

    @property
    @pulumi.getter(name="requireAdminApproval")
    def require_admin_approval(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether the device needs to be approved by the customer admin.
        """
        return pulumi.get(self, "require_admin_approval")

    @require_admin_approval.setter
    def require_admin_approval(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "require_admin_approval", value)

    @property
    @pulumi.getter(name="requireCorpOwned")
    def require_corp_owned(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether the device needs to be corp owned.
        """
        return pulumi.get(self, "require_corp_owned")

    @require_corp_owned.setter
    def require_corp_owned(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "require_corp_owned", value)

    @property
    @pulumi.getter(name="requireScreenLock")
    def require_screen_lock(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether or not screenlock is required for the DevicePolicy
        to be true. Defaults to false.
        """
        return pulumi.get(self, "require_screen_lock")

    @require_screen_lock.setter
    def require_screen_lock(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "require_screen_lock", value)


@pulumi.input_type
class AccessLevelBasicConditionDevicePolicyOsConstraintArgs:
    def __init__(__self__, *,
                 os_type: pulumi.Input[str],
                 minimum_version: Optional[pulumi.Input[str]] = None,
                 require_verified_chrome_os: Optional[pulumi.Input[bool]] = None):
        """
        :param pulumi.Input[str] os_type: The operating system type of the device.
               Possible values are `OS_UNSPECIFIED`, `DESKTOP_MAC`, `DESKTOP_WINDOWS`, `DESKTOP_LINUX`, `DESKTOP_CHROME_OS`, `ANDROID`, and `IOS`.
        :param pulumi.Input[str] minimum_version: The minimum allowed OS version. If not set, any version
               of this OS satisfies the constraint.
               Format: "major.minor.patch" such as "10.5.301", "9.2.1".
        :param pulumi.Input[bool] require_verified_chrome_os: If you specify DESKTOP_CHROME_OS for osType, you can optionally include requireVerifiedChromeOs to require Chrome Verified Access.
        """
        pulumi.set(__self__, "os_type", os_type)
        if minimum_version is not None:
            pulumi.set(__self__, "minimum_version", minimum_version)
        if require_verified_chrome_os is not None:
            pulumi.set(__self__, "require_verified_chrome_os", require_verified_chrome_os)

    @property
    @pulumi.getter(name="osType")
    def os_type(self) -> pulumi.Input[str]:
        """
        The operating system type of the device.
        Possible values are `OS_UNSPECIFIED`, `DESKTOP_MAC`, `DESKTOP_WINDOWS`, `DESKTOP_LINUX`, `DESKTOP_CHROME_OS`, `ANDROID`, and `IOS`.
        """
        return pulumi.get(self, "os_type")

    @os_type.setter
    def os_type(self, value: pulumi.Input[str]):
        pulumi.set(self, "os_type", value)

    @property
    @pulumi.getter(name="minimumVersion")
    def minimum_version(self) -> Optional[pulumi.Input[str]]:
        """
        The minimum allowed OS version. If not set, any version
        of this OS satisfies the constraint.
        Format: "major.minor.patch" such as "10.5.301", "9.2.1".
        """
        return pulumi.get(self, "minimum_version")

    @minimum_version.setter
    def minimum_version(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "minimum_version", value)

    @property
    @pulumi.getter(name="requireVerifiedChromeOs")
    def require_verified_chrome_os(self) -> Optional[pulumi.Input[bool]]:
        """
        If you specify DESKTOP_CHROME_OS for osType, you can optionally include requireVerifiedChromeOs to require Chrome Verified Access.
        """
        return pulumi.get(self, "require_verified_chrome_os")

    @require_verified_chrome_os.setter
    def require_verified_chrome_os(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "require_verified_chrome_os", value)


@pulumi.input_type
class AccessLevelConditionDevicePolicyArgs:
    def __init__(__self__, *,
                 allowed_device_management_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 allowed_encryption_statuses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 os_constraints: Optional[pulumi.Input[Sequence[pulumi.Input['AccessLevelConditionDevicePolicyOsConstraintArgs']]]] = None,
                 require_admin_approval: Optional[pulumi.Input[bool]] = None,
                 require_corp_owned: Optional[pulumi.Input[bool]] = None,
                 require_screen_lock: Optional[pulumi.Input[bool]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_device_management_levels: A list of allowed device management levels.
               An empty list allows all management levels.
               Each value may be one of `MANAGEMENT_UNSPECIFIED`, `NONE`, `BASIC`, and `COMPLETE`.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_encryption_statuses: A list of allowed encryptions statuses.
               An empty list allows all statuses.
               Each value may be one of `ENCRYPTION_UNSPECIFIED`, `ENCRYPTION_UNSUPPORTED`, `UNENCRYPTED`, and `ENCRYPTED`.
        :param pulumi.Input[Sequence[pulumi.Input['AccessLevelConditionDevicePolicyOsConstraintArgs']]] os_constraints: A list of allowed OS versions.
               An empty list allows all types and all versions.
               Structure is documented below.
        :param pulumi.Input[bool] require_admin_approval: Whether the device needs to be approved by the customer admin.
        :param pulumi.Input[bool] require_corp_owned: Whether the device needs to be corp owned.
        :param pulumi.Input[bool] require_screen_lock: Whether or not screenlock is required for the DevicePolicy
               to be true. Defaults to false.
        """
        if allowed_device_management_levels is not None:
            pulumi.set(__self__, "allowed_device_management_levels", allowed_device_management_levels)
        if allowed_encryption_statuses is not None:
            pulumi.set(__self__, "allowed_encryption_statuses", allowed_encryption_statuses)
        if os_constraints is not None:
            pulumi.set(__self__, "os_constraints", os_constraints)
        if require_admin_approval is not None:
            pulumi.set(__self__, "require_admin_approval", require_admin_approval)
        if require_corp_owned is not None:
            pulumi.set(__self__, "require_corp_owned", require_corp_owned)
        if require_screen_lock is not None:
            pulumi.set(__self__, "require_screen_lock", require_screen_lock)

    @property
    @pulumi.getter(name="allowedDeviceManagementLevels")
    def allowed_device_management_levels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of allowed device management levels.
        An empty list allows all management levels.
        Each value may be one of `MANAGEMENT_UNSPECIFIED`, `NONE`, `BASIC`, and `COMPLETE`.
        """
        return pulumi.get(self, "allowed_device_management_levels")

    @allowed_device_management_levels.setter
    def allowed_device_management_levels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "allowed_device_management_levels", value)

    @property
    @pulumi.getter(name="allowedEncryptionStatuses")
    def allowed_encryption_statuses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of allowed encryptions statuses.
        An empty list allows all statuses.
        Each value may be one of `ENCRYPTION_UNSPECIFIED`, `ENCRYPTION_UNSUPPORTED`, `UNENCRYPTED`, and `ENCRYPTED`.
        """
        return pulumi.get(self, "allowed_encryption_statuses")

    @allowed_encryption_statuses.setter
    def allowed_encryption_statuses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "allowed_encryption_statuses", value)

    @property
    @pulumi.getter(name="osConstraints")
    def os_constraints(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AccessLevelConditionDevicePolicyOsConstraintArgs']]]]:
        """
        A list of allowed OS versions.
        An empty list allows all types and all versions.
        Structure is documented below.
        """
        return pulumi.get(self, "os_constraints")

    @os_constraints.setter
    def os_constraints(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AccessLevelConditionDevicePolicyOsConstraintArgs']]]]):
        pulumi.set(self, "os_constraints", value)

    @property
    @pulumi.getter(name="requireAdminApproval")
    def require_admin_approval(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether the device needs to be approved by the customer admin.
        """
        return pulumi.get(self, "require_admin_approval")

    @require_admin_approval.setter
    def require_admin_approval(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "require_admin_approval", value)

    @property
    @pulumi.getter(name="requireCorpOwned")
    def require_corp_owned(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether the device needs to be corp owned.
        """
        return pulumi.get(self, "require_corp_owned")

    @require_corp_owned.setter
    def require_corp_owned(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "require_corp_owned", value)

    @property
    @pulumi.getter(name="requireScreenLock")
    def require_screen_lock(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether or not screenlock is required for the DevicePolicy
        to be true. Defaults to false.
        """
        return pulumi.get(self, "require_screen_lock")

    @require_screen_lock.setter
    def require_screen_lock(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "require_screen_lock", value)


@pulumi.input_type
class AccessLevelConditionDevicePolicyOsConstraintArgs:
    def __init__(__self__, *,
                 os_type: pulumi.Input[str],
                 minimum_version: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] os_type: The operating system type of the device.
               Possible values are `OS_UNSPECIFIED`, `DESKTOP_MAC`, `DESKTOP_WINDOWS`, `DESKTOP_LINUX`, `DESKTOP_CHROME_OS`, `ANDROID`, and `IOS`.
        :param pulumi.Input[str] minimum_version: The minimum allowed OS version. If not set, any version
               of this OS satisfies the constraint.
               Format: "major.minor.patch" such as "10.5.301", "9.2.1".
        """
        pulumi.set(__self__, "os_type", os_type)
        if minimum_version is not None:
            pulumi.set(__self__, "minimum_version", minimum_version)

    @property
    @pulumi.getter(name="osType")
    def os_type(self) -> pulumi.Input[str]:
        """
        The operating system type of the device.
        Possible values are `OS_UNSPECIFIED`, `DESKTOP_MAC`, `DESKTOP_WINDOWS`, `DESKTOP_LINUX`, `DESKTOP_CHROME_OS`, `ANDROID`, and `IOS`.
        """
        return pulumi.get(self, "os_type")

    @os_type.setter
    def os_type(self, value: pulumi.Input[str]):
        pulumi.set(self, "os_type", value)

    @property
    @pulumi.getter(name="minimumVersion")
    def minimum_version(self) -> Optional[pulumi.Input[str]]:
        """
        The minimum allowed OS version. If not set, any version
        of this OS satisfies the constraint.
        Format: "major.minor.patch" such as "10.5.301", "9.2.1".
        """
        return pulumi.get(self, "minimum_version")

    @minimum_version.setter
    def minimum_version(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "minimum_version", value)


@pulumi.input_type
class AccessLevelCustomArgs:
    def __init__(__self__, *,
                 expr: pulumi.Input['AccessLevelCustomExprArgs']):
        """
        :param pulumi.Input['AccessLevelCustomExprArgs'] expr: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language.
               This page details the objects and attributes that are used to the build the CEL expressions for
               custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec.
               Structure is documented below.
        """
        pulumi.set(__self__, "expr", expr)

    @property
    @pulumi.getter
    def expr(self) -> pulumi.Input['AccessLevelCustomExprArgs']:
        """
        Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language.
        This page details the objects and attributes that are used to the build the CEL expressions for
        custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec.
        Structure is documented below.
        """
        return pulumi.get(self, "expr")

    @expr.setter
    def expr(self, value: pulumi.Input['AccessLevelCustomExprArgs']):
        pulumi.set(self, "expr", value)


@pulumi.input_type
class AccessLevelCustomExprArgs:
    def __init__(__self__, *,
                 expression: pulumi.Input[str],
                 description: Optional[pulumi.Input[str]] = None,
                 location: Optional[pulumi.Input[str]] = None,
                 title: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] expression: Textual representation of an expression in Common Expression Language syntax.
        :param pulumi.Input[str] description: Description of the expression
        :param pulumi.Input[str] location: String indicating the location of the expression for error reporting, e.g. a file name and a position in the file
        :param pulumi.Input[str] title: Title for the expression, i.e. a short string describing its purpose.
        """
        pulumi.set(__self__, "expression", expression)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if location is not None:
            pulumi.set(__self__, "location", location)
        if title is not None:
            pulumi.set(__self__, "title", title)

    @property
    @pulumi.getter
    def expression(self) -> pulumi.Input[str]:
        """
        Textual representation of an expression in Common Expression Language syntax.
        """
        return pulumi.get(self, "expression")

    @expression.setter
    def expression(self, value: pulumi.Input[str]):
        pulumi.set(self, "expression", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        Description of the expression
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter
    def location(self) -> Optional[pulumi.Input[str]]:
        """
        String indicating the location of the expression for error reporting, e.g. a file name and a position in the file
        """
        return pulumi.get(self, "location")

    @location.setter
    def location(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "location", value)

    @property
    @pulumi.getter
    def title(self) -> Optional[pulumi.Input[str]]:
        """
        Title for the expression, i.e. a short string describing its purpose.
        """
        return pulumi.get(self, "title")

    @title.setter
    def title(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "title", value)


@pulumi.input_type
class AccessLevelsAccessLevelArgs:
    def __init__(__self__, *,
                 name: pulumi.Input[str],
                 title: pulumi.Input[str],
                 basic: Optional[pulumi.Input['AccessLevelsAccessLevelBasicArgs']] = None,
                 custom: Optional[pulumi.Input['AccessLevelsAccessLevelCustomArgs']] = None,
                 description: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] name: Resource name for the Access Level. The short_name component must begin
               with a letter and only include alphanumeric and '_'.
               Format: accessPolicies/{policy_id}/accessLevels/{short_name}
        :param pulumi.Input[str] title: Title for the expression, i.e. a short string describing its purpose.
        :param pulumi.Input['AccessLevelsAccessLevelBasicArgs'] basic: A set of predefined conditions for the access level and a combining function.
               Structure is documented below.
        :param pulumi.Input['AccessLevelsAccessLevelCustomArgs'] custom: Custom access level conditions are set using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request.
               See CEL spec at: https://github.com/google/cel-spec.
               Structure is documented below.
        :param pulumi.Input[str] description: Description of the expression
        """
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "title", title)
        if basic is not None:
            pulumi.set(__self__, "basic", basic)
        if custom is not None:
            pulumi.set(__self__, "custom", custom)
        if description is not None:
            pulumi.set(__self__, "description", description)

    @property
    @pulumi.getter
    def name(self) -> pulumi.Input[str]:
        """
        Resource name for the Access Level. The short_name component must begin
        with a letter and only include alphanumeric and '_'.
        Format: accessPolicies/{policy_id}/accessLevels/{short_name}
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: pulumi.Input[str]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def title(self) -> pulumi.Input[str]:
        """
        Title for the expression, i.e. a short string describing its purpose.
        """
        return pulumi.get(self, "title")

    @title.setter
    def title(self, value: pulumi.Input[str]):
        pulumi.set(self, "title", value)

    @property
    @pulumi.getter
    def basic(self) -> Optional[pulumi.Input['AccessLevelsAccessLevelBasicArgs']]:
        """
        A set of predefined conditions for the access level and a combining function.
        Structure is documented below.
        """
        return pulumi.get(self, "basic")

    @basic.setter
    def basic(self, value: Optional[pulumi.Input['AccessLevelsAccessLevelBasicArgs']]):
        pulumi.set(self, "basic", value)

    @property
    @pulumi.getter
    def custom(self) -> Optional[pulumi.Input['AccessLevelsAccessLevelCustomArgs']]:
        """
        Custom access level conditions are set using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request.
        See CEL spec at: https://github.com/google/cel-spec.
        Structure is documented below.
        """
        return pulumi.get(self, "custom")

    @custom.setter
    def custom(self, value: Optional[pulumi.Input['AccessLevelsAccessLevelCustomArgs']]):
        pulumi.set(self, "custom", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        Description of the expression
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)


@pulumi.input_type
class AccessLevelsAccessLevelBasicArgs:
    def __init__(__self__, *,
                 conditions: pulumi.Input[Sequence[pulumi.Input['AccessLevelsAccessLevelBasicConditionArgs']]],
                 combining_function: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['AccessLevelsAccessLevelBasicConditionArgs']]] conditions: A set of requirements for the AccessLevel to be granted.
               Structure is documented below.
        :param pulumi.Input[str] combining_function: How the conditions list should be combined to determine if a request
               is granted this AccessLevel. If AND is used, each Condition in
               conditions must be satisfied for the AccessLevel to be applied. If
               OR is used, at least one Condition in conditions must be satisfied
               for the AccessLevel to be applied.
               Default value is `AND`.
               Possible values are `AND` and `OR`.
        """
        pulumi.set(__self__, "conditions", conditions)
        if combining_function is not None:
            pulumi.set(__self__, "combining_function", combining_function)

    @property
    @pulumi.getter
    def conditions(self) -> pulumi.Input[Sequence[pulumi.Input['AccessLevelsAccessLevelBasicConditionArgs']]]:
        """
        A set of requirements for the AccessLevel to be granted.
        Structure is documented below.
        """
        return pulumi.get(self, "conditions")

    @conditions.setter
    def conditions(self, value: pulumi.Input[Sequence[pulumi.Input['AccessLevelsAccessLevelBasicConditionArgs']]]):
        pulumi.set(self, "conditions", value)

    @property
    @pulumi.getter(name="combiningFunction")
    def combining_function(self) -> Optional[pulumi.Input[str]]:
        """
        How the conditions list should be combined to determine if a request
        is granted this AccessLevel. If AND is used, each Condition in
        conditions must be satisfied for the AccessLevel to be applied. If
        OR is used, at least one Condition in conditions must be satisfied
        for the AccessLevel to be applied.
        Default value is `AND`.
        Possible values are `AND` and `OR`.
        """
        return pulumi.get(self, "combining_function")

    @combining_function.setter
    def combining_function(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "combining_function", value)


@pulumi.input_type
class AccessLevelsAccessLevelBasicConditionArgs:
    def __init__(__self__, *,
                 device_policy: Optional[pulumi.Input['AccessLevelsAccessLevelBasicConditionDevicePolicyArgs']] = None,
                 ip_subnetworks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 members: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 negate: Optional[pulumi.Input[bool]] = None,
                 regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 required_access_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        :param pulumi.Input['AccessLevelsAccessLevelBasicConditionDevicePolicyArgs'] device_policy: Device specific restrictions, all restrictions must hold for
               the Condition to be true. If not specified, all devices are
               allowed.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_subnetworks: A list of CIDR block IP subnetwork specification. May be IPv4
               or IPv6.
               Note that for a CIDR IP address block, the specified IP address
               portion must be properly truncated (i.e. all the host bits must
               be zero) or the input is considered malformed. For example,
               "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly,
               for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32"
               is not. The originating IP of a request must be in one of the
               listed subnets in order for this Condition to be true.
               If empty, all IP addresses are allowed.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] members: An allowed list of members (users, service accounts).
               Using groups is not supported yet.
               The signed-in user originating the request must be a part of one
               of the provided members. If not specified, a request may come
               from any user (logged in/not logged in, not present in any
               groups, etc.).
               Formats: `user:{emailid}`, `serviceAccount:{emailid}`
        :param pulumi.Input[bool] negate: Whether to negate the Condition. If true, the Condition becomes
               a NAND over its non-empty fields, each field must be false for
               the Condition overall to be satisfied. Defaults to false.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] regions: The request must originate from one of the provided
               countries/regions.
               Format: A valid ISO 3166-1 alpha-2 code.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] required_access_levels: A list of other access levels defined in the same Policy,
               referenced by resource name. Referencing an AccessLevel which
               does not exist is an error. All access levels listed must be
               granted for the Condition to be true.
               Format: accessPolicies/{policy_id}/accessLevels/{short_name}
        """
        if device_policy is not None:
            pulumi.set(__self__, "device_policy", device_policy)
        if ip_subnetworks is not None:
            pulumi.set(__self__, "ip_subnetworks", ip_subnetworks)
        if members is not None:
            pulumi.set(__self__, "members", members)
        if negate is not None:
            pulumi.set(__self__, "negate", negate)
        if regions is not None:
            pulumi.set(__self__, "regions", regions)
        if required_access_levels is not None:
            pulumi.set(__self__, "required_access_levels", required_access_levels)

    @property
    @pulumi.getter(name="devicePolicy")
    def device_policy(self) -> Optional[pulumi.Input['AccessLevelsAccessLevelBasicConditionDevicePolicyArgs']]:
        """
        Device specific restrictions, all restrictions must hold for
        the Condition to be true. If not specified, all devices are
        allowed.
        Structure is documented below.
        """
        return pulumi.get(self, "device_policy")

    @device_policy.setter
    def device_policy(self, value: Optional[pulumi.Input['AccessLevelsAccessLevelBasicConditionDevicePolicyArgs']]):
        pulumi.set(self, "device_policy", value)

    @property
    @pulumi.getter(name="ipSubnetworks")
    def ip_subnetworks(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of CIDR block IP subnetwork specification. May be IPv4
        or IPv6.
        Note that for a CIDR IP address block, the specified IP address
        portion must be properly truncated (i.e. all the host bits must
        be zero) or the input is considered malformed. For example,
        "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly,
        for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32"
        is not. The originating IP of a request must be in one of the
        listed subnets in order for this Condition to be true.
        If empty, all IP addresses are allowed.
        """
        return pulumi.get(self, "ip_subnetworks")

    @ip_subnetworks.setter
    def ip_subnetworks(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "ip_subnetworks", value)

    @property
    @pulumi.getter
    def members(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        An allowed list of members (users, service accounts).
        Using groups is not supported yet.
        The signed-in user originating the request must be a part of one
        of the provided members. If not specified, a request may come
        from any user (logged in/not logged in, not present in any
        groups, etc.).
        Formats: `user:{emailid}`, `serviceAccount:{emailid}`
        """
        return pulumi.get(self, "members")

    @members.setter
    def members(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "members", value)

    @property
    @pulumi.getter
    def negate(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to negate the Condition. If true, the Condition becomes
        a NAND over its non-empty fields, each field must be false for
        the Condition overall to be satisfied. Defaults to false.
        """
        return pulumi.get(self, "negate")

    @negate.setter
    def negate(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "negate", value)

    @property
    @pulumi.getter
    def regions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        The request must originate from one of the provided
        countries/regions.
        Format: A valid ISO 3166-1 alpha-2 code.
        """
        return pulumi.get(self, "regions")

    @regions.setter
    def regions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "regions", value)

    @property
    @pulumi.getter(name="requiredAccessLevels")
    def required_access_levels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of other access levels defined in the same Policy,
        referenced by resource name. Referencing an AccessLevel which
        does not exist is an error. All access levels listed must be
        granted for the Condition to be true.
        Format: accessPolicies/{policy_id}/accessLevels/{short_name}
        """
        return pulumi.get(self, "required_access_levels")

    @required_access_levels.setter
    def required_access_levels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "required_access_levels", value)


@pulumi.input_type
class AccessLevelsAccessLevelBasicConditionDevicePolicyArgs:
    def __init__(__self__, *,
                 allowed_device_management_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 allowed_encryption_statuses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 os_constraints: Optional[pulumi.Input[Sequence[pulumi.Input['AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs']]]] = None,
                 require_admin_approval: Optional[pulumi.Input[bool]] = None,
                 require_corp_owned: Optional[pulumi.Input[bool]] = None,
                 require_screen_lock: Optional[pulumi.Input[bool]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_device_management_levels: A list of allowed device management levels.
               An empty list allows all management levels.
               Each value may be one of `MANAGEMENT_UNSPECIFIED`, `NONE`, `BASIC`, and `COMPLETE`.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_encryption_statuses: A list of allowed encryptions statuses.
               An empty list allows all statuses.
               Each value may be one of `ENCRYPTION_UNSPECIFIED`, `ENCRYPTION_UNSUPPORTED`, `UNENCRYPTED`, and `ENCRYPTED`.
        :param pulumi.Input[Sequence[pulumi.Input['AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs']]] os_constraints: A list of allowed OS versions.
               An empty list allows all types and all versions.
               Structure is documented below.
        :param pulumi.Input[bool] require_admin_approval: Whether the device needs to be approved by the customer admin.
        :param pulumi.Input[bool] require_corp_owned: Whether the device needs to be corp owned.
        :param pulumi.Input[bool] require_screen_lock: Whether or not screenlock is required for the DevicePolicy
               to be true. Defaults to false.
        """
        if allowed_device_management_levels is not None:
            pulumi.set(__self__, "allowed_device_management_levels", allowed_device_management_levels)
        if allowed_encryption_statuses is not None:
            pulumi.set(__self__, "allowed_encryption_statuses", allowed_encryption_statuses)
        if os_constraints is not None:
            pulumi.set(__self__, "os_constraints", os_constraints)
        if require_admin_approval is not None:
            pulumi.set(__self__, "require_admin_approval", require_admin_approval)
        if require_corp_owned is not None:
            pulumi.set(__self__, "require_corp_owned", require_corp_owned)
        if require_screen_lock is not None:
            pulumi.set(__self__, "require_screen_lock", require_screen_lock)

    @property
    @pulumi.getter(name="allowedDeviceManagementLevels")
    def allowed_device_management_levels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of allowed device management levels.
        An empty list allows all management levels.
        Each value may be one of `MANAGEMENT_UNSPECIFIED`, `NONE`, `BASIC`, and `COMPLETE`.
        """
        return pulumi.get(self, "allowed_device_management_levels")

    @allowed_device_management_levels.setter
    def allowed_device_management_levels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "allowed_device_management_levels", value)

    @property
    @pulumi.getter(name="allowedEncryptionStatuses")
    def allowed_encryption_statuses(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of allowed encryptions statuses.
        An empty list allows all statuses.
        Each value may be one of `ENCRYPTION_UNSPECIFIED`, `ENCRYPTION_UNSUPPORTED`, `UNENCRYPTED`, and `ENCRYPTED`.
        """
        return pulumi.get(self, "allowed_encryption_statuses")

    @allowed_encryption_statuses.setter
    def allowed_encryption_statuses(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "allowed_encryption_statuses", value)

    @property
    @pulumi.getter(name="osConstraints")
    def os_constraints(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs']]]]:
        """
        A list of allowed OS versions.
        An empty list allows all types and all versions.
        Structure is documented below.
        """
        return pulumi.get(self, "os_constraints")

    @os_constraints.setter
    def os_constraints(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs']]]]):
        pulumi.set(self, "os_constraints", value)

    @property
    @pulumi.getter(name="requireAdminApproval")
    def require_admin_approval(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether the device needs to be approved by the customer admin.
        """
        return pulumi.get(self, "require_admin_approval")

    @require_admin_approval.setter
    def require_admin_approval(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "require_admin_approval", value)

    @property
    @pulumi.getter(name="requireCorpOwned")
    def require_corp_owned(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether the device needs to be corp owned.
        """
        return pulumi.get(self, "require_corp_owned")

    @require_corp_owned.setter
    def require_corp_owned(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "require_corp_owned", value)

    @property
    @pulumi.getter(name="requireScreenLock")
    def require_screen_lock(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether or not screenlock is required for the DevicePolicy
        to be true. Defaults to false.
        """
        return pulumi.get(self, "require_screen_lock")

    @require_screen_lock.setter
    def require_screen_lock(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "require_screen_lock", value)


@pulumi.input_type
class AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs:
    def __init__(__self__, *,
                 os_type: pulumi.Input[str],
                 minimum_version: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] os_type: The operating system type of the device.
               Possible values are `OS_UNSPECIFIED`, `DESKTOP_MAC`, `DESKTOP_WINDOWS`, `DESKTOP_LINUX`, `DESKTOP_CHROME_OS`, `ANDROID`, and `IOS`.
        :param pulumi.Input[str] minimum_version: The minimum allowed OS version. If not set, any version
               of this OS satisfies the constraint.
               Format: "major.minor.patch" such as "10.5.301", "9.2.1".
        """
        pulumi.set(__self__, "os_type", os_type)
        if minimum_version is not None:
            pulumi.set(__self__, "minimum_version", minimum_version)

    @property
    @pulumi.getter(name="osType")
    def os_type(self) -> pulumi.Input[str]:
        """
        The operating system type of the device.
        Possible values are `OS_UNSPECIFIED`, `DESKTOP_MAC`, `DESKTOP_WINDOWS`, `DESKTOP_LINUX`, `DESKTOP_CHROME_OS`, `ANDROID`, and `IOS`.
        """
        return pulumi.get(self, "os_type")

    @os_type.setter
    def os_type(self, value: pulumi.Input[str]):
        pulumi.set(self, "os_type", value)

    @property
    @pulumi.getter(name="minimumVersion")
    def minimum_version(self) -> Optional[pulumi.Input[str]]:
        """
        The minimum allowed OS version. If not set, any version
        of this OS satisfies the constraint.
        Format: "major.minor.patch" such as "10.5.301", "9.2.1".
        """
        return pulumi.get(self, "minimum_version")

    @minimum_version.setter
    def minimum_version(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "minimum_version", value)


@pulumi.input_type
class AccessLevelsAccessLevelCustomArgs:
    def __init__(__self__, *,
                 expr: pulumi.Input['AccessLevelsAccessLevelCustomExprArgs']):
        """
        :param pulumi.Input['AccessLevelsAccessLevelCustomExprArgs'] expr: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language.
               This page details the objects and attributes that are used to the build the CEL expressions for
               custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec.
               Structure is documented below.
        """
        pulumi.set(__self__, "expr", expr)

    @property
    @pulumi.getter
    def expr(self) -> pulumi.Input['AccessLevelsAccessLevelCustomExprArgs']:
        """
        Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language.
        This page details the objects and attributes that are used to the build the CEL expressions for
        custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec.
        Structure is documented below.
        """
        return pulumi.get(self, "expr")

    @expr.setter
    def expr(self, value: pulumi.Input['AccessLevelsAccessLevelCustomExprArgs']):
        pulumi.set(self, "expr", value)


@pulumi.input_type
class AccessLevelsAccessLevelCustomExprArgs:
    def __init__(__self__, *,
                 expression: pulumi.Input[str],
                 description: Optional[pulumi.Input[str]] = None,
                 location: Optional[pulumi.Input[str]] = None,
                 title: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] expression: Textual representation of an expression in Common Expression Language syntax.
        :param pulumi.Input[str] description: Description of the expression
        :param pulumi.Input[str] location: String indicating the location of the expression for error reporting, e.g. a file name and a position in the file
        :param pulumi.Input[str] title: Title for the expression, i.e. a short string describing its purpose.
        """
        pulumi.set(__self__, "expression", expression)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if location is not None:
            pulumi.set(__self__, "location", location)
        if title is not None:
            pulumi.set(__self__, "title", title)

    @property
    @pulumi.getter
    def expression(self) -> pulumi.Input[str]:
        """
        Textual representation of an expression in Common Expression Language syntax.
        """
        return pulumi.get(self, "expression")

    @expression.setter
    def expression(self, value: pulumi.Input[str]):
        pulumi.set(self, "expression", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        Description of the expression
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter
    def location(self) -> Optional[pulumi.Input[str]]:
        """
        String indicating the location of the expression for error reporting, e.g. a file name and a position in the file
        """
        return pulumi.get(self, "location")

    @location.setter
    def location(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "location", value)

    @property
    @pulumi.getter
    def title(self) -> Optional[pulumi.Input[str]]:
        """
        Title for the expression, i.e. a short string describing its purpose.
        """
        return pulumi.get(self, "title")

    @title.setter
    def title(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "title", value)


@pulumi.input_type
class ServicePerimeterSpecArgs:
    def __init__(__self__, *,
                 access_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 egress_policies: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyArgs']]]] = None,
                 ingress_policies: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 restricted_services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 vpc_accessible_services: Optional[pulumi.Input['ServicePerimeterSpecVpcAccessibleServicesArgs']] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] access_levels: A list of AccessLevel resource names that allow resources within
               the ServicePerimeter to be accessed from the internet.
               AccessLevels listed must be in the same policy as this
               ServicePerimeter. Referencing a nonexistent AccessLevel is a
               syntax error. If no AccessLevel names are listed, resources within
               the perimeter can only be accessed via GCP calls with request
               origins within the perimeter. For Service Perimeter Bridge, must
               be empty.
               Format: accessPolicies/{policy_id}/accessLevels/{access_level_name}
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyArgs']]] egress_policies: List of EgressPolicies to apply to the perimeter. A perimeter may
               have multiple EgressPolicies, each of which is evaluated separately.
               Access is granted if any EgressPolicy grants it. Must be empty for
               a perimeter bridge.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyArgs']]] ingress_policies: List of `IngressPolicies` to apply to the perimeter. A perimeter may
               have multiple `IngressPolicies`, each of which is evaluated
               separately. Access is granted if any `Ingress Policy` grants it.
               Must be empty for a perimeter bridge.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] restricted_services: GCP services that are subject to the Service Perimeter
               restrictions. Must contain a list of services. For example, if
               `storage.googleapis.com` is specified, access to the storage
               buckets inside the perimeter must meet the perimeter's access
               restrictions.
        :param pulumi.Input['ServicePerimeterSpecVpcAccessibleServicesArgs'] vpc_accessible_services: Specifies how APIs are allowed to communicate within the Service
               Perimeter.
               Structure is documented below.
        """
        if access_levels is not None:
            pulumi.set(__self__, "access_levels", access_levels)
        if egress_policies is not None:
            pulumi.set(__self__, "egress_policies", egress_policies)
        if ingress_policies is not None:
            pulumi.set(__self__, "ingress_policies", ingress_policies)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)
        if restricted_services is not None:
            pulumi.set(__self__, "restricted_services", restricted_services)
        if vpc_accessible_services is not None:
            pulumi.set(__self__, "vpc_accessible_services", vpc_accessible_services)

    @property
    @pulumi.getter(name="accessLevels")
    def access_levels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of AccessLevel resource names that allow resources within
        the ServicePerimeter to be accessed from the internet.
        AccessLevels listed must be in the same policy as this
        ServicePerimeter. Referencing a nonexistent AccessLevel is a
        syntax error. If no AccessLevel names are listed, resources within
        the perimeter can only be accessed via GCP calls with request
        origins within the perimeter. For Service Perimeter Bridge, must
        be empty.
        Format: accessPolicies/{policy_id}/accessLevels/{access_level_name}
        """
        return pulumi.get(self, "access_levels")

    @access_levels.setter
    def access_levels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "access_levels", value)

    @property
    @pulumi.getter(name="egressPolicies")
    def egress_policies(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyArgs']]]]:
        """
        List of EgressPolicies to apply to the perimeter. A perimeter may
        have multiple EgressPolicies, each of which is evaluated separately.
        Access is granted if any EgressPolicy grants it. Must be empty for
        a perimeter bridge.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_policies")

    @egress_policies.setter
    def egress_policies(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyArgs']]]]):
        pulumi.set(self, "egress_policies", value)

    @property
    @pulumi.getter(name="ingressPolicies")
    def ingress_policies(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyArgs']]]]:
        """
        List of `IngressPolicies` to apply to the perimeter. A perimeter may
        have multiple `IngressPolicies`, each of which is evaluated
        separately. Access is granted if any `Ingress Policy` grants it.
        Must be empty for a perimeter bridge.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_policies")

    @ingress_policies.setter
    def ingress_policies(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyArgs']]]]):
        pulumi.set(self, "ingress_policies", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)

    @property
    @pulumi.getter(name="restrictedServices")
    def restricted_services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        GCP services that are subject to the Service Perimeter
        restrictions. Must contain a list of services. For example, if
        `storage.googleapis.com` is specified, access to the storage
        buckets inside the perimeter must meet the perimeter's access
        restrictions.
        """
        return pulumi.get(self, "restricted_services")

    @restricted_services.setter
    def restricted_services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "restricted_services", value)

    @property
    @pulumi.getter(name="vpcAccessibleServices")
    def vpc_accessible_services(self) -> Optional[pulumi.Input['ServicePerimeterSpecVpcAccessibleServicesArgs']]:
        """
        Specifies how APIs are allowed to communicate within the Service
        Perimeter.
        Structure is documented below.
        """
        return pulumi.get(self, "vpc_accessible_services")

    @vpc_accessible_services.setter
    def vpc_accessible_services(self, value: Optional[pulumi.Input['ServicePerimeterSpecVpcAccessibleServicesArgs']]):
        pulumi.set(self, "vpc_accessible_services", value)


@pulumi.input_type
class ServicePerimeterSpecEgressPolicyArgs:
    def __init__(__self__, *,
                 egress_from: Optional[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressFromArgs']] = None,
                 egress_to: Optional[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToArgs']] = None):
        """
        :param pulumi.Input['ServicePerimeterSpecEgressPolicyEgressFromArgs'] egress_from: Defines conditions on the source of a request causing this `EgressPolicy` to apply.
               Structure is documented below.
        :param pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToArgs'] egress_to: Defines the conditions on the `ApiOperation` and destination resources that
               cause this `EgressPolicy` to apply.
               Structure is documented below.
        """
        if egress_from is not None:
            pulumi.set(__self__, "egress_from", egress_from)
        if egress_to is not None:
            pulumi.set(__self__, "egress_to", egress_to)

    @property
    @pulumi.getter(name="egressFrom")
    def egress_from(self) -> Optional[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressFromArgs']]:
        """
        Defines conditions on the source of a request causing this `EgressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_from")

    @egress_from.setter
    def egress_from(self, value: Optional[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressFromArgs']]):
        pulumi.set(self, "egress_from", value)

    @property
    @pulumi.getter(name="egressTo")
    def egress_to(self) -> Optional[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToArgs']]:
        """
        Defines the conditions on the `ApiOperation` and destination resources that
        cause this `EgressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_to")

    @egress_to.setter
    def egress_to(self, value: Optional[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToArgs']]):
        pulumi.set(self, "egress_to", value)


@pulumi.input_type
class ServicePerimeterSpecEgressPolicyEgressFromArgs:
    def __init__(__self__, *,
                 identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 identity_type: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] identities: A list of identities that are allowed access through this `EgressPolicy`.
               Should be in the format of email address. The email address should
               represent individual user or service account only.
        :param pulumi.Input[str] identity_type: Specifies the type of identities that are allowed access to outside the
               perimeter. If left unspecified, then members of `identities` field will
               be allowed access.
               Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        if identities is not None:
            pulumi.set(__self__, "identities", identities)
        if identity_type is not None:
            pulumi.set(__self__, "identity_type", identity_type)

    @property
    @pulumi.getter
    def identities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of identities that are allowed access through this `EgressPolicy`.
        Should be in the format of email address. The email address should
        represent individual user or service account only.
        """
        return pulumi.get(self, "identities")

    @identities.setter
    def identities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "identities", value)

    @property
    @pulumi.getter(name="identityType")
    def identity_type(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the type of identities that are allowed access to outside the
        perimeter. If left unspecified, then members of `identities` field will
        be allowed access.
        Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        return pulumi.get(self, "identity_type")

    @identity_type.setter
    def identity_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "identity_type", value)


@pulumi.input_type
class ServicePerimeterSpecEgressPolicyEgressToArgs:
    def __init__(__self__, *,
                 operations: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToOperationArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToOperationArgs']]] operations: A list of `ApiOperations` that this egress rule applies to. A request matches
               if it contains an operation/service in this list.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        """
        if operations is not None:
            pulumi.set(__self__, "operations", operations)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)

    @property
    @pulumi.getter
    def operations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToOperationArgs']]]]:
        """
        A list of `ApiOperations` that this egress rule applies to. A request matches
        if it contains an operation/service in this list.
        Structure is documented below.
        """
        return pulumi.get(self, "operations")

    @operations.setter
    def operations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToOperationArgs']]]]):
        pulumi.set(self, "operations", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)


@pulumi.input_type
class ServicePerimeterSpecEgressPolicyEgressToOperationArgs:
    def __init__(__self__, *,
                 method_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs']]]] = None,
                 service_name: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs']]] method_selectors: API methods or permissions to allow. Method or permission must belong
               to the service specified by `serviceName` field. A single MethodSelector
               entry with `*` specified for the `method` field will allow all methods
               AND permissions for the service specified in `serviceName`.
               Structure is documented below.
        :param pulumi.Input[str] service_name: The name of the API whose methods or permissions the `IngressPolicy` or
               `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
               field set to `*` will allow all methods AND permissions for all services.
        """
        if method_selectors is not None:
            pulumi.set(__self__, "method_selectors", method_selectors)
        if service_name is not None:
            pulumi.set(__self__, "service_name", service_name)

    @property
    @pulumi.getter(name="methodSelectors")
    def method_selectors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs']]]]:
        """
        API methods or permissions to allow. Method or permission must belong
        to the service specified by `serviceName` field. A single MethodSelector
        entry with `*` specified for the `method` field will allow all methods
        AND permissions for the service specified in `serviceName`.
        Structure is documented below.
        """
        return pulumi.get(self, "method_selectors")

    @method_selectors.setter
    def method_selectors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs']]]]):
        pulumi.set(self, "method_selectors", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the API whose methods or permissions the `IngressPolicy` or
        `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
        field set to `*` will allow all methods AND permissions for all services.
        """
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "service_name", value)


@pulumi.input_type
class ServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs:
    def __init__(__self__, *,
                 method: Optional[pulumi.Input[str]] = None,
                 permission: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] method: Value for `method` should be a valid method name for the corresponding
               `serviceName` in `ApiOperation`. If `*` used as value for method,
               then ALL methods and permissions are allowed.
        :param pulumi.Input[str] permission: Value for permission should be a valid Cloud IAM permission for the
               corresponding `serviceName` in `ApiOperation`.
        """
        if method is not None:
            pulumi.set(__self__, "method", method)
        if permission is not None:
            pulumi.set(__self__, "permission", permission)

    @property
    @pulumi.getter
    def method(self) -> Optional[pulumi.Input[str]]:
        """
        Value for `method` should be a valid method name for the corresponding
        `serviceName` in `ApiOperation`. If `*` used as value for method,
        then ALL methods and permissions are allowed.
        """
        return pulumi.get(self, "method")

    @method.setter
    def method(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "method", value)

    @property
    @pulumi.getter
    def permission(self) -> Optional[pulumi.Input[str]]:
        """
        Value for permission should be a valid Cloud IAM permission for the
        corresponding `serviceName` in `ApiOperation`.
        """
        return pulumi.get(self, "permission")

    @permission.setter
    def permission(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "permission", value)


@pulumi.input_type
class ServicePerimeterSpecIngressPolicyArgs:
    def __init__(__self__, *,
                 ingress_from: Optional[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressFromArgs']] = None,
                 ingress_to: Optional[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToArgs']] = None):
        """
        :param pulumi.Input['ServicePerimeterSpecIngressPolicyIngressFromArgs'] ingress_from: Defines the conditions on the source of a request causing this `IngressPolicy`
               to apply.
               Structure is documented below.
        :param pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToArgs'] ingress_to: Defines the conditions on the `ApiOperation` and request destination that cause
               this `IngressPolicy` to apply.
               Structure is documented below.
        """
        if ingress_from is not None:
            pulumi.set(__self__, "ingress_from", ingress_from)
        if ingress_to is not None:
            pulumi.set(__self__, "ingress_to", ingress_to)

    @property
    @pulumi.getter(name="ingressFrom")
    def ingress_from(self) -> Optional[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressFromArgs']]:
        """
        Defines the conditions on the source of a request causing this `IngressPolicy`
        to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_from")

    @ingress_from.setter
    def ingress_from(self, value: Optional[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressFromArgs']]):
        pulumi.set(self, "ingress_from", value)

    @property
    @pulumi.getter(name="ingressTo")
    def ingress_to(self) -> Optional[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToArgs']]:
        """
        Defines the conditions on the `ApiOperation` and request destination that cause
        this `IngressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_to")

    @ingress_to.setter
    def ingress_to(self, value: Optional[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToArgs']]):
        pulumi.set(self, "ingress_to", value)


@pulumi.input_type
class ServicePerimeterSpecIngressPolicyIngressFromArgs:
    def __init__(__self__, *,
                 identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 identity_type: Optional[pulumi.Input[str]] = None,
                 sources: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressFromSourceArgs']]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] identities: A list of identities that are allowed access through this `EgressPolicy`.
               Should be in the format of email address. The email address should
               represent individual user or service account only.
        :param pulumi.Input[str] identity_type: Specifies the type of identities that are allowed access to outside the
               perimeter. If left unspecified, then members of `identities` field will
               be allowed access.
               Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressFromSourceArgs']]] sources: Sources that this `IngressPolicy` authorizes access from.
               Structure is documented below.
        """
        if identities is not None:
            pulumi.set(__self__, "identities", identities)
        if identity_type is not None:
            pulumi.set(__self__, "identity_type", identity_type)
        if sources is not None:
            pulumi.set(__self__, "sources", sources)

    @property
    @pulumi.getter
    def identities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of identities that are allowed access through this `EgressPolicy`.
        Should be in the format of email address. The email address should
        represent individual user or service account only.
        """
        return pulumi.get(self, "identities")

    @identities.setter
    def identities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "identities", value)

    @property
    @pulumi.getter(name="identityType")
    def identity_type(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the type of identities that are allowed access to outside the
        perimeter. If left unspecified, then members of `identities` field will
        be allowed access.
        Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        return pulumi.get(self, "identity_type")

    @identity_type.setter
    def identity_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "identity_type", value)

    @property
    @pulumi.getter
    def sources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressFromSourceArgs']]]]:
        """
        Sources that this `IngressPolicy` authorizes access from.
        Structure is documented below.
        """
        return pulumi.get(self, "sources")

    @sources.setter
    def sources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressFromSourceArgs']]]]):
        pulumi.set(self, "sources", value)


@pulumi.input_type
class ServicePerimeterSpecIngressPolicyIngressFromSourceArgs:
    def __init__(__self__, *,
                 access_level: Optional[pulumi.Input[str]] = None,
                 resource: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] access_level: An `AccessLevel` resource name that allow resources within the
               `ServicePerimeters` to be accessed from the internet. `AccessLevels` listed
               must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent
               `AccessLevel` will cause an error. If no `AccessLevel` names are listed,
               resources within the perimeter can only be accessed via Google Cloud calls
               with request origins within the perimeter.
               Example `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL.`
               If * is specified, then all IngressSources will be allowed.
        :param pulumi.Input[str] resource: A Google Cloud resource that is allowed to ingress the perimeter.
               Requests from these resources will be allowed to access perimeter data.
               Currently only projects are allowed. Format `projects/{project_number}`
               The project may be in any Google Cloud organization, not just the
               organization that the perimeter is defined in. `*` is not allowed, the case
               of allowing all Google Cloud resources only is not supported.
        """
        if access_level is not None:
            pulumi.set(__self__, "access_level", access_level)
        if resource is not None:
            pulumi.set(__self__, "resource", resource)

    @property
    @pulumi.getter(name="accessLevel")
    def access_level(self) -> Optional[pulumi.Input[str]]:
        """
        An `AccessLevel` resource name that allow resources within the
        `ServicePerimeters` to be accessed from the internet. `AccessLevels` listed
        must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent
        `AccessLevel` will cause an error. If no `AccessLevel` names are listed,
        resources within the perimeter can only be accessed via Google Cloud calls
        with request origins within the perimeter.
        Example `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL.`
        If * is specified, then all IngressSources will be allowed.
        """
        return pulumi.get(self, "access_level")

    @access_level.setter
    def access_level(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "access_level", value)

    @property
    @pulumi.getter
    def resource(self) -> Optional[pulumi.Input[str]]:
        """
        A Google Cloud resource that is allowed to ingress the perimeter.
        Requests from these resources will be allowed to access perimeter data.
        Currently only projects are allowed. Format `projects/{project_number}`
        The project may be in any Google Cloud organization, not just the
        organization that the perimeter is defined in. `*` is not allowed, the case
        of allowing all Google Cloud resources only is not supported.
        """
        return pulumi.get(self, "resource")

    @resource.setter
    def resource(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "resource", value)


@pulumi.input_type
class ServicePerimeterSpecIngressPolicyIngressToArgs:
    def __init__(__self__, *,
                 operations: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToOperationArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToOperationArgs']]] operations: A list of `ApiOperations` that this egress rule applies to. A request matches
               if it contains an operation/service in this list.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        """
        if operations is not None:
            pulumi.set(__self__, "operations", operations)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)

    @property
    @pulumi.getter
    def operations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToOperationArgs']]]]:
        """
        A list of `ApiOperations` that this egress rule applies to. A request matches
        if it contains an operation/service in this list.
        Structure is documented below.
        """
        return pulumi.get(self, "operations")

    @operations.setter
    def operations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToOperationArgs']]]]):
        pulumi.set(self, "operations", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)


@pulumi.input_type
class ServicePerimeterSpecIngressPolicyIngressToOperationArgs:
    def __init__(__self__, *,
                 method_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs']]]] = None,
                 service_name: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs']]] method_selectors: API methods or permissions to allow. Method or permission must belong
               to the service specified by `serviceName` field. A single MethodSelector
               entry with `*` specified for the `method` field will allow all methods
               AND permissions for the service specified in `serviceName`.
               Structure is documented below.
        :param pulumi.Input[str] service_name: The name of the API whose methods or permissions the `IngressPolicy` or
               `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
               field set to `*` will allow all methods AND permissions for all services.
        """
        if method_selectors is not None:
            pulumi.set(__self__, "method_selectors", method_selectors)
        if service_name is not None:
            pulumi.set(__self__, "service_name", service_name)

    @property
    @pulumi.getter(name="methodSelectors")
    def method_selectors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs']]]]:
        """
        API methods or permissions to allow. Method or permission must belong
        to the service specified by `serviceName` field. A single MethodSelector
        entry with `*` specified for the `method` field will allow all methods
        AND permissions for the service specified in `serviceName`.
        Structure is documented below.
        """
        return pulumi.get(self, "method_selectors")

    @method_selectors.setter
    def method_selectors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs']]]]):
        pulumi.set(self, "method_selectors", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the API whose methods or permissions the `IngressPolicy` or
        `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
        field set to `*` will allow all methods AND permissions for all services.
        """
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "service_name", value)


@pulumi.input_type
class ServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs:
    def __init__(__self__, *,
                 method: Optional[pulumi.Input[str]] = None,
                 permission: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] method: Value for `method` should be a valid method name for the corresponding
               `serviceName` in `ApiOperation`. If `*` used as value for method,
               then ALL methods and permissions are allowed.
        :param pulumi.Input[str] permission: Value for permission should be a valid Cloud IAM permission for the
               corresponding `serviceName` in `ApiOperation`.
        """
        if method is not None:
            pulumi.set(__self__, "method", method)
        if permission is not None:
            pulumi.set(__self__, "permission", permission)

    @property
    @pulumi.getter
    def method(self) -> Optional[pulumi.Input[str]]:
        """
        Value for `method` should be a valid method name for the corresponding
        `serviceName` in `ApiOperation`. If `*` used as value for method,
        then ALL methods and permissions are allowed.
        """
        return pulumi.get(self, "method")

    @method.setter
    def method(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "method", value)

    @property
    @pulumi.getter
    def permission(self) -> Optional[pulumi.Input[str]]:
        """
        Value for permission should be a valid Cloud IAM permission for the
        corresponding `serviceName` in `ApiOperation`.
        """
        return pulumi.get(self, "permission")

    @permission.setter
    def permission(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "permission", value)


@pulumi.input_type
class ServicePerimeterSpecVpcAccessibleServicesArgs:
    def __init__(__self__, *,
                 allowed_services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 enable_restriction: Optional[pulumi.Input[bool]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_services: The list of APIs usable within the Service Perimeter.
               Must be empty unless `enableRestriction` is True.
        :param pulumi.Input[bool] enable_restriction: Whether to restrict API calls within the Service Perimeter to the
               list of APIs specified in 'allowedServices'.
        """
        if allowed_services is not None:
            pulumi.set(__self__, "allowed_services", allowed_services)
        if enable_restriction is not None:
            pulumi.set(__self__, "enable_restriction", enable_restriction)

    @property
    @pulumi.getter(name="allowedServices")
    def allowed_services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        The list of APIs usable within the Service Perimeter.
        Must be empty unless `enableRestriction` is True.
        """
        return pulumi.get(self, "allowed_services")

    @allowed_services.setter
    def allowed_services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "allowed_services", value)

    @property
    @pulumi.getter(name="enableRestriction")
    def enable_restriction(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to restrict API calls within the Service Perimeter to the
        list of APIs specified in 'allowedServices'.
        """
        return pulumi.get(self, "enable_restriction")

    @enable_restriction.setter
    def enable_restriction(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "enable_restriction", value)


@pulumi.input_type
class ServicePerimeterStatusArgs:
    def __init__(__self__, *,
                 access_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 egress_policies: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyArgs']]]] = None,
                 ingress_policies: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 restricted_services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 vpc_accessible_services: Optional[pulumi.Input['ServicePerimeterStatusVpcAccessibleServicesArgs']] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] access_levels: A list of AccessLevel resource names that allow resources within
               the ServicePerimeter to be accessed from the internet.
               AccessLevels listed must be in the same policy as this
               ServicePerimeter. Referencing a nonexistent AccessLevel is a
               syntax error. If no AccessLevel names are listed, resources within
               the perimeter can only be accessed via GCP calls with request
               origins within the perimeter. For Service Perimeter Bridge, must
               be empty.
               Format: accessPolicies/{policy_id}/accessLevels/{access_level_name}
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyArgs']]] egress_policies: List of EgressPolicies to apply to the perimeter. A perimeter may
               have multiple EgressPolicies, each of which is evaluated separately.
               Access is granted if any EgressPolicy grants it. Must be empty for
               a perimeter bridge.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyArgs']]] ingress_policies: List of `IngressPolicies` to apply to the perimeter. A perimeter may
               have multiple `IngressPolicies`, each of which is evaluated
               separately. Access is granted if any `Ingress Policy` grants it.
               Must be empty for a perimeter bridge.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] restricted_services: GCP services that are subject to the Service Perimeter
               restrictions. Must contain a list of services. For example, if
               `storage.googleapis.com` is specified, access to the storage
               buckets inside the perimeter must meet the perimeter's access
               restrictions.
        :param pulumi.Input['ServicePerimeterStatusVpcAccessibleServicesArgs'] vpc_accessible_services: Specifies how APIs are allowed to communicate within the Service
               Perimeter.
               Structure is documented below.
        """
        if access_levels is not None:
            pulumi.set(__self__, "access_levels", access_levels)
        if egress_policies is not None:
            pulumi.set(__self__, "egress_policies", egress_policies)
        if ingress_policies is not None:
            pulumi.set(__self__, "ingress_policies", ingress_policies)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)
        if restricted_services is not None:
            pulumi.set(__self__, "restricted_services", restricted_services)
        if vpc_accessible_services is not None:
            pulumi.set(__self__, "vpc_accessible_services", vpc_accessible_services)

    @property
    @pulumi.getter(name="accessLevels")
    def access_levels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of AccessLevel resource names that allow resources within
        the ServicePerimeter to be accessed from the internet.
        AccessLevels listed must be in the same policy as this
        ServicePerimeter. Referencing a nonexistent AccessLevel is a
        syntax error. If no AccessLevel names are listed, resources within
        the perimeter can only be accessed via GCP calls with request
        origins within the perimeter. For Service Perimeter Bridge, must
        be empty.
        Format: accessPolicies/{policy_id}/accessLevels/{access_level_name}
        """
        return pulumi.get(self, "access_levels")

    @access_levels.setter
    def access_levels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "access_levels", value)

    @property
    @pulumi.getter(name="egressPolicies")
    def egress_policies(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyArgs']]]]:
        """
        List of EgressPolicies to apply to the perimeter. A perimeter may
        have multiple EgressPolicies, each of which is evaluated separately.
        Access is granted if any EgressPolicy grants it. Must be empty for
        a perimeter bridge.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_policies")

    @egress_policies.setter
    def egress_policies(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyArgs']]]]):
        pulumi.set(self, "egress_policies", value)

    @property
    @pulumi.getter(name="ingressPolicies")
    def ingress_policies(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyArgs']]]]:
        """
        List of `IngressPolicies` to apply to the perimeter. A perimeter may
        have multiple `IngressPolicies`, each of which is evaluated
        separately. Access is granted if any `Ingress Policy` grants it.
        Must be empty for a perimeter bridge.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_policies")

    @ingress_policies.setter
    def ingress_policies(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyArgs']]]]):
        pulumi.set(self, "ingress_policies", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)

    @property
    @pulumi.getter(name="restrictedServices")
    def restricted_services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        GCP services that are subject to the Service Perimeter
        restrictions. Must contain a list of services. For example, if
        `storage.googleapis.com` is specified, access to the storage
        buckets inside the perimeter must meet the perimeter's access
        restrictions.
        """
        return pulumi.get(self, "restricted_services")

    @restricted_services.setter
    def restricted_services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "restricted_services", value)

    @property
    @pulumi.getter(name="vpcAccessibleServices")
    def vpc_accessible_services(self) -> Optional[pulumi.Input['ServicePerimeterStatusVpcAccessibleServicesArgs']]:
        """
        Specifies how APIs are allowed to communicate within the Service
        Perimeter.
        Structure is documented below.
        """
        return pulumi.get(self, "vpc_accessible_services")

    @vpc_accessible_services.setter
    def vpc_accessible_services(self, value: Optional[pulumi.Input['ServicePerimeterStatusVpcAccessibleServicesArgs']]):
        pulumi.set(self, "vpc_accessible_services", value)


@pulumi.input_type
class ServicePerimeterStatusEgressPolicyArgs:
    def __init__(__self__, *,
                 egress_from: Optional[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressFromArgs']] = None,
                 egress_to: Optional[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToArgs']] = None):
        """
        :param pulumi.Input['ServicePerimeterStatusEgressPolicyEgressFromArgs'] egress_from: Defines conditions on the source of a request causing this `EgressPolicy` to apply.
               Structure is documented below.
        :param pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToArgs'] egress_to: Defines the conditions on the `ApiOperation` and destination resources that
               cause this `EgressPolicy` to apply.
               Structure is documented below.
        """
        if egress_from is not None:
            pulumi.set(__self__, "egress_from", egress_from)
        if egress_to is not None:
            pulumi.set(__self__, "egress_to", egress_to)

    @property
    @pulumi.getter(name="egressFrom")
    def egress_from(self) -> Optional[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressFromArgs']]:
        """
        Defines conditions on the source of a request causing this `EgressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_from")

    @egress_from.setter
    def egress_from(self, value: Optional[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressFromArgs']]):
        pulumi.set(self, "egress_from", value)

    @property
    @pulumi.getter(name="egressTo")
    def egress_to(self) -> Optional[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToArgs']]:
        """
        Defines the conditions on the `ApiOperation` and destination resources that
        cause this `EgressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_to")

    @egress_to.setter
    def egress_to(self, value: Optional[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToArgs']]):
        pulumi.set(self, "egress_to", value)


@pulumi.input_type
class ServicePerimeterStatusEgressPolicyEgressFromArgs:
    def __init__(__self__, *,
                 identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 identity_type: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] identities: A list of identities that are allowed access through this `EgressPolicy`.
               Should be in the format of email address. The email address should
               represent individual user or service account only.
        :param pulumi.Input[str] identity_type: Specifies the type of identities that are allowed access to outside the
               perimeter. If left unspecified, then members of `identities` field will
               be allowed access.
               Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        if identities is not None:
            pulumi.set(__self__, "identities", identities)
        if identity_type is not None:
            pulumi.set(__self__, "identity_type", identity_type)

    @property
    @pulumi.getter
    def identities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of identities that are allowed access through this `EgressPolicy`.
        Should be in the format of email address. The email address should
        represent individual user or service account only.
        """
        return pulumi.get(self, "identities")

    @identities.setter
    def identities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "identities", value)

    @property
    @pulumi.getter(name="identityType")
    def identity_type(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the type of identities that are allowed access to outside the
        perimeter. If left unspecified, then members of `identities` field will
        be allowed access.
        Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        return pulumi.get(self, "identity_type")

    @identity_type.setter
    def identity_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "identity_type", value)


@pulumi.input_type
class ServicePerimeterStatusEgressPolicyEgressToArgs:
    def __init__(__self__, *,
                 operations: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToOperationArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToOperationArgs']]] operations: A list of `ApiOperations` that this egress rule applies to. A request matches
               if it contains an operation/service in this list.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        """
        if operations is not None:
            pulumi.set(__self__, "operations", operations)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)

    @property
    @pulumi.getter
    def operations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToOperationArgs']]]]:
        """
        A list of `ApiOperations` that this egress rule applies to. A request matches
        if it contains an operation/service in this list.
        Structure is documented below.
        """
        return pulumi.get(self, "operations")

    @operations.setter
    def operations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToOperationArgs']]]]):
        pulumi.set(self, "operations", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)


@pulumi.input_type
class ServicePerimeterStatusEgressPolicyEgressToOperationArgs:
    def __init__(__self__, *,
                 method_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs']]]] = None,
                 service_name: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs']]] method_selectors: API methods or permissions to allow. Method or permission must belong
               to the service specified by `serviceName` field. A single MethodSelector
               entry with `*` specified for the `method` field will allow all methods
               AND permissions for the service specified in `serviceName`.
               Structure is documented below.
        :param pulumi.Input[str] service_name: The name of the API whose methods or permissions the `IngressPolicy` or
               `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
               field set to `*` will allow all methods AND permissions for all services.
        """
        if method_selectors is not None:
            pulumi.set(__self__, "method_selectors", method_selectors)
        if service_name is not None:
            pulumi.set(__self__, "service_name", service_name)

    @property
    @pulumi.getter(name="methodSelectors")
    def method_selectors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs']]]]:
        """
        API methods or permissions to allow. Method or permission must belong
        to the service specified by `serviceName` field. A single MethodSelector
        entry with `*` specified for the `method` field will allow all methods
        AND permissions for the service specified in `serviceName`.
        Structure is documented below.
        """
        return pulumi.get(self, "method_selectors")

    @method_selectors.setter
    def method_selectors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs']]]]):
        pulumi.set(self, "method_selectors", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the API whose methods or permissions the `IngressPolicy` or
        `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
        field set to `*` will allow all methods AND permissions for all services.
        """
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "service_name", value)


@pulumi.input_type
class ServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs:
    def __init__(__self__, *,
                 method: Optional[pulumi.Input[str]] = None,
                 permission: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] method: Value for `method` should be a valid method name for the corresponding
               `serviceName` in `ApiOperation`. If `*` used as value for method,
               then ALL methods and permissions are allowed.
        :param pulumi.Input[str] permission: Value for permission should be a valid Cloud IAM permission for the
               corresponding `serviceName` in `ApiOperation`.
        """
        if method is not None:
            pulumi.set(__self__, "method", method)
        if permission is not None:
            pulumi.set(__self__, "permission", permission)

    @property
    @pulumi.getter
    def method(self) -> Optional[pulumi.Input[str]]:
        """
        Value for `method` should be a valid method name for the corresponding
        `serviceName` in `ApiOperation`. If `*` used as value for method,
        then ALL methods and permissions are allowed.
        """
        return pulumi.get(self, "method")

    @method.setter
    def method(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "method", value)

    @property
    @pulumi.getter
    def permission(self) -> Optional[pulumi.Input[str]]:
        """
        Value for permission should be a valid Cloud IAM permission for the
        corresponding `serviceName` in `ApiOperation`.
        """
        return pulumi.get(self, "permission")

    @permission.setter
    def permission(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "permission", value)


@pulumi.input_type
class ServicePerimeterStatusIngressPolicyArgs:
    def __init__(__self__, *,
                 ingress_from: Optional[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressFromArgs']] = None,
                 ingress_to: Optional[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToArgs']] = None):
        """
        :param pulumi.Input['ServicePerimeterStatusIngressPolicyIngressFromArgs'] ingress_from: Defines the conditions on the source of a request causing this `IngressPolicy`
               to apply.
               Structure is documented below.
        :param pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToArgs'] ingress_to: Defines the conditions on the `ApiOperation` and request destination that cause
               this `IngressPolicy` to apply.
               Structure is documented below.
        """
        if ingress_from is not None:
            pulumi.set(__self__, "ingress_from", ingress_from)
        if ingress_to is not None:
            pulumi.set(__self__, "ingress_to", ingress_to)

    @property
    @pulumi.getter(name="ingressFrom")
    def ingress_from(self) -> Optional[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressFromArgs']]:
        """
        Defines the conditions on the source of a request causing this `IngressPolicy`
        to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_from")

    @ingress_from.setter
    def ingress_from(self, value: Optional[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressFromArgs']]):
        pulumi.set(self, "ingress_from", value)

    @property
    @pulumi.getter(name="ingressTo")
    def ingress_to(self) -> Optional[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToArgs']]:
        """
        Defines the conditions on the `ApiOperation` and request destination that cause
        this `IngressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_to")

    @ingress_to.setter
    def ingress_to(self, value: Optional[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToArgs']]):
        pulumi.set(self, "ingress_to", value)


@pulumi.input_type
class ServicePerimeterStatusIngressPolicyIngressFromArgs:
    def __init__(__self__, *,
                 identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 identity_type: Optional[pulumi.Input[str]] = None,
                 sources: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressFromSourceArgs']]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] identities: A list of identities that are allowed access through this `EgressPolicy`.
               Should be in the format of email address. The email address should
               represent individual user or service account only.
        :param pulumi.Input[str] identity_type: Specifies the type of identities that are allowed access to outside the
               perimeter. If left unspecified, then members of `identities` field will
               be allowed access.
               Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressFromSourceArgs']]] sources: Sources that this `IngressPolicy` authorizes access from.
               Structure is documented below.
        """
        if identities is not None:
            pulumi.set(__self__, "identities", identities)
        if identity_type is not None:
            pulumi.set(__self__, "identity_type", identity_type)
        if sources is not None:
            pulumi.set(__self__, "sources", sources)

    @property
    @pulumi.getter
    def identities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of identities that are allowed access through this `EgressPolicy`.
        Should be in the format of email address. The email address should
        represent individual user or service account only.
        """
        return pulumi.get(self, "identities")

    @identities.setter
    def identities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "identities", value)

    @property
    @pulumi.getter(name="identityType")
    def identity_type(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the type of identities that are allowed access to outside the
        perimeter. If left unspecified, then members of `identities` field will
        be allowed access.
        Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        return pulumi.get(self, "identity_type")

    @identity_type.setter
    def identity_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "identity_type", value)

    @property
    @pulumi.getter
    def sources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressFromSourceArgs']]]]:
        """
        Sources that this `IngressPolicy` authorizes access from.
        Structure is documented below.
        """
        return pulumi.get(self, "sources")

    @sources.setter
    def sources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressFromSourceArgs']]]]):
        pulumi.set(self, "sources", value)


@pulumi.input_type
class ServicePerimeterStatusIngressPolicyIngressFromSourceArgs:
    def __init__(__self__, *,
                 access_level: Optional[pulumi.Input[str]] = None,
                 resource: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] access_level: An `AccessLevel` resource name that allow resources within the
               `ServicePerimeters` to be accessed from the internet. `AccessLevels` listed
               must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent
               `AccessLevel` will cause an error. If no `AccessLevel` names are listed,
               resources within the perimeter can only be accessed via Google Cloud calls
               with request origins within the perimeter.
               Example `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL.`
               If * is specified, then all IngressSources will be allowed.
        :param pulumi.Input[str] resource: A Google Cloud resource that is allowed to ingress the perimeter.
               Requests from these resources will be allowed to access perimeter data.
               Currently only projects are allowed. Format `projects/{project_number}`
               The project may be in any Google Cloud organization, not just the
               organization that the perimeter is defined in. `*` is not allowed, the case
               of allowing all Google Cloud resources only is not supported.
        """
        if access_level is not None:
            pulumi.set(__self__, "access_level", access_level)
        if resource is not None:
            pulumi.set(__self__, "resource", resource)

    @property
    @pulumi.getter(name="accessLevel")
    def access_level(self) -> Optional[pulumi.Input[str]]:
        """
        An `AccessLevel` resource name that allow resources within the
        `ServicePerimeters` to be accessed from the internet. `AccessLevels` listed
        must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent
        `AccessLevel` will cause an error. If no `AccessLevel` names are listed,
        resources within the perimeter can only be accessed via Google Cloud calls
        with request origins within the perimeter.
        Example `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL.`
        If * is specified, then all IngressSources will be allowed.
        """
        return pulumi.get(self, "access_level")

    @access_level.setter
    def access_level(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "access_level", value)

    @property
    @pulumi.getter
    def resource(self) -> Optional[pulumi.Input[str]]:
        """
        A Google Cloud resource that is allowed to ingress the perimeter.
        Requests from these resources will be allowed to access perimeter data.
        Currently only projects are allowed. Format `projects/{project_number}`
        The project may be in any Google Cloud organization, not just the
        organization that the perimeter is defined in. `*` is not allowed, the case
        of allowing all Google Cloud resources only is not supported.
        """
        return pulumi.get(self, "resource")

    @resource.setter
    def resource(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "resource", value)


@pulumi.input_type
class ServicePerimeterStatusIngressPolicyIngressToArgs:
    def __init__(__self__, *,
                 operations: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToOperationArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToOperationArgs']]] operations: A list of `ApiOperations` that this egress rule applies to. A request matches
               if it contains an operation/service in this list.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        """
        if operations is not None:
            pulumi.set(__self__, "operations", operations)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)

    @property
    @pulumi.getter
    def operations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToOperationArgs']]]]:
        """
        A list of `ApiOperations` that this egress rule applies to. A request matches
        if it contains an operation/service in this list.
        Structure is documented below.
        """
        return pulumi.get(self, "operations")

    @operations.setter
    def operations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToOperationArgs']]]]):
        pulumi.set(self, "operations", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)


@pulumi.input_type
class ServicePerimeterStatusIngressPolicyIngressToOperationArgs:
    def __init__(__self__, *,
                 method_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs']]]] = None,
                 service_name: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs']]] method_selectors: API methods or permissions to allow. Method or permission must belong
               to the service specified by `serviceName` field. A single MethodSelector
               entry with `*` specified for the `method` field will allow all methods
               AND permissions for the service specified in `serviceName`.
               Structure is documented below.
        :param pulumi.Input[str] service_name: The name of the API whose methods or permissions the `IngressPolicy` or
               `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
               field set to `*` will allow all methods AND permissions for all services.
        """
        if method_selectors is not None:
            pulumi.set(__self__, "method_selectors", method_selectors)
        if service_name is not None:
            pulumi.set(__self__, "service_name", service_name)

    @property
    @pulumi.getter(name="methodSelectors")
    def method_selectors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs']]]]:
        """
        API methods or permissions to allow. Method or permission must belong
        to the service specified by `serviceName` field. A single MethodSelector
        entry with `*` specified for the `method` field will allow all methods
        AND permissions for the service specified in `serviceName`.
        Structure is documented below.
        """
        return pulumi.get(self, "method_selectors")

    @method_selectors.setter
    def method_selectors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs']]]]):
        pulumi.set(self, "method_selectors", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the API whose methods or permissions the `IngressPolicy` or
        `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
        field set to `*` will allow all methods AND permissions for all services.
        """
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "service_name", value)


@pulumi.input_type
class ServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs:
    def __init__(__self__, *,
                 method: Optional[pulumi.Input[str]] = None,
                 permission: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] method: Value for `method` should be a valid method name for the corresponding
               `serviceName` in `ApiOperation`. If `*` used as value for method,
               then ALL methods and permissions are allowed.
        :param pulumi.Input[str] permission: Value for permission should be a valid Cloud IAM permission for the
               corresponding `serviceName` in `ApiOperation`.
        """
        if method is not None:
            pulumi.set(__self__, "method", method)
        if permission is not None:
            pulumi.set(__self__, "permission", permission)

    @property
    @pulumi.getter
    def method(self) -> Optional[pulumi.Input[str]]:
        """
        Value for `method` should be a valid method name for the corresponding
        `serviceName` in `ApiOperation`. If `*` used as value for method,
        then ALL methods and permissions are allowed.
        """
        return pulumi.get(self, "method")

    @method.setter
    def method(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "method", value)

    @property
    @pulumi.getter
    def permission(self) -> Optional[pulumi.Input[str]]:
        """
        Value for permission should be a valid Cloud IAM permission for the
        corresponding `serviceName` in `ApiOperation`.
        """
        return pulumi.get(self, "permission")

    @permission.setter
    def permission(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "permission", value)


@pulumi.input_type
class ServicePerimeterStatusVpcAccessibleServicesArgs:
    def __init__(__self__, *,
                 allowed_services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 enable_restriction: Optional[pulumi.Input[bool]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_services: The list of APIs usable within the Service Perimeter.
               Must be empty unless `enableRestriction` is True.
        :param pulumi.Input[bool] enable_restriction: Whether to restrict API calls within the Service Perimeter to the
               list of APIs specified in 'allowedServices'.
        """
        if allowed_services is not None:
            pulumi.set(__self__, "allowed_services", allowed_services)
        if enable_restriction is not None:
            pulumi.set(__self__, "enable_restriction", enable_restriction)

    @property
    @pulumi.getter(name="allowedServices")
    def allowed_services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        The list of APIs usable within the Service Perimeter.
        Must be empty unless `enableRestriction` is True.
        """
        return pulumi.get(self, "allowed_services")

    @allowed_services.setter
    def allowed_services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "allowed_services", value)

    @property
    @pulumi.getter(name="enableRestriction")
    def enable_restriction(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to restrict API calls within the Service Perimeter to the
        list of APIs specified in 'allowedServices'.
        """
        return pulumi.get(self, "enable_restriction")

    @enable_restriction.setter
    def enable_restriction(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "enable_restriction", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterArgs:
    def __init__(__self__, *,
                 name: pulumi.Input[str],
                 title: pulumi.Input[str],
                 create_time: Optional[pulumi.Input[str]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 perimeter_type: Optional[pulumi.Input[str]] = None,
                 spec: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecArgs']] = None,
                 status: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusArgs']] = None,
                 update_time: Optional[pulumi.Input[str]] = None,
                 use_explicit_dry_run_spec: Optional[pulumi.Input[bool]] = None):
        """
        :param pulumi.Input[str] name: Resource name for the ServicePerimeter. The short_name component must
               begin with a letter and only include alphanumeric and '_'.
               Format: accessPolicies/{policy_id}/servicePerimeters/{short_name}
        :param pulumi.Input[str] title: Human readable title. Must be unique within the Policy.
        :param pulumi.Input[str] create_time: -
               Time the AccessPolicy was created in UTC.
        :param pulumi.Input[str] description: Description of the ServicePerimeter and its use. Does not affect
               behavior.
        :param pulumi.Input[str] perimeter_type: Specifies the type of the Perimeter. There are two types: regular and
               bridge. Regular Service Perimeter contains resources, access levels,
               and restricted services. Every resource can be in at most
               ONE regular Service Perimeter.
               In addition to being in a regular service perimeter, a resource can also
               be in zero or more perimeter bridges. A perimeter bridge only contains
               resources. Cross project operations are permitted if all effected
               resources share some perimeter (whether bridge or regular). Perimeter
               Bridge does not contain access levels or services: those are governed
               entirely by the regular perimeter that resource is in.
               Perimeter Bridges are typically useful when building more complex
               topologies with many independent perimeters that need to share some data
               with a common perimeter, but should not be able to share data among
               themselves.
               Default value is `PERIMETER_TYPE_REGULAR`.
               Possible values are `PERIMETER_TYPE_REGULAR` and `PERIMETER_TYPE_BRIDGE`.
        :param pulumi.Input['ServicePerimetersServicePerimeterSpecArgs'] spec: Proposed (or dry run) ServicePerimeter configuration.
               This configuration allows to specify and test ServicePerimeter configuration
               without enforcing actual access restrictions. Only allowed to be set when
               the `useExplicitDryRunSpec` flag is set.
               Structure is documented below.
        :param pulumi.Input['ServicePerimetersServicePerimeterStatusArgs'] status: ServicePerimeter configuration. Specifies sets of resources,
               restricted services and access levels that determine
               perimeter content and boundaries.
               Structure is documented below.
        :param pulumi.Input[str] update_time: -
               Time the AccessPolicy was updated in UTC.
        :param pulumi.Input[bool] use_explicit_dry_run_spec: Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists
               for all Service Perimeters, and that spec is identical to the status for those
               Service Perimeters. When this flag is set, it inhibits the generation of the
               implicit spec, thereby allowing the user to explicitly provide a
               configuration ("spec") to use in a dry-run version of the Service Perimeter.
               This allows the user to test changes to the enforced config ("status") without
               actually enforcing them. This testing is done through analyzing the differences
               between currently enforced and suggested restrictions. useExplicitDryRunSpec must
               bet set to True if any of the fields in the spec are set to non-default values.
        """
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "title", title)
        if create_time is not None:
            pulumi.set(__self__, "create_time", create_time)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if perimeter_type is not None:
            pulumi.set(__self__, "perimeter_type", perimeter_type)
        if spec is not None:
            pulumi.set(__self__, "spec", spec)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if update_time is not None:
            pulumi.set(__self__, "update_time", update_time)
        if use_explicit_dry_run_spec is not None:
            pulumi.set(__self__, "use_explicit_dry_run_spec", use_explicit_dry_run_spec)

    @property
    @pulumi.getter
    def name(self) -> pulumi.Input[str]:
        """
        Resource name for the ServicePerimeter. The short_name component must
        begin with a letter and only include alphanumeric and '_'.
        Format: accessPolicies/{policy_id}/servicePerimeters/{short_name}
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: pulumi.Input[str]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def title(self) -> pulumi.Input[str]:
        """
        Human readable title. Must be unique within the Policy.
        """
        return pulumi.get(self, "title")

    @title.setter
    def title(self, value: pulumi.Input[str]):
        pulumi.set(self, "title", value)

    @property
    @pulumi.getter(name="createTime")
    def create_time(self) -> Optional[pulumi.Input[str]]:
        """
        -
        Time the AccessPolicy was created in UTC.
        """
        return pulumi.get(self, "create_time")

    @create_time.setter
    def create_time(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "create_time", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        Description of the ServicePerimeter and its use. Does not affect
        behavior.
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="perimeterType")
    def perimeter_type(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the type of the Perimeter. There are two types: regular and
        bridge. Regular Service Perimeter contains resources, access levels,
        and restricted services. Every resource can be in at most
        ONE regular Service Perimeter.
        In addition to being in a regular service perimeter, a resource can also
        be in zero or more perimeter bridges. A perimeter bridge only contains
        resources. Cross project operations are permitted if all effected
        resources share some perimeter (whether bridge or regular). Perimeter
        Bridge does not contain access levels or services: those are governed
        entirely by the regular perimeter that resource is in.
        Perimeter Bridges are typically useful when building more complex
        topologies with many independent perimeters that need to share some data
        with a common perimeter, but should not be able to share data among
        themselves.
        Default value is `PERIMETER_TYPE_REGULAR`.
        Possible values are `PERIMETER_TYPE_REGULAR` and `PERIMETER_TYPE_BRIDGE`.
        """
        return pulumi.get(self, "perimeter_type")

    @perimeter_type.setter
    def perimeter_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "perimeter_type", value)

    @property
    @pulumi.getter
    def spec(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecArgs']]:
        """
        Proposed (or dry run) ServicePerimeter configuration.
        This configuration allows to specify and test ServicePerimeter configuration
        without enforcing actual access restrictions. Only allowed to be set when
        the `useExplicitDryRunSpec` flag is set.
        Structure is documented below.
        """
        return pulumi.get(self, "spec")

    @spec.setter
    def spec(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecArgs']]):
        pulumi.set(self, "spec", value)

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusArgs']]:
        """
        ServicePerimeter configuration. Specifies sets of resources,
        restricted services and access levels that determine
        perimeter content and boundaries.
        Structure is documented below.
        """
        return pulumi.get(self, "status")

    @status.setter
    def status(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusArgs']]):
        pulumi.set(self, "status", value)

    @property
    @pulumi.getter(name="updateTime")
    def update_time(self) -> Optional[pulumi.Input[str]]:
        """
        -
        Time the AccessPolicy was updated in UTC.
        """
        return pulumi.get(self, "update_time")

    @update_time.setter
    def update_time(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "update_time", value)

    @property
    @pulumi.getter(name="useExplicitDryRunSpec")
    def use_explicit_dry_run_spec(self) -> Optional[pulumi.Input[bool]]:
        """
        Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists
        for all Service Perimeters, and that spec is identical to the status for those
        Service Perimeters. When this flag is set, it inhibits the generation of the
        implicit spec, thereby allowing the user to explicitly provide a
        configuration ("spec") to use in a dry-run version of the Service Perimeter.
        This allows the user to test changes to the enforced config ("status") without
        actually enforcing them. This testing is done through analyzing the differences
        between currently enforced and suggested restrictions. useExplicitDryRunSpec must
        bet set to True if any of the fields in the spec are set to non-default values.
        """
        return pulumi.get(self, "use_explicit_dry_run_spec")

    @use_explicit_dry_run_spec.setter
    def use_explicit_dry_run_spec(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "use_explicit_dry_run_spec", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecArgs:
    def __init__(__self__, *,
                 access_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 egress_policies: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyArgs']]]] = None,
                 ingress_policies: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 restricted_services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 vpc_accessible_services: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecVpcAccessibleServicesArgs']] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] access_levels: A list of AccessLevel resource names that allow resources within
               the ServicePerimeter to be accessed from the internet.
               AccessLevels listed must be in the same policy as this
               ServicePerimeter. Referencing a nonexistent AccessLevel is a
               syntax error. If no AccessLevel names are listed, resources within
               the perimeter can only be accessed via GCP calls with request
               origins within the perimeter. For Service Perimeter Bridge, must
               be empty.
               Format: accessPolicies/{policy_id}/accessLevels/{access_level_name}
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyArgs']]] egress_policies: List of EgressPolicies to apply to the perimeter. A perimeter may
               have multiple EgressPolicies, each of which is evaluated separately.
               Access is granted if any EgressPolicy grants it. Must be empty for
               a perimeter bridge.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyArgs']]] ingress_policies: List of `IngressPolicies` to apply to the perimeter. A perimeter may
               have multiple `IngressPolicies`, each of which is evaluated
               separately. Access is granted if any `Ingress Policy` grants it.
               Must be empty for a perimeter bridge.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] restricted_services: GCP services that are subject to the Service Perimeter
               restrictions. Must contain a list of services. For example, if
               `storage.googleapis.com` is specified, access to the storage
               buckets inside the perimeter must meet the perimeter's access
               restrictions.
        :param pulumi.Input['ServicePerimetersServicePerimeterSpecVpcAccessibleServicesArgs'] vpc_accessible_services: Specifies how APIs are allowed to communicate within the Service
               Perimeter.
               Structure is documented below.
        """
        if access_levels is not None:
            pulumi.set(__self__, "access_levels", access_levels)
        if egress_policies is not None:
            pulumi.set(__self__, "egress_policies", egress_policies)
        if ingress_policies is not None:
            pulumi.set(__self__, "ingress_policies", ingress_policies)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)
        if restricted_services is not None:
            pulumi.set(__self__, "restricted_services", restricted_services)
        if vpc_accessible_services is not None:
            pulumi.set(__self__, "vpc_accessible_services", vpc_accessible_services)

    @property
    @pulumi.getter(name="accessLevels")
    def access_levels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of AccessLevel resource names that allow resources within
        the ServicePerimeter to be accessed from the internet.
        AccessLevels listed must be in the same policy as this
        ServicePerimeter. Referencing a nonexistent AccessLevel is a
        syntax error. If no AccessLevel names are listed, resources within
        the perimeter can only be accessed via GCP calls with request
        origins within the perimeter. For Service Perimeter Bridge, must
        be empty.
        Format: accessPolicies/{policy_id}/accessLevels/{access_level_name}
        """
        return pulumi.get(self, "access_levels")

    @access_levels.setter
    def access_levels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "access_levels", value)

    @property
    @pulumi.getter(name="egressPolicies")
    def egress_policies(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyArgs']]]]:
        """
        List of EgressPolicies to apply to the perimeter. A perimeter may
        have multiple EgressPolicies, each of which is evaluated separately.
        Access is granted if any EgressPolicy grants it. Must be empty for
        a perimeter bridge.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_policies")

    @egress_policies.setter
    def egress_policies(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyArgs']]]]):
        pulumi.set(self, "egress_policies", value)

    @property
    @pulumi.getter(name="ingressPolicies")
    def ingress_policies(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyArgs']]]]:
        """
        List of `IngressPolicies` to apply to the perimeter. A perimeter may
        have multiple `IngressPolicies`, each of which is evaluated
        separately. Access is granted if any `Ingress Policy` grants it.
        Must be empty for a perimeter bridge.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_policies")

    @ingress_policies.setter
    def ingress_policies(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyArgs']]]]):
        pulumi.set(self, "ingress_policies", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)

    @property
    @pulumi.getter(name="restrictedServices")
    def restricted_services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        GCP services that are subject to the Service Perimeter
        restrictions. Must contain a list of services. For example, if
        `storage.googleapis.com` is specified, access to the storage
        buckets inside the perimeter must meet the perimeter's access
        restrictions.
        """
        return pulumi.get(self, "restricted_services")

    @restricted_services.setter
    def restricted_services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "restricted_services", value)

    @property
    @pulumi.getter(name="vpcAccessibleServices")
    def vpc_accessible_services(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecVpcAccessibleServicesArgs']]:
        """
        Specifies how APIs are allowed to communicate within the Service
        Perimeter.
        Structure is documented below.
        """
        return pulumi.get(self, "vpc_accessible_services")

    @vpc_accessible_services.setter
    def vpc_accessible_services(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecVpcAccessibleServicesArgs']]):
        pulumi.set(self, "vpc_accessible_services", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecEgressPolicyArgs:
    def __init__(__self__, *,
                 egress_from: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressFromArgs']] = None,
                 egress_to: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToArgs']] = None):
        """
        :param pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressFromArgs'] egress_from: Defines conditions on the source of a request causing this `EgressPolicy` to apply.
               Structure is documented below.
        :param pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToArgs'] egress_to: Defines the conditions on the `ApiOperation` and destination resources that
               cause this `EgressPolicy` to apply.
               Structure is documented below.
        """
        if egress_from is not None:
            pulumi.set(__self__, "egress_from", egress_from)
        if egress_to is not None:
            pulumi.set(__self__, "egress_to", egress_to)

    @property
    @pulumi.getter(name="egressFrom")
    def egress_from(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressFromArgs']]:
        """
        Defines conditions on the source of a request causing this `EgressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_from")

    @egress_from.setter
    def egress_from(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressFromArgs']]):
        pulumi.set(self, "egress_from", value)

    @property
    @pulumi.getter(name="egressTo")
    def egress_to(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToArgs']]:
        """
        Defines the conditions on the `ApiOperation` and destination resources that
        cause this `EgressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_to")

    @egress_to.setter
    def egress_to(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToArgs']]):
        pulumi.set(self, "egress_to", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecEgressPolicyEgressFromArgs:
    def __init__(__self__, *,
                 identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 identity_type: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] identities: A list of identities that are allowed access through this `EgressPolicy`.
               Should be in the format of email address. The email address should
               represent individual user or service account only.
        :param pulumi.Input[str] identity_type: Specifies the type of identities that are allowed access to outside the
               perimeter. If left unspecified, then members of `identities` field will
               be allowed access.
               Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        if identities is not None:
            pulumi.set(__self__, "identities", identities)
        if identity_type is not None:
            pulumi.set(__self__, "identity_type", identity_type)

    @property
    @pulumi.getter
    def identities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of identities that are allowed access through this `EgressPolicy`.
        Should be in the format of email address. The email address should
        represent individual user or service account only.
        """
        return pulumi.get(self, "identities")

    @identities.setter
    def identities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "identities", value)

    @property
    @pulumi.getter(name="identityType")
    def identity_type(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the type of identities that are allowed access to outside the
        perimeter. If left unspecified, then members of `identities` field will
        be allowed access.
        Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        return pulumi.get(self, "identity_type")

    @identity_type.setter
    def identity_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "identity_type", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecEgressPolicyEgressToArgs:
    def __init__(__self__, *,
                 operations: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationArgs']]] operations: A list of `ApiOperations` that this egress rule applies to. A request matches
               if it contains an operation/service in this list.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        """
        if operations is not None:
            pulumi.set(__self__, "operations", operations)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)

    @property
    @pulumi.getter
    def operations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationArgs']]]]:
        """
        A list of `ApiOperations` that this egress rule applies to. A request matches
        if it contains an operation/service in this list.
        Structure is documented below.
        """
        return pulumi.get(self, "operations")

    @operations.setter
    def operations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationArgs']]]]):
        pulumi.set(self, "operations", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationArgs:
    def __init__(__self__, *,
                 method_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs']]]] = None,
                 service_name: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs']]] method_selectors: API methods or permissions to allow. Method or permission must belong
               to the service specified by `serviceName` field. A single MethodSelector
               entry with `*` specified for the `method` field will allow all methods
               AND permissions for the service specified in `serviceName`.
               Structure is documented below.
        :param pulumi.Input[str] service_name: The name of the API whose methods or permissions the `IngressPolicy` or
               `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
               field set to `*` will allow all methods AND permissions for all services.
        """
        if method_selectors is not None:
            pulumi.set(__self__, "method_selectors", method_selectors)
        if service_name is not None:
            pulumi.set(__self__, "service_name", service_name)

    @property
    @pulumi.getter(name="methodSelectors")
    def method_selectors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs']]]]:
        """
        API methods or permissions to allow. Method or permission must belong
        to the service specified by `serviceName` field. A single MethodSelector
        entry with `*` specified for the `method` field will allow all methods
        AND permissions for the service specified in `serviceName`.
        Structure is documented below.
        """
        return pulumi.get(self, "method_selectors")

    @method_selectors.setter
    def method_selectors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs']]]]):
        pulumi.set(self, "method_selectors", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the API whose methods or permissions the `IngressPolicy` or
        `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
        field set to `*` will allow all methods AND permissions for all services.
        """
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "service_name", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecEgressPolicyEgressToOperationMethodSelectorArgs:
    def __init__(__self__, *,
                 method: Optional[pulumi.Input[str]] = None,
                 permission: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] method: Value for `method` should be a valid method name for the corresponding
               `serviceName` in `ApiOperation`. If `*` used as value for method,
               then ALL methods and permissions are allowed.
        :param pulumi.Input[str] permission: Value for permission should be a valid Cloud IAM permission for the
               corresponding `serviceName` in `ApiOperation`.
        """
        if method is not None:
            pulumi.set(__self__, "method", method)
        if permission is not None:
            pulumi.set(__self__, "permission", permission)

    @property
    @pulumi.getter
    def method(self) -> Optional[pulumi.Input[str]]:
        """
        Value for `method` should be a valid method name for the corresponding
        `serviceName` in `ApiOperation`. If `*` used as value for method,
        then ALL methods and permissions are allowed.
        """
        return pulumi.get(self, "method")

    @method.setter
    def method(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "method", value)

    @property
    @pulumi.getter
    def permission(self) -> Optional[pulumi.Input[str]]:
        """
        Value for permission should be a valid Cloud IAM permission for the
        corresponding `serviceName` in `ApiOperation`.
        """
        return pulumi.get(self, "permission")

    @permission.setter
    def permission(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "permission", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecIngressPolicyArgs:
    def __init__(__self__, *,
                 ingress_from: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromArgs']] = None,
                 ingress_to: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToArgs']] = None):
        """
        :param pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromArgs'] ingress_from: Defines the conditions on the source of a request causing this `IngressPolicy`
               to apply.
               Structure is documented below.
        :param pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToArgs'] ingress_to: Defines the conditions on the `ApiOperation` and request destination that cause
               this `IngressPolicy` to apply.
               Structure is documented below.
        """
        if ingress_from is not None:
            pulumi.set(__self__, "ingress_from", ingress_from)
        if ingress_to is not None:
            pulumi.set(__self__, "ingress_to", ingress_to)

    @property
    @pulumi.getter(name="ingressFrom")
    def ingress_from(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromArgs']]:
        """
        Defines the conditions on the source of a request causing this `IngressPolicy`
        to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_from")

    @ingress_from.setter
    def ingress_from(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromArgs']]):
        pulumi.set(self, "ingress_from", value)

    @property
    @pulumi.getter(name="ingressTo")
    def ingress_to(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToArgs']]:
        """
        Defines the conditions on the `ApiOperation` and request destination that cause
        this `IngressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_to")

    @ingress_to.setter
    def ingress_to(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToArgs']]):
        pulumi.set(self, "ingress_to", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromArgs:
    def __init__(__self__, *,
                 identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 identity_type: Optional[pulumi.Input[str]] = None,
                 sources: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromSourceArgs']]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] identities: A list of identities that are allowed access through this `EgressPolicy`.
               Should be in the format of email address. The email address should
               represent individual user or service account only.
        :param pulumi.Input[str] identity_type: Specifies the type of identities that are allowed access to outside the
               perimeter. If left unspecified, then members of `identities` field will
               be allowed access.
               Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromSourceArgs']]] sources: Sources that this `IngressPolicy` authorizes access from.
               Structure is documented below.
        """
        if identities is not None:
            pulumi.set(__self__, "identities", identities)
        if identity_type is not None:
            pulumi.set(__self__, "identity_type", identity_type)
        if sources is not None:
            pulumi.set(__self__, "sources", sources)

    @property
    @pulumi.getter
    def identities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of identities that are allowed access through this `EgressPolicy`.
        Should be in the format of email address. The email address should
        represent individual user or service account only.
        """
        return pulumi.get(self, "identities")

    @identities.setter
    def identities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "identities", value)

    @property
    @pulumi.getter(name="identityType")
    def identity_type(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the type of identities that are allowed access to outside the
        perimeter. If left unspecified, then members of `identities` field will
        be allowed access.
        Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        return pulumi.get(self, "identity_type")

    @identity_type.setter
    def identity_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "identity_type", value)

    @property
    @pulumi.getter
    def sources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromSourceArgs']]]]:
        """
        Sources that this `IngressPolicy` authorizes access from.
        Structure is documented below.
        """
        return pulumi.get(self, "sources")

    @sources.setter
    def sources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromSourceArgs']]]]):
        pulumi.set(self, "sources", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecIngressPolicyIngressFromSourceArgs:
    def __init__(__self__, *,
                 access_level: Optional[pulumi.Input[str]] = None,
                 resource: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] access_level: An `AccessLevel` resource name that allow resources within the
               `ServicePerimeters` to be accessed from the internet. `AccessLevels` listed
               must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent
               `AccessLevel` will cause an error. If no `AccessLevel` names are listed,
               resources within the perimeter can only be accessed via Google Cloud calls
               with request origins within the perimeter.
               Example `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL.`
               If * is specified, then all IngressSources will be allowed.
        :param pulumi.Input[str] resource: A Google Cloud resource that is allowed to ingress the perimeter.
               Requests from these resources will be allowed to access perimeter data.
               Currently only projects are allowed. Format `projects/{project_number}`
               The project may be in any Google Cloud organization, not just the
               organization that the perimeter is defined in. `*` is not allowed, the case
               of allowing all Google Cloud resources only is not supported.
        """
        if access_level is not None:
            pulumi.set(__self__, "access_level", access_level)
        if resource is not None:
            pulumi.set(__self__, "resource", resource)

    @property
    @pulumi.getter(name="accessLevel")
    def access_level(self) -> Optional[pulumi.Input[str]]:
        """
        An `AccessLevel` resource name that allow resources within the
        `ServicePerimeters` to be accessed from the internet. `AccessLevels` listed
        must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent
        `AccessLevel` will cause an error. If no `AccessLevel` names are listed,
        resources within the perimeter can only be accessed via Google Cloud calls
        with request origins within the perimeter.
        Example `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL.`
        If * is specified, then all IngressSources will be allowed.
        """
        return pulumi.get(self, "access_level")

    @access_level.setter
    def access_level(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "access_level", value)

    @property
    @pulumi.getter
    def resource(self) -> Optional[pulumi.Input[str]]:
        """
        A Google Cloud resource that is allowed to ingress the perimeter.
        Requests from these resources will be allowed to access perimeter data.
        Currently only projects are allowed. Format `projects/{project_number}`
        The project may be in any Google Cloud organization, not just the
        organization that the perimeter is defined in. `*` is not allowed, the case
        of allowing all Google Cloud resources only is not supported.
        """
        return pulumi.get(self, "resource")

    @resource.setter
    def resource(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "resource", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecIngressPolicyIngressToArgs:
    def __init__(__self__, *,
                 operations: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationArgs']]] operations: A list of `ApiOperations` that this egress rule applies to. A request matches
               if it contains an operation/service in this list.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        """
        if operations is not None:
            pulumi.set(__self__, "operations", operations)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)

    @property
    @pulumi.getter
    def operations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationArgs']]]]:
        """
        A list of `ApiOperations` that this egress rule applies to. A request matches
        if it contains an operation/service in this list.
        Structure is documented below.
        """
        return pulumi.get(self, "operations")

    @operations.setter
    def operations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationArgs']]]]):
        pulumi.set(self, "operations", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationArgs:
    def __init__(__self__, *,
                 method_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs']]]] = None,
                 service_name: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs']]] method_selectors: API methods or permissions to allow. Method or permission must belong
               to the service specified by `serviceName` field. A single MethodSelector
               entry with `*` specified for the `method` field will allow all methods
               AND permissions for the service specified in `serviceName`.
               Structure is documented below.
        :param pulumi.Input[str] service_name: The name of the API whose methods or permissions the `IngressPolicy` or
               `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
               field set to `*` will allow all methods AND permissions for all services.
        """
        if method_selectors is not None:
            pulumi.set(__self__, "method_selectors", method_selectors)
        if service_name is not None:
            pulumi.set(__self__, "service_name", service_name)

    @property
    @pulumi.getter(name="methodSelectors")
    def method_selectors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs']]]]:
        """
        API methods or permissions to allow. Method or permission must belong
        to the service specified by `serviceName` field. A single MethodSelector
        entry with `*` specified for the `method` field will allow all methods
        AND permissions for the service specified in `serviceName`.
        Structure is documented below.
        """
        return pulumi.get(self, "method_selectors")

    @method_selectors.setter
    def method_selectors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs']]]]):
        pulumi.set(self, "method_selectors", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the API whose methods or permissions the `IngressPolicy` or
        `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
        field set to `*` will allow all methods AND permissions for all services.
        """
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "service_name", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecIngressPolicyIngressToOperationMethodSelectorArgs:
    def __init__(__self__, *,
                 method: Optional[pulumi.Input[str]] = None,
                 permission: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] method: Value for `method` should be a valid method name for the corresponding
               `serviceName` in `ApiOperation`. If `*` used as value for method,
               then ALL methods and permissions are allowed.
        :param pulumi.Input[str] permission: Value for permission should be a valid Cloud IAM permission for the
               corresponding `serviceName` in `ApiOperation`.
        """
        if method is not None:
            pulumi.set(__self__, "method", method)
        if permission is not None:
            pulumi.set(__self__, "permission", permission)

    @property
    @pulumi.getter
    def method(self) -> Optional[pulumi.Input[str]]:
        """
        Value for `method` should be a valid method name for the corresponding
        `serviceName` in `ApiOperation`. If `*` used as value for method,
        then ALL methods and permissions are allowed.
        """
        return pulumi.get(self, "method")

    @method.setter
    def method(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "method", value)

    @property
    @pulumi.getter
    def permission(self) -> Optional[pulumi.Input[str]]:
        """
        Value for permission should be a valid Cloud IAM permission for the
        corresponding `serviceName` in `ApiOperation`.
        """
        return pulumi.get(self, "permission")

    @permission.setter
    def permission(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "permission", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterSpecVpcAccessibleServicesArgs:
    def __init__(__self__, *,
                 allowed_services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 enable_restriction: Optional[pulumi.Input[bool]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_services: The list of APIs usable within the Service Perimeter.
               Must be empty unless `enableRestriction` is True.
        :param pulumi.Input[bool] enable_restriction: Whether to restrict API calls within the Service Perimeter to the
               list of APIs specified in 'allowedServices'.
        """
        if allowed_services is not None:
            pulumi.set(__self__, "allowed_services", allowed_services)
        if enable_restriction is not None:
            pulumi.set(__self__, "enable_restriction", enable_restriction)

    @property
    @pulumi.getter(name="allowedServices")
    def allowed_services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        The list of APIs usable within the Service Perimeter.
        Must be empty unless `enableRestriction` is True.
        """
        return pulumi.get(self, "allowed_services")

    @allowed_services.setter
    def allowed_services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "allowed_services", value)

    @property
    @pulumi.getter(name="enableRestriction")
    def enable_restriction(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to restrict API calls within the Service Perimeter to the
        list of APIs specified in 'allowedServices'.
        """
        return pulumi.get(self, "enable_restriction")

    @enable_restriction.setter
    def enable_restriction(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "enable_restriction", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusArgs:
    def __init__(__self__, *,
                 access_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 egress_policies: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyArgs']]]] = None,
                 ingress_policies: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 restricted_services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 vpc_accessible_services: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusVpcAccessibleServicesArgs']] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] access_levels: A list of AccessLevel resource names that allow resources within
               the ServicePerimeter to be accessed from the internet.
               AccessLevels listed must be in the same policy as this
               ServicePerimeter. Referencing a nonexistent AccessLevel is a
               syntax error. If no AccessLevel names are listed, resources within
               the perimeter can only be accessed via GCP calls with request
               origins within the perimeter. For Service Perimeter Bridge, must
               be empty.
               Format: accessPolicies/{policy_id}/accessLevels/{access_level_name}
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyArgs']]] egress_policies: List of EgressPolicies to apply to the perimeter. A perimeter may
               have multiple EgressPolicies, each of which is evaluated separately.
               Access is granted if any EgressPolicy grants it. Must be empty for
               a perimeter bridge.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyArgs']]] ingress_policies: List of `IngressPolicies` to apply to the perimeter. A perimeter may
               have multiple `IngressPolicies`, each of which is evaluated
               separately. Access is granted if any `Ingress Policy` grants it.
               Must be empty for a perimeter bridge.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] restricted_services: GCP services that are subject to the Service Perimeter
               restrictions. Must contain a list of services. For example, if
               `storage.googleapis.com` is specified, access to the storage
               buckets inside the perimeter must meet the perimeter's access
               restrictions.
        :param pulumi.Input['ServicePerimetersServicePerimeterStatusVpcAccessibleServicesArgs'] vpc_accessible_services: Specifies how APIs are allowed to communicate within the Service
               Perimeter.
               Structure is documented below.
        """
        if access_levels is not None:
            pulumi.set(__self__, "access_levels", access_levels)
        if egress_policies is not None:
            pulumi.set(__self__, "egress_policies", egress_policies)
        if ingress_policies is not None:
            pulumi.set(__self__, "ingress_policies", ingress_policies)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)
        if restricted_services is not None:
            pulumi.set(__self__, "restricted_services", restricted_services)
        if vpc_accessible_services is not None:
            pulumi.set(__self__, "vpc_accessible_services", vpc_accessible_services)

    @property
    @pulumi.getter(name="accessLevels")
    def access_levels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of AccessLevel resource names that allow resources within
        the ServicePerimeter to be accessed from the internet.
        AccessLevels listed must be in the same policy as this
        ServicePerimeter. Referencing a nonexistent AccessLevel is a
        syntax error. If no AccessLevel names are listed, resources within
        the perimeter can only be accessed via GCP calls with request
        origins within the perimeter. For Service Perimeter Bridge, must
        be empty.
        Format: accessPolicies/{policy_id}/accessLevels/{access_level_name}
        """
        return pulumi.get(self, "access_levels")

    @access_levels.setter
    def access_levels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "access_levels", value)

    @property
    @pulumi.getter(name="egressPolicies")
    def egress_policies(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyArgs']]]]:
        """
        List of EgressPolicies to apply to the perimeter. A perimeter may
        have multiple EgressPolicies, each of which is evaluated separately.
        Access is granted if any EgressPolicy grants it. Must be empty for
        a perimeter bridge.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_policies")

    @egress_policies.setter
    def egress_policies(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyArgs']]]]):
        pulumi.set(self, "egress_policies", value)

    @property
    @pulumi.getter(name="ingressPolicies")
    def ingress_policies(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyArgs']]]]:
        """
        List of `IngressPolicies` to apply to the perimeter. A perimeter may
        have multiple `IngressPolicies`, each of which is evaluated
        separately. Access is granted if any `Ingress Policy` grants it.
        Must be empty for a perimeter bridge.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_policies")

    @ingress_policies.setter
    def ingress_policies(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyArgs']]]]):
        pulumi.set(self, "ingress_policies", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)

    @property
    @pulumi.getter(name="restrictedServices")
    def restricted_services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        GCP services that are subject to the Service Perimeter
        restrictions. Must contain a list of services. For example, if
        `storage.googleapis.com` is specified, access to the storage
        buckets inside the perimeter must meet the perimeter's access
        restrictions.
        """
        return pulumi.get(self, "restricted_services")

    @restricted_services.setter
    def restricted_services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "restricted_services", value)

    @property
    @pulumi.getter(name="vpcAccessibleServices")
    def vpc_accessible_services(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusVpcAccessibleServicesArgs']]:
        """
        Specifies how APIs are allowed to communicate within the Service
        Perimeter.
        Structure is documented below.
        """
        return pulumi.get(self, "vpc_accessible_services")

    @vpc_accessible_services.setter
    def vpc_accessible_services(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusVpcAccessibleServicesArgs']]):
        pulumi.set(self, "vpc_accessible_services", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusEgressPolicyArgs:
    def __init__(__self__, *,
                 egress_from: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressFromArgs']] = None,
                 egress_to: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToArgs']] = None):
        """
        :param pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressFromArgs'] egress_from: Defines conditions on the source of a request causing this `EgressPolicy` to apply.
               Structure is documented below.
        :param pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToArgs'] egress_to: Defines the conditions on the `ApiOperation` and destination resources that
               cause this `EgressPolicy` to apply.
               Structure is documented below.
        """
        if egress_from is not None:
            pulumi.set(__self__, "egress_from", egress_from)
        if egress_to is not None:
            pulumi.set(__self__, "egress_to", egress_to)

    @property
    @pulumi.getter(name="egressFrom")
    def egress_from(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressFromArgs']]:
        """
        Defines conditions on the source of a request causing this `EgressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_from")

    @egress_from.setter
    def egress_from(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressFromArgs']]):
        pulumi.set(self, "egress_from", value)

    @property
    @pulumi.getter(name="egressTo")
    def egress_to(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToArgs']]:
        """
        Defines the conditions on the `ApiOperation` and destination resources that
        cause this `EgressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "egress_to")

    @egress_to.setter
    def egress_to(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToArgs']]):
        pulumi.set(self, "egress_to", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusEgressPolicyEgressFromArgs:
    def __init__(__self__, *,
                 identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 identity_type: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] identities: A list of identities that are allowed access through this `EgressPolicy`.
               Should be in the format of email address. The email address should
               represent individual user or service account only.
        :param pulumi.Input[str] identity_type: Specifies the type of identities that are allowed access to outside the
               perimeter. If left unspecified, then members of `identities` field will
               be allowed access.
               Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        if identities is not None:
            pulumi.set(__self__, "identities", identities)
        if identity_type is not None:
            pulumi.set(__self__, "identity_type", identity_type)

    @property
    @pulumi.getter
    def identities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of identities that are allowed access through this `EgressPolicy`.
        Should be in the format of email address. The email address should
        represent individual user or service account only.
        """
        return pulumi.get(self, "identities")

    @identities.setter
    def identities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "identities", value)

    @property
    @pulumi.getter(name="identityType")
    def identity_type(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the type of identities that are allowed access to outside the
        perimeter. If left unspecified, then members of `identities` field will
        be allowed access.
        Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        return pulumi.get(self, "identity_type")

    @identity_type.setter
    def identity_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "identity_type", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusEgressPolicyEgressToArgs:
    def __init__(__self__, *,
                 operations: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationArgs']]] operations: A list of `ApiOperations` that this egress rule applies to. A request matches
               if it contains an operation/service in this list.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        """
        if operations is not None:
            pulumi.set(__self__, "operations", operations)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)

    @property
    @pulumi.getter
    def operations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationArgs']]]]:
        """
        A list of `ApiOperations` that this egress rule applies to. A request matches
        if it contains an operation/service in this list.
        Structure is documented below.
        """
        return pulumi.get(self, "operations")

    @operations.setter
    def operations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationArgs']]]]):
        pulumi.set(self, "operations", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationArgs:
    def __init__(__self__, *,
                 method_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs']]]] = None,
                 service_name: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs']]] method_selectors: API methods or permissions to allow. Method or permission must belong
               to the service specified by `serviceName` field. A single MethodSelector
               entry with `*` specified for the `method` field will allow all methods
               AND permissions for the service specified in `serviceName`.
               Structure is documented below.
        :param pulumi.Input[str] service_name: The name of the API whose methods or permissions the `IngressPolicy` or
               `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
               field set to `*` will allow all methods AND permissions for all services.
        """
        if method_selectors is not None:
            pulumi.set(__self__, "method_selectors", method_selectors)
        if service_name is not None:
            pulumi.set(__self__, "service_name", service_name)

    @property
    @pulumi.getter(name="methodSelectors")
    def method_selectors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs']]]]:
        """
        API methods or permissions to allow. Method or permission must belong
        to the service specified by `serviceName` field. A single MethodSelector
        entry with `*` specified for the `method` field will allow all methods
        AND permissions for the service specified in `serviceName`.
        Structure is documented below.
        """
        return pulumi.get(self, "method_selectors")

    @method_selectors.setter
    def method_selectors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs']]]]):
        pulumi.set(self, "method_selectors", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the API whose methods or permissions the `IngressPolicy` or
        `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
        field set to `*` will allow all methods AND permissions for all services.
        """
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "service_name", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusEgressPolicyEgressToOperationMethodSelectorArgs:
    def __init__(__self__, *,
                 method: Optional[pulumi.Input[str]] = None,
                 permission: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] method: Value for `method` should be a valid method name for the corresponding
               `serviceName` in `ApiOperation`. If `*` used as value for method,
               then ALL methods and permissions are allowed.
        :param pulumi.Input[str] permission: Value for permission should be a valid Cloud IAM permission for the
               corresponding `serviceName` in `ApiOperation`.
        """
        if method is not None:
            pulumi.set(__self__, "method", method)
        if permission is not None:
            pulumi.set(__self__, "permission", permission)

    @property
    @pulumi.getter
    def method(self) -> Optional[pulumi.Input[str]]:
        """
        Value for `method` should be a valid method name for the corresponding
        `serviceName` in `ApiOperation`. If `*` used as value for method,
        then ALL methods and permissions are allowed.
        """
        return pulumi.get(self, "method")

    @method.setter
    def method(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "method", value)

    @property
    @pulumi.getter
    def permission(self) -> Optional[pulumi.Input[str]]:
        """
        Value for permission should be a valid Cloud IAM permission for the
        corresponding `serviceName` in `ApiOperation`.
        """
        return pulumi.get(self, "permission")

    @permission.setter
    def permission(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "permission", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusIngressPolicyArgs:
    def __init__(__self__, *,
                 ingress_from: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromArgs']] = None,
                 ingress_to: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToArgs']] = None):
        """
        :param pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromArgs'] ingress_from: Defines the conditions on the source of a request causing this `IngressPolicy`
               to apply.
               Structure is documented below.
        :param pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToArgs'] ingress_to: Defines the conditions on the `ApiOperation` and request destination that cause
               this `IngressPolicy` to apply.
               Structure is documented below.
        """
        if ingress_from is not None:
            pulumi.set(__self__, "ingress_from", ingress_from)
        if ingress_to is not None:
            pulumi.set(__self__, "ingress_to", ingress_to)

    @property
    @pulumi.getter(name="ingressFrom")
    def ingress_from(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromArgs']]:
        """
        Defines the conditions on the source of a request causing this `IngressPolicy`
        to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_from")

    @ingress_from.setter
    def ingress_from(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromArgs']]):
        pulumi.set(self, "ingress_from", value)

    @property
    @pulumi.getter(name="ingressTo")
    def ingress_to(self) -> Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToArgs']]:
        """
        Defines the conditions on the `ApiOperation` and request destination that cause
        this `IngressPolicy` to apply.
        Structure is documented below.
        """
        return pulumi.get(self, "ingress_to")

    @ingress_to.setter
    def ingress_to(self, value: Optional[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToArgs']]):
        pulumi.set(self, "ingress_to", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromArgs:
    def __init__(__self__, *,
                 identities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 identity_type: Optional[pulumi.Input[str]] = None,
                 sources: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromSourceArgs']]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] identities: A list of identities that are allowed access through this `EgressPolicy`.
               Should be in the format of email address. The email address should
               represent individual user or service account only.
        :param pulumi.Input[str] identity_type: Specifies the type of identities that are allowed access to outside the
               perimeter. If left unspecified, then members of `identities` field will
               be allowed access.
               Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromSourceArgs']]] sources: Sources that this `IngressPolicy` authorizes access from.
               Structure is documented below.
        """
        if identities is not None:
            pulumi.set(__self__, "identities", identities)
        if identity_type is not None:
            pulumi.set(__self__, "identity_type", identity_type)
        if sources is not None:
            pulumi.set(__self__, "sources", sources)

    @property
    @pulumi.getter
    def identities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of identities that are allowed access through this `EgressPolicy`.
        Should be in the format of email address. The email address should
        represent individual user or service account only.
        """
        return pulumi.get(self, "identities")

    @identities.setter
    def identities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "identities", value)

    @property
    @pulumi.getter(name="identityType")
    def identity_type(self) -> Optional[pulumi.Input[str]]:
        """
        Specifies the type of identities that are allowed access to outside the
        perimeter. If left unspecified, then members of `identities` field will
        be allowed access.
        Possible values are `IDENTITY_TYPE_UNSPECIFIED`, `ANY_IDENTITY`, `ANY_USER_ACCOUNT`, and `ANY_SERVICE_ACCOUNT`.
        """
        return pulumi.get(self, "identity_type")

    @identity_type.setter
    def identity_type(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "identity_type", value)

    @property
    @pulumi.getter
    def sources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromSourceArgs']]]]:
        """
        Sources that this `IngressPolicy` authorizes access from.
        Structure is documented below.
        """
        return pulumi.get(self, "sources")

    @sources.setter
    def sources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromSourceArgs']]]]):
        pulumi.set(self, "sources", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusIngressPolicyIngressFromSourceArgs:
    def __init__(__self__, *,
                 access_level: Optional[pulumi.Input[str]] = None,
                 resource: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] access_level: An `AccessLevel` resource name that allow resources within the
               `ServicePerimeters` to be accessed from the internet. `AccessLevels` listed
               must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent
               `AccessLevel` will cause an error. If no `AccessLevel` names are listed,
               resources within the perimeter can only be accessed via Google Cloud calls
               with request origins within the perimeter.
               Example `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL.`
               If * is specified, then all IngressSources will be allowed.
        :param pulumi.Input[str] resource: A Google Cloud resource that is allowed to ingress the perimeter.
               Requests from these resources will be allowed to access perimeter data.
               Currently only projects are allowed. Format `projects/{project_number}`
               The project may be in any Google Cloud organization, not just the
               organization that the perimeter is defined in. `*` is not allowed, the case
               of allowing all Google Cloud resources only is not supported.
        """
        if access_level is not None:
            pulumi.set(__self__, "access_level", access_level)
        if resource is not None:
            pulumi.set(__self__, "resource", resource)

    @property
    @pulumi.getter(name="accessLevel")
    def access_level(self) -> Optional[pulumi.Input[str]]:
        """
        An `AccessLevel` resource name that allow resources within the
        `ServicePerimeters` to be accessed from the internet. `AccessLevels` listed
        must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent
        `AccessLevel` will cause an error. If no `AccessLevel` names are listed,
        resources within the perimeter can only be accessed via Google Cloud calls
        with request origins within the perimeter.
        Example `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL.`
        If * is specified, then all IngressSources will be allowed.
        """
        return pulumi.get(self, "access_level")

    @access_level.setter
    def access_level(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "access_level", value)

    @property
    @pulumi.getter
    def resource(self) -> Optional[pulumi.Input[str]]:
        """
        A Google Cloud resource that is allowed to ingress the perimeter.
        Requests from these resources will be allowed to access perimeter data.
        Currently only projects are allowed. Format `projects/{project_number}`
        The project may be in any Google Cloud organization, not just the
        organization that the perimeter is defined in. `*` is not allowed, the case
        of allowing all Google Cloud resources only is not supported.
        """
        return pulumi.get(self, "resource")

    @resource.setter
    def resource(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "resource", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusIngressPolicyIngressToArgs:
    def __init__(__self__, *,
                 operations: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationArgs']]]] = None,
                 resources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationArgs']]] operations: A list of `ApiOperations` that this egress rule applies to. A request matches
               if it contains an operation/service in this list.
               Structure is documented below.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] resources: A list of resources, currently only projects in the form
               `projects/<projectnumber>`, that match this to stanza. A request matches
               if it contains a resource in this list. If * is specified for resources,
               then this `EgressTo` rule will authorize access to all resources outside
               the perimeter.
        """
        if operations is not None:
            pulumi.set(__self__, "operations", operations)
        if resources is not None:
            pulumi.set(__self__, "resources", resources)

    @property
    @pulumi.getter
    def operations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationArgs']]]]:
        """
        A list of `ApiOperations` that this egress rule applies to. A request matches
        if it contains an operation/service in this list.
        Structure is documented below.
        """
        return pulumi.get(self, "operations")

    @operations.setter
    def operations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationArgs']]]]):
        pulumi.set(self, "operations", value)

    @property
    @pulumi.getter
    def resources(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        A list of resources, currently only projects in the form
        `projects/<projectnumber>`, that match this to stanza. A request matches
        if it contains a resource in this list. If * is specified for resources,
        then this `EgressTo` rule will authorize access to all resources outside
        the perimeter.
        """
        return pulumi.get(self, "resources")

    @resources.setter
    def resources(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "resources", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationArgs:
    def __init__(__self__, *,
                 method_selectors: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs']]]] = None,
                 service_name: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs']]] method_selectors: API methods or permissions to allow. Method or permission must belong
               to the service specified by `serviceName` field. A single MethodSelector
               entry with `*` specified for the `method` field will allow all methods
               AND permissions for the service specified in `serviceName`.
               Structure is documented below.
        :param pulumi.Input[str] service_name: The name of the API whose methods or permissions the `IngressPolicy` or
               `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
               field set to `*` will allow all methods AND permissions for all services.
        """
        if method_selectors is not None:
            pulumi.set(__self__, "method_selectors", method_selectors)
        if service_name is not None:
            pulumi.set(__self__, "service_name", service_name)

    @property
    @pulumi.getter(name="methodSelectors")
    def method_selectors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs']]]]:
        """
        API methods or permissions to allow. Method or permission must belong
        to the service specified by `serviceName` field. A single MethodSelector
        entry with `*` specified for the `method` field will allow all methods
        AND permissions for the service specified in `serviceName`.
        Structure is documented below.
        """
        return pulumi.get(self, "method_selectors")

    @method_selectors.setter
    def method_selectors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs']]]]):
        pulumi.set(self, "method_selectors", value)

    @property
    @pulumi.getter(name="serviceName")
    def service_name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the API whose methods or permissions the `IngressPolicy` or
        `EgressPolicy` want to allow. A single `ApiOperation` with serviceName
        field set to `*` will allow all methods AND permissions for all services.
        """
        return pulumi.get(self, "service_name")

    @service_name.setter
    def service_name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "service_name", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusIngressPolicyIngressToOperationMethodSelectorArgs:
    def __init__(__self__, *,
                 method: Optional[pulumi.Input[str]] = None,
                 permission: Optional[pulumi.Input[str]] = None):
        """
        :param pulumi.Input[str] method: Value for `method` should be a valid method name for the corresponding
               `serviceName` in `ApiOperation`. If `*` used as value for method,
               then ALL methods and permissions are allowed.
        :param pulumi.Input[str] permission: Value for permission should be a valid Cloud IAM permission for the
               corresponding `serviceName` in `ApiOperation`.
        """
        if method is not None:
            pulumi.set(__self__, "method", method)
        if permission is not None:
            pulumi.set(__self__, "permission", permission)

    @property
    @pulumi.getter
    def method(self) -> Optional[pulumi.Input[str]]:
        """
        Value for `method` should be a valid method name for the corresponding
        `serviceName` in `ApiOperation`. If `*` used as value for method,
        then ALL methods and permissions are allowed.
        """
        return pulumi.get(self, "method")

    @method.setter
    def method(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "method", value)

    @property
    @pulumi.getter
    def permission(self) -> Optional[pulumi.Input[str]]:
        """
        Value for permission should be a valid Cloud IAM permission for the
        corresponding `serviceName` in `ApiOperation`.
        """
        return pulumi.get(self, "permission")

    @permission.setter
    def permission(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "permission", value)


@pulumi.input_type
class ServicePerimetersServicePerimeterStatusVpcAccessibleServicesArgs:
    def __init__(__self__, *,
                 allowed_services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 enable_restriction: Optional[pulumi.Input[bool]] = None):
        """
        :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_services: The list of APIs usable within the Service Perimeter.
               Must be empty unless `enableRestriction` is True.
        :param pulumi.Input[bool] enable_restriction: Whether to restrict API calls within the Service Perimeter to the
               list of APIs specified in 'allowedServices'.
        """
        if allowed_services is not None:
            pulumi.set(__self__, "allowed_services", allowed_services)
        if enable_restriction is not None:
            pulumi.set(__self__, "enable_restriction", enable_restriction)

    @property
    @pulumi.getter(name="allowedServices")
    def allowed_services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        """
        The list of APIs usable within the Service Perimeter.
        Must be empty unless `enableRestriction` is True.
        """
        return pulumi.get(self, "allowed_services")

    @allowed_services.setter
    def allowed_services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
        pulumi.set(self, "allowed_services", value)

    @property
    @pulumi.getter(name="enableRestriction")
    def enable_restriction(self) -> Optional[pulumi.Input[bool]]:
        """
        Whether to restrict API calls within the Service Perimeter to the
        list of APIs specified in 'allowedServices'.
        """
        return pulumi.get(self, "enable_restriction")

    @enable_restriction.setter
    def enable_restriction(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "enable_restriction", value)


