@azure/arm-security
Version:
A generated SDK for SecurityCenter.
146 lines • 5.13 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 AdaptiveApplicationControls operations. */
export class AdaptiveApplicationControlsImpl {
/**
* Initialize a new instance of the class AdaptiveApplicationControls class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Gets a list of application control machine groups for the subscription.
* @param options The options parameters.
*/
list(options) {
return this.client.sendOperationRequest({ options }, listOperationSpec);
}
/**
* Gets an application control VM/server group.
* @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from
* Get locations
* @param groupName Name of an application control machine group
* @param options The options parameters.
*/
get(ascLocation, groupName, options) {
return this.client.sendOperationRequest({ ascLocation, groupName, options }, getOperationSpec);
}
/**
* Update an application control machine group
* @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from
* Get locations
* @param groupName Name of an application control machine group
* @param body
* @param options The options parameters.
*/
put(ascLocation, groupName, body, options) {
return this.client.sendOperationRequest({ ascLocation, groupName, body, options }, putOperationSpec);
}
/**
* Delete an application control machine group
* @param ascLocation The location where ASC stores the data of the subscription. can be retrieved from
* Get locations
* @param groupName Name of an application control machine group
* @param options The options parameters.
*/
delete(ascLocation, groupName, options) {
return this.client.sendOperationRequest({ ascLocation, groupName, options }, deleteOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Security/applicationWhitelistings",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.AdaptiveApplicationControlGroups
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [
Parameters.apiVersion9,
Parameters.includePathRecommendations,
Parameters.summary
],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
const getOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.AdaptiveApplicationControlGroup
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion9],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.ascLocation,
Parameters.groupName
],
headerParameters: [Parameters.accept],
serializer
};
const putOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.AdaptiveApplicationControlGroup
},
default: {
bodyMapper: Mappers.CloudError
}
},
requestBody: Parameters.body,
queryParameters: [Parameters.apiVersion9],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.ascLocation,
Parameters.groupName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const deleteOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}",
httpMethod: "DELETE",
responses: {
200: {},
202: {},
204: {},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion9],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.ascLocation,
Parameters.groupName
],
headerParameters: [Parameters.accept],
serializer
};
//# sourceMappingURL=adaptiveApplicationControls.js.map