@azure/arm-compute
Version:
A generated SDK for ComputeManagementClient.
246 lines • 8.87 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.VirtualMachineImagesEdgeZoneImpl = 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 VirtualMachineImagesEdgeZone operations. */
class VirtualMachineImagesEdgeZoneImpl {
client;
/**
* Initialize a new instance of the class VirtualMachineImagesEdgeZone class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Gets a list of virtual machine image publishers for the specified Azure location and edge zone.
* @param location The name of Azure region.
* @param edgeZone The name of the edge zone.
* @param options The options parameters.
*/
listPublishers(location, edgeZone, options) {
return this.client.sendOperationRequest({ location, edgeZone, options }, listPublishersOperationSpec);
}
/**
* Gets a list of virtual machine image offers for the specified location, edge zone and publisher.
* @param location The name of Azure region.
* @param edgeZone The name of the edge zone.
* @param publisherName A valid image publisher.
* @param options The options parameters.
*/
listOffers(location, edgeZone, publisherName, options) {
return this.client.sendOperationRequest({ location, edgeZone, publisherName, options }, listOffersOperationSpec);
}
/**
* Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and
* offer.
* @param location The name of Azure region.
* @param edgeZone The name of the edge zone.
* @param publisherName A valid image publisher.
* @param offer A valid image publisher offer.
* @param options The options parameters.
*/
listSkus(location, edgeZone, publisherName, offer, options) {
return this.client.sendOperationRequest({ location, edgeZone, publisherName, offer, options }, listSkusOperationSpec);
}
/**
* Gets a list of all virtual machine image versions for the specified location, edge zone, publisher,
* offer, and SKU.
* @param location The name of Azure region.
* @param edgeZone The name of the edge zone.
* @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, edgeZone, publisherName, offer, skus, options) {
return this.client.sendOperationRequest({ location, edgeZone, publisherName, offer, skus, options }, listOperationSpec);
}
/**
* Gets a virtual machine image in an edge zone.
* @param location The name of Azure region.
* @param edgeZone The name of the edge zone.
* @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, edgeZone, publisherName, offer, skus, version, options) {
return this.client.sendOperationRequest({ location, edgeZone, publisherName, offer, skus, version, options }, getOperationSpec);
}
}
exports.VirtualMachineImagesEdgeZoneImpl = VirtualMachineImagesEdgeZoneImpl;
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listPublishersOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/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,
Parameters.edgeZone,
],
headerParameters: [Parameters.accept],
serializer,
};
const listOffersOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/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.edgeZone,
Parameters.publisherName,
],
headerParameters: [Parameters.accept],
serializer,
};
const listSkusOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/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.edgeZone,
Parameters.publisherName,
Parameters.offer,
],
headerParameters: [Parameters.accept],
serializer,
};
const listOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/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.edgeZone,
Parameters.publisherName,
Parameters.offer,
Parameters.skus,
],
headerParameters: [Parameters.accept],
serializer,
};
const getOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/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.edgeZone,
Parameters.publisherName,
Parameters.offer,
Parameters.skus,
Parameters.version,
],
headerParameters: [Parameters.accept],
serializer,
};
//# sourceMappingURL=virtualMachineImagesEdgeZone.js.map