aws_sdk_redshift/client/create_usage_limit.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 [`CreateUsageLimit`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`cluster_identifier(impl 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):<br>required: **true**<br><p>The identifier of the cluster that you want to limit usage.</p><br>
7 /// - [`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):<br>required: **true**<br><p>The Amazon Redshift feature that you want to limit.</p><br>
8 /// - [`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):<br>required: **true**<br><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><br>
9 /// - [`amount(i64)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::amount) / [`set_amount(Option<i64>)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::set_amount):<br>required: **true**<br><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><br>
10 /// - [`period(UsageLimitPeriod)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::period) / [`set_period(Option<UsageLimitPeriod>)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::set_period):<br>required: **false**<br><p>The time period that the amount applies to. A <code>weekly</code> period begins on Sunday. The default is <code>monthly</code>.</p><br>
11 /// - [`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):<br>required: **false**<br><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><br>
12 /// - [`tags(Tag)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::set_tags):<br>required: **false**<br><p>A list of tag instances.</p><br>
13 /// - On success, responds with [`CreateUsageLimitOutput`](crate::operation::create_usage_limit::CreateUsageLimitOutput) with field(s):
14 /// - [`usage_limit_id(Option<String>)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::usage_limit_id): <p>The identifier of the usage limit.</p>
15 /// - [`cluster_identifier(Option<String>)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::cluster_identifier): <p>The identifier of the cluster with a usage limit.</p>
16 /// - [`feature_type(Option<UsageLimitFeatureType>)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::feature_type): <p>The Amazon Redshift feature to which the limit applies.</p>
17 /// - [`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>
18 /// - [`amount(Option<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>
19 /// - [`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>
20 /// - [`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>
21 /// - [`tags(Option<Vec::<Tag>>)`](crate::operation::create_usage_limit::CreateUsageLimitOutput::tags): <p>A list of tag instances.</p>
22 /// - On failure, responds with [`SdkError<CreateUsageLimitError>`](crate::operation::create_usage_limit::CreateUsageLimitError)
23 pub fn create_usage_limit(&self) -> crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder {
24 crate::operation::create_usage_limit::builders::CreateUsageLimitFluentBuilder::new(self.handle.clone())
25 }
26}