Imports all Custom Vulnerability Sets into Touchstone®
Detailed Loss Analyses for a given SID within a specific
Business Unit and
SQL Server Instance.
Touchstone clients need a separate license for Model Builder with the Custom Event Frequency and Custom Vulnerability features in order to import custom catalogs using the Loss Analysis API
Parameters
- request
- Contains a GetCustomVulnerabilitySetsRequest that identifies the Touchstone-generated Business Unit Sequential Identifier, SQL Instance SID, and SID associated with the list of the Custom Vulnerability Sets that you want to import.
Return Value
A
GetCustomVulnerabilitySetsResponse containing a
list of Custom Vulnerability Sets for the specified SID within the specified SQL Server Instance and Business Unit.
The following example shows how to import a list of all custom vulnerability sets for each model for a given SID within specific Business Unit and SQL Server Instance using the
GetCustomVulnerabilitySets()
method:
namespace AIR.Services.Automation
{
using System;
using AIR.InformationModel.ModelBuilder;
using AIR.Services.Common.Data;
using AIR.Services.LossAnalysis.Api;
class SnippetGetCustomVulnerabilitySetsRequest
{
private static void GetCustomVulnerabilitySets(int businessUnitSid, int sqlInstanceSid)
{
LossAnalysisServiceClient lossClient = new LossAnalysisServiceClient();
GetCustomVulnerabilitySetsRequest request = new GetCustomVulnerabilitySetsRequest();
request.PagingInfo = new PagingInfo();
request.PagingInfo.PageNumber = 1;
request.PagingInfo.PageSize = 100;
request.BusinessUnitSid = businessUnitSid;
request.SqlInstanceSid = sqlInstanceSid;
GetCustomVulnerabilitySetsResponse response = lossClient.GetCustomVulnerabilitySets(request);
if (response.Status.Code == StatusCode.Success)
{
Console.WriteLine("****************************************************************");
Console.WriteLine("PageNumber: " + response.PagingInfo.PageNumber);
Console.WriteLine("PageSize: " + response.PagingInfo.PageSize);
Console.WriteLine("PageCount: " + response.PagingInfo.PageCount);
Console.WriteLine("TotalRecordCount: " + response.PagingInfo.TotalRecordCount);
foreach (CustomVulnerabilitySet customVulnerabilitySet in response.CustomVulnerabilitySets)
{
Console.WriteLine("****************************************************************");
Console.WriteLine("SID: " + customVulnerabilitySet.Sid);
Console.WriteLine("Name: " + customVulnerabilitySet.VulnerabilitySetName);
Console.WriteLine("ModelCode: " + customVulnerabilitySet.ModelCode);
}
}
}
}
}
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2