Struct aws_sdk_iot::input::CreateCustomMetricInput
source · #[non_exhaustive]pub struct CreateCustomMetricInput { /* private fields */ }
Implementations§
source§impl CreateCustomMetricInput
impl CreateCustomMetricInput
sourcepub async fn make_operation(
self,
_config: &Config
) -> Result<Operation<CreateCustomMetric, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
self,
_config: &Config
) -> Result<Operation<CreateCustomMetric, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<CreateCustomMetric
>
Examples found in repository?
5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::CreateCustomMetric,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::CreateCustomMetricError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateCustomMetricOutput,
aws_smithy_http::result::SdkError<crate::error::CreateCustomMetricError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture CreateCustomMetricInput
.
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.
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.
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 more