public static final class CreateAlarmRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
CreateAlarmRequest.Builder |
alarmActions(List<String> alarmActions)
The list of unique identifiers of the scaling rules that are associated with the event-triggered task.
|
CreateAlarmRequest |
build() |
CreateAlarmRequest.Builder |
comparisonOperator(String comparisonOperator)
The operator that is used to compare the metric value and the threshold.
|
CreateAlarmRequest.Builder |
description(String description)
The description of the event-triggered task.
|
CreateAlarmRequest.Builder |
dimensions(List<CreateAlarmRequest.Dimensions> dimensions)
The metric dimensions.
|
CreateAlarmRequest.Builder |
effective(String effective)
The effective period of the event-triggered task.
|
CreateAlarmRequest.Builder |
evaluationCount(Integer evaluationCount)
The number of times that the threshold must be reached before a scaling rule can be executed.
|
CreateAlarmRequest.Builder |
expressions(List<CreateAlarmRequest.Expressions> expressions)
The information about the multi-metric alert rules.
|
CreateAlarmRequest.Builder |
expressionsLogicOperator(String expressionsLogicOperator)
The relationship between the trigger conditions in the multi-metric alert rule.
|
CreateAlarmRequest.Builder |
groupId(Integer groupId)
The ID of the application group to which the custom metric belongs.
|
CreateAlarmRequest.Builder |
metricName(String metricName)
The metric name.
|
CreateAlarmRequest.Builder |
metricType(String metricType)
The type of the metric.
|
CreateAlarmRequest.Builder |
name(String name)
The name of the event-triggered task.
|
CreateAlarmRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateAlarmRequest.Builder |
period(Integer period)
The statistical period of the metric data.
|
CreateAlarmRequest.Builder |
regionId(String regionId)
The region ID of the scaling group.
|
CreateAlarmRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
CreateAlarmRequest.Builder |
scalingGroupId(String scalingGroupId)
The scaling group ID of the event-triggered task.
|
CreateAlarmRequest.Builder |
statistics(String statistics)
The method that is used to aggregate statistics for the metric.
|
CreateAlarmRequest.Builder |
threshold(Float threshold)
The threshold of the metric value.
|
public CreateAlarmRequest.Builder alarmActions(List<String> alarmActions)
public CreateAlarmRequest.Builder comparisonOperator(String comparisonOperator)
* If the metric value is greater than or equal to the threshold, set the value to: >=. * If the metric value is less than or equal to the threshold, set the value to: <=. * If the metric value is greater than the threshold, set the value to: >. * If the metric value is less than the threshold, set the value to: <. Default value: >=.
public CreateAlarmRequest.Builder description(String description)
public CreateAlarmRequest.Builder dimensions(List<CreateAlarmRequest.Dimensions> dimensions)
public CreateAlarmRequest.Builder effective(String effective)
This parameter follows the cron expression format. The default format is `X X X X X ?`. In the format: * X: a placeholder for a field, which represents seconds, minutes, hours, days, and months in sequence. X can be a definite value or a special character that has logical meaning. For information about the valid values of X, see [Cron expression](~~25907~~). * ?: No value is specified. > By default, this parameter value is specified in **UTC+8**. You can specify the time zone in the `TZ=+yy` format before a cron expression. y indicates the time zone. For example, `TZ=+00 * * 1-2 * * ?` specifies that the event-triggered task is in effect between 01:00 and 02:59 (UTC+0) every day. Sample values: * ` * * * * * ? `: The event-triggered task is in effect all the time. * ` * * 17-18 * * ? `: The event-triggered task is in effect between 17:00 and 18:59 (UTC+8) every day. * `TZ=+00 * * 1-2 * * ?`: The event-triggered task is in effect between 01:00 and 02:59 (UTC+0) every day.
public CreateAlarmRequest.Builder evaluationCount(Integer evaluationCount)
Default value: 3.
public CreateAlarmRequest.Builder expressions(List<CreateAlarmRequest.Expressions> expressions)
public CreateAlarmRequest.Builder expressionsLogicOperator(String expressionsLogicOperator)
* `&&`: An alert is triggered only if all metrics in the multi-metric alert rule meet the trigger conditions. In this case, an alert is triggered only if the results of all trigger conditions that are specified in the multi-metric alert rule are `true`. * `||`: An alert is triggered if one of the metrics in the multi-metric alert rule meets the trigger conditions. Default value: `&&`.
public CreateAlarmRequest.Builder groupId(Integer groupId)
public CreateAlarmRequest.Builder metricName(String metricName)
* If you set MetricType to custom, the valid values are the metrics that you have. * If you set MetricType to system, this parameter has the following valid values: * CpuUtilization: the CPU utilization. Unit: %. * ConcurrentConnections: the number of concurrent connections. * IntranetTx: the outbound traffic over an internal network. Unit: KB/min. * IntranetRx: the inbound traffic over an internal network. Unit: KB/min. * VpcInternetTx: the outbound traffic over a virtual private cloud (VPC). Unit: KB/min. * VpcInternetRx: the inbound traffic over a VPC. Unit: KB/min. * SystemDiskReadBps: the number of bytes read from the system disk per second. * SystemDiskWriteBps: the number of bytes written to the system disk per second. * SystemDiskReadOps: the read IOPS of the system disk. Unit: counts/s. * SystemDiskWriteOps: the write IOPS of the system disk. Unit: counts/s. * CpuUtilizationAgent: the CPU utilization. Unit: %. * GpuUtilizationAgent: the GPU utilization. Unit: %. * GpuMemoryFreeUtilizationAgent: the idle GPU memory usage. Unit: %. * GpuMemoryUtilizationAgent: the GPU memory usage. Unit: %. * MemoryUtilization: the memory usage. Unit: %. * LoadAverage: the average system load. * TcpConnection: the total number of TCP connections. * TcpConnection: the number of established TCP connections. * PackagesNetOut: the number of packets sent by the internal network interface controller (NIC). Unit: counts/s. * PackagesNetIn: the number of packets received by the internal NIC. Unit: counts/s. * PackagesNetOut: the number of packets sent by the public NIC. Unit: counts/s. * PackagesNetIn: the number of packets received by the public NIC. Unit: counts/s. * EciPodCpuUtilization: the CPU utilization. Unit: %. * EciPodMemoryUtilization: the memory usage. Unit: %. * LoadBalancerRealServerAverageQps: the queries per second (QPS) of an instance. For more information, see [Event-triggered tasks of the system monitoring type](~~74854~~).
public CreateAlarmRequest.Builder metricType(String metricType)
* system: system metrics of CloudMonitor * custom: custom metrics that are reported to CloudMonitor
public CreateAlarmRequest.Builder name(String name)
public CreateAlarmRequest.Builder ownerId(Long ownerId)
public CreateAlarmRequest.Builder period(Integer period)
* 15 * 60 * 120 * 300 * 900 > You can set this parameter to 15 seconds only for scaling groups of the ECS type. Default value: 300.
public CreateAlarmRequest.Builder regionId(String regionId)
public CreateAlarmRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateAlarmRequest.Builder scalingGroupId(String scalingGroupId)
public CreateAlarmRequest.Builder statistics(String statistics)
* Average * Minimum * Maximum Default value: Average.
public CreateAlarmRequest.Builder threshold(Float threshold)
public CreateAlarmRequest build()
Copyright © 2024. All rights reserved.