Access Context Manager V1 Client - Class Condition (0.4.5)

Reference documentation and code samples for the Access Context Manager V1 Client class Condition.

A condition necessary for an AccessLevel to be granted. The Condition is an AND over its fields. So a Condition is true if: 1) the request IP is from one of the listed subnetworks AND 2) the originating device complies with the listed device policy AND 3) all listed access levels are granted AND 4) the request was sent at a time allowed by the DateTimeRestriction.

Generated from protobuf message google.identity.accesscontextmanager.v1.Condition

Namespace

Google \ Identity \ AccessContextManager \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ ip_subnetworks array

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.

↳ device_policy Google\Identity\AccessContextManager\V1\DevicePolicy

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed.

↳ required_access_levels array

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. Example: "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"

↳ negate 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.

↳ members array

The request must be made by one of the provided user or service accounts. Groups are not supported. Syntax: user:{emailid} serviceAccount:{emailid} If not specified, a request may come from any user.

↳ regions array

The request must originate from one of the provided countries/regions. Must be valid ISO 3166-1 alpha-2 codes.

getIpSubnetworks

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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setIpSubnetworks

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.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getDevicePolicy

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed.

Returns
TypeDescription
Google\Identity\AccessContextManager\V1\DevicePolicy|null

hasDevicePolicy

clearDevicePolicy

setDevicePolicy

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed.

Parameter
NameDescription
var Google\Identity\AccessContextManager\V1\DevicePolicy
Returns
TypeDescription
$this

getRequiredAccessLevels

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. Example: "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setRequiredAccessLevels

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. Example: "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getNegate

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.

Returns
TypeDescription
bool

setNegate

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.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getMembers

The request must be made by one of the provided user or service accounts. Groups are not supported.

Syntax: user:{emailid} serviceAccount:{emailid} If not specified, a request may come from any user.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setMembers

The request must be made by one of the provided user or service accounts. Groups are not supported.

Syntax: user:{emailid} serviceAccount:{emailid} If not specified, a request may come from any user.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getRegions

The request must originate from one of the provided countries/regions.

Must be valid ISO 3166-1 alpha-2 codes.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setRegions

The request must originate from one of the provided countries/regions.

Must be valid ISO 3166-1 alpha-2 codes.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this