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.
1258 1259 1260 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1258 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ String
The action this rule takes.
Corresponds to the JSON property action
1220 1221 1222 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1220 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
1239 1240 1241 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1239 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
1245 1246 1247 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1245 def name @name end |
#operation ⇒ String
Corresponds to the JSON property operation
1250 1251 1252 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1250 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
1256 1257 1258 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1256 def package_id @package_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1263 1264 1265 1266 1267 1268 1269 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1263 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 |