@azure/arm-automation
Version:
AutomationClient Library with typescript type definitions for node.js and browser.
170 lines • 6.45 kB
JavaScript
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import { __assign } from "tslib";
import * as msRest from "@azure/ms-rest-js";
import * as Mappers from "../models/softwareUpdateConfigurationsMappers";
import * as Parameters from "../models/parameters";
/** Class representing a SoftwareUpdateConfigurations. */
var SoftwareUpdateConfigurations = /** @class */ (function () {
/**
* Create a SoftwareUpdateConfigurations.
* @param {AutomationClientContext} client Reference to the service client.
*/
function SoftwareUpdateConfigurations(client) {
this.client = client;
}
SoftwareUpdateConfigurations.prototype.create = function (resourceGroupName, automationAccountName, softwareUpdateConfigurationName, parameters, options, callback) {
return this.client.sendOperationRequest({
resourceGroupName: resourceGroupName,
automationAccountName: automationAccountName,
softwareUpdateConfigurationName: softwareUpdateConfigurationName,
parameters: parameters,
options: options
}, createOperationSpec, callback);
};
SoftwareUpdateConfigurations.prototype.getByName = function (resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, callback) {
return this.client.sendOperationRequest({
resourceGroupName: resourceGroupName,
automationAccountName: automationAccountName,
softwareUpdateConfigurationName: softwareUpdateConfigurationName,
options: options
}, getByNameOperationSpec, callback);
};
SoftwareUpdateConfigurations.prototype.deleteMethod = function (resourceGroupName, automationAccountName, softwareUpdateConfigurationName, options, callback) {
return this.client.sendOperationRequest({
resourceGroupName: resourceGroupName,
automationAccountName: automationAccountName,
softwareUpdateConfigurationName: softwareUpdateConfigurationName,
options: options
}, deleteMethodOperationSpec, callback);
};
SoftwareUpdateConfigurations.prototype.list = function (resourceGroupName, automationAccountName, options, callback) {
return this.client.sendOperationRequest({
resourceGroupName: resourceGroupName,
automationAccountName: automationAccountName,
options: options
}, listOperationSpec, callback);
};
return SoftwareUpdateConfigurations;
}());
export { SoftwareUpdateConfigurations };
// Operation Specifications
var serializer = new msRest.Serializer(Mappers);
var createOperationSpec = {
httpMethod: "PUT",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.automationAccountName,
Parameters.softwareUpdateConfigurationName
],
queryParameters: [
Parameters.apiVersion1
],
headerParameters: [
Parameters.clientRequestId,
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: __assign(__assign({}, Mappers.SoftwareUpdateConfiguration), { required: true })
},
responses: {
200: {
bodyMapper: Mappers.SoftwareUpdateConfiguration
},
201: {
bodyMapper: Mappers.SoftwareUpdateConfiguration
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer: serializer
};
var getByNameOperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.automationAccountName,
Parameters.softwareUpdateConfigurationName
],
queryParameters: [
Parameters.apiVersion1
],
headerParameters: [
Parameters.clientRequestId,
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.SoftwareUpdateConfiguration
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer: serializer
};
var deleteMethodOperationSpec = {
httpMethod: "DELETE",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.automationAccountName,
Parameters.softwareUpdateConfigurationName
],
queryParameters: [
Parameters.apiVersion1
],
headerParameters: [
Parameters.clientRequestId,
Parameters.acceptLanguage
],
responses: {
200: {},
204: {},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer: serializer
};
var listOperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.automationAccountName
],
queryParameters: [
Parameters.apiVersion1,
Parameters.filter
],
headerParameters: [
Parameters.clientRequestId,
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.SoftwareUpdateConfigurationListResult
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer: serializer
};
//# sourceMappingURL=softwareUpdateConfigurations.js.map