Google Cloud Asset Inventory v1 API - Class AnalyzerOrgPolicyConstraint.Types.CustomConstraint (3.4.0)

public sealed class CustomConstraint : IMessage<AnalyzerOrgPolicyConstraint.Types.CustomConstraint>, IEquatable<AnalyzerOrgPolicyConstraint.Types.CustomConstraint>, IDeepCloneable<AnalyzerOrgPolicyConstraint.Types.CustomConstraint>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Asset Inventory v1 API class AnalyzerOrgPolicyConstraint.Types.CustomConstraint.

The definition of a custom constraint.

Inheritance

Object > AnalyzerOrgPolicyConstraint.Types.CustomConstraint

Namespace

Google.Cloud.Asset.V1

Assembly

Google.Cloud.Asset.V1.dll

Constructors

CustomConstraint()

public CustomConstraint()

CustomConstraint(AnalyzerOrgPolicyConstraint.Types.CustomConstraint)

public CustomConstraint(AnalyzerOrgPolicyConstraint.Types.CustomConstraint other)
Parameter
NameDescription
otherAnalyzerOrgPolicyConstraint.Types.CustomConstraint

Properties

ActionType

public AnalyzerOrgPolicyConstraint.Types.CustomConstraint.Types.ActionType ActionType { get; set; }

Allow or deny type.

Property Value
TypeDescription
AnalyzerOrgPolicyConstraint.Types.CustomConstraint.Types.ActionType

Condition

public string Condition { get; set; }

Organization Policy condition/expression. For example: resource.instanceName.matches(&quot;[production|test]_.*_(\d)+&quot;)&apos; or, resource.management.auto_upgrade == true

Property Value
TypeDescription
String

Description

public string Description { get; set; }

Detailed information about this custom policy constraint.

Property Value
TypeDescription
String

DisplayName

public string DisplayName { get; set; }

One line display name for the UI.

Property Value
TypeDescription
String

MethodTypes

public RepeatedField<AnalyzerOrgPolicyConstraint.Types.CustomConstraint.Types.MethodType> MethodTypes { get; }

All the operations being applied for this constraint.

Property Value
TypeDescription
RepeatedField<AnalyzerOrgPolicyConstraint.Types.CustomConstraint.Types.MethodType>

Name

public string Name { get; set; }

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"

Property Value
TypeDescription
String

ResourceTypes

public RepeatedField<string> ResourceTypes { get; }

The Resource Instance type on which this policy applies to. Format will be of the form : "<canonical service name>/<type>" Example:

  • compute.googleapis.com/Instance.
Property Value
TypeDescription
RepeatedField<String>