APIGateway / Client / get_models

get_models#

APIGateway.Client.get_models(**kwargs)#

Describes existing Models defined for a RestApi resource.

See also: AWS API Documentation

Request Syntax

response = client.get_models(
    restApiId='string',
    position='string',
    limit=123
)
Parameters:
  • restApiId (string) –

    [REQUIRED]

    The string identifier of the associated RestApi.

  • position (string) – The current pagination position in the paged result set.

  • limit (integer) – The maximum number of returned results per page. The default value is 25 and the maximum value is 500.

Return type:

dict

Returns:

Response Syntax

{
    'position': 'string',
    'items': [
        {
            'id': 'string',
            'name': 'string',
            'description': 'string',
            'schema': 'string',
            'contentType': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    Represents a collection of Model resources.

    • position (string) –

    • items (list) –

      The current page of elements from this collection.

      • (dict) –

        Represents the data structure of a method’s request or response payload.

        • id (string) –

          The identifier for the model resource.

        • name (string) –

          The name of the model. Must be an alphanumeric string.

        • description (string) –

          The description of the model.

        • schema (string) –

          The schema for the model. For application/json models, this should be JSON schema draft 4 model. Do not include “*/” characters in the description of any properties because such “*/” characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API’s SDK generated by API Gateway to fail.

        • contentType (string) –

          The content-type for the model.

Exceptions

  • APIGateway.Client.exceptions.BadRequestException

  • APIGateway.Client.exceptions.UnauthorizedException

  • APIGateway.Client.exceptions.NotFoundException

  • APIGateway.Client.exceptions.TooManyRequestsException