CmdID / aws / aws apigateway
aws apigateway get-models
Describes existing Models defined for a RestApi resource. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To get a list of models for a REST API
The following get-models example gets a list of models for the specified REST API.
aws apigateway get-models --rest-api-id 1234123412Identify--rest-api-idThe string identifier of the associated RestApi.Its output
{
"items": [
{
"description": "This is a default error schema model",
"schema": "{\n \"$schema\" : \"http://json-schema.org/draft-04/schema#\",\n \"title\" : \"Error Schema\",\n \"type\" : \"object\",\n \"properties\" : {\n \"message\" : { \"type\" : \"string\" }\n }\n}",
"contentType": "application/json",
"id": "7tpbze",
"name": "Error"
},
{
"description": "This is a default empty schema model",
"schema": "{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"title\" : \"Empty Schema\",\n \"type\" : \"object\"\n}",
"contentType": "application/json",
"id": "etd5w5",
"name": "Empty"
}
]
}For more information, see Data models for REST APIs in the Amazon API Gateway Developer Guide.
Options
--limitThe maximum number of returned results per page.--positionThe current pagination position in the paged result set.--rest-api-idThe string identifier of the associated RestApi.