Reference documentation and code samples for the Google Cloud Artifact Registry V1 Client 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.
Generated from protobuf message google.devtools.artifactregistry.v1.Rule
Namespace
Google \ Cloud \ ArtifactRegistry \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
The name of the rule, for example: projects/p1/locations/us-central1/repositories/repo1/rules/rule1
.
↳ action
int
The action this rule takes.
↳ operation
int
↳ condition
Google\Type\Expr
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.
↳ package_id
string
The package ID the rule applies to. If empty, this rule applies to all packages inside the repository.
getName
The name of the rule, for example: projects/p1/locations/us-central1/repositories/repo1/rules/rule1
.
string
setName
The name of the rule, for example: projects/p1/locations/us-central1/repositories/repo1/rules/rule1
.
var
string
$this
getAction
The action this rule takes.
int
setAction
The action this rule takes.
var
int
$this
getOperation
Generated from protobuf field .google.devtools.artifactregistry.v1.Rule.Operation operation = 3;
int
setOperation
Generated from protobuf field .google.devtools.artifactregistry.v1.Rule.Operation operation = 3;
var
int
$this
getCondition
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.
hasCondition
clearCondition
setCondition
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.
$this
getPackageId
The package ID the rule applies to.
If empty, this rule applies to all packages inside the repository.
string
setPackageId
The package ID the rule applies to.
If empty, this rule applies to all packages inside the repository.
var
string
$this