#[non_exhaustive]pub struct CloudWatchAlarmDefinitionBuilder { /* private fields */ }Expand description
A builder for CloudWatchAlarmDefinition.
Implementations§
source§impl CloudWatchAlarmDefinitionBuilder
impl CloudWatchAlarmDefinitionBuilder
sourcepub fn comparison_operator(self, input: ComparisonOperator) -> Self
pub fn comparison_operator(self, input: ComparisonOperator) -> Self
Determines how the metric specified by MetricName is compared to the value specified by Threshold.
sourcepub fn set_comparison_operator(self, input: Option<ComparisonOperator>) -> Self
pub fn set_comparison_operator(self, input: Option<ComparisonOperator>) -> Self
Determines how the metric specified by MetricName is compared to the value specified by Threshold.
sourcepub fn get_comparison_operator(&self) -> &Option<ComparisonOperator>
pub fn get_comparison_operator(&self) -> &Option<ComparisonOperator>
Determines how the metric specified by MetricName is compared to the value specified by Threshold.
sourcepub fn evaluation_periods(self, input: i32) -> Self
pub fn evaluation_periods(self, input: i32) -> Self
The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.
sourcepub fn set_evaluation_periods(self, input: Option<i32>) -> Self
pub fn set_evaluation_periods(self, input: Option<i32>) -> Self
The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.
sourcepub fn get_evaluation_periods(&self) -> &Option<i32>
pub fn get_evaluation_periods(&self) -> &Option<i32>
The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.
sourcepub fn metric_name(self, input: impl Into<String>) -> Self
pub fn metric_name(self, input: impl Into<String>) -> Self
The name of the CloudWatch metric that is watched to determine an alarm condition.
This field is required.sourcepub fn set_metric_name(self, input: Option<String>) -> Self
pub fn set_metric_name(self, input: Option<String>) -> Self
The name of the CloudWatch metric that is watched to determine an alarm condition.
sourcepub fn get_metric_name(&self) -> &Option<String>
pub fn get_metric_name(&self) -> &Option<String>
The name of the CloudWatch metric that is watched to determine an alarm condition.
sourcepub fn namespace(self, input: impl Into<String>) -> Self
pub fn namespace(self, input: impl Into<String>) -> Self
The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.
sourcepub fn set_namespace(self, input: Option<String>) -> Self
pub fn set_namespace(self, input: Option<String>) -> Self
The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.
sourcepub fn get_namespace(&self) -> &Option<String>
pub fn get_namespace(&self) -> &Option<String>
The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.
sourcepub fn period(self, input: i32) -> Self
pub fn period(self, input: i32) -> Self
The period, in seconds, over which the statistic is applied. CloudWatch metrics for Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch metric, specify 300.
sourcepub fn set_period(self, input: Option<i32>) -> Self
pub fn set_period(self, input: Option<i32>) -> Self
The period, in seconds, over which the statistic is applied. CloudWatch metrics for Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch metric, specify 300.
sourcepub fn get_period(&self) -> &Option<i32>
pub fn get_period(&self) -> &Option<i32>
The period, in seconds, over which the statistic is applied. CloudWatch metrics for Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch metric, specify 300.
sourcepub fn statistic(self, input: Statistic) -> Self
pub fn statistic(self, input: Statistic) -> Self
The statistic to apply to the metric associated with the alarm. The default is AVERAGE.
sourcepub fn set_statistic(self, input: Option<Statistic>) -> Self
pub fn set_statistic(self, input: Option<Statistic>) -> Self
The statistic to apply to the metric associated with the alarm. The default is AVERAGE.
sourcepub fn get_statistic(&self) -> &Option<Statistic>
pub fn get_statistic(&self) -> &Option<Statistic>
The statistic to apply to the metric associated with the alarm. The default is AVERAGE.
sourcepub fn threshold(self, input: f64) -> Self
pub fn threshold(self, input: f64) -> Self
The value against which the specified statistic is compared.
This field is required.sourcepub fn set_threshold(self, input: Option<f64>) -> Self
pub fn set_threshold(self, input: Option<f64>) -> Self
The value against which the specified statistic is compared.
sourcepub fn get_threshold(&self) -> &Option<f64>
pub fn get_threshold(&self) -> &Option<f64>
The value against which the specified statistic is compared.
sourcepub fn unit(self, input: Unit) -> Self
pub fn unit(self, input: Unit) -> Self
The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.
sourcepub fn set_unit(self, input: Option<Unit>) -> Self
pub fn set_unit(self, input: Option<Unit>) -> Self
The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.
sourcepub fn get_unit(&self) -> &Option<Unit>
pub fn get_unit(&self) -> &Option<Unit>
The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.
sourcepub fn dimensions(self, input: MetricDimension) -> Self
pub fn dimensions(self, input: MetricDimension) -> Self
Appends an item to dimensions.
To override the contents of this collection use set_dimensions.
A CloudWatch metric dimension.
sourcepub fn set_dimensions(self, input: Option<Vec<MetricDimension>>) -> Self
pub fn set_dimensions(self, input: Option<Vec<MetricDimension>>) -> Self
A CloudWatch metric dimension.
sourcepub fn get_dimensions(&self) -> &Option<Vec<MetricDimension>>
pub fn get_dimensions(&self) -> &Option<Vec<MetricDimension>>
A CloudWatch metric dimension.
sourcepub fn build(self) -> CloudWatchAlarmDefinition
pub fn build(self) -> CloudWatchAlarmDefinition
Consumes the builder and constructs a CloudWatchAlarmDefinition.
Trait Implementations§
source§impl Clone for CloudWatchAlarmDefinitionBuilder
impl Clone for CloudWatchAlarmDefinitionBuilder
source§fn clone(&self) -> CloudWatchAlarmDefinitionBuilder
fn clone(&self) -> CloudWatchAlarmDefinitionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for CloudWatchAlarmDefinitionBuilder
impl Default for CloudWatchAlarmDefinitionBuilder
source§fn default() -> CloudWatchAlarmDefinitionBuilder
fn default() -> CloudWatchAlarmDefinitionBuilder
source§impl PartialEq for CloudWatchAlarmDefinitionBuilder
impl PartialEq for CloudWatchAlarmDefinitionBuilder
source§fn eq(&self, other: &CloudWatchAlarmDefinitionBuilder) -> bool
fn eq(&self, other: &CloudWatchAlarmDefinitionBuilder) -> bool
self and other values to be equal, and is used
by ==.