class Google::Cloud::Bigquery::Policy::Binding
end
binding_owner.members.delete_if { |m| m.include? “@example.com” }
binding_owner = p.bindings.find { |b| b.role == “roles/owner” }
table.update_policy do |p|
table = dataset.table “my_table”
dataset = bigquery.dataset “my_dataset”
bigquery = Google::Cloud::Bigquery.new
require “google/cloud/bigquery”
@example Update mutable bindings.
binding_owner.members.frozen? #=> true
binding_owner.frozen? #=> true
binding_owner.members #=> [“user:owner@example.com”]
binding_owner.role #=> “roles/owner”
binding_owner = policy.bindings.find { |b| b.role == “roles/owner” }
policy = table.policy
table = dataset.table “my_table”
dataset = bigquery.dataset “my_dataset”
bigquery = Google::Cloud::Bigquery.new
require “google/cloud/bigquery”
@example
`google.com` or ‘example.com`.
* `domain:<domain>`: The G Suite domain (primary) that represents all the users of that domain. For example,
the binding.
group is recovered, this value reverts to `group:<emailid>` and the recovered group retains the role in
group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the
* `deleted:group:<emailid>?uid=<uniqueid>`: An email address (plus unique identifier) representing a Google
the binding.
this value reverts to `serviceAccount:<emailid>` and the undeleted service account retains the role in
`my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted,
a service account that has been recently deleted. For example,
* `deleted: serviceAccount:<emailid>?uid=<uniqueid>`: An email address (plus unique identifier) representing
binding.
is recovered, this value reverts to `user:<emailid>` and the recovered user retains the role in the
that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user
* `deleted:user:<emailid>?uid=<uniqueid>`: An email address (plus unique identifier) representing a user
* `group:<emailid>`: An email address that represents a Google group. For example, `admins@example.com`.
`my-other-app@appspot.gserviceaccount.com`.
* `serviceAccount:<emailid>`: An email address that represents a service account. For example,
`alice@example.com`.
* `user:<emailid>`: An email address that represents a specific Google account. For example,
account or a service account.
* `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google
account.
* `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google
`members` can have the following values. Required.
@attr [Array<String>] members Specifies the identities requesting access for a Cloud Platform resource.
`roles/owner`. Required.
@attr [String] role The role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or
@see cloud.google.com/bigquery/docs/table-access-controls-intro Controlling access to tables
predefined role or a user-created custom role.
accounts, Google groups, and domains. A role is a named list of permissions; each role can be an IAM
A binding binds one or more members to a single role. Member strings can describe user accounts, service
Represents a Cloud IAM Binding for BigQuery resources within the context of a {Policy}.
# Policy::Binding
#
def self.from_gapi gapi
- Private: - New Binding from a Google::Apis::BigqueryV2::Binding object.
def self.from_gapi gapi new gapi.etag, gapi.members.to_a end
def freeze
- Private: - Deep freeze the policy including its members.
def freeze super role.freeze members.each(&:freeze) members.freeze self end
def initialize role, members
- Private: -
def initialize role, members members = Array(members).uniq raise ArgumentError, "members cannot be empty" if members.empty? @role = role @members = members end
def members= new_members
-
new_members(Array) -- Specifies the identities requesting access for a Cloud Platform resource.
def members= new_members @members = Array(new_members).uniq end
def to_gapi
- Private: - Convert the Binding to a Google::Apis::BigqueryV2::Binding.
def to_gapi Google::Apis::BigqueryV2::Binding.new role: role, members: members end