Class: Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1BindingExplanation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/policytroubleshooter_v1/classes.rb,
lib/google/apis/policytroubleshooter_v1/representations.rb,
lib/google/apis/policytroubleshooter_v1/representations.rb

Overview

Details about how a binding in a policy affects a principal's ability to use a permission.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudPolicytroubleshooterV1BindingExplanation

Returns a new instance of GoogleCloudPolicytroubleshooterV1BindingExplanation.



141
142
143
# File 'lib/google/apis/policytroubleshooter_v1/classes.rb', line 141

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#accessString

Required. Indicates whether this binding provides the specified permission to the specified principal for the specified resource. This field does not indicate whether the principal actually has the permission for the resource. There might be another binding that overrides this binding. To determine whether the principal actually has the permission, use the access field in the TroubleshootIamPolicyResponse. Corresponds to the JSON property access

Returns:

  • (String)


80
81
82
# File 'lib/google/apis/policytroubleshooter_v1/classes.rb', line 80

def access
  @access
end

#conditionGoogle::Apis::PolicytroubleshooterV1::GoogleTypeExpr

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



99
100
101
# File 'lib/google/apis/policytroubleshooter_v1/classes.rb', line 99

def condition
  @condition
end

#membershipsHash<String,Google::Apis::PolicytroubleshooterV1::GoogleCloudPolicytroubleshooterV1BindingExplanationAnnotatedMembership>

Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request. For example, suppose that a binding includes the following principals: * user:alice@example.com * group: product-eng@example.com You want to troubleshoot access for user:bob@example. com. This user is a principal of the group group:product-eng@example.com. For the first principal in the binding, the key is user:alice@example.com, and the membership field in the value is set to MEMBERSHIP_NOT_INCLUDED. For the second principal in the binding, the key is group:product-eng@example. com, and the membership field in the value is set to MEMBERSHIP_INCLUDED. Corresponds to the JSON property memberships



114
115
116
# File 'lib/google/apis/policytroubleshooter_v1/classes.rb', line 114

def memberships
  @memberships
end

#relevanceString

The relevance of this binding to the overall determination for the entire policy. Corresponds to the JSON property relevance

Returns:

  • (String)


120
121
122
# File 'lib/google/apis/policytroubleshooter_v1/classes.rb', line 120

def relevance
  @relevance
end

#roleString

The role that this binding grants. For example, roles/compute.serviceAgent. For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference. Corresponds to the JSON property role

Returns:

  • (String)


127
128
129
# File 'lib/google/apis/policytroubleshooter_v1/classes.rb', line 127

def role
  @role
end

#role_permissionString

Indicates whether the role granted by this binding contains the specified permission. Corresponds to the JSON property rolePermission

Returns:

  • (String)


133
134
135
# File 'lib/google/apis/policytroubleshooter_v1/classes.rb', line 133

def role_permission
  @role_permission
end

#role_permission_relevanceString

The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy. Corresponds to the JSON property rolePermissionRelevance

Returns:

  • (String)


139
140
141
# File 'lib/google/apis/policytroubleshooter_v1/classes.rb', line 139

def role_permission_relevance
  @role_permission_relevance
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



146
147
148
149
150
151
152
153
154
# File 'lib/google/apis/policytroubleshooter_v1/classes.rb', line 146

def update!(**args)
  @access = args[:access] if args.key?(:access)
  @condition = args[:condition] if args.key?(:condition)
  @memberships = args[:memberships] if args.key?(:memberships)
  @relevance = args[:relevance] if args.key?(:relevance)
  @role = args[:role] if args.key?(:role)
  @role_permission = args[:role_permission] if args.key?(:role_permission)
  @role_permission_relevance = args[:role_permission_relevance] if args.key?(:role_permission_relevance)
end