Class: Google::Apis::IamV1::LintPolicyRequest

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

Overview

The request to lint a Cloud IAM policy object. LintPolicy is currently functional only for lint_object of type condition.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ LintPolicyRequest

Returns a new instance of LintPolicyRequest



561
562
563
# File 'generated/google/apis/iam_v1/classes.rb', line 561

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

Instance Attribute Details

#bindingGoogle::Apis::IamV1::Binding

Associates members with a role. Corresponds to the JSON property binding



492
493
494
# File 'generated/google/apis/iam_v1/classes.rb', line 492

def binding
  @binding
end

#conditionGoogle::Apis::IamV1::Expr

Represents an expression text. Example: title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" Corresponds to the JSON property condition



500
501
502
# File 'generated/google/apis/iam_v1/classes.rb', line 500

def condition
  @condition
end

#contextHash<String,Object>

context contains additional permission-controlled data that any lint unit may depend on, in form of key: value pairs. Currently, this field is non-operational and it will not be used during the lint operation. Corresponds to the JSON property context

Returns:

  • (Hash<String,Object>)


507
508
509
# File 'generated/google/apis/iam_v1/classes.rb', line 507

def context
  @context
end

#full_resource_nameString

The full resource name of the policy this lint request is about. The name follows the Google Cloud Platform (GCP) resource format. For example, a GCP project with ID my-project will be named //cloudresourcemanager.googleapis.com/projects/my-project. The resource name is not used to read the policy instance from the Cloud IAM database. The candidate policy for lint has to be provided in the same request object. Corresponds to the JSON property fullResourceName

Returns:

  • (String)


518
519
520
# File 'generated/google/apis/iam_v1/classes.rb', line 518

def full_resource_name
  @full_resource_name
end

#policyGoogle::Apis::IamV1::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. JSON 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"] ] YAML Example bindings:



559
560
561
# File 'generated/google/apis/iam_v1/classes.rb', line 559

def policy
  @policy
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



566
567
568
569
570
571
572
# File 'generated/google/apis/iam_v1/classes.rb', line 566

def update!(**args)
  @binding = args[:binding] if args.key?(:binding)
  @condition = args[:condition] if args.key?(:condition)
  @context = args[:context] if args.key?(:context)
  @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name)
  @policy = args[:policy] if args.key?(:policy)
end