Getting Information about Security Policy Backup

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetMbSecSnapshot xmlns="http://www.prognoz.ru/PP.SOM.Som">
<tMbSecSnapshot xmlns="">
  <id>S1!M!S!SecSna1</id>
  </tMbSecSnapshot>
<tArg xmlns="">
<pattern>
  <all>true</all>
<executePatt>
<loadState>
<onSubjectApply>
<subject>
  <profile>true</profile>
  </subject>
  </onSubjectApply>
  </loadState>
  </executePatt>
  </pattern>
  </tArg>
  </GetMbSecSnapshot>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetMbSecSnapshotResult xmlns="http://www.prognoz.ru/PP.SOM.Som" xmlns:q1="http://www.prognoz.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>S1!M!S!SecSna1</id>
  </id>
<meta xmlns="">
<execute>
  <resolveTimeout>600000</resolveTimeout>
  <state>Waiting</state>
<loadState>
<onOperation>
  <applyOperation>Read</applyOperation>
  <state>0</state>
  </onOperation>
  </loadState>
  </execute>
<log>
  <its />
  </log>
  </meta>
  </GetMbSecSnapshotResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{

 "GetMbSecSnapshot" :

  {

   "tMbSecSnapshot" :

    {

     "id" : "S1!M!S!SecSna1"

    },

   "tArg" :

    {

     "pattern" :

      {

       "all" : "true",

       "executePatt" :

        {

         "loadState" :

          {

           "onSubjectApply" :

            {

             "subject" :

              {

               "profile" : "true"

              }

            }

          }

        }

      }

    }

  }

}

JSON response:

{

 "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 information about object
var result = somClient.GetMbSecSnapshot(tGet);
return result;
}

See also:

GetMbSecSnapshot