Class: TencentCloud::Cls::V20201016::MetricYamlSpec

Inherits:
TencentCloud::Common::AbstractModel
  • Object
show all
Defined in:
lib/v20201016/models.rb

Overview

指标采集yaml格式配置

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type = nil, spec = nil) ⇒ MetricYamlSpec

Returns a new instance of MetricYamlSpec.



13080
13081
13082
13083
# File 'lib/v20201016/models.rb', line 13080

def initialize(type=nil, spec=nil)
  @Type = type
  @Spec = spec
end

Instance Attribute Details

#Spec ⇒ Object

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: test
  namespace: test
  labels:
    k8s-app1: test
    k8s-app2: test
spec:
  endpoints:
    - interval: 15s
      port: 8080-8080-tcp
      path: /metrics
      relabelings:
        - action: replace
          sourceLabels:
            - __meta_kubernetes_pod_label_app
          targetLabel: application
  namespaceSelector:
    matchNames:
      - test
  selector:
    matchLabels:
      app: test

注意:此字段可能返回 null,表示取不到有效值。



13078
13079
13080
# File 'lib/v20201016/models.rb', line 13078

def Spec
  @Spec
end

#Type ⇒ Object

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: test
  namespace: test
  labels:
    k8s-app1: test
    k8s-app2: test
spec:
  endpoints:
    - interval: 15s
      port: 8080-8080-tcp
      path: /metrics
      relabelings:
        - action: replace
          sourceLabels:
            - __meta_kubernetes_pod_label_app
          targetLabel: application
  namespaceSelector:
    matchNames:
      - test
  selector:
    matchLabels:
      app: test

注意:此字段可能返回 null,表示取不到有效值。



13078
13079
13080
# File 'lib/v20201016/models.rb', line 13078

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



13085
13086
13087
13088
# File 'lib/v20201016/models.rb', line 13085

def deserialize(params)
  @Type = params['Type']
  @Spec = params['Spec']
end