Microsoft Information Protection SDK - C 1.17
API Reference Documentation for C
Loading...
Searching...
No Matches
policy_engine_cc.h File Reference

Contains C API definitions for policy engine. More...

Go to the source code of this file.

Typedefs

typedef mip_cc_handlemip_cc_policy_engine
 
typedef mip_cc_handlemip_cc_policy_engine_settings
 

Functions

 MIP_CC_API (void) MIP_CC_ReleasePolicyEngine(mip_cc_policy_engine engine)
 Release resources associated with a policy engine.
 
 MIP_CC_API (mip_cc_result) MIP_CC_PolicyEngine_GetEngineIdSize(const mip_cc_policy_engine engine
 Gets size of buffer required to engine ID.
 
 MIP_CC_DEPRECATED_API (mip_cc_result) MIP_CC_CreatePolicyEngineSettingsWithIdentity(const mip_cc_identity *identity
 Create a settings object used to create a brand new policy engine.
 

Variables

int64_t * idSize
 
int64_t mip_cc_errorerrorInfo
 
char * idBuffer
 
char const int64_t idBufferSize
 
char const int64_t int64_t * actualIdSize
 
int64_t * moreInfoUrlSize
 
char * moreInfoUrlBuffer
 
char const int64_t moreInfoUrlBufferSize
 
char const int64_t int64_t * actualMoreInfoUrlSize
 
bool * isLabelingRequired
 
bool * isDowngradeJustificationRequired
 
int64_t * policyFileIdSize
 
char * policyFileIdBuffer
 
char const int64_t policyFileIdBufferSize
 
char const int64_t int64_t * actualPolicyFileIdSize
 
int64_t * sensitivityFileIdSize
 
char * sensitivityFileIdBuffer
 
char const int64_t sensitivityFileIdBufferSize
 
char const int64_t int64_t * actualSensitivityFileIdSize
 
bool * hasClassificationRules
 
int64_t * lastPolicyFetchTime
 
int64_t * labelsSize
 
mip_cc_labellabelBuffer
 
mip_cc_label const int64_t labelBufferSize
 
mip_cc_label const int64_t int64_t * actualLabelsSize
 
const char * labelId
 
const char mip_cc_labellabel
 
int64_t * sensitivityTypesSize
 
mip_cc_sensitivity_typesensitivityTypeBuffer
 
mip_cc_sensitivity_type const int64_t sensitivityTypeBufferSize
 
mip_cc_sensitivity_type const int64_t int64_t * actualSensitivityTypesSize
 
const bool isAuditDiscoveryEnabled
 
const bool mip_cc_policy_handlerhandler
 
const char * level
 
const char const char * eventType
 
const char const char const char * eventData
 
int64_t * tenantIdSize
 
char * tenantIdBuffer
 
char const int64_t tenantIdBufferSize
 
char const int64_t int64_t * actualTenantIdSize
 
int64_t * xmlSize
 
char * xmlBuffer
 
char const int64_t xmlBufferSize
 
char const int64_t int64_t * actualXmlSize
 
int64_t * clientDataSize
 
char * clientDataBuffer
 
char const int64_t clientDataBufferSize
 
char const int64_t int64_t * actualClientDataSize
 
const char * clientData
 
const char const char * locale
 
const char const char bool loadSensitivityTypes
 
const char const char bool mip_cc_policy_engine_settingssettings
 
const mip_cc_identityidentity
 
const mip_cc_auth_callback authCallback
 
const mip_cc_dictionary customSettings
 
const char * sessionId
 
const mip_cc_cloud cloud
 
const char * cloudEndpointBaseUrl
 
const char * delegatedUserEmail
 
const mip_cc_label_filter labelFilter
 
const mip_cc_label_filter bool enabled
 
int64_t * metadataVersion
 
mip_cc_workload workload
 

Detailed Description

Contains C API definitions for policy engine.

Typedef Documentation

◆ mip_cc_policy_engine

◆ mip_cc_policy_engine_settings

Function Documentation

◆ MIP_CC_API() [1/2]

MIP_CC_API ( mip_cc_result ) const

Gets size of buffer required to engine ID.

Checks consent for a specific workload.

Gets the recommended WXP (Windows, Excel, Powerpoint) metadata version, currently 0 for old verion 1 for co-authoring enabled version.

Enables or disables functionality.

Sets delegated user.

Sets base URL for all service requests.

Sets cloud which affects endpoint URLs for all service requests.

Sets the session ID that can be used to correlate logs and telemetry.

Configures custom settings, used for feature gating and testing.

Sets the client data that will be stored opaquely alongside this engine and persist across sessions.

Create a settings object used to load an existing policy engine by engine ID if it already exists, else create a new engine.

Create a settings object used to create a brand new policy engine.

Gets sensitivity types data xml.

Gets size of sensitivity types data xml.

Gets policy data xml.

Gets size of policy data xml.

Gets tenant ID.

Gets size of tenant ID.

Logs an application specific event to the audit pipeline.

Create a Policy Handler to execute policy-related functions.

Gets the sensitivity types associated with the policy engine.

Gets the number of sensitivity types associated with the policy engine.

Gets sensitivity label by ID.

Gets the sensitivity labels associated with the policy engine.

Gets the number of sensitivity labels associated with the policy engine.

Gets the time when the policy was last fetched.

Gets whether or not the policy has automatic or recommendation rules.

Gets whether or not the policy dictates a justification for downgrade operations is required.

Gets whether or not the policy dictates that a document must be labeled.

Get client data associated with a policy engine.

Gets the size of client data associated with a policy engine.

Gets engine ID.

Parameters
enginePolicy engine
idSize[Output] Size of buffer to hold engine ID (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
idBuffer[Output] Buffer the id will be copied into.
idBufferSizeSize (in number of chars) of the idBuffer.
actualIdSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If idBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualIdSize will be set to the minimum required buffer size.
Parameters
enginePolicy engine
moreInfoUrlSize[Output] Size of client data (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
moreInfoUrlBuffer[Output] Buffer the client data will be copied into
moreInfoUrlBufferSizeSize (in number of chars) of moreInfoUrlBuffer.
actualMoreInfoUrlSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If moreInfoUrlBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualMoreInfoUrlSize will be set to the minimum required buffer size.
Parameters
enginePolicy engine
isLabelingRequired[Output] Whether or not policy dictates that a document must be labeled
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
isDowngradeJustificationRequired[Output] Whether or a justification for downgrade operations is required.
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
policyFileIdSize[Output] Size of client data (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
policyFileIdBuffer[Output] Buffer the client data will be copied into
policyFileIdBufferSizeSize (in number of chars) of policyFileIdBuffer.
actualPolicyFileIdSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If policyFileIdBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualPolicyFileIdSize will be set to the minimum required buffer size.
Parameters
enginePolicy engine
sensitivityFileIdSize[Output] Size of client data (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
sensitivityFileIdBuffer[Output] Buffer the client data will be copied into
sensitivityFileIdBufferSizeSize (in number of chars) of sensitivityFileIdBuffer.
actualSensitivityFileIdSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If sensitivityFileIdBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualSensitivityFileIdSize will be set to the minimum required buffer size.
Parameters
enginePolicy engine
hasClassificationRules[Output] Whether or not policy has automatic or recommendation rules
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
lastPolicyFetchTime[Output] Time when the policy was last fetched (in seconds since epoch)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
labelsSize[Output] Number of labels
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
labelBuffer[Output] Buffer the labels will be copied into. Labels are owned by the client application and must be released with MIP_CC_ReleaseLabel.
labelBufferSizeSize (in number of labels) of the labelBuffer.
actualLabelsSize[Output] Number of labels written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If labelBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualLabelsSize will be set to the minimum required buffer size
Parameters
enginePolicy engine
labelIdLabel ID
label[Output] Sensitivity label. This value is owned by the caller and must be released with MIP_CC_ReleaseLabel.
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
sensitivityTypesSize[Output] Number of sensitivity types
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
sensitivityTypeBuffer[Output] Buffer the sensitivity types will be copied into. Sensitivity types are owned by the caller and must be released with MIP_CC_ReleaseSensitivityType.
sensitivityTypeBufferSizeSize (in number of sensitivity types) of the sensitivityTypeBuffer.
actualSensitivityTypesSize[Output] Number of sensitivity types written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If sensitivityTypeBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualSensitivityTypesSize will be set to the minimum required buffer size
Parameters
enginePolicy engine
isAuditDiscoveryEnabledWhether or not audit discovery is enabled
handler[Output] Newly-created Policy Handler instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
levelLevel of the event: Info/Error/Warning
eventTypeA description of the type of event
eventDataThe data associated with the event
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
tenantIdSize[Output] Size of tenant ID (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
tenantIdBuffer[Output] Buffer the tenant ID will be copied into.
tenantIdBufferSizeSize (in number of chars) of the tenantIdBuffer.
actualTenantIdSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If tenantIdBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualTenantIdSize will be set to the minimum required buffer size.
Parameters
enginePolicy engine
xmlSize[Output] Size of policy data xml (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
xmlBuffer[Output] Buffer the xml will be copied into.
xmlBufferSizeSize (in number of chars) of the xmlBuffer.
actualXmlSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If xmlBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualXmlSize will be set to the minimum required buffer size.
Parameters
enginePolicy engine
clientDataSize[Output] Size of client data (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
clientDataBuffer[Output] Buffer the client data will be copied into
clientDataBufferSizeSize (in number of chars) of clientDataBuffer.
actualClientDataSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If clientDataBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualClientDataSize will be set to the minimum required buffer size.
Parameters
identityIdentity that will be associated with PolicyEngine
authCallbackCallback object to be used for authentication, implemented by client application
clientDataCustomizable client data that is stored alongside the engine
localeLocale in which text results will output
loadSensitivityTypesWhether or not sensitivity types data (for classification) should also be loaded
settings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
'loadSensitivityTypes' should be 'true' only if application expects to later call MIP_CC_PolicyEngine_GetSensitivityTypes. Otherwise, it should be false to avoid an unnecessary HTTP operation.
Parameters
engineIdID of existing cached engine
identity(Optional) Identity that will be associated with PolicyEngine
authCallbackCallback object to be used for authentication, implemented by client application
clientDataCustomizable client data that is stored alongside the engine
localeLocale in which text results will output
loadSensitivityTypesWhether or not sensitivity types data (for classification) should also be loaded
settings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
'loadSensitivityTypes' should be 'true' only if application expects to later call MIP_CC_PolicyEngine_GetSensitivityTypes. Otherwise, it should be false to avoid an unnecessary HTTP operation.
'identity' will only be used for new engines. If an engine with the specified engine id already exists in the local cache, the identity from the cached engine will be used instead.
Parameters
settingsEngine settings
clientDataClient data
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsEngine settings
customSettingsKey/value pairs of custom settings
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsEngine settings
sessionIdSession ID that represents the lifetime of a policy engine
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsEngine settings
cloudCloud identifier (default = Unknown)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If cloud is not specified, then it will default to global cloud.
Parameters
settingsEngine settings
cloudEndpointBaseUrlBase URL (e.g. 'https://dataservice.protection.outlook.com')
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
This value will only be read and must be set for Cloud = MIP_CLOUD_CUSTOM
Parameters
settingsEngine settings
delegatedUserEmailEmail address of delegated user
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
A delegated user is specified when the authenticating user/application is acting on behalf of another user
Parameters
settingsEngine settings
labelFilterenum representing type to configure
enabledTrue to enable, False to disable
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
enginePolicy engine
metadataVersion[Output] WXP metadata version.
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure

◆ MIP_CC_API() [2/2]

MIP_CC_API ( void )

Release resources associated with a policy engine.

Release resources associated with a policy engine settings.

Parameters
enginePolicy engine to release
settingsPolicy engine settings to be released

◆ MIP_CC_DEPRECATED_API()

MIP_CC_DEPRECATED_API ( mip_cc_result ) const

Create a settings object used to create a brand new policy engine.

Sets label filter.

Create a settings object used to load an existing policy engine by engine ID if it already exists, else create a new engine.

Deprecated
See the replacement MIP_CC_CreatePolicyEngineSettingsWithIdentityAndAuthCallback
Parameters
identityIdentity that will be associated with PolicyEngine
clientDataCustomizable client data that is stored alongside the engine
localeLocale in which text results will output
loadSensitivityTypesWhether or not sensitivity types data (for classification) should also be loaded
settings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
'loadSensitivityTypes' should be 'true' only if application expects to later call MIP_CC_PolicyEngine_GetSensitivityTypes. Otherwise, it should be false to avoid an unnecessary HTTP operation.
Deprecated
See the replacement MIP_CC_CreatePolicyEngineSettingsWithEngineIdAndAuthCallback
Parameters
engineIdID of existing cached engine
identity(Optional) Identity that will be associated with PolicyEngine
clientDataCustomizable client data that is stored alongside the engine
localeLocale in which text results will output
loadSensitivityTypesWhether or not sensitivity types data (for classification) should also be loaded
settings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
'loadSensitivityTypes' should be 'true' only if application expects to later call MIP_CC_PolicyEngine_GetSensitivityTypes. Otherwise, it should be false to avoid an unnecessary HTTP operation.
'identity' will only be used for new engines. If an engine with the specified engine id already exists in the local cache, the identity from the cached engine will be used instead.
Deprecated
See the replacement MIP_CC_PolicyEngineSettings_ConfigureFunctionality
Parameters
settingsEngine settings
labelFilterenum representing label filter, if not set default is hyok, doublekeyencryption
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure

Variable Documentation

◆ actualClientDataSize

char const int64_t int64_t* actualClientDataSize

◆ actualIdSize

char const int64_t int64_t* actualIdSize

◆ actualLabelsSize

mip_cc_label const int64_t int64_t* actualLabelsSize

◆ actualMoreInfoUrlSize

char const int64_t int64_t* actualMoreInfoUrlSize

◆ actualPolicyFileIdSize

char const int64_t int64_t* actualPolicyFileIdSize

◆ actualSensitivityFileIdSize

char const int64_t int64_t* actualSensitivityFileIdSize

◆ actualSensitivityTypesSize

mip_cc_sensitivity_type const int64_t int64_t* actualSensitivityTypesSize

◆ actualTenantIdSize

char const int64_t int64_t* actualTenantIdSize

◆ actualXmlSize

char const int64_t int64_t * actualXmlSize

◆ authCallback

const mip_cc_identity const mip_cc_auth_callback authCallback

◆ clientData

const char* clientData

◆ clientDataBuffer

char* clientDataBuffer

◆ clientDataBufferSize

char const int64_t clientDataBufferSize

◆ clientDataSize

int64_t* clientDataSize

◆ cloud

const mip_cc_cloud cloud

◆ cloudEndpointBaseUrl

const char* cloudEndpointBaseUrl

◆ customSettings

const mip_cc_dictionary customSettings

◆ delegatedUserEmail

const char* delegatedUserEmail

◆ enabled

const mip_cc_label_filter bool enabled

◆ errorInfo

◆ eventData

const char const char const char* eventData

◆ eventType

const char const char* eventType

◆ handler

const bool mip_cc_policy_handler* handler

◆ hasClassificationRules

bool* hasClassificationRules

◆ idBuffer

char* idBuffer

◆ idBufferSize

char const int64_t idBufferSize

◆ identity

const mip_cc_identity* identity

◆ idSize

int64_t* idSize

◆ isAuditDiscoveryEnabled

const bool isAuditDiscoveryEnabled

◆ isDowngradeJustificationRequired

bool* isDowngradeJustificationRequired

◆ isLabelingRequired

bool* isLabelingRequired

◆ label

const char mip_cc_label* label

◆ labelBuffer

mip_cc_label* labelBuffer

◆ labelBufferSize

mip_cc_label const int64_t labelBufferSize

◆ labelFilter

const mip_cc_label_filter labelFilter

◆ labelId

const char* labelId

◆ labelsSize

int64_t* labelsSize

◆ lastPolicyFetchTime

int64_t* lastPolicyFetchTime

◆ level

const char* level

◆ loadSensitivityTypes

const mip_cc_identity const mip_cc_auth_callback const char const char bool loadSensitivityTypes

◆ locale

const mip_cc_identity const mip_cc_auth_callback const char const char* locale

◆ metadataVersion

int64_t* metadataVersion

◆ moreInfoUrlBuffer

char* moreInfoUrlBuffer

◆ moreInfoUrlBufferSize

char const int64_t moreInfoUrlBufferSize

◆ moreInfoUrlSize

int64_t* moreInfoUrlSize

◆ policyFileIdBuffer

char* policyFileIdBuffer

◆ policyFileIdBufferSize

char const int64_t policyFileIdBufferSize

◆ policyFileIdSize

int64_t* policyFileIdSize

◆ sensitivityFileIdBuffer

char* sensitivityFileIdBuffer

◆ sensitivityFileIdBufferSize

char const int64_t sensitivityFileIdBufferSize

◆ sensitivityFileIdSize

int64_t* sensitivityFileIdSize

◆ sensitivityTypeBuffer

mip_cc_sensitivity_type* sensitivityTypeBuffer

◆ sensitivityTypeBufferSize

mip_cc_sensitivity_type const int64_t sensitivityTypeBufferSize

◆ sensitivityTypesSize

int64_t* sensitivityTypesSize

◆ sessionId

const char* sessionId

◆ settings

const mip_cc_identity const mip_cc_auth_callback const char const char bool mip_cc_policy_engine_settings* settings

◆ tenantIdBuffer

char* tenantIdBuffer

◆ tenantIdBufferSize

char const int64_t tenantIdBufferSize

◆ tenantIdSize

int64_t* tenantIdSize

◆ workload

mip_cc_workload workload

◆ xmlBuffer

char * xmlBuffer

◆ xmlBufferSize

char const int64_t xmlBufferSize

◆ xmlSize

int64_t * xmlSize