Class GoogleCloudSecuritypostureV1CustomConstraint
A custom, user-defined constraint. You can apply the constraint only to the resource types specified in the constraint, and only within the organization where the constraint is defined. When you create a custom constraint, it is not enforced automatically. You must use an organization policy to enforce the constraint.
Implements
Inherited Members
Namespace: Google.Apis.SecurityPosture.v1.Data
Assembly: Google.Apis.SecurityPosture.v1.dll
Syntax
public class GoogleCloudSecuritypostureV1CustomConstraint : IDirectResponseSchema
Properties
ActionType
Whether to allow or deny the action.
Declaration
[JsonProperty("actionType")]
public virtual string ActionType { get; set; }
Property Value
Type | Description |
---|---|
string |
Condition
A Common Expression Language (CEL) condition expression that must evaluate to true
for the constraint to
be enforced. The maximum length is 1000 characters. For example: +
resource.instanceName.matches('(production|test)_(.+_)?[\d]+')
: Evaluates to true
if the resource's
instanceName
attribute contains the following: + The prefix production
or test
+ An underscore (_
) +
Optional: One or more characters, followed by an underscore (_
) + One or more digits +
resource.management.auto_upgrade == true
: Evaluates to true
if the resource's management.auto_upgrade
attribute is true
.
Declaration
[JsonProperty("condition")]
public virtual string Condition { get; set; }
Property Value
Type | Description |
---|---|
string |
Description
A description of the constraint. The maximum length is 2000 characters.
Declaration
[JsonProperty("description")]
public virtual string Description { get; set; }
Property Value
Type | Description |
---|---|
string |
DisplayName
A display name for the constraint. The maximum length is 200 characters.
Declaration
[JsonProperty("displayName")]
public virtual string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
string |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
Type | Description |
---|---|
string |
MethodTypes
The types of operations that the constraint applies to.
Declaration
[JsonProperty("methodTypes")]
public virtual IList<string> MethodTypes { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
Name
Immutable. The name of the constraint, in the format
organizations/{organization_id}/customConstraints/custom.{custom_constraint_id}
. For example,
organizations/123456789012/customConstraints/custom.createOnlyE2TypeVms
. Must contain 1 to 62 characters,
excluding the prefix organizations/{organization_id}/customConstraints/custom.
.
Declaration
[JsonProperty("name")]
public virtual string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
ResourceTypes
Immutable. The resource type that the constraint applies to, in the format
{canonical_service_name}/{resource_type_name}
. For example, compute.googleapis.com/Instance
.
Declaration
[JsonProperty("resourceTypes")]
public virtual IList<string> ResourceTypes { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
UpdateTime
object representation of UpdateTimeRaw.
Declaration
[JsonIgnore]
[Obsolete("This property is obsolete and may behave unexpectedly; please use UpdateTimeDateTimeOffset instead.")]
public virtual object UpdateTime { get; set; }
Property Value
Type | Description |
---|---|
object |
UpdateTimeDateTimeOffset
DateTimeOffset representation of UpdateTimeRaw.
Declaration
[JsonIgnore]
public virtual DateTimeOffset? UpdateTimeDateTimeOffset { get; set; }
Property Value
Type | Description |
---|---|
DateTimeOffset? |
UpdateTimeRaw
Output only. The last time at which the constraint was updated or created.
Declaration
[JsonProperty("updateTime")]
public virtual string UpdateTimeRaw { get; set; }
Property Value
Type | Description |
---|---|
string |