Schemas¶
Ark SDK is entirely based on schemas constructed from Pydantic. Pydantic is a schema and data validation library that also provides settings management and uses Python type annotations.
All exec
actions in the Ark SDK receive a model parsed from the CLI or from the SDK in code and, some of them, return a model or set of models. All of these models inherit from ArkModel:
1 2 3 |
|
Derived from the model above, there are different model types that serve different purposes, such as aliasing attributes with camelCase and adding polling parameters.
Example¶
Any request can be called with a defined model, for example:
1 2 |
|
The above example creates a DB policies service and calls list_policies()
to retrieve a list of all tenant DB polices. The returned list items contain policy_id
and policy_name
fields, which can be used with the ArkDPAGetPolicy model:
1 2 3 |
|
All models can be found here and are separated to folders based on topic, from auth to services