get_ontology
async
¶
get_ontology(
ontology_id: OntologyIdentifier,
*,
config_overrides: Optional[AsyncContextClientConfig] = 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.
>>> await client.get_ontology(ontology_id='ont-7d3e9a1c5b2f4e8a9c0d1e2f3a4b5c6d', source_format='TURTLE')
Source code in docs_src/capo_context/_services/async_context.py
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 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 | |