@azure/arm-security
Version:
A generated SDK for SecurityCenter.
81 lines • 3.14 kB
JavaScript
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
/** Class containing SqlVulnerabilityAssessmentScanResults operations. */
export class SqlVulnerabilityAssessmentScanResultsImpl {
/**
* Initialize a new instance of the class SqlVulnerabilityAssessmentScanResults class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Gets the scan results of a single rule in a scan record.
* @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan.
* @param scanResultId The rule Id of the results.
* @param workspaceId The workspace Id.
* @param resourceId The identifier of the resource.
* @param options The options parameters.
*/
get(scanId, scanResultId, workspaceId, resourceId, options) {
return this.client.sendOperationRequest({ scanId, scanResultId, workspaceId, resourceId, options }, getOperationSpec);
}
/**
* Gets a list of scan results for a single scan record.
* @param scanId The scan Id. Type 'latest' to get the scan results for the latest scan.
* @param workspaceId The workspace Id.
* @param resourceId The identifier of the resource.
* @param options The options parameters.
*/
list(scanId, workspaceId, resourceId, options) {
return this.client.sendOperationRequest({ scanId, workspaceId, resourceId, options }, listOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const getOperationSpec = {
path: "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults/{scanResultId}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ScanResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.workspaceId, Parameters.apiVersion12],
urlParameters: [
Parameters.$host,
Parameters.resourceId,
Parameters.scanId,
Parameters.scanResultId
],
headerParameters: [Parameters.accept],
serializer
};
const listOperationSpec = {
path: "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}/scanResults",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ScanResults
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.workspaceId, Parameters.apiVersion12],
urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.scanId],
headerParameters: [Parameters.accept],
serializer
};
//# sourceMappingURL=sqlVulnerabilityAssessmentScanResults.js.map