Skip to content

get_model

Operation

get_model

get_model(request: GetModelInput | GetModelInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetModelInputDict]) -> GetModelOutput

Describes an existing model defined for a RestApi resource.

Parameters:

Name Type Description Default
request GetModelInput | GetModelInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[GetModelInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetModelOutput

An instance of GetModelOutput.

get_model async

get_model(request: GetModelInput | GetModelInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetModelInputDict]) -> GetModelOutput

Describes an existing model defined for a RestApi resource.

Parameters:

Name Type Description Default
request GetModelInput | GetModelInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[GetModelInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetModelOutput

An instance of GetModelOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

GetModelInputDict

Bases: TypedDict

Dictionary form of GetModelInput.

Attributes

flatten instance-attribute
flatten: bool | None

A query parameter of a Boolean value to resolve (true) all external model references and returns a flattened model schema or not (false) The default is false.

model_name instance-attribute
model_name: Required[str]

The name of the model as an identifier.

rest_api_id instance-attribute
rest_api_id: Required[str]

The RestApi identifier under which the Model exists.

GetModelInput dataclass

Bases: _SerdeShape

Request to list information about a model in an existing RestApi resource.

Attributes

flatten class-attribute instance-attribute
flatten: bool = ...

A query parameter of a Boolean value to resolve (true) all external model references and returns a flattened model schema or not (false) The default is false.

model_name class-attribute instance-attribute
model_name: str | None = ...

The name of the model as an identifier.

rest_api_id class-attribute instance-attribute
rest_api_id: str | None = ...

The RestApi identifier under which the Model exists.

Output

GetModelOutput dataclass

Bases: _SerdeShape

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

Attributes

content_type class-attribute instance-attribute
content_type: str | None = ...

The content-type for the model.

description class-attribute instance-attribute
description: str | None = ...

The description of the model.

id class-attribute instance-attribute
id: str | None = ...

The identifier for the model resource.

name class-attribute instance-attribute
name: str | None = ...

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

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

schema class-attribute instance-attribute
schema: str | None = ...

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.