Google Cloud Asset V1 Client - Class Constraint (1.12.2)

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
NameDescription
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
TypeDescription
string

setName

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

  • constraints/{constraint_name} For example, constraints/compute.disableSerialPortAccess.
Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDisplayName

The human readable name of the constraint.

Returns
TypeDescription
string

setDisplayName

The human readable name of the constraint.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDescription

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

Returns
TypeDescription
string

setDescription

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getConstraintDefault

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

Returns
TypeDescription
int

setConstraintDefault

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

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getListConstraint

Defines this constraint as being a ListConstraint.

Returns
TypeDescription
Google\Cloud\Asset\V1\AnalyzerOrgPolicyConstraint\Constraint\ListConstraint|null

hasListConstraint

setListConstraint

Defines this constraint as being a ListConstraint.

Parameter
NameDescription
var Google\Cloud\Asset\V1\AnalyzerOrgPolicyConstraint\Constraint\ListConstraint
Returns
TypeDescription
$this

getBooleanConstraint

Defines this constraint as being a BooleanConstraint.

Returns
TypeDescription
Google\Cloud\Asset\V1\AnalyzerOrgPolicyConstraint\Constraint\BooleanConstraint|null

hasBooleanConstraint

setBooleanConstraint

Defines this constraint as being a BooleanConstraint.

Parameter
NameDescription
var Google\Cloud\Asset\V1\AnalyzerOrgPolicyConstraint\Constraint\BooleanConstraint
Returns
TypeDescription
$this

getConstraintType

Returns
TypeDescription
string