Skip to main content

aws_sdk_appmonetization/client/
get_metric.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GetMetric`](crate::operation::get_metric::builders::GetMetricFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`app_id(impl Into<String>)`](crate::operation::get_metric::builders::GetMetricFluentBuilder::app_id) / [`set_app_id(Option<String>)`](crate::operation::get_metric::builders::GetMetricFluentBuilder::set_app_id):<br>required: **true**<br>The ID of the app.<br>
7    ///   - [`metric_id(impl Into<String>)`](crate::operation::get_metric::builders::GetMetricFluentBuilder::metric_id) / [`set_metric_id(Option<String>)`](crate::operation::get_metric::builders::GetMetricFluentBuilder::set_metric_id):<br>required: **true**<br>The ID of the metric to retrieve.<br>
8    ///   - [`stage(PlanStage)`](crate::operation::get_metric::builders::GetMetricFluentBuilder::stage) / [`set_stage(Option<PlanStage>)`](crate::operation::get_metric::builders::GetMetricFluentBuilder::set_stage):<br>required: **false**<br>The offering stage to read the metric from: DRAFT (the latest draft) or PUBLISHED (the offering customers see). Absent: PUBLISHED when scope=live, DRAFT when scope=sandbox.<br>
9    ///   - [`scope(RequestScope)`](crate::operation::get_metric::builders::GetMetricFluentBuilder::scope) / [`set_scope(Option<RequestScope>)`](crate::operation::get_metric::builders::GetMetricFluentBuilder::set_scope):<br>required: **true**<br>Required. The environment: live or sandbox. live reads the published offering by default; sandbox reads the app's draft.<br>
10    /// - On success, responds with [`GetMetricOutput`](crate::operation::get_metric::GetMetricOutput) with field(s):
11    ///   - [`metric(Option<Metric>)`](crate::operation::get_metric::GetMetricOutput::metric): The requested metric.
12    /// - On failure, responds with [`SdkError<GetMetricError>`](crate::operation::get_metric::GetMetricError)
13    pub fn get_metric(&self) -> crate::operation::get_metric::builders::GetMetricFluentBuilder {
14        crate::operation::get_metric::builders::GetMetricFluentBuilder::new(self.handle.clone())
15    }
16}