put_rest_api
¶
put_rest_api(
rest_api_id: String,
body: Blob,
*,
config_overrides: Optional[APIGatewayClientConfig] = None,
mode: Optional[PutMode] = None,
fail_on_warnings: Optional[Boolean] = None,
parameters: Optional[MapOfStringToString] = None,
) -> RestApi
A feature of the API Gateway control service for updating an existing API with an input of external API definitions. The update can take the form of merging the supplied definition into the existing API or overwriting the existing API.
Parameters:
-
rest_api_id(String) –The string identifier of the associated RestApi.
-
mode(Optional[PutMode], default:None) –The
modequery parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge". -
fail_on_warnings(Optional[Boolean], default:None) –A query parameter to indicate whether to rollback the API update (
true) or not (false) when a warning is encountered. The default value isfalse. -
parameters(Optional[MapOfStringToString], default:None) –Custom header parameters as part of the request. For example, to exclude DocumentationParts from an imported API, set
ignore=documentationas aparametersvalue, as in the AWS CLI command ofaws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'. -
body(Blob) –The PUT request body containing external API definitions. Currently, only OpenAPI definition JSON/YAML files are supported. The maximum size of the API definition file is 6MB.
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
6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 | |