Class: Google::Apis::SecuritypostureV1::GoogleCloudSecuritypostureV1PolicyRuleStringValues

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

Overview

The allowed and denied values for a list constraint. For all constraints, these fields can contain literal values. Optionally, you can add the is: prefix to these values. If the value contains a colon (:), then the is: prefix is required. Some constraints allow you to specify a portion of the resource hierarchy, known as a hierarchy subtree, that the constraint applies to. To specify a hierarchy subtree, use the under: prefix, followed by a value with one of these formats: - projects/project_id(for example, `projects/tokyo-rain-123`) - `folders/`folder_id (for example, folders/1234567890123) - organizations/organization_id`(for example, organizations/123456789012) A constraint'ssupports_under` field indicates whether you can specify a hierarchy subtree. To learn which predefined constraints let you specify a hierarchy subtree, see the constraints reference.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudSecuritypostureV1PolicyRuleStringValues

Returns a new instance of GoogleCloudSecuritypostureV1PolicyRuleStringValues.



539
540
541
# File 'lib/google/apis/securityposture_v1/classes.rb', line 539

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

Instance Attribute Details

#allowed_valuesArray<String>

The allowed values for the constraint. Corresponds to the JSON property allowedValues

Returns:

  • (Array<String>)


532
533
534
# File 'lib/google/apis/securityposture_v1/classes.rb', line 532

def allowed_values
  @allowed_values
end

#denied_valuesArray<String>

The denied values for the constraint. Corresponds to the JSON property deniedValues

Returns:

  • (Array<String>)


537
538
539
# File 'lib/google/apis/securityposture_v1/classes.rb', line 537

def denied_values
  @denied_values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



544
545
546
547
# File 'lib/google/apis/securityposture_v1/classes.rb', line 544

def update!(**args)
  @allowed_values = args[:allowed_values] if args.key?(:allowed_values)
  @denied_values = args[:denied_values] if args.key?(:denied_values)
end