Google Cloud Asset V1 Client - Class Constraint (1.16.4)

Reference documentation and code samples for the Google Cloud Asset V1 Client class Constraint.

The definition of a constraint.

Generated from protobuf message google.cloud.asset.v1.AnalyzerOrgPolicyConstraint.Constraint

Namespace

Google \ Cloud \ Asset \ V1 \ AnalyzerOrgPolicyConstraint

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

The unique name of the constraint. Format of the name should be * constraints/{constraint_name} For example, constraints/compute.disableSerialPortAccess.

↳ display_name string

The human readable name of the constraint.

↳ description string

Detailed description of what this Constraint controls as well as how and where it is enforced.

↳ constraint_default int

The evaluation behavior of this constraint in the absence of 'Policy'.

↳ list_constraint Google\Cloud\Asset\V1\AnalyzerOrgPolicyConstraint\Constraint\ListConstraint

Defines this constraint as being a ListConstraint.

↳ boolean_constraint Google\Cloud\Asset\V1\AnalyzerOrgPolicyConstraint\Constraint\BooleanConstraint

Defines this constraint as being a BooleanConstraint.

getName

The unique name of the constraint. Format of the name should be

  • constraints/{constraint_name} For example, constraints/compute.disableSerialPortAccess.
Returns
Type Description
string

setName

The unique name of the constraint. Format of the name should be

  • constraints/{constraint_name} For example, constraints/compute.disableSerialPortAccess.
Parameter
Name Description
var string
Returns
Type Description
$this

getDisplayName

The human readable name of the constraint.

Returns
Type Description
string

setDisplayName

The human readable name of the constraint.

Parameter
Name Description
var string
Returns
Type Description
$this

getDescription

Detailed description of what this Constraint controls as well as how and where it is enforced.

Returns
Type Description
string

setDescription

Detailed description of what this Constraint controls as well as how and where it is enforced.

Parameter
Name Description
var string
Returns
Type Description
$this

getConstraintDefault

The evaluation behavior of this constraint in the absence of 'Policy'.

Returns
Type Description
int

setConstraintDefault

The evaluation behavior of this constraint in the absence of 'Policy'.

Parameter
Name Description
var int
Returns
Type Description
$this

getListConstraint

Defines this constraint as being a ListConstraint.

Returns
Type Description
Google\Cloud\Asset\V1\AnalyzerOrgPolicyConstraint\Constraint\ListConstraint|null

hasListConstraint

setListConstraint

Defines this constraint as being a ListConstraint.

Parameter
Name Description
var Google\Cloud\Asset\V1\AnalyzerOrgPolicyConstraint\Constraint\ListConstraint
Returns
Type Description
$this

getBooleanConstraint

Defines this constraint as being a BooleanConstraint.

Returns
Type Description
Google\Cloud\Asset\V1\AnalyzerOrgPolicyConstraint\Constraint\BooleanConstraint|null

hasBooleanConstraint

setBooleanConstraint

Defines this constraint as being a BooleanConstraint.

Parameter
Name Description
var Google\Cloud\Asset\V1\AnalyzerOrgPolicyConstraint\Constraint\BooleanConstraint
Returns
Type Description
$this

getConstraintType

Returns
Type Description
string