Skip to main content

Using Enterprise Control

Lets start by reviewing the SDK initialization. The SDK initialization is done using the following code snippet.

data(sdk_instance) = zcl_peng_azoai_sdk_factory=>get_instance( )->get_sdk(
api_version = <api_version>
api_base = <AI resource base URL>
api_type = <API Type>
api_key = <AAD token or API Key>
sdkprofile = <Profile ID>
params = <Profile Parameters>
).

We have covered all the required parameters for SDK initialization in section Initialize SDK. Here, we will focus on the optional sdkprofile and params parameters, which are relevant for enterprise control.

At the highest level of Enterprise Control organization, is the Profile. A profile is a collection of policies that are applied to the SDK instance. The SDK instance is created using the profile ID (Parameter : sdkprofile) and the profile parameters (Parameter : params). The profile parameters are used to pass additional information to the profile evaluation through a plugin model, which can be used to enforce policies.

At this time, Enterprise Control feature provides 3 levels of control granularity:

  • Creation of SDK Instance
  • Creation of Modules (Models, Deployments, Files, Fine-Tunes, Completions).
  • Operations on Modules.

Enabling Enterprise Control

Enabling the enterprise control feature involves the following steps

  1. Create an Enterprise Control Profile ( Transaction Code : ZAISDKPROFILE).
  2. (Optionally) Turn off the "DEFAULT" profile.
  3. Create a Profile Handler Plugin.
  4. Register the Profile Handler Plugin class with Profile configuration.
  5. Initialize the SDK with the Profile ID and Profile Parameters.