Class: Google::Apis::BinaryauthorizationV1beta1::Policy

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

Overview

A policy for container image binary authorization.

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

Returns a new instance of Policy



434
435
436
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 434

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

Instance Attribute Details

#admission_whitelist_patternsArray<Google::Apis::BinaryauthorizationV1beta1::AdmissionWhitelistPattern>

Optional. Admission policy whitelisting. A matching admission request will always be permitted. This feature is typically used to exclude Google or third-party infrastructure images from Binary Authorization policies. Corresponds to the JSON property admissionWhitelistPatterns



394
395
396
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 394

def admission_whitelist_patterns
  @admission_whitelist_patterns
end

#cluster_admission_rulesHash<String,Google::Apis::BinaryauthorizationV1beta1::AdmissionRule>

Optional. Per-cluster admission rules. Cluster spec format: location.clusterId. There can be at most one admission rule per cluster spec. A location is either a compute zone (e.g. us-central1-a) or a region (e.g. us-central1). For clusterId syntax restrictions see https://cloud.google.com/container-engine/reference/rest/v1/projects.zones. clusters. Corresponds to the JSON property clusterAdmissionRules



406
407
408
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 406

def cluster_admission_rules
  @cluster_admission_rules
end

#default_admission_ruleGoogle::Apis::BinaryauthorizationV1beta1::AdmissionRule

An admission rule specifies either that all container images used in a pod creation request must be attested to by one or more attestors, that all pod creations will be allowed, or that all pod creations will be denied. Images matching an admission whitelist pattern are exempted from admission rules and will never block a pod creation. Corresponds to the JSON property defaultAdmissionRule



416
417
418
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 416

def default_admission_rule
  @default_admission_rule
end

#descriptionString

Optional. A descriptive comment. Corresponds to the JSON property description

Returns:

  • (String)


421
422
423
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 421

def description
  @description
end

#nameString

Output only. The resource name, in the format projects/*/policy. There is at most one policy per project. Corresponds to the JSON property name

Returns:

  • (String)


427
428
429
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 427

def name
  @name
end

#update_timeString

Output only. Time when the policy was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


432
433
434
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 432

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



439
440
441
442
443
444
445
446
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 439

def update!(**args)
  @admission_whitelist_patterns = args[:admission_whitelist_patterns] if args.key?(:admission_whitelist_patterns)
  @cluster_admission_rules = args[:cluster_admission_rules] if args.key?(:cluster_admission_rules)
  @default_admission_rule = args[:default_admission_rule] if args.key?(:default_admission_rule)
  @description = args[:description] if args.key?(:description)
  @name = args[:name] if args.key?(:name)
  @update_time = args[:update_time] if args.key?(:update_time)
end