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



513
514
515
# File 'generated/google/apis/iam_v1/classes.rb', line 513

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

Instance Attribute Details

#bindingGoogle::Apis::IamV1::Binding

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



444
445
446
# File 'generated/google/apis/iam_v1/classes.rb', line 444

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



452
453
454
# File 'generated/google/apis/iam_v1/classes.rb', line 452

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>)


459
460
461
# File 'generated/google/apis/iam_v1/classes.rb', line 459

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)


470
471
472
# File 'generated/google/apis/iam_v1/classes.rb', line 470

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:



511
512
513
# File 'generated/google/apis/iam_v1/classes.rb', line 511

def policy
  @policy
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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