Skip to content

update_resource

Operation

update_resource

update_resource(request: UpdateResourceInput | UpdateResourceInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[UpdateResourceInputDict]) -> UpdateResourceOutput

Changes information about a Resource resource.

Parameters:

Name Type Description Default
request UpdateResourceInput | UpdateResourceInputDict | 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[UpdateResourceInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
UpdateResourceOutput

An instance of UpdateResourceOutput.

update_resource async

update_resource(request: UpdateResourceInput | UpdateResourceInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[UpdateResourceInputDict]) -> UpdateResourceOutput

Changes information about a Resource resource.

Parameters:

Name Type Description Default
request UpdateResourceInput | UpdateResourceInputDict | 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[UpdateResourceInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
UpdateResourceOutput

An instance of UpdateResourceOutput.

Input

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

UpdateResourceInputDict

Bases: TypedDict

Dictionary form of UpdateResourceInput.

Attributes

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

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

resource_id instance-attribute
resource_id: Required[str]

The identifier of the Resource resource.

rest_api_id instance-attribute
rest_api_id: Required[str]

The string identifier of the associated RestApi.

UpdateResourceInput dataclass

Bases: _SerdeShape

Request to change information about a Resource resource.

Attributes

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

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

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

The identifier of the Resource resource.

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

The string identifier of the associated RestApi.

Output

UpdateResourceOutput dataclass

Bases: _SerdeShape

Represents an API resource.

Attributes

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

The resource's identifier.

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

The parent resource's identifier.

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

The full path for this resource.

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

The last path segment for this resource.

resource_methods class-attribute instance-attribute
resource_methods: dict[str, Method] | None = ...

Gets an API resource's method of a given HTTP verb.

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.