diff --git a/packages/@azure/arm-features/.npmignore b/packages/@azure/arm-features/.npmignore
new file mode 100644
index 000000000000..a07a455ac10c
--- /dev/null
+++ b/packages/@azure/arm-features/.npmignore
@@ -0,0 +1,35 @@
+#git
+.git
+.gitignore
+#gulp
+gulpfile.js
+#documentation
+doc/
+docs/
+#dependencies
+node_modules/
+#samples
+sample/
+samples/
+#tests
+test/
+tests/
+coverage/
+#tools and scripts
+tools/
+scripts/
+#IDE settings
+*.sln
+.vscode/
+.idea
+.editorconfig
+.ntvs_analysis.*
+#build tools
+.travis.yml
+.jenkins.yml
+.codeclimate.yml
+appveyor.yml
+# Nuget packages #
+.nuget/
+packages/
+packages.config
diff --git a/packages/@azure/arm-features/LICENSE.txt b/packages/@azure/arm-features/LICENSE.txt
new file mode 100644
index 000000000000..5431ba98b936
--- /dev/null
+++ b/packages/@azure/arm-features/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018 Microsoft
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/@azure/arm-features/README.md b/packages/@azure/arm-features/README.md
new file mode 100644
index 000000000000..eaff3c18c2a5
--- /dev/null
+++ b/packages/@azure/arm-features/README.md
@@ -0,0 +1,77 @@
+# Azure FeatureClient SDK for JavaScript
+This package contains an isomorphic SDK for FeatureClient.
+
+## Currently supported environments
+- Node.js version 6.x.x or higher
+- Browser JavaScript
+
+## How to Install
+```
+npm install @azure/arm-features
+```
+
+
+## How to use
+
+### nodejs - Authentication, client creation and listOperations as an example written in TypeScript.
+
+```ts
+import * as msRest from "ms-rest-js";
+import * as msRestAzure from "ms-rest-azure-js";
+import * as msRestNodeAuth from "ms-rest-nodeauth";
+import { FeatureClient, FeatureModels, FeatureMappers } from "@azure/arm-features";
+const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
+
+msRestNodeAuth.interactiveLogin().then((creds) => {
+ const client = new FeatureClient(creds, subscriptionId);
+ client.listOperations().then((result) => {
+ console.log("The result is:");
+ console.log(result);
+ });
+}).catch((err) => {
+ console.error(err);
+});
+```
+
+### browser - Authentication, client creation and listOperations as an example written in JavaScript.
+See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
+
+- index.html
+```html
+
+
+
+ @azure/arm-features sample
+
+
+
+
+
+
+
+
+
+```
+
+# Related projects
+ - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
diff --git a/packages/@azure/arm-features/lib/featureClient.ts b/packages/@azure/arm-features/lib/featureClient.ts
new file mode 100644
index 000000000000..7cf4c543e808
--- /dev/null
+++ b/packages/@azure/arm-features/lib/featureClient.ts
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+import * as Models from "./models";
+import * as Mappers from "./models/mappers";
+import * as Parameters from "./models/parameters";
+import * as operations from "./operations";
+import { FeatureClientContext } from "./featureClientContext";
+
+
+class FeatureClient extends FeatureClientContext {
+ // Operation groups
+ features: operations.Features;
+
+ /**
+ * Initializes a new instance of the FeatureClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId The ID of the target subscription.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.FeatureClientOptions) {
+ super(credentials, subscriptionId, options);
+ this.features = new operations.Features(this);
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listOperations(options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param callback The callback
+ */
+ listOperations(callback: msRest.ServiceCallback): void;
+ /**
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listOperations(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listOperations(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ options
+ },
+ listOperationsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Lists all of the available Microsoft.Features REST API operations.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listOperationsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listOperationsNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listOperationsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listOperationsNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listOperationsNextOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listOperationsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "providers/Microsoft.Features/operations",
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.OperationListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listOperationsNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.OperationListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+export {
+ FeatureClient,
+ FeatureClientContext,
+ Models as FeatureModels,
+ Mappers as FeatureMappers
+};
+export * from "./operations";
diff --git a/packages/@azure/arm-features/lib/featureClientContext.ts b/packages/@azure/arm-features/lib/featureClientContext.ts
new file mode 100644
index 000000000000..537005bd02f9
--- /dev/null
+++ b/packages/@azure/arm-features/lib/featureClientContext.ts
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as Models from "./models";
+import * as msRest from "ms-rest-js";
+import * as msRestAzure from "ms-rest-azure-js";
+
+const packageName = "@azure/arm-features";
+const packageVersion = "1.0.0";
+
+export class FeatureClientContext extends msRestAzure.AzureServiceClient {
+
+ credentials: msRest.ServiceClientCredentials;
+
+ subscriptionId: string;
+
+ apiVersion: string;
+
+ acceptLanguage: string;
+
+ longRunningOperationRetryTimeout: number;
+
+ /**
+ * Initializes a new instance of the FeatureClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId The ID of the target subscription.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.FeatureClientOptions) {
+ if (credentials == undefined) {
+ throw new Error('\'credentials\' cannot be null.');
+ }
+ if (subscriptionId == undefined) {
+ throw new Error('\'subscriptionId\' cannot be null.');
+ }
+
+ if (!options) {
+ options = {};
+ }
+ super(credentials, options);
+
+ this.apiVersion = '2015-12-01';
+ this.acceptLanguage = 'en-US';
+ this.longRunningOperationRetryTimeout = 30;
+ this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
+ this.requestContentType = "application/json; charset=utf-8";
+ this.credentials = credentials;
+ this.subscriptionId = subscriptionId;
+
+ this.addUserAgentInfo(`${packageName}/${packageVersion}`);
+ if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
+ this.acceptLanguage = options.acceptLanguage;
+ }
+ if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
+ this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
+ }
+ }
+}
diff --git a/packages/@azure/arm-features/lib/models/featuresMappers.ts b/packages/@azure/arm-features/lib/models/featuresMappers.ts
new file mode 100644
index 000000000000..f76e186d07a8
--- /dev/null
+++ b/packages/@azure/arm-features/lib/models/featuresMappers.ts
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+export {
+ FeatureOperationsListResult,
+ FeatureResult,
+ FeatureProperties,
+ CloudError
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-features/lib/models/index.ts b/packages/@azure/arm-features/lib/models/index.ts
new file mode 100644
index 000000000000..3ae9bc4d840d
--- /dev/null
+++ b/packages/@azure/arm-features/lib/models/index.ts
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import { BaseResource, CloudError, AzureServiceClientOptions } from "ms-rest-azure-js";
+import * as msRest from "ms-rest-js";
+
+export { BaseResource, CloudError };
+
+
+/**
+ * @interface
+ * An interface representing FeatureProperties.
+ * Information about feature.
+ *
+ */
+export interface FeatureProperties {
+ /**
+ * @member {string} [state] The registration state of the feature for the
+ * subscription.
+ */
+ state?: string;
+}
+
+/**
+ * @interface
+ * An interface representing FeatureResult.
+ * Previewed feature information.
+ *
+ */
+export interface FeatureResult {
+ /**
+ * @member {string} [name] The name of the feature.
+ */
+ name?: string;
+ /**
+ * @member {FeatureProperties} [properties] Properties of the previewed
+ * feature.
+ */
+ properties?: FeatureProperties;
+ /**
+ * @member {string} [id] The resource ID of the feature.
+ */
+ id?: string;
+ /**
+ * @member {string} [type] The resource type of the feature.
+ */
+ type?: string;
+}
+
+/**
+ * @interface
+ * An interface representing OperationDisplay.
+ * The object that represents the operation.
+ *
+ */
+export interface OperationDisplay {
+ /**
+ * @member {string} [provider] Service provider: Microsoft.Features
+ */
+ provider?: string;
+ /**
+ * @member {string} [resource] Resource on which the operation is performed:
+ * Profile, endpoint, etc.
+ */
+ resource?: string;
+ /**
+ * @member {string} [operation] Operation type: Read, write, delete, etc.
+ */
+ operation?: string;
+}
+
+/**
+ * @interface
+ * An interface representing Operation.
+ * Microsoft.Features operation
+ *
+ */
+export interface Operation {
+ /**
+ * @member {string} [name] Operation name: {provider}/{resource}/{operation}
+ */
+ name?: string;
+ /**
+ * @member {OperationDisplay} [display] The object that represents the
+ * operation.
+ */
+ display?: OperationDisplay;
+}
+
+/**
+ * @interface
+ * An interface representing FeatureClientOptions.
+ * @extends AzureServiceClientOptions
+ */
+export interface FeatureClientOptions extends AzureServiceClientOptions {
+ /**
+ * @member {string} [baseUri]
+ */
+ baseUri?: string;
+}
+
+
+/**
+ * @interface
+ * An interface representing the OperationListResult.
+ * Result of the request to list Microsoft.Features operations. It contains a
+ * list of operations and a URL link to get the next set of results.
+ *
+ * @extends Array
+ */
+export interface OperationListResult extends Array {
+ /**
+ * @member {string} [nextLink] URL to get the next set of operation list
+ * results if there are any.
+ */
+ nextLink?: string;
+}
+
+/**
+ * @interface
+ * An interface representing the FeatureOperationsListResult.
+ * List of previewed features.
+ *
+ * @extends Array
+ */
+export interface FeatureOperationsListResult extends Array {
+ /**
+ * @member {string} [nextLink] The URL to use for getting the next set of
+ * results.
+ */
+ nextLink?: string;
+}
+
+/**
+ * Contains response data for the listOperations operation.
+ */
+export type ListOperationsResponse = OperationListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: OperationListResult;
+ };
+};
+
+/**
+ * Contains response data for the listOperationsNext operation.
+ */
+export type ListOperationsNextResponse = OperationListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: OperationListResult;
+ };
+};
+
+/**
+ * Contains response data for the listAll operation.
+ */
+export type FeaturesListAllResponse = FeatureOperationsListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: FeatureOperationsListResult;
+ };
+};
+
+/**
+ * Contains response data for the list operation.
+ */
+export type FeaturesListResponse = FeatureOperationsListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: FeatureOperationsListResult;
+ };
+};
+
+/**
+ * Contains response data for the get operation.
+ */
+export type FeaturesGetResponse = FeatureResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: FeatureResult;
+ };
+};
+
+/**
+ * Contains response data for the register operation.
+ */
+export type FeaturesRegisterResponse = FeatureResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: FeatureResult;
+ };
+};
+
+/**
+ * Contains response data for the listAllNext operation.
+ */
+export type FeaturesListAllNextResponse = FeatureOperationsListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: FeatureOperationsListResult;
+ };
+};
+
+/**
+ * Contains response data for the listNext operation.
+ */
+export type FeaturesListNextResponse = FeatureOperationsListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: FeatureOperationsListResult;
+ };
+};
diff --git a/packages/@azure/arm-features/lib/models/mappers.ts b/packages/@azure/arm-features/lib/models/mappers.ts
new file mode 100644
index 000000000000..454c334e20cc
--- /dev/null
+++ b/packages/@azure/arm-features/lib/models/mappers.ts
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import { CloudErrorMapper, BaseResourceMapper } from "ms-rest-azure-js";
+import * as msRest from "ms-rest-js";
+
+export const CloudError = CloudErrorMapper;
+export const BaseResource = BaseResourceMapper;
+
+export const FeatureProperties: msRest.CompositeMapper = {
+ serializedName: "FeatureProperties",
+ type: {
+ name: "Composite",
+ className: "FeatureProperties",
+ modelProperties: {
+ state: {
+ serializedName: "state",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const FeatureResult: msRest.CompositeMapper = {
+ serializedName: "FeatureResult",
+ type: {
+ name: "Composite",
+ className: "FeatureResult",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ properties: {
+ serializedName: "properties",
+ type: {
+ name: "Composite",
+ className: "FeatureProperties"
+ }
+ },
+ id: {
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ serializedName: "type",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const OperationDisplay: msRest.CompositeMapper = {
+ serializedName: "Operation_display",
+ type: {
+ name: "Composite",
+ className: "OperationDisplay",
+ modelProperties: {
+ provider: {
+ serializedName: "provider",
+ type: {
+ name: "String"
+ }
+ },
+ resource: {
+ serializedName: "resource",
+ type: {
+ name: "String"
+ }
+ },
+ operation: {
+ serializedName: "operation",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Operation: msRest.CompositeMapper = {
+ serializedName: "Operation",
+ type: {
+ name: "Composite",
+ className: "Operation",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ display: {
+ serializedName: "display",
+ type: {
+ name: "Composite",
+ className: "OperationDisplay"
+ }
+ }
+ }
+ }
+};
+
+export const OperationListResult: msRest.CompositeMapper = {
+ serializedName: "OperationListResult",
+ type: {
+ name: "Composite",
+ className: "OperationListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Operation"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const FeatureOperationsListResult: msRest.CompositeMapper = {
+ serializedName: "FeatureOperationsListResult",
+ type: {
+ name: "Composite",
+ className: "FeatureOperationsListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "FeatureResult"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
diff --git a/packages/@azure/arm-features/lib/models/parameters.ts b/packages/@azure/arm-features/lib/models/parameters.ts
new file mode 100644
index 000000000000..53cc6570c4e7
--- /dev/null
+++ b/packages/@azure/arm-features/lib/models/parameters.ts
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+
+export const acceptLanguage: msRest.OperationParameter = {
+ parameterPath: "acceptLanguage",
+ mapper: {
+ serializedName: "accept-language",
+ defaultValue: 'en-US',
+ type: {
+ name: "String"
+ }
+ }
+};
+export const apiVersion: msRest.OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ required: true,
+ serializedName: "api-version",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const featureName: msRest.OperationURLParameter = {
+ parameterPath: "featureName",
+ mapper: {
+ required: true,
+ serializedName: "featureName",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const nextPageLink: msRest.OperationURLParameter = {
+ parameterPath: "nextPageLink",
+ mapper: {
+ required: true,
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+export const resourceProviderNamespace: msRest.OperationURLParameter = {
+ parameterPath: "resourceProviderNamespace",
+ mapper: {
+ required: true,
+ serializedName: "resourceProviderNamespace",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const subscriptionId: msRest.OperationURLParameter = {
+ parameterPath: "subscriptionId",
+ mapper: {
+ required: true,
+ serializedName: "subscriptionId",
+ type: {
+ name: "String"
+ }
+ }
+};
diff --git a/packages/@azure/arm-features/lib/operations/features.ts b/packages/@azure/arm-features/lib/operations/features.ts
new file mode 100644
index 000000000000..ab1acfff4fc1
--- /dev/null
+++ b/packages/@azure/arm-features/lib/operations/features.ts
@@ -0,0 +1,343 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/featuresMappers";
+import * as Parameters from "../models/parameters";
+import { FeatureClientContext } from "../featureClientContext";
+
+/** Class representing a Features. */
+export class Features {
+ private readonly client: FeatureClientContext;
+
+ /**
+ * Create a Features.
+ * @param {FeatureClientContext} client Reference to the service client.
+ */
+ constructor(client: FeatureClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Gets all the preview features that are available through AFEC for the subscription.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAll(options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param callback The callback
+ */
+ listAll(callback: msRest.ServiceCallback): void;
+ /**
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAll(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listAll(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ options
+ },
+ listAllOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the preview features in a provider namespace that are available through AFEC for the
+ * subscription.
+ * @param resourceProviderNamespace The namespace of the resource provider for getting features.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ list(resourceProviderNamespace: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceProviderNamespace The namespace of the resource provider for getting features.
+ * @param callback The callback
+ */
+ list(resourceProviderNamespace: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceProviderNamespace The namespace of the resource provider for getting features.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ list(resourceProviderNamespace: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ list(resourceProviderNamespace: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceProviderNamespace,
+ options
+ },
+ listOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets the preview feature with the specified name.
+ * @param resourceProviderNamespace The resource provider namespace for the feature.
+ * @param featureName The name of the feature to get.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ get(resourceProviderNamespace: string, featureName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceProviderNamespace The resource provider namespace for the feature.
+ * @param featureName The name of the feature to get.
+ * @param callback The callback
+ */
+ get(resourceProviderNamespace: string, featureName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceProviderNamespace The resource provider namespace for the feature.
+ * @param featureName The name of the feature to get.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ get(resourceProviderNamespace: string, featureName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ get(resourceProviderNamespace: string, featureName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceProviderNamespace,
+ featureName,
+ options
+ },
+ getOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Registers the preview feature for the subscription.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param featureName The name of the feature to register.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ register(resourceProviderNamespace: string, featureName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param featureName The name of the feature to register.
+ * @param callback The callback
+ */
+ register(resourceProviderNamespace: string, featureName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param featureName The name of the feature to register.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ register(resourceProviderNamespace: string, featureName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ register(resourceProviderNamespace: string, featureName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceProviderNamespace,
+ featureName,
+ options
+ },
+ registerOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the preview features that are available through AFEC for the subscription.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAllNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listAllNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAllNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listAllNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listAllNextOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the preview features in a provider namespace that are available through AFEC for the
+ * subscription.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listNextOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listAllOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/providers/Microsoft.Features/features",
+ urlParameters: [
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.FeatureOperationsListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features",
+ urlParameters: [
+ Parameters.resourceProviderNamespace,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.FeatureOperationsListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const getOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}",
+ urlParameters: [
+ Parameters.resourceProviderNamespace,
+ Parameters.featureName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.FeatureResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const registerOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "subscriptions/{subscriptionId}/providers/Microsoft.Features/providers/{resourceProviderNamespace}/features/{featureName}/register",
+ urlParameters: [
+ Parameters.resourceProviderNamespace,
+ Parameters.featureName,
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.FeatureResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listAllNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.FeatureOperationsListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.FeatureOperationsListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/arm-features/lib/operations/index.ts b/packages/@azure/arm-features/lib/operations/index.ts
new file mode 100644
index 000000000000..e7a795418c8a
--- /dev/null
+++ b/packages/@azure/arm-features/lib/operations/index.ts
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+export * from "./features";
diff --git a/packages/@azure/arm-features/package.json b/packages/@azure/arm-features/package.json
new file mode 100644
index 000000000000..2bdf8e328854
--- /dev/null
+++ b/packages/@azure/arm-features/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "@azure/arm-features",
+ "author": "Microsoft Corporation",
+ "description": "FeatureClient Library with typescript type definitions for node.js and browser.",
+ "version": "1.0.0",
+ "dependencies": {
+ "ms-rest-azure-js": "^1.0.166",
+ "ms-rest-js": "^1.0.439",
+ "tslib": "^1.9.3"
+ },
+ "keywords": [
+ "node",
+ "azure",
+ "typescript",
+ "browser",
+ "isomorphic"
+ ],
+ "license": "MIT",
+ "main": "./dist/arm-features.js",
+ "module": "./esm/featureClient.js",
+ "types": "./esm/featureClient.d.ts",
+ "devDependencies": {
+ "typescript": "^3.1.1",
+ "rollup": "^0.66.2",
+ "rollup-plugin-node-resolve": "^3.4.0",
+ "uglify-js": "^3.4.9"
+ },
+ "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/arm-features",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/azure/azure-sdk-for-js.git"
+ },
+ "bugs": {
+ "url": "https://github.com/azure/azure-sdk-for-js/issues"
+ },
+ "scripts": {
+ "build": "tsc && rollup -c rollup.config.js && npm run minify",
+ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-features.js.map'\" -o ./dist/arm-features.min.js ./dist/arm-features.js",
+ "prepare": "npm run build"
+ },
+ "sideEffects": false
+}
diff --git a/packages/@azure/arm-features/rollup.config.js b/packages/@azure/arm-features/rollup.config.js
new file mode 100644
index 000000000000..ea7d5bae5c13
--- /dev/null
+++ b/packages/@azure/arm-features/rollup.config.js
@@ -0,0 +1,31 @@
+import nodeResolve from "rollup-plugin-node-resolve";
+/**
+ * @type {import('rollup').RollupFileOptions}
+ */
+const config = {
+ input: './esm/featureClient.js',
+ external: ["ms-rest-js", "ms-rest-azure-js"],
+ output: {
+ file: "./dist/arm-features.js",
+ format: "umd",
+ name: "Azure.ArmFeatures",
+ sourcemap: true,
+ globals: {
+ "ms-rest-js": "msRest",
+ "ms-rest-azure-js": "msRestAzure"
+ },
+ banner: `/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */`
+ },
+ plugins: [
+ nodeResolve({ module: true })
+ ]
+};
+export default config;
diff --git a/packages/@azure/arm-features/tsconfig.json b/packages/@azure/arm-features/tsconfig.json
new file mode 100644
index 000000000000..f32d1664f320
--- /dev/null
+++ b/packages/@azure/arm-features/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "es6",
+ "moduleResolution": "node",
+ "strict": true,
+ "target": "es5",
+ "sourceMap": true,
+ "declarationMap": true,
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true,
+ "forceConsistentCasingInFileNames": true,
+ "lib": ["es6"],
+ "declaration": true,
+ "outDir": "./esm",
+ "importHelpers": true
+ },
+ "include": ["./lib/**/*"],
+ "exclude": ["node_modules"]
+}
diff --git a/packages/@azure/arm-links/.npmignore b/packages/@azure/arm-links/.npmignore
new file mode 100644
index 000000000000..a07a455ac10c
--- /dev/null
+++ b/packages/@azure/arm-links/.npmignore
@@ -0,0 +1,35 @@
+#git
+.git
+.gitignore
+#gulp
+gulpfile.js
+#documentation
+doc/
+docs/
+#dependencies
+node_modules/
+#samples
+sample/
+samples/
+#tests
+test/
+tests/
+coverage/
+#tools and scripts
+tools/
+scripts/
+#IDE settings
+*.sln
+.vscode/
+.idea
+.editorconfig
+.ntvs_analysis.*
+#build tools
+.travis.yml
+.jenkins.yml
+.codeclimate.yml
+appveyor.yml
+# Nuget packages #
+.nuget/
+packages/
+packages.config
diff --git a/packages/@azure/arm-links/LICENSE.txt b/packages/@azure/arm-links/LICENSE.txt
new file mode 100644
index 000000000000..5431ba98b936
--- /dev/null
+++ b/packages/@azure/arm-links/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018 Microsoft
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/@azure/arm-links/README.md b/packages/@azure/arm-links/README.md
new file mode 100644
index 000000000000..8f19f384fbab
--- /dev/null
+++ b/packages/@azure/arm-links/README.md
@@ -0,0 +1,77 @@
+# Azure ManagementLinkClient SDK for JavaScript
+This package contains an isomorphic SDK for ManagementLinkClient.
+
+## Currently supported environments
+- Node.js version 6.x.x or higher
+- Browser JavaScript
+
+## How to Install
+```
+npm install @azure/arm-links
+```
+
+
+## How to use
+
+### nodejs - Authentication, client creation and list operations as an example written in TypeScript.
+
+```ts
+import * as msRest from "ms-rest-js";
+import * as msRestAzure from "ms-rest-azure-js";
+import * as msRestNodeAuth from "ms-rest-nodeauth";
+import { ManagementLinkClient, ManagementLinkModels, ManagementLinkMappers } from "@azure/arm-links";
+const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
+
+msRestNodeAuth.interactiveLogin().then((creds) => {
+ const client = new ManagementLinkClient(creds, subscriptionId);
+ client.operations.list().then((result) => {
+ console.log("The result is:");
+ console.log(result);
+ });
+}).catch((err) => {
+ console.error(err);
+});
+```
+
+### browser - Authentication, client creation and list operations as an example written in JavaScript.
+See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
+
+- index.html
+```html
+
+
+
+ @azure/arm-links sample
+
+
+
+
+
+
+
+
+
+```
+
+# Related projects
+ - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
diff --git a/packages/@azure/arm-links/lib/managementLinkClient.ts b/packages/@azure/arm-links/lib/managementLinkClient.ts
new file mode 100644
index 000000000000..79f1c4abde29
--- /dev/null
+++ b/packages/@azure/arm-links/lib/managementLinkClient.ts
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+import * as Models from "./models";
+import * as Mappers from "./models/mappers";
+import * as operations from "./operations";
+import { ManagementLinkClientContext } from "./managementLinkClientContext";
+
+
+class ManagementLinkClient extends ManagementLinkClientContext {
+ // Operation groups
+ operations: operations.Operations;
+ resourceLinks: operations.ResourceLinks;
+
+ /**
+ * Initializes a new instance of the ManagementLinkClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId The ID of the target subscription.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLinkClientOptions) {
+ super(credentials, subscriptionId, options);
+ this.operations = new operations.Operations(this);
+ this.resourceLinks = new operations.ResourceLinks(this);
+ }
+}
+
+// Operation Specifications
+
+export {
+ ManagementLinkClient,
+ ManagementLinkClientContext,
+ Models as ManagementLinkModels,
+ Mappers as ManagementLinkMappers
+};
+export * from "./operations";
diff --git a/packages/@azure/arm-links/lib/managementLinkClientContext.ts b/packages/@azure/arm-links/lib/managementLinkClientContext.ts
new file mode 100644
index 000000000000..9e58ddcb9e10
--- /dev/null
+++ b/packages/@azure/arm-links/lib/managementLinkClientContext.ts
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as Models from "./models";
+import * as msRest from "ms-rest-js";
+import * as msRestAzure from "ms-rest-azure-js";
+
+const packageName = "@azure/arm-links";
+const packageVersion = "1.0.0";
+
+export class ManagementLinkClientContext extends msRestAzure.AzureServiceClient {
+
+ credentials: msRest.ServiceClientCredentials;
+
+ subscriptionId: string;
+
+ apiVersion: string;
+
+ acceptLanguage: string;
+
+ longRunningOperationRetryTimeout: number;
+
+ /**
+ * Initializes a new instance of the ManagementLinkClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId The ID of the target subscription.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLinkClientOptions) {
+ if (credentials == undefined) {
+ throw new Error('\'credentials\' cannot be null.');
+ }
+ if (subscriptionId == undefined) {
+ throw new Error('\'subscriptionId\' cannot be null.');
+ }
+
+ if (!options) {
+ options = {};
+ }
+ super(credentials, options);
+
+ this.apiVersion = '2016-09-01';
+ this.acceptLanguage = 'en-US';
+ this.longRunningOperationRetryTimeout = 30;
+ this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
+ this.requestContentType = "application/json; charset=utf-8";
+ this.credentials = credentials;
+ this.subscriptionId = subscriptionId;
+
+ this.addUserAgentInfo(`${packageName}/${packageVersion}`);
+ if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
+ this.acceptLanguage = options.acceptLanguage;
+ }
+ if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
+ this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
+ }
+ }
+}
diff --git a/packages/@azure/arm-links/lib/models/index.ts b/packages/@azure/arm-links/lib/models/index.ts
new file mode 100644
index 000000000000..256854911106
--- /dev/null
+++ b/packages/@azure/arm-links/lib/models/index.ts
@@ -0,0 +1,370 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import { BaseResource, CloudError, AzureServiceClientOptions } from "ms-rest-azure-js";
+import * as msRest from "ms-rest-js";
+
+export { BaseResource, CloudError };
+
+
+/**
+ * @interface
+ * An interface representing ResourceLinkFilter.
+ * Resource link filter.
+ *
+ */
+export interface ResourceLinkFilter {
+ /**
+ * @member {string} targetId The ID of the target resource.
+ */
+ targetId: string;
+}
+
+/**
+ * @interface
+ * An interface representing ResourceLinkProperties.
+ * The resource link properties.
+ *
+ */
+export interface ResourceLinkProperties {
+ /**
+ * @member {string} [sourceId] The fully qualified ID of the source resource
+ * in the link.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly sourceId?: string;
+ /**
+ * @member {string} targetId The fully qualified ID of the target resource in
+ * the link.
+ */
+ targetId: string;
+ /**
+ * @member {string} [notes] Notes about the resource link.
+ */
+ notes?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ResourceLink.
+ * The resource link.
+ *
+ * @extends BaseResource
+ */
+export interface ResourceLink extends BaseResource {
+ /**
+ * @member {string} [id] The fully qualified ID of the resource link.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [name] The name of the resource link.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {any} [type] The resource link object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly type?: any;
+ /**
+ * @member {ResourceLinkProperties} [properties] Properties for resource
+ * link.
+ */
+ properties?: ResourceLinkProperties;
+}
+
+/**
+ * @interface
+ * An interface representing OperationDisplay.
+ * The object that represents the operation.
+ *
+ */
+export interface OperationDisplay {
+ /**
+ * @member {string} [provider] Service provider: Microsoft.Resources
+ */
+ provider?: string;
+ /**
+ * @member {string} [resource] Resource on which the operation is performed:
+ * Profile, endpoint, etc.
+ */
+ resource?: string;
+ /**
+ * @member {string} [operation] Operation type: Read, write, delete, etc.
+ */
+ operation?: string;
+ /**
+ * @member {string} [description] Description of the operation.
+ */
+ description?: string;
+}
+
+/**
+ * @interface
+ * An interface representing Operation.
+ * Microsoft.Resources operation
+ *
+ */
+export interface Operation {
+ /**
+ * @member {string} [name] Operation name: {provider}/{resource}/{operation}
+ */
+ name?: string;
+ /**
+ * @member {OperationDisplay} [display] The object that represents the
+ * operation.
+ */
+ display?: OperationDisplay;
+}
+
+/**
+ * @interface
+ * An interface representing ResourceLinksListAtSubscriptionOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface ResourceLinksListAtSubscriptionOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [filter] The filter to apply on the list resource links
+ * operation. The supported filter for list resource links is targetid. For
+ * example, $filter=targetid eq {value}
+ */
+ filter?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ResourceLinksListAtSourceScopeOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface ResourceLinksListAtSourceScopeOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [filter] The filter to apply when getting resource links.
+ * To get links only at the specified scope (not below the scope), use
+ * Filter.atScope().
+ */
+ filter?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ManagementLinkClientOptions.
+ * @extends AzureServiceClientOptions
+ */
+export interface ManagementLinkClientOptions extends AzureServiceClientOptions {
+ /**
+ * @member {string} [baseUri]
+ */
+ baseUri?: string;
+}
+
+
+/**
+ * @interface
+ * An interface representing the OperationListResult.
+ * Result of the request to list Microsoft.Resources operations. It contains a
+ * list of operations and a URL link to get the next set of results.
+ *
+ * @extends Array
+ */
+export interface OperationListResult extends Array {
+ /**
+ * @member {string} [nextLink] URL to get the next set of operation list
+ * results if there are any.
+ */
+ nextLink?: string;
+}
+
+/**
+ * @interface
+ * An interface representing the ResourceLinkResult.
+ * List of resource links.
+ *
+ * @extends Array
+ */
+export interface ResourceLinkResult extends Array {
+ /**
+ * @member {string} [nextLink] The URL to use for getting the next set of
+ * results.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly nextLink?: string;
+}
+
+/**
+ * Defines values for Filter.
+ * Possible values include: 'atScope()'
+ * @readonly
+ * @enum {string}
+ */
+export enum Filter {
+ AtScope = 'atScope()',
+}
+
+/**
+ * Contains response data for the list operation.
+ */
+export type OperationsListResponse = OperationListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: OperationListResult;
+ };
+};
+
+/**
+ * Contains response data for the listNext operation.
+ */
+export type OperationsListNextResponse = OperationListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: OperationListResult;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdate operation.
+ */
+export type ResourceLinksCreateOrUpdateResponse = ResourceLink & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ResourceLink;
+ };
+};
+
+/**
+ * Contains response data for the get operation.
+ */
+export type ResourceLinksGetResponse = ResourceLink & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ResourceLink;
+ };
+};
+
+/**
+ * Contains response data for the listAtSubscription operation.
+ */
+export type ResourceLinksListAtSubscriptionResponse = ResourceLinkResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ResourceLinkResult;
+ };
+};
+
+/**
+ * Contains response data for the listAtSourceScope operation.
+ */
+export type ResourceLinksListAtSourceScopeResponse = ResourceLinkResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ResourceLinkResult;
+ };
+};
+
+/**
+ * Contains response data for the listAtSubscriptionNext operation.
+ */
+export type ResourceLinksListAtSubscriptionNextResponse = ResourceLinkResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ResourceLinkResult;
+ };
+};
+
+/**
+ * Contains response data for the listAtSourceScopeNext operation.
+ */
+export type ResourceLinksListAtSourceScopeNextResponse = ResourceLinkResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ResourceLinkResult;
+ };
+};
diff --git a/packages/@azure/arm-links/lib/models/mappers.ts b/packages/@azure/arm-links/lib/models/mappers.ts
new file mode 100644
index 000000000000..4434c87988c8
--- /dev/null
+++ b/packages/@azure/arm-links/lib/models/mappers.ts
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import { CloudErrorMapper, BaseResourceMapper } from "ms-rest-azure-js";
+import * as msRest from "ms-rest-js";
+
+export const CloudError = CloudErrorMapper;
+export const BaseResource = BaseResourceMapper;
+
+export const ResourceLinkFilter: msRest.CompositeMapper = {
+ serializedName: "ResourceLinkFilter",
+ type: {
+ name: "Composite",
+ className: "ResourceLinkFilter",
+ modelProperties: {
+ targetId: {
+ required: true,
+ serializedName: "targetId",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ResourceLinkProperties: msRest.CompositeMapper = {
+ serializedName: "ResourceLinkProperties",
+ type: {
+ name: "Composite",
+ className: "ResourceLinkProperties",
+ modelProperties: {
+ sourceId: {
+ readOnly: true,
+ serializedName: "sourceId",
+ type: {
+ name: "String"
+ }
+ },
+ targetId: {
+ required: true,
+ serializedName: "targetId",
+ type: {
+ name: "String"
+ }
+ },
+ notes: {
+ serializedName: "notes",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ResourceLink: msRest.CompositeMapper = {
+ serializedName: "ResourceLink",
+ type: {
+ name: "Composite",
+ className: "ResourceLink",
+ modelProperties: {
+ id: {
+ readOnly: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ readOnly: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ readOnly: true,
+ serializedName: "type",
+ type: {
+ name: "Object"
+ }
+ },
+ properties: {
+ serializedName: "properties",
+ type: {
+ name: "Composite",
+ className: "ResourceLinkProperties"
+ }
+ }
+ }
+ }
+};
+
+export const OperationDisplay: msRest.CompositeMapper = {
+ serializedName: "Operation_display",
+ type: {
+ name: "Composite",
+ className: "OperationDisplay",
+ modelProperties: {
+ provider: {
+ serializedName: "provider",
+ type: {
+ name: "String"
+ }
+ },
+ resource: {
+ serializedName: "resource",
+ type: {
+ name: "String"
+ }
+ },
+ operation: {
+ serializedName: "operation",
+ type: {
+ name: "String"
+ }
+ },
+ description: {
+ serializedName: "description",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Operation: msRest.CompositeMapper = {
+ serializedName: "Operation",
+ type: {
+ name: "Composite",
+ className: "Operation",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ display: {
+ serializedName: "display",
+ type: {
+ name: "Composite",
+ className: "OperationDisplay"
+ }
+ }
+ }
+ }
+};
+
+export const OperationListResult: msRest.CompositeMapper = {
+ serializedName: "OperationListResult",
+ type: {
+ name: "Composite",
+ className: "OperationListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Operation"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ResourceLinkResult: msRest.CompositeMapper = {
+ serializedName: "ResourceLinkResult",
+ type: {
+ name: "Composite",
+ className: "ResourceLinkResult",
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ResourceLink"
+ }
+ }
+ }
+ },
+ nextLink: {
+ readOnly: true,
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
diff --git a/packages/@azure/arm-links/lib/models/operationsMappers.ts b/packages/@azure/arm-links/lib/models/operationsMappers.ts
new file mode 100644
index 000000000000..2edcc577920e
--- /dev/null
+++ b/packages/@azure/arm-links/lib/models/operationsMappers.ts
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+export {
+ OperationListResult,
+ Operation,
+ OperationDisplay,
+ CloudError
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-links/lib/models/parameters.ts b/packages/@azure/arm-links/lib/models/parameters.ts
new file mode 100644
index 000000000000..f58cf3193ad5
--- /dev/null
+++ b/packages/@azure/arm-links/lib/models/parameters.ts
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+
+export const acceptLanguage: msRest.OperationParameter = {
+ parameterPath: "acceptLanguage",
+ mapper: {
+ serializedName: "accept-language",
+ defaultValue: 'en-US',
+ type: {
+ name: "String"
+ }
+ }
+};
+export const apiVersion: msRest.OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ required: true,
+ serializedName: "api-version",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const filter: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "filter"
+ ],
+ mapper: {
+ serializedName: "$filter",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const linkId: msRest.OperationURLParameter = {
+ parameterPath: "linkId",
+ mapper: {
+ required: true,
+ serializedName: "linkId",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+export const nextPageLink: msRest.OperationURLParameter = {
+ parameterPath: "nextPageLink",
+ mapper: {
+ required: true,
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+export const scope: msRest.OperationURLParameter = {
+ parameterPath: "scope",
+ mapper: {
+ required: true,
+ serializedName: "scope",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+export const subscriptionId: msRest.OperationURLParameter = {
+ parameterPath: "subscriptionId",
+ mapper: {
+ required: true,
+ serializedName: "subscriptionId",
+ type: {
+ name: "String"
+ }
+ }
+};
diff --git a/packages/@azure/arm-links/lib/models/resourceLinksMappers.ts b/packages/@azure/arm-links/lib/models/resourceLinksMappers.ts
new file mode 100644
index 000000000000..aac3c16eb59c
--- /dev/null
+++ b/packages/@azure/arm-links/lib/models/resourceLinksMappers.ts
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+export {
+ CloudError,
+ ResourceLink,
+ BaseResource,
+ ResourceLinkProperties,
+ ResourceLinkResult
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-links/lib/operations/index.ts b/packages/@azure/arm-links/lib/operations/index.ts
new file mode 100644
index 000000000000..13eac92de120
--- /dev/null
+++ b/packages/@azure/arm-links/lib/operations/index.ts
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+export * from "./operations";
+export * from "./resourceLinks";
diff --git a/packages/@azure/arm-links/lib/operations/operations.ts b/packages/@azure/arm-links/lib/operations/operations.ts
new file mode 100644
index 000000000000..a258f28eef8d
--- /dev/null
+++ b/packages/@azure/arm-links/lib/operations/operations.ts
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/operationsMappers";
+import * as Parameters from "../models/parameters";
+import { ManagementLinkClientContext } from "../managementLinkClientContext";
+
+/** Class representing a Operations. */
+export class Operations {
+ private readonly client: ManagementLinkClientContext;
+
+ /**
+ * Create a Operations.
+ * @param {ManagementLinkClientContext} client Reference to the service client.
+ */
+ constructor(client: ManagementLinkClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Lists all of the available Microsoft.Resources REST API operations.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ list(options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param callback The callback
+ */
+ list(callback: msRest.ServiceCallback): void;
+ /**
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ list(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ options
+ },
+ listOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Lists all of the available Microsoft.Resources REST API operations.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listNextOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "providers/Microsoft.Resources/operations",
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.OperationListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.OperationListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/arm-links/lib/operations/resourceLinks.ts b/packages/@azure/arm-links/lib/operations/resourceLinks.ts
new file mode 100644
index 000000000000..1755e3ea269c
--- /dev/null
+++ b/packages/@azure/arm-links/lib/operations/resourceLinks.ts
@@ -0,0 +1,421 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/resourceLinksMappers";
+import * as Parameters from "../models/parameters";
+import { ManagementLinkClientContext } from "../managementLinkClientContext";
+
+/** Class representing a ResourceLinks. */
+export class ResourceLinks {
+ private readonly client: ManagementLinkClientContext;
+
+ /**
+ * Create a ResourceLinks.
+ * @param {ManagementLinkClientContext} client Reference to the service client.
+ */
+ constructor(client: ManagementLinkClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Deletes a resource link with the specified ID.
+ * @param linkId The fully qualified ID of the resource link. Use the format,
+ * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.
+ * For example,
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteMethod(linkId: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param linkId The fully qualified ID of the resource link. Use the format,
+ * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.
+ * For example,
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
+ * @param callback The callback
+ */
+ deleteMethod(linkId: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param linkId The fully qualified ID of the resource link. Use the format,
+ * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.
+ * For example,
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteMethod(linkId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteMethod(linkId: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ linkId,
+ options
+ },
+ deleteMethodOperationSpec,
+ callback);
+ }
+
+ /**
+ * Creates or updates a resource link between the specified resources.
+ * @param linkId The fully qualified ID of the resource link. Use the format,
+ * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.
+ * For example,
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
+ * @param parameters Parameters for creating or updating a resource link.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createOrUpdate(linkId: string, parameters: Models.ResourceLink, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param linkId The fully qualified ID of the resource link. Use the format,
+ * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.
+ * For example,
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
+ * @param parameters Parameters for creating or updating a resource link.
+ * @param callback The callback
+ */
+ createOrUpdate(linkId: string, parameters: Models.ResourceLink, callback: msRest.ServiceCallback): void;
+ /**
+ * @param linkId The fully qualified ID of the resource link. Use the format,
+ * /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}.
+ * For example,
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
+ * @param parameters Parameters for creating or updating a resource link.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ createOrUpdate(linkId: string, parameters: Models.ResourceLink, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ createOrUpdate(linkId: string, parameters: Models.ResourceLink, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ linkId,
+ parameters,
+ options
+ },
+ createOrUpdateOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets a resource link with the specified ID.
+ * @param linkId The fully qualified Id of the resource link. For example,
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ get(linkId: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param linkId The fully qualified Id of the resource link. For example,
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
+ * @param callback The callback
+ */
+ get(linkId: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param linkId The fully qualified Id of the resource link. For example,
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ get(linkId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ get(linkId: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ linkId,
+ options
+ },
+ getOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the linked resources for the subscription.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAtSubscription(options?: Models.ResourceLinksListAtSubscriptionOptionalParams): Promise;
+ /**
+ * @param callback The callback
+ */
+ listAtSubscription(callback: msRest.ServiceCallback): void;
+ /**
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAtSubscription(options: Models.ResourceLinksListAtSubscriptionOptionalParams, callback: msRest.ServiceCallback): void;
+ listAtSubscription(options?: Models.ResourceLinksListAtSubscriptionOptionalParams, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ options
+ },
+ listAtSubscriptionOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets a list of resource links at and below the specified source scope.
+ * @param scope The fully qualified ID of the scope for getting the resource links. For example, to
+ * list resource links at and under a resource group, set the scope to
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAtSourceScope(scope: string, options?: Models.ResourceLinksListAtSourceScopeOptionalParams): Promise;
+ /**
+ * @param scope The fully qualified ID of the scope for getting the resource links. For example, to
+ * list resource links at and under a resource group, set the scope to
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup.
+ * @param callback The callback
+ */
+ listAtSourceScope(scope: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param scope The fully qualified ID of the scope for getting the resource links. For example, to
+ * list resource links at and under a resource group, set the scope to
+ * /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAtSourceScope(scope: string, options: Models.ResourceLinksListAtSourceScopeOptionalParams, callback: msRest.ServiceCallback): void;
+ listAtSourceScope(scope: string, options?: Models.ResourceLinksListAtSourceScopeOptionalParams, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ scope,
+ options
+ },
+ listAtSourceScopeOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the linked resources for the subscription.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAtSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listAtSubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAtSubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listAtSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listAtSubscriptionNextOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets a list of resource links at and below the specified source scope.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAtSourceScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listAtSourceScopeNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAtSourceScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listAtSourceScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listAtSourceScopeNextOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const deleteMethodOperationSpec: msRest.OperationSpec = {
+ httpMethod: "DELETE",
+ path: "{linkId}",
+ urlParameters: [
+ Parameters.linkId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {},
+ 204: {},
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const createOrUpdateOperationSpec: msRest.OperationSpec = {
+ httpMethod: "PUT",
+ path: "{linkId}",
+ urlParameters: [
+ Parameters.linkId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ requestBody: {
+ parameterPath: "parameters",
+ mapper: {
+ ...Mappers.ResourceLink,
+ required: true
+ }
+ },
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ResourceLink
+ },
+ 201: {
+ bodyMapper: Mappers.ResourceLink
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const getOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "{linkId}",
+ urlParameters: [
+ Parameters.linkId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ResourceLink
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listAtSubscriptionOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/providers/Microsoft.Resources/links",
+ urlParameters: [
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.filter,
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ResourceLinkResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listAtSourceScopeOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "{scope}/providers/Microsoft.Resources/links",
+ urlParameters: [
+ Parameters.scope
+ ],
+ queryParameters: [
+ Parameters.filter,
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ResourceLinkResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listAtSubscriptionNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ResourceLinkResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listAtSourceScopeNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ResourceLinkResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/arm-links/package.json b/packages/@azure/arm-links/package.json
new file mode 100644
index 000000000000..d74ff650e7ed
--- /dev/null
+++ b/packages/@azure/arm-links/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "@azure/arm-links",
+ "author": "Microsoft Corporation",
+ "description": "ManagementLinkClient Library with typescript type definitions for node.js and browser.",
+ "version": "1.0.0",
+ "dependencies": {
+ "ms-rest-azure-js": "^1.0.166",
+ "ms-rest-js": "^1.0.439",
+ "tslib": "^1.9.3"
+ },
+ "keywords": [
+ "node",
+ "azure",
+ "typescript",
+ "browser",
+ "isomorphic"
+ ],
+ "license": "MIT",
+ "main": "./dist/arm-links.js",
+ "module": "./esm/managementLinkClient.js",
+ "types": "./esm/managementLinkClient.d.ts",
+ "devDependencies": {
+ "typescript": "^3.1.1",
+ "rollup": "^0.66.2",
+ "rollup-plugin-node-resolve": "^3.4.0",
+ "uglify-js": "^3.4.9"
+ },
+ "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/arm-links",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/azure/azure-sdk-for-js.git"
+ },
+ "bugs": {
+ "url": "https://github.com/azure/azure-sdk-for-js/issues"
+ },
+ "scripts": {
+ "build": "tsc && rollup -c rollup.config.js && npm run minify",
+ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-links.js.map'\" -o ./dist/arm-links.min.js ./dist/arm-links.js",
+ "prepare": "npm run build"
+ },
+ "sideEffects": false
+}
diff --git a/packages/@azure/arm-links/rollup.config.js b/packages/@azure/arm-links/rollup.config.js
new file mode 100644
index 000000000000..541e424ae6a8
--- /dev/null
+++ b/packages/@azure/arm-links/rollup.config.js
@@ -0,0 +1,31 @@
+import nodeResolve from "rollup-plugin-node-resolve";
+/**
+ * @type {import('rollup').RollupFileOptions}
+ */
+const config = {
+ input: './esm/managementLinkClient.js',
+ external: ["ms-rest-js", "ms-rest-azure-js"],
+ output: {
+ file: "./dist/arm-links.js",
+ format: "umd",
+ name: "Azure.ArmLinks",
+ sourcemap: true,
+ globals: {
+ "ms-rest-js": "msRest",
+ "ms-rest-azure-js": "msRestAzure"
+ },
+ banner: `/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */`
+ },
+ plugins: [
+ nodeResolve({ module: true })
+ ]
+};
+export default config;
diff --git a/packages/@azure/arm-links/tsconfig.json b/packages/@azure/arm-links/tsconfig.json
new file mode 100644
index 000000000000..f32d1664f320
--- /dev/null
+++ b/packages/@azure/arm-links/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "es6",
+ "moduleResolution": "node",
+ "strict": true,
+ "target": "es5",
+ "sourceMap": true,
+ "declarationMap": true,
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true,
+ "forceConsistentCasingInFileNames": true,
+ "lib": ["es6"],
+ "declaration": true,
+ "outDir": "./esm",
+ "importHelpers": true
+ },
+ "include": ["./lib/**/*"],
+ "exclude": ["node_modules"]
+}
diff --git a/packages/@azure/arm-locks/.npmignore b/packages/@azure/arm-locks/.npmignore
new file mode 100644
index 000000000000..a07a455ac10c
--- /dev/null
+++ b/packages/@azure/arm-locks/.npmignore
@@ -0,0 +1,35 @@
+#git
+.git
+.gitignore
+#gulp
+gulpfile.js
+#documentation
+doc/
+docs/
+#dependencies
+node_modules/
+#samples
+sample/
+samples/
+#tests
+test/
+tests/
+coverage/
+#tools and scripts
+tools/
+scripts/
+#IDE settings
+*.sln
+.vscode/
+.idea
+.editorconfig
+.ntvs_analysis.*
+#build tools
+.travis.yml
+.jenkins.yml
+.codeclimate.yml
+appveyor.yml
+# Nuget packages #
+.nuget/
+packages/
+packages.config
diff --git a/packages/@azure/arm-locks/LICENSE.txt b/packages/@azure/arm-locks/LICENSE.txt
new file mode 100644
index 000000000000..5431ba98b936
--- /dev/null
+++ b/packages/@azure/arm-locks/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018 Microsoft
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/@azure/arm-locks/README.md b/packages/@azure/arm-locks/README.md
new file mode 100644
index 000000000000..7c900f40f340
--- /dev/null
+++ b/packages/@azure/arm-locks/README.md
@@ -0,0 +1,77 @@
+# Azure ManagementLockClient SDK for JavaScript
+This package contains an isomorphic SDK for ManagementLockClient.
+
+## Currently supported environments
+- Node.js version 6.x.x or higher
+- Browser JavaScript
+
+## How to Install
+```
+npm install @azure/arm-locks
+```
+
+
+## How to use
+
+### nodejs - Authentication, client creation and list authorizationOperations as an example written in TypeScript.
+
+```ts
+import * as msRest from "ms-rest-js";
+import * as msRestAzure from "ms-rest-azure-js";
+import * as msRestNodeAuth from "ms-rest-nodeauth";
+import { ManagementLockClient, ManagementLockModels, ManagementLockMappers } from "@azure/arm-locks";
+const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
+
+msRestNodeAuth.interactiveLogin().then((creds) => {
+ const client = new ManagementLockClient(creds, subscriptionId);
+ client.authorizationOperations.list().then((result) => {
+ console.log("The result is:");
+ console.log(result);
+ });
+}).catch((err) => {
+ console.error(err);
+});
+```
+
+### browser - Authentication, client creation and list authorizationOperations as an example written in JavaScript.
+See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
+
+- index.html
+```html
+
+
+
+ @azure/arm-locks sample
+
+
+
+
+
+
+
+
+
+```
+
+# Related projects
+ - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
diff --git a/packages/@azure/arm-locks/lib/managementLockClient.ts b/packages/@azure/arm-locks/lib/managementLockClient.ts
new file mode 100644
index 000000000000..8b59d85a51c6
--- /dev/null
+++ b/packages/@azure/arm-locks/lib/managementLockClient.ts
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+import * as Models from "./models";
+import * as Mappers from "./models/mappers";
+import * as operations from "./operations";
+import { ManagementLockClientContext } from "./managementLockClientContext";
+
+
+class ManagementLockClient extends ManagementLockClientContext {
+ // Operation groups
+ authorizationOperations: operations.AuthorizationOperations;
+ managementLocks: operations.ManagementLocks;
+
+ /**
+ * Initializes a new instance of the ManagementLockClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId The ID of the target subscription.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLockClientOptions) {
+ super(credentials, subscriptionId, options);
+ this.authorizationOperations = new operations.AuthorizationOperations(this);
+ this.managementLocks = new operations.ManagementLocks(this);
+ }
+}
+
+// Operation Specifications
+
+export {
+ ManagementLockClient,
+ ManagementLockClientContext,
+ Models as ManagementLockModels,
+ Mappers as ManagementLockMappers
+};
+export * from "./operations";
diff --git a/packages/@azure/arm-locks/lib/managementLockClientContext.ts b/packages/@azure/arm-locks/lib/managementLockClientContext.ts
new file mode 100644
index 000000000000..ffad4f345abb
--- /dev/null
+++ b/packages/@azure/arm-locks/lib/managementLockClientContext.ts
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as Models from "./models";
+import * as msRest from "ms-rest-js";
+import * as msRestAzure from "ms-rest-azure-js";
+
+const packageName = "@azure/arm-locks";
+const packageVersion = "1.0.0";
+
+export class ManagementLockClientContext extends msRestAzure.AzureServiceClient {
+
+ credentials: msRest.ServiceClientCredentials;
+
+ subscriptionId: string;
+
+ apiVersion: string;
+
+ acceptLanguage: string;
+
+ longRunningOperationRetryTimeout: number;
+
+ /**
+ * Initializes a new instance of the ManagementLockClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param subscriptionId The ID of the target subscription.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ManagementLockClientOptions) {
+ if (credentials == undefined) {
+ throw new Error('\'credentials\' cannot be null.');
+ }
+ if (subscriptionId == undefined) {
+ throw new Error('\'subscriptionId\' cannot be null.');
+ }
+
+ if (!options) {
+ options = {};
+ }
+ super(credentials, options);
+
+ this.apiVersion = '2016-09-01';
+ this.acceptLanguage = 'en-US';
+ this.longRunningOperationRetryTimeout = 30;
+ this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
+ this.requestContentType = "application/json; charset=utf-8";
+ this.credentials = credentials;
+ this.subscriptionId = subscriptionId;
+
+ this.addUserAgentInfo(`${packageName}/${packageVersion}`);
+ if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
+ this.acceptLanguage = options.acceptLanguage;
+ }
+ if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
+ this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
+ }
+ }
+}
diff --git a/packages/@azure/arm-locks/lib/models/authorizationOperationsMappers.ts b/packages/@azure/arm-locks/lib/models/authorizationOperationsMappers.ts
new file mode 100644
index 000000000000..2edcc577920e
--- /dev/null
+++ b/packages/@azure/arm-locks/lib/models/authorizationOperationsMappers.ts
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+export {
+ OperationListResult,
+ Operation,
+ OperationDisplay,
+ CloudError
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-locks/lib/models/index.ts b/packages/@azure/arm-locks/lib/models/index.ts
new file mode 100644
index 000000000000..017c2d2d38c1
--- /dev/null
+++ b/packages/@azure/arm-locks/lib/models/index.ts
@@ -0,0 +1,520 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import { BaseResource, CloudError, AzureServiceClientOptions } from "ms-rest-azure-js";
+import * as msRest from "ms-rest-js";
+
+export { BaseResource, CloudError };
+
+
+/**
+ * @interface
+ * An interface representing ManagementLockOwner.
+ * Lock owner properties.
+ *
+ */
+export interface ManagementLockOwner {
+ /**
+ * @member {string} [applicationId] The application ID of the lock owner.
+ */
+ applicationId?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ManagementLockObject.
+ * The lock information.
+ *
+ * @extends BaseResource
+ */
+export interface ManagementLockObject extends BaseResource {
+ /**
+ * @member {LockLevel} level The level of the lock. Possible values are:
+ * NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users
+ * are able to read and modify the resources, but not delete. ReadOnly means
+ * authorized users can only read from a resource, but they can't modify or
+ * delete it. Possible values include: 'NotSpecified', 'CanNotDelete',
+ * 'ReadOnly'
+ */
+ level: LockLevel;
+ /**
+ * @member {string} [notes] Notes about the lock. Maximum of 512 characters.
+ */
+ notes?: string;
+ /**
+ * @member {ManagementLockOwner[]} [owners] The owners of the lock.
+ */
+ owners?: ManagementLockOwner[];
+ /**
+ * @member {string} [id] The resource ID of the lock.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [type] The resource type of the lock -
+ * Microsoft.Authorization/locks.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly type?: string;
+ /**
+ * @member {string} [name] The name of the lock.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+}
+
+/**
+ * @interface
+ * An interface representing OperationDisplay.
+ * The object that represents the operation.
+ *
+ */
+export interface OperationDisplay {
+ /**
+ * @member {string} [provider] Service provider: Microsoft.Authorization
+ */
+ provider?: string;
+ /**
+ * @member {string} [resource] Resource on which the operation is performed:
+ * Profile, endpoint, etc.
+ */
+ resource?: string;
+ /**
+ * @member {string} [operation] Operation type: Read, write, delete, etc.
+ */
+ operation?: string;
+}
+
+/**
+ * @interface
+ * An interface representing Operation.
+ * Microsoft.Authorization operation
+ *
+ */
+export interface Operation {
+ /**
+ * @member {string} [name] Operation name: {provider}/{resource}/{operation}
+ */
+ name?: string;
+ /**
+ * @member {OperationDisplay} [display] The object that represents the
+ * operation.
+ */
+ display?: OperationDisplay;
+}
+
+/**
+ * @interface
+ * An interface representing ManagementLocksListAtResourceGroupLevelOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface ManagementLocksListAtResourceGroupLevelOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [filter] The filter to apply on the operation.
+ */
+ filter?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ManagementLocksListAtResourceLevelOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface ManagementLocksListAtResourceLevelOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [filter] The filter to apply on the operation.
+ */
+ filter?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ManagementLocksListAtSubscriptionLevelOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface ManagementLocksListAtSubscriptionLevelOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [filter] The filter to apply on the operation.
+ */
+ filter?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ManagementLockClientOptions.
+ * @extends AzureServiceClientOptions
+ */
+export interface ManagementLockClientOptions extends AzureServiceClientOptions {
+ /**
+ * @member {string} [baseUri]
+ */
+ baseUri?: string;
+}
+
+
+/**
+ * @interface
+ * An interface representing the OperationListResult.
+ * Result of the request to list Microsoft.Authorization operations. It
+ * contains a list of operations and a URL link to get the next set of results.
+ *
+ * @extends Array
+ */
+export interface OperationListResult extends Array {
+ /**
+ * @member {string} [nextLink] URL to get the next set of operation list
+ * results if there are any.
+ */
+ nextLink?: string;
+}
+
+/**
+ * @interface
+ * An interface representing the ManagementLockListResult.
+ * The list of locks.
+ *
+ * @extends Array
+ */
+export interface ManagementLockListResult extends Array {
+ /**
+ * @member {string} [nextLink] The URL to use for getting the next set of
+ * results.
+ */
+ nextLink?: string;
+}
+
+/**
+ * Defines values for LockLevel.
+ * Possible values include: 'NotSpecified', 'CanNotDelete', 'ReadOnly'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: LockLevel = "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum LockLevel {
+ NotSpecified = 'NotSpecified',
+ CanNotDelete = 'CanNotDelete',
+ ReadOnly = 'ReadOnly',
+}
+
+/**
+ * Contains response data for the list operation.
+ */
+export type AuthorizationOperationsListResponse = OperationListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: OperationListResult;
+ };
+};
+
+/**
+ * Contains response data for the listNext operation.
+ */
+export type AuthorizationOperationsListNextResponse = OperationListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: OperationListResult;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdateAtResourceGroupLevel operation.
+ */
+export type ManagementLocksCreateOrUpdateAtResourceGroupLevelResponse = ManagementLockObject & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockObject;
+ };
+};
+
+/**
+ * Contains response data for the getAtResourceGroupLevel operation.
+ */
+export type ManagementLocksGetAtResourceGroupLevelResponse = ManagementLockObject & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockObject;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdateByScope operation.
+ */
+export type ManagementLocksCreateOrUpdateByScopeResponse = ManagementLockObject & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockObject;
+ };
+};
+
+/**
+ * Contains response data for the getByScope operation.
+ */
+export type ManagementLocksGetByScopeResponse = ManagementLockObject & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockObject;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdateAtResourceLevel operation.
+ */
+export type ManagementLocksCreateOrUpdateAtResourceLevelResponse = ManagementLockObject & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockObject;
+ };
+};
+
+/**
+ * Contains response data for the getAtResourceLevel operation.
+ */
+export type ManagementLocksGetAtResourceLevelResponse = ManagementLockObject & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockObject;
+ };
+};
+
+/**
+ * Contains response data for the createOrUpdateAtSubscriptionLevel operation.
+ */
+export type ManagementLocksCreateOrUpdateAtSubscriptionLevelResponse = ManagementLockObject & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockObject;
+ };
+};
+
+/**
+ * Contains response data for the getAtSubscriptionLevel operation.
+ */
+export type ManagementLocksGetAtSubscriptionLevelResponse = ManagementLockObject & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockObject;
+ };
+};
+
+/**
+ * Contains response data for the listAtResourceGroupLevel operation.
+ */
+export type ManagementLocksListAtResourceGroupLevelResponse = ManagementLockListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockListResult;
+ };
+};
+
+/**
+ * Contains response data for the listAtResourceLevel operation.
+ */
+export type ManagementLocksListAtResourceLevelResponse = ManagementLockListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockListResult;
+ };
+};
+
+/**
+ * Contains response data for the listAtSubscriptionLevel operation.
+ */
+export type ManagementLocksListAtSubscriptionLevelResponse = ManagementLockListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockListResult;
+ };
+};
+
+/**
+ * Contains response data for the listAtResourceGroupLevelNext operation.
+ */
+export type ManagementLocksListAtResourceGroupLevelNextResponse = ManagementLockListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockListResult;
+ };
+};
+
+/**
+ * Contains response data for the listAtResourceLevelNext operation.
+ */
+export type ManagementLocksListAtResourceLevelNextResponse = ManagementLockListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockListResult;
+ };
+};
+
+/**
+ * Contains response data for the listAtSubscriptionLevelNext operation.
+ */
+export type ManagementLocksListAtSubscriptionLevelNextResponse = ManagementLockListResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ManagementLockListResult;
+ };
+};
diff --git a/packages/@azure/arm-locks/lib/models/managementLocksMappers.ts b/packages/@azure/arm-locks/lib/models/managementLocksMappers.ts
new file mode 100644
index 000000000000..0eca319827a3
--- /dev/null
+++ b/packages/@azure/arm-locks/lib/models/managementLocksMappers.ts
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+export {
+ ManagementLockObject,
+ BaseResource,
+ ManagementLockOwner,
+ CloudError,
+ ManagementLockListResult
+} from "../models/mappers";
+
diff --git a/packages/@azure/arm-locks/lib/models/mappers.ts b/packages/@azure/arm-locks/lib/models/mappers.ts
new file mode 100644
index 000000000000..de34243190f2
--- /dev/null
+++ b/packages/@azure/arm-locks/lib/models/mappers.ts
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import { CloudErrorMapper, BaseResourceMapper } from "ms-rest-azure-js";
+import * as msRest from "ms-rest-js";
+
+export const CloudError = CloudErrorMapper;
+export const BaseResource = BaseResourceMapper;
+
+export const ManagementLockOwner: msRest.CompositeMapper = {
+ serializedName: "ManagementLockOwner",
+ type: {
+ name: "Composite",
+ className: "ManagementLockOwner",
+ modelProperties: {
+ applicationId: {
+ serializedName: "applicationId",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ManagementLockObject: msRest.CompositeMapper = {
+ serializedName: "ManagementLockObject",
+ type: {
+ name: "Composite",
+ className: "ManagementLockObject",
+ modelProperties: {
+ level: {
+ required: true,
+ serializedName: "properties.level",
+ type: {
+ name: "String"
+ }
+ },
+ notes: {
+ serializedName: "properties.notes",
+ type: {
+ name: "String"
+ }
+ },
+ owners: {
+ serializedName: "properties.owners",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ManagementLockOwner"
+ }
+ }
+ }
+ },
+ id: {
+ readOnly: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ readOnly: true,
+ serializedName: "type",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ readOnly: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const OperationDisplay: msRest.CompositeMapper = {
+ serializedName: "Operation_display",
+ type: {
+ name: "Composite",
+ className: "OperationDisplay",
+ modelProperties: {
+ provider: {
+ serializedName: "provider",
+ type: {
+ name: "String"
+ }
+ },
+ resource: {
+ serializedName: "resource",
+ type: {
+ name: "String"
+ }
+ },
+ operation: {
+ serializedName: "operation",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Operation: msRest.CompositeMapper = {
+ serializedName: "Operation",
+ type: {
+ name: "Composite",
+ className: "Operation",
+ modelProperties: {
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ display: {
+ serializedName: "display",
+ type: {
+ name: "Composite",
+ className: "OperationDisplay"
+ }
+ }
+ }
+ }
+};
+
+export const OperationListResult: msRest.CompositeMapper = {
+ serializedName: "OperationListResult",
+ type: {
+ name: "Composite",
+ className: "OperationListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Operation"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ManagementLockListResult: msRest.CompositeMapper = {
+ serializedName: "ManagementLockListResult",
+ type: {
+ name: "Composite",
+ className: "ManagementLockListResult",
+ modelProperties: {
+ value: {
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ManagementLockObject"
+ }
+ }
+ }
+ },
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
diff --git a/packages/@azure/arm-locks/lib/models/parameters.ts b/packages/@azure/arm-locks/lib/models/parameters.ts
new file mode 100644
index 000000000000..9ae25e1fa997
--- /dev/null
+++ b/packages/@azure/arm-locks/lib/models/parameters.ts
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+
+export const acceptLanguage: msRest.OperationParameter = {
+ parameterPath: "acceptLanguage",
+ mapper: {
+ serializedName: "accept-language",
+ defaultValue: 'en-US',
+ type: {
+ name: "String"
+ }
+ }
+};
+export const apiVersion: msRest.OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ required: true,
+ serializedName: "api-version",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const filter: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "filter"
+ ],
+ mapper: {
+ serializedName: "$filter",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const lockName: msRest.OperationURLParameter = {
+ parameterPath: "lockName",
+ mapper: {
+ required: true,
+ serializedName: "lockName",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const nextPageLink: msRest.OperationURLParameter = {
+ parameterPath: "nextPageLink",
+ mapper: {
+ required: true,
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+export const parentResourcePath: msRest.OperationURLParameter = {
+ parameterPath: "parentResourcePath",
+ mapper: {
+ required: true,
+ serializedName: "parentResourcePath",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+export const resourceGroupName: msRest.OperationURLParameter = {
+ parameterPath: "resourceGroupName",
+ mapper: {
+ required: true,
+ serializedName: "resourceGroupName",
+ constraints: {
+ MaxLength: 90,
+ MinLength: 1,
+ Pattern: /^[-\w\._\(\)]+$/
+ },
+ type: {
+ name: "String"
+ }
+ }
+};
+export const resourceName: msRest.OperationURLParameter = {
+ parameterPath: "resourceName",
+ mapper: {
+ required: true,
+ serializedName: "resourceName",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const resourceProviderNamespace: msRest.OperationURLParameter = {
+ parameterPath: "resourceProviderNamespace",
+ mapper: {
+ required: true,
+ serializedName: "resourceProviderNamespace",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const resourceType: msRest.OperationURLParameter = {
+ parameterPath: "resourceType",
+ mapper: {
+ required: true,
+ serializedName: "resourceType",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+export const scope: msRest.OperationURLParameter = {
+ parameterPath: "scope",
+ mapper: {
+ required: true,
+ serializedName: "scope",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const subscriptionId: msRest.OperationURLParameter = {
+ parameterPath: "subscriptionId",
+ mapper: {
+ required: true,
+ serializedName: "subscriptionId",
+ type: {
+ name: "String"
+ }
+ }
+};
diff --git a/packages/@azure/arm-locks/lib/operations/authorizationOperations.ts b/packages/@azure/arm-locks/lib/operations/authorizationOperations.ts
new file mode 100644
index 000000000000..c4fc505fc4fc
--- /dev/null
+++ b/packages/@azure/arm-locks/lib/operations/authorizationOperations.ts
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/authorizationOperationsMappers";
+import * as Parameters from "../models/parameters";
+import { ManagementLockClientContext } from "../managementLockClientContext";
+
+/** Class representing a AuthorizationOperations. */
+export class AuthorizationOperations {
+ private readonly client: ManagementLockClientContext;
+
+ /**
+ * Create a AuthorizationOperations.
+ * @param {ManagementLockClientContext} client Reference to the service client.
+ */
+ constructor(client: ManagementLockClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ list(options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param callback The callback
+ */
+ list(callback: msRest.ServiceCallback): void;
+ /**
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ list(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ options
+ },
+ listOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Lists all of the available Microsoft.Authorization REST API operations.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listNextOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const listOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "providers/Microsoft.Authorization/operations",
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.OperationListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
+
+const listNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.OperationListResult
+ },
+ default: {
+ bodyMapper: Mappers.CloudError
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/arm-locks/lib/operations/index.ts b/packages/@azure/arm-locks/lib/operations/index.ts
new file mode 100644
index 000000000000..83933898775f
--- /dev/null
+++ b/packages/@azure/arm-locks/lib/operations/index.ts
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+export * from "./authorizationOperations";
+export * from "./managementLocks";
diff --git a/packages/@azure/arm-locks/lib/operations/managementLocks.ts b/packages/@azure/arm-locks/lib/operations/managementLocks.ts
new file mode 100644
index 000000000000..f2839cb517a9
--- /dev/null
+++ b/packages/@azure/arm-locks/lib/operations/managementLocks.ts
@@ -0,0 +1,1181 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/managementLocksMappers";
+import * as Parameters from "../models/parameters";
+import { ManagementLockClientContext } from "../managementLockClientContext";
+
+/** Class representing a ManagementLocks. */
+export class ManagementLocks {
+ private readonly client: ManagementLockClientContext;
+
+ /**
+ * Create a ManagementLocks.
+ * @param {ManagementLockClientContext} client Reference to the service client.
+ */
+ constructor(client: ManagementLockClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * When you apply a lock at a parent scope, all child resources inherit the same lock. To create
+ * management locks, you must have access to Microsoft.Authorization/* or
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
+ * Administrator are granted those actions.
+ * @summary Creates or updates a management lock at the resource group level.
+ * @param resourceGroupName The name of the resource group to lock.
+ * @param lockName The lock name. The lock name can be a maximum of 260 characters. It cannot
+ * contain <, > %, &, :, \, ?, /, or any control characters.
+ * @param parameters The management lock parameters.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createOrUpdateAtResourceGroupLevel(resourceGroupName: string, lockName: string, parameters: Models.ManagementLockObject, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName The name of the resource group to lock.
+ * @param lockName The lock name. The lock name can be a maximum of 260 characters. It cannot
+ * contain <, > %, &, :, \, ?, /, or any control characters.
+ * @param parameters The management lock parameters.
+ * @param callback The callback
+ */
+ createOrUpdateAtResourceGroupLevel(resourceGroupName: string, lockName: string, parameters: Models.ManagementLockObject, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the resource group to lock.
+ * @param lockName The lock name. The lock name can be a maximum of 260 characters. It cannot
+ * contain <, > %, &, :, \, ?, /, or any control characters.
+ * @param parameters The management lock parameters.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ createOrUpdateAtResourceGroupLevel(resourceGroupName: string, lockName: string, parameters: Models.ManagementLockObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ createOrUpdateAtResourceGroupLevel(resourceGroupName: string, lockName: string, parameters: Models.ManagementLockObject, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ lockName,
+ parameters,
+ options
+ },
+ createOrUpdateAtResourceGroupLevelOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * To delete management locks, you must have access to Microsoft.Authorization/* or
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
+ * Administrator are granted those actions.
+ * @summary Deletes a management lock at the resource group level.
+ * @param resourceGroupName The name of the resource group containing the lock.
+ * @param lockName The name of lock to delete.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName The name of the resource group containing the lock.
+ * @param lockName The name of lock to delete.
+ * @param callback The callback
+ */
+ deleteAtResourceGroupLevel(resourceGroupName: string, lockName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the resource group containing the lock.
+ * @param lockName The name of lock to delete.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteAtResourceGroupLevel(resourceGroupName: string, lockName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ lockName,
+ options
+ },
+ deleteAtResourceGroupLevelOperationSpec,
+ callback);
+ }
+
+ /**
+ * Gets a management lock at the resource group level.
+ * @param resourceGroupName The name of the locked resource group.
+ * @param lockName The name of the lock to get.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName The name of the locked resource group.
+ * @param lockName The name of the lock to get.
+ * @param callback The callback
+ */
+ getAtResourceGroupLevel(resourceGroupName: string, lockName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the locked resource group.
+ * @param lockName The name of the lock to get.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getAtResourceGroupLevel(resourceGroupName: string, lockName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ lockName,
+ options
+ },
+ getAtResourceGroupLevelOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Create or update a management lock by scope.
+ * @param scope The scope for the lock. When providing a scope for the assignment, use
+ * '/subscriptions/{subscriptionId}' for subscriptions,
+ * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
+ * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
+ * for resources.
+ * @param lockName The name of lock.
+ * @param parameters Create or update management lock parameters.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createOrUpdateByScope(scope: string, lockName: string, parameters: Models.ManagementLockObject, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param scope The scope for the lock. When providing a scope for the assignment, use
+ * '/subscriptions/{subscriptionId}' for subscriptions,
+ * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
+ * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
+ * for resources.
+ * @param lockName The name of lock.
+ * @param parameters Create or update management lock parameters.
+ * @param callback The callback
+ */
+ createOrUpdateByScope(scope: string, lockName: string, parameters: Models.ManagementLockObject, callback: msRest.ServiceCallback): void;
+ /**
+ * @param scope The scope for the lock. When providing a scope for the assignment, use
+ * '/subscriptions/{subscriptionId}' for subscriptions,
+ * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
+ * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
+ * for resources.
+ * @param lockName The name of lock.
+ * @param parameters Create or update management lock parameters.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ createOrUpdateByScope(scope: string, lockName: string, parameters: Models.ManagementLockObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ createOrUpdateByScope(scope: string, lockName: string, parameters: Models.ManagementLockObject, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ scope,
+ lockName,
+ parameters,
+ options
+ },
+ createOrUpdateByScopeOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Delete a management lock by scope.
+ * @param scope The scope for the lock.
+ * @param lockName The name of lock.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteByScope(scope: string, lockName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param scope The scope for the lock.
+ * @param lockName The name of lock.
+ * @param callback The callback
+ */
+ deleteByScope(scope: string, lockName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param scope The scope for the lock.
+ * @param lockName The name of lock.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteByScope(scope: string, lockName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteByScope(scope: string, lockName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ scope,
+ lockName,
+ options
+ },
+ deleteByScopeOperationSpec,
+ callback);
+ }
+
+ /**
+ * Get a management lock by scope.
+ * @param scope The scope for the lock.
+ * @param lockName The name of lock.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getByScope(scope: string, lockName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param scope The scope for the lock.
+ * @param lockName The name of lock.
+ * @param callback The callback
+ */
+ getByScope(scope: string, lockName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param scope The scope for the lock.
+ * @param lockName The name of lock.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getByScope(scope: string, lockName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getByScope(scope: string, lockName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ scope,
+ lockName,
+ options
+ },
+ getByScopeOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * When you apply a lock at a parent scope, all child resources inherit the same lock. To create
+ * management locks, you must have access to Microsoft.Authorization/* or
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
+ * Administrator are granted those actions.
+ * @summary Creates or updates a management lock at the resource level or any level below the
+ * resource.
+ * @param resourceGroupName The name of the resource group containing the resource to lock.
+ * @param resourceProviderNamespace The resource provider namespace of the resource to lock.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource to lock.
+ * @param resourceName The name of the resource to lock.
+ * @param lockName The name of lock. The lock name can be a maximum of 260 characters. It cannot
+ * contain <, > %, &, :, \, ?, /, or any control characters.
+ * @param parameters Parameters for creating or updating a management lock.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createOrUpdateAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, parameters: Models.ManagementLockObject, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName The name of the resource group containing the resource to lock.
+ * @param resourceProviderNamespace The resource provider namespace of the resource to lock.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource to lock.
+ * @param resourceName The name of the resource to lock.
+ * @param lockName The name of lock. The lock name can be a maximum of 260 characters. It cannot
+ * contain <, > %, &, :, \, ?, /, or any control characters.
+ * @param parameters Parameters for creating or updating a management lock.
+ * @param callback The callback
+ */
+ createOrUpdateAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, parameters: Models.ManagementLockObject, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the resource group containing the resource to lock.
+ * @param resourceProviderNamespace The resource provider namespace of the resource to lock.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource to lock.
+ * @param resourceName The name of the resource to lock.
+ * @param lockName The name of lock. The lock name can be a maximum of 260 characters. It cannot
+ * contain <, > %, &, :, \, ?, /, or any control characters.
+ * @param parameters Parameters for creating or updating a management lock.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ createOrUpdateAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, parameters: Models.ManagementLockObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ createOrUpdateAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, parameters: Models.ManagementLockObject, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ resourceProviderNamespace,
+ parentResourcePath,
+ resourceType,
+ resourceName,
+ lockName,
+ parameters,
+ options
+ },
+ createOrUpdateAtResourceLevelOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * To delete management locks, you must have access to Microsoft.Authorization/* or
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
+ * Administrator are granted those actions.
+ * @summary Deletes the management lock of a resource or any level below the resource.
+ * @param resourceGroupName The name of the resource group containing the resource with the lock to
+ * delete.
+ * @param resourceProviderNamespace The resource provider namespace of the resource with the lock
+ * to delete.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource with the lock to delete.
+ * @param resourceName The name of the resource with the lock to delete.
+ * @param lockName The name of the lock to delete.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName The name of the resource group containing the resource with the lock to
+ * delete.
+ * @param resourceProviderNamespace The resource provider namespace of the resource with the lock
+ * to delete.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource with the lock to delete.
+ * @param resourceName The name of the resource with the lock to delete.
+ * @param lockName The name of the lock to delete.
+ * @param callback The callback
+ */
+ deleteAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the resource group containing the resource with the lock to
+ * delete.
+ * @param resourceProviderNamespace The resource provider namespace of the resource with the lock
+ * to delete.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the resource with the lock to delete.
+ * @param resourceName The name of the resource with the lock to delete.
+ * @param lockName The name of the lock to delete.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ resourceProviderNamespace,
+ parentResourcePath,
+ resourceType,
+ resourceName,
+ lockName,
+ options
+ },
+ deleteAtResourceLevelOperationSpec,
+ callback);
+ }
+
+ /**
+ * Get the management lock of a resource or any level below resource.
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath An extra path parameter needed in some services, like SQL Databases.
+ * @param resourceType The type of the resource.
+ * @param resourceName The name of the resource.
+ * @param lockName The name of lock.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath An extra path parameter needed in some services, like SQL Databases.
+ * @param resourceType The type of the resource.
+ * @param resourceName The name of the resource.
+ * @param lockName The name of lock.
+ * @param callback The callback
+ */
+ getAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the resource group.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath An extra path parameter needed in some services, like SQL Databases.
+ * @param resourceType The type of the resource.
+ * @param resourceName The name of the resource.
+ * @param lockName The name of lock.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ resourceProviderNamespace,
+ parentResourcePath,
+ resourceType,
+ resourceName,
+ lockName,
+ options
+ },
+ getAtResourceLevelOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * When you apply a lock at a parent scope, all child resources inherit the same lock. To create
+ * management locks, you must have access to Microsoft.Authorization/* or
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
+ * Administrator are granted those actions.
+ * @summary Creates or updates a management lock at the subscription level.
+ * @param lockName The name of lock. The lock name can be a maximum of 260 characters. It cannot
+ * contain <, > %, &, :, \, ?, /, or any control characters.
+ * @param parameters The management lock parameters.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createOrUpdateAtSubscriptionLevel(lockName: string, parameters: Models.ManagementLockObject, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param lockName The name of lock. The lock name can be a maximum of 260 characters. It cannot
+ * contain <, > %, &, :, \, ?, /, or any control characters.
+ * @param parameters The management lock parameters.
+ * @param callback The callback
+ */
+ createOrUpdateAtSubscriptionLevel(lockName: string, parameters: Models.ManagementLockObject, callback: msRest.ServiceCallback): void;
+ /**
+ * @param lockName The name of lock. The lock name can be a maximum of 260 characters. It cannot
+ * contain <, > %, &, :, \, ?, /, or any control characters.
+ * @param parameters The management lock parameters.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ createOrUpdateAtSubscriptionLevel(lockName: string, parameters: Models.ManagementLockObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ createOrUpdateAtSubscriptionLevel(lockName: string, parameters: Models.ManagementLockObject, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ lockName,
+ parameters,
+ options
+ },
+ createOrUpdateAtSubscriptionLevelOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * To delete management locks, you must have access to Microsoft.Authorization/* or
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
+ * Administrator are granted those actions.
+ * @summary Deletes the management lock at the subscription level.
+ * @param lockName The name of lock to delete.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteAtSubscriptionLevel(lockName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param lockName The name of lock to delete.
+ * @param callback The callback
+ */
+ deleteAtSubscriptionLevel(lockName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param lockName The name of lock to delete.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteAtSubscriptionLevel(lockName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteAtSubscriptionLevel(lockName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ lockName,
+ options
+ },
+ deleteAtSubscriptionLevelOperationSpec,
+ callback);
+ }
+
+ /**
+ * Gets a management lock at the subscription level.
+ * @param lockName The name of the lock to get.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getAtSubscriptionLevel(lockName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param lockName The name of the lock to get.
+ * @param callback The callback
+ */
+ getAtSubscriptionLevel(lockName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param lockName The name of the lock to get.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getAtSubscriptionLevel(lockName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getAtSubscriptionLevel(lockName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ lockName,
+ options
+ },
+ getAtSubscriptionLevelOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the management locks for a resource group.
+ * @param resourceGroupName The name of the resource group containing the locks to get.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAtResourceGroupLevel(resourceGroupName: string, options?: Models.ManagementLocksListAtResourceGroupLevelOptionalParams): Promise;
+ /**
+ * @param resourceGroupName The name of the resource group containing the locks to get.
+ * @param callback The callback
+ */
+ listAtResourceGroupLevel(resourceGroupName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the resource group containing the locks to get.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAtResourceGroupLevel(resourceGroupName: string, options: Models.ManagementLocksListAtResourceGroupLevelOptionalParams, callback: msRest.ServiceCallback): void;
+ listAtResourceGroupLevel(resourceGroupName: string, options?: Models.ManagementLocksListAtResourceGroupLevelOptionalParams, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ options
+ },
+ listAtResourceGroupLevelOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the management locks for a resource or any level below resource.
+ * @param resourceGroupName The name of the resource group containing the locked resource. The name
+ * is case insensitive.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the locked resource.
+ * @param resourceName The name of the locked resource.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: Models.ManagementLocksListAtResourceLevelOptionalParams): Promise;
+ /**
+ * @param resourceGroupName The name of the resource group containing the locked resource. The name
+ * is case insensitive.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the locked resource.
+ * @param resourceName The name of the locked resource.
+ * @param callback The callback
+ */
+ listAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param resourceGroupName The name of the resource group containing the locked resource. The name
+ * is case insensitive.
+ * @param resourceProviderNamespace The namespace of the resource provider.
+ * @param parentResourcePath The parent resource identity.
+ * @param resourceType The resource type of the locked resource.
+ * @param resourceName The name of the locked resource.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options: Models.ManagementLocksListAtResourceLevelOptionalParams, callback: msRest.ServiceCallback): void;
+ listAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: Models.ManagementLocksListAtResourceLevelOptionalParams, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ resourceGroupName,
+ resourceProviderNamespace,
+ parentResourcePath,
+ resourceType,
+ resourceName,
+ options
+ },
+ listAtResourceLevelOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the management locks for a subscription.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAtSubscriptionLevel(options?: Models.ManagementLocksListAtSubscriptionLevelOptionalParams): Promise;
+ /**
+ * @param callback The callback
+ */
+ listAtSubscriptionLevel(callback: msRest.ServiceCallback): void;
+ /**
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAtSubscriptionLevel(options: Models.ManagementLocksListAtSubscriptionLevelOptionalParams, callback: msRest.ServiceCallback): void;
+ listAtSubscriptionLevel(options?: Models.ManagementLocksListAtSubscriptionLevelOptionalParams, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ options
+ },
+ listAtSubscriptionLevelOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the management locks for a resource group.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listAtResourceGroupLevelNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listAtResourceGroupLevelNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listAtResourceGroupLevelNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listAtResourceGroupLevelNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listAtResourceGroupLevelNextOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Gets all the management locks for a resource or any level below resource.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise