create_usage_plan
¶
create_usage_plan(
name: String,
*,
config_overrides: Optional[APIGatewayClientConfig] = None,
description: Optional[String] = None,
api_stages: Optional[ListOfApiStage] = None,
throttle: Optional[ThrottleSettings] = None,
quota: Optional[QuotaSettings] = None,
tags: Optional[MapOfStringToString] = None,
) -> UsagePlan
Creates a usage plan with the throttle and quota limits, as well as the associated API stages, specified in the payload.
Parameters:
-
name(String) –The name of the usage plan.
-
description(Optional[String], default:None) –The description of the usage plan.
-
api_stages(Optional[ListOfApiStage], default:None) –The associated API stages of the usage plan.
-
throttle(Optional[ThrottleSettings], default:None) –The throttling limits of the usage plan.
-
quota(Optional[QuotaSettings], default:None) –The quota of the usage plan.
-
tags(Optional[MapOfStringToString], default:None) –The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with
aws:. The tag value can be up to 256 characters.
Raises:
-
BadRequestException–The submitted request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.
-
ConflictException–The request configuration has conflicts. For details, see the accompanying error message.
-
LimitExceededException–The request exceeded the rate limit. Retry after the specified time period.
-
NotFoundException–The requested resource is not found. Make sure that the request URI is correct.
-
TooManyRequestsException–The request has reached its throttling limit. Retry after the specified time period.
-
UnauthorizedException–The request is denied because the caller has insufficient permissions.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_api_gateway/_services/api_gateway.py
1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 | |