Struct aws_sdk_iot::operation::create_custom_metric::builders::CreateCustomMetricFluentBuilder
source · pub struct CreateCustomMetricFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateCustomMetric
.
Use this API to define a Custom Metric published by your devices to Device Defender.
Requires permission to access the CreateCustomMetric action.
Implementations§
source§impl CreateCustomMetricFluentBuilder
impl CreateCustomMetricFluentBuilder
sourcepub fn as_input(&self) -> &CreateCustomMetricInputBuilder
pub fn as_input(&self) -> &CreateCustomMetricInputBuilder
Access the CreateCustomMetric as a reference.
sourcepub async fn send(
self
) -> Result<CreateCustomMetricOutput, SdkError<CreateCustomMetricError, HttpResponse>>
pub async fn send( self ) -> Result<CreateCustomMetricOutput, SdkError<CreateCustomMetricError, HttpResponse>>
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, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<CreateCustomMetricOutput, CreateCustomMetricError, Self>
pub fn customize( self ) -> CustomizableOperation<CreateCustomMetricOutput, CreateCustomMetricError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn metric_name(self, input: impl Into<String>) -> Self
pub fn metric_name(self, input: impl Into<String>) -> Self
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 set_metric_name(self, input: Option<String>) -> Self
pub fn set_metric_name(self, input: Option<String>) -> Self
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 get_metric_name(&self) -> &Option<String>
pub fn get_metric_name(&self) -> &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.
sourcepub fn display_name(self, input: impl Into<String>) -> Self
pub fn display_name(self, input: impl Into<String>) -> Self
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 set_display_name(self, input: Option<String>) -> Self
pub fn set_display_name(self, input: Option<String>) -> Self
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 get_display_name(&self) -> &Option<String>
pub fn get_display_name(&self) -> &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.
sourcepub fn metric_type(self, input: CustomMetricType) -> Self
pub fn metric_type(self, input: CustomMetricType) -> Self
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.
sourcepub fn set_metric_type(self, input: Option<CustomMetricType>) -> Self
pub fn set_metric_type(self, input: Option<CustomMetricType>) -> Self
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.
sourcepub fn get_metric_type(&self) -> &Option<CustomMetricType>
pub fn get_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.
Appends an item to tags
.
To override the contents of this collection use set_tags
.
Metadata that can be used to manage the custom metric.
Metadata that can be used to manage the custom metric.
Metadata that can be used to manage the custom metric.
sourcepub fn client_request_token(self, input: impl Into<String>) -> Self
pub fn client_request_token(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_client_request_token(self, input: Option<String>) -> Self
pub fn set_client_request_token(self, input: Option<String>) -> Self
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.
sourcepub fn get_client_request_token(&self) -> &Option<String>
pub fn get_client_request_token(&self) -> &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.
Trait Implementations§
source§impl Clone for CreateCustomMetricFluentBuilder
impl Clone for CreateCustomMetricFluentBuilder
source§fn clone(&self) -> CreateCustomMetricFluentBuilder
fn clone(&self) -> CreateCustomMetricFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more