Class: Google::Apis::GkebackupV1::Filter

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

Overview

Defines the filter for Restore. This filter can be used to further refine the resource selection of the Restore beyond the coarse-grained scope defined in the RestorePlan. exclusion_filters take precedence over inclusion_filters. If a resource matches both inclusion_filters and exclusion_filters, it will not be restored.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Filter

Returns a new instance of Filter.



1285
1286
1287
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1285

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

Instance Attribute Details

#exclusion_filtersArray<Google::Apis::GkebackupV1::ResourceSelector>

Optional. Excludes resources from restoration. If specified, a resource will not be restored if it matches any ResourceSelector of the exclusion_filters . Corresponds to the JSON property exclusionFilters



1275
1276
1277
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1275

def exclusion_filters
  @exclusion_filters
end

#inclusion_filtersArray<Google::Apis::GkebackupV1::ResourceSelector>

Optional. Selects resources for restoration. If specified, only resources which match inclusion_filters will be selected for restoration. A resource will be selected if it matches any ResourceSelector of the inclusion_filters. Corresponds to the JSON property inclusionFilters



1283
1284
1285
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1283

def inclusion_filters
  @inclusion_filters
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1290
1291
1292
1293
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 1290

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