Class: Google::Apis::ServiceconsumermanagementV1::AuthorizationRule
- Inherits:
-
Object
- Object
- Google::Apis::ServiceconsumermanagementV1::AuthorizationRule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/serviceconsumermanagement_v1/classes.rb,
generated/google/apis/serviceconsumermanagement_v1/representations.rb,
generated/google/apis/serviceconsumermanagement_v1/representations.rb
Overview
Authorization rule for API services.
It specifies the permission(s) required for an API element for the overall
API request to succeed. It is typically used to mark request message fields
that contain the name of the resource and indicates the permissions that
will be checked on that resource.
For example:
package google.storage.v1;
message CopyObjectRequest
string source = 1 [
(google.api.authz).permissions = "storage.objects.get"];
string destination = 2 [
(google.api.authz).permissions =
"storage.objects.create,storage.objects.update"];
Instance Attribute Summary collapse
-
#permissions ⇒ String
The required permissions.
-
#selector ⇒ String
Selects the API elements to which this rule applies.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AuthorizationRule
constructor
A new instance of AuthorizationRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ AuthorizationRule
Returns a new instance of AuthorizationRule
411 412 413 |
# File 'generated/google/apis/serviceconsumermanagement_v1/classes.rb', line 411 def initialize(**args) update!(**args) end |
Instance Attribute Details
#permissions ⇒ String
The required permissions. The acceptable values vary depend on the
authorization system used. For Google APIs, it should be a comma-separated
Google IAM permission values. When multiple permissions are listed, the
semantics is not defined by the system. Additional documentation must
be provided manually.
Corresponds to the JSON property permissions
403 404 405 |
# File 'generated/google/apis/serviceconsumermanagement_v1/classes.rb', line 403 def @permissions end |
#selector ⇒ String
Selects the API elements to which this rule applies.
Refer to selector for syntax details.
Corresponds to the JSON property selector
409 410 411 |
# File 'generated/google/apis/serviceconsumermanagement_v1/classes.rb', line 409 def selector @selector end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
416 417 418 419 |
# File 'generated/google/apis/serviceconsumermanagement_v1/classes.rb', line 416 def update!(**args) @permissions = args[:permissions] if args.key?(:permissions) @selector = args[:selector] if args.key?(:selector) end |