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 \ AnalyzerOrgPolicyConstraintMethods
__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 * * |
↳ display_name |
string
The human readable name of the constraint. |
↳ description |
string
Detailed description of what this |
↳ constraint_default |
int
The evaluation behavior of this constraint in the absence of 'Policy'. |
↳ list_constraint |
Constraint\ListConstraint
Defines this constraint as being a ListConstraint. |
↳ boolean_constraint |
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 |
Enum of type ConstraintDefault. |
setConstraintDefault
The evaluation behavior of this constraint in the absence of 'Policy'.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type ConstraintDefault. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getListConstraint
Defines this constraint as being a ListConstraint.
| Returns | |
|---|---|
| Type | Description |
Constraint\ListConstraint|null |
|
hasListConstraint
setListConstraint
Defines this constraint as being a ListConstraint.
| Parameter | |
|---|---|
| Name | Description |
var |
Constraint\ListConstraint
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getBooleanConstraint
Defines this constraint as being a BooleanConstraint.
| Returns | |
|---|---|
| Type | Description |
Constraint\BooleanConstraint|null |
|
hasBooleanConstraint
setBooleanConstraint
Defines this constraint as being a BooleanConstraint.
| Parameter | |
|---|---|
| Name | Description |
var |
Constraint\BooleanConstraint
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getConstraintType
| Returns | |
|---|---|
| Type | Description |
string |
|