public sealed class Constraint.Types.CustomConstraintDefinition : IMessage<Constraint.Types.CustomConstraintDefinition>, IEquatable<Constraint.Types.CustomConstraintDefinition>, IDeepCloneable<Constraint.Types.CustomConstraintDefinition>, IBufferMessage, IMessageReference documentation and code samples for the Organization Policy v2 API class Constraint.Types.CustomConstraintDefinition.
Custom constraint definition. Defines this as a managed constraint.
Implements
IMessageConstraintTypesCustomConstraintDefinition, IEquatableConstraintTypesCustomConstraintDefinition, IDeepCloneableConstraintTypesCustomConstraintDefinition, IBufferMessage, IMessageNamespace
Google.Cloud.OrgPolicy.V2Assembly
Google.Cloud.OrgPolicy.V2.dll
Constructors
CustomConstraintDefinition()
public CustomConstraintDefinition()CustomConstraintDefinition(CustomConstraintDefinition)
public CustomConstraintDefinition(Constraint.Types.CustomConstraintDefinition other)| Parameter | |
|---|---|
| Name | Description |
other |
ConstraintTypesCustomConstraintDefinition |
Properties
ActionType
public Constraint.Types.CustomConstraintDefinition.Types.ActionType ActionType { get; set; }Allow or deny type.
| Property Value | |
|---|---|
| Type | Description |
ConstraintTypesCustomConstraintDefinitionTypesActionType |
|
Condition
public string Condition { get; set; }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.
| Property Value | |
|---|---|
| Type | Description |
string |
|
MethodTypes
public RepeatedField<Constraint.Types.CustomConstraintDefinition.Types.MethodType> MethodTypes { get; }All the operations being applied for this constraint.
| Property Value | |
|---|---|
| Type | Description |
RepeatedFieldConstraintTypesCustomConstraintDefinitionTypesMethodType |
|
Parameters
public MapField<string, Constraint.Types.CustomConstraintDefinition.Types.Parameter> Parameters { get; }Stores the structure of
[Parameters][google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter]
used by the constraint condition. The key of map represents the name of
the parameter.
| Property Value | |
|---|---|
| Type | Description |
MapFieldstringConstraintTypesCustomConstraintDefinitionTypesParameter |
|
ResourceTypes
public RepeatedField<string> ResourceTypes { get; }The resource instance type on which this policy applies. Format will be
of the form : <service name>/<type> Example:
compute.googleapis.com/Instance.
| Property Value | |
|---|---|
| Type | Description |
RepeatedFieldstring |
|