Below is the example of using the SetMbSecSnapshot operation to create a security policy backup. The request contains moniker of the object for working with backups. The response contains moniker of the binary file that stores a backup.
{ "SetMbSecSnapshot" : { "tMbSecSnapshot" : { "id" : "S1!M!S!SecSna1" }, "tArg" : { "pattern" : { "all" : "true" }, "meta" : { "execute" : { "command" : "Save", "async" : "false" } }, "metaGet" : { "all" : "true" } } }}
{ "SetMbSecSnapshotResult" : { "id" : { "id" : "S1!M!S!SecSna1" }, "meta" : { "execute" : { "resolveTimeout" : "600000", "state" : "Finished", "savedSnapshot" : { "id" : "S1!M!Bin!0" } }, "log" : { "its" : "" } } }}
public static SetMbSecSnapshotResult SaveSnapshot(string secSnapshot)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetMbSecSnapshot()
{
tArg = new SetMbSecSnapshotArg()
{
meta = new MbSecSnapshotMd()
{
execute = new MbSecSnapshotExecute()
{
command = MbSecSnapshotExecuteCommand.Save,
async = false
}
},
pattern = new MbSecSnapshotMdPattern()
{
all = true
},
metaGet = new MbSecSnapshotMdPattern()
{
all = true
}
},
tMbSecSnapshot = new MbSecSnapshotId() { id = secSnapshot }
};
//Save security policy backup
var result = somClient.SetMbSecSnapshot(tSet);
return result;
}
See also: