create_model
async
¶
create_model(
rest_api_id: String,
name: String,
content_type: String,
*,
config_overrides: Optional[AsyncAPIGatewayClientConfig] = None,
description: Optional[String] = None,
schema: Optional[String] = None,
) -> Model
Adds a new Model resource to an existing RestApi resource.
Parameters:
-
rest_api_id(String) –The RestApi identifier under which the Model will be created.
-
name(String) –The name of the model. Must be alphanumeric.
-
description(Optional[String], default:None) –The description of the model.
-
schema(Optional[String], default:None) –The schema for the model. For
application/jsonmodels, this should be JSON schema draft 4 model. The maximum size of the model is 400 KB. -
content_type(String) –The content-type for the model.
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
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 | |