/** * 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 namespace Aws { namespace RedshiftServerless { namespace Model { /** */ class CreateUsageLimitRequest : public RedshiftServerlessRequest { public: AWS_REDSHIFTSERVERLESS_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_REDSHIFTSERVERLESS_API Aws::String SerializePayload() const override; AWS_REDSHIFTSERVERLESS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The limit amount. If time-based, this amount is in Redshift Processing Units * (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data * transferred between Regions in cross-account sharing. 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 Redshift Processing Units * (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data * transferred between Regions in cross-account sharing. The value must be a * positive number.

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

The limit amount. If time-based, this amount is in Redshift Processing Units * (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data * transferred between Regions in cross-account sharing. 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 Redshift Processing Units * (RPU) consumed per hour. If data-based, this amount is in terabytes (TB) of data * transferred between Regions in cross-account sharing. The value must be a * positive number.

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

The action that Amazon Redshift Serverless takes when the limit is reached. * The default is log.

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

The action that Amazon Redshift Serverless takes when the limit is reached. * The default is log.

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

The action that Amazon Redshift Serverless takes when the limit is reached. * The default is log.

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

The action that Amazon Redshift Serverless takes when the limit is reached. * The default is log.

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

The action that Amazon Redshift Serverless takes when the limit is reached. * The default is log.

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

The action that Amazon Redshift Serverless takes when the limit is reached. * The default is log.

*/ inline CreateUsageLimitRequest& WithBreachAction(UsageLimitBreachAction&& value) { SetBreachAction(std::move(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 Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to * create the usage limit for.

*/ inline const Aws::String& GetResourceArn() const{ return m_resourceArn; } /** *

The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to * create the usage limit for.

*/ inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to * create the usage limit for.

*/ inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; } /** *

The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to * create the usage limit for.

*/ inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to * create the usage limit for.

*/ inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to * create the usage limit for.

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

The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to * create the usage limit for.

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

The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to * create the usage limit for.

*/ inline CreateUsageLimitRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;} /** *

The type of Amazon Redshift Serverless usage to create a usage limit for.

*/ inline const UsageLimitUsageType& GetUsageType() const{ return m_usageType; } /** *

The type of Amazon Redshift Serverless usage to create a usage limit for.

*/ inline bool UsageTypeHasBeenSet() const { return m_usageTypeHasBeenSet; } /** *

The type of Amazon Redshift Serverless usage to create a usage limit for.

*/ inline void SetUsageType(const UsageLimitUsageType& value) { m_usageTypeHasBeenSet = true; m_usageType = value; } /** *

The type of Amazon Redshift Serverless usage to create a usage limit for.

*/ inline void SetUsageType(UsageLimitUsageType&& value) { m_usageTypeHasBeenSet = true; m_usageType = std::move(value); } /** *

The type of Amazon Redshift Serverless usage to create a usage limit for.

*/ inline CreateUsageLimitRequest& WithUsageType(const UsageLimitUsageType& value) { SetUsageType(value); return *this;} /** *

The type of Amazon Redshift Serverless usage to create a usage limit for.

*/ inline CreateUsageLimitRequest& WithUsageType(UsageLimitUsageType&& value) { SetUsageType(std::move(value)); return *this;} private: long long m_amount; bool m_amountHasBeenSet = false; UsageLimitBreachAction m_breachAction; bool m_breachActionHasBeenSet = false; UsageLimitPeriod m_period; bool m_periodHasBeenSet = false; Aws::String m_resourceArn; bool m_resourceArnHasBeenSet = false; UsageLimitUsageType m_usageType; bool m_usageTypeHasBeenSet = false; }; } // namespace Model } // namespace RedshiftServerless } // namespace Aws