Skip to content

Create Model

apigateway_create_model R Documentation

Adds a new Model resource to an existing RestApi resource

Description

Adds a new Model resource to an existing RestApi resource.

Usage

apigateway_create_model(restApiId, name, description, schema,
  contentType)

Arguments

restApiId

[required] The RestApi identifier under which the Model will be created.

name

[required] The name of the model. Must be alphanumeric.

description

The description of the model.

schema

The schema for the model. For application/json models, this should be JSON schema draft 4 model. The maximum size of the model is 400 KB.

contentType

[required] The content-type for the model.

Value

A list with the following syntax:

list(
  id = "string",
  name = "string",
  description = "string",
  schema = "string",
  contentType = "string"
)

Request syntax

svc$create_model(
  restApiId = "string",
  name = "string",
  description = "string",
  schema = "string",
  contentType = "string"
)