Class: Google::Apis::MonitoringV3::GkeWorkload

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

Overview

A GKE Workload (Deployment, StatefulSet, etc). The field names correspond to the metadata labels on monitored resources that fall under a workload (for example, k8s_container or k8s_pod).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GkeWorkload

Returns a new instance of GkeWorkload.



1731
1732
1733
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1731

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

Instance Attribute Details

#cluster_nameString

The name of the parent cluster. Corresponds to the JSON property clusterName

Returns:

  • (String)


1702
1703
1704
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1702

def cluster_name
  @cluster_name
end

#locationString

The location of the parent cluster. This may be a zone or region. Corresponds to the JSON property location

Returns:

  • (String)


1707
1708
1709
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1707

def location
  @location
end

#namespace_nameString

The name of the parent namespace. Corresponds to the JSON property namespaceName

Returns:

  • (String)


1712
1713
1714
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1712

def namespace_name
  @namespace_name
end

#project_idString

Output only. The project this resource lives in. For legacy services migrated from the Custom type, this may be a distinct project from the one parenting the service itself. Corresponds to the JSON property projectId

Returns:

  • (String)


1719
1720
1721
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1719

def project_id
  @project_id
end

#top_level_controller_nameString

The name of this workload. Corresponds to the JSON property topLevelControllerName

Returns:

  • (String)


1724
1725
1726
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1724

def top_level_controller_name
  @top_level_controller_name
end

#top_level_controller_typeString

The type of this workload (for example, "Deployment" or "DaemonSet") Corresponds to the JSON property topLevelControllerType

Returns:

  • (String)


1729
1730
1731
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1729

def top_level_controller_type
  @top_level_controller_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1736
1737
1738
1739
1740
1741
1742
1743
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1736

def update!(**args)
  @cluster_name = args[:cluster_name] if args.key?(:cluster_name)
  @location = args[:location] if args.key?(:location)
  @namespace_name = args[:namespace_name] if args.key?(:namespace_name)
  @project_id = args[:project_id] if args.key?(:project_id)
  @top_level_controller_name = args[:top_level_controller_name] if args.key?(:top_level_controller_name)
  @top_level_controller_type = args[:top_level_controller_type] if args.key?(:top_level_controller_type)
end