Below is the example of using the GetMbSecSnapshot operation to get information about the current state of the object that is used to work with security policy backups. The request contains the object moniker and the pattern, according to which the information about restoring security policy is obtained. The response contains requested information.
{ "GetMbSecSnapshot" : { "tMbSecSnapshot" : { "id" : "S1!M!S!SecSna1" }, "tArg" : { "pattern" : { "all" : "true", "executePatt" : { "loadState" : { "onSubjectApply" : { "subject" : { "profile" : "true" } } } } } } }}
{ "GetMbSecSnapshotResult" : { "id" : { "id" : "S1!M!S!SecSna1" }, "meta" : { "execute" : { "resolveTimeout" : "600000", "state" : "Waiting", "loadState" : { "onOperation" : { "applyOperation" : "Read", "state" : "0" } } }, "log" : { "its" : "" } } }}
public static GetMbSecSnapshotResult GetStateSnapshot(string secSnapshot)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetMbSecSnapshot()
{
tArg = new GetMbSecSnapshotArg()
{
pattern = new MbSecSnapshotMdPattern()
{
all = true,
executePatt = new MbSecSnapshotExecutePattern()
{
loadState = new MbSecSnapshotExecuteLoadStatePattern()
{
onSubjectApply = new MbSecSnapshotExecuteLoadOnSubjectApplyStatePattern()
{
subject = new MbSubjectPattern() { profile = true }
}
}
}
}
},
tMbSecSnapshot = new MbSecSnapshotId() { id = secSnapshot }
};
//Get object information
var result = somClient.GetMbSecSnapshot(tGet);
return result;
}
See also: