Class: Google::Apis::MonitoringV3::GkeNamespace

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

GKE Namespace. The field names correspond to the resource metadata labels on monitored resources that fall under a namespace (e.g. k8s_container, k8s_pod).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GkeNamespace

Returns a new instance of GkeNamespace.



1430
1431
1432
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1430

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)


1411
1412
1413
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1411

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)


1416
1417
1418
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1416

def location
  @location
end

#namespace_nameString

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

Returns:

  • (String)


1421
1422
1423
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1421

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)


1428
1429
1430
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1428

def project_id
  @project_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1435
1436
1437
1438
1439
1440
# File 'lib/google/apis/monitoring_v3/classes.rb', line 1435

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)
end