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
4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 | |