UNPKG

@azure/arm-compute

Version:
1,030 lines 38.1 kB
/* * 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 { setContinuationToken } from "../pagingHelper.js"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers.js"; import * as Parameters from "../models/parameters.js"; import { createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl.js"; /// <reference lib="esnext.asynciterable" /> /** Class containing CloudServices operations. */ export class CloudServicesImpl { client; /** * Initialize a new instance of the class CloudServices class. * @param client Reference to the service client */ constructor(client) { this.client = client; } /** * Gets a list of all cloud services in the subscription, regardless of the associated resource group. * Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink * is null to fetch all the Cloud Services. * @param options The options parameters. */ listAll(options) { const iter = this.listAllPagingAll(options); return { next() { return iter.next(); }, [Symbol.asyncIterator]() { return this; }, byPage: (settings) => { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } return this.listAllPagingPage(options, settings); }, }; } async *listAllPagingPage(options, settings) { let result; let continuationToken = settings?.continuationToken; if (!continuationToken) { result = await this._listAll(options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { result = await this._listAllNext(continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); yield page; } } async *listAllPagingAll(options) { for await (const page of this.listAllPagingPage(options)) { yield* page; } } /** * Gets a list of all cloud services under a resource group. Use nextLink property in the response to * get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. * @param resourceGroupName Name of the resource group. * @param options The options parameters. */ list(resourceGroupName, options) { const iter = this.listPagingAll(resourceGroupName, options); return { next() { return iter.next(); }, [Symbol.asyncIterator]() { return this; }, byPage: (settings) => { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(resourceGroupName, options, settings); }, }; } async *listPagingPage(resourceGroupName, options, settings) { let result; let continuationToken = settings?.continuationToken; if (!continuationToken) { result = await this._list(resourceGroupName, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { result = await this._listNext(resourceGroupName, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); yield page; } } async *listPagingAll(resourceGroupName, options) { for await (const page of this.listPagingPage(resourceGroupName, options)) { yield* page; } } /** * Create or update a cloud service. Please note some properties can be set only during cloud service * creation. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginCreateOrUpdate(resourceGroupName, cloudServiceName, options) { const directSendOperation = async (args, spec) => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async (args, spec) => { let currentRawResponse = undefined; const providedCallback = args.options?.onResponse; const callback = (rawResponse, flatResponse) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); }; const updatedArgs = { ...args, options: { ...args.options, onResponse: callback, }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { flatResponse, rawResponse: { statusCode: currentRawResponse.status, body: currentRawResponse.parsedBody, headers: currentRawResponse.headers.toJSON(), }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, cloudServiceName, options }, spec: createOrUpdateOperationSpec, }); const poller = await createHttpPoller(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; } /** * Create or update a cloud service. Please note some properties can be set only during cloud service * creation. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginCreateOrUpdateAndWait(resourceGroupName, cloudServiceName, options) { const poller = await this.beginCreateOrUpdate(resourceGroupName, cloudServiceName, options); return poller.pollUntilDone(); } /** * Update a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginUpdate(resourceGroupName, cloudServiceName, options) { const directSendOperation = async (args, spec) => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async (args, spec) => { let currentRawResponse = undefined; const providedCallback = args.options?.onResponse; const callback = (rawResponse, flatResponse) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); }; const updatedArgs = { ...args, options: { ...args.options, onResponse: callback, }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { flatResponse, rawResponse: { statusCode: currentRawResponse.status, body: currentRawResponse.parsedBody, headers: currentRawResponse.headers.toJSON(), }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, cloudServiceName, options }, spec: updateOperationSpec, }); const poller = await createHttpPoller(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; } /** * Update a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginUpdateAndWait(resourceGroupName, cloudServiceName, options) { const poller = await this.beginUpdate(resourceGroupName, cloudServiceName, options); return poller.pollUntilDone(); } /** * Deletes a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginDelete(resourceGroupName, cloudServiceName, options) { const directSendOperation = async (args, spec) => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async (args, spec) => { let currentRawResponse = undefined; const providedCallback = args.options?.onResponse; const callback = (rawResponse, flatResponse) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); }; const updatedArgs = { ...args, options: { ...args.options, onResponse: callback, }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { flatResponse, rawResponse: { statusCode: currentRawResponse.status, body: currentRawResponse.parsedBody, headers: currentRawResponse.headers.toJSON(), }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, cloudServiceName, options }, spec: deleteOperationSpec, }); const poller = await createHttpPoller(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; } /** * Deletes a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginDeleteAndWait(resourceGroupName, cloudServiceName, options) { const poller = await this.beginDelete(resourceGroupName, cloudServiceName, options); return poller.pollUntilDone(); } /** * Display information about a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ get(resourceGroupName, cloudServiceName, options) { return this.client.sendOperationRequest({ resourceGroupName, cloudServiceName, options }, getOperationSpec); } /** * Gets the status of a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ getInstanceView(resourceGroupName, cloudServiceName, options) { return this.client.sendOperationRequest({ resourceGroupName, cloudServiceName, options }, getInstanceViewOperationSpec); } /** * Gets a list of all cloud services in the subscription, regardless of the associated resource group. * Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink * is null to fetch all the Cloud Services. * @param options The options parameters. */ _listAll(options) { return this.client.sendOperationRequest({ options }, listAllOperationSpec); } /** * Gets a list of all cloud services under a resource group. Use nextLink property in the response to * get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. * @param resourceGroupName Name of the resource group. * @param options The options parameters. */ _list(resourceGroupName, options) { return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec); } /** * Starts the cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginStart(resourceGroupName, cloudServiceName, options) { const directSendOperation = async (args, spec) => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async (args, spec) => { let currentRawResponse = undefined; const providedCallback = args.options?.onResponse; const callback = (rawResponse, flatResponse) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); }; const updatedArgs = { ...args, options: { ...args.options, onResponse: callback, }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { flatResponse, rawResponse: { statusCode: currentRawResponse.status, body: currentRawResponse.parsedBody, headers: currentRawResponse.headers.toJSON(), }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, cloudServiceName, options }, spec: startOperationSpec, }); const poller = await createHttpPoller(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; } /** * Starts the cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginStartAndWait(resourceGroupName, cloudServiceName, options) { const poller = await this.beginStart(resourceGroupName, cloudServiceName, options); return poller.pollUntilDone(); } /** * Power off the cloud service. Note that resources are still attached and you are getting charged for * the resources. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginPowerOff(resourceGroupName, cloudServiceName, options) { const directSendOperation = async (args, spec) => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async (args, spec) => { let currentRawResponse = undefined; const providedCallback = args.options?.onResponse; const callback = (rawResponse, flatResponse) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); }; const updatedArgs = { ...args, options: { ...args.options, onResponse: callback, }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { flatResponse, rawResponse: { statusCode: currentRawResponse.status, body: currentRawResponse.parsedBody, headers: currentRawResponse.headers.toJSON(), }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, cloudServiceName, options }, spec: powerOffOperationSpec, }); const poller = await createHttpPoller(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; } /** * Power off the cloud service. Note that resources are still attached and you are getting charged for * the resources. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginPowerOffAndWait(resourceGroupName, cloudServiceName, options) { const poller = await this.beginPowerOff(resourceGroupName, cloudServiceName, options); return poller.pollUntilDone(); } /** * Restarts one or more role instances in a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginRestart(resourceGroupName, cloudServiceName, options) { const directSendOperation = async (args, spec) => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async (args, spec) => { let currentRawResponse = undefined; const providedCallback = args.options?.onResponse; const callback = (rawResponse, flatResponse) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); }; const updatedArgs = { ...args, options: { ...args.options, onResponse: callback, }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { flatResponse, rawResponse: { statusCode: currentRawResponse.status, body: currentRawResponse.parsedBody, headers: currentRawResponse.headers.toJSON(), }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, cloudServiceName, options }, spec: restartOperationSpec, }); const poller = await createHttpPoller(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; } /** * Restarts one or more role instances in a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginRestartAndWait(resourceGroupName, cloudServiceName, options) { const poller = await this.beginRestart(resourceGroupName, cloudServiceName, options); return poller.pollUntilDone(); } /** * Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker * roles. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginReimage(resourceGroupName, cloudServiceName, options) { const directSendOperation = async (args, spec) => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async (args, spec) => { let currentRawResponse = undefined; const providedCallback = args.options?.onResponse; const callback = (rawResponse, flatResponse) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); }; const updatedArgs = { ...args, options: { ...args.options, onResponse: callback, }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { flatResponse, rawResponse: { statusCode: currentRawResponse.status, body: currentRawResponse.parsedBody, headers: currentRawResponse.headers.toJSON(), }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, cloudServiceName, options }, spec: reimageOperationSpec, }); const poller = await createHttpPoller(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; } /** * Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker * roles. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginReimageAndWait(resourceGroupName, cloudServiceName, options) { const poller = await this.beginReimage(resourceGroupName, cloudServiceName, options); return poller.pollUntilDone(); } /** * Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and * initializes the storage resources that are used by them. If you do not want to initialize storage * resources, you can use Reimage Role Instances. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginRebuild(resourceGroupName, cloudServiceName, options) { const directSendOperation = async (args, spec) => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async (args, spec) => { let currentRawResponse = undefined; const providedCallback = args.options?.onResponse; const callback = (rawResponse, flatResponse) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); }; const updatedArgs = { ...args, options: { ...args.options, onResponse: callback, }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { flatResponse, rawResponse: { statusCode: currentRawResponse.status, body: currentRawResponse.parsedBody, headers: currentRawResponse.headers.toJSON(), }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, cloudServiceName, options }, spec: rebuildOperationSpec, }); const poller = await createHttpPoller(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; } /** * Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and * initializes the storage resources that are used by them. If you do not want to initialize storage * resources, you can use Reimage Role Instances. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginRebuildAndWait(resourceGroupName, cloudServiceName, options) { const poller = await this.beginRebuild(resourceGroupName, cloudServiceName, options); return poller.pollUntilDone(); } /** * Deletes role instances in a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginDeleteInstances(resourceGroupName, cloudServiceName, options) { const directSendOperation = async (args, spec) => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async (args, spec) => { let currentRawResponse = undefined; const providedCallback = args.options?.onResponse; const callback = (rawResponse, flatResponse) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); }; const updatedArgs = { ...args, options: { ...args.options, onResponse: callback, }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { flatResponse, rawResponse: { statusCode: currentRawResponse.status, body: currentRawResponse.parsedBody, headers: currentRawResponse.headers.toJSON(), }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, cloudServiceName, options }, spec: deleteInstancesOperationSpec, }); const poller = await createHttpPoller(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; } /** * Deletes role instances in a cloud service. * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param options The options parameters. */ async beginDeleteInstancesAndWait(resourceGroupName, cloudServiceName, options) { const poller = await this.beginDeleteInstances(resourceGroupName, cloudServiceName, options); return poller.pollUntilDone(); } /** * ListAllNext * @param nextLink The nextLink from the previous successful call to the ListAll method. * @param options The options parameters. */ _listAllNext(nextLink, options) { return this.client.sendOperationRequest({ nextLink, options }, listAllNextOperationSpec); } /** * ListNext * @param resourceGroupName Name of the resource group. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ _listNext(resourceGroupName, nextLink, options) { return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listNextOperationSpec); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const createOrUpdateOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.CloudService, }, 201: { bodyMapper: Mappers.CloudService, }, 202: { bodyMapper: Mappers.CloudService, }, 204: { bodyMapper: Mappers.CloudService, }, default: { bodyMapper: Mappers.CloudError, }, }, requestBody: Parameters.parameters36, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, Parameters.cloudServiceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer, }; const updateOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.CloudService, }, 201: { bodyMapper: Mappers.CloudService, }, 202: { bodyMapper: Mappers.CloudService, }, 204: { bodyMapper: Mappers.CloudService, }, default: { bodyMapper: Mappers.CloudError, }, }, requestBody: Parameters.parameters37, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, Parameters.cloudServiceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer, }; const deleteOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError, }, }, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, Parameters.cloudServiceName, ], headerParameters: [Parameters.accept], serializer, }; const getOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudService, }, default: { bodyMapper: Mappers.CloudError, }, }, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, Parameters.cloudServiceName, ], headerParameters: [Parameters.accept], serializer, }; const getInstanceViewOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudServiceInstanceView, }, default: { bodyMapper: Mappers.CloudError, }, }, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, Parameters.cloudServiceName, ], headerParameters: [Parameters.accept], serializer, }; const listAllOperationSpec = { path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/cloudServices", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudServiceListResult, }, default: { bodyMapper: Mappers.CloudError, }, }, queryParameters: [Parameters.apiVersion4], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer, }; const listOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudServiceListResult, }, default: { bodyMapper: Mappers.CloudError, }, }, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, ], headerParameters: [Parameters.accept], serializer, }; const startOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/start", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError, }, }, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, Parameters.cloudServiceName, ], headerParameters: [Parameters.accept], serializer, }; const powerOffOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/poweroff", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError, }, }, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, Parameters.cloudServiceName, ], headerParameters: [Parameters.accept], serializer, }; const restartOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/restart", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError, }, }, requestBody: Parameters.parameters38, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, Parameters.cloudServiceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer, }; const reimageOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/reimage", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError, }, }, requestBody: Parameters.parameters38, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, Parameters.cloudServiceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer, }; const rebuildOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/rebuild", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError, }, }, requestBody: Parameters.parameters38, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, Parameters.cloudServiceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer, }; const deleteInstancesOperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/delete", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError, }, }, requestBody: Parameters.parameters38, queryParameters: [Parameters.apiVersion4], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName1, Parameters.cloudServiceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer, }; const listAllNextOperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudServiceListResult, }, default: { bodyMapper: Mappers.CloudError, }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.subscriptionId, ], headerParameters: [Parameters.accept], serializer, }; const listNextOperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudServiceListResult, }, default: { bodyMapper: Mappers.CloudError, }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.subscriptionId, Parameters.resourceGroupName1, ], headerParameters: [Parameters.accept], serializer, }; //# sourceMappingURL=cloudServices.js.map