get_models

ApiGatewayV2.Client.get_models(**kwargs)

Gets the Models for an API.

See also: AWS API Documentation

Request Syntax

response = client.get_models(
    ApiId='string',
    MaxResults='string',
    NextToken='string'
)
Parameters
  • ApiId (string) --

    [REQUIRED]

    The API identifier.

  • MaxResults (string) -- The maximum number of elements to be returned for this resource.
  • NextToken (string) -- The next page of elements from this collection. Not valid for the last element of the collection.
Return type

dict

Returns

Response Syntax

{
    'Items': [
        {
            'ContentType': 'string',
            'Description': 'string',
            'ModelId': 'string',
            'Name': 'string',
            'Schema': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Success

    • Items (list) --

      The elements from this collection.

      • (dict) --

        Represents a data model for an API. Supported only for WebSocket APIs. See Create Models and Mapping Templates for Request and Response Mappings.

        • 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.

    • NextToken (string) --

      The next page of elements from this collection. Not valid for the last element of the collection.

Exceptions

  • ApiGatewayV2.Client.exceptions.NotFoundException
  • ApiGatewayV2.Client.exceptions.TooManyRequestsException
  • ApiGatewayV2.Client.exceptions.BadRequestException