Show / Hide Table of Contents

Class Assignment

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.

Inheritance
object
Assignment
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.OSConfig.v1beta.Data
Assembly: Google.Apis.OSConfig.v1beta.dll
Syntax
public class Assignment : IDirectResponseSchema

Properties

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
string

GroupLabels

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".

Declaration
[JsonProperty("groupLabels")]
public virtual IList<AssignmentGroupLabel> GroupLabels { get; set; }
Property Value
Type Description
IList<AssignmentGroupLabel>

InstanceNamePrefixes

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.

Declaration
[JsonProperty("instanceNamePrefixes")]
public virtual IList<string> InstanceNamePrefixes { get; set; }
Property Value
Type Description
IList<string>

Instances

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.

Declaration
[JsonProperty("instances")]
public virtual IList<string> Instances { get; set; }
Property Value
Type Description
IList<string>

OsTypes

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.

Declaration
[JsonProperty("osTypes")]
public virtual IList<AssignmentOsType> OsTypes { get; set; }
Property Value
Type Description
IList<AssignmentOsType>

Zones

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.

Declaration
[JsonProperty("zones")]
public virtual IList<string> Zones { get; set; }
Property Value
Type Description
IList<string>

Implements

IDirectResponseSchema
In this article
Back to top Generated by DocFX