CmdID / aws / aws apigateway
aws apigateway get-model
Describes an existing model defined for a RestApi resource. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To get the configuration for a model defined under a REST API
The following get-model example gets the configuration for the Empty model defined under a REST API.
aws apigateway get-model --rest-api-id 1234123412 --model-name EmptyIdentify--rest-api-idThe RestApi identifier under which the Model exists.--model-nameThe name of the model as an identifier.Its output
{
"contentType": "application/json",
"description": "This is a default empty schema model",
"name": "Empty",
"id": "etd5w5",
"schema": "{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"title\" : \"Empty Schema\",\n \"type\" : \"object\"\n}"
}For more information, see Data models for REST APIs in the Amazon API Gateway Developer Guide.
Options
--flattenA query parameter of a Boolean value to resolve (true) all external model references and returns a flattened model schema or not (false) The default is false.--model-nameThe name of the model as an identifier.--rest-api-idThe RestApi identifier under which the Model exists.