All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tencentcloudapi.as.v20180419.models.CreateScalingPolicyRequest Maven / Gradle / Ivy

/*
 * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.tencentcloudapi.as.v20180419.models;

import com.tencentcloudapi.common.AbstractModel;
import com.tencentcloudapi.common.SSEResponseModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;

public class CreateScalingPolicyRequest extends AbstractModel {

    /**
    * Auto scaling group ID.
    */
    @SerializedName("AutoScalingGroupId")
    @Expose
    private String AutoScalingGroupId;

    /**
    * Alarm trigger policy name.
    */
    @SerializedName("ScalingPolicyName")
    @Expose
    private String ScalingPolicyName;

    /**
    * Scaling policy type. Valid values: 
  • `SIMPLE` (default): A simple policy
  • `TARGET_TRACKING`: A target tracking policy
  • . */ @SerializedName("ScalingPolicyType") @Expose private String ScalingPolicyType; /** * The method to adjust the desired capacity after the alarm is triggered. It’s only available when `ScalingPolicyType` is `Simple`. Valid values:
  • `CHANGE_IN_CAPACITY`: Increase or decrease the desired capacity
  • `EXACT_CAPACITY`: Adjust to the specified desired capacity
  • `PERCENT_CHANGE_IN_CAPACITY`: Adjust the desired capacity by percentage
  • */ @SerializedName("AdjustmentType") @Expose private String AdjustmentType; /** * Adjustment value for the expected number of instances after an alarm is triggered, which is applicable only to simple policies.
  • When AdjustmentType is set to CHANGE_IN_CAPACITY, a positive value of AdjustmentValue indicates an increase in the number of instances after the alarm is triggered, while a negative value indicates a decrease in the number of instances after the alarm is triggered.
  • When AdjustmentType is set to EXACT_CAPACITY, the value of AdjustmentValue indicates the new desired number of instances after the alarm is triggered. It should be greater than or equal to 0.
  • When AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, a positive value of AdjustmentValue indicates an increase in the number of instances by a percentage after the alarm is triggered, while a negative value indicates a decrease in the number of instances by a percentage after the alarm is triggered. Unit: %.
  • */ @SerializedName("AdjustmentValue") @Expose private Long AdjustmentValue; /** * Cooldown period (in seconds). This parameter is only applicable to a simple policy. Default value: 300. */ @SerializedName("Cooldown") @Expose private Long Cooldown; /** * Alarm monitoring metric. It’s only available when `ScalingPolicyType` is `Simple`. */ @SerializedName("MetricAlarm") @Expose private MetricAlarm MetricAlarm; /** * Predefined monitoring item, which is applicable only to target tracking policies. Valid values:
  • ASG_AVG_CPU_UTILIZATION: average CPU utilization.
  • ASG_AVG_LAN_TRAFFIC_OUT: average outbound private network bandwidth.
  • ASG_AVG_LAN_TRAFFIC_IN: average inbound private network bandwidth.
  • ASG_AVG_WAN_TRAFFIC_OUT: average outbound public network bandwidth.
  • ASG_AVG_WAN_TRAFFIC_IN: average inbound public network bandwidth.
  • */ @SerializedName("PredefinedMetricType") @Expose private String PredefinedMetricType; /** * Target value, which is applicable only to target tracking policies.
  • ASG_AVG_CPU_UTILIZATION: value range: [1, 100); unit: %.
  • ASG_AVG_LAN_TRAFFIC_OUT: value range: > 0; unit: Mbps.
  • ASG_AVG_LAN_TRAFFIC_IN: value range: > 0; unit: Mbps.
  • ASG_AVG_WAN_TRAFFIC_OUT: value range: > 0; unit: Mbps.
  • ASG_AVG_WAN_TRAFFIC_IN: value range: > 0; unit: Mbps.
  • */ @SerializedName("TargetValue") @Expose private Long TargetValue; /** * Instance warm-up period (in seconds). It’s only available when `ScalingPolicyType` is `TARGET_TRACKING`. Value range: 0-3600. Default value: 300. */ @SerializedName("EstimatedInstanceWarmup") @Expose private Long EstimatedInstanceWarmup; /** * Whether to disable scale-in, which is applicable only to target tracking policies. Default value: false. Valid values:
  • true: Target tracking policies trigger only scale-out.
  • false: Target tracking policies trigger both scale-out and scale-in.
  • */ @SerializedName("DisableScaleIn") @Expose private Boolean DisableScaleIn; /** * This parameter is diused. Please use [CreateNotificationConfiguration](https://intl.cloud.tencent.com/document/api/377/33185?from_cn_redirect=1) instead. Notification group ID, which is the set of user group IDs. */ @SerializedName("NotificationUserGroupIds") @Expose private String [] NotificationUserGroupIds; /** * Get Auto scaling group ID. * @return AutoScalingGroupId Auto scaling group ID. */ public String getAutoScalingGroupId() { return this.AutoScalingGroupId; } /** * Set Auto scaling group ID. * @param AutoScalingGroupId Auto scaling group ID. */ public void setAutoScalingGroupId(String AutoScalingGroupId) { this.AutoScalingGroupId = AutoScalingGroupId; } /** * Get Alarm trigger policy name. * @return ScalingPolicyName Alarm trigger policy name. */ public String getScalingPolicyName() { return this.ScalingPolicyName; } /** * Set Alarm trigger policy name. * @param ScalingPolicyName Alarm trigger policy name. */ public void setScalingPolicyName(String ScalingPolicyName) { this.ScalingPolicyName = ScalingPolicyName; } /** * Get Scaling policy type. Valid values:
  • `SIMPLE` (default): A simple policy
  • `TARGET_TRACKING`: A target tracking policy
  • . * @return ScalingPolicyType Scaling policy type. Valid values:
  • `SIMPLE` (default): A simple policy
  • `TARGET_TRACKING`: A target tracking policy
  • . */ public String getScalingPolicyType() { return this.ScalingPolicyType; } /** * Set Scaling policy type. Valid values:
  • `SIMPLE` (default): A simple policy
  • `TARGET_TRACKING`: A target tracking policy
  • . * @param ScalingPolicyType Scaling policy type. Valid values:
  • `SIMPLE` (default): A simple policy
  • `TARGET_TRACKING`: A target tracking policy
  • . */ public void setScalingPolicyType(String ScalingPolicyType) { this.ScalingPolicyType = ScalingPolicyType; } /** * Get The method to adjust the desired capacity after the alarm is triggered. It’s only available when `ScalingPolicyType` is `Simple`. Valid values:
  • `CHANGE_IN_CAPACITY`: Increase or decrease the desired capacity
  • `EXACT_CAPACITY`: Adjust to the specified desired capacity
  • `PERCENT_CHANGE_IN_CAPACITY`: Adjust the desired capacity by percentage
  • * @return AdjustmentType The method to adjust the desired capacity after the alarm is triggered. It’s only available when `ScalingPolicyType` is `Simple`. Valid values:
  • `CHANGE_IN_CAPACITY`: Increase or decrease the desired capacity
  • `EXACT_CAPACITY`: Adjust to the specified desired capacity
  • `PERCENT_CHANGE_IN_CAPACITY`: Adjust the desired capacity by percentage
  • */ public String getAdjustmentType() { return this.AdjustmentType; } /** * Set The method to adjust the desired capacity after the alarm is triggered. It’s only available when `ScalingPolicyType` is `Simple`. Valid values:
  • `CHANGE_IN_CAPACITY`: Increase or decrease the desired capacity
  • `EXACT_CAPACITY`: Adjust to the specified desired capacity
  • `PERCENT_CHANGE_IN_CAPACITY`: Adjust the desired capacity by percentage
  • * @param AdjustmentType The method to adjust the desired capacity after the alarm is triggered. It’s only available when `ScalingPolicyType` is `Simple`. Valid values:
  • `CHANGE_IN_CAPACITY`: Increase or decrease the desired capacity
  • `EXACT_CAPACITY`: Adjust to the specified desired capacity
  • `PERCENT_CHANGE_IN_CAPACITY`: Adjust the desired capacity by percentage
  • */ public void setAdjustmentType(String AdjustmentType) { this.AdjustmentType = AdjustmentType; } /** * Get Adjustment value for the expected number of instances after an alarm is triggered, which is applicable only to simple policies.
  • When AdjustmentType is set to CHANGE_IN_CAPACITY, a positive value of AdjustmentValue indicates an increase in the number of instances after the alarm is triggered, while a negative value indicates a decrease in the number of instances after the alarm is triggered.
  • When AdjustmentType is set to EXACT_CAPACITY, the value of AdjustmentValue indicates the new desired number of instances after the alarm is triggered. It should be greater than or equal to 0.
  • When AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, a positive value of AdjustmentValue indicates an increase in the number of instances by a percentage after the alarm is triggered, while a negative value indicates a decrease in the number of instances by a percentage after the alarm is triggered. Unit: %.
  • * @return AdjustmentValue Adjustment value for the expected number of instances after an alarm is triggered, which is applicable only to simple policies.
  • When AdjustmentType is set to CHANGE_IN_CAPACITY, a positive value of AdjustmentValue indicates an increase in the number of instances after the alarm is triggered, while a negative value indicates a decrease in the number of instances after the alarm is triggered.
  • When AdjustmentType is set to EXACT_CAPACITY, the value of AdjustmentValue indicates the new desired number of instances after the alarm is triggered. It should be greater than or equal to 0.
  • When AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, a positive value of AdjustmentValue indicates an increase in the number of instances by a percentage after the alarm is triggered, while a negative value indicates a decrease in the number of instances by a percentage after the alarm is triggered. Unit: %.
  • */ public Long getAdjustmentValue() { return this.AdjustmentValue; } /** * Set Adjustment value for the expected number of instances after an alarm is triggered, which is applicable only to simple policies.
  • When AdjustmentType is set to CHANGE_IN_CAPACITY, a positive value of AdjustmentValue indicates an increase in the number of instances after the alarm is triggered, while a negative value indicates a decrease in the number of instances after the alarm is triggered.
  • When AdjustmentType is set to EXACT_CAPACITY, the value of AdjustmentValue indicates the new desired number of instances after the alarm is triggered. It should be greater than or equal to 0.
  • When AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, a positive value of AdjustmentValue indicates an increase in the number of instances by a percentage after the alarm is triggered, while a negative value indicates a decrease in the number of instances by a percentage after the alarm is triggered. Unit: %.
  • * @param AdjustmentValue Adjustment value for the expected number of instances after an alarm is triggered, which is applicable only to simple policies.
  • When AdjustmentType is set to CHANGE_IN_CAPACITY, a positive value of AdjustmentValue indicates an increase in the number of instances after the alarm is triggered, while a negative value indicates a decrease in the number of instances after the alarm is triggered.
  • When AdjustmentType is set to EXACT_CAPACITY, the value of AdjustmentValue indicates the new desired number of instances after the alarm is triggered. It should be greater than or equal to 0.
  • When AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, a positive value of AdjustmentValue indicates an increase in the number of instances by a percentage after the alarm is triggered, while a negative value indicates a decrease in the number of instances by a percentage after the alarm is triggered. Unit: %.
  • */ public void setAdjustmentValue(Long AdjustmentValue) { this.AdjustmentValue = AdjustmentValue; } /** * Get Cooldown period (in seconds). This parameter is only applicable to a simple policy. Default value: 300. * @return Cooldown Cooldown period (in seconds). This parameter is only applicable to a simple policy. Default value: 300. */ public Long getCooldown() { return this.Cooldown; } /** * Set Cooldown period (in seconds). This parameter is only applicable to a simple policy. Default value: 300. * @param Cooldown Cooldown period (in seconds). This parameter is only applicable to a simple policy. Default value: 300. */ public void setCooldown(Long Cooldown) { this.Cooldown = Cooldown; } /** * Get Alarm monitoring metric. It’s only available when `ScalingPolicyType` is `Simple`. * @return MetricAlarm Alarm monitoring metric. It’s only available when `ScalingPolicyType` is `Simple`. */ public MetricAlarm getMetricAlarm() { return this.MetricAlarm; } /** * Set Alarm monitoring metric. It’s only available when `ScalingPolicyType` is `Simple`. * @param MetricAlarm Alarm monitoring metric. It’s only available when `ScalingPolicyType` is `Simple`. */ public void setMetricAlarm(MetricAlarm MetricAlarm) { this.MetricAlarm = MetricAlarm; } /** * Get Predefined monitoring item, which is applicable only to target tracking policies. Valid values:
  • ASG_AVG_CPU_UTILIZATION: average CPU utilization.
  • ASG_AVG_LAN_TRAFFIC_OUT: average outbound private network bandwidth.
  • ASG_AVG_LAN_TRAFFIC_IN: average inbound private network bandwidth.
  • ASG_AVG_WAN_TRAFFIC_OUT: average outbound public network bandwidth.
  • ASG_AVG_WAN_TRAFFIC_IN: average inbound public network bandwidth.
  • * @return PredefinedMetricType Predefined monitoring item, which is applicable only to target tracking policies. Valid values:
  • ASG_AVG_CPU_UTILIZATION: average CPU utilization.
  • ASG_AVG_LAN_TRAFFIC_OUT: average outbound private network bandwidth.
  • ASG_AVG_LAN_TRAFFIC_IN: average inbound private network bandwidth.
  • ASG_AVG_WAN_TRAFFIC_OUT: average outbound public network bandwidth.
  • ASG_AVG_WAN_TRAFFIC_IN: average inbound public network bandwidth.
  • */ public String getPredefinedMetricType() { return this.PredefinedMetricType; } /** * Set Predefined monitoring item, which is applicable only to target tracking policies. Valid values:
  • ASG_AVG_CPU_UTILIZATION: average CPU utilization.
  • ASG_AVG_LAN_TRAFFIC_OUT: average outbound private network bandwidth.
  • ASG_AVG_LAN_TRAFFIC_IN: average inbound private network bandwidth.
  • ASG_AVG_WAN_TRAFFIC_OUT: average outbound public network bandwidth.
  • ASG_AVG_WAN_TRAFFIC_IN: average inbound public network bandwidth.
  • * @param PredefinedMetricType Predefined monitoring item, which is applicable only to target tracking policies. Valid values:
  • ASG_AVG_CPU_UTILIZATION: average CPU utilization.
  • ASG_AVG_LAN_TRAFFIC_OUT: average outbound private network bandwidth.
  • ASG_AVG_LAN_TRAFFIC_IN: average inbound private network bandwidth.
  • ASG_AVG_WAN_TRAFFIC_OUT: average outbound public network bandwidth.
  • ASG_AVG_WAN_TRAFFIC_IN: average inbound public network bandwidth.
  • */ public void setPredefinedMetricType(String PredefinedMetricType) { this.PredefinedMetricType = PredefinedMetricType; } /** * Get Target value, which is applicable only to target tracking policies.
  • ASG_AVG_CPU_UTILIZATION: value range: [1, 100); unit: %.
  • ASG_AVG_LAN_TRAFFIC_OUT: value range: > 0; unit: Mbps.
  • ASG_AVG_LAN_TRAFFIC_IN: value range: > 0; unit: Mbps.
  • ASG_AVG_WAN_TRAFFIC_OUT: value range: > 0; unit: Mbps.
  • ASG_AVG_WAN_TRAFFIC_IN: value range: > 0; unit: Mbps.
  • * @return TargetValue Target value, which is applicable only to target tracking policies.
  • ASG_AVG_CPU_UTILIZATION: value range: [1, 100); unit: %.
  • ASG_AVG_LAN_TRAFFIC_OUT: value range: > 0; unit: Mbps.
  • ASG_AVG_LAN_TRAFFIC_IN: value range: > 0; unit: Mbps.
  • ASG_AVG_WAN_TRAFFIC_OUT: value range: > 0; unit: Mbps.
  • ASG_AVG_WAN_TRAFFIC_IN: value range: > 0; unit: Mbps.
  • */ public Long getTargetValue() { return this.TargetValue; } /** * Set Target value, which is applicable only to target tracking policies.
  • ASG_AVG_CPU_UTILIZATION: value range: [1, 100); unit: %.
  • ASG_AVG_LAN_TRAFFIC_OUT: value range: > 0; unit: Mbps.
  • ASG_AVG_LAN_TRAFFIC_IN: value range: > 0; unit: Mbps.
  • ASG_AVG_WAN_TRAFFIC_OUT: value range: > 0; unit: Mbps.
  • ASG_AVG_WAN_TRAFFIC_IN: value range: > 0; unit: Mbps.
  • * @param TargetValue Target value, which is applicable only to target tracking policies.
  • ASG_AVG_CPU_UTILIZATION: value range: [1, 100); unit: %.
  • ASG_AVG_LAN_TRAFFIC_OUT: value range: > 0; unit: Mbps.
  • ASG_AVG_LAN_TRAFFIC_IN: value range: > 0; unit: Mbps.
  • ASG_AVG_WAN_TRAFFIC_OUT: value range: > 0; unit: Mbps.
  • ASG_AVG_WAN_TRAFFIC_IN: value range: > 0; unit: Mbps.
  • */ public void setTargetValue(Long TargetValue) { this.TargetValue = TargetValue; } /** * Get Instance warm-up period (in seconds). It’s only available when `ScalingPolicyType` is `TARGET_TRACKING`. Value range: 0-3600. Default value: 300. * @return EstimatedInstanceWarmup Instance warm-up period (in seconds). It’s only available when `ScalingPolicyType` is `TARGET_TRACKING`. Value range: 0-3600. Default value: 300. */ public Long getEstimatedInstanceWarmup() { return this.EstimatedInstanceWarmup; } /** * Set Instance warm-up period (in seconds). It’s only available when `ScalingPolicyType` is `TARGET_TRACKING`. Value range: 0-3600. Default value: 300. * @param EstimatedInstanceWarmup Instance warm-up period (in seconds). It’s only available when `ScalingPolicyType` is `TARGET_TRACKING`. Value range: 0-3600. Default value: 300. */ public void setEstimatedInstanceWarmup(Long EstimatedInstanceWarmup) { this.EstimatedInstanceWarmup = EstimatedInstanceWarmup; } /** * Get Whether to disable scale-in, which is applicable only to target tracking policies. Default value: false. Valid values:
  • true: Target tracking policies trigger only scale-out.
  • false: Target tracking policies trigger both scale-out and scale-in.
  • * @return DisableScaleIn Whether to disable scale-in, which is applicable only to target tracking policies. Default value: false. Valid values:
  • true: Target tracking policies trigger only scale-out.
  • false: Target tracking policies trigger both scale-out and scale-in.
  • */ public Boolean getDisableScaleIn() { return this.DisableScaleIn; } /** * Set Whether to disable scale-in, which is applicable only to target tracking policies. Default value: false. Valid values:
  • true: Target tracking policies trigger only scale-out.
  • false: Target tracking policies trigger both scale-out and scale-in.
  • * @param DisableScaleIn Whether to disable scale-in, which is applicable only to target tracking policies. Default value: false. Valid values:
  • true: Target tracking policies trigger only scale-out.
  • false: Target tracking policies trigger both scale-out and scale-in.
  • */ public void setDisableScaleIn(Boolean DisableScaleIn) { this.DisableScaleIn = DisableScaleIn; } /** * Get This parameter is diused. Please use [CreateNotificationConfiguration](https://intl.cloud.tencent.com/document/api/377/33185?from_cn_redirect=1) instead. Notification group ID, which is the set of user group IDs. * @return NotificationUserGroupIds This parameter is diused. Please use [CreateNotificationConfiguration](https://intl.cloud.tencent.com/document/api/377/33185?from_cn_redirect=1) instead. Notification group ID, which is the set of user group IDs. */ public String [] getNotificationUserGroupIds() { return this.NotificationUserGroupIds; } /** * Set This parameter is diused. Please use [CreateNotificationConfiguration](https://intl.cloud.tencent.com/document/api/377/33185?from_cn_redirect=1) instead. Notification group ID, which is the set of user group IDs. * @param NotificationUserGroupIds This parameter is diused. Please use [CreateNotificationConfiguration](https://intl.cloud.tencent.com/document/api/377/33185?from_cn_redirect=1) instead. Notification group ID, which is the set of user group IDs. */ public void setNotificationUserGroupIds(String [] NotificationUserGroupIds) { this.NotificationUserGroupIds = NotificationUserGroupIds; } public CreateScalingPolicyRequest() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public CreateScalingPolicyRequest(CreateScalingPolicyRequest source) { if (source.AutoScalingGroupId != null) { this.AutoScalingGroupId = new String(source.AutoScalingGroupId); } if (source.ScalingPolicyName != null) { this.ScalingPolicyName = new String(source.ScalingPolicyName); } if (source.ScalingPolicyType != null) { this.ScalingPolicyType = new String(source.ScalingPolicyType); } if (source.AdjustmentType != null) { this.AdjustmentType = new String(source.AdjustmentType); } if (source.AdjustmentValue != null) { this.AdjustmentValue = new Long(source.AdjustmentValue); } if (source.Cooldown != null) { this.Cooldown = new Long(source.Cooldown); } if (source.MetricAlarm != null) { this.MetricAlarm = new MetricAlarm(source.MetricAlarm); } if (source.PredefinedMetricType != null) { this.PredefinedMetricType = new String(source.PredefinedMetricType); } if (source.TargetValue != null) { this.TargetValue = new Long(source.TargetValue); } if (source.EstimatedInstanceWarmup != null) { this.EstimatedInstanceWarmup = new Long(source.EstimatedInstanceWarmup); } if (source.DisableScaleIn != null) { this.DisableScaleIn = new Boolean(source.DisableScaleIn); } if (source.NotificationUserGroupIds != null) { this.NotificationUserGroupIds = new String[source.NotificationUserGroupIds.length]; for (int i = 0; i < source.NotificationUserGroupIds.length; i++) { this.NotificationUserGroupIds[i] = new String(source.NotificationUserGroupIds[i]); } } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap map, String prefix) { this.setParamSimple(map, prefix + "AutoScalingGroupId", this.AutoScalingGroupId); this.setParamSimple(map, prefix + "ScalingPolicyName", this.ScalingPolicyName); this.setParamSimple(map, prefix + "ScalingPolicyType", this.ScalingPolicyType); this.setParamSimple(map, prefix + "AdjustmentType", this.AdjustmentType); this.setParamSimple(map, prefix + "AdjustmentValue", this.AdjustmentValue); this.setParamSimple(map, prefix + "Cooldown", this.Cooldown); this.setParamObj(map, prefix + "MetricAlarm.", this.MetricAlarm); this.setParamSimple(map, prefix + "PredefinedMetricType", this.PredefinedMetricType); this.setParamSimple(map, prefix + "TargetValue", this.TargetValue); this.setParamSimple(map, prefix + "EstimatedInstanceWarmup", this.EstimatedInstanceWarmup); this.setParamSimple(map, prefix + "DisableScaleIn", this.DisableScaleIn); this.setParamArraySimple(map, prefix + "NotificationUserGroupIds.", this.NotificationUserGroupIds); } }




    © 2015 - 2025 Weber Informatics LLC | Privacy Policy