Lists the ontology inductions in your account.
Parameters:
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of inductions to return in one page, from 1 to 100. Defaults to 50.
-
next_token
(Optional[PaginationToken], default:
None
)
–
Opaque continuation token from a prior response's nextToken. Omit on the first page.
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.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
List ontology inductions
The following example lists the ontology inductions in the account: one that created a DRAFT ontology and one that was cancelled.
>>> client.list_ontology_inductions(max_results=50)
Source code in docs_src/capo_context/_services/context.py
| def list_ontology_inductions(
self,
*,
config_overrides: Optional[ContextClientConfig] = None,
max_results: Optional["capo_context.types.max_results.MaxResults"] = None,
next_token: Optional[
"capo_context.types.pagination_token.PaginationToken"
] = None,
) -> "capo_context.types.list_ontology_inductions_response.ListOntologyInductionsResponse":
"""<p>Lists the ontology inductions in your account.</p>
Args:
max_results: <p>The maximum number of inductions to return in one page, from 1 to 100. Defaults to 50.</p>
next_token: <p>Opaque continuation token from a prior response's nextToken. Omit on the first page.</p>
Raises:
capo_context.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation. Verify that you have permission to perform the operation on the resource.</p>
capo_context.errors.internal_server_exception.InternalServerException: <p>The request failed because of an internal error. Retry the request.</p>
capo_context.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded a request rate quota. Wait, then retry the request.</p>
capo_context.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.</p>
capo_context.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
List ontology inductions
The following example lists the ontology inductions in the account: one that created a DRAFT ontology and one that was cancelled.
>>> client.list_ontology_inductions(max_results=50)
"""
def _handler(
req: "OperationRequest[capo_context.types.list_ontology_inductions_request.ListOntologyInductionsRequest]",
) -> OperationResponse[
"capo_context.types.list_ontology_inductions_response.ListOntologyInductionsResponse"
]:
import capo_context._operations.context.list_ontology_inductions
output, http_response = (
capo_context._operations.context.list_ontology_inductions.list_ontology_inductions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListOntologyInductions")
)
input_: capo_context.types.list_ontology_inductions_request.ListOntologyInductionsRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|