create_stage
async
¶
create_stage(
rest_api_id: String,
stage_name: String,
deployment_id: String,
*,
config_overrides: Optional[AsyncAPIGatewayClientConfig] = None,
description: Optional[String] = None,
cache_cluster_enabled: Optional[Boolean] = None,
cache_cluster_size: Optional[CacheClusterSize] = None,
variables: Optional[MapOfStringToString] = None,
documentation_version: Optional[String] = None,
canary_settings: Optional[CanarySettings] = None,
tracing_enabled: Optional[Boolean] = None,
tags: Optional[MapOfStringToString] = None,
) -> Stage
Creates a new Stage resource that references a pre-existing Deployment for the API.
Parameters:
-
rest_api_id(String) –The string identifier of the associated RestApi.
-
stage_name(String) –The name for the Stage resource. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.
-
deployment_id(String) –The identifier of the Deployment resource for the Stage resource.
-
description(Optional[String], default:None) –The description of the Stage resource.
-
cache_cluster_enabled(Optional[Boolean], default:None) –Whether cache clustering is enabled for the stage.
-
cache_cluster_size(Optional[CacheClusterSize], default:None) –The stage's cache capacity in GB. For more information about choosing a cache size, see Enabling API caching to enhance responsiveness.
-
variables(Optional[MapOfStringToString], default:None) –A map that defines the stage variables for the new Stage resource. Variable names can have alphanumeric and underscore characters, and the values must match
[A-Za-z0-9-._~:/?#&=,]+. -
documentation_version(Optional[String], default:None) –The version of the associated API documentation.
-
canary_settings(Optional[CanarySettings], default:None) –The canary deployment settings of this stage.
-
tracing_enabled(Optional[Boolean], default:None) –Specifies whether active tracing with X-ray is enabled for the Stage.
-
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/async_api_gateway.py
1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 | |