Class: Google::Apis::SecuritycenterV1beta2::Object

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

Overview

Kubernetes object related to the finding, uniquely identified by GKNN. Used if the object Kind is not one of Pod, Node, NodePool, Binding, or AccessReview.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Object

Returns a new instance of Object.



2970
2971
2972
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 2970

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

Instance Attribute Details

#containersArray<Google::Apis::SecuritycenterV1beta2::Container>

Pod containers associated with this finding, if any. Corresponds to the JSON property containers



2945
2946
2947
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 2945

def containers
  @containers
end

#groupString

Kubernetes object group, such as "policy.k8s.io/v1". Corresponds to the JSON property group

Returns:

  • (String)


2950
2951
2952
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 2950

def group
  @group
end

#kindString

Kubernetes object kind, such as “Namespace”. Corresponds to the JSON property kind

Returns:

  • (String)


2955
2956
2957
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 2955

def kind
  @kind
end

#nameString

Kubernetes object name. For details see https://kubernetes.io/docs/concepts/ overview/working-with-objects/names/. Corresponds to the JSON property name

Returns:

  • (String)


2961
2962
2963
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 2961

def name
  @name
end

#nsString

Kubernetes object namespace. Must be a valid DNS label. Named "ns" to avoid collision with C++ namespace keyword. For details see https://kubernetes.io/ docs/tasks/administer-cluster/namespaces/. Corresponds to the JSON property ns

Returns:

  • (String)


2968
2969
2970
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 2968

def ns
  @ns
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2975
2976
2977
2978
2979
2980
2981
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 2975

def update!(**args)
  @containers = args[:containers] if args.key?(:containers)
  @group = args[:group] if args.key?(:group)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @ns = args[:ns] if args.key?(:ns)
end