Interface Alarm.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<Alarm.Builder,Alarm>,SdkBuilder<Alarm.Builder,Alarm>,SdkPojo
- Enclosing class:
- Alarm
public static interface Alarm.Builder extends SdkPojo, CopyableBuilder<Alarm.Builder,Alarm>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Alarm.Builderarn(String arn)The Amazon Resource Name (ARN) of the alarm.Alarm.BuildercomparisonOperator(String comparisonOperator)The arithmetic operation used when comparing the specified statistic and threshold.Alarm.BuildercomparisonOperator(ComparisonOperator comparisonOperator)The arithmetic operation used when comparing the specified statistic and threshold.Alarm.BuildercontactProtocols(Collection<ContactProtocol> contactProtocols)The contact protocols for the alarm, such asEmail,SMS(text messaging), or both.Alarm.BuildercontactProtocols(ContactProtocol... contactProtocols)The contact protocols for the alarm, such asEmail,SMS(text messaging), or both.Alarm.BuildercontactProtocolsWithStrings(String... contactProtocols)The contact protocols for the alarm, such asEmail,SMS(text messaging), or both.Alarm.BuildercontactProtocolsWithStrings(Collection<String> contactProtocols)The contact protocols for the alarm, such asEmail,SMS(text messaging), or both.Alarm.BuildercreatedAt(Instant createdAt)The timestamp when the alarm was created.Alarm.BuilderdatapointsToAlarm(Integer datapointsToAlarm)The number of data points that must not within the specified threshold to trigger the alarm.Alarm.BuilderevaluationPeriods(Integer evaluationPeriods)The number of periods over which data is compared to the specified threshold.default Alarm.Builderlocation(Consumer<ResourceLocation.Builder> location)An object that lists information about the location of the alarm.Alarm.Builderlocation(ResourceLocation location)An object that lists information about the location of the alarm.Alarm.BuildermetricName(String metricName)The name of the metric associated with the alarm.Alarm.BuildermetricName(MetricName metricName)The name of the metric associated with the alarm.default Alarm.BuildermonitoredResourceInfo(Consumer<MonitoredResourceInfo.Builder> monitoredResourceInfo)An object that lists information about the resource monitored by the alarm.Alarm.BuildermonitoredResourceInfo(MonitoredResourceInfo monitoredResourceInfo)An object that lists information about the resource monitored by the alarm.Alarm.Buildername(String name)The name of the alarm.Alarm.BuildernotificationEnabled(Boolean notificationEnabled)Indicates whether the alarm is enabled.Alarm.BuildernotificationTriggers(Collection<AlarmState> notificationTriggers)The alarm states that trigger a notification.Alarm.BuildernotificationTriggers(AlarmState... notificationTriggers)The alarm states that trigger a notification.Alarm.BuildernotificationTriggersWithStrings(String... notificationTriggers)The alarm states that trigger a notification.Alarm.BuildernotificationTriggersWithStrings(Collection<String> notificationTriggers)The alarm states that trigger a notification.Alarm.Builderperiod(Integer period)The period, in seconds, over which the statistic is applied.Alarm.BuilderresourceType(String resourceType)The Lightsail resource type of the alarm.Alarm.BuilderresourceType(ResourceType resourceType)The Lightsail resource type of the alarm.Alarm.Builderstate(String state)The current state of the alarm.Alarm.Builderstate(AlarmState state)The current state of the alarm.Alarm.Builderstatistic(String statistic)The statistic for the metric associated with the alarm.Alarm.Builderstatistic(MetricStatistic statistic)The statistic for the metric associated with the alarm.Alarm.BuildersupportCode(String supportCode)The support code.Alarm.Builderthreshold(Double threshold)The value against which the specified statistic is compared.Alarm.BuildertreatMissingData(String treatMissingData)Specifies how the alarm handles missing data points.Alarm.BuildertreatMissingData(TreatMissingData treatMissingData)Specifies how the alarm handles missing data points.Alarm.Builderunit(String unit)The unit of the metric associated with the alarm.Alarm.Builderunit(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 Detail
-
name
Alarm.Builder name(String 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
Alarm.Builder arn(String 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
Alarm.Builder createdAt(Instant 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
Alarm.Builder location(ResourceLocation 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
default Alarm.Builder location(Consumer<ResourceLocation.Builder> location)
An object that lists information about the location of the alarm.
This is a convenience method that creates an instance of theResourceLocation.Builderavoiding the need to create one manually viaResourceLocation.builder().When the
Consumercompletes,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:
location(ResourceLocation)
-
resourceType
Alarm.Builder resourceType(String 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,ResourceType
-
resourceType
Alarm.Builder resourceType(ResourceType 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,ResourceType
-
supportCode
Alarm.Builder supportCode(String 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
Alarm.Builder monitoredResourceInfo(MonitoredResourceInfo 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.Builderavoiding the need to create one manually viaMonitoredResourceInfo.builder().When the
Consumercompletes,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:
monitoredResourceInfo(MonitoredResourceInfo)
-
comparisonOperator
Alarm.Builder comparisonOperator(String 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,ComparisonOperator
-
comparisonOperator
Alarm.Builder comparisonOperator(ComparisonOperator 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,ComparisonOperator
-
evaluationPeriods
Alarm.Builder evaluationPeriods(Integer 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
Alarm.Builder period(Integer 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
Alarm.Builder threshold(Double 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
Alarm.Builder datapointsToAlarm(Integer 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
Alarm.Builder treatMissingData(String 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,TreatMissingData
-
-
treatMissingData
Alarm.Builder treatMissingData(TreatMissingData 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,TreatMissingData
-
-
statistic
Alarm.Builder statistic(String 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:
MetricStatistic,MetricStatistic
-
-
statistic
Alarm.Builder statistic(MetricStatistic 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:
MetricStatistic,MetricStatistic
-
-
metricName
Alarm.Builder metricName(String 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,MetricName
-
metricName
Alarm.Builder metricName(MetricName 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,MetricName
-
state
Alarm.Builder state(String 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:
AlarmState,AlarmState
-
-
state
Alarm.Builder state(AlarmState 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:
AlarmState,AlarmState
-
-
unit
Alarm.Builder unit(String 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:
MetricUnit,MetricUnit
-
unit
Alarm.Builder unit(MetricUnit 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:
MetricUnit,MetricUnit
-
contactProtocolsWithStrings
Alarm.Builder contactProtocolsWithStrings(Collection<String> 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.
-
contactProtocolsWithStrings
Alarm.Builder contactProtocolsWithStrings(String... 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
Alarm.Builder contactProtocols(Collection<ContactProtocol> 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
Alarm.Builder contactProtocols(ContactProtocol... 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
Alarm.Builder notificationTriggersWithStrings(Collection<String> 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.
-
notificationTriggersWithStrings
Alarm.Builder notificationTriggersWithStrings(String... 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
Alarm.Builder notificationTriggers(Collection<AlarmState> 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
Alarm.Builder notificationTriggers(AlarmState... 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
Alarm.Builder notificationEnabled(Boolean 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.
-
-