@azure/arm-compute
Version:
A generated SDK for ComputeManagementClient.
918 lines • 39.2 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.DiskAccessesImpl = void 0;
const tslib_1 = require("tslib");
const pagingHelper_js_1 = require("../pagingHelper.js");
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"));
const core_lro_1 = require("@azure/core-lro");
const lroImpl_js_1 = require("../lroImpl.js");
/// <reference lib="esnext.asynciterable" />
/** Class containing DiskAccesses operations. */
class DiskAccessesImpl {
client;
/**
* Initialize a new instance of the class DiskAccesses class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Lists all the disk access resources under a subscription.
* @param options The options parameters.
*/
list(options) {
const iter = this.listPagingAll(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(options, settings);
},
};
}
async *listPagingPage(options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._list(options);
let page = result.value || [];
continuationToken = result.nextLink;
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listNext(continuationToken, options);
continuationToken = result.nextLink;
let page = result.value || [];
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
yield page;
}
}
async *listPagingAll(options) {
for await (const page of this.listPagingPage(options)) {
yield* page;
}
}
/**
* Lists all the disk access resources under a resource group.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param options The options parameters.
*/
listByResourceGroup(resourceGroupName, options) {
const iter = this.listByResourceGroupPagingAll(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.listByResourceGroupPagingPage(resourceGroupName, options, settings);
},
};
}
async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._listByResourceGroup(resourceGroupName, options);
let page = result.value || [];
continuationToken = result.nextLink;
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
continuationToken = result.nextLink;
let page = result.value || [];
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
yield page;
}
}
async *listByResourceGroupPagingAll(resourceGroupName, options) {
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
yield* page;
}
}
/**
* List information about private endpoint connections under a disk access resource
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param options The options parameters.
*/
listPrivateEndpointConnections(resourceGroupName, diskAccessName, options) {
const iter = this.listPrivateEndpointConnectionsPagingAll(resourceGroupName, diskAccessName, 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.listPrivateEndpointConnectionsPagingPage(resourceGroupName, diskAccessName, options, settings);
},
};
}
async *listPrivateEndpointConnectionsPagingPage(resourceGroupName, diskAccessName, options, settings) {
let result;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._listPrivateEndpointConnections(resourceGroupName, diskAccessName, options);
let page = result.value || [];
continuationToken = result.nextLink;
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listPrivateEndpointConnectionsNext(resourceGroupName, diskAccessName, continuationToken, options);
continuationToken = result.nextLink;
let page = result.value || [];
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
yield page;
}
}
async *listPrivateEndpointConnectionsPagingAll(resourceGroupName, diskAccessName, options) {
for await (const page of this.listPrivateEndpointConnectionsPagingPage(resourceGroupName, diskAccessName, options)) {
yield* page;
}
}
/**
* Lists all the disk access resources under a subscription.
* @param options The options parameters.
*/
_list(options) {
return this.client.sendOperationRequest({ options }, listOperationSpec);
}
/**
* Lists all the disk access resources under a resource group.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param options The options parameters.
*/
_listByResourceGroup(resourceGroupName, options) {
return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
}
/**
* Gets information about a disk access resource.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param options The options parameters.
*/
get(resourceGroupName, diskAccessName, options) {
return this.client.sendOperationRequest({ resourceGroupName, diskAccessName, options }, getOperationSpec);
}
/**
* Creates or updates a disk access resource
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param diskAccess disk access object supplied in the body of the Put disk access operation.
* @param options The options parameters.
*/
async beginCreateOrUpdate(resourceGroupName, diskAccessName, diskAccess, 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 = (0, lroImpl_js_1.createLroSpec)({
sendOperationFn,
args: { resourceGroupName, diskAccessName, diskAccess, options },
spec: createOrUpdateOperationSpec,
});
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
restoreFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
resourceLocationConfig: "location",
});
await poller.poll();
return poller;
}
/**
* Creates or updates a disk access resource
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param diskAccess disk access object supplied in the body of the Put disk access operation.
* @param options The options parameters.
*/
async beginCreateOrUpdateAndWait(resourceGroupName, diskAccessName, diskAccess, options) {
const poller = await this.beginCreateOrUpdate(resourceGroupName, diskAccessName, diskAccess, options);
return poller.pollUntilDone();
}
/**
* Updates (patches) a disk access resource.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param diskAccess disk access object supplied in the body of the Patch disk access operation.
* @param options The options parameters.
*/
async beginUpdate(resourceGroupName, diskAccessName, diskAccess, 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 = (0, lroImpl_js_1.createLroSpec)({
sendOperationFn,
args: { resourceGroupName, diskAccessName, diskAccess, options },
spec: updateOperationSpec,
});
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
restoreFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
resourceLocationConfig: "location",
});
await poller.poll();
return poller;
}
/**
* Updates (patches) a disk access resource.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param diskAccess disk access object supplied in the body of the Patch disk access operation.
* @param options The options parameters.
*/
async beginUpdateAndWait(resourceGroupName, diskAccessName, diskAccess, options) {
const poller = await this.beginUpdate(resourceGroupName, diskAccessName, diskAccess, options);
return poller.pollUntilDone();
}
/**
* Deletes a disk access resource.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param options The options parameters.
*/
async beginDelete(resourceGroupName, diskAccessName, 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 = (0, lroImpl_js_1.createLroSpec)({
sendOperationFn,
args: { resourceGroupName, diskAccessName, options },
spec: deleteOperationSpec,
});
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
restoreFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
resourceLocationConfig: "location",
});
await poller.poll();
return poller;
}
/**
* Deletes a disk access resource.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param options The options parameters.
*/
async beginDeleteAndWait(resourceGroupName, diskAccessName, options) {
const poller = await this.beginDelete(resourceGroupName, diskAccessName, options);
return poller.pollUntilDone();
}
/**
* List information about private endpoint connections under a disk access resource
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param options The options parameters.
*/
_listPrivateEndpointConnections(resourceGroupName, diskAccessName, options) {
return this.client.sendOperationRequest({ resourceGroupName, diskAccessName, options }, listPrivateEndpointConnectionsOperationSpec);
}
/**
* Gets information about a private endpoint connection under a disk access resource.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param privateEndpointConnectionName The name of the private endpoint connection.
* @param options The options parameters.
*/
getAPrivateEndpointConnection(resourceGroupName, diskAccessName, privateEndpointConnectionName, options) {
return this.client.sendOperationRequest({
resourceGroupName,
diskAccessName,
privateEndpointConnectionName,
options,
}, getAPrivateEndpointConnectionOperationSpec);
}
/**
* Approve or reject a private endpoint connection under disk access resource, this can't be used to
* create a new private endpoint connection.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param privateEndpointConnectionName The name of the private endpoint connection.
* @param privateEndpointConnection private endpoint connection object supplied in the body of the Put
* private endpoint connection operation.
* @param options The options parameters.
*/
async beginUpdateAPrivateEndpointConnection(resourceGroupName, diskAccessName, privateEndpointConnectionName, privateEndpointConnection, 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 = (0, lroImpl_js_1.createLroSpec)({
sendOperationFn,
args: {
resourceGroupName,
diskAccessName,
privateEndpointConnectionName,
privateEndpointConnection,
options,
},
spec: updateAPrivateEndpointConnectionOperationSpec,
});
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
restoreFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
resourceLocationConfig: "location",
});
await poller.poll();
return poller;
}
/**
* Approve or reject a private endpoint connection under disk access resource, this can't be used to
* create a new private endpoint connection.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param privateEndpointConnectionName The name of the private endpoint connection.
* @param privateEndpointConnection private endpoint connection object supplied in the body of the Put
* private endpoint connection operation.
* @param options The options parameters.
*/
async beginUpdateAPrivateEndpointConnectionAndWait(resourceGroupName, diskAccessName, privateEndpointConnectionName, privateEndpointConnection, options) {
const poller = await this.beginUpdateAPrivateEndpointConnection(resourceGroupName, diskAccessName, privateEndpointConnectionName, privateEndpointConnection, options);
return poller.pollUntilDone();
}
/**
* Deletes a private endpoint connection under a disk access resource.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param privateEndpointConnectionName The name of the private endpoint connection.
* @param options The options parameters.
*/
async beginDeleteAPrivateEndpointConnection(resourceGroupName, diskAccessName, privateEndpointConnectionName, 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 = (0, lroImpl_js_1.createLroSpec)({
sendOperationFn,
args: {
resourceGroupName,
diskAccessName,
privateEndpointConnectionName,
options,
},
spec: deleteAPrivateEndpointConnectionOperationSpec,
});
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
restoreFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
resourceLocationConfig: "location",
});
await poller.poll();
return poller;
}
/**
* Deletes a private endpoint connection under a disk access resource.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param privateEndpointConnectionName The name of the private endpoint connection.
* @param options The options parameters.
*/
async beginDeleteAPrivateEndpointConnectionAndWait(resourceGroupName, diskAccessName, privateEndpointConnectionName, options) {
const poller = await this.beginDeleteAPrivateEndpointConnection(resourceGroupName, diskAccessName, privateEndpointConnectionName, options);
return poller.pollUntilDone();
}
/**
* Gets the private link resources possible under disk access resource
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param options The options parameters.
*/
getPrivateLinkResources(resourceGroupName, diskAccessName, options) {
return this.client.sendOperationRequest({ resourceGroupName, diskAccessName, options }, getPrivateLinkResourcesOperationSpec);
}
/**
* ListNext
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
_listNext(nextLink, options) {
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
}
/**
* ListByResourceGroupNext
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
* @param options The options parameters.
*/
_listByResourceGroupNext(resourceGroupName, nextLink, options) {
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
}
/**
* ListPrivateEndpointConnectionsNext
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskAccessName The name of the disk access resource that is being created. The name can't be
* changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z,
* 0-9, _ and -. The maximum name length is 80 characters.
* @param nextLink The nextLink from the previous successful call to the ListPrivateEndpointConnections
* method.
* @param options The options parameters.
*/
_listPrivateEndpointConnectionsNext(resourceGroupName, diskAccessName, nextLink, options) {
return this.client.sendOperationRequest({ resourceGroupName, diskAccessName, nextLink, options }, listPrivateEndpointConnectionsNextOperationSpec);
}
}
exports.DiskAccessesImpl = DiskAccessesImpl;
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DiskAccessList,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer,
};
const listByResourceGroupOperationSpec = {
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DiskAccessList,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
],
headerParameters: [Parameters.accept],
serializer,
};
const getOperationSpec = {
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DiskAccess,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.diskAccessName,
],
headerParameters: [Parameters.accept],
serializer,
};
const createOrUpdateOperationSpec = {
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.DiskAccess,
},
201: {
bodyMapper: Mappers.DiskAccess,
},
202: {
bodyMapper: Mappers.DiskAccess,
},
204: {
bodyMapper: Mappers.DiskAccess,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
requestBody: Parameters.diskAccess,
queryParameters: [Parameters.apiVersion1],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.diskAccessName,
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer,
};
const updateOperationSpec = {
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}",
httpMethod: "PATCH",
responses: {
200: {
bodyMapper: Mappers.DiskAccess,
},
201: {
bodyMapper: Mappers.DiskAccess,
},
202: {
bodyMapper: Mappers.DiskAccess,
},
204: {
bodyMapper: Mappers.DiskAccess,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
requestBody: Parameters.diskAccess1,
queryParameters: [Parameters.apiVersion1],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.diskAccessName,
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer,
};
const deleteOperationSpec = {
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}",
httpMethod: "DELETE",
responses: {
200: {},
201: {},
202: {},
204: {},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.diskAccessName,
],
headerParameters: [Parameters.accept],
serializer,
};
const listPrivateEndpointConnectionsOperationSpec = {
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PrivateEndpointConnectionListResult,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.diskAccessName,
],
headerParameters: [Parameters.accept],
serializer,
};
const getAPrivateEndpointConnectionOperationSpec = {
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PrivateEndpointConnection,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.diskAccessName,
Parameters.privateEndpointConnectionName,
],
headerParameters: [Parameters.accept],
serializer,
};
const updateAPrivateEndpointConnectionOperationSpec = {
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.PrivateEndpointConnection,
},
201: {
bodyMapper: Mappers.PrivateEndpointConnection,
},
202: {
bodyMapper: Mappers.PrivateEndpointConnection,
},
204: {
bodyMapper: Mappers.PrivateEndpointConnection,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
requestBody: Parameters.privateEndpointConnection,
queryParameters: [Parameters.apiVersion1],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.diskAccessName,
Parameters.privateEndpointConnectionName,
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer,
};
const deleteAPrivateEndpointConnectionOperationSpec = {
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}",
httpMethod: "DELETE",
responses: {
200: {},
201: {},
202: {},
204: {},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.diskAccessName,
Parameters.privateEndpointConnectionName,
],
headerParameters: [Parameters.accept],
serializer,
};
const getPrivateLinkResourcesOperationSpec = {
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privatelinkresources",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PrivateLinkResourceListResult,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.diskAccessName,
],
headerParameters: [Parameters.accept],
serializer,
};
const listNextOperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DiskAccessList,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.subscriptionId,
],
headerParameters: [Parameters.accept],
serializer,
};
const listByResourceGroupNextOperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DiskAccessList,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.subscriptionId,
Parameters.resourceGroupName,
],
headerParameters: [Parameters.accept],
serializer,
};
const listPrivateEndpointConnectionsNextOperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.PrivateEndpointConnectionListResult,
},
default: {
bodyMapper: Mappers.CloudError,
},
},
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.diskAccessName,
],
headerParameters: [Parameters.accept],
serializer,
};
//# sourceMappingURL=diskAccesses.js.map