1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateUsageLimit`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`cluster_identifier(impl ::std::convert::Into<String>)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::cluster_identifier) / [`set_cluster_identifier(Option<String>)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::set_cluster_identifier): <p>The identifier of the cluster that you want to limit usage.</p>
    ///   - [`feature_type(UsageLimitFeatureType)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::feature_type) / [`set_feature_type(Option<UsageLimitFeatureType>)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::set_feature_type): <p>The Amazon Redshift feature that you want to limit.</p>
    ///   - [`limit_type(UsageLimitLimitType)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::limit_type) / [`set_limit_type(Option<UsageLimitLimitType>)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::set_limit_type): <p>The type of limit. Depending on the feature type, this can be based on a time duration or data size. If <code>FeatureType</code> is <code>spectrum</code>, then <code>LimitType</code> must be <code>data-scanned</code>. If <code>FeatureType</code> is <code>concurrency-scaling</code>, then <code>LimitType</code> must be <code>time</code>. If <code>FeatureType</code> is <code>cross-region-datasharing</code>, then <code>LimitType</code> must be <code>data-scanned</code>. </p>
    ///   - [`amount(i64)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::amount) / [`set_amount(i64)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::set_amount): <p>The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB). The value must be a positive number. </p>
    ///   - [`period(UsageLimitPeriod)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::period) / [`set_period(Option<UsageLimitPeriod>)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::set_period): <p>The time period that the amount applies to. A <code>weekly</code> period begins on Sunday. The default is <code>monthly</code>. </p>
    ///   - [`breach_action(UsageLimitBreachAction)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::breach_action) / [`set_breach_action(Option<UsageLimitBreachAction>)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::set_breach_action): <p>The action that Amazon Redshift takes when the limit is reached. The default is log. For more information about this parameter, see <code>UsageLimit</code>.</p>
    ///   - [`tags(Vec<Tag>)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::set_tags): <p>A list of tag instances.</p>
    /// - On success, responds with [`CreateUsageLimitOutput`](crate::operation::create_usage_limit::CreateUsageLimitOutput) with field(s):
    ///   - [`usage_limit_id(Option<String>)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::usage_limit_id): <p>The identifier of the usage limit.</p>
    ///   - [`cluster_identifier(Option<String>)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::cluster_identifier): <p>The identifier of the cluster with a usage limit.</p>
    ///   - [`feature_type(Option<UsageLimitFeatureType>)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::feature_type): <p>The Amazon Redshift feature to which the limit applies.</p>
    ///   - [`limit_type(Option<UsageLimitLimitType>)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::limit_type): <p>The type of limit. Depending on the feature type, this can be based on a time duration or data size.</p>
    ///   - [`amount(i64)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::amount): <p>The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB).</p>
    ///   - [`period(Option<UsageLimitPeriod>)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::period): <p>The time period that the amount applies to. A <code>weekly</code> period begins on Sunday. The default is <code>monthly</code>. </p>
    ///   - [`breach_action(Option<UsageLimitBreachAction>)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::breach_action): <p>The action that Amazon Redshift takes when the limit is reached. Possible values are: </p>  <ul>   <li> <p> <b>log</b> - To log an event in a system table. The default is log.</p> </li>   <li> <p> <b>emit-metric</b> - To emit CloudWatch metrics.</p> </li>   <li> <p> <b>disable</b> - To disable the feature until the next usage period begins.</p> </li>  </ul>
    ///   - [`tags(Option<Vec<Tag>>)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::tags): <p>A list of tag instances.</p>
    /// - On failure, responds with [`SdkError<CreateUsageLimitError>`](crate::operation::create_usage_limit::CreateUsageLimitError)
    pub fn create_usage_limit(
        &self,
    ) -> crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder {
        crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::new(
            self.handle.clone(),
        )
    }
}