Lists the versions of a device definition.
Parameters:
-
device_definition_id
(__string)
–
The ID of the device definition.
-
max_results
(Optional[__string], default:
None
)
–
The maximum number of results to be returned per request.
-
next_token
(Optional[__string], default:
None
)
–
The token for the next set of results, or ''null'' if there are no additional results.
Raises:
Source code in docs_src/capo_greengrass/_services/async_greengrass.py
| async def list_device_definition_versions(
self,
device_definition_id: "capo_greengrass.types.__string.__string",
*,
config_overrides: Optional[AsyncGreengrassClientConfig] = None,
max_results: Optional["capo_greengrass.types.__string.__string"] = None,
next_token: Optional["capo_greengrass.types.__string.__string"] = None,
) -> "capo_greengrass.types.list_device_definition_versions_response.ListDeviceDefinitionVersionsResponse":
"""Lists the versions of a device definition.
Args:
device_definition_id: The ID of the device definition.
max_results: The maximum number of results to be returned per request.
next_token: The token for the next set of results, or ''null'' if there are no additional results.
Raises:
capo_greengrass.errors.bad_request_exception.BadRequestException: General error information.
capo_greengrass.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_greengrass.types.list_device_definition_versions_request.ListDeviceDefinitionVersionsRequest]",
) -> AsyncOperationResponse[
"capo_greengrass.types.list_device_definition_versions_response.ListDeviceDefinitionVersionsResponse"
]:
import capo_greengrass._operations.greengrass.list_device_definition_versions
(
output,
http_response,
) = await capo_greengrass._operations.greengrass.list_device_definition_versions.async_list_device_definition_versions(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListDeviceDefinitionVersions")
)
input_: capo_greengrass.types.list_device_definition_versions_request.ListDeviceDefinitionVersionsRequest = {
"device_definition_id": device_definition_id
}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|