create_usage_limit
¶
create_usage_limit(
resource_arn: str,
usage_type: UsageLimitUsageType,
amount: int,
*,
config_overrides: Optional[RedshiftServerlessClientConfig] = None,
period: Optional[UsageLimitPeriod] = None,
breach_action: Optional[UsageLimitBreachAction] = None,
) -> CreateUsageLimitResponse
Creates a usage limit for a specified Amazon Redshift Serverless usage type. The usage limit is identified by the returned usage limit identifier.
Parameters:
-
resource_arn(str) –The Amazon Resource Name (ARN) of the Amazon Redshift Serverless resource to create the usage limit for.
-
usage_type(UsageLimitUsageType) –The type of Amazon Redshift Serverless usage to create a usage limit for.
-
amount(int) –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.
-
period(Optional[UsageLimitPeriod], default:None) –The time period that the amount applies to. A weekly period begins on Sunday. The default is monthly.
-
breach_action(Optional[UsageLimitBreachAction], default:None) –The action that Amazon Redshift Serverless takes when the limit is reached. The default is log.
Raises:
-
ConflictException–The submitted action has conflicts.
-
InternalServerException–The request processing has failed because of an unknown error, exception or failure.
-
ResourceNotFoundException–The resource could not be found.
-
ServiceQuotaExceededException–The service limit was exceeded.
-
ValidationException–The input failed to satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_redshift_serverless/_services/redshift_serverless.py
4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 | |