#[non_exhaustive]pub struct CreateCustomMetricInput {
pub metric_name: Option<String>,
pub display_name: Option<String>,
pub metric_type: Option<CustomMetricType>,
pub tags: Option<Vec<Tag>>,
pub client_request_token: Option<String>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.metric_name: Option<String>
The name of the custom metric. This will be used in the metric report submitted from the device/thing. The name can't begin with aws:
. You can't change the name after you define it.
display_name: Option<String>
The friendly name in the console for the custom metric. This name doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. You can update the friendly name after you define it.
metric_type: Option<CustomMetricType>
The type of the custom metric.
The type number
only takes a single metric value as an input, but when you submit the metrics value in the DeviceMetrics report, you must pass it as an array with a single value.
Metadata that can be used to manage the custom metric.
client_request_token: Option<String>
Each custom metric must have a unique client request token. If you try to create a new custom metric that already exists with a different token, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.
Implementations§
source§impl CreateCustomMetricInput
impl CreateCustomMetricInput
sourcepub fn metric_name(&self) -> Option<&str>
pub fn metric_name(&self) -> Option<&str>
The name of the custom metric. This will be used in the metric report submitted from the device/thing. The name can't begin with aws:
. You can't change the name after you define it.
sourcepub fn display_name(&self) -> Option<&str>
pub fn display_name(&self) -> Option<&str>
The friendly name in the console for the custom metric. This name doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. You can update the friendly name after you define it.
sourcepub fn metric_type(&self) -> Option<&CustomMetricType>
pub fn metric_type(&self) -> Option<&CustomMetricType>
The type of the custom metric.
The type number
only takes a single metric value as an input, but when you submit the metrics value in the DeviceMetrics report, you must pass it as an array with a single value.
Metadata that can be used to manage the custom metric.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .tags.is_none()
.
sourcepub fn client_request_token(&self) -> Option<&str>
pub fn client_request_token(&self) -> Option<&str>
Each custom metric must have a unique client request token. If you try to create a new custom metric that already exists with a different token, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.
source§impl CreateCustomMetricInput
impl CreateCustomMetricInput
sourcepub fn builder() -> CreateCustomMetricInputBuilder
pub fn builder() -> CreateCustomMetricInputBuilder
Creates a new builder-style object to manufacture CreateCustomMetricInput
.
Trait Implementations§
source§impl Clone for CreateCustomMetricInput
impl Clone for CreateCustomMetricInput
source§fn clone(&self) -> CreateCustomMetricInput
fn clone(&self) -> CreateCustomMetricInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CreateCustomMetricInput
impl Debug for CreateCustomMetricInput
source§impl PartialEq for CreateCustomMetricInput
impl PartialEq for CreateCustomMetricInput
source§fn eq(&self, other: &CreateCustomMetricInput) -> bool
fn eq(&self, other: &CreateCustomMetricInput) -> bool
self
and other
values to be equal, and is used
by ==
.