Class: TencentCloud::Apigateway::V20180808::K8sService

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

Overview

k8s 服务的配置

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(weight = nil, clusterid = nil, namespace = nil, servicename = nil, port = nil, extralabels = nil, name = nil) ⇒ K8sService

Returns a new instance of K8sService.



6935
6936
6937
6938
6939
6940
6941
6942
6943
# File 'lib/v20180808/models.rb', line 6935

def initialize(weight=nil, clusterid=nil, namespace=nil, servicename=nil, port=nil, extralabels=nil, name=nil)
  @Weight = weight
  @ClusterId = clusterid
  @Namespace = namespace
  @ServiceName = servicename
  @Port = port
  @ExtraLabels = extralabels
  @Name = name
end

Instance Attribute Details

#ClusterIdObject

Parameters:

  • Weight:

    权重

  • ClusterId:

    k8s集群ID

  • Namespace:

    容器命名空间

  • ServiceName:

    容器服务的名字

  • Port:

    服务的端口

  • ExtraLabels:

    额外选择的Pod的Label

  • Name:

    自定义的服务名字,可选



6933
6934
6935
# File 'lib/v20180808/models.rb', line 6933

def ClusterId
  @ClusterId
end

#ExtraLabelsObject

Parameters:

  • Weight:

    权重

  • ClusterId:

    k8s集群ID

  • Namespace:

    容器命名空间

  • ServiceName:

    容器服务的名字

  • Port:

    服务的端口

  • ExtraLabels:

    额外选择的Pod的Label

  • Name:

    自定义的服务名字,可选



6933
6934
6935
# File 'lib/v20180808/models.rb', line 6933

def ExtraLabels
  @ExtraLabels
end

#NameObject

Parameters:

  • Weight:

    权重

  • ClusterId:

    k8s集群ID

  • Namespace:

    容器命名空间

  • ServiceName:

    容器服务的名字

  • Port:

    服务的端口

  • ExtraLabels:

    额外选择的Pod的Label

  • Name:

    自定义的服务名字,可选



6933
6934
6935
# File 'lib/v20180808/models.rb', line 6933

def Name
  @Name
end

#NamespaceObject

Parameters:

  • Weight:

    权重

  • ClusterId:

    k8s集群ID

  • Namespace:

    容器命名空间

  • ServiceName:

    容器服务的名字

  • Port:

    服务的端口

  • ExtraLabels:

    额外选择的Pod的Label

  • Name:

    自定义的服务名字,可选



6933
6934
6935
# File 'lib/v20180808/models.rb', line 6933

def Namespace
  @Namespace
end

#PortObject

Parameters:

  • Weight:

    权重

  • ClusterId:

    k8s集群ID

  • Namespace:

    容器命名空间

  • ServiceName:

    容器服务的名字

  • Port:

    服务的端口

  • ExtraLabels:

    额外选择的Pod的Label

  • Name:

    自定义的服务名字,可选



6933
6934
6935
# File 'lib/v20180808/models.rb', line 6933

def Port
  @Port
end

#ServiceNameObject

Parameters:

  • Weight:

    权重

  • ClusterId:

    k8s集群ID

  • Namespace:

    容器命名空间

  • ServiceName:

    容器服务的名字

  • Port:

    服务的端口

  • ExtraLabels:

    额外选择的Pod的Label

  • Name:

    自定义的服务名字,可选



6933
6934
6935
# File 'lib/v20180808/models.rb', line 6933

def ServiceName
  @ServiceName
end

#WeightObject

Parameters:

  • Weight:

    权重

  • ClusterId:

    k8s集群ID

  • Namespace:

    容器命名空间

  • ServiceName:

    容器服务的名字

  • Port:

    服务的端口

  • ExtraLabels:

    额外选择的Pod的Label

  • Name:

    自定义的服务名字,可选



6933
6934
6935
# File 'lib/v20180808/models.rb', line 6933

def Weight
  @Weight
end

Instance Method Details

#deserialize(params) ⇒ Object



6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
# File 'lib/v20180808/models.rb', line 6945

def deserialize(params)
  @Weight = params['Weight']
  @ClusterId = params['ClusterId']
  @Namespace = params['Namespace']
  @ServiceName = params['ServiceName']
  @Port = params['Port']
  unless params['ExtraLabels'].nil?
    @ExtraLabels = []
    params['ExtraLabels'].each do |i|
      k8slabel_tmp = K8sLabel.new
      k8slabel_tmp.deserialize(i)
      @ExtraLabels << k8slabel_tmp
    end
  end
  @Name = params['Name']
end