get_ontology
¶
get_ontology(
ontology_id: OntologyIdentifier,
*,
config_overrides: Optional[ContextClientConfig] = None,
version: Optional[OntologyVersionString] = None,
source_format: Optional[OntologySourceFormat] = None,
) -> GetOntologyResponse
Returns an ontology's status and one of its versions.
Parameters:
-
ontology_id(OntologyIdentifier) –The ontology to return, by its ID or ARN (see
OntologyIdentifier). -
version(Optional[OntologyVersionString], default:None) –The version to return, in MAJOR.MINOR.PATCH form, for example
1.0.0. If you omit it, GetOntology returns the current default version. -
source_format(Optional[OntologySourceFormat], default:None) –Return the version's source document in
source, in this format, in place of the template. The response then has notemplate. The format must be the version'ssourceFormat. On aDRAFTontology, GetOntology returns the draft, with or withoutversion(its only version is 1.0.0). If the ontology is AWS managed, whose source is never returned, or the version has no source document, the request fails withValidationException. If you omit it, the response has the template and no source.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this operation. Verify that you have permission to perform the operation on the resource.
-
InternalServerException–The request failed because of an internal error. Retry the request.
-
ThrottlingException–The request was denied because it exceeded a request rate quota. Wait, then retry the request.
-
ValidationException–The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.
-
ResourceNotFoundException–The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Get an ontology and its source document The following example returns the current default version of an ontology, with its Turtle source document in place of the template.
Source code in docs_src/capo_context/_services/context.py
2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 | |