Interface Alarm.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<Alarm.Builder,
,Alarm> SdkBuilder<Alarm.Builder,
,Alarm> SdkPojo
- Enclosing class:
Alarm
-
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the alarm.comparisonOperator
(String comparisonOperator) The arithmetic operation used when comparing the specified statistic and threshold.comparisonOperator
(ComparisonOperator comparisonOperator) The arithmetic operation used when comparing the specified statistic and threshold.contactProtocols
(Collection<ContactProtocol> contactProtocols) The contact protocols for the alarm, such asEmail
,SMS
(text messaging), or both.contactProtocols
(ContactProtocol... contactProtocols) The contact protocols for the alarm, such asEmail
,SMS
(text messaging), or both.contactProtocolsWithStrings
(String... contactProtocols) The contact protocols for the alarm, such asEmail
,SMS
(text messaging), or both.contactProtocolsWithStrings
(Collection<String> contactProtocols) The contact protocols for the alarm, such asEmail
,SMS
(text messaging), or both.The timestamp when the alarm was created.datapointsToAlarm
(Integer datapointsToAlarm) The number of data points that must not within the specified threshold to trigger the alarm.evaluationPeriods
(Integer evaluationPeriods) The number of periods over which data is compared to the specified threshold.default Alarm.Builder
location
(Consumer<ResourceLocation.Builder> location) An object that lists information about the location of the alarm.location
(ResourceLocation location) An object that lists information about the location of the alarm.metricName
(String metricName) The name of the metric associated with the alarm.metricName
(MetricName metricName) The name of the metric associated with the alarm.default Alarm.Builder
monitoredResourceInfo
(Consumer<MonitoredResourceInfo.Builder> monitoredResourceInfo) An object that lists information about the resource monitored by the alarm.monitoredResourceInfo
(MonitoredResourceInfo monitoredResourceInfo) An object that lists information about the resource monitored by the alarm.The name of the alarm.notificationEnabled
(Boolean notificationEnabled) Indicates whether the alarm is enabled.notificationTriggers
(Collection<AlarmState> notificationTriggers) The alarm states that trigger a notification.notificationTriggers
(AlarmState... notificationTriggers) The alarm states that trigger a notification.notificationTriggersWithStrings
(String... notificationTriggers) The alarm states that trigger a notification.notificationTriggersWithStrings
(Collection<String> notificationTriggers) The alarm states that trigger a notification.The period, in seconds, over which the statistic is applied.resourceType
(String resourceType) The Lightsail resource type of the alarm.resourceType
(ResourceType resourceType) The Lightsail resource type of the alarm.The current state of the alarm.state
(AlarmState state) The current state of the alarm.The statistic for the metric associated with the alarm.statistic
(MetricStatistic statistic) The statistic for the metric associated with the alarm.supportCode
(String supportCode) The support code.The value against which the specified statistic is compared.treatMissingData
(String treatMissingData) Specifies how the alarm handles missing data points.treatMissingData
(TreatMissingData treatMissingData) Specifies how the alarm handles missing data points.The unit of the metric associated with the alarm.unit
(MetricUnit unit) The unit of the metric associated with the alarm.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
name
The name of the alarm.
- Parameters:
name
- The name of the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
arn
The Amazon Resource Name (ARN) of the alarm.
- Parameters:
arn
- The Amazon Resource Name (ARN) of the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
createdAt
The timestamp when the alarm was created.
- Parameters:
createdAt
- The timestamp when the alarm was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
location
An object that lists information about the location of the alarm.
- Parameters:
location
- An object that lists information about the location of the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
location
An object that lists information about the location of the alarm.
This is a convenience method that creates an instance of theResourceLocation.Builder
avoiding the need to create one manually viaResourceLocation.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tolocation(ResourceLocation)
.- Parameters:
location
- a consumer that will call methods onResourceLocation.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
resourceType
The Lightsail resource type of the alarm.
- Parameters:
resourceType
- The Lightsail resource type of the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
resourceType
The Lightsail resource type of the alarm.
- Parameters:
resourceType
- The Lightsail resource type of the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
supportCode
The support code. Include this code in your email to support when you have questions about your Lightsail alarm. This code enables our support team to look up your Lightsail information more easily.
- Parameters:
supportCode
- The support code. Include this code in your email to support when you have questions about your Lightsail alarm. This code enables our support team to look up your Lightsail information more easily.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
monitoredResourceInfo
An object that lists information about the resource monitored by the alarm.
- Parameters:
monitoredResourceInfo
- An object that lists information about the resource monitored by the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
monitoredResourceInfo
default Alarm.Builder monitoredResourceInfo(Consumer<MonitoredResourceInfo.Builder> monitoredResourceInfo) An object that lists information about the resource monitored by the alarm.
This is a convenience method that creates an instance of theMonitoredResourceInfo.Builder
avoiding the need to create one manually viaMonitoredResourceInfo.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tomonitoredResourceInfo(MonitoredResourceInfo)
.- Parameters:
monitoredResourceInfo
- a consumer that will call methods onMonitoredResourceInfo.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
comparisonOperator
The arithmetic operation used when comparing the specified statistic and threshold.
- Parameters:
comparisonOperator
- The arithmetic operation used when comparing the specified statistic and threshold.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
comparisonOperator
The arithmetic operation used when comparing the specified statistic and threshold.
- Parameters:
comparisonOperator
- The arithmetic operation used when comparing the specified statistic and threshold.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
evaluationPeriods
The number of periods over which data is compared to the specified threshold.
- Parameters:
evaluationPeriods
- The number of periods over which data is compared to the specified threshold.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
period
The period, in seconds, over which the statistic is applied.
- Parameters:
period
- The period, in seconds, over which the statistic is applied.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
threshold
The value against which the specified statistic is compared.
- Parameters:
threshold
- The value against which the specified statistic is compared.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
datapointsToAlarm
The number of data points that must not within the specified threshold to trigger the alarm.
- Parameters:
datapointsToAlarm
- The number of data points that must not within the specified threshold to trigger the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
treatMissingData
Specifies how the alarm handles missing data points.
An alarm can treat missing data in the following ways:
-
breaching
- Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold. -
notBreaching
- Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold. -
ignore
- Ignore the missing data. Maintains the current alarm state. -
missing
- Missing data is treated as missing.
- Parameters:
treatMissingData
- Specifies how the alarm handles missing data points.An alarm can treat missing data in the following ways:
-
breaching
- Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold. -
notBreaching
- Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold. -
ignore
- Ignore the missing data. Maintains the current alarm state. -
missing
- Missing data is treated as missing.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
treatMissingData
Specifies how the alarm handles missing data points.
An alarm can treat missing data in the following ways:
-
breaching
- Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold. -
notBreaching
- Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold. -
ignore
- Ignore the missing data. Maintains the current alarm state. -
missing
- Missing data is treated as missing.
- Parameters:
treatMissingData
- Specifies how the alarm handles missing data points.An alarm can treat missing data in the following ways:
-
breaching
- Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold. -
notBreaching
- Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold. -
ignore
- Ignore the missing data. Maintains the current alarm state. -
missing
- Missing data is treated as missing.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
statistic
The statistic for the metric associated with the alarm.
The following statistics are available:
-
Minimum
- The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application. -
Maximum
- The highest value observed during the specified period. Use this value to determine high volumes of activity for your application. -
Sum
- All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric. -
Average
- The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources. -
SampleCount
- The count, or number, of data points used for the statistical calculation.
- Parameters:
statistic
- The statistic for the metric associated with the alarm.The following statistics are available:
-
Minimum
- The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application. -
Maximum
- The highest value observed during the specified period. Use this value to determine high volumes of activity for your application. -
Sum
- All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric. -
Average
- The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources. -
SampleCount
- The count, or number, of data points used for the statistical calculation.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
statistic
The statistic for the metric associated with the alarm.
The following statistics are available:
-
Minimum
- The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application. -
Maximum
- The highest value observed during the specified period. Use this value to determine high volumes of activity for your application. -
Sum
- All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric. -
Average
- The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources. -
SampleCount
- The count, or number, of data points used for the statistical calculation.
- Parameters:
statistic
- The statistic for the metric associated with the alarm.The following statistics are available:
-
Minimum
- The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application. -
Maximum
- The highest value observed during the specified period. Use this value to determine high volumes of activity for your application. -
Sum
- All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric. -
Average
- The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources. -
SampleCount
- The count, or number, of data points used for the statistical calculation.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
metricName
The name of the metric associated with the alarm.
- Parameters:
metricName
- The name of the metric associated with the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
metricName
The name of the metric associated with the alarm.
- Parameters:
metricName
- The name of the metric associated with the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
state
The current state of the alarm.
An alarm has the following possible states:
-
ALARM
- The metric is outside of the defined threshold. -
INSUFFICIENT_DATA
- The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state. -
OK
- The metric is within the defined threshold.
- Parameters:
state
- The current state of the alarm.An alarm has the following possible states:
-
ALARM
- The metric is outside of the defined threshold. -
INSUFFICIENT_DATA
- The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state. -
OK
- The metric is within the defined threshold.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
state
The current state of the alarm.
An alarm has the following possible states:
-
ALARM
- The metric is outside of the defined threshold. -
INSUFFICIENT_DATA
- The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state. -
OK
- The metric is within the defined threshold.
- Parameters:
state
- The current state of the alarm.An alarm has the following possible states:
-
ALARM
- The metric is outside of the defined threshold. -
INSUFFICIENT_DATA
- The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state. -
OK
- The metric is within the defined threshold.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
unit
The unit of the metric associated with the alarm.
- Parameters:
unit
- The unit of the metric associated with the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
unit
The unit of the metric associated with the alarm.
- Parameters:
unit
- The unit of the metric associated with the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
contactProtocolsWithStrings
The contact protocols for the alarm, such as
Email
,SMS
(text messaging), or both.- Parameters:
contactProtocols
- The contact protocols for the alarm, such asEmail
,SMS
(text messaging), or both.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
contactProtocolsWithStrings
The contact protocols for the alarm, such as
Email
,SMS
(text messaging), or both.- Parameters:
contactProtocols
- The contact protocols for the alarm, such asEmail
,SMS
(text messaging), or both.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
contactProtocols
The contact protocols for the alarm, such as
Email
,SMS
(text messaging), or both.- Parameters:
contactProtocols
- The contact protocols for the alarm, such asEmail
,SMS
(text messaging), or both.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
contactProtocols
The contact protocols for the alarm, such as
Email
,SMS
(text messaging), or both.- Parameters:
contactProtocols
- The contact protocols for the alarm, such asEmail
,SMS
(text messaging), or both.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
notificationTriggersWithStrings
The alarm states that trigger a notification.
- Parameters:
notificationTriggers
- The alarm states that trigger a notification.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
notificationTriggersWithStrings
The alarm states that trigger a notification.
- Parameters:
notificationTriggers
- The alarm states that trigger a notification.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
notificationTriggers
The alarm states that trigger a notification.
- Parameters:
notificationTriggers
- The alarm states that trigger a notification.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
notificationTriggers
The alarm states that trigger a notification.
- Parameters:
notificationTriggers
- The alarm states that trigger a notification.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
notificationEnabled
Indicates whether the alarm is enabled.
- Parameters:
notificationEnabled
- Indicates whether the alarm is enabled.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-