/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Redshift { namespace Model { /** */ class CreateUsageLimitRequest : public RedshiftRequest { public: AWS_REDSHIFT_API CreateUsageLimitRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateUsageLimit"; } AWS_REDSHIFT_API Aws::String SerializePayload() const override; protected: AWS_REDSHIFT_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The identifier of the cluster that you want to limit usage.

*/ inline const Aws::String& GetClusterIdentifier() const{ return m_clusterIdentifier; } /** *

The identifier of the cluster that you want to limit usage.

*/ inline bool ClusterIdentifierHasBeenSet() const { return m_clusterIdentifierHasBeenSet; } /** *

The identifier of the cluster that you want to limit usage.

*/ inline void SetClusterIdentifier(const Aws::String& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = value; } /** *

The identifier of the cluster that you want to limit usage.

*/ inline void SetClusterIdentifier(Aws::String&& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = std::move(value); } /** *

The identifier of the cluster that you want to limit usage.

*/ inline void SetClusterIdentifier(const char* value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier.assign(value); } /** *

The identifier of the cluster that you want to limit usage.

*/ inline CreateUsageLimitRequest& WithClusterIdentifier(const Aws::String& value) { SetClusterIdentifier(value); return *this;} /** *

The identifier of the cluster that you want to limit usage.

*/ inline CreateUsageLimitRequest& WithClusterIdentifier(Aws::String&& value) { SetClusterIdentifier(std::move(value)); return *this;} /** *

The identifier of the cluster that you want to limit usage.

*/ inline CreateUsageLimitRequest& WithClusterIdentifier(const char* value) { SetClusterIdentifier(value); return *this;} /** *

The Amazon Redshift feature that you want to limit.

*/ inline const UsageLimitFeatureType& GetFeatureType() const{ return m_featureType; } /** *

The Amazon Redshift feature that you want to limit.

*/ inline bool FeatureTypeHasBeenSet() const { return m_featureTypeHasBeenSet; } /** *

The Amazon Redshift feature that you want to limit.

*/ inline void SetFeatureType(const UsageLimitFeatureType& value) { m_featureTypeHasBeenSet = true; m_featureType = value; } /** *

The Amazon Redshift feature that you want to limit.

*/ inline void SetFeatureType(UsageLimitFeatureType&& value) { m_featureTypeHasBeenSet = true; m_featureType = std::move(value); } /** *

The Amazon Redshift feature that you want to limit.

*/ inline CreateUsageLimitRequest& WithFeatureType(const UsageLimitFeatureType& value) { SetFeatureType(value); return *this;} /** *

The Amazon Redshift feature that you want to limit.

*/ inline CreateUsageLimitRequest& WithFeatureType(UsageLimitFeatureType&& value) { SetFeatureType(std::move(value)); return *this;} /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size. If FeatureType is spectrum, * then LimitType must be data-scanned. If * FeatureType is concurrency-scaling, then * LimitType must be time. If FeatureType is * cross-region-datasharing, then LimitType must be * data-scanned.

*/ inline const UsageLimitLimitType& GetLimitType() const{ return m_limitType; } /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size. If FeatureType is spectrum, * then LimitType must be data-scanned. If * FeatureType is concurrency-scaling, then * LimitType must be time. If FeatureType is * cross-region-datasharing, then LimitType must be * data-scanned.

*/ inline bool LimitTypeHasBeenSet() const { return m_limitTypeHasBeenSet; } /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size. If FeatureType is spectrum, * then LimitType must be data-scanned. If * FeatureType is concurrency-scaling, then * LimitType must be time. If FeatureType is * cross-region-datasharing, then LimitType must be * data-scanned.

*/ inline void SetLimitType(const UsageLimitLimitType& value) { m_limitTypeHasBeenSet = true; m_limitType = value; } /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size. If FeatureType is spectrum, * then LimitType must be data-scanned. If * FeatureType is concurrency-scaling, then * LimitType must be time. If FeatureType is * cross-region-datasharing, then LimitType must be * data-scanned.

*/ inline void SetLimitType(UsageLimitLimitType&& value) { m_limitTypeHasBeenSet = true; m_limitType = std::move(value); } /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size. If FeatureType is spectrum, * then LimitType must be data-scanned. If * FeatureType is concurrency-scaling, then * LimitType must be time. If FeatureType is * cross-region-datasharing, then LimitType must be * data-scanned.

*/ inline CreateUsageLimitRequest& WithLimitType(const UsageLimitLimitType& value) { SetLimitType(value); return *this;} /** *

The type of limit. Depending on the feature type, this can be based on a time * duration or data size. If FeatureType is spectrum, * then LimitType must be data-scanned. If * FeatureType is concurrency-scaling, then * LimitType must be time. If FeatureType is * cross-region-datasharing, then LimitType must be * data-scanned.

*/ inline CreateUsageLimitRequest& WithLimitType(UsageLimitLimitType&& value) { SetLimitType(std::move(value)); return *this;} /** *

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.

*/ inline long long GetAmount() const{ return m_amount; } /** *

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.

*/ inline bool AmountHasBeenSet() const { return m_amountHasBeenSet; } /** *

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.

*/ inline void SetAmount(long long value) { m_amountHasBeenSet = true; m_amount = value; } /** *

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.

*/ inline CreateUsageLimitRequest& WithAmount(long long value) { SetAmount(value); return *this;} /** *

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

*/ inline const UsageLimitPeriod& GetPeriod() const{ return m_period; } /** *

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

*/ inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; } /** *

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

*/ inline void SetPeriod(const UsageLimitPeriod& value) { m_periodHasBeenSet = true; m_period = value; } /** *

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

*/ inline void SetPeriod(UsageLimitPeriod&& value) { m_periodHasBeenSet = true; m_period = std::move(value); } /** *

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

*/ inline CreateUsageLimitRequest& WithPeriod(const UsageLimitPeriod& value) { SetPeriod(value); return *this;} /** *

The time period that the amount applies to. A weekly period * begins on Sunday. The default is monthly.

*/ inline CreateUsageLimitRequest& WithPeriod(UsageLimitPeriod&& value) { SetPeriod(std::move(value)); return *this;} /** *

The action that Amazon Redshift takes when the limit is reached. The default * is log. For more information about this parameter, see UsageLimit.

*/ inline const UsageLimitBreachAction& GetBreachAction() const{ return m_breachAction; } /** *

The action that Amazon Redshift takes when the limit is reached. The default * is log. For more information about this parameter, see UsageLimit.

*/ inline bool BreachActionHasBeenSet() const { return m_breachActionHasBeenSet; } /** *

The action that Amazon Redshift takes when the limit is reached. The default * is log. For more information about this parameter, see UsageLimit.

*/ inline void SetBreachAction(const UsageLimitBreachAction& value) { m_breachActionHasBeenSet = true; m_breachAction = value; } /** *

The action that Amazon Redshift takes when the limit is reached. The default * is log. For more information about this parameter, see UsageLimit.

*/ inline void SetBreachAction(UsageLimitBreachAction&& value) { m_breachActionHasBeenSet = true; m_breachAction = std::move(value); } /** *

The action that Amazon Redshift takes when the limit is reached. The default * is log. For more information about this parameter, see UsageLimit.

*/ inline CreateUsageLimitRequest& WithBreachAction(const UsageLimitBreachAction& value) { SetBreachAction(value); return *this;} /** *

The action that Amazon Redshift takes when the limit is reached. The default * is log. For more information about this parameter, see UsageLimit.

*/ inline CreateUsageLimitRequest& WithBreachAction(UsageLimitBreachAction&& value) { SetBreachAction(std::move(value)); return *this;} /** *

A list of tag instances.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

A list of tag instances.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

A list of tag instances.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

A list of tag instances.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

A list of tag instances.

*/ inline CreateUsageLimitRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

A list of tag instances.

*/ inline CreateUsageLimitRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

A list of tag instances.

*/ inline CreateUsageLimitRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

A list of tag instances.

*/ inline CreateUsageLimitRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_clusterIdentifier; bool m_clusterIdentifierHasBeenSet = false; UsageLimitFeatureType m_featureType; bool m_featureTypeHasBeenSet = false; UsageLimitLimitType m_limitType; bool m_limitTypeHasBeenSet = false; long long m_amount; bool m_amountHasBeenSet = false; UsageLimitPeriod m_period; bool m_periodHasBeenSet = false; UsageLimitBreachAction m_breachAction; bool m_breachActionHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Redshift } // namespace Aws