Skip to content

update_model

Operation

update_model

update_model(request: UpdateModelInput | UpdateModelInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[UpdateModelInputDict]) -> UpdateModelOutput

Changes information about a model. The maximum size of the model is 400 KB.

Parameters:

Name Type Description Default
request UpdateModelInput | UpdateModelInputDict | 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[UpdateModelInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
UpdateModelOutput

An instance of UpdateModelOutput.

update_model async

update_model(request: UpdateModelInput | UpdateModelInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[UpdateModelInputDict]) -> UpdateModelOutput

Changes information about a model. The maximum size of the model is 400 KB.

Parameters:

Name Type Description Default
request UpdateModelInput | UpdateModelInputDict | 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[UpdateModelInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
UpdateModelOutput

An instance of UpdateModelOutput.

Input

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

UpdateModelInputDict

Bases: TypedDict

Dictionary form of UpdateModelInput.

Attributes

model_name instance-attribute
model_name: Required[str]

The name of the model to update.

patch_operations instance-attribute
patch_operations: Sequence[PatchOperation | PatchOperationDict] | None

For more information about supported patch operations, see Patch Operations.

rest_api_id instance-attribute
rest_api_id: Required[str]

The string identifier of the associated RestApi.

UpdateModelInput dataclass

Bases: _SerdeShape

Request to update an existing model in an existing RestApi resource.

Attributes

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

The name of the model to update.

patch_operations class-attribute instance-attribute
patch_operations: list[PatchOperation] | None = ...

For more information about supported patch operations, see Patch Operations.

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

The string identifier of the associated RestApi.

Output

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