put_rest_api
async
¶
put_rest_api(
rest_api_id: String,
body: Blob,
*,
config_overrides: Optional[AsyncAPIGatewayClientConfig] = 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/async_api_gateway.py
6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 | |