GoogleCloudSecuritypostureV1CustomConstraint
import type { GoogleCloudSecuritypostureV1CustomConstraint } from "https://googleapis.deno.dev/v1/securityposture:v1.ts";
A custom, user-defined constraint. You can apply the constraint only to the resource types specified in the constraint, and only within the organization where the constraint is defined. When you create a custom constraint, it is not enforced automatically. You must use an organization policy to enforce the constraint.
§Properties
A Common Expression Language (CEL) condition expression that must evaluate
to true
for the constraint to be enforced. The maximum length is 1000
characters. For example: +
resource.instanceName.matches('(production|test)_(.+_)?[\d]+')
: Evaluates
to true
if the resource's instanceName
attribute contains the
following: + The prefix production
or test
+ An underscore (_
) +
Optional: One or more characters, followed by an underscore (_
) + One or
more digits + resource.management.auto_upgrade == true
: Evaluates to
true
if the resource's management.auto_upgrade
attribute is true
.
The types of operations that the constraint applies to.
Immutable. The name of the constraint, in the format
organizations/{organization_id}/customConstraints/custom.{custom_constraint_id}
.
For example,
organizations/123456789012/customConstraints/custom.createOnlyE2TypeVms
.
Must contain 1 to 62 characters, excluding the prefix
organizations/{organization_id}/customConstraints/custom.
.