Class: TencentCloud::Emr::V20190103::ComputeResourceAdvanceParams

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

Overview

计算资源高级设置

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(labels = nil, taints = nil, prestartuserscript = nil, userscript = nil) ⇒ ComputeResourceAdvanceParams

Returns a new instance of ComputeResourceAdvanceParams.



1412
1413
1414
1415
1416
1417
# File 'lib/v20190103/models.rb', line 1412

def initialize(labels=nil, taints=nil, prestartuserscript=nil, userscript=nil)
  @Labels = labels
  @Taints = taints
  @PreStartUserScript = prestartuserscript
  @UserScript = userscript
end

Instance Attribute Details

#LabelsObject

Parameters:

  • 节点Label数组

  • 节点污点

  • base64 编码的用户脚本,在初始化节点之前执行

  • base64 编码的用户脚本, 此脚本会在 k8s 组件运行后执行, 需要用户保证脚本的可重入及重试逻辑, 脚本及其生成的日志文件可在节点的 /data/ccs_userscript/ 路径查看



1410
1411
1412
# File 'lib/v20190103/models.rb', line 1410

def Labels
  @Labels
end

#PreStartUserScriptObject

Parameters:

  • 节点Label数组

  • 节点污点

  • base64 编码的用户脚本,在初始化节点之前执行

  • base64 编码的用户脚本, 此脚本会在 k8s 组件运行后执行, 需要用户保证脚本的可重入及重试逻辑, 脚本及其生成的日志文件可在节点的 /data/ccs_userscript/ 路径查看



1410
1411
1412
# File 'lib/v20190103/models.rb', line 1410

def PreStartUserScript
  @PreStartUserScript
end

#TaintsObject

Parameters:

  • 节点Label数组

  • 节点污点

  • base64 编码的用户脚本,在初始化节点之前执行

  • base64 编码的用户脚本, 此脚本会在 k8s 组件运行后执行, 需要用户保证脚本的可重入及重试逻辑, 脚本及其生成的日志文件可在节点的 /data/ccs_userscript/ 路径查看



1410
1411
1412
# File 'lib/v20190103/models.rb', line 1410

def Taints
  @Taints
end

#UserScriptObject

Parameters:

  • 节点Label数组

  • 节点污点

  • base64 编码的用户脚本,在初始化节点之前执行

  • base64 编码的用户脚本, 此脚本会在 k8s 组件运行后执行, 需要用户保证脚本的可重入及重试逻辑, 脚本及其生成的日志文件可在节点的 /data/ccs_userscript/ 路径查看



1410
1411
1412
# File 'lib/v20190103/models.rb', line 1410

def UserScript
  @UserScript
end

Instance Method Details

#deserialize(params) ⇒ Object



1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
# File 'lib/v20190103/models.rb', line 1419

def deserialize(params)
  unless params['Labels'].nil?
    @Labels = []
    params['Labels'].each do |i|
      tkelabel_tmp = TkeLabel.new
      tkelabel_tmp.deserialize(i)
      @Labels << tkelabel_tmp
    end
  end
  unless params['Taints'].nil?
    @Taints = []
    params['Taints'].each do |i|
      taint_tmp = Taint.new
      taint_tmp.deserialize(i)
      @Taints << taint_tmp
    end
  end
  @PreStartUserScript = params['PreStartUserScript']
  @UserScript = params['UserScript']
end