#[non_exhaustive]pub struct MetricDefinitionConfigBuilder { /* private fields */ }Expand description
A builder for MetricDefinitionConfig.
Implementations§
source§impl MetricDefinitionConfigBuilder
impl MetricDefinitionConfigBuilder
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
A name for the metric.
This field is required.sourcepub fn entity_id_key(self, input: impl Into<String>) -> Self
pub fn entity_id_key(self, input: impl Into<String>) -> Self
The entity, such as a user or session, that does an action that causes a metric value to be recorded. An example is userDetails.userID.
sourcepub fn set_entity_id_key(self, input: Option<String>) -> Self
pub fn set_entity_id_key(self, input: Option<String>) -> Self
The entity, such as a user or session, that does an action that causes a metric value to be recorded. An example is userDetails.userID.
sourcepub fn get_entity_id_key(&self) -> &Option<String>
pub fn get_entity_id_key(&self) -> &Option<String>
The entity, such as a user or session, that does an action that causes a metric value to be recorded. An example is userDetails.userID.
sourcepub fn value_key(self, input: impl Into<String>) -> Self
pub fn value_key(self, input: impl Into<String>) -> Self
The value that is tracked to produce the metric.
This field is required.sourcepub fn set_value_key(self, input: Option<String>) -> Self
pub fn set_value_key(self, input: Option<String>) -> Self
The value that is tracked to produce the metric.
sourcepub fn get_value_key(&self) -> &Option<String>
pub fn get_value_key(&self) -> &Option<String>
The value that is tracked to produce the metric.
sourcepub fn event_pattern(self, input: impl Into<String>) -> Self
pub fn event_pattern(self, input: impl Into<String>) -> Self
The EventBridge event pattern that defines how the metric is recorded.
For more information about EventBridge event patterns, see Amazon EventBridge event patterns.
sourcepub fn set_event_pattern(self, input: Option<String>) -> Self
pub fn set_event_pattern(self, input: Option<String>) -> Self
The EventBridge event pattern that defines how the metric is recorded.
For more information about EventBridge event patterns, see Amazon EventBridge event patterns.
sourcepub fn get_event_pattern(&self) -> &Option<String>
pub fn get_event_pattern(&self) -> &Option<String>
The EventBridge event pattern that defines how the metric is recorded.
For more information about EventBridge event patterns, see Amazon EventBridge event patterns.
sourcepub fn unit_label(self, input: impl Into<String>) -> Self
pub fn unit_label(self, input: impl Into<String>) -> Self
A label for the units that the metric is measuring.
sourcepub fn set_unit_label(self, input: Option<String>) -> Self
pub fn set_unit_label(self, input: Option<String>) -> Self
A label for the units that the metric is measuring.
sourcepub fn get_unit_label(&self) -> &Option<String>
pub fn get_unit_label(&self) -> &Option<String>
A label for the units that the metric is measuring.
sourcepub fn build(self) -> Result<MetricDefinitionConfig, BuildError>
pub fn build(self) -> Result<MetricDefinitionConfig, BuildError>
Consumes the builder and constructs a MetricDefinitionConfig.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for MetricDefinitionConfigBuilder
impl Clone for MetricDefinitionConfigBuilder
source§fn clone(&self) -> MetricDefinitionConfigBuilder
fn clone(&self) -> MetricDefinitionConfigBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for MetricDefinitionConfigBuilder
impl Default for MetricDefinitionConfigBuilder
source§fn default() -> MetricDefinitionConfigBuilder
fn default() -> MetricDefinitionConfigBuilder
source§impl PartialEq for MetricDefinitionConfigBuilder
impl PartialEq for MetricDefinitionConfigBuilder
source§fn eq(&self, other: &MetricDefinitionConfigBuilder) -> bool
fn eq(&self, other: &MetricDefinitionConfigBuilder) -> bool
self and other values to be equal, and is used
by ==.