130 lines
5.3 KiB
JavaScript
130 lines
5.3 KiB
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.
|
|
*/
|
|
import * as coreClient from "@azure/core-client";
|
|
import * as Mappers from "../models/mappers";
|
|
import * as Parameters from "../models/parameters";
|
|
/** Class containing FileServices operations. */
|
|
export class FileServicesImpl {
|
|
/**
|
|
* Initialize a new instance of the class FileServices class.
|
|
* @param client Reference to the service client
|
|
*/
|
|
constructor(client) {
|
|
this.client = client;
|
|
}
|
|
/**
|
|
* List all file services in storage accounts
|
|
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
|
* case insensitive.
|
|
* @param accountName The name of the storage account within the specified resource group. Storage
|
|
* account names must be between 3 and 24 characters in length and use numbers and lower-case letters
|
|
* only.
|
|
* @param options The options parameters.
|
|
*/
|
|
list(resourceGroupName, accountName, options) {
|
|
return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listOperationSpec);
|
|
}
|
|
/**
|
|
* Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource
|
|
* Sharing) rules.
|
|
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
|
* case insensitive.
|
|
* @param accountName The name of the storage account within the specified resource group. Storage
|
|
* account names must be between 3 and 24 characters in length and use numbers and lower-case letters
|
|
* only.
|
|
* @param parameters The properties of file services in storage accounts, including CORS (Cross-Origin
|
|
* Resource Sharing) rules.
|
|
* @param options The options parameters.
|
|
*/
|
|
setServiceProperties(resourceGroupName, accountName, parameters, options) {
|
|
return this.client.sendOperationRequest({ resourceGroupName, accountName, parameters, options }, setServicePropertiesOperationSpec);
|
|
}
|
|
/**
|
|
* Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource
|
|
* Sharing) rules.
|
|
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
|
* case insensitive.
|
|
* @param accountName The name of the storage account within the specified resource group. Storage
|
|
* account names must be between 3 and 24 characters in length and use numbers and lower-case letters
|
|
* only.
|
|
* @param options The options parameters.
|
|
*/
|
|
getServiceProperties(resourceGroupName, accountName, options) {
|
|
return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, getServicePropertiesOperationSpec);
|
|
}
|
|
}
|
|
// Operation Specifications
|
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
const listOperationSpec = {
|
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices",
|
|
httpMethod: "GET",
|
|
responses: {
|
|
200: {
|
|
bodyMapper: Mappers.FileServiceItems
|
|
},
|
|
default: {
|
|
bodyMapper: Mappers.CloudError
|
|
}
|
|
},
|
|
queryParameters: [Parameters.apiVersion],
|
|
urlParameters: [
|
|
Parameters.$host,
|
|
Parameters.subscriptionId,
|
|
Parameters.resourceGroupName,
|
|
Parameters.accountName1
|
|
],
|
|
headerParameters: [Parameters.accept],
|
|
serializer
|
|
};
|
|
const setServicePropertiesOperationSpec = {
|
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}",
|
|
httpMethod: "PUT",
|
|
responses: {
|
|
200: {
|
|
bodyMapper: Mappers.FileServiceProperties
|
|
},
|
|
default: {
|
|
bodyMapper: Mappers.CloudError
|
|
}
|
|
},
|
|
requestBody: Parameters.parameters8,
|
|
queryParameters: [Parameters.apiVersion],
|
|
urlParameters: [
|
|
Parameters.$host,
|
|
Parameters.subscriptionId,
|
|
Parameters.resourceGroupName,
|
|
Parameters.accountName1,
|
|
Parameters.fileServicesName
|
|
],
|
|
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
mediaType: "json",
|
|
serializer
|
|
};
|
|
const getServicePropertiesOperationSpec = {
|
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}",
|
|
httpMethod: "GET",
|
|
responses: {
|
|
200: {
|
|
bodyMapper: Mappers.FileServiceProperties
|
|
},
|
|
default: {
|
|
bodyMapper: Mappers.CloudError
|
|
}
|
|
},
|
|
queryParameters: [Parameters.apiVersion],
|
|
urlParameters: [
|
|
Parameters.$host,
|
|
Parameters.subscriptionId,
|
|
Parameters.resourceGroupName,
|
|
Parameters.accountName1,
|
|
Parameters.fileServicesName
|
|
],
|
|
headerParameters: [Parameters.accept],
|
|
serializer
|
|
};
|
|
//# sourceMappingURL=fileServices.js.map
|