@azure/arm-automation
Version:
AutomationClient Library with typescript type definitions for node.js and browser.
95 lines • 3.48 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/agentRegistrationInformationMappers";
import * as Parameters from "../models/parameters";
/** Class representing a AgentRegistrationInformation. */
var AgentRegistrationInformation = /** @class */ (function () {
/**
* Create a AgentRegistrationInformation.
* @param {AutomationClientContext} client Reference to the service client.
*/
function AgentRegistrationInformation(client) {
this.client = client;
}
AgentRegistrationInformation.prototype.get = function (resourceGroupName, automationAccountName, options, callback) {
return this.client.sendOperationRequest({
resourceGroupName: resourceGroupName,
automationAccountName: automationAccountName,
options: options
}, getOperationSpec, callback);
};
AgentRegistrationInformation.prototype.regenerateKey = function (resourceGroupName, automationAccountName, parameters, options, callback) {
return this.client.sendOperationRequest({
resourceGroupName: resourceGroupName,
automationAccountName: automationAccountName,
parameters: parameters,
options: options
}, regenerateKeyOperationSpec, callback);
};
return AgentRegistrationInformation;
}());
export { AgentRegistrationInformation };
// Operation Specifications
var serializer = new msRest.Serializer(Mappers);
var getOperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.automationAccountName
],
queryParameters: [
Parameters.apiVersion2
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.AgentRegistration
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer: serializer
};
var regenerateKeyOperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/agentRegistrationInformation/regenerateKey",
urlParameters: [
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.automationAccountName
],
queryParameters: [
Parameters.apiVersion2
],
headerParameters: [
Parameters.acceptLanguage
],
requestBody: {
parameterPath: "parameters",
mapper: __assign(__assign({}, Mappers.AgentRegistrationRegenerateKeyParameter), { required: true })
},
responses: {
200: {
bodyMapper: Mappers.AgentRegistration
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer: serializer
};
//# sourceMappingURL=agentRegistrationInformation.js.map