Class: TencentCloud::Gse::V20191112::PutScalingPolicyRequest

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

Overview

PutScalingPolicy请求参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fleetid = nil, name = nil, scalingadjustment = nil, scalingadjustmenttype = nil, threshold = nil, comparisonoperator = nil, evaluationperiods = nil, metricname = nil, policytype = nil, targetconfiguration = nil) ⇒ PutScalingPolicyRequest

Returns a new instance of PutScalingPolicyRequest.



4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
# File 'lib/v20191112/models.rb', line 4592

def initialize(fleetid=nil, name=nil, scalingadjustment=nil, scalingadjustmenttype=nil, threshold=nil, comparisonoperator=nil, evaluationperiods=nil, metricname=nil, policytype=nil, targetconfiguration=nil)
  @FleetId = fleetid
  @Name = name
  @ScalingAdjustment = scalingadjustment
  @ScalingAdjustmentType = scalingadjustmenttype
  @Threshold = threshold
  @ComparisonOperator = comparisonoperator
  @EvaluationPeriods = evaluationperiods
  @MetricName = metricname
  @PolicyType = policytype
  @TargetConfiguration = targetconfiguration
end

Instance Attribute Details

#ComparisonOperatorObject

ScalingAdjustmentType取值ChangeInCapacity或ExactCapacity时,最小值要缩容的最多CVM个数,最大值为实际最大的CVM个数限额MetricName取值(AvailableGameServerSessions,AvailableCustomCount,PercentAvailableCustomCount,ActiveInstances,IdleInstances,CurrentPlayerSessions和PercentIdleInstances);PolicyType取值TargetBased时,MetricName取值PercentAvailableGameSessions

Parameters:

  • FleetId:

    扩缩容配置服务器舰队ID

  • Name:

    扩缩容策略名称,最小长度为1,最大长度为1024

  • ScalingAdjustment:

    扩缩容调整值,ScalingAdjustmentType取值PercentChangeInCapacity时,取值范围-99~99

  • ScalingAdjustmentType:

    扩缩容调整类型,取值(ChangeInCapacity,ExactCapacity,PercentChangeInCapacity)

  • Threshold:

    扩缩容指标阈值

  • ComparisonOperator:

    扩缩容策略比较符,取值:>,>=,<,<=

  • EvaluationPeriods:

    单个策略持续时间长度(分钟)

  • MetricName:

    扩缩容参与计算的指标名称,PolicyType取值RuleBased,

  • PolicyType:

    策略类型,取值:TargetBased表示基于目标的策略;RuleBased表示基于规则的策略

  • TargetConfiguration:

    扩缩容目标值配置,只有TargetBased类型的策略生效



4590
4591
4592
# File 'lib/v20191112/models.rb', line 4590

def ComparisonOperator
  @ComparisonOperator
end

#EvaluationPeriodsObject

ScalingAdjustmentType取值ChangeInCapacity或ExactCapacity时,最小值要缩容的最多CVM个数,最大值为实际最大的CVM个数限额MetricName取值(AvailableGameServerSessions,AvailableCustomCount,PercentAvailableCustomCount,ActiveInstances,IdleInstances,CurrentPlayerSessions和PercentIdleInstances);PolicyType取值TargetBased时,MetricName取值PercentAvailableGameSessions

Parameters:

  • FleetId:

    扩缩容配置服务器舰队ID

  • Name:

    扩缩容策略名称,最小长度为1,最大长度为1024

  • ScalingAdjustment:

    扩缩容调整值,ScalingAdjustmentType取值PercentChangeInCapacity时,取值范围-99~99

  • ScalingAdjustmentType:

    扩缩容调整类型,取值(ChangeInCapacity,ExactCapacity,PercentChangeInCapacity)

  • Threshold:

    扩缩容指标阈值

  • ComparisonOperator:

    扩缩容策略比较符,取值:>,>=,<,<=

  • EvaluationPeriods:

    单个策略持续时间长度(分钟)

  • MetricName:

    扩缩容参与计算的指标名称,PolicyType取值RuleBased,

  • PolicyType:

    策略类型,取值:TargetBased表示基于目标的策略;RuleBased表示基于规则的策略

  • TargetConfiguration:

    扩缩容目标值配置,只有TargetBased类型的策略生效



4590
4591
4592
# File 'lib/v20191112/models.rb', line 4590

def EvaluationPeriods
  @EvaluationPeriods
end

#FleetIdObject

ScalingAdjustmentType取值ChangeInCapacity或ExactCapacity时,最小值要缩容的最多CVM个数,最大值为实际最大的CVM个数限额MetricName取值(AvailableGameServerSessions,AvailableCustomCount,PercentAvailableCustomCount,ActiveInstances,IdleInstances,CurrentPlayerSessions和PercentIdleInstances);PolicyType取值TargetBased时,MetricName取值PercentAvailableGameSessions

Parameters:

  • FleetId:

    扩缩容配置服务器舰队ID

  • Name:

    扩缩容策略名称,最小长度为1,最大长度为1024

  • ScalingAdjustment:

    扩缩容调整值,ScalingAdjustmentType取值PercentChangeInCapacity时,取值范围-99~99

  • ScalingAdjustmentType:

    扩缩容调整类型,取值(ChangeInCapacity,ExactCapacity,PercentChangeInCapacity)

  • Threshold:

    扩缩容指标阈值

  • ComparisonOperator:

    扩缩容策略比较符,取值:>,>=,<,<=

  • EvaluationPeriods:

    单个策略持续时间长度(分钟)

  • MetricName:

    扩缩容参与计算的指标名称,PolicyType取值RuleBased,

  • PolicyType:

    策略类型,取值:TargetBased表示基于目标的策略;RuleBased表示基于规则的策略

  • TargetConfiguration:

    扩缩容目标值配置,只有TargetBased类型的策略生效



4590
4591
4592
# File 'lib/v20191112/models.rb', line 4590

def FleetId
  @FleetId
end

#MetricNameObject

ScalingAdjustmentType取值ChangeInCapacity或ExactCapacity时,最小值要缩容的最多CVM个数,最大值为实际最大的CVM个数限额MetricName取值(AvailableGameServerSessions,AvailableCustomCount,PercentAvailableCustomCount,ActiveInstances,IdleInstances,CurrentPlayerSessions和PercentIdleInstances);PolicyType取值TargetBased时,MetricName取值PercentAvailableGameSessions

Parameters:

  • FleetId:

    扩缩容配置服务器舰队ID

  • Name:

    扩缩容策略名称,最小长度为1,最大长度为1024

  • ScalingAdjustment:

    扩缩容调整值,ScalingAdjustmentType取值PercentChangeInCapacity时,取值范围-99~99

  • ScalingAdjustmentType:

    扩缩容调整类型,取值(ChangeInCapacity,ExactCapacity,PercentChangeInCapacity)

  • Threshold:

    扩缩容指标阈值

  • ComparisonOperator:

    扩缩容策略比较符,取值:>,>=,<,<=

  • EvaluationPeriods:

    单个策略持续时间长度(分钟)

  • MetricName:

    扩缩容参与计算的指标名称,PolicyType取值RuleBased,

  • PolicyType:

    策略类型,取值:TargetBased表示基于目标的策略;RuleBased表示基于规则的策略

  • TargetConfiguration:

    扩缩容目标值配置,只有TargetBased类型的策略生效



4590
4591
4592
# File 'lib/v20191112/models.rb', line 4590

def MetricName
  @MetricName
end

#NameObject

ScalingAdjustmentType取值ChangeInCapacity或ExactCapacity时,最小值要缩容的最多CVM个数,最大值为实际最大的CVM个数限额MetricName取值(AvailableGameServerSessions,AvailableCustomCount,PercentAvailableCustomCount,ActiveInstances,IdleInstances,CurrentPlayerSessions和PercentIdleInstances);PolicyType取值TargetBased时,MetricName取值PercentAvailableGameSessions

Parameters:

  • FleetId:

    扩缩容配置服务器舰队ID

  • Name:

    扩缩容策略名称,最小长度为1,最大长度为1024

  • ScalingAdjustment:

    扩缩容调整值,ScalingAdjustmentType取值PercentChangeInCapacity时,取值范围-99~99

  • ScalingAdjustmentType:

    扩缩容调整类型,取值(ChangeInCapacity,ExactCapacity,PercentChangeInCapacity)

  • Threshold:

    扩缩容指标阈值

  • ComparisonOperator:

    扩缩容策略比较符,取值:>,>=,<,<=

  • EvaluationPeriods:

    单个策略持续时间长度(分钟)

  • MetricName:

    扩缩容参与计算的指标名称,PolicyType取值RuleBased,

  • PolicyType:

    策略类型,取值:TargetBased表示基于目标的策略;RuleBased表示基于规则的策略

  • TargetConfiguration:

    扩缩容目标值配置,只有TargetBased类型的策略生效



4590
4591
4592
# File 'lib/v20191112/models.rb', line 4590

def Name
  @Name
end

#PolicyTypeObject

ScalingAdjustmentType取值ChangeInCapacity或ExactCapacity时,最小值要缩容的最多CVM个数,最大值为实际最大的CVM个数限额MetricName取值(AvailableGameServerSessions,AvailableCustomCount,PercentAvailableCustomCount,ActiveInstances,IdleInstances,CurrentPlayerSessions和PercentIdleInstances);PolicyType取值TargetBased时,MetricName取值PercentAvailableGameSessions

Parameters:

  • FleetId:

    扩缩容配置服务器舰队ID

  • Name:

    扩缩容策略名称,最小长度为1,最大长度为1024

  • ScalingAdjustment:

    扩缩容调整值,ScalingAdjustmentType取值PercentChangeInCapacity时,取值范围-99~99

  • ScalingAdjustmentType:

    扩缩容调整类型,取值(ChangeInCapacity,ExactCapacity,PercentChangeInCapacity)

  • Threshold:

    扩缩容指标阈值

  • ComparisonOperator:

    扩缩容策略比较符,取值:>,>=,<,<=

  • EvaluationPeriods:

    单个策略持续时间长度(分钟)

  • MetricName:

    扩缩容参与计算的指标名称,PolicyType取值RuleBased,

  • PolicyType:

    策略类型,取值:TargetBased表示基于目标的策略;RuleBased表示基于规则的策略

  • TargetConfiguration:

    扩缩容目标值配置,只有TargetBased类型的策略生效



4590
4591
4592
# File 'lib/v20191112/models.rb', line 4590

def PolicyType
  @PolicyType
end

#ScalingAdjustmentObject

ScalingAdjustmentType取值ChangeInCapacity或ExactCapacity时,最小值要缩容的最多CVM个数,最大值为实际最大的CVM个数限额MetricName取值(AvailableGameServerSessions,AvailableCustomCount,PercentAvailableCustomCount,ActiveInstances,IdleInstances,CurrentPlayerSessions和PercentIdleInstances);PolicyType取值TargetBased时,MetricName取值PercentAvailableGameSessions

Parameters:

  • FleetId:

    扩缩容配置服务器舰队ID

  • Name:

    扩缩容策略名称,最小长度为1,最大长度为1024

  • ScalingAdjustment:

    扩缩容调整值,ScalingAdjustmentType取值PercentChangeInCapacity时,取值范围-99~99

  • ScalingAdjustmentType:

    扩缩容调整类型,取值(ChangeInCapacity,ExactCapacity,PercentChangeInCapacity)

  • Threshold:

    扩缩容指标阈值

  • ComparisonOperator:

    扩缩容策略比较符,取值:>,>=,<,<=

  • EvaluationPeriods:

    单个策略持续时间长度(分钟)

  • MetricName:

    扩缩容参与计算的指标名称,PolicyType取值RuleBased,

  • PolicyType:

    策略类型,取值:TargetBased表示基于目标的策略;RuleBased表示基于规则的策略

  • TargetConfiguration:

    扩缩容目标值配置,只有TargetBased类型的策略生效



4590
4591
4592
# File 'lib/v20191112/models.rb', line 4590

def ScalingAdjustment
  @ScalingAdjustment
end

#ScalingAdjustmentTypeObject

ScalingAdjustmentType取值ChangeInCapacity或ExactCapacity时,最小值要缩容的最多CVM个数,最大值为实际最大的CVM个数限额MetricName取值(AvailableGameServerSessions,AvailableCustomCount,PercentAvailableCustomCount,ActiveInstances,IdleInstances,CurrentPlayerSessions和PercentIdleInstances);PolicyType取值TargetBased时,MetricName取值PercentAvailableGameSessions

Parameters:

  • FleetId:

    扩缩容配置服务器舰队ID

  • Name:

    扩缩容策略名称,最小长度为1,最大长度为1024

  • ScalingAdjustment:

    扩缩容调整值,ScalingAdjustmentType取值PercentChangeInCapacity时,取值范围-99~99

  • ScalingAdjustmentType:

    扩缩容调整类型,取值(ChangeInCapacity,ExactCapacity,PercentChangeInCapacity)

  • Threshold:

    扩缩容指标阈值

  • ComparisonOperator:

    扩缩容策略比较符,取值:>,>=,<,<=

  • EvaluationPeriods:

    单个策略持续时间长度(分钟)

  • MetricName:

    扩缩容参与计算的指标名称,PolicyType取值RuleBased,

  • PolicyType:

    策略类型,取值:TargetBased表示基于目标的策略;RuleBased表示基于规则的策略

  • TargetConfiguration:

    扩缩容目标值配置,只有TargetBased类型的策略生效



4590
4591
4592
# File 'lib/v20191112/models.rb', line 4590

def ScalingAdjustmentType
  @ScalingAdjustmentType
end

#TargetConfigurationObject

ScalingAdjustmentType取值ChangeInCapacity或ExactCapacity时,最小值要缩容的最多CVM个数,最大值为实际最大的CVM个数限额MetricName取值(AvailableGameServerSessions,AvailableCustomCount,PercentAvailableCustomCount,ActiveInstances,IdleInstances,CurrentPlayerSessions和PercentIdleInstances);PolicyType取值TargetBased时,MetricName取值PercentAvailableGameSessions

Parameters:

  • FleetId:

    扩缩容配置服务器舰队ID

  • Name:

    扩缩容策略名称,最小长度为1,最大长度为1024

  • ScalingAdjustment:

    扩缩容调整值,ScalingAdjustmentType取值PercentChangeInCapacity时,取值范围-99~99

  • ScalingAdjustmentType:

    扩缩容调整类型,取值(ChangeInCapacity,ExactCapacity,PercentChangeInCapacity)

  • Threshold:

    扩缩容指标阈值

  • ComparisonOperator:

    扩缩容策略比较符,取值:>,>=,<,<=

  • EvaluationPeriods:

    单个策略持续时间长度(分钟)

  • MetricName:

    扩缩容参与计算的指标名称,PolicyType取值RuleBased,

  • PolicyType:

    策略类型,取值:TargetBased表示基于目标的策略;RuleBased表示基于规则的策略

  • TargetConfiguration:

    扩缩容目标值配置,只有TargetBased类型的策略生效



4590
4591
4592
# File 'lib/v20191112/models.rb', line 4590

def TargetConfiguration
  @TargetConfiguration
end

#ThresholdObject

ScalingAdjustmentType取值ChangeInCapacity或ExactCapacity时,最小值要缩容的最多CVM个数,最大值为实际最大的CVM个数限额MetricName取值(AvailableGameServerSessions,AvailableCustomCount,PercentAvailableCustomCount,ActiveInstances,IdleInstances,CurrentPlayerSessions和PercentIdleInstances);PolicyType取值TargetBased时,MetricName取值PercentAvailableGameSessions

Parameters:

  • FleetId:

    扩缩容配置服务器舰队ID

  • Name:

    扩缩容策略名称,最小长度为1,最大长度为1024

  • ScalingAdjustment:

    扩缩容调整值,ScalingAdjustmentType取值PercentChangeInCapacity时,取值范围-99~99

  • ScalingAdjustmentType:

    扩缩容调整类型,取值(ChangeInCapacity,ExactCapacity,PercentChangeInCapacity)

  • Threshold:

    扩缩容指标阈值

  • ComparisonOperator:

    扩缩容策略比较符,取值:>,>=,<,<=

  • EvaluationPeriods:

    单个策略持续时间长度(分钟)

  • MetricName:

    扩缩容参与计算的指标名称,PolicyType取值RuleBased,

  • PolicyType:

    策略类型,取值:TargetBased表示基于目标的策略;RuleBased表示基于规则的策略

  • TargetConfiguration:

    扩缩容目标值配置,只有TargetBased类型的策略生效



4590
4591
4592
# File 'lib/v20191112/models.rb', line 4590

def Threshold
  @Threshold
end

Instance Method Details

#deserialize(params) ⇒ Object



4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
# File 'lib/v20191112/models.rb', line 4605

def deserialize(params)
  @FleetId = params['FleetId']
  @Name = params['Name']
  @ScalingAdjustment = params['ScalingAdjustment']
  @ScalingAdjustmentType = params['ScalingAdjustmentType']
  @Threshold = params['Threshold']
  @ComparisonOperator = params['ComparisonOperator']
  @EvaluationPeriods = params['EvaluationPeriods']
  @MetricName = params['MetricName']
  @PolicyType = params['PolicyType']
  unless params['TargetConfiguration'].nil?
    @TargetConfiguration = TargetConfiguration.new
    @TargetConfiguration.deserialize(params['TargetConfiguration'])
  end
end