AssignmentArgs

data class AssignmentArgs(val groupLabels: Output<List<AssignmentGroupLabelArgs>>? = null, val instanceNamePrefixes: Output<List<String>>? = null, val instances: Output<List<String>>? = null, val osTypes: Output<List<AssignmentOsTypeArgs>>? = null, val zones: Output<List<String>>? = null) : ConvertibleToJava<AssignmentArgs>

An assignment represents the group or groups of VM instances that the policy applies to. If an assignment is empty, it applies to all VM instances. Otherwise, the targeted VM instances must meet all the criteria specified. So if both labels and zones are specified, the policy applies to VM instances with those labels and in those zones.

Constructors

Link copied to clipboard
constructor(groupLabels: Output<List<AssignmentGroupLabelArgs>>? = null, instanceNamePrefixes: Output<List<String>>? = null, instances: Output<List<String>>? = null, osTypes: Output<List<AssignmentOsTypeArgs>>? = null, zones: Output<List<String>>? = null)

Properties

Link copied to clipboard

Targets instances matching at least one of these label sets. This allows an assignment to target disparate groups, for example "env=prod or env=staging".

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

Targets VM instances whose name starts with one of these prefixes. Like labels, this is another way to group VM instances when targeting configs, for example prefix="prod-". Only supported for project-level policies.

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

Targets any of the instances specified. Instances are specified by their URI in the form zones/[ZONE]/instances/[INSTANCE_NAME]. Instance targeting is uncommon and is supported to facilitate the management of changes by the instance or to target specific VM instances for development and testing. Only supported for project-level policies and must reference instances within this project.

Link copied to clipboard
val osTypes: Output<List<AssignmentOsTypeArgs>>? = null

Targets VM instances matching at least one of the following OS types. VM instances must match all supplied criteria for a given OsType to be included.

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

Targets instances in any of these zones. Leave empty to target instances in any zone. Zonal targeting is uncommon and is supported to facilitate the management of changes by zone.

Functions

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