Retrieves information about a core definition version.
Parameters:
-
core_definition_id
(__string)
–
The ID of the core definition.
-
core_definition_version_id
(__string)
–
The ID of the core definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListCoreDefinitionVersions'' requests. If the version is the last one that was associated with a core definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.
Raises:
Source code in docs_src/capo_greengrass/_services/greengrass.py
| def get_core_definition_version(
self,
core_definition_id: "capo_greengrass.types.__string.__string",
core_definition_version_id: "capo_greengrass.types.__string.__string",
*,
config_overrides: Optional[GreengrassClientConfig] = None,
) -> "capo_greengrass.types.get_core_definition_version_response.GetCoreDefinitionVersionResponse":
"""Retrieves information about a core definition version.
Args:
core_definition_id: The ID of the core definition.
core_definition_version_id: The ID of the core definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListCoreDefinitionVersions'' requests. If the version is the last one that was associated with a core definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.
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.
"""
def _handler(
req: "OperationRequest[capo_greengrass.types.get_core_definition_version_request.GetCoreDefinitionVersionRequest]",
) -> OperationResponse[
"capo_greengrass.types.get_core_definition_version_response.GetCoreDefinitionVersionResponse"
]:
import capo_greengrass._operations.greengrass.get_core_definition_version
output, http_response = (
capo_greengrass._operations.greengrass.get_core_definition_version.get_core_definition_version(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetCoreDefinitionVersion")
)
input_: capo_greengrass.types.get_core_definition_version_request.GetCoreDefinitionVersionRequest = {
"core_definition_id": core_definition_id,
"core_definition_version_id": core_definition_version_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|