class Google::Apis::PubsubV1beta2::Policy
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM. *Example* ` “bindings”: [ ` “role”: “roles/owner”, “members”: [ “user:mike@example.com”, “ group:admins@example.com”, “domain:google.com”, “serviceAccount:my-other-app@ appspot.gserviceaccount.com”] `, ` “role”: “roles/viewer”, “members”: [“user: sean@example.com”] ` ] ` For a description of IAM and its features, see the [ IAM developer's guide](cloud.google.com/iam).
Attributes
Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error. Corresponds to the JSON property `bindings` @return [Array<Google::Apis::PubsubV1beta2::Binding>]
Can be used to perform a read-modify-write. Corresponds to the JSON property `etag` @return [String]
Version of the `Policy`. The default version is 0. Corresponds to the JSON property `version` @return [Fixnum]
Public Class Methods
# File generated/google/apis/pubsub_v1beta2/classes.rb, line 83 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File generated/google/apis/pubsub_v1beta2/classes.rb, line 88 def update!(**args) @version = args[:version] unless args[:version].nil? @bindings = args[:bindings] unless args[:bindings].nil? @etag = args[:etag] unless args[:etag].nil? end