Artifact Registry v1 API - Class Rule (2.9.0)

public sealed class Rule : IMessage<Rule>, IEquatable<Rule>, IDeepCloneable<Rule>, IBufferMessage, IMessage

Reference documentation and code samples for the Artifact Registry v1 API class Rule.

A rule defines the deny or allow action of the operation it applies to and the conditions required for the rule to apply. You can set one rule for an entire repository and one rule for each package within.

Inheritance

object > Rule

Namespace

Google.Cloud.ArtifactRegistry.V1

Assembly

Google.Cloud.ArtifactRegistry.V1.dll

Constructors

Rule()

public Rule()

Rule(Rule)

public Rule(Rule other)
Parameter
Name Description
other Rule

Properties

Action

public Rule.Types.Action Action { get; set; }

The action this rule takes.

Property Value
Type Description
RuleTypesAction

Condition

public Expr Condition { get; set; }

Optional. A CEL expression for conditions that must be met in order for the rule to apply. If not provided, the rule matches all objects.

Property Value
Type Description
Expr

Name

public string Name { get; set; }

The name of the rule, for example: projects/p1/locations/us-central1/repositories/repo1/rules/rule1.

Property Value
Type Description
string

Operation

public Rule.Types.Operation Operation { get; set; }
Property Value
Type Description
RuleTypesOperation

PackageId

public string PackageId { get; set; }

The package ID the rule applies to. If empty, this rule applies to all packages inside the repository.

Property Value
Type Description
string

RuleName

public RuleName RuleName { get; set; }

RuleName-typed view over the Name resource name property.

Property Value
Type Description
RuleName