Skip to main content

aws_sdk_appmonetization/client/
put_third_party_cost.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 [`PutThirdPartyCost`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`app_id(impl Into<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::app_id) / [`set_app_id(Option<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::set_app_id):<br>required: **true**<br>The ID of the app the cost belongs to.<br>
7    ///   - [`cost_id(impl Into<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::cost_id) / [`set_cost_id(Option<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::set_cost_id):<br>required: **false**<br>The ID of the cost. Omit it to create a new cost, or supply an existing cost ID to update that cost in place.<br>
8    ///   - [`label(impl Into<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::label) / [`set_label(Option<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::set_label):<br>required: **true**<br>A human-readable label for the cost (for example, "Anthropic API").<br>
9    ///   - [`amount(impl Into<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::amount) / [`set_amount(Option<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::set_amount):<br>required: **true**<br>A flat monthly amount as a decimal string (for example, "12.50").<br>
10    ///   - [`frequency(ThirdPartyCostFrequency)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::frequency) / [`set_frequency(Option<ThirdPartyCostFrequency>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::set_frequency):<br>required: **false**<br>How often the cost recurs. MONTHLY is the only value today.<br>
11    ///   - [`currency(Currency)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::currency) / [`set_currency(Option<Currency>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::set_currency):<br>required: **false**<br>The currency of the amount. Defaults to USD when omitted (USD is the only supported currency).<br>
12    ///   - [`description(impl Into<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::set_description):<br>required: **false**<br>A free-form description of the cost.<br>
13    ///   - [`effective_from(impl Into<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::effective_from) / [`set_effective_from(Option<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::set_effective_from):<br>required: **false**<br>First month (YYYY-MM) the cost applies in. Absent means the cost has no start month.<br>
14    ///   - [`effective_to(impl Into<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::effective_to) / [`set_effective_to(Option<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::set_effective_to):<br>required: **false**<br>Last month (YYYY-MM) the cost applies in. Absent means the cost has no end month. When both are present, effectiveFrom must not be after effectiveTo.<br>
15    ///   - [`client_token(impl Into<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::set_client_token):<br>required: **false**<br>AWS App Monetization does not use this value for this operation. To retry without creating a duplicate cost, pass the `costId` returned by the first call.<br>
16    /// - On success, responds with [`PutThirdPartyCostOutput`](crate::operation::put_third_party_cost::PutThirdPartyCostOutput) with field(s):
17    ///   - [`item(Option<ThirdPartyCostItem>)`](crate::operation::put_third_party_cost::PutThirdPartyCostOutput::item): The third-party cost that was created or updated.
18    /// - On failure, responds with [`SdkError<PutThirdPartyCostError>`](crate::operation::put_third_party_cost::PutThirdPartyCostError)
19    pub fn put_third_party_cost(&self) -> crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder {
20        crate::operation::put_third_party_cost::builders::PutThirdPartyCostFluentBuilder::new(self.handle.clone())
21    }
22}