create_usage_limit
async
¶
create_usage_limit(
resource_arn: str,
usage_type: UsageLimitUsageType,
amount: int,
*,
config_overrides: Optional[AsyncRedshiftServerlessClientConfig] = 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/async_redshift_serverless.py
4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 | |