ApiGatewayV2 / Client / create_model

create_model#

ApiGatewayV2.Client.create_model(**kwargs)#

Creates a Model for an API.

See also: AWS API Documentation

Request Syntax

response = client.create_model(
    ApiId='string',
    ContentType='string',
    Description='string',
    Name='string',
    Schema='string'
)
Parameters:
  • ApiId (string) –

    [REQUIRED]

    The API identifier.

  • ContentType (string) – The content-type for the model, for example, “application/json”.

  • Description (string) – The description of the model.

  • Name (string) –

    [REQUIRED]

    The name of the model. Must be alphanumeric.

  • Schema (string) –

    [REQUIRED]

    The schema for the model. For application/json models, this should be JSON schema draft 4 model.

Return type:

dict

Returns:

Response Syntax

{
    'ContentType': 'string',
    'Description': 'string',
    'ModelId': 'string',
    'Name': 'string',
    'Schema': 'string'
}

Response Structure

  • (dict) –

    The request has succeeded and has resulted in the creation of a resource.

    • ContentType (string) –

      The content-type for the model, for example, “application/json”.

    • Description (string) –

      The description of the model.

    • ModelId (string) –

      The model identifier.

    • Name (string) –

      The name of the model. Must be alphanumeric.

    • Schema (string) –

      The schema for the model. For application/json models, this should be JSON schema draft 4 model.

Exceptions