Class: Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule
- Inherits:
-
Object
- Object
- Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/artifactregistry_v1/classes.rb,
lib/google/apis/artifactregistry_v1/representations.rb,
lib/google/apis/artifactregistry_v1/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#action ⇒ String
The action this rule takes.
-
#condition ⇒ Google::Apis::ArtifactregistryV1::Expr
Represents a textual expression in the Common Expression Language (CEL) syntax.
-
#name ⇒ String
The name of the rule, for example:
projects/p1/locations/us-central1/ repositories/repo1/rules/rule1. -
#operation ⇒ String
Corresponds to the JSON property
operation. -
#package_id ⇒ String
The package ID the rule applies to.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleDevtoolsArtifactregistryV1Rule
constructor
A new instance of GoogleDevtoolsArtifactregistryV1Rule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleDevtoolsArtifactregistryV1Rule
Returns a new instance of GoogleDevtoolsArtifactregistryV1Rule.
1204 1205 1206 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1204 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ String
The action this rule takes.
Corresponds to the JSON property action
1166 1167 1168 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1166 def action @action end |
#condition ⇒ Google::Apis::ArtifactregistryV1::Expr
Represents a textual expression in the Common Expression Language (CEL) syntax.
CEL is a C-like expression language. The syntax and semantics of CEL are
documented at https://github.com/google/cel-spec. Example (Comparison): title:
"Summary size limit" description: "Determines if a summary is less than 100
chars" expression: "document.summary.size() < 100" Example (Equality): title: "
Requestor is owner" description: "Determines if requestor is the document
owner" expression: "document.owner == request.auth.claims.email" Example (
Logic): title: "Public documents" description: "Determine whether the document
should be publicly visible" expression: "document.type != 'private' &&
document.type != 'internal'" Example (Data Manipulation): title: "Notification
string" description: "Create a notification string with a timestamp."
expression: "'New message received at ' + string(document.create_time)" The
exact variables and functions that may be referenced within an expression are
determined by the service that evaluates it. See the service documentation for
additional information.
Corresponds to the JSON property condition
1185 1186 1187 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1185 def condition @condition end |
#name ⇒ String
The name of the rule, for example: projects/p1/locations/us-central1/
repositories/repo1/rules/rule1.
Corresponds to the JSON property name
1191 1192 1193 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1191 def name @name end |
#operation ⇒ String
Corresponds to the JSON property operation
1196 1197 1198 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1196 def operation @operation end |
#package_id ⇒ String
The package ID the rule applies to. If empty, this rule applies to all
packages inside the repository.
Corresponds to the JSON property packageId
1202 1203 1204 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1202 def package_id @package_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1209 1210 1211 1212 1213 1214 1215 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1209 def update!(**args) @action = args[:action] if args.key?(:action) @condition = args[:condition] if args.key?(:condition) @name = args[:name] if args.key?(:name) @operation = args[:operation] if args.key?(:operation) @package_id = args[:package_id] if args.key?(:package_id) end |