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
4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 | |