Пример #1
0
        /// <summary>
        /// Get a the Vulnerability Assessment scan record
        /// </summary>
        public VulnerabilityAssessmentScanRecordModel GetVulnerabilityAssessmentScanRecord(string resourceGroup, string serverName, string databaseName, string scanId, ApplyToType applyToType)
        {
            VulnerabilityAssessmentScanRecordModel model = (applyToType == ApplyToType.Database)
                ? ConvertVulnerabilityAssessmentScanRecord(resourceGroup,
                                                           VulnerabilityAssessmentCommunicator.GetDatabaseVulnerabilityAssessmentScanRecord(resourceGroup, serverName, databaseName, scanId))
                : ConvertVulnerabilityAssessmentScanRecord(resourceGroup,
                                                           VulnerabilityAssessmentCommunicator.GetManagedDatabaseVulnerabilityAssessmentScanRecord(resourceGroup, serverName, databaseName, scanId));

            return(model);
        }
Пример #2
0
        public DatabaseVulnerabilityAssessmentScanRecordModel(VulnerabilityAssessmentScanRecordModel model, string serverName, string databaseName)
        {
            ResourceGroupName            = model.ResourceGroupName;
            ScanId                       = model.ScanId;
            TriggerType                  = model.TriggerType;
            State                        = model.State;
            StartTime                    = model.StartTime;
            EndTime                      = model.EndTime;
            Errors                       = model.Errors;
            ScanResultsLocationPath      = model.ScanResultsLocationPath;
            NumberOfFailedSecurityChecks = model.NumberOfFailedSecurityChecks;

            ServerName   = serverName;
            DatabaseName = databaseName;
        }
Пример #3
0
 /// <summary>
 /// Transforms the given model object to be an object that is written out
 /// </summary>
 /// <param name="model">The about to be written model object</param>
 /// <returns>The prepared object to be written out</returns>
 protected override object TransformModelToOutputObject(VulnerabilityAssessmentScanRecordModel model)
 {
     return(new ManagedDatabaseVulnerabilityAssessmentScanRecordModel(model, GetServerName(), GetDatabaseName()));
 }