@azure/arm-compute
Version:
A generated SDK for ComputeManagementClient.
311 lines • 10.8 kB
JavaScript
"use strict";
/*
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.VirtualMachineImagesImpl = void 0;
const tslib_1 = require("tslib");
const coreClient = tslib_1.__importStar(require("@azure/core-client"));
const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
/** Class containing VirtualMachineImages operations. */
class VirtualMachineImagesImpl {
client;
/**
* Initialize a new instance of the class VirtualMachineImages class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Gets a list of all virtual machine image versions for the specified edge zone
* @param location The name of Azure region.
* @param edgeZone The name of the edge zone.
* @param options The options parameters.
*/
listByEdgeZone(location, edgeZone, options) {
return this.client.sendOperationRequest({ location, edgeZone, options }, listByEdgeZoneOperationSpec);
}
/**
* Gets a list of virtual machine image publishers for the specified Azure location.
* @param location The name of Azure region.
* @param options The options parameters.
*/
listPublishers(location, options) {
return this.client.sendOperationRequest({ location, options }, listPublishersOperationSpec);
}
/**
* Gets a list of virtual machine image offers for the specified location and publisher.
* @param location The name of Azure region.
* @param publisherName A valid image publisher.
* @param options The options parameters.
*/
listOffers(location, publisherName, options) {
return this.client.sendOperationRequest({ location, publisherName, options }, listOffersOperationSpec);
}
/**
* Gets a list of virtual machine image SKUs for the specified location, publisher, and offer.
* @param location The name of Azure region.
* @param publisherName A valid image publisher.
* @param offer A valid image publisher offer.
* @param options The options parameters.
*/
listSkus(location, publisherName, offer, options) {
return this.client.sendOperationRequest({ location, publisherName, offer, options }, listSkusOperationSpec);
}
/**
* Gets a list of all virtual machine image versions for the specified location, publisher, offer, and
* SKU.
* @param location The name of Azure region.
* @param publisherName A valid image publisher.
* @param offer A valid image publisher offer.
* @param skus A valid image SKU.
* @param options The options parameters.
*/
list(location, publisherName, offer, skus, options) {
return this.client.sendOperationRequest({ location, publisherName, offer, skus, options }, listOperationSpec);
}
/**
* Gets a virtual machine image.
* @param location The name of Azure region.
* @param publisherName A valid image publisher.
* @param offer A valid image publisher offer.
* @param skus A valid image SKU.
* @param version A valid image SKU version.
* @param options The options parameters.
*/
get(location, publisherName, offer, skus, version, options) {
return this.client.sendOperationRequest({ location, publisherName, offer, skus, version, options }, getOperationSpec);
}
/**
* @param location The name of Azure region.
* @param publisherName A valid image publisher.
* @param offer A valid image publisher offer.
* @param skus A valid image SKU.
* @param expand The expand expression to apply on the operation.
* @param options The options parameters.
*/
listWithProperties(location, publisherName, offer, skus, expand, options) {
return this.client.sendOperationRequest({ location, publisherName, offer, skus, expand, options }, listWithPropertiesOperationSpec);
}
}
exports.VirtualMachineImagesImpl = VirtualMachineImagesImpl;
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listByEdgeZoneOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/vmimages",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.VmImagesInEdgeZoneListResult,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.location,
Parameters.edgeZone,
],
headerParameters: [Parameters.accept],
serializer,
};
const listPublishersOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "VirtualMachineImageResource",
},
},
},
},
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.location,
],
headerParameters: [Parameters.accept],
serializer,
};
const listOffersOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "VirtualMachineImageResource",
},
},
},
},
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.location,
Parameters.publisherName,
],
headerParameters: [Parameters.accept],
serializer,
};
const listSkusOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "VirtualMachineImageResource",
},
},
},
},
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.location,
Parameters.publisherName,
Parameters.offer,
],
headerParameters: [Parameters.accept],
serializer,
};
const listOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "VirtualMachineImageResource",
},
},
},
},
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [
Parameters.apiVersion,
Parameters.expand,
Parameters.top,
Parameters.orderby,
],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.location,
Parameters.publisherName,
Parameters.offer,
Parameters.skus,
],
headerParameters: [Parameters.accept],
serializer,
};
const getOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.VirtualMachineImage,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.location,
Parameters.publisherName,
Parameters.offer,
Parameters.skus,
Parameters.version,
],
headerParameters: [Parameters.accept],
serializer,
};
const listWithPropertiesOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions",
httpMethod: "GET",
responses: {
200: {
bodyMapper: {
type: {
name: "Sequence",
element: {
type: { name: "Composite", className: "VirtualMachineImage" },
},
},
},
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [
Parameters.apiVersion,
Parameters.top,
Parameters.orderby,
Parameters.expand4,
],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.location,
Parameters.publisherName,
Parameters.offer,
Parameters.skus,
],
headerParameters: [Parameters.accept],
serializer,
};
//# sourceMappingURL=virtualMachineImages.js.map