@azure/arm-security
Version:
A generated SDK for SecurityCenter.
74 lines • 2.75 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 SqlVulnerabilityAssessmentScans operations. */
export class SqlVulnerabilityAssessmentScansImpl {
/**
* Initialize a new instance of the class SqlVulnerabilityAssessmentScans class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Gets the scan details of a single scan record.
* @param scanId The scan Id. Type 'latest' to get the scan record for the latest scan.
* @param workspaceId The workspace Id.
* @param resourceId The identifier of the resource.
* @param options The options parameters.
*/
get(scanId, workspaceId, resourceId, options) {
return this.client.sendOperationRequest({ scanId, workspaceId, resourceId, options }, getOperationSpec);
}
/**
* Gets a list of scan records.
* @param workspaceId The workspace Id.
* @param resourceId The identifier of the resource.
* @param options The options parameters.
*/
list(workspaceId, resourceId, options) {
return this.client.sendOperationRequest({ workspaceId, resourceId, options }, listOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const getOperationSpec = {
path: "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans/{scanId}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.Scan
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.workspaceId, Parameters.apiVersion12],
urlParameters: [Parameters.$host, Parameters.resourceId, Parameters.scanId],
headerParameters: [Parameters.accept],
serializer
};
const listOperationSpec = {
path: "/{resourceId}/providers/Microsoft.Security/sqlVulnerabilityAssessments/default/scans",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.Scans
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.workspaceId, Parameters.apiVersion12],
urlParameters: [Parameters.$host, Parameters.resourceId],
headerParameters: [Parameters.accept],
serializer
};
//# sourceMappingURL=sqlVulnerabilityAssessmentScans.js.map