get_resource¶
Operation¶
get_resource
¶
get_resource(request: GetResourceInput | GetResourceInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetResourceInputDict]) -> GetResourceOutput
Lists information about a resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
GetResourceInput | GetResourceInputDict | 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[GetResourceInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetResourceOutput
|
An instance of |
get_resource
async
¶
get_resource(request: GetResourceInput | GetResourceInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetResourceInputDict]) -> GetResourceOutput
Lists information about a resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
GetResourceInput | GetResourceInputDict | 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[GetResourceInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetResourceOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
GetResourceInputDict
¶
Bases: TypedDict
Dictionary form of GetResourceInput.
Attributes¶
embed
instance-attribute
¶
A query parameter to retrieve the specified resources embedded in the
returned Resource representation in the response. This embed parameter
value is a list of comma-separated strings. Currently, the request
supports only retrieval of the embedded Method resources this way. The
query parameter value must be a single-valued list and contain the
"methods" string. For example,
GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods.
resource_id
instance-attribute
¶
The identifier for the Resource resource.
GetResourceInput
dataclass
¶
Bases: _SerdeShape
Request to list information about a resource.
Attributes¶
embed
class-attribute
instance-attribute
¶
A query parameter to retrieve the specified resources embedded in the
returned Resource representation in the response. This embed parameter
value is a list of comma-separated strings. Currently, the request
supports only retrieval of the embedded Method resources this way. The
query parameter value must be a single-valued list and contain the
"methods" string. For example,
GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods.
Output¶
GetResourceOutput
dataclass
¶
Bases: _SerdeShape
Represents an API resource.
Attributes¶
parent_id
class-attribute
instance-attribute
¶
parent_id: str | None = ...
The parent resource's identifier.
path_part
class-attribute
instance-attribute
¶
path_part: str | None = ...
The last path segment for this resource.
resource_methods
class-attribute
instance-attribute
¶
Gets an API resource's method of a given HTTP verb.
response_metadata
class-attribute
instance-attribute
¶
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.