Returns the list of schemas associated with the account. The response provides the properties for each schema, including the Amazon Resource Name (ARN). For more information on schemas, see CreateSchema.
Parameters:
-
next_token
(Optional[NextToken], default:
None
)
–
A token returned from the previous call to ListSchemas for getting the next set of schemas (if they exist).
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of schemas to return.
Raises:
Source code in docs_src/capo_personalize/_services/async_personalize.py
| async def list_schemas(
self,
*,
config_overrides: Optional[AsyncPersonalizeClientConfig] = None,
next_token: Optional["capo_personalize.types.next_token.NextToken"] = None,
max_results: Optional["capo_personalize.types.max_results.MaxResults"] = None,
) -> "capo_personalize.types.list_schemas_response.ListSchemasResponse":
"""<p>Returns the list of schemas associated with the account. The response provides the properties for each schema, including the Amazon Resource Name (ARN). For more information on schemas, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSchema.html">CreateSchema</a>.</p>
Args:
next_token: <p>A token returned from the previous call to <code>ListSchemas</code> for getting the next set of schemas (if they exist).</p>
max_results: <p>The maximum number of schemas to return.</p>
Raises:
capo_personalize.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The token is not valid.</p>
capo_personalize.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_personalize.types.list_schemas_request.ListSchemasRequest]",
) -> AsyncOperationResponse[
"capo_personalize.types.list_schemas_response.ListSchemasResponse"
]:
import capo_personalize._operations.amazon_personalize.list_schemas
(
output,
http_response,
) = await capo_personalize._operations.amazon_personalize.list_schemas.async_list_schemas(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListSchemas")
)
input_: capo_personalize.types.list_schemas_request.ListSchemasRequest = {}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|