create_model
¶
create_model(
rest_api_id: String,
name: String,
content_type: String,
*,
config_overrides: Optional[APIGatewayClientConfig] = 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.