CustomConstraintArgs

data class CustomConstraintArgs(val actionType: Output<CustomConstraintActionType>? = null, val condition: Output<String>? = null, val description: Output<String>? = null, val displayName: Output<String>? = null, val methodTypes: Output<List<CustomConstraintMethodTypesItem>>? = null, val name: Output<String>? = null, val organizationId: Output<String>? = null, val resourceTypes: Output<List<String>>? = null) : ConvertibleToJava<CustomConstraintArgs>

Creates a custom constraint. Returns a google.rpc.Status with google.rpc.Code.NOT_FOUND if the organization does not exist. Returns a google.rpc.Status with google.rpc.Code.ALREADY_EXISTS if the constraint already exists on the given organization.

Constructors

Link copied to clipboard
fun CustomConstraintArgs(actionType: Output<CustomConstraintActionType>? = null, condition: Output<String>? = null, description: Output<String>? = null, displayName: Output<String>? = null, methodTypes: Output<List<CustomConstraintMethodTypesItem>>? = null, name: Output<String>? = null, organizationId: Output<String>? = null, resourceTypes: Output<List<String>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): CustomConstraintArgs

Properties

Link copied to clipboard

Allow or deny type.

Link copied to clipboard
val condition: Output<String>? = null

Org policy condition/expression. For example: resource.instanceName.matches("[production|test]_.*_(\d)+")' or, resource.management.auto_upgrade == true The max length of the condition is 1000 characters.

Link copied to clipboard
val description: Output<String>? = null

Detailed information about this custom policy constraint. The max length of the description is 2000 characters.

Link copied to clipboard
val displayName: Output<String>? = null

One line display name for the UI. The max length of the display_name is 200 characters.

Link copied to clipboard

All the operations being applied for this constraint.

Link copied to clipboard
val name: Output<String>? = null

Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * organizations/{organization_id}/customConstraints/{custom_constraint_id} Example: organizations/123/customConstraints/custom.createOnlyE2TypeVms The max length is 70 characters and the minimum length is 1. Note that the prefix organizations/{organization_id}/customConstraints/ is not counted.

Link copied to clipboard
val organizationId: Output<String>? = null
Link copied to clipboard
val resourceTypes: Output<List<String>>? = null

Immutable. The resource instance type on which this policy applies. Format will be of the form : / Example: * compute.googleapis.com/Instance.