diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index 45f915f423b1..a5e73fcc4cc0 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -16,6 +16,7 @@ specifiers:
'@rush-temp/arm-appservice': file:./projects/arm-appservice.tgz
'@rush-temp/arm-attestation': file:./projects/arm-attestation.tgz
'@rush-temp/arm-authorization': file:./projects/arm-authorization.tgz
+ '@rush-temp/arm-azurestack': file:./projects/arm-azurestack.tgz
'@rush-temp/arm-batch': file:./projects/arm-batch.tgz
'@rush-temp/arm-botservice': file:./projects/arm-botservice.tgz
'@rush-temp/arm-cdn': file:./projects/arm-cdn.tgz
@@ -193,6 +194,7 @@ dependencies:
'@rush-temp/arm-appservice': file:projects/arm-appservice.tgz
'@rush-temp/arm-attestation': file:projects/arm-attestation.tgz
'@rush-temp/arm-authorization': file:projects/arm-authorization.tgz
+ '@rush-temp/arm-azurestack': file:projects/arm-azurestack.tgz
'@rush-temp/arm-batch': file:projects/arm-batch.tgz
'@rush-temp/arm-botservice': file:projects/arm-botservice.tgz
'@rush-temp/arm-cdn': file:projects/arm-cdn.tgz
@@ -8113,6 +8115,27 @@ packages:
uglify-js: 3.14.5
dev: false
+ file:projects/arm-azurestack.tgz:
+ resolution: {integrity: sha512-nx1zmEvcREyoaIZ/93bbMgWvGE7yOL/imhdnkRkyHyHm3ek5MjE8jW4PeY3WwhVx9ZvHqYmnQqk53QgYbhlFjw==, tarball: file:projects/arm-azurestack.tgz}
+ name: '@rush-temp/arm-azurestack'
+ version: 0.0.0
+ dependencies:
+ '@microsoft/api-extractor': 7.19.2
+ '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1
+ '@rollup/plugin-json': 4.1.0_rollup@1.32.1
+ '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1
+ '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1
+ cross-env: 7.0.3
+ mkdirp: 1.0.4
+ mocha: 7.2.0
+ rimraf: 3.0.2
+ rollup: 1.32.1
+ rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
+ tslib: 2.3.1
+ typescript: 4.2.4
+ uglify-js: 3.14.5
+ dev: false
+
file:projects/arm-batch.tgz:
resolution: {integrity: sha512-3Icocw0QnB8/JYmiR/jIr/2A2XhYvFbte2ah1d8s7Mx4Bb23RCnZjTREPQinlGgdpuNSUL0va2ixFwyXTRCiBA==, tarball: file:projects/arm-batch.tgz}
name: '@rush-temp/arm-batch'
diff --git a/rush.json b/rush.json
index 34af3f469246..177d412807c7 100644
--- a/rush.json
+++ b/rush.json
@@ -1195,6 +1195,11 @@
"packageName": "@azure/arm-attestation",
"projectFolder": "sdk/attestation/arm-attestation",
"versionPolicyName": "management"
+ },
+ {
+ "packageName": "@azure/arm-azurestack",
+ "projectFolder": "sdk/azurestack/arm-azurestack",
+ "versionPolicyName": "management"
}
]
}
\ No newline at end of file
diff --git a/sdk/azurestack/arm-azurestack/CHANGELOG.md b/sdk/azurestack/arm-azurestack/CHANGELOG.md
new file mode 100644
index 000000000000..e20a63cc7860
--- /dev/null
+++ b/sdk/azurestack/arm-azurestack/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 3.0.0-beta.1 (2021-12-30)
+
+The package of @azure/arm-azurestack is using our next generation design principles since version 3.0.0-beta.1, which contains breaking changes.
+
+To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
+
+To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
+
+To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
diff --git a/sdk/azurestack/arm-azurestack/LICENSE.txt b/sdk/azurestack/arm-azurestack/LICENSE
similarity index 96%
rename from sdk/azurestack/arm-azurestack/LICENSE.txt
rename to sdk/azurestack/arm-azurestack/LICENSE
index ea8fb1516028..ccb63b166732 100644
--- a/sdk/azurestack/arm-azurestack/LICENSE.txt
+++ b/sdk/azurestack/arm-azurestack/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2020 Microsoft
+Copyright (c) 2021 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
@@ -18,4 +18,4 @@ 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.
+SOFTWARE.
\ No newline at end of file
diff --git a/sdk/azurestack/arm-azurestack/README.md b/sdk/azurestack/arm-azurestack/README.md
index 2ccdfc94ebd0..be2f289af53d 100644
--- a/sdk/azurestack/arm-azurestack/README.md
+++ b/sdk/azurestack/arm-azurestack/README.md
@@ -1,109 +1,98 @@
-## Azure AzureStackManagementClient SDK for JavaScript
+# AzureStackManagement client library for JavaScript
-This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureStackManagementClient.
+This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureStackManagement client.
+
+Azure Stack
+
+[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/azurestack/arm-azurestack) |
+[Package (NPM)](https://www.npmjs.com/package/@azure/arm-azurestack) |
+[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-azurestack?view=azure-node-preview) |
+[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
+
+## Getting started
### Currently supported environments
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
-- Latest versions of Safari, Chrome, Edge, and Firefox.
+- Latest versions of Safari, Chrome, Edge and Firefox.
### Prerequisites
-You must have an [Azure subscription](https://azure.microsoft.com/free/).
+- An [Azure subscription][azure_sub].
-### How to install
+### Install the `@azure/arm-azurestack` package
-To use this SDK in your project, you will need to install two packages.
-- `@azure/arm-azurestack` that contains the client.
-- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
+Install the AzureStackManagement client library for JavaScript with `npm`:
-Install both packages using the below command:
```bash
-npm install --save @azure/arm-azurestack @azure/identity
+npm install @azure/arm-azurestack
```
-> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
-If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
+### Create and authenticate a `AzureStackManagementClient`
-### How to use
+To create a client object to access the AzureStackManagement API, you will need the `endpoint` of your AzureStackManagement resource and a `credential`. The AzureStackManagement client can use Azure Active Directory credentials to authenticate.
+You can find the endpoint for your AzureStackManagement resource in the [Azure Portal][azure_portal].
-- If you are writing a client side browser application,
- - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions.
- - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below.
-- If you are writing a server side application,
- - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples)
- - Complete the set up steps required by the credential if any.
- - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below.
+You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
-In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
-Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
+To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
+
+```bash
+npm install @azure/identity
+```
-#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript.
+You will also need to **register a new AAD application and grant access to AzureStackManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
+Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
-##### Sample code
+For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
```javascript
-const { DefaultAzureCredential } = require("@azure/identity");
const { AzureStackManagementClient } = require("@azure/arm-azurestack");
-const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
-
-// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples
-// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
-const creds = new DefaultAzureCredential();
-const client = new AzureStackManagementClient(creds, subscriptionId);
-
-client.operations.list().then((result) => {
- console.log("The result is:");
- console.log(result);
-}).catch((err) => {
- console.log("An error occurred:");
- console.error(err);
-});
+const { DefaultAzureCredential } = require("@azure/identity");
+const subscriptionId = "00000000-0000-0000-0000-000000000000";
+const client = new AzureStackManagementClient(new DefaultAzureCredential(), subscriptionId);
```
-#### browser - Authentication, client creation, and list operations as an example written in JavaScript.
-
-In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
- - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
- - Note down the client Id from the previous step and use it in the browser sample below.
-
-##### Sample code
-
-- index.html
-
-```html
-
-
-
- @azure/arm-azurestack sample
-
-
-
-
-
-
-
+
+### JavaScript Bundle
+To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
+
+## Key concepts
+
+### AzureStackManagementClient
+
+`AzureStackManagementClient` is the primary interface for developers using the AzureStackManagement client library. Explore the methods on this client object to understand the different features of the AzureStackManagement service that you can access.
+
+## Troubleshooting
+
+### Logging
+
+Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
+
+```javascript
+const { setLogLevel } = require("@azure/logger");
+setLogLevel("info");
```
+For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
+
+## Next steps
+
+Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
+
+## Contributing
+
+If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
+
## Related projects
-- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
+- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
+
+
-
+[azure_cli]: https://docs.microsoft.com/cli/azure
+[azure_sub]: https://azure.microsoft.com/free/
+[azure_sub]: https://azure.microsoft.com/free/
+[azure_portal]: https://portal.azure.com
+[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
+[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
diff --git a/sdk/azurestack/arm-azurestack/_meta.json b/sdk/azurestack/arm-azurestack/_meta.json
new file mode 100644
index 000000000000..d49b41e078e4
--- /dev/null
+++ b/sdk/azurestack/arm-azurestack/_meta.json
@@ -0,0 +1,7 @@
+{
+ "commit": "54ee1a9eb50c13e0790627749f986c886ad4f4db",
+ "readme": "specification/azurestack/resource-manager/readme.md",
+ "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/azurestack/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
+ "use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
+}
\ No newline at end of file
diff --git a/sdk/azurestack/arm-azurestack/api-extractor.json b/sdk/azurestack/arm-azurestack/api-extractor.json
new file mode 100644
index 000000000000..fbf48f9ff5fb
--- /dev/null
+++ b/sdk/azurestack/arm-azurestack/api-extractor.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
+ "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
+ "docModel": { "enabled": true },
+ "apiReport": { "enabled": true, "reportFolder": "./review" },
+ "dtsRollup": {
+ "enabled": true,
+ "untrimmedFilePath": "",
+ "publicTrimmedFilePath": "./types/arm-azurestack.d.ts"
+ },
+ "messages": {
+ "tsdocMessageReporting": { "default": { "logLevel": "none" } },
+ "extractorMessageReporting": {
+ "ae-missing-release-tag": { "logLevel": "none" },
+ "ae-unresolved-link": { "logLevel": "none" }
+ }
+ }
+}
diff --git a/sdk/azurestack/arm-azurestack/package.json b/sdk/azurestack/arm-azurestack/package.json
index b56b53a85d67..369eefd96ff8 100644
--- a/sdk/azurestack/arm-azurestack/package.json
+++ b/sdk/azurestack/arm-azurestack/package.json
@@ -1,58 +1,89 @@
{
"name": "@azure/arm-azurestack",
+ "sdk-type": "mgmt",
"author": "Microsoft Corporation",
- "description": "AzureStackManagementClient Library with typescript type definitions for node.js and browser.",
- "version": "2.1.0",
+ "description": "A generated SDK for AzureStackManagementClient.",
+ "version": "3.0.0-beta.1",
+ "engines": { "node": ">=12.0.0" },
"dependencies": {
- "@azure/ms-rest-azure-js": "^2.1.0",
- "@azure/ms-rest-js": "^2.2.0",
- "@azure/core-auth": "^1.1.4",
- "tslib": "^1.10.0"
+ "@azure/core-paging": "^1.2.0",
+ "@azure/core-client": "^1.0.0",
+ "@azure/core-auth": "^1.3.0",
+ "@azure/core-rest-pipeline": "^1.1.0",
+ "tslib": "^2.2.0"
},
- "keywords": [
- "node",
- "azure",
- "typescript",
- "browser",
- "isomorphic"
- ],
+ "keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
"license": "MIT",
- "main": "./dist/arm-azurestack.js",
- "module": "./esm/azureStackManagementClient.js",
- "types": "./esm/azureStackManagementClient.d.ts",
+ "main": "./dist/index.js",
+ "module": "./dist-esm/src/index.js",
+ "types": "./types/arm-azurestack.d.ts",
"devDependencies": {
- "typescript": "^3.6.0",
- "rollup": "^1.18.0",
- "rollup-plugin-node-resolve": "^5.2.0",
+ "@microsoft/api-extractor": "^7.18.11",
+ "@rollup/plugin-commonjs": "11.0.2",
+ "@rollup/plugin-json": "^4.0.0",
+ "@rollup/plugin-multi-entry": "^3.0.0",
+ "@rollup/plugin-node-resolve": "^8.0.0",
+ "mkdirp": "^1.0.4",
+ "rollup": "^1.16.3",
"rollup-plugin-sourcemaps": "^0.4.2",
- "uglify-js": "^3.6.0"
+ "typescript": "~4.2.0",
+ "uglify-js": "^3.4.9",
+ "rimraf": "^3.0.0",
+ "@azure/identity": "^2.0.1",
+ "@azure-tools/test-recorder": "^1.0.0",
+ "mocha": "^7.1.1",
+ "cross-env": "^7.0.2"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/azurestack/arm-azurestack",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
- "bugs": {
- "url": "https://github.com/Azure/azure-sdk-for-js/issues"
- },
+ "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts",
"dist/**/*.d.ts.map",
- "esm/**/*.js",
- "esm/**/*.js.map",
- "esm/**/*.d.ts",
- "esm/**/*.d.ts.map",
+ "dist-esm/**/*.js",
+ "dist-esm/**/*.js.map",
+ "dist-esm/**/*.d.ts",
+ "dist-esm/**/*.d.ts.map",
"src/**/*.ts",
"README.md",
+ "LICENSE",
"rollup.config.js",
- "tsconfig.json"
+ "tsconfig.json",
+ "review/*",
+ "CHANGELOG.md",
+ "types/*"
],
"scripts": {
- "build": "tsc && rollup -c rollup.config.js && npm run minify",
- "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-azurestack.js.map'\" -o ./dist/arm-azurestack.min.js ./dist/arm-azurestack.js",
- "prepack": "npm install && npm run build"
+ "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
+ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
+ "prepack": "npm run build",
+ "pack": "npm pack 2>&1",
+ "extract-api": "api-extractor run --local",
+ "lint": "echo skipped",
+ "audit": "echo skipped",
+ "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
+ "build:node": "echo skipped",
+ "build:browser": "echo skipped",
+ "build:test": "echo skipped",
+ "build:samples": "echo skipped.",
+ "check-format": "echo skipped",
+ "execute:samples": "echo skipped",
+ "format": "echo skipped",
+ "test": "npm run integration-test",
+ "test:node": "echo skipped",
+ "test:browser": "echo skipped",
+ "unit-test": "npm run unit-test:node && npm run unit-test:browser",
+ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
+ "unit-test:browser": "echo skipped",
+ "integration-test": "npm run integration-test:node && npm run integration-test:browser",
+ "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
+ "integration-test:browser": "echo skipped",
+ "docs": "echo skipped"
},
"sideEffects": false,
"autoPublish": true
diff --git a/sdk/azurestack/arm-azurestack/recordings/node/my_test/recording_sample_test.js b/sdk/azurestack/arm-azurestack/recordings/node/my_test/recording_sample_test.js
new file mode 100644
index 000000000000..0f6ecb857acf
--- /dev/null
+++ b/sdk/azurestack/arm-azurestack/recordings/node/my_test/recording_sample_test.js
@@ -0,0 +1,5 @@
+let nock = require('nock');
+
+module.exports.hash = "7a6be38bb8cb644d64b4094802301751";
+
+module.exports.testInfo = {"uniqueName":{},"newDate":{}}
diff --git a/sdk/azurestack/arm-azurestack/review/arm-azurestack.api.md b/sdk/azurestack/arm-azurestack/review/arm-azurestack.api.md
new file mode 100644
index 000000000000..4ff2b06c2a23
--- /dev/null
+++ b/sdk/azurestack/arm-azurestack/review/arm-azurestack.api.md
@@ -0,0 +1,695 @@
+## API Report File for "@azure/arm-azurestack"
+
+> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
+
+```ts
+
+import * as coreAuth from '@azure/core-auth';
+import * as coreClient from '@azure/core-client';
+import { PagedAsyncIterableIterator } from '@azure/core-paging';
+
+// @public
+export interface ActivationKeyResult {
+ activationKey?: string;
+}
+
+// @public (undocumented)
+export class AzureStackManagementClient extends coreClient.ServiceClient {
+ // (undocumented)
+ $host: string;
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureStackManagementClientOptionalParams);
+ // (undocumented)
+ apiVersion: string;
+ // (undocumented)
+ cloudManifestFile: CloudManifestFile;
+ // (undocumented)
+ customerSubscriptions: CustomerSubscriptions;
+ // (undocumented)
+ linkedSubscriptions: LinkedSubscriptions;
+ // (undocumented)
+ operations: Operations;
+ // (undocumented)
+ products: Products;
+ // (undocumented)
+ registrations: Registrations;
+ // (undocumented)
+ subscriptionId: string;
+}
+
+// @public
+export interface AzureStackManagementClientOptionalParams extends coreClient.ServiceClientOptions {
+ $host?: string;
+ apiVersion?: string;
+ endpoint?: string;
+}
+
+// @public
+export type Category = string;
+
+// @public
+export interface CloudManifestFile {
+ get(verificationVersion: string, options?: CloudManifestFileGetOptionalParams): Promise;
+ list(options?: CloudManifestFileListOptionalParams): Promise;
+}
+
+// @public
+export interface CloudManifestFileDeploymentData {
+ customCloudArmEndpoint?: string;
+ customCloudVerificationKey?: string;
+ externalDsmsCertificates?: string;
+ externalDsmsEndpoint?: string;
+}
+
+// @public
+export interface CloudManifestFileGetOptionalParams extends coreClient.OperationOptions {
+ versionCreationDate?: string;
+}
+
+// @public
+export type CloudManifestFileGetResponse = CloudManifestFileResponse;
+
+// @public
+export interface CloudManifestFileListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type CloudManifestFileListResponse = CloudManifestFileResponse;
+
+// @public
+export interface CloudManifestFileProperties {
+ deploymentData?: CloudManifestFileDeploymentData;
+ signature?: string;
+}
+
+// @public
+export type CloudManifestFileResponse = Resource & {
+ properties?: CloudManifestFileProperties;
+};
+
+// @public
+export interface Compatibility {
+ description?: string;
+ isCompatible?: boolean;
+ issues?: CompatibilityIssue[];
+ message?: string;
+}
+
+// @public
+export type CompatibilityIssue = string;
+
+// @public
+export type ComputeRole = string;
+
+// @public
+export type CreatedByType = string;
+
+// @public
+export type CustomerSubscription = Resource & {
+ readonly systemData?: SystemData;
+ tenantId?: string;
+};
+
+// @public
+export interface CustomerSubscriptionList {
+ nextLink?: string;
+ value?: CustomerSubscription[];
+}
+
+// @public
+export interface CustomerSubscriptions {
+ create(resourceGroup: string, registrationName: string, customerSubscriptionName: string, customerCreationParameters: CustomerSubscription, options?: CustomerSubscriptionsCreateOptionalParams): Promise;
+ delete(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options?: CustomerSubscriptionsDeleteOptionalParams): Promise;
+ get(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options?: CustomerSubscriptionsGetOptionalParams): Promise;
+ list(resourceGroup: string, registrationName: string, options?: CustomerSubscriptionsListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface CustomerSubscriptionsCreateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type CustomerSubscriptionsCreateResponse = CustomerSubscription;
+
+// @public
+export interface CustomerSubscriptionsDeleteOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface CustomerSubscriptionsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type CustomerSubscriptionsGetResponse = CustomerSubscription;
+
+// @public
+export interface CustomerSubscriptionsListNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type CustomerSubscriptionsListNextResponse = CustomerSubscriptionList;
+
+// @public
+export interface CustomerSubscriptionsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type CustomerSubscriptionsListResponse = CustomerSubscriptionList;
+
+// @public
+export interface DataDiskImage {
+ readonly lun?: number;
+ readonly sourceBlobSasUri?: string;
+}
+
+// @public
+export interface DeviceConfiguration {
+ readonly deviceVersion?: string;
+ readonly identitySystem?: Category;
+}
+
+// @public
+export interface Display {
+ description?: string;
+ operation?: string;
+ provider?: string;
+ resource?: string;
+}
+
+// @public
+export interface ErrorDetails {
+ readonly code?: string;
+ readonly message?: string;
+ readonly target?: string;
+}
+
+// @public
+export interface ErrorResponse {
+ error?: ErrorDetails;
+}
+
+// @public
+export interface ExtendedProduct {
+ readonly computeRole?: ComputeRole;
+ readonly dataDiskImages?: DataDiskImage[];
+ readonly galleryPackageBlobSasUri?: string;
+ readonly isSystemExtension?: boolean;
+ readonly osDiskImage?: OsDiskImage;
+ readonly productKind?: string;
+ readonly supportMultipleExtensions?: boolean;
+ readonly uri?: string;
+ readonly version?: string;
+ readonly versionPropertiesVersion?: string;
+ readonly vmOsType?: OperatingSystem;
+ readonly vmScaleSetEnabled?: boolean;
+}
+
+// @public
+export type ExtendedProductProperties = VirtualMachineExtensionProductProperties & VirtualMachineProductProperties & {};
+
+// @public
+export interface IconUris {
+ hero?: string;
+ large?: string;
+ medium?: string;
+ small?: string;
+ wide?: string;
+}
+
+// @public
+export enum KnownCategory {
+ // (undocumented)
+ Adfs = "ADFS",
+ // (undocumented)
+ AzureAD = "AzureAD"
+}
+
+// @public
+export enum KnownCompatibilityIssue {
+ // (undocumented)
+ AdfsIdentitySystemRequired = "ADFSIdentitySystemRequired",
+ // (undocumented)
+ AzureADIdentitySystemRequired = "AzureADIdentitySystemRequired",
+ // (undocumented)
+ CapacityBillingModelRequired = "CapacityBillingModelRequired",
+ // (undocumented)
+ ConnectionToAzureRequired = "ConnectionToAzureRequired",
+ // (undocumented)
+ ConnectionToInternetRequired = "ConnectionToInternetRequired",
+ // (undocumented)
+ DevelopmentBillingModelRequired = "DevelopmentBillingModelRequired",
+ // (undocumented)
+ DisconnectedEnvironmentRequired = "DisconnectedEnvironmentRequired",
+ // (undocumented)
+ HigherDeviceVersionRequired = "HigherDeviceVersionRequired",
+ // (undocumented)
+ LowerDeviceVersionRequired = "LowerDeviceVersionRequired",
+ // (undocumented)
+ PayAsYouGoBillingModelRequired = "PayAsYouGoBillingModelRequired"
+}
+
+// @public
+export enum KnownComputeRole {
+ // (undocumented)
+ IaaS = "IaaS",
+ // (undocumented)
+ None = "None",
+ // (undocumented)
+ PaaS = "PaaS"
+}
+
+// @public
+export enum KnownCreatedByType {
+ // (undocumented)
+ Application = "Application",
+ // (undocumented)
+ Key = "Key",
+ // (undocumented)
+ ManagedIdentity = "ManagedIdentity",
+ // (undocumented)
+ User = "User"
+}
+
+// @public
+export enum KnownLocation {
+ // (undocumented)
+ Global = "global"
+}
+
+// @public
+export enum KnownOperatingSystem {
+ // (undocumented)
+ Linux = "Linux",
+ // (undocumented)
+ None = "None",
+ // (undocumented)
+ Windows = "Windows"
+}
+
+// @public
+export type LinkedSubscription = TrackedResource & {
+ linkedSubscriptionId?: string;
+ registrationResourceId?: string;
+ readonly deviceId?: string;
+ readonly deviceObjectId?: string;
+ readonly deviceLinkState?: string;
+ readonly lastConnectedTime?: string;
+ readonly deviceConnectionStatus?: string;
+};
+
+// @public
+export interface LinkedSubscriptionParameter {
+ linkedSubscriptionId: string;
+ location: Location_2;
+ registrationResourceId: string;
+}
+
+// @public
+export interface LinkedSubscriptions {
+ createOrUpdate(resourceGroup: string, linkedSubscriptionName: string, resource: LinkedSubscriptionParameter, options?: LinkedSubscriptionsCreateOrUpdateOptionalParams): Promise;
+ delete(resourceGroup: string, linkedSubscriptionName: string, options?: LinkedSubscriptionsDeleteOptionalParams): Promise;
+ get(resourceGroup: string, linkedSubscriptionName: string, options?: LinkedSubscriptionsGetOptionalParams): Promise;
+ listByResourceGroup(resourceGroup: string, options?: LinkedSubscriptionsListByResourceGroupOptionalParams): PagedAsyncIterableIterator;
+ listBySubscription(options?: LinkedSubscriptionsListBySubscriptionOptionalParams): PagedAsyncIterableIterator;
+ update(resourceGroup: string, linkedSubscriptionName: string, resource: LinkedSubscriptionParameter, options?: LinkedSubscriptionsUpdateOptionalParams): Promise;
+}
+
+// @public
+export interface LinkedSubscriptionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type LinkedSubscriptionsCreateOrUpdateResponse = LinkedSubscription;
+
+// @public
+export interface LinkedSubscriptionsDeleteOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface LinkedSubscriptionsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type LinkedSubscriptionsGetResponse = LinkedSubscription;
+
+// @public
+export interface LinkedSubscriptionsList {
+ nextLink?: string;
+ value?: LinkedSubscription[];
+}
+
+// @public
+export interface LinkedSubscriptionsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type LinkedSubscriptionsListByResourceGroupNextResponse = LinkedSubscriptionsList;
+
+// @public
+export interface LinkedSubscriptionsListByResourceGroupOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type LinkedSubscriptionsListByResourceGroupResponse = LinkedSubscriptionsList;
+
+// @public
+export interface LinkedSubscriptionsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type LinkedSubscriptionsListBySubscriptionNextResponse = LinkedSubscriptionsList;
+
+// @public
+export interface LinkedSubscriptionsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type LinkedSubscriptionsListBySubscriptionResponse = LinkedSubscriptionsList;
+
+// @public
+export interface LinkedSubscriptionsUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type LinkedSubscriptionsUpdateResponse = LinkedSubscription;
+
+// @public
+type Location_2 = string;
+export { Location_2 as Location }
+
+// @public
+export interface MarketplaceProductLogUpdate {
+ readonly details?: string;
+ readonly error?: string;
+ readonly operation?: string;
+ readonly status?: string;
+}
+
+// @public
+export type OperatingSystem = string;
+
+// @public
+export interface Operation {
+ display?: Display;
+ name?: string;
+ origin?: string;
+}
+
+// @public
+export interface OperationList {
+ nextLink?: string;
+ value?: Operation[];
+}
+
+// @public
+export interface Operations {
+ list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator;
+}
+
+// @public
+export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type OperationsListNextResponse = OperationList;
+
+// @public
+export interface OperationsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type OperationsListResponse = OperationList;
+
+// @public
+export interface OsDiskImage {
+ readonly operatingSystem?: OperatingSystem;
+ readonly sourceBlobSasUri?: string;
+}
+
+// @public
+export type Product = Resource & {
+ readonly systemData?: SystemData;
+ displayName?: string;
+ description?: string;
+ publisherDisplayName?: string;
+ publisherIdentifier?: string;
+ offer?: string;
+ offerVersion?: string;
+ sku?: string;
+ billingPartNumber?: string;
+ vmExtensionType?: string;
+ galleryItemIdentity?: string;
+ iconUris?: IconUris;
+ links?: ProductLink[];
+ legalTerms?: string;
+ privacyPolicy?: string;
+ payloadLength?: number;
+ productKind?: string;
+ productProperties?: ProductProperties;
+ compatibility?: Compatibility;
+};
+
+// @public
+export interface ProductLink {
+ displayName?: string;
+ uri?: string;
+}
+
+// @public
+export interface ProductList {
+ nextLink?: string;
+ value?: Product[];
+}
+
+// @public
+export interface ProductLog {
+ readonly details?: string;
+ readonly endDate?: string;
+ readonly error?: string;
+ readonly id?: string;
+ readonly operation?: string;
+ readonly productId?: string;
+ readonly registrationName?: string;
+ readonly resourceGroupName?: string;
+ readonly startDate?: string;
+ readonly status?: string;
+ readonly subscriptionId?: string;
+}
+
+// @public
+export interface ProductProperties {
+ version?: string;
+}
+
+// @public
+export interface Products {
+ get(resourceGroup: string, registrationName: string, productName: string, options?: ProductsGetOptionalParams): Promise;
+ getProduct(resourceGroup: string, registrationName: string, productName: string, options?: ProductsGetProductOptionalParams): Promise;
+ getProducts(resourceGroup: string, registrationName: string, productName: string, options?: ProductsGetProductsOptionalParams): Promise;
+ list(resourceGroup: string, registrationName: string, options?: ProductsListOptionalParams): PagedAsyncIterableIterator;
+ listDetails(resourceGroup: string, registrationName: string, productName: string, options?: ProductsListDetailsOptionalParams): Promise;
+ uploadLog(resourceGroup: string, registrationName: string, productName: string, options?: ProductsUploadLogOptionalParams): Promise;
+}
+
+// @public
+export interface ProductsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface ProductsGetProductOptionalParams extends coreClient.OperationOptions {
+ deviceConfiguration?: DeviceConfiguration;
+}
+
+// @public
+export type ProductsGetProductResponse = Product;
+
+// @public
+export interface ProductsGetProductsOptionalParams extends coreClient.OperationOptions {
+ deviceConfiguration?: DeviceConfiguration;
+}
+
+// @public
+export type ProductsGetProductsResponse = ProductList;
+
+// @public
+export type ProductsGetResponse = Product;
+
+// @public
+export interface ProductsListDetailsOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type ProductsListDetailsResponse = ExtendedProduct;
+
+// @public
+export interface ProductsListNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type ProductsListNextResponse = ProductList;
+
+// @public
+export interface ProductsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type ProductsListResponse = ProductList;
+
+// @public
+export interface ProductsUploadLogOptionalParams extends coreClient.OperationOptions {
+ marketplaceProductLogUpdate?: MarketplaceProductLogUpdate;
+}
+
+// @public
+export type ProductsUploadLogResponse = ProductLog;
+
+// @public
+export type ProvisioningState = "Creating" | "Failed" | "Succeeded" | "Canceled";
+
+// @public
+export type Registration = TrackedResource & {
+ objectId?: string;
+ cloudId?: string;
+ billingModel?: string;
+};
+
+// @public
+export interface RegistrationList {
+ nextLink?: string;
+ value?: Registration[];
+}
+
+// @public
+export interface RegistrationParameter {
+ location: Location_2;
+ registrationToken: string;
+}
+
+// @public
+export interface Registrations {
+ createOrUpdate(resourceGroup: string, registrationName: string, token: RegistrationParameter, options?: RegistrationsCreateOrUpdateOptionalParams): Promise;
+ delete(resourceGroup: string, registrationName: string, options?: RegistrationsDeleteOptionalParams): Promise;
+ enableRemoteManagement(resourceGroup: string, registrationName: string, options?: RegistrationsEnableRemoteManagementOptionalParams): Promise;
+ get(resourceGroup: string, registrationName: string, options?: RegistrationsGetOptionalParams): Promise;
+ getActivationKey(resourceGroup: string, registrationName: string, options?: RegistrationsGetActivationKeyOptionalParams): Promise;
+ list(resourceGroup: string, options?: RegistrationsListOptionalParams): PagedAsyncIterableIterator;
+ listBySubscription(options?: RegistrationsListBySubscriptionOptionalParams): PagedAsyncIterableIterator;
+ update(resourceGroup: string, registrationName: string, token: RegistrationParameter, options?: RegistrationsUpdateOptionalParams): Promise;
+}
+
+// @public
+export interface RegistrationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type RegistrationsCreateOrUpdateResponse = Registration;
+
+// @public
+export interface RegistrationsDeleteOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface RegistrationsEnableRemoteManagementOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export interface RegistrationsGetActivationKeyOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type RegistrationsGetActivationKeyResponse = ActivationKeyResult;
+
+// @public
+export interface RegistrationsGetOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type RegistrationsGetResponse = Registration;
+
+// @public
+export interface RegistrationsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type RegistrationsListBySubscriptionNextResponse = RegistrationList;
+
+// @public
+export interface RegistrationsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type RegistrationsListBySubscriptionResponse = RegistrationList;
+
+// @public
+export interface RegistrationsListNextOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type RegistrationsListNextResponse = RegistrationList;
+
+// @public
+export interface RegistrationsListOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type RegistrationsListResponse = RegistrationList;
+
+// @public
+export interface RegistrationsUpdateOptionalParams extends coreClient.OperationOptions {
+}
+
+// @public
+export type RegistrationsUpdateResponse = Registration;
+
+// @public
+export interface Resource {
+ etag?: string;
+ readonly id?: string;
+ readonly name?: string;
+ readonly type?: string;
+}
+
+// @public
+export interface SystemData {
+ createdAt?: Date;
+ createdBy?: string;
+ createdByType?: CreatedByType;
+ lastModifiedAt?: Date;
+ lastModifiedBy?: string;
+ lastModifiedByType?: CreatedByType;
+}
+
+// @public
+export interface TrackedResource {
+ etag?: string;
+ readonly id?: string;
+ readonly kind?: string;
+ location: Location_2;
+ readonly name?: string;
+ readonly systemData?: SystemData;
+ tags?: {
+ [propertyName: string]: string;
+ };
+ readonly type?: string;
+}
+
+// @public
+export interface VirtualMachineExtensionProductProperties {
+ readonly computeRole?: ComputeRole;
+ readonly isSystemExtension?: boolean;
+ readonly supportMultipleExtensions?: boolean;
+ readonly uri?: string;
+ readonly version?: string;
+ readonly vmOsType?: OperatingSystem;
+ readonly vmScaleSetEnabled?: boolean;
+}
+
+// @public
+export interface VirtualMachineProductProperties {
+ readonly dataDiskImages?: DataDiskImage[];
+ readonly osDiskImage?: OsDiskImage;
+ readonly version?: string;
+}
+
+// (No @packageDocumentation comment for this package)
+
+```
diff --git a/sdk/azurestack/arm-azurestack/rollup.config.js b/sdk/azurestack/arm-azurestack/rollup.config.js
index 43e870f5a495..9be1955eb7f1 100644
--- a/sdk/azurestack/arm-azurestack/rollup.config.js
+++ b/sdk/azurestack/arm-azurestack/rollup.config.js
@@ -1,37 +1,188 @@
-import rollup from "rollup";
-import nodeResolve from "rollup-plugin-node-resolve";
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import nodeResolve from "@rollup/plugin-node-resolve";
+import cjs from "@rollup/plugin-commonjs";
import sourcemaps from "rollup-plugin-sourcemaps";
+import multiEntry from "@rollup/plugin-multi-entry";
+import json from "@rollup/plugin-json";
+
+import nodeBuiltins from "builtin-modules";
+
+/**
+ * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
+ *
+ * NOTE: this manual configuration is only needed because OpenTelemetry uses an
+ * __exportStar downleveled helper function to declare its exports which confuses
+ * rollup's automatic discovery mechanism.
+ *
+ * @returns an object reference that can be `...`'d into your cjs() configuration.
+ */
+export function openTelemetryCommonJs() {
+ const namedExports = {};
+
+ for (const key of [
+ "@opentelemetry/api",
+ "@azure/core-tracing/node_modules/@opentelemetry/api"
+ ]) {
+ namedExports[key] = [
+ "SpanKind",
+ "TraceFlags",
+ "getSpan",
+ "setSpan",
+ "SpanStatusCode",
+ "getSpanContext",
+ "setSpanContext"
+ ];
+ }
+
+ const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
+
+ for (const version of releasedOpenTelemetryVersions) {
+ namedExports[
+ // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
+ `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
+ ] = [
+ "SpanKind",
+ "TraceFlags",
+ "getSpan",
+ "setSpan",
+ "StatusCode",
+ "CanonicalCode",
+ "getSpanContext",
+ "setSpanContext"
+ ];
+ }
+
+ return namedExports;
+}
+
+// #region Warning Handler
/**
- * @type {rollup.RollupFileOptions}
+ * A function that can determine whether a rollupwarning should be ignored. If
+ * the function returns `true`, then the warning will not be displayed.
*/
-const config = {
- input: "./esm/azureStackManagementClient.js",
- external: [
- "@azure/ms-rest-js",
- "@azure/ms-rest-azure-js"
- ],
- output: {
- file: "./dist/arm-azurestack.js",
- format: "umd",
- name: "Azure.ArmAzurestack",
- sourcemap: true,
- globals: {
- "@azure/ms-rest-js": "msRest",
- "@azure/ms-rest-azure-js": "msRestAzure"
+
+function ignoreNiseSinonEvalWarnings(warning) {
+ return (
+ warning.code === "EVAL" &&
+ warning.id &&
+ (warning.id.includes("node_modules/nise") ||
+ warning.id.includes("node_modules/sinon")) === true
+ );
+}
+
+function ignoreChaiCircularDependencyWarnings(warning) {
+ return (
+ warning.code === "CIRCULAR_DEPENDENCY" &&
+ warning.importer && warning.importer.includes("node_modules/chai") === true
+ );
+}
+
+const warningInhibitors = [
+ ignoreChaiCircularDependencyWarnings,
+ ignoreNiseSinonEvalWarnings
+];
+
+/**
+ * Construct a warning handler for the shared rollup configuration
+ * that ignores certain warnings that are not relevant to testing.
+ */
+function makeOnWarnForTesting() {
+ return (warning, warn) => {
+ // If every inhibitor returns false (i.e. no inhibitors), then show the warning
+ if (warningInhibitors.every((inhib) => !inhib(warning))) {
+ warn(warning);
+ }
+ };
+}
+
+// #endregion
+
+function makeBrowserTestConfig() {
+ const config = {
+ input: {
+ include: ["dist-esm/test/**/*.spec.js"],
+ exclude: ["dist-esm/test/**/node/**"]
},
- 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({ mainFields: ['module', 'main'] }),
- sourcemaps()
- ]
+ output: {
+ file: `dist-test/index.browser.js`,
+ format: "umd",
+ sourcemap: true
+ },
+ preserveSymlinks: false,
+ plugins: [
+ multiEntry({ exports: false }),
+ nodeResolve({
+ mainFields: ["module", "browser"]
+ }),
+ cjs({
+ namedExports: {
+ // Chai's strange internal architecture makes it impossible to statically
+ // analyze its exports.
+ chai: [
+ "version",
+ "use",
+ "util",
+ "config",
+ "expect",
+ "should",
+ "assert"
+ ],
+ ...openTelemetryCommonJs()
+ }
+ }),
+ json(),
+ sourcemaps()
+ //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
+ ],
+ onwarn: makeOnWarnForTesting(),
+ // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
+ // rollup started respecting the "sideEffects" field in package.json. Since
+ // our package.json sets "sideEffects=false", this also applies to test
+ // code, which causes all tests to be removed by tree-shaking.
+ treeshake: false
+ };
+
+ return config;
+}
+
+const defaultConfigurationOptions = {
+ disableBrowserBundle: false
};
-export default config;
+export function makeConfig(pkg, options) {
+ options = {
+ ...defaultConfigurationOptions,
+ ...(options || {})
+ };
+
+ const baseConfig = {
+ // Use the package's module field if it has one
+ input: pkg["module"] || "dist-esm/src/index.js",
+ external: [
+ ...nodeBuiltins,
+ ...Object.keys(pkg.dependencies),
+ ...Object.keys(pkg.devDependencies)
+ ],
+ output: { file: "dist/index.js", format: "cjs", sourcemap: true },
+ preserveSymlinks: false,
+ plugins: [sourcemaps(), nodeResolve(), cjs()]
+ };
+
+ const config = [baseConfig];
+
+ if (!options.disableBrowserBundle) {
+ config.push(makeBrowserTestConfig());
+ }
+
+ return config;
+}
+
+export default makeConfig(require("./package.json"));
diff --git a/sdk/azurestack/arm-azurestack/src/azureStackManagementClient.ts b/sdk/azurestack/arm-azurestack/src/azureStackManagementClient.ts
index 1e8337f77e14..ae28939aabed 100644
--- a/sdk/azurestack/arm-azurestack/src/azureStackManagementClient.ts
+++ b/sdk/azurestack/arm-azurestack/src/azureStackManagementClient.ts
@@ -1,55 +1,100 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import { TokenCredential } from "@azure/core-auth";
-import * as Models from "./models";
-import * as Mappers from "./models/mappers";
-import * as operations from "./operations";
-import { AzureStackManagementClientContext } from "./azureStackManagementClientContext";
+import * as coreClient from "@azure/core-client";
+import * as coreAuth from "@azure/core-auth";
+import {
+ OperationsImpl,
+ CloudManifestFileImpl,
+ CustomerSubscriptionsImpl,
+ ProductsImpl,
+ RegistrationsImpl,
+ LinkedSubscriptionsImpl
+} from "./operations";
+import {
+ Operations,
+ CloudManifestFile,
+ CustomerSubscriptions,
+ Products,
+ Registrations,
+ LinkedSubscriptions
+} from "./operationsInterfaces";
+import { AzureStackManagementClientOptionalParams } from "./models";
-
-class AzureStackManagementClient extends AzureStackManagementClientContext {
- // Operation groups
- operations: operations.Operations;
- products: operations.Products;
- registrations: operations.Registrations;
- customerSubscriptions: operations.CustomerSubscriptions;
+export class AzureStackManagementClient extends coreClient.ServiceClient {
+ $host: string;
+ apiVersion: string;
+ subscriptionId: string;
/**
* Initializes a new instance of the AzureStackManagementClient class.
- * @param credentials Credentials needed for the client to connect to Azure. Credentials
- * implementing the TokenCredential interface from the @azure/identity package are recommended. For
- * more information about these credentials, see
- * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
- * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
- * @azure/ms-rest-browserauth are also supported.
- * @param subscriptionId Subscription credentials that uniquely identify Microsoft Azure
- * subscription. The subscription ID forms part of the URI for every service call.
- * @param [options] The parameter options
+ * @param credentials Subscription credentials which uniquely identify client subscription.
+ * @param subscriptionId Subscription credentials that uniquely identify Microsoft Azure subscription.
+ * The subscription ID forms part of the URI for every service call.
+ * @param options The parameter options
*/
- constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureStackManagementClientOptions) {
- super(credentials, subscriptionId, options);
- this.operations = new operations.Operations(this);
- this.products = new operations.Products(this);
- this.registrations = new operations.Registrations(this);
- this.customerSubscriptions = new operations.CustomerSubscriptions(this);
- }
-}
+ constructor(
+ credentials: coreAuth.TokenCredential,
+ subscriptionId: string,
+ options?: AzureStackManagementClientOptionalParams
+ ) {
+ if (credentials === undefined) {
+ throw new Error("'credentials' cannot be null");
+ }
+ if (subscriptionId === undefined) {
+ throw new Error("'subscriptionId' cannot be null");
+ }
+
+ // Initializing default values for options
+ if (!options) {
+ options = {};
+ }
+ const defaults: AzureStackManagementClientOptionalParams = {
+ requestContentType: "application/json; charset=utf-8",
+ credential: credentials
+ };
-// Operation Specifications
+ const packageDetails = `azsdk-js-arm-azurestack/3.0.0-beta.1`;
+ const userAgentPrefix =
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
+ : `${packageDetails}`;
-export {
- AzureStackManagementClient,
- AzureStackManagementClientContext,
- Models as AzureStackManagementModels,
- Mappers as AzureStackManagementMappers
-};
-export * from "./operations";
+ if (!options.credentialScopes) {
+ options.credentialScopes = ["https://management.azure.com/.default"];
+ }
+ const optionsWithDefaults = {
+ ...defaults,
+ ...options,
+ userAgentOptions: {
+ userAgentPrefix
+ },
+ baseUri: options.endpoint || "https://management.azure.com"
+ };
+ super(optionsWithDefaults);
+ // Parameter assignments
+ this.subscriptionId = subscriptionId;
+
+ // Assigning values to Constant parameters
+ this.$host = options.$host || "https://management.azure.com";
+ this.apiVersion = options.apiVersion || "2020-06-01-preview";
+ this.operations = new OperationsImpl(this);
+ this.cloudManifestFile = new CloudManifestFileImpl(this);
+ this.customerSubscriptions = new CustomerSubscriptionsImpl(this);
+ this.products = new ProductsImpl(this);
+ this.registrations = new RegistrationsImpl(this);
+ this.linkedSubscriptions = new LinkedSubscriptionsImpl(this);
+ }
+
+ operations: Operations;
+ cloudManifestFile: CloudManifestFile;
+ customerSubscriptions: CustomerSubscriptions;
+ products: Products;
+ registrations: Registrations;
+ linkedSubscriptions: LinkedSubscriptions;
+}
diff --git a/sdk/azurestack/arm-azurestack/src/azureStackManagementClientContext.ts b/sdk/azurestack/arm-azurestack/src/azureStackManagementClientContext.ts
deleted file mode 100644
index 156bc37d3bc5..000000000000
--- a/sdk/azurestack/arm-azurestack/src/azureStackManagementClientContext.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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 "@azure/ms-rest-js";
-import { TokenCredential } from "@azure/core-auth";
-import * as msRestAzure from "@azure/ms-rest-azure-js";
-
-const packageName = "@azure/arm-azurestack";
-const packageVersion = "2.1.0";
-
-export class AzureStackManagementClientContext extends msRestAzure.AzureServiceClient {
- credentials: msRest.ServiceClientCredentials | TokenCredential;
- subscriptionId: string;
- apiVersion?: string;
-
- /**
- * Initializes a new instance of the AzureStackManagementClient class.
- * @param credentials Credentials needed for the client to connect to Azure. Credentials
- * implementing the TokenCredential interface from the @azure/identity package are recommended. For
- * more information about these credentials, see
- * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
- * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
- * @azure/ms-rest-browserauth are also supported.
- * @param subscriptionId Subscription credentials that uniquely identify Microsoft Azure
- * subscription. The subscription ID forms part of the URI for every service call.
- * @param [options] The parameter options
- */
- constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.AzureStackManagementClientOptions) {
- if (credentials == undefined) {
- throw new Error('\'credentials\' cannot be null.');
- }
- if (subscriptionId == undefined) {
- throw new Error('\'subscriptionId\' cannot be null.');
- }
-
- if (!options) {
- options = {};
- }
- if(!options.userAgent) {
- const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
- options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
- }
-
- super(credentials, options);
-
- this.apiVersion = '2017-06-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;
-
- 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/sdk/azurestack/arm-azurestack/src/index.ts b/sdk/azurestack/arm-azurestack/src/index.ts
new file mode 100644
index 000000000000..edc0a6b99925
--- /dev/null
+++ b/sdk/azurestack/arm-azurestack/src/index.ts
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+///
+export * from "./models";
+export { AzureStackManagementClient } from "./azureStackManagementClient";
+export * from "./operationsInterfaces";
diff --git a/sdk/azurestack/arm-azurestack/src/models/customerSubscriptionsMappers.ts b/sdk/azurestack/arm-azurestack/src/models/customerSubscriptionsMappers.ts
deleted file mode 100644
index 3fac26f64b26..000000000000
--- a/sdk/azurestack/arm-azurestack/src/models/customerSubscriptionsMappers.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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 {
- BaseResource,
- CloudError,
- Compatibility,
- CustomerSubscription,
- CustomerSubscriptionList,
- ErrorDetails,
- ErrorResponse,
- IconUris,
- Product,
- ProductLink,
- ProductProperties,
- Registration,
- Resource,
- TrackedResource
-} from "../models/mappers";
diff --git a/sdk/azurestack/arm-azurestack/src/models/index.ts b/sdk/azurestack/arm-azurestack/src/models/index.ts
index bc6c459c0000..5b0251477320 100644
--- a/sdk/azurestack/arm-azurestack/src/models/index.ts
+++ b/sdk/azurestack/arm-azurestack/src/models/index.ts
@@ -1,1092 +1,981 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js";
-import * as msRest from "@azure/ms-rest-js";
+import * as coreClient from "@azure/core-client";
-export { BaseResource, CloudError };
-
-/**
- * Base resource object.
- */
-export interface Resource extends BaseResource {
- /**
- * ID of the resource.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly id?: string;
- /**
- * Name of the resource.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly name?: string;
- /**
- * Type of Resource.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly type?: string;
- /**
- * The entity tag used for optimistic concurrency when modifying the resource.
- */
- etag?: string;
+/** List of Operations */
+export interface OperationList {
+ /** Array of operations */
+ value?: Operation[];
+ /** URI to the next page of operations. */
+ nextLink?: string;
}
-/**
- * Base resource object.
- */
-export interface TrackedResource extends BaseResource {
- /**
- * ID of the resource.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly id?: string;
- /**
- * Name of the resource.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly name?: string;
- /**
- * Type of Resource.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly type?: string;
- /**
- * Custom tags for the resource.
- */
- tags?: { [propertyName: string]: string };
- /**
- * The entity tag used for optimistic concurrency when modifying the resource.
- */
- etag?: string;
+/** Describes the supported REST operation. */
+export interface Operation {
+ /** The name of the operation being performed on this particular object. */
+ name?: string;
+ /** Contains the localized display information for this particular operation or action. */
+ display?: Display;
+ /** The intended executor of the operation. */
+ origin?: string;
}
-/**
- * Contains the localized display information for this particular operation or action.
- */
+/** Contains the localized display information for this particular operation or action. */
export interface Display {
- /**
- * The localized, friendly version of the resource provider name.
- */
+ /** The localized, friendly version of the resource provider name. */
provider?: string;
- /**
- * The localized, friendly version of the resource type related to this action or operation; the
- * resource type should match the public documentation for the resource provider.
- */
+ /** The localized, friendly version of the resource type related to this action or operation; the resource type should match the public documentation for the resource provider. */
resource?: string;
- /**
- * The localized, friendly name for the operation. Use the name as it will displayed to the user.
- */
+ /** The localized, friendly name for the operation. Use the name as it will displayed to the user. */
operation?: string;
- /**
- * The localized, friendly description for the operation. The description will be displayed to
- * the user. It should be thorough and concise for used in both tooltips and detailed views.
- */
+ /** The localized, friendly description for the operation. The description will be displayed to the user. It should be thorough and concise for used in both tooltips and detailed views. */
description?: string;
}
-/**
- * Describes the supported REST operation.
- */
-export interface Operation {
- /**
- * The name of the operation being performed on this particular object.
- */
- name?: string;
- /**
- * Contains the localized display information for this particular operation or action.
- */
- display?: Display;
- /**
- * The intended executor of the operation.
- */
- origin?: string;
+/** Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. */
+export interface ErrorResponse {
+ /** The details of the error. */
+ error?: ErrorDetails;
}
-/**
- * The details of the error.
- */
+/** The details of the error. */
export interface ErrorDetails {
/**
* Error code.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly code?: string;
/**
* Error message indicating why the operation failed.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly message?: string;
/**
* The target of the particular error.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly target?: string;
}
-/**
- * Error response indicates that the service is not able to process the incoming request. The
- * reason is provided in the error message.
- */
-export interface ErrorResponse {
- /**
- * The details of the error.
- */
- error?: ErrorDetails;
+/** Cloud specific manifest JSON properties. */
+export interface CloudManifestFileProperties {
+ /** Cloud specific manifest data. */
+ deploymentData?: CloudManifestFileDeploymentData;
+ /** Signature of the cloud specific manifest data. */
+ signature?: string;
}
-/**
- * OS disk image.
- */
-export interface OsDiskImage {
- /**
- * OS operating system type. Possible values include: 'None', 'Windows', 'Linux'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly operatingSystem?: OperatingSystem;
- /**
- * SAS key for source blob.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly sourceBlobSasUri?: string;
+/** Cloud specific manifest data for AzureStack deployment. */
+export interface CloudManifestFileDeploymentData {
+ /** Dsms external certificates. */
+ externalDsmsCertificates?: string;
+ /** Signing verification public key. */
+ customCloudVerificationKey?: string;
+ /** ARM endpoint. */
+ customCloudArmEndpoint?: string;
+ /** Dsms endpoint. */
+ externalDsmsEndpoint?: string;
}
-/**
- * Data disk image.
- */
-export interface DataDiskImage {
+/** Base resource object. */
+export interface Resource {
/**
- * The LUN.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * ID of the resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly lun?: number;
+ readonly id?: string;
/**
- * SAS key for source blob.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * Name of the resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly sourceBlobSasUri?: string;
+ readonly name?: string;
+ /**
+ * Type of Resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly type?: string;
+ /** The entity tag used for optimistic concurrency when modifying the resource. */
+ etag?: string;
}
-/**
- * Extended description about the product required for installing it into Azure Stack.
- */
+/** Pageable list of customer subscriptions. */
+export interface CustomerSubscriptionList {
+ /** URI to the next page. */
+ nextLink?: string;
+ /** List of customer subscriptions. */
+ value?: CustomerSubscription[];
+}
+
+/** Metadata pertaining to creation and last modification of the resource. */
+export interface SystemData {
+ /** The identity that created the resource. */
+ createdBy?: string;
+ /** The type of identity that created the resource. */
+ createdByType?: CreatedByType;
+ /** The timestamp of resource creation (UTC). */
+ createdAt?: Date;
+ /** The identity that last modified the resource. */
+ lastModifiedBy?: string;
+ /** The type of identity that last modified the resource. */
+ lastModifiedByType?: CreatedByType;
+ /** The timestamp of resource last modification (UTC) */
+ lastModifiedAt?: Date;
+}
+
+/** Pageable list of products. */
+export interface ProductList {
+ /** URI to the next page. */
+ nextLink?: string;
+ /** List of products. */
+ value?: Product[];
+}
+
+/** Links to product icons. */
+export interface IconUris {
+ /** URI to large icon. */
+ large?: string;
+ /** URI to wide icon. */
+ wide?: string;
+ /** URI to medium icon. */
+ medium?: string;
+ /** URI to small icon. */
+ small?: string;
+ /** URI to hero icon. */
+ hero?: string;
+}
+
+/** Link with additional information about a product. */
+export interface ProductLink {
+ /** The description of the link. */
+ displayName?: string;
+ /** The URI corresponding to the link. */
+ uri?: string;
+}
+
+/** Additional properties of the product */
+export interface ProductProperties {
+ /** The version. */
+ version?: string;
+}
+
+/** Product compatibility */
+export interface Compatibility {
+ /** Tells if product is compatible with current device */
+ isCompatible?: boolean;
+ /** Short error message if any compatibility issues are found */
+ message?: string;
+ /** Full error message if any compatibility issues are found */
+ description?: string;
+ /** List of all issues found */
+ issues?: CompatibilityIssue[];
+}
+
+/** Extended description about the product required for installing it into Azure Stack. */
export interface ExtendedProduct {
/**
- * The URI to the .azpkg file that provides information required for showing product in the
- * gallery.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The URI to the .azpkg file that provides information required for showing product in the gallery.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly galleryPackageBlobSasUri?: string;
/**
* Specifies the kind of the product (virtualMachine or virtualMachineExtension).
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly productKind?: string;
/**
- * Specifies kind of compute role included in the package. Possible values include: 'None',
- * 'IaaS', 'PaaS'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * Specifies kind of compute role included in the package.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly computeRole?: ComputeRole;
/**
* Specifies if product is a Virtual Machine Extension.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly isSystemExtension?: boolean;
- /**
- * The URI.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly uri?: string;
/**
* Indicates if specified product supports multiple extensions.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly supportMultipleExtensions?: boolean;
/**
* Specifies product version.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly version?: string;
+ readonly versionPropertiesVersion?: string;
/**
- * Specifies operating system used by the product. Possible values include: 'None', 'Windows',
- * 'Linux'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * Specifies operating system used by the product.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly vmOsType?: OperatingSystem;
/**
* Indicates if virtual machine Scale Set is enabled in the specified product.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly vmScaleSetEnabled?: boolean;
+ /**
+ * The URI.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly uri?: string;
+ /**
+ * Specifies product version.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly version?: string;
/**
* OS disk image used by product.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly osDiskImage?: OsDiskImage;
/**
* List of attached data disks.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly dataDiskImages?: DataDiskImage[];
}
-/**
- * Product information.
- */
+/** Product information. */
export interface VirtualMachineExtensionProductProperties {
/**
- * Specifies kind of compute role included in the package. Possible values include: 'None',
- * 'IaaS', 'PaaS'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * Specifies kind of compute role included in the package.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly computeRole?: ComputeRole;
/**
* Specifies if product is a Virtual Machine Extension.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly isSystemExtension?: boolean;
- /**
- * The URI.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly uri?: string;
/**
* Indicates if specified product supports multiple extensions.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly supportMultipleExtensions?: boolean;
/**
* Specifies product version.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly version?: string;
/**
- * Specifies operating system used by the product. Possible values include: 'None', 'Windows',
- * 'Linux'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * Specifies operating system used by the product.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly vmOsType?: OperatingSystem;
/**
* Indicates if virtual machine Scale Set is enabled in the specified product.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly vmScaleSetEnabled?: boolean;
+ /**
+ * The URI.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly uri?: string;
}
-/**
- * Product information.
- */
+/** Product information. */
export interface VirtualMachineProductProperties {
/**
* Specifies product version.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly version?: string;
/**
* OS disk image used by product.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly osDiskImage?: OsDiskImage;
/**
* List of attached data disks.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly dataDiskImages?: DataDiskImage[];
}
-/**
- * Links to product icons.
- */
-export interface IconUris {
- /**
- * URI to large icon.
- */
- large?: string;
- /**
- * URI to wide icon.
- */
- wide?: string;
- /**
- * URI to medium icon.
- */
- medium?: string;
+/** OS disk image. */
+export interface OsDiskImage {
/**
- * URI to small icon.
+ * OS operating system type.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- small?: string;
+ readonly operatingSystem?: OperatingSystem;
/**
- * URI to hero icon.
+ * SAS key for source blob.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- hero?: string;
+ readonly sourceBlobSasUri?: string;
}
-/**
- * Link with additional information about a product.
- */
-export interface ProductLink {
+/** Data disk image. */
+export interface DataDiskImage {
/**
- * The description of the link.
+ * The LUN.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- displayName?: string;
+ readonly lun?: number;
/**
- * The URI corresponding to the link.
+ * SAS key for source blob.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- uri?: string;
+ readonly sourceBlobSasUri?: string;
}
-/**
- * Additional properties of the product
- */
-export interface ProductProperties {
+/** Device Configuration. */
+export interface DeviceConfiguration {
/**
- * The version.
+ * Version of the device.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- version?: string;
+ readonly deviceVersion?: string;
+ /**
+ * Identity system of the device.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
+ */
+ readonly identitySystem?: Category;
}
-/**
- * Product compatibility
- */
-export interface Compatibility {
+/** Update details for product log. */
+export interface MarketplaceProductLogUpdate {
/**
- * Tells if product is compatible with current device
+ * Operation to log.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- isCompatible?: boolean;
+ readonly operation?: string;
/**
- * Short error message if any compatibility issues are found
+ * Operation status to log.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- message?: string;
+ readonly status?: string;
/**
- * Full error message if any compatibility issues are found
+ * Error related to the operation.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- description?: string;
+ readonly error?: string;
/**
- * List of all issues found
+ * Error details related to operation.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- issues?: CompatibilityIssue[];
+ readonly details?: string;
}
-/**
- * Product information.
- */
-export interface Product extends Resource {
+/** Product action log. */
+export interface ProductLog {
/**
- * The display name of the product.
+ * Log ID.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- displayName?: string;
+ readonly id?: string;
/**
- * The description of the product.
+ * Logged product ID.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- description?: string;
+ readonly productId?: string;
/**
- * The user-friendly name of the product publisher.
+ * Logged subscription ID.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- publisherDisplayName?: string;
+ readonly subscriptionId?: string;
/**
- * Publisher identifier.
+ * Logged registration name.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- publisherIdentifier?: string;
+ readonly registrationName?: string;
/**
- * The offer representing the product.
+ * Logged resource group name.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- offer?: string;
+ readonly resourceGroupName?: string;
/**
- * The version of the product offer.
+ * Logged operation.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- offerVersion?: string;
+ readonly operation?: string;
/**
- * The product SKU.
+ * Operation start datetime.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- sku?: string;
+ readonly startDate?: string;
/**
- * The part number used for billing purposes.
+ * Operation end datetime.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- billingPartNumber?: string;
+ readonly endDate?: string;
/**
- * The type of the Virtual Machine Extension.
+ * Operation status.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- vmExtensionType?: string;
+ readonly status?: string;
/**
- * The identifier of the gallery item corresponding to the product.
+ * Operation error data.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- galleryItemIdentity?: string;
+ readonly error?: string;
/**
- * Additional links available for this product.
+ * Operation error details.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- iconUris?: IconUris;
+ readonly details?: string;
+}
+
+/** Pageable list of registrations. */
+export interface RegistrationList {
+ /** URI to the next page. */
+ nextLink?: string;
+ /** List of Registrations */
+ value?: Registration[];
+}
+
+/** Base resource object. */
+export interface TrackedResource {
/**
- * Additional links available for this product.
+ * ID of the resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- links?: ProductLink[];
- /**
- * The legal terms.
- */
- legalTerms?: string;
- /**
- * The privacy policy.
- */
- privacyPolicy?: string;
+ readonly id?: string;
/**
- * The length of product content.
+ * Name of the resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- payloadLength?: number;
+ readonly name?: string;
/**
- * The kind of the product (virtualMachine or virtualMachineExtension)
+ * Type of Resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- productKind?: string;
+ readonly type?: string;
/**
- * Additional properties for the product.
+ * The kind of the resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- productProperties?: ProductProperties;
+ readonly kind?: string;
/**
- * Product compatibility with current device.
+ * Metadata pertaining to creation and last modification of the resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- compatibility?: Compatibility;
+ readonly systemData?: SystemData;
+ /** Location of the resource. */
+ location: Location;
+ /** Custom tags for the resource. */
+ tags?: { [propertyName: string]: string };
+ /** The entity tag used for optimistic concurrency when modifying the resource. */
+ etag?: string;
}
-/**
- * Device Configuration.
- */
-export interface DeviceConfiguration {
- /**
- * Version of the device.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly deviceVersion?: string;
- /**
- * Identity system of the device. Possible values include: 'AzureAD', 'ADFS'
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly identitySystem?: Category;
+/** Registration resource */
+export interface RegistrationParameter {
+ /** Location of the resource. */
+ location: Location;
+ /** The token identifying registered Azure Stack */
+ registrationToken: string;
}
-/**
- * Update details for product log.
- */
-export interface MarketplaceProductLogUpdate {
- /**
- * Operation to log.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly operation?: string;
- /**
- * Operation status to log.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly status?: string;
- /**
- * Error related to the operation.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly error?: string;
- /**
- * Error details related to operation.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly details?: string;
+/** The resource containing the Azure Stack activation key. */
+export interface ActivationKeyResult {
+ /** Azure Stack activation key. */
+ activationKey?: string;
}
-/**
- * Product action log.
- */
-export interface ProductLog {
- /**
- * Log ID.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly id?: string;
- /**
- * Logged product ID.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly productId?: string;
- /**
- * Logged subscription ID.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly subscriptionId?: string;
- /**
- * Logged registration name.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
- */
- readonly registrationName?: string;
+/** List of linked subscriptions with paging support. */
+export interface LinkedSubscriptionsList {
+ /** URI to the next page. */
+ nextLink?: string;
+ /** List of Linked Subscriptions */
+ value?: LinkedSubscription[];
+}
+
+/** Linked Subscription resource */
+export interface LinkedSubscriptionParameter {
+ /** Location of the resource. */
+ location: Location;
+ /** The identifier associated with the device subscription. */
+ linkedSubscriptionId: string;
+ /** The identifier associated with the device registration. */
+ registrationResourceId: string;
+}
+
+/** Cloud specific manifest GET response. */
+export type CloudManifestFileResponse = Resource & {
+ /** Cloud specific manifest data. */
+ properties?: CloudManifestFileProperties;
+};
+
+/** Customer subscription. */
+export type CustomerSubscription = Resource & {
/**
- * Logged resource group name.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * Metadata pertaining to creation and last modification of the resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly resourceGroupName?: string;
+ readonly systemData?: SystemData;
+ /** Tenant Id. */
+ tenantId?: string;
+};
+
+/** Product information. */
+export type Product = Resource & {
/**
- * Logged operation.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * Metadata pertaining to creation and last modification of the resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly operation?: string;
+ readonly systemData?: SystemData;
+ /** The display name of the product. */
+ displayName?: string;
+ /** The description of the product. */
+ description?: string;
+ /** The user-friendly name of the product publisher. */
+ publisherDisplayName?: string;
+ /** Publisher identifier. */
+ publisherIdentifier?: string;
+ /** The offer representing the product. */
+ offer?: string;
+ /** The version of the product offer. */
+ offerVersion?: string;
+ /** The product SKU. */
+ sku?: string;
+ /** The part number used for billing purposes. */
+ billingPartNumber?: string;
+ /** The type of the Virtual Machine Extension. */
+ vmExtensionType?: string;
+ /** The identifier of the gallery item corresponding to the product. */
+ galleryItemIdentity?: string;
+ /** Additional links available for this product. */
+ iconUris?: IconUris;
+ /** Additional links available for this product. */
+ links?: ProductLink[];
+ /** The legal terms. */
+ legalTerms?: string;
+ /** The privacy policy. */
+ privacyPolicy?: string;
+ /** The length of product content. */
+ payloadLength?: number;
+ /** The kind of the product (virtualMachine or virtualMachineExtension) */
+ productKind?: string;
+ /** Additional properties for the product. */
+ productProperties?: ProductProperties;
+ /** Product compatibility with current device. */
+ compatibility?: Compatibility;
+};
+
+/** Product information. */
+export type ExtendedProductProperties = VirtualMachineExtensionProductProperties &
+ VirtualMachineProductProperties & {};
+
+/** Registration information. */
+export type Registration = TrackedResource & {
+ /** The object identifier associated with the Azure Stack connecting to Azure. */
+ objectId?: string;
+ /** The identifier of the registered Azure Stack. */
+ cloudId?: string;
+ /** Specifies the billing mode for the Azure Stack registration. */
+ billingModel?: string;
+};
+
+/** Linked Subscription information. */
+export type LinkedSubscription = TrackedResource & {
+ /** The identifier associated with the device subscription. */
+ linkedSubscriptionId?: string;
+ /** The identifier associated with the device registration. */
+ registrationResourceId?: string;
/**
- * Operation start datetime.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The identifier of the Azure Stack device for remote management.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly startDate?: string;
+ readonly deviceId?: string;
/**
- * Operation end datetime.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The object identifier associated with the Azure Stack device connecting to Azure.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly endDate?: string;
+ readonly deviceObjectId?: string;
/**
- * Operation status.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The connection state of the Azure Stack device.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly status?: string;
+ readonly deviceLinkState?: string;
/**
- * Operation error data.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The last remote management connection time for the Azure Stack device connected to the linked subscription resource.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly error?: string;
+ readonly lastConnectedTime?: string;
/**
- * Operation error details.
- * **NOTE: This property will not be serialized. It can only be populated by the server.**
+ * The status of the remote management connection of the Azure Stack device.
+ * NOTE: This property will not be serialized. It can only be populated by the server.
*/
- readonly details?: string;
+ readonly deviceConnectionStatus?: string;
+};
+
+/** Known values of {@link CreatedByType} that the service accepts. */
+export enum KnownCreatedByType {
+ User = "User",
+ Application = "Application",
+ ManagedIdentity = "ManagedIdentity",
+ Key = "Key"
}
/**
- * Registration information.
- */
-export interface Registration extends TrackedResource {
- /**
- * The object identifier associated with the Azure Stack connecting to Azure.
- */
- objectId?: string;
- /**
- * The identifier of the registered Azure Stack.
- */
- cloudId?: string;
- /**
- * Specifies the billing mode for the Azure Stack registration.
- */
- billingModel?: string;
+ * Defines values for CreatedByType. \
+ * {@link KnownCreatedByType} can be used interchangeably with CreatedByType,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **User** \
+ * **Application** \
+ * **ManagedIdentity** \
+ * **Key**
+ */
+export type CreatedByType = string;
+
+/** Known values of {@link CompatibilityIssue} that the service accepts. */
+export enum KnownCompatibilityIssue {
+ HigherDeviceVersionRequired = "HigherDeviceVersionRequired",
+ LowerDeviceVersionRequired = "LowerDeviceVersionRequired",
+ CapacityBillingModelRequired = "CapacityBillingModelRequired",
+ PayAsYouGoBillingModelRequired = "PayAsYouGoBillingModelRequired",
+ DevelopmentBillingModelRequired = "DevelopmentBillingModelRequired",
+ AzureADIdentitySystemRequired = "AzureADIdentitySystemRequired",
+ AdfsIdentitySystemRequired = "ADFSIdentitySystemRequired",
+ ConnectionToInternetRequired = "ConnectionToInternetRequired",
+ ConnectionToAzureRequired = "ConnectionToAzureRequired",
+ DisconnectedEnvironmentRequired = "DisconnectedEnvironmentRequired"
}
/**
- * The resource containing the Azure Stack activation key.
- */
-export interface ActivationKeyResult {
- /**
- * Azure Stack activation key.
- */
- activationKey?: string;
+ * Defines values for CompatibilityIssue. \
+ * {@link KnownCompatibilityIssue} can be used interchangeably with CompatibilityIssue,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **HigherDeviceVersionRequired** \
+ * **LowerDeviceVersionRequired** \
+ * **CapacityBillingModelRequired** \
+ * **PayAsYouGoBillingModelRequired** \
+ * **DevelopmentBillingModelRequired** \
+ * **AzureADIdentitySystemRequired** \
+ * **ADFSIdentitySystemRequired** \
+ * **ConnectionToInternetRequired** \
+ * **ConnectionToAzureRequired** \
+ * **DisconnectedEnvironmentRequired**
+ */
+export type CompatibilityIssue = string;
+
+/** Known values of {@link ComputeRole} that the service accepts. */
+export enum KnownComputeRole {
+ None = "None",
+ IaaS = "IaaS",
+ PaaS = "PaaS"
}
/**
- * Registration resource
+ * Defines values for ComputeRole. \
+ * {@link KnownComputeRole} can be used interchangeably with ComputeRole,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **None** \
+ * **IaaS** \
+ * **PaaS**
*/
-export interface RegistrationParameter {
- /**
- * The token identifying registered Azure Stack
- */
- registrationToken: string;
- /**
- * Location of the resource. Possible values include: 'global'
- */
- location?: Location;
+export type ComputeRole = string;
+
+/** Known values of {@link OperatingSystem} that the service accepts. */
+export enum KnownOperatingSystem {
+ None = "None",
+ Windows = "Windows",
+ Linux = "Linux"
}
/**
- * Customer subscription.
+ * Defines values for OperatingSystem. \
+ * {@link KnownOperatingSystem} can be used interchangeably with OperatingSystem,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **None** \
+ * **Windows** \
+ * **Linux**
*/
-export interface CustomerSubscription extends Resource {
- /**
- * Tenant Id.
- */
- tenantId?: string;
+export type OperatingSystem = string;
+
+/** Known values of {@link Category} that the service accepts. */
+export enum KnownCategory {
+ AzureAD = "AzureAD",
+ Adfs = "ADFS"
}
/**
- * An interface representing AzureStackManagementClientOptions.
+ * Defines values for Category. \
+ * {@link KnownCategory} can be used interchangeably with Category,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **AzureAD** \
+ * **ADFS**
*/
-export interface AzureStackManagementClientOptions extends AzureServiceClientOptions {
- baseUri?: string;
+export type Category = string;
+
+/** Known values of {@link Location} that the service accepts. */
+export enum KnownLocation {
+ Global = "global"
}
/**
- * @interface
- * List of Operations
- * @extends Array
+ * Defines values for Location. \
+ * {@link KnownLocation} can be used interchangeably with Location,
+ * this enum contains the known values that the service supports.
+ * ### Known values supported by the service
+ * **global**
*/
-export interface OperationList extends Array {
- /**
- * URI to the next page of operations.
- */
- nextLink?: string;
+export type Location = string;
+/** Defines values for ProvisioningState. */
+export type ProvisioningState =
+ | "Creating"
+ | "Failed"
+ | "Succeeded"
+ | "Canceled";
+
+/** Optional parameters. */
+export interface OperationsListOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the list operation. */
+export type OperationsListResponse = OperationList;
+
+/** Optional parameters. */
+export interface OperationsListNextOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listNext operation. */
+export type OperationsListNextResponse = OperationList;
+
+/** Optional parameters. */
+export interface CloudManifestFileListOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the list operation. */
+export type CloudManifestFileListResponse = CloudManifestFileResponse;
+
+/** Optional parameters. */
+export interface CloudManifestFileGetOptionalParams
+ extends coreClient.OperationOptions {
+ /** Signing verification key version creation date. */
+ versionCreationDate?: string;
}
-/**
- * @interface
- * Pageable list of products.
- * @extends Array
- */
-export interface ProductList extends Array {
- /**
- * URI to the next page.
- */
- nextLink?: string;
+/** Contains response data for the get operation. */
+export type CloudManifestFileGetResponse = CloudManifestFileResponse;
+
+/** Optional parameters. */
+export interface CustomerSubscriptionsListOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the list operation. */
+export type CustomerSubscriptionsListResponse = CustomerSubscriptionList;
+
+/** Optional parameters. */
+export interface CustomerSubscriptionsGetOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the get operation. */
+export type CustomerSubscriptionsGetResponse = CustomerSubscription;
+
+/** Optional parameters. */
+export interface CustomerSubscriptionsDeleteOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Optional parameters. */
+export interface CustomerSubscriptionsCreateOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the create operation. */
+export type CustomerSubscriptionsCreateResponse = CustomerSubscription;
+
+/** Optional parameters. */
+export interface CustomerSubscriptionsListNextOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listNext operation. */
+export type CustomerSubscriptionsListNextResponse = CustomerSubscriptionList;
+
+/** Optional parameters. */
+export interface ProductsListOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the list operation. */
+export type ProductsListResponse = ProductList;
+
+/** Optional parameters. */
+export interface ProductsGetOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the get operation. */
+export type ProductsGetResponse = Product;
+
+/** Optional parameters. */
+export interface ProductsListDetailsOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listDetails operation. */
+export type ProductsListDetailsResponse = ExtendedProduct;
+
+/** Optional parameters. */
+export interface ProductsGetProductsOptionalParams
+ extends coreClient.OperationOptions {
+ /** Device configuration. */
+ deviceConfiguration?: DeviceConfiguration;
}
-/**
- * @interface
- * Pageable list of registrations.
- * @extends Array
- */
-export interface RegistrationList extends Array {
- /**
- * URI to the next page.
- */
- nextLink?: string;
+/** Contains response data for the getProducts operation. */
+export type ProductsGetProductsResponse = ProductList;
+
+/** Optional parameters. */
+export interface ProductsGetProductOptionalParams
+ extends coreClient.OperationOptions {
+ /** Device configuration. */
+ deviceConfiguration?: DeviceConfiguration;
}
-/**
- * @interface
- * Pageable list of customer subscriptions.
- * @extends Array
- */
-export interface CustomerSubscriptionList extends Array {
- /**
- * URI to the next page.
- */
- nextLink?: string;
+/** Contains response data for the getProduct operation. */
+export type ProductsGetProductResponse = Product;
+
+/** Optional parameters. */
+export interface ProductsUploadLogOptionalParams
+ extends coreClient.OperationOptions {
+ /** Update details for product log. */
+ marketplaceProductLogUpdate?: MarketplaceProductLogUpdate;
}
-/**
- * Defines values for ProvisioningState.
- * Possible values include: 'Creating', 'Failed', 'Succeeded', 'Canceled'
- * @readonly
- * @enum {string}
- */
-export type ProvisioningState = 'Creating' | 'Failed' | 'Succeeded' | 'Canceled';
+/** Contains response data for the uploadLog operation. */
+export type ProductsUploadLogResponse = ProductLog;
-/**
- * Defines values for ComputeRole.
- * Possible values include: 'None', 'IaaS', 'PaaS'
- * @readonly
- * @enum {string}
- */
-export type ComputeRole = 'None' | 'IaaS' | 'PaaS';
+/** Optional parameters. */
+export interface ProductsListNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Defines values for OperatingSystem.
- * Possible values include: 'None', 'Windows', 'Linux'
- * @readonly
- * @enum {string}
- */
-export type OperatingSystem = 'None' | 'Windows' | 'Linux';
+/** Contains response data for the listNext operation. */
+export type ProductsListNextResponse = ProductList;
-/**
- * Defines values for CompatibilityIssue.
- * Possible values include: 'HigherDeviceVersionRequired', 'LowerDeviceVersionRequired',
- * 'CapacityBillingModelRequired', 'PayAsYouGoBillingModelRequired',
- * 'DevelopmentBillingModelRequired', 'AzureADIdentitySystemRequired',
- * 'ADFSIdentitySystemRequired', 'ConnectionToInternetRequired', 'ConnectionToAzureRequired',
- * 'DisconnectedEnvironmentRequired'
- * @readonly
- * @enum {string}
- */
-export type CompatibilityIssue = 'HigherDeviceVersionRequired' | 'LowerDeviceVersionRequired' | 'CapacityBillingModelRequired' | 'PayAsYouGoBillingModelRequired' | 'DevelopmentBillingModelRequired' | 'AzureADIdentitySystemRequired' | 'ADFSIdentitySystemRequired' | 'ConnectionToInternetRequired' | 'ConnectionToAzureRequired' | 'DisconnectedEnvironmentRequired';
+/** Optional parameters. */
+export interface RegistrationsListOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Defines values for Category.
- * Possible values include: 'AzureAD', 'ADFS'
- * @readonly
- * @enum {string}
- */
-export type Category = 'AzureAD' | 'ADFS';
+/** Contains response data for the list operation. */
+export type RegistrationsListResponse = RegistrationList;
-/**
- * Defines values for Location.
- * Possible values include: 'global'
- * @readonly
- * @enum {string}
- */
-export type Location = 'global';
+/** Optional parameters. */
+export interface RegistrationsListBySubscriptionOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the list operation.
- */
-export type OperationsListResponse = OperationList & {
- /**
- * 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: OperationList;
- };
-};
+/** Contains response data for the listBySubscription operation. */
+export type RegistrationsListBySubscriptionResponse = RegistrationList;
-/**
- * Contains response data for the listNext operation.
- */
-export type OperationsListNextResponse = OperationList & {
- /**
- * 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: OperationList;
- };
-};
+/** Optional parameters. */
+export interface RegistrationsGetOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the list operation.
- */
-export type ProductsListResponse = ProductList & {
- /**
- * 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: ProductList;
- };
-};
+/** Contains response data for the get operation. */
+export type RegistrationsGetResponse = Registration;
-/**
- * Contains response data for the get operation.
- */
-export type ProductsGetResponse = Product & {
- /**
- * 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: Product;
- };
-};
+/** Optional parameters. */
+export interface RegistrationsDeleteOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listDetails operation.
- */
-export type ProductsListDetailsResponse = ExtendedProduct & {
- /**
- * 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: ExtendedProduct;
- };
-};
+/** Optional parameters. */
+export interface RegistrationsCreateOrUpdateOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the getProducts operation.
- */
-export type ProductsGetProductsResponse = ProductList & {
- /**
- * 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: ProductList;
- };
-};
+/** Contains response data for the createOrUpdate operation. */
+export type RegistrationsCreateOrUpdateResponse = Registration;
-/**
- * Contains response data for the getProduct operation.
- */
-export type ProductsGetProductResponse = Product & {
- /**
- * 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: Product;
- };
-};
+/** Optional parameters. */
+export interface RegistrationsUpdateOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the uploadLog operation.
- */
-export type ProductsUploadLogResponse = ProductLog & {
- /**
- * 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: ProductLog;
- };
-};
+/** Contains response data for the update operation. */
+export type RegistrationsUpdateResponse = Registration;
-/**
- * Contains response data for the listNext operation.
- */
-export type ProductsListNextResponse = ProductList & {
- /**
- * 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: ProductList;
- };
-};
+/** Optional parameters. */
+export interface RegistrationsGetActivationKeyOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the list operation.
- */
-export type RegistrationsListResponse = RegistrationList & {
- /**
- * 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: RegistrationList;
- };
-};
+/** Contains response data for the getActivationKey operation. */
+export type RegistrationsGetActivationKeyResponse = ActivationKeyResult;
-/**
- * Contains response data for the get operation.
- */
-export type RegistrationsGetResponse = Registration & {
- /**
- * 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: Registration;
- };
-};
+/** Optional parameters. */
+export interface RegistrationsEnableRemoteManagementOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the createOrUpdate operation.
- */
-export type RegistrationsCreateOrUpdateResponse = Registration & {
- /**
- * 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: Registration;
- };
-};
+/** Optional parameters. */
+export interface RegistrationsListNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the update operation.
- */
-export type RegistrationsUpdateResponse = Registration & {
- /**
- * 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: Registration;
- };
-};
+/** Contains response data for the listNext operation. */
+export type RegistrationsListNextResponse = RegistrationList;
-/**
- * Contains response data for the getActivationKey operation.
- */
-export type RegistrationsGetActivationKeyResponse = ActivationKeyResult & {
- /**
- * 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: ActivationKeyResult;
- };
-};
+/** Optional parameters. */
+export interface RegistrationsListBySubscriptionNextOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listNext operation.
- */
-export type RegistrationsListNextResponse = RegistrationList & {
- /**
- * 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: RegistrationList;
- };
-};
+/** Contains response data for the listBySubscriptionNext operation. */
+export type RegistrationsListBySubscriptionNextResponse = RegistrationList;
-/**
- * Contains response data for the list operation.
- */
-export type CustomerSubscriptionsListResponse = CustomerSubscriptionList & {
- /**
- * 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: CustomerSubscriptionList;
- };
-};
+/** Optional parameters. */
+export interface LinkedSubscriptionsListByResourceGroupOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the get operation.
- */
-export type CustomerSubscriptionsGetResponse = CustomerSubscription & {
- /**
- * 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: CustomerSubscription;
- };
-};
+/** Contains response data for the listByResourceGroup operation. */
+export type LinkedSubscriptionsListByResourceGroupResponse = LinkedSubscriptionsList;
-/**
- * Contains response data for the create operation.
- */
-export type CustomerSubscriptionsCreateResponse = CustomerSubscription & {
- /**
- * 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: CustomerSubscription;
- };
-};
+/** Optional parameters. */
+export interface LinkedSubscriptionsListBySubscriptionOptionalParams
+ extends coreClient.OperationOptions {}
-/**
- * Contains response data for the listNext operation.
- */
-export type CustomerSubscriptionsListNextResponse = CustomerSubscriptionList & {
- /**
- * 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: CustomerSubscriptionList;
- };
-};
+/** Contains response data for the listBySubscription operation. */
+export type LinkedSubscriptionsListBySubscriptionResponse = LinkedSubscriptionsList;
+
+/** Optional parameters. */
+export interface LinkedSubscriptionsGetOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the get operation. */
+export type LinkedSubscriptionsGetResponse = LinkedSubscription;
+
+/** Optional parameters. */
+export interface LinkedSubscriptionsDeleteOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Optional parameters. */
+export interface LinkedSubscriptionsCreateOrUpdateOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the createOrUpdate operation. */
+export type LinkedSubscriptionsCreateOrUpdateResponse = LinkedSubscription;
+
+/** Optional parameters. */
+export interface LinkedSubscriptionsUpdateOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the update operation. */
+export type LinkedSubscriptionsUpdateResponse = LinkedSubscription;
+
+/** Optional parameters. */
+export interface LinkedSubscriptionsListByResourceGroupNextOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listByResourceGroupNext operation. */
+export type LinkedSubscriptionsListByResourceGroupNextResponse = LinkedSubscriptionsList;
+
+/** Optional parameters. */
+export interface LinkedSubscriptionsListBySubscriptionNextOptionalParams
+ extends coreClient.OperationOptions {}
+
+/** Contains response data for the listBySubscriptionNext operation. */
+export type LinkedSubscriptionsListBySubscriptionNextResponse = LinkedSubscriptionsList;
+
+/** Optional parameters. */
+export interface AzureStackManagementClientOptionalParams
+ extends coreClient.ServiceClientOptions {
+ /** server parameter */
+ $host?: string;
+ /** Api Version */
+ apiVersion?: string;
+ /** Overrides client endpoint. */
+ endpoint?: string;
+}
diff --git a/sdk/azurestack/arm-azurestack/src/models/mappers.ts b/sdk/azurestack/arm-azurestack/src/models/mappers.ts
index 0a241079ca23..bfee8cb65cac 100644
--- a/sdk/azurestack/arm-azurestack/src/models/mappers.ts
+++ b/sdk/azurestack/arm-azurestack/src/models/mappers.ts
@@ -1,46 +1,32 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js";
-import * as msRest from "@azure/ms-rest-js";
+import * as coreClient from "@azure/core-client";
-export const CloudError = CloudErrorMapper;
-export const BaseResource = BaseResourceMapper;
-
-export const Resource: msRest.CompositeMapper = {
- serializedName: "Resource",
+export const OperationList: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "Resource",
+ className: "OperationList",
modelProperties: {
- id: {
- readOnly: true,
- serializedName: "id",
- type: {
- name: "String"
- }
- },
- name: {
- readOnly: true,
- serializedName: "name",
- type: {
- name: "String"
- }
- },
- type: {
- readOnly: true,
- serializedName: "type",
+ value: {
+ serializedName: "value",
type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Operation"
+ }
+ }
}
},
- etag: {
- serializedName: "etag",
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
@@ -49,55 +35,26 @@ export const Resource: msRest.CompositeMapper = {
}
};
-export const TrackedResource: msRest.CompositeMapper = {
- serializedName: "TrackedResource",
+export const Operation: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "TrackedResource",
+ className: "Operation",
modelProperties: {
- id: {
- readOnly: true,
- serializedName: "id",
- type: {
- name: "String"
- }
- },
name: {
- readOnly: true,
serializedName: "name",
type: {
name: "String"
}
},
- type: {
- readOnly: true,
- serializedName: "type",
- type: {
- name: "String"
- }
- },
- location: {
- required: true,
- isConstant: true,
- serializedName: "location",
- defaultValue: 'global',
- type: {
- name: "String"
- }
- },
- tags: {
- serializedName: "tags",
+ display: {
+ serializedName: "display",
type: {
- name: "Dictionary",
- value: {
- type: {
- name: "String"
- }
- }
+ name: "Composite",
+ className: "Display"
}
},
- etag: {
- serializedName: "etag",
+ origin: {
+ serializedName: "origin",
type: {
name: "String"
}
@@ -106,8 +63,7 @@ export const TrackedResource: msRest.CompositeMapper = {
}
};
-export const Display: msRest.CompositeMapper = {
- serializedName: "Display",
+export const Display: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "Display",
@@ -140,58 +96,44 @@ export const Display: msRest.CompositeMapper = {
}
};
-export const Operation: msRest.CompositeMapper = {
- serializedName: "Operation",
+export const ErrorResponse: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "Operation",
+ className: "ErrorResponse",
modelProperties: {
- name: {
- serializedName: "name",
- type: {
- name: "String"
- }
- },
- display: {
- serializedName: "display",
+ error: {
+ serializedName: "error",
type: {
name: "Composite",
- className: "Display"
- }
- },
- origin: {
- serializedName: "origin",
- type: {
- name: "String"
+ className: "ErrorDetails"
}
}
}
}
};
-export const ErrorDetails: msRest.CompositeMapper = {
- serializedName: "ErrorDetails",
+export const ErrorDetails: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "ErrorDetails",
modelProperties: {
code: {
- readOnly: true,
serializedName: "code",
+ readOnly: true,
type: {
name: "String"
}
},
message: {
- readOnly: true,
serializedName: "message",
+ readOnly: true,
type: {
name: "String"
}
},
target: {
- readOnly: true,
serializedName: "target",
+ readOnly: true,
type: {
name: "String"
}
@@ -200,63 +142,53 @@ export const ErrorDetails: msRest.CompositeMapper = {
}
};
-export const ErrorResponse: msRest.CompositeMapper = {
- serializedName: "ErrorResponse",
+export const CloudManifestFileProperties: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ErrorResponse",
+ className: "CloudManifestFileProperties",
modelProperties: {
- error: {
- serializedName: "error",
+ deploymentData: {
+ serializedName: "deploymentData",
type: {
name: "Composite",
- className: "ErrorDetails"
+ className: "CloudManifestFileDeploymentData"
+ }
+ },
+ signature: {
+ serializedName: "signature",
+ type: {
+ name: "String"
}
}
}
}
};
-export const OsDiskImage: msRest.CompositeMapper = {
- serializedName: "OsDiskImage",
+export const CloudManifestFileDeploymentData: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "OsDiskImage",
+ className: "CloudManifestFileDeploymentData",
modelProperties: {
- operatingSystem: {
- readOnly: true,
- serializedName: "operatingSystem",
+ externalDsmsCertificates: {
+ serializedName: "externalDsmsCertificates",
type: {
name: "String"
}
},
- sourceBlobSasUri: {
- readOnly: true,
- serializedName: "sourceBlobSasUri",
+ customCloudVerificationKey: {
+ serializedName: "customCloudVerificationKey",
type: {
name: "String"
}
- }
- }
- }
-};
-
-export const DataDiskImage: msRest.CompositeMapper = {
- serializedName: "DataDiskImage",
- type: {
- name: "Composite",
- className: "DataDiskImage",
- modelProperties: {
- lun: {
- readOnly: true,
- serializedName: "lun",
+ },
+ customCloudArmEndpoint: {
+ serializedName: "customEnvironmentEndpoints.customCloudArmEndpoint",
type: {
- name: "Number"
+ name: "String"
}
},
- sourceBlobSasUri: {
- readOnly: true,
- serializedName: "sourceBlobSasUri",
+ externalDsmsEndpoint: {
+ serializedName: "customEnvironmentEndpoints.externalDsmsEndpoint",
type: {
name: "String"
}
@@ -265,92 +197,61 @@ export const DataDiskImage: msRest.CompositeMapper = {
}
};
-export const ExtendedProduct: msRest.CompositeMapper = {
- serializedName: "ExtendedProduct",
+export const Resource: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ExtendedProduct",
+ className: "Resource",
modelProperties: {
- galleryPackageBlobSasUri: {
- readOnly: true,
- serializedName: "galleryPackageBlobSasUri",
- type: {
- name: "String"
- }
- },
- productKind: {
+ id: {
+ serializedName: "id",
readOnly: true,
- serializedName: "productKind",
type: {
name: "String"
}
},
- computeRole: {
+ name: {
+ serializedName: "name",
readOnly: true,
- serializedName: "properties.computeRole",
type: {
name: "String"
}
},
- isSystemExtension: {
- readOnly: true,
- serializedName: "properties.isSystemExtension",
- type: {
- name: "Boolean"
- }
- },
- uri: {
+ type: {
+ serializedName: "type",
readOnly: true,
- serializedName: "properties.sourceBlob.uri",
type: {
name: "String"
}
},
- supportMultipleExtensions: {
- readOnly: true,
- serializedName: "properties.supportMultipleExtensions",
- type: {
- name: "Boolean"
- }
- },
- version: {
- readOnly: true,
- serializedName: "properties.version",
+ etag: {
+ serializedName: "etag",
type: {
name: "String"
}
- },
- vmOsType: {
- readOnly: true,
- serializedName: "properties.vmOsType",
+ }
+ }
+ }
+};
+
+export const CustomerSubscriptionList: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "CustomerSubscriptionList",
+ modelProperties: {
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
},
- vmScaleSetEnabled: {
- readOnly: true,
- serializedName: "properties.vmScaleSetEnabled",
- type: {
- name: "Boolean"
- }
- },
- osDiskImage: {
- readOnly: true,
- serializedName: "properties.osDiskImage",
- type: {
- name: "Composite",
- className: "OsDiskImage"
- }
- },
- dataDiskImages: {
- readOnly: true,
- serializedName: "properties.dataDiskImages",
+ value: {
+ serializedName: "value",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "DataDiskImage"
+ className: "CustomerSubscription"
}
}
}
@@ -359,95 +260,70 @@ export const ExtendedProduct: msRest.CompositeMapper = {
}
};
-export const VirtualMachineExtensionProductProperties: msRest.CompositeMapper = {
- serializedName: "VirtualMachineExtensionProductProperties",
+export const SystemData: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "VirtualMachineExtensionProductProperties",
+ className: "SystemData",
modelProperties: {
- computeRole: {
- readOnly: true,
- serializedName: "computeRole",
+ createdBy: {
+ serializedName: "createdBy",
type: {
name: "String"
}
},
- isSystemExtension: {
- readOnly: true,
- serializedName: "isSystemExtension",
- type: {
- name: "Boolean"
- }
- },
- uri: {
- readOnly: true,
- serializedName: "sourceBlob.uri",
+ createdByType: {
+ serializedName: "createdByType",
type: {
name: "String"
}
},
- supportMultipleExtensions: {
- readOnly: true,
- serializedName: "supportMultipleExtensions",
+ createdAt: {
+ serializedName: "createdAt",
type: {
- name: "Boolean"
+ name: "DateTime"
}
},
- version: {
- readOnly: true,
- serializedName: "version",
+ lastModifiedBy: {
+ serializedName: "lastModifiedBy",
type: {
name: "String"
}
},
- vmOsType: {
- readOnly: true,
- serializedName: "vmOsType",
+ lastModifiedByType: {
+ serializedName: "lastModifiedByType",
type: {
name: "String"
}
},
- vmScaleSetEnabled: {
- readOnly: true,
- serializedName: "vmScaleSetEnabled",
+ lastModifiedAt: {
+ serializedName: "lastModifiedAt",
type: {
- name: "Boolean"
+ name: "DateTime"
}
}
}
}
};
-export const VirtualMachineProductProperties: msRest.CompositeMapper = {
- serializedName: "VirtualMachineProductProperties",
+export const ProductList: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "VirtualMachineProductProperties",
+ className: "ProductList",
modelProperties: {
- version: {
- readOnly: true,
- serializedName: "version",
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
},
- osDiskImage: {
- readOnly: true,
- serializedName: "osDiskImage",
- type: {
- name: "Composite",
- className: "OsDiskImage"
- }
- },
- dataDiskImages: {
- readOnly: true,
- serializedName: "dataDiskImages",
+ value: {
+ serializedName: "value",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "DataDiskImage"
+ className: "Product"
}
}
}
@@ -456,8 +332,7 @@ export const VirtualMachineProductProperties: msRest.CompositeMapper = {
}
};
-export const IconUris: msRest.CompositeMapper = {
- serializedName: "IconUris",
+export const IconUris: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "IconUris",
@@ -496,8 +371,7 @@ export const IconUris: msRest.CompositeMapper = {
}
};
-export const ProductLink: msRest.CompositeMapper = {
- serializedName: "ProductLink",
+export const ProductLink: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "ProductLink",
@@ -518,8 +392,7 @@ export const ProductLink: msRest.CompositeMapper = {
}
};
-export const ProductProperties: msRest.CompositeMapper = {
- serializedName: "ProductProperties",
+export const ProductProperties: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "ProductProperties",
@@ -534,8 +407,7 @@ export const ProductProperties: msRest.CompositeMapper = {
}
};
-export const Compatibility: msRest.CompositeMapper = {
- serializedName: "Compatibility",
+export const Compatibility: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "Compatibility",
@@ -573,150 +445,260 @@ export const Compatibility: msRest.CompositeMapper = {
}
};
-export const Product: msRest.CompositeMapper = {
- serializedName: "Product",
+export const ExtendedProduct: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "Product",
+ className: "ExtendedProduct",
modelProperties: {
- ...Resource.type.modelProperties,
- displayName: {
- serializedName: "properties.displayName",
+ galleryPackageBlobSasUri: {
+ serializedName: "galleryPackageBlobSasUri",
+ readOnly: true,
type: {
name: "String"
}
},
- description: {
- serializedName: "properties.description",
+ productKind: {
+ serializedName: "productKind",
+ readOnly: true,
type: {
name: "String"
}
},
- publisherDisplayName: {
- serializedName: "properties.publisherDisplayName",
+ computeRole: {
+ serializedName: "properties.computeRole",
+ readOnly: true,
type: {
name: "String"
}
},
- publisherIdentifier: {
- serializedName: "properties.publisherIdentifier",
+ isSystemExtension: {
+ serializedName: "properties.isSystemExtension",
+ readOnly: true,
type: {
- name: "String"
+ name: "Boolean"
}
},
- offer: {
- serializedName: "properties.offer",
+ supportMultipleExtensions: {
+ serializedName: "properties.supportMultipleExtensions",
+ readOnly: true,
type: {
- name: "String"
+ name: "Boolean"
}
},
- offerVersion: {
- serializedName: "properties.offerVersion",
+ versionPropertiesVersion: {
+ serializedName: "properties.version",
+ readOnly: true,
type: {
name: "String"
}
},
- sku: {
- serializedName: "properties.sku",
+ vmOsType: {
+ serializedName: "properties.vmOsType",
+ readOnly: true,
type: {
name: "String"
}
},
- billingPartNumber: {
- serializedName: "properties.billingPartNumber",
+ vmScaleSetEnabled: {
+ serializedName: "properties.vmScaleSetEnabled",
+ readOnly: true,
type: {
- name: "String"
+ name: "Boolean"
}
},
- vmExtensionType: {
- serializedName: "properties.vmExtensionType",
+ uri: {
+ serializedName: "properties.sourceBlob.uri",
+ readOnly: true,
type: {
name: "String"
}
},
- galleryItemIdentity: {
- serializedName: "properties.galleryItemIdentity",
+ version: {
+ serializedName: "properties.version",
+ readOnly: true,
type: {
name: "String"
}
},
- iconUris: {
- serializedName: "properties.iconUris",
+ osDiskImage: {
+ serializedName: "properties.osDiskImage",
type: {
name: "Composite",
- className: "IconUris"
+ className: "OsDiskImage"
}
},
- links: {
- serializedName: "properties.links",
+ dataDiskImages: {
+ serializedName: "properties.dataDiskImages",
+ readOnly: true,
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "ProductLink"
+ className: "DataDiskImage"
}
}
}
+ }
+ }
+ }
+};
+
+export const VirtualMachineExtensionProductProperties: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "VirtualMachineExtensionProductProperties",
+ modelProperties: {
+ computeRole: {
+ serializedName: "computeRole",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
},
- legalTerms: {
- serializedName: "properties.legalTerms",
+ isSystemExtension: {
+ serializedName: "isSystemExtension",
+ readOnly: true,
+ type: {
+ name: "Boolean"
+ }
+ },
+ supportMultipleExtensions: {
+ serializedName: "supportMultipleExtensions",
+ readOnly: true,
+ type: {
+ name: "Boolean"
+ }
+ },
+ version: {
+ serializedName: "version",
+ readOnly: true,
type: {
name: "String"
}
},
- privacyPolicy: {
- serializedName: "properties.privacyPolicy",
+ vmOsType: {
+ serializedName: "vmOsType",
+ readOnly: true,
type: {
name: "String"
}
},
- payloadLength: {
- serializedName: "properties.payloadLength",
+ vmScaleSetEnabled: {
+ serializedName: "vmScaleSetEnabled",
+ readOnly: true,
type: {
- name: "Number"
+ name: "Boolean"
}
},
- productKind: {
- serializedName: "properties.productKind",
+ uri: {
+ serializedName: "sourceBlob.uri",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const VirtualMachineProductProperties: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "VirtualMachineProductProperties",
+ modelProperties: {
+ version: {
+ serializedName: "version",
+ readOnly: true,
type: {
name: "String"
}
},
- productProperties: {
- serializedName: "properties.productProperties",
+ osDiskImage: {
+ serializedName: "osDiskImage",
type: {
name: "Composite",
- className: "ProductProperties"
+ className: "OsDiskImage"
}
},
- compatibility: {
- serializedName: "properties.compatibility",
+ dataDiskImages: {
+ serializedName: "dataDiskImages",
+ readOnly: true,
type: {
- name: "Composite",
- className: "Compatibility"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "DataDiskImage"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const OsDiskImage: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "OsDiskImage",
+ modelProperties: {
+ operatingSystem: {
+ serializedName: "operatingSystem",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ sourceBlobSasUri: {
+ serializedName: "sourceBlobSasUri",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const DataDiskImage: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "DataDiskImage",
+ modelProperties: {
+ lun: {
+ serializedName: "lun",
+ readOnly: true,
+ type: {
+ name: "Number"
+ }
+ },
+ sourceBlobSasUri: {
+ serializedName: "sourceBlobSasUri",
+ readOnly: true,
+ type: {
+ name: "String"
}
}
}
}
};
-export const DeviceConfiguration: msRest.CompositeMapper = {
- serializedName: "DeviceConfiguration",
+export const DeviceConfiguration: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "DeviceConfiguration",
modelProperties: {
deviceVersion: {
- readOnly: true,
serializedName: "deviceVersion",
+ readOnly: true,
type: {
name: "String"
}
},
identitySystem: {
- readOnly: true,
serializedName: "identitySystem",
+ readOnly: true,
type: {
name: "String"
}
@@ -725,36 +707,35 @@ export const DeviceConfiguration: msRest.CompositeMapper = {
}
};
-export const MarketplaceProductLogUpdate: msRest.CompositeMapper = {
- serializedName: "MarketplaceProductLogUpdate",
+export const MarketplaceProductLogUpdate: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "MarketplaceProductLogUpdate",
modelProperties: {
operation: {
- readOnly: true,
serializedName: "operation",
+ readOnly: true,
type: {
name: "String"
}
},
status: {
- readOnly: true,
serializedName: "status",
+ readOnly: true,
type: {
name: "String"
}
},
error: {
- readOnly: true,
serializedName: "error",
+ readOnly: true,
type: {
name: "String"
}
},
details: {
- readOnly: true,
serializedName: "details",
+ readOnly: true,
type: {
name: "String"
}
@@ -763,85 +744,84 @@ export const MarketplaceProductLogUpdate: msRest.CompositeMapper = {
}
};
-export const ProductLog: msRest.CompositeMapper = {
- serializedName: "ProductLog",
+export const ProductLog: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "ProductLog",
modelProperties: {
id: {
- readOnly: true,
serializedName: "id",
+ readOnly: true,
type: {
name: "String"
}
},
productId: {
- readOnly: true,
serializedName: "productId",
+ readOnly: true,
type: {
name: "String"
}
},
subscriptionId: {
- readOnly: true,
serializedName: "subscriptionId",
+ readOnly: true,
type: {
name: "String"
}
},
registrationName: {
- readOnly: true,
serializedName: "registrationName",
+ readOnly: true,
type: {
name: "String"
}
},
resourceGroupName: {
- readOnly: true,
serializedName: "resourceGroupName",
+ readOnly: true,
type: {
name: "String"
}
},
operation: {
- readOnly: true,
serializedName: "operation",
+ readOnly: true,
type: {
name: "String"
}
},
startDate: {
- readOnly: true,
serializedName: "startDate",
+ readOnly: true,
type: {
name: "String"
}
},
endDate: {
- readOnly: true,
serializedName: "endDate",
+ readOnly: true,
type: {
name: "String"
}
},
status: {
- readOnly: true,
serializedName: "status",
+ readOnly: true,
type: {
name: "String"
}
},
error: {
- readOnly: true,
serializedName: "error",
+ readOnly: true,
type: {
name: "String"
}
},
details: {
- readOnly: true,
serializedName: "details",
+ readOnly: true,
type: {
name: "String"
}
@@ -850,43 +830,89 @@ export const ProductLog: msRest.CompositeMapper = {
}
};
-export const Registration: msRest.CompositeMapper = {
- serializedName: "Registration",
+export const RegistrationList: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "Registration",
+ className: "RegistrationList",
modelProperties: {
- ...TrackedResource.type.modelProperties,
- objectId: {
- serializedName: "properties.objectId",
+ nextLink: {
+ serializedName: "nextLink",
type: {
name: "String"
}
},
- cloudId: {
- serializedName: "properties.cloudId",
+ value: {
+ serializedName: "value",
type: {
- name: "String"
- }
- },
- billingModel: {
- serializedName: "properties.billingModel",
- type: {
- name: "String"
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Registration"
+ }
+ }
}
}
}
}
};
-export const ActivationKeyResult: msRest.CompositeMapper = {
- serializedName: "ActivationKeyResult",
+export const TrackedResource: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ActivationKeyResult",
+ className: "TrackedResource",
modelProperties: {
- activationKey: {
- serializedName: "activationKey",
+ id: {
+ serializedName: "id",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ serializedName: "name",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ type: {
+ serializedName: "type",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ kind: {
+ serializedName: "kind",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ systemData: {
+ serializedName: "systemData",
+ type: {
+ name: "Composite",
+ className: "SystemData"
+ }
+ },
+ location: {
+ serializedName: "location",
+ required: true,
+ type: {
+ name: "String"
+ }
+ },
+ tags: {
+ serializedName: "tags",
+ type: {
+ name: "Dictionary",
+ value: { type: { name: "String" } }
+ }
+ },
+ etag: {
+ serializedName: "etag",
type: {
name: "String"
}
@@ -895,21 +921,21 @@ export const ActivationKeyResult: msRest.CompositeMapper = {
}
};
-export const RegistrationParameter: msRest.CompositeMapper = {
- serializedName: "RegistrationParameter",
+export const RegistrationParameter: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "RegistrationParameter",
modelProperties: {
- registrationToken: {
+ location: {
+ serializedName: "location",
required: true,
- serializedName: "properties.registrationToken",
type: {
name: "String"
}
},
- location: {
- serializedName: "location",
+ registrationToken: {
+ serializedName: "properties.registrationToken",
+ required: true,
type: {
name: "String"
}
@@ -918,15 +944,13 @@ export const RegistrationParameter: msRest.CompositeMapper = {
}
};
-export const CustomerSubscription: msRest.CompositeMapper = {
- serializedName: "CustomerSubscription",
+export const ActivationKeyResult: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "CustomerSubscription",
+ className: "ActivationKeyResult",
modelProperties: {
- ...Resource.type.modelProperties,
- tenantId: {
- serializedName: "properties.tenantId",
+ activationKey: {
+ serializedName: "activationKey",
type: {
name: "String"
}
@@ -935,26 +959,55 @@ export const CustomerSubscription: msRest.CompositeMapper = {
}
};
-export const OperationList: msRest.CompositeMapper = {
- serializedName: "OperationList",
+export const LinkedSubscriptionsList: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "OperationList",
+ className: "LinkedSubscriptionsList",
modelProperties: {
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ },
value: {
- serializedName: "",
+ serializedName: "value",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "Operation"
+ className: "LinkedSubscription"
}
}
}
+ }
+ }
+ }
+};
+
+export const LinkedSubscriptionParameter: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "LinkedSubscriptionParameter",
+ modelProperties: {
+ location: {
+ serializedName: "location",
+ required: true,
+ type: {
+ name: "String"
+ }
},
- nextLink: {
- serializedName: "nextLink",
+ linkedSubscriptionId: {
+ serializedName: "properties.linkedSubscriptionId",
+ required: true,
+ type: {
+ name: "String"
+ }
+ },
+ registrationResourceId: {
+ serializedName: "properties.registrationResourceId",
+ required: true,
type: {
name: "String"
}
@@ -963,84 +1016,270 @@ export const OperationList: msRest.CompositeMapper = {
}
};
-export const ProductList: msRest.CompositeMapper = {
- serializedName: "ProductList",
+export const CloudManifestFileResponse: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "ProductList",
+ className: "CloudManifestFileResponse",
modelProperties: {
- nextLink: {
- serializedName: "nextLink",
+ ...Resource.type.modelProperties,
+ properties: {
+ serializedName: "properties",
+ type: {
+ name: "Composite",
+ className: "CloudManifestFileProperties"
+ }
+ }
+ }
+ }
+};
+
+export const CustomerSubscription: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "CustomerSubscription",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ systemData: {
+ serializedName: "systemData",
+ type: {
+ name: "Composite",
+ className: "SystemData"
+ }
+ },
+ tenantId: {
+ serializedName: "properties.tenantId",
type: {
name: "String"
}
+ }
+ }
+ }
+};
+
+export const Product: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "Product",
+ modelProperties: {
+ ...Resource.type.modelProperties,
+ systemData: {
+ serializedName: "systemData",
+ type: {
+ name: "Composite",
+ className: "SystemData"
+ }
},
- value: {
- serializedName: "",
+ displayName: {
+ serializedName: "properties.displayName",
+ type: {
+ name: "String"
+ }
+ },
+ description: {
+ serializedName: "properties.description",
+ type: {
+ name: "String"
+ }
+ },
+ publisherDisplayName: {
+ serializedName: "properties.publisherDisplayName",
+ type: {
+ name: "String"
+ }
+ },
+ publisherIdentifier: {
+ serializedName: "properties.publisherIdentifier",
+ type: {
+ name: "String"
+ }
+ },
+ offer: {
+ serializedName: "properties.offer",
+ type: {
+ name: "String"
+ }
+ },
+ offerVersion: {
+ serializedName: "properties.offerVersion",
+ type: {
+ name: "String"
+ }
+ },
+ sku: {
+ serializedName: "properties.sku",
+ type: {
+ name: "String"
+ }
+ },
+ billingPartNumber: {
+ serializedName: "properties.billingPartNumber",
+ type: {
+ name: "String"
+ }
+ },
+ vmExtensionType: {
+ serializedName: "properties.vmExtensionType",
+ type: {
+ name: "String"
+ }
+ },
+ galleryItemIdentity: {
+ serializedName: "properties.galleryItemIdentity",
+ type: {
+ name: "String"
+ }
+ },
+ iconUris: {
+ serializedName: "properties.iconUris",
+ type: {
+ name: "Composite",
+ className: "IconUris"
+ }
+ },
+ links: {
+ serializedName: "properties.links",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "Product"
+ className: "ProductLink"
}
}
}
+ },
+ legalTerms: {
+ serializedName: "properties.legalTerms",
+ type: {
+ name: "String"
+ }
+ },
+ privacyPolicy: {
+ serializedName: "properties.privacyPolicy",
+ type: {
+ name: "String"
+ }
+ },
+ payloadLength: {
+ serializedName: "properties.payloadLength",
+ type: {
+ name: "Number"
+ }
+ },
+ productKind: {
+ serializedName: "properties.productKind",
+ type: {
+ name: "String"
+ }
+ },
+ productProperties: {
+ serializedName: "properties.productProperties",
+ type: {
+ name: "Composite",
+ className: "ProductProperties"
+ }
+ },
+ compatibility: {
+ serializedName: "properties.compatibility",
+ type: {
+ name: "Composite",
+ className: "Compatibility"
+ }
}
}
}
};
-export const RegistrationList: msRest.CompositeMapper = {
- serializedName: "RegistrationList",
+export const ExtendedProductProperties: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "RegistrationList",
+ className: "ExtendedProductProperties",
modelProperties: {
- nextLink: {
- serializedName: "nextLink",
+ ...VirtualMachineExtensionProductProperties.type.modelProperties,
+ ...VirtualMachineProductProperties.type.modelProperties
+ }
+ }
+};
+
+export const Registration: coreClient.CompositeMapper = {
+ type: {
+ name: "Composite",
+ className: "Registration",
+ modelProperties: {
+ ...TrackedResource.type.modelProperties,
+ objectId: {
+ serializedName: "properties.objectId",
type: {
name: "String"
}
},
- value: {
- serializedName: "",
+ cloudId: {
+ serializedName: "properties.cloudId",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "Registration"
- }
- }
+ name: "String"
+ }
+ },
+ billingModel: {
+ serializedName: "properties.billingModel",
+ type: {
+ name: "String"
}
}
}
}
};
-export const CustomerSubscriptionList: msRest.CompositeMapper = {
- serializedName: "CustomerSubscriptionList",
+export const LinkedSubscription: coreClient.CompositeMapper = {
type: {
name: "Composite",
- className: "CustomerSubscriptionList",
+ className: "LinkedSubscription",
modelProperties: {
- nextLink: {
- serializedName: "nextLink",
+ ...TrackedResource.type.modelProperties,
+ linkedSubscriptionId: {
+ serializedName: "properties.linkedSubscriptionId",
type: {
name: "String"
}
},
- value: {
- serializedName: "",
+ registrationResourceId: {
+ serializedName: "properties.registrationResourceId",
type: {
- name: "Sequence",
- element: {
- type: {
- name: "Composite",
- className: "CustomerSubscription"
- }
- }
+ name: "String"
+ }
+ },
+ deviceId: {
+ serializedName: "properties.deviceId",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ deviceObjectId: {
+ serializedName: "properties.deviceObjectId",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ deviceLinkState: {
+ serializedName: "properties.deviceLinkState",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ lastConnectedTime: {
+ serializedName: "properties.lastConnectedTime",
+ readOnly: true,
+ type: {
+ name: "String"
+ }
+ },
+ deviceConnectionStatus: {
+ serializedName: "properties.deviceConnectionStatus",
+ readOnly: true,
+ type: {
+ name: "String"
}
}
}
diff --git a/sdk/azurestack/arm-azurestack/src/models/operationsMappers.ts b/sdk/azurestack/arm-azurestack/src/models/operationsMappers.ts
deleted file mode 100644
index a985ca7f4ca9..000000000000
--- a/sdk/azurestack/arm-azurestack/src/models/operationsMappers.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * 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,
- Display,
- Operation,
- OperationList
-} from "../models/mappers";
diff --git a/sdk/azurestack/arm-azurestack/src/models/parameters.ts b/sdk/azurestack/arm-azurestack/src/models/parameters.ts
index e13086b4e5df..d06c11f1e495 100644
--- a/sdk/azurestack/arm-azurestack/src/models/parameters.ts
+++ b/sdk/azurestack/arm-azurestack/src/models/parameters.ts
@@ -1,94 +1,192 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
+import {
+ OperationParameter,
+ OperationURLParameter,
+ OperationQueryParameter
+} from "@azure/core-client";
+import {
+ CustomerSubscription as CustomerSubscriptionMapper,
+ DeviceConfiguration as DeviceConfigurationMapper,
+ MarketplaceProductLogUpdate as MarketplaceProductLogUpdateMapper,
+ RegistrationParameter as RegistrationParameterMapper,
+ LinkedSubscriptionParameter as LinkedSubscriptionParameterMapper
+} from "../models/mappers";
-export const acceptLanguage: msRest.OperationParameter = {
- parameterPath: "acceptLanguage",
+export const accept: OperationParameter = {
+ parameterPath: "accept",
mapper: {
- serializedName: "accept-language",
- defaultValue: 'en-US',
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Accept",
type: {
name: "String"
}
}
};
-export const apiVersion: msRest.OperationQueryParameter = {
- parameterPath: "apiVersion",
+
+export const $host: OperationURLParameter = {
+ parameterPath: "$host",
mapper: {
+ serializedName: "$host",
required: true,
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+
+export const apiVersion: OperationQueryParameter = {
+ parameterPath: "apiVersion",
+ mapper: {
+ defaultValue: "2020-06-01-preview",
+ isConstant: true,
serializedName: "api-version",
- defaultValue: '2017-06-01',
type: {
name: "String"
}
}
};
-export const customerSubscriptionName: msRest.OperationURLParameter = {
- parameterPath: "customerSubscriptionName",
+
+export const nextLink: OperationURLParameter = {
+ parameterPath: "nextLink",
mapper: {
+ serializedName: "nextLink",
required: true,
- serializedName: "customerSubscriptionName",
+ type: {
+ name: "String"
+ }
+ },
+ skipEncoding: true
+};
+
+export const verificationVersion: OperationURLParameter = {
+ parameterPath: "verificationVersion",
+ mapper: {
+ serializedName: "verificationVersion",
+ required: true,
+ type: {
+ name: "String"
+ }
+ }
+};
+
+export const versionCreationDate: OperationQueryParameter = {
+ parameterPath: ["options", "versionCreationDate"],
+ mapper: {
+ serializedName: "versionCreationDate",
type: {
name: "String"
}
}
};
-export const nextPageLink: msRest.OperationURLParameter = {
- parameterPath: "nextPageLink",
+
+export const subscriptionId: OperationURLParameter = {
+ parameterPath: "subscriptionId",
mapper: {
+ serializedName: "subscriptionId",
required: true,
- serializedName: "nextLink",
type: {
name: "String"
}
- },
- skipEncoding: true
+ }
};
-export const productName: msRest.OperationURLParameter = {
- parameterPath: "productName",
+
+export const resourceGroup: OperationURLParameter = {
+ parameterPath: "resourceGroup",
mapper: {
+ serializedName: "resourceGroup",
required: true,
- serializedName: "productName",
type: {
name: "String"
}
}
};
-export const registrationName: msRest.OperationURLParameter = {
+
+export const registrationName: OperationURLParameter = {
parameterPath: "registrationName",
mapper: {
- required: true,
serializedName: "registrationName",
+ required: true,
type: {
name: "String"
}
}
};
-export const resourceGroup: msRest.OperationURLParameter = {
- parameterPath: "resourceGroup",
+
+export const customerSubscriptionName: OperationURLParameter = {
+ parameterPath: "customerSubscriptionName",
mapper: {
+ serializedName: "customerSubscriptionName",
required: true,
- serializedName: "resourceGroup",
type: {
name: "String"
}
}
};
-export const subscriptionId: msRest.OperationURLParameter = {
- parameterPath: "subscriptionId",
+
+export const contentType: OperationParameter = {
+ parameterPath: ["options", "contentType"],
+ mapper: {
+ defaultValue: "application/json",
+ isConstant: true,
+ serializedName: "Content-Type",
+ type: {
+ name: "String"
+ }
+ }
+};
+
+export const customerCreationParameters: OperationParameter = {
+ parameterPath: "customerCreationParameters",
+ mapper: CustomerSubscriptionMapper
+};
+
+export const productName: OperationURLParameter = {
+ parameterPath: "productName",
mapper: {
+ serializedName: "productName",
+ required: true,
+ type: {
+ name: "String"
+ }
+ }
+};
+
+export const deviceConfiguration: OperationParameter = {
+ parameterPath: ["options", "deviceConfiguration"],
+ mapper: DeviceConfigurationMapper
+};
+
+export const marketplaceProductLogUpdate: OperationParameter = {
+ parameterPath: ["options", "marketplaceProductLogUpdate"],
+ mapper: MarketplaceProductLogUpdateMapper
+};
+
+export const token: OperationParameter = {
+ parameterPath: "token",
+ mapper: RegistrationParameterMapper
+};
+
+export const linkedSubscriptionName: OperationURLParameter = {
+ parameterPath: "linkedSubscriptionName",
+ mapper: {
+ serializedName: "linkedSubscriptionName",
required: true,
- serializedName: "subscriptionId",
type: {
name: "String"
}
}
};
+
+export const resource: OperationParameter = {
+ parameterPath: "resource",
+ mapper: LinkedSubscriptionParameterMapper
+};
diff --git a/sdk/azurestack/arm-azurestack/src/models/productsMappers.ts b/sdk/azurestack/arm-azurestack/src/models/productsMappers.ts
deleted file mode 100644
index 8690235a808d..000000000000
--- a/sdk/azurestack/arm-azurestack/src/models/productsMappers.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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 {
- BaseResource,
- CloudError,
- Compatibility,
- CustomerSubscription,
- DataDiskImage,
- DeviceConfiguration,
- ErrorDetails,
- ErrorResponse,
- ExtendedProduct,
- IconUris,
- MarketplaceProductLogUpdate,
- OsDiskImage,
- Product,
- ProductLink,
- ProductList,
- ProductLog,
- ProductProperties,
- Registration,
- Resource,
- TrackedResource
-} from "../models/mappers";
diff --git a/sdk/azurestack/arm-azurestack/src/models/registrationsMappers.ts b/sdk/azurestack/arm-azurestack/src/models/registrationsMappers.ts
deleted file mode 100644
index e9cf05e71ce8..000000000000
--- a/sdk/azurestack/arm-azurestack/src/models/registrationsMappers.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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 {
- ActivationKeyResult,
- BaseResource,
- CloudError,
- Compatibility,
- CustomerSubscription,
- ErrorDetails,
- ErrorResponse,
- IconUris,
- Product,
- ProductLink,
- ProductProperties,
- Registration,
- RegistrationList,
- RegistrationParameter,
- Resource,
- TrackedResource
-} from "../models/mappers";
diff --git a/sdk/azurestack/arm-azurestack/src/operations/cloudManifestFile.ts b/sdk/azurestack/arm-azurestack/src/operations/cloudManifestFile.ts
new file mode 100644
index 000000000000..0116975b41b2
--- /dev/null
+++ b/sdk/azurestack/arm-azurestack/src/operations/cloudManifestFile.ts
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import { CloudManifestFile } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
+import * as Parameters from "../models/parameters";
+import { AzureStackManagementClient } from "../azureStackManagementClient";
+import {
+ CloudManifestFileListOptionalParams,
+ CloudManifestFileListResponse,
+ CloudManifestFileGetOptionalParams,
+ CloudManifestFileGetResponse
+} from "../models";
+
+/** Class containing CloudManifestFile operations. */
+export class CloudManifestFileImpl implements CloudManifestFile {
+ private readonly client: AzureStackManagementClient;
+
+ /**
+ * Initialize a new instance of the class CloudManifestFile class.
+ * @param client Reference to the service client
+ */
+ constructor(client: AzureStackManagementClient) {
+ this.client = client;
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file with latest version.
+ * @param options The options parameters.
+ */
+ list(
+ options?: CloudManifestFileListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
+ }
+
+ /**
+ * Returns a cloud specific manifest JSON file.
+ * @param verificationVersion Signing verification key version.
+ * @param options The options parameters.
+ */
+ get(
+ verificationVersion: string,
+ options?: CloudManifestFileGetOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { verificationVersion, options },
+ getOperationSpec
+ );
+ }
+}
+// Operation Specifications
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path: "/providers/Microsoft.AzureStack/cloudManifestFiles",
+ httpMethod: "GET",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.CloudManifestFileResponse
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/providers/Microsoft.AzureStack/cloudManifestFiles/{verificationVersion}",
+ httpMethod: "GET",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.CloudManifestFileResponse
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ queryParameters: [Parameters.apiVersion, Parameters.versionCreationDate],
+ urlParameters: [Parameters.$host, Parameters.verificationVersion],
+ headerParameters: [Parameters.accept],
+ serializer
+};
diff --git a/sdk/azurestack/arm-azurestack/src/operations/customerSubscriptions.ts b/sdk/azurestack/arm-azurestack/src/operations/customerSubscriptions.ts
index 9435b74b2f6e..f471df6638b3 100644
--- a/sdk/azurestack/arm-azurestack/src/operations/customerSubscriptions.ts
+++ b/sdk/azurestack/arm-azurestack/src/operations/customerSubscriptions.ts
@@ -1,28 +1,40 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as Models from "../models";
-import * as Mappers from "../models/customerSubscriptionsMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { CustomerSubscriptions } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { AzureStackManagementClientContext } from "../azureStackManagementClientContext";
+import { AzureStackManagementClient } from "../azureStackManagementClient";
+import {
+ CustomerSubscription,
+ CustomerSubscriptionsListNextOptionalParams,
+ CustomerSubscriptionsListOptionalParams,
+ CustomerSubscriptionsListResponse,
+ CustomerSubscriptionsGetOptionalParams,
+ CustomerSubscriptionsGetResponse,
+ CustomerSubscriptionsDeleteOptionalParams,
+ CustomerSubscriptionsCreateOptionalParams,
+ CustomerSubscriptionsCreateResponse,
+ CustomerSubscriptionsListNextResponse
+} from "../models";
-/** Class representing a CustomerSubscriptions. */
-export class CustomerSubscriptions {
- private readonly client: AzureStackManagementClientContext;
+///
+/** Class containing CustomerSubscriptions operations. */
+export class CustomerSubscriptionsImpl implements CustomerSubscriptions {
+ private readonly client: AzureStackManagementClient;
/**
- * Create a CustomerSubscriptions.
- * @param {AzureStackManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class CustomerSubscriptions class.
+ * @param client Reference to the service client
*/
- constructor(client: AzureStackManagementClientContext) {
+ constructor(client: AzureStackManagementClient) {
this.client = client;
}
@@ -30,68 +42,95 @@ export class CustomerSubscriptions {
* Returns a list of products.
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- list(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param callback The callback
- */
- list(resourceGroup: string, registrationName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param options The optional parameters
- * @param callback The callback
- */
- list(resourceGroup: string, registrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- list(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
+ public list(
+ resourceGroup: string,
+ registrationName: string,
+ options?: CustomerSubscriptionsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(resourceGroup, registrationName, options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listPagingPage(resourceGroup, registrationName, options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ resourceGroup: string,
+ registrationName: string,
+ options?: CustomerSubscriptionsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(resourceGroup, registrationName, options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(
resourceGroup,
registrationName,
+ continuationToken,
options
- },
- listOperationSpec,
- callback) as Promise;
+ );
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ resourceGroup: string,
+ registrationName: string,
+ options?: CustomerSubscriptionsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(
+ resourceGroup,
+ registrationName,
+ options
+ )) {
+ yield* page;
+ }
}
/**
- * Returns the specified product.
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param customerSubscriptionName Name of the product.
- * @param [options] The optional parameters
- * @returns Promise
- */
- get(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
+ * Returns a list of products.
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param customerSubscriptionName Name of the product.
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(resourceGroup: string, registrationName: string, customerSubscriptionName: string, callback: msRest.ServiceCallback): void;
+ private _list(
+ resourceGroup: string,
+ registrationName: string,
+ options?: CustomerSubscriptionsListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroup, registrationName, options },
+ listOperationSpec
+ );
+ }
+
/**
+ * Returns the specified product.
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
* @param customerSubscriptionName Name of the product.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ get(
+ resourceGroup: string,
+ registrationName: string,
+ customerSubscriptionName: string,
+ options?: CustomerSubscriptionsGetOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- customerSubscriptionName,
- options
- },
- getOperationSpec,
- callback) as Promise;
+ { resourceGroup, registrationName, customerSubscriptionName, options },
+ getOperationSpec
+ );
}
/**
@@ -99,35 +138,18 @@ export class CustomerSubscriptions {
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
* @param customerSubscriptionName Name of the product.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- deleteMethod(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param customerSubscriptionName Name of the product.
- * @param callback The callback
- */
- deleteMethod(resourceGroup: string, registrationName: string, customerSubscriptionName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param customerSubscriptionName Name of the product.
- * @param options The optional parameters
- * @param callback The callback
- */
- deleteMethod(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- deleteMethod(resourceGroup: string, registrationName: string, customerSubscriptionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ delete(
+ resourceGroup: string,
+ registrationName: string,
+ customerSubscriptionName: string,
+ options?: CustomerSubscriptionsDeleteOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- customerSubscriptionName,
- options
- },
- deleteMethodOperationSpec,
- callback);
+ { resourceGroup, registrationName, customerSubscriptionName, options },
+ deleteOperationSpec
+ );
}
/**
@@ -136,28 +158,15 @@ export class CustomerSubscriptions {
* @param registrationName Name of the Azure Stack registration.
* @param customerSubscriptionName Name of the product.
* @param customerCreationParameters Parameters use to create a customer subscription.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- create(resourceGroup: string, registrationName: string, customerSubscriptionName: string, customerCreationParameters: Models.CustomerSubscription, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param customerSubscriptionName Name of the product.
- * @param customerCreationParameters Parameters use to create a customer subscription.
- * @param callback The callback
- */
- create(resourceGroup: string, registrationName: string, customerSubscriptionName: string, customerCreationParameters: Models.CustomerSubscription, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param customerSubscriptionName Name of the product.
- * @param customerCreationParameters Parameters use to create a customer subscription.
- * @param options The optional parameters
- * @param callback The callback
- */
- create(resourceGroup: string, registrationName: string, customerSubscriptionName: string, customerCreationParameters: Models.CustomerSubscription, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- create(resourceGroup: string, registrationName: string, customerSubscriptionName: string, customerCreationParameters: Models.CustomerSubscription, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ create(
+ resourceGroup: string,
+ registrationName: string,
+ customerSubscriptionName: string,
+ customerCreationParameters: CustomerSubscription,
+ options?: CustomerSubscriptionsCreateOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
{
resourceGroup,
@@ -166,55 +175,36 @@ export class CustomerSubscriptions {
customerCreationParameters,
options
},
- createOperationSpec,
- callback) as Promise;
+ createOperationSpec
+ );
}
/**
- * Returns a list of products.
- * @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
+ * @param resourceGroup Name of the resource group.
+ * @param registrationName Name of the Azure Stack registration.
+ * @param nextLink The nextLink from the previous successful call to the List method.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listNext(
+ resourceGroup: string,
+ registrationName: string,
+ nextLink: string,
+ options?: CustomerSubscriptionsListNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listNextOperationSpec,
- callback) as Promise;
+ { resourceGroup, registrationName, nextLink, options },
+ listNextOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions",
- urlParameters: [
- Parameters.subscriptionId,
- Parameters.resourceGroup,
- Parameters.registrationName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.CustomerSubscriptionList
@@ -223,24 +213,20 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
- serializer
-};
-
-const getOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroup,
- Parameters.registrationName,
- Parameters.customerSubscriptionName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
+ Parameters.registrationName
],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.CustomerSubscription
@@ -249,77 +235,67 @@ const getOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
- serializer
-};
-
-const deleteMethodOperationSpec: msRest.OperationSpec = {
- httpMethod: "DELETE",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroup,
Parameters.registrationName,
Parameters.customerSubscriptionName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const deleteOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
+ httpMethod: "DELETE",
responses: {
200: {},
204: {},
default: {
- bodyMapper: Mappers.CloudError
+ bodyMapper: Mappers.ErrorResponse
}
},
- serializer
-};
-
-const createOperationSpec: msRest.OperationSpec = {
- httpMethod: "PUT",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroup,
Parameters.registrationName,
Parameters.customerSubscriptionName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: "customerCreationParameters",
- mapper: {
- ...Mappers.CustomerSubscription,
- required: true
- }
- },
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const createOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/customerSubscriptions/{customerSubscriptionName}",
+ httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.CustomerSubscription
},
default: {
- bodyMapper: Mappers.CloudError
+ bodyMapper: Mappers.ErrorResponse
}
},
+ requestBody: Parameters.customerCreationParameters,
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroup,
+ Parameters.registrationName,
+ Parameters.customerSubscriptionName
+ ],
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
serializer
};
-
-const listNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.CustomerSubscriptionList
@@ -328,5 +304,14 @@ const listNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.nextLink,
+ Parameters.subscriptionId,
+ Parameters.resourceGroup,
+ Parameters.registrationName
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/azurestack/arm-azurestack/src/operations/index.ts b/sdk/azurestack/arm-azurestack/src/operations/index.ts
index 1babd06f2711..a1fbeecf7ca7 100644
--- a/sdk/azurestack/arm-azurestack/src/operations/index.ts
+++ b/sdk/azurestack/arm-azurestack/src/operations/index.ts
@@ -1,14 +1,14 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export * from "./operations";
+export * from "./cloudManifestFile";
+export * from "./customerSubscriptions";
export * from "./products";
export * from "./registrations";
-export * from "./customerSubscriptions";
+export * from "./linkedSubscriptions";
diff --git a/sdk/azurestack/arm-azurestack/src/operations/linkedSubscriptions.ts b/sdk/azurestack/arm-azurestack/src/operations/linkedSubscriptions.ts
new file mode 100644
index 000000000000..23a74b0207ff
--- /dev/null
+++ b/sdk/azurestack/arm-azurestack/src/operations/linkedSubscriptions.ts
@@ -0,0 +1,450 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
+ */
+
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { LinkedSubscriptions } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
+import * as Parameters from "../models/parameters";
+import { AzureStackManagementClient } from "../azureStackManagementClient";
+import {
+ LinkedSubscription,
+ LinkedSubscriptionsListByResourceGroupNextOptionalParams,
+ LinkedSubscriptionsListByResourceGroupOptionalParams,
+ LinkedSubscriptionsListBySubscriptionNextOptionalParams,
+ LinkedSubscriptionsListBySubscriptionOptionalParams,
+ LinkedSubscriptionsListByResourceGroupResponse,
+ LinkedSubscriptionsListBySubscriptionResponse,
+ LinkedSubscriptionsGetOptionalParams,
+ LinkedSubscriptionsGetResponse,
+ LinkedSubscriptionsDeleteOptionalParams,
+ LinkedSubscriptionParameter,
+ LinkedSubscriptionsCreateOrUpdateOptionalParams,
+ LinkedSubscriptionsCreateOrUpdateResponse,
+ LinkedSubscriptionsUpdateOptionalParams,
+ LinkedSubscriptionsUpdateResponse,
+ LinkedSubscriptionsListByResourceGroupNextResponse,
+ LinkedSubscriptionsListBySubscriptionNextResponse
+} from "../models";
+
+///
+/** Class containing LinkedSubscriptions operations. */
+export class LinkedSubscriptionsImpl implements LinkedSubscriptions {
+ private readonly client: AzureStackManagementClient;
+
+ /**
+ * Initialize a new instance of the class LinkedSubscriptions class.
+ * @param client Reference to the service client
+ */
+ constructor(client: AzureStackManagementClient) {
+ this.client = client;
+ }
+
+ /**
+ * Returns a list of all linked subscriptions under current resource group.
+ * @param resourceGroup Name of the resource group.
+ * @param options The options parameters.
+ */
+ public listByResourceGroup(
+ resourceGroup: string,
+ options?: LinkedSubscriptionsListByResourceGroupOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listByResourceGroupPagingAll(resourceGroup, options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listByResourceGroupPagingPage(resourceGroup, options);
+ }
+ };
+ }
+
+ private async *listByResourceGroupPagingPage(
+ resourceGroup: string,
+ options?: LinkedSubscriptionsListByResourceGroupOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._listByResourceGroup(resourceGroup, options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listByResourceGroupNext(
+ resourceGroup,
+ continuationToken,
+ options
+ );
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listByResourceGroupPagingAll(
+ resourceGroup: string,
+ options?: LinkedSubscriptionsListByResourceGroupOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listByResourceGroupPagingPage(
+ resourceGroup,
+ options
+ )) {
+ yield* page;
+ }
+ }
+
+ /**
+ * Returns a list of all linked subscriptions under current subscription.
+ * @param options The options parameters.
+ */
+ public listBySubscription(
+ options?: LinkedSubscriptionsListBySubscriptionOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listBySubscriptionPagingAll(options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listBySubscriptionPagingPage(options);
+ }
+ };
+ }
+
+ private async *listBySubscriptionPagingPage(
+ options?: LinkedSubscriptionsListBySubscriptionOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._listBySubscription(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listBySubscriptionNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listBySubscriptionPagingAll(
+ options?: LinkedSubscriptionsListBySubscriptionOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
+ yield* page;
+ }
+ }
+
+ /**
+ * Returns a list of all linked subscriptions under current resource group.
+ * @param resourceGroup Name of the resource group.
+ * @param options The options parameters.
+ */
+ private _listByResourceGroup(
+ resourceGroup: string,
+ options?: LinkedSubscriptionsListByResourceGroupOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroup, options },
+ listByResourceGroupOperationSpec
+ );
+ }
+
+ /**
+ * Returns a list of all linked subscriptions under current subscription.
+ * @param options The options parameters.
+ */
+ private _listBySubscription(
+ options?: LinkedSubscriptionsListBySubscriptionOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { options },
+ listBySubscriptionOperationSpec
+ );
+ }
+
+ /**
+ * Returns the properties of a Linked Subscription resource.
+ * @param resourceGroup Name of the resource group.
+ * @param linkedSubscriptionName Name of the Linked Subscription resource.
+ * @param options The options parameters.
+ */
+ get(
+ resourceGroup: string,
+ linkedSubscriptionName: string,
+ options?: LinkedSubscriptionsGetOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroup, linkedSubscriptionName, options },
+ getOperationSpec
+ );
+ }
+
+ /**
+ * Delete the requested Linked Subscription resource.
+ * @param resourceGroup Name of the resource group.
+ * @param linkedSubscriptionName Name of the Linked Subscription resource.
+ * @param options The options parameters.
+ */
+ delete(
+ resourceGroup: string,
+ linkedSubscriptionName: string,
+ options?: LinkedSubscriptionsDeleteOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroup, linkedSubscriptionName, options },
+ deleteOperationSpec
+ );
+ }
+
+ /**
+ * Create or update a linked subscription resource.
+ * @param resourceGroup Name of the resource group.
+ * @param linkedSubscriptionName Name of the Linked Subscription resource.
+ * @param resource Linked subscription resource parameter.
+ * @param options The options parameters.
+ */
+ createOrUpdate(
+ resourceGroup: string,
+ linkedSubscriptionName: string,
+ resource: LinkedSubscriptionParameter,
+ options?: LinkedSubscriptionsCreateOrUpdateOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroup, linkedSubscriptionName, resource, options },
+ createOrUpdateOperationSpec
+ );
+ }
+
+ /**
+ * Patch a Linked Subscription resource.
+ * @param resourceGroup Name of the resource group.
+ * @param linkedSubscriptionName Name of the Linked Subscription resource.
+ * @param resource Linked subscription resource parameter.
+ * @param options The options parameters.
+ */
+ update(
+ resourceGroup: string,
+ linkedSubscriptionName: string,
+ resource: LinkedSubscriptionParameter,
+ options?: LinkedSubscriptionsUpdateOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroup, linkedSubscriptionName, resource, options },
+ updateOperationSpec
+ );
+ }
+
+ /**
+ * ListByResourceGroupNext
+ * @param resourceGroup Name of the resource group.
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
+ * @param options The options parameters.
+ */
+ private _listByResourceGroupNext(
+ resourceGroup: string,
+ nextLink: string,
+ options?: LinkedSubscriptionsListByResourceGroupNextOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroup, nextLink, options },
+ listByResourceGroupNextOperationSpec
+ );
+ }
+
+ /**
+ * ListBySubscriptionNext
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
+ * @param options The options parameters.
+ */
+ private _listBySubscriptionNext(
+ nextLink: string,
+ options?: LinkedSubscriptionsListBySubscriptionNextOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { nextLink, options },
+ listBySubscriptionNextOperationSpec
+ );
+ }
+}
+// Operation Specifications
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/linkedSubscriptions",
+ httpMethod: "GET",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.LinkedSubscriptionsList
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroup
+ ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStack/linkedSubscriptions",
+ httpMethod: "GET",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.LinkedSubscriptionsList
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/linkedSubscriptions/{linkedSubscriptionName}",
+ httpMethod: "GET",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.LinkedSubscription
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroup,
+ Parameters.linkedSubscriptionName
+ ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const deleteOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/linkedSubscriptions/{linkedSubscriptionName}",
+ httpMethod: "DELETE",
+ responses: {
+ 200: {},
+ 204: {},
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroup,
+ Parameters.linkedSubscriptionName
+ ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const createOrUpdateOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/linkedSubscriptions/{linkedSubscriptionName}",
+ httpMethod: "PUT",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.LinkedSubscription
+ },
+ 201: {
+ bodyMapper: Mappers.LinkedSubscription
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ requestBody: Parameters.resource,
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroup,
+ Parameters.linkedSubscriptionName
+ ],
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
+ serializer
+};
+const updateOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/linkedSubscriptions/{linkedSubscriptionName}",
+ httpMethod: "PATCH",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.LinkedSubscription
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ requestBody: Parameters.resource,
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroup,
+ Parameters.linkedSubscriptionName
+ ],
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
+ serializer
+};
+const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
+ path: "{nextLink}",
+ httpMethod: "GET",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.LinkedSubscriptionsList
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.nextLink,
+ Parameters.subscriptionId,
+ Parameters.resourceGroup
+ ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
+ path: "{nextLink}",
+ httpMethod: "GET",
+ responses: {
+ 200: {
+ bodyMapper: Mappers.LinkedSubscriptionsList
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.nextLink,
+ Parameters.subscriptionId
+ ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
diff --git a/sdk/azurestack/arm-azurestack/src/operations/operations.ts b/sdk/azurestack/arm-azurestack/src/operations/operations.ts
index 197d13211f8e..85dc5b40bd12 100644
--- a/sdk/azurestack/arm-azurestack/src/operations/operations.ts
+++ b/sdk/azurestack/arm-azurestack/src/operations/operations.ts
@@ -1,123 +1,137 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as Models from "../models";
-import * as Mappers from "../models/operationsMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { Operations } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { AzureStackManagementClientContext } from "../azureStackManagementClientContext";
+import { AzureStackManagementClient } from "../azureStackManagementClient";
+import {
+ Operation,
+ OperationsListNextOptionalParams,
+ OperationsListOptionalParams,
+ OperationsListResponse,
+ OperationsListNextResponse
+} from "../models";
-/** Class representing a Operations. */
-export class Operations {
- private readonly client: AzureStackManagementClientContext;
+///
+/** Class containing Operations operations. */
+export class OperationsImpl implements Operations {
+ private readonly client: AzureStackManagementClient;
/**
- * Create a Operations.
- * @param {AzureStackManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class Operations class.
+ * @param client Reference to the service client
*/
- constructor(client: AzureStackManagementClientContext) {
+ constructor(client: AzureStackManagementClient) {
this.client = client;
}
/**
* Returns the list of supported REST operations.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- 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 | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
- options
+ public list(
+ options?: OperationsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
},
- listOperationSpec,
- callback) as Promise;
+ byPage: () => {
+ return this.listPagingPage(options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ options?: OperationsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ options?: OperationsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(options)) {
+ yield* page;
+ }
}
/**
* Returns the list of supported REST 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
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ private _list(
+ options?: OperationsListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
+ }
+
/**
- * @param nextPageLink The NextLink from the previous successful call to List operation.
- * @param options The optional parameters
- * @param callback The callback
+ * ListNext
+ * @param nextLink The nextLink from the previous successful call to the List method.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listNext(
+ nextLink: string,
+ options?: OperationsListNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listNextOperationSpec,
- callback) as Promise;
+ { nextLink, options },
+ listNextOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path: "/providers/Microsoft.AzureStack/operations",
httpMethod: "GET",
- path: "providers/Microsoft.AzureStack/operations",
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.OperationList
},
default: {
- bodyMapper: Mappers.CloudError
+ bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host],
+ headerParameters: [Parameters.accept],
serializer
};
-
-const listNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.OperationList
},
default: {
- bodyMapper: Mappers.CloudError
+ bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [Parameters.$host, Parameters.nextLink],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/azurestack/arm-azurestack/src/operations/products.ts b/sdk/azurestack/arm-azurestack/src/operations/products.ts
index 5854a5a2df7d..faa8d74b2dea 100644
--- a/sdk/azurestack/arm-azurestack/src/operations/products.ts
+++ b/sdk/azurestack/arm-azurestack/src/operations/products.ts
@@ -1,28 +1,45 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as Models from "../models";
-import * as Mappers from "../models/productsMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { Products } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { AzureStackManagementClientContext } from "../azureStackManagementClientContext";
+import { AzureStackManagementClient } from "../azureStackManagementClient";
+import {
+ Product,
+ ProductsListNextOptionalParams,
+ ProductsListOptionalParams,
+ ProductsListResponse,
+ ProductsGetOptionalParams,
+ ProductsGetResponse,
+ ProductsListDetailsOptionalParams,
+ ProductsListDetailsResponse,
+ ProductsGetProductsOptionalParams,
+ ProductsGetProductsResponse,
+ ProductsGetProductOptionalParams,
+ ProductsGetProductResponse,
+ ProductsUploadLogOptionalParams,
+ ProductsUploadLogResponse,
+ ProductsListNextResponse
+} from "../models";
-/** Class representing a Products. */
-export class Products {
- private readonly client: AzureStackManagementClientContext;
+///
+/** Class containing Products operations. */
+export class ProductsImpl implements Products {
+ private readonly client: AzureStackManagementClient;
/**
- * Create a Products.
- * @param {AzureStackManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class Products class.
+ * @param client Reference to the service client
*/
- constructor(client: AzureStackManagementClientContext) {
+ constructor(client: AzureStackManagementClient) {
this.client = client;
}
@@ -30,68 +47,95 @@ export class Products {
* Returns a list of products.
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- list(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param callback The callback
- */
- list(resourceGroup: string, registrationName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param options The optional parameters
- * @param callback The callback
- */
- list(resourceGroup: string, registrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- list(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
+ public list(
+ resourceGroup: string,
+ registrationName: string,
+ options?: ProductsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(resourceGroup, registrationName, options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listPagingPage(resourceGroup, registrationName, options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ resourceGroup: string,
+ registrationName: string,
+ options?: ProductsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(resourceGroup, registrationName, options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(
resourceGroup,
registrationName,
+ continuationToken,
options
- },
- listOperationSpec,
- callback) as Promise;
+ );
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ resourceGroup: string,
+ registrationName: string,
+ options?: ProductsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(
+ resourceGroup,
+ registrationName,
+ options
+ )) {
+ yield* page;
+ }
}
/**
- * Returns the specified product.
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param productName Name of the product.
- * @param [options] The optional parameters
- * @returns Promise
- */
- get(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
+ * Returns a list of products.
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param productName Name of the product.
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(resourceGroup: string, registrationName: string, productName: string, callback: msRest.ServiceCallback): void;
+ private _list(
+ resourceGroup: string,
+ registrationName: string,
+ options?: ProductsListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroup, registrationName, options },
+ listOperationSpec
+ );
+ }
+
/**
+ * Returns the specified product.
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
* @param productName Name of the product.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(resourceGroup: string, registrationName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ get(
+ resourceGroup: string,
+ registrationName: string,
+ productName: string,
+ options?: ProductsGetOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- productName,
- options
- },
- getOperationSpec,
- callback) as Promise;
+ { resourceGroup, registrationName, productName, options },
+ getOperationSpec
+ );
}
/**
@@ -99,67 +143,37 @@ export class Products {
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
* @param productName Name of the product.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- listDetails(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param productName Name of the product.
- * @param callback The callback
- */
- listDetails(resourceGroup: string, registrationName: string, productName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param productName Name of the product.
- * @param options The optional parameters
- * @param callback The callback
- */
- listDetails(resourceGroup: string, registrationName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listDetails(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ listDetails(
+ resourceGroup: string,
+ registrationName: string,
+ productName: string,
+ options?: ProductsListDetailsOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- productName,
- options
- },
- listDetailsOperationSpec,
- callback) as Promise;
+ { resourceGroup, registrationName, productName, options },
+ listDetailsOperationSpec
+ );
}
/**
* Returns a list of products.
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param [options] The optional parameters
- * @returns Promise
- */
- getProducts(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param callback The callback
- */
- getProducts(resourceGroup: string, registrationName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param options The optional parameters
- * @param callback The callback
+ * @param productName Name of the product.
+ * @param options The options parameters.
*/
- getProducts(resourceGroup: string, registrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- getProducts(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ getProducts(
+ resourceGroup: string,
+ registrationName: string,
+ productName: string,
+ options?: ProductsGetProductsOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- options
- },
- getProductsOperationSpec,
- callback) as Promise;
+ { resourceGroup, registrationName, productName, options },
+ getProductsOperationSpec
+ );
}
/**
@@ -167,35 +181,18 @@ export class Products {
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
* @param productName Name of the product.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- getProduct(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param productName Name of the product.
- * @param callback The callback
- */
- getProduct(resourceGroup: string, registrationName: string, productName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param productName Name of the product.
- * @param options The optional parameters
- * @param callback The callback
- */
- getProduct(resourceGroup: string, registrationName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- getProduct(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ getProduct(
+ resourceGroup: string,
+ registrationName: string,
+ productName: string,
+ options?: ProductsGetProductOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- productName,
- options
- },
- getProductOperationSpec,
- callback) as Promise;
+ { resourceGroup, registrationName, productName, options },
+ getProductOperationSpec
+ );
}
/**
@@ -203,82 +200,46 @@ export class Products {
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
* @param productName Name of the product.
- * @param [options] The optional parameters
- * @returns Promise
- */
- uploadLog(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param productName Name of the product.
- * @param callback The callback
- */
- uploadLog(resourceGroup: string, registrationName: string, productName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param productName Name of the product.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- uploadLog(resourceGroup: string, registrationName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- uploadLog(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ uploadLog(
+ resourceGroup: string,
+ registrationName: string,
+ productName: string,
+ options?: ProductsUploadLogOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- productName,
- options
- },
- uploadLogOperationSpec,
- callback) as Promise;
+ { resourceGroup, registrationName, productName, options },
+ uploadLogOperationSpec
+ );
}
/**
- * Returns a list of products.
- * @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
+ * @param resourceGroup Name of the resource group.
+ * @param registrationName Name of the Azure Stack registration.
+ * @param nextLink The nextLink from the previous successful call to the List method.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listNext(
+ resourceGroup: string,
+ registrationName: string,
+ nextLink: string,
+ options?: ProductsListNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- nextPageLink,
- options
- },
- listNextOperationSpec,
- callback) as Promise;
+ { resourceGroup, registrationName, nextLink, options },
+ listNextOperationSpec
+ );
}
}
-
// Operation Specifications
-const serializer = new msRest.Serializer(Mappers);
-const listOperationSpec: msRest.OperationSpec = {
+const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
+
+const listOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products",
httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products",
- urlParameters: [
- Parameters.subscriptionId,
- Parameters.resourceGroup,
- Parameters.registrationName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
responses: {
200: {
bodyMapper: Mappers.ProductList
@@ -287,24 +248,20 @@ const listOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
- serializer
-};
-
-const getOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroup,
- Parameters.registrationName,
- Parameters.productName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
+ Parameters.registrationName
],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const getOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}",
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.Product
@@ -313,56 +270,44 @@ const getOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
- serializer
-};
-
-const listDetailsOperationSpec: msRest.OperationSpec = {
- httpMethod: "POST",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/listDetails",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroup,
Parameters.registrationName,
Parameters.productName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const listDetailsOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/listDetails",
+ httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.ExtendedProduct
},
default: {
- bodyMapper: Mappers.CloudError
+ bodyMapper: Mappers.ErrorResponse
}
},
- serializer
-};
-
-const getProductsOperationSpec: msRest.OperationSpec = {
- httpMethod: "POST",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/_all/GetProducts",
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroup,
- Parameters.registrationName
- ],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
+ Parameters.registrationName,
+ Parameters.productName
],
- requestBody: {
- parameterPath: [
- "options",
- "deviceConfiguration"
- ],
- mapper: Mappers.DeviceConfiguration
- },
+ headerParameters: [Parameters.accept],
+ serializer
+};
+const getProductsOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/getProducts",
+ httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.ProductList
@@ -371,31 +316,23 @@ const getProductsOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
- serializer
-};
-
-const getProductOperationSpec: msRest.OperationSpec = {
- httpMethod: "POST",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/GetProduct",
+ requestBody: Parameters.deviceConfiguration,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroup,
Parameters.registrationName,
Parameters.productName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: [
- "options",
- "deviceConfiguration"
- ],
- mapper: Mappers.DeviceConfiguration
- },
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
+ serializer
+};
+const getProductOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/getProduct",
+ httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.Product
@@ -404,31 +341,23 @@ const getProductOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
- serializer
-};
-
-const uploadLogOperationSpec: msRest.OperationSpec = {
- httpMethod: "POST",
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/uploadProductLog",
+ requestBody: Parameters.deviceConfiguration,
+ queryParameters: [Parameters.apiVersion],
urlParameters: [
+ Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroup,
Parameters.registrationName,
Parameters.productName
],
- queryParameters: [
- Parameters.apiVersion
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
- requestBody: {
- parameterPath: [
- "options",
- "marketplaceProductLogUpdate"
- ],
- mapper: Mappers.MarketplaceProductLogUpdate
- },
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
+ serializer
+};
+const uploadLogOperationSpec: coreClient.OperationSpec = {
+ path:
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/uploadProductLog",
+ httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.ProductLog
@@ -437,19 +366,22 @@ const uploadLogOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ requestBody: Parameters.marketplaceProductLogUpdate,
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.subscriptionId,
+ Parameters.resourceGroup,
+ Parameters.registrationName,
+ Parameters.productName
+ ],
+ headerParameters: [Parameters.accept, Parameters.contentType],
+ mediaType: "json",
serializer
};
-
-const listNextOperationSpec: msRest.OperationSpec = {
- httpMethod: "GET",
- baseUrl: "https://management.azure.com",
+const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
- urlParameters: [
- Parameters.nextPageLink
- ],
- headerParameters: [
- Parameters.acceptLanguage
- ],
+ httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ProductList
@@ -458,5 +390,14 @@ const listNextOperationSpec: msRest.OperationSpec = {
bodyMapper: Mappers.ErrorResponse
}
},
+ queryParameters: [Parameters.apiVersion],
+ urlParameters: [
+ Parameters.$host,
+ Parameters.nextLink,
+ Parameters.subscriptionId,
+ Parameters.resourceGroup,
+ Parameters.registrationName
+ ],
+ headerParameters: [Parameters.accept],
serializer
};
diff --git a/sdk/azurestack/arm-azurestack/src/operations/registrations.ts b/sdk/azurestack/arm-azurestack/src/operations/registrations.ts
index ff7c5d1122a4..baaba04236fc 100644
--- a/sdk/azurestack/arm-azurestack/src/operations/registrations.ts
+++ b/sdk/azurestack/arm-azurestack/src/operations/registrations.ts
@@ -1,121 +1,201 @@
/*
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Copyright (c) Microsoft Corporation.
+ * Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import * as msRest from "@azure/ms-rest-js";
-import * as Models from "../models";
-import * as Mappers from "../models/registrationsMappers";
+import { PagedAsyncIterableIterator } from "@azure/core-paging";
+import { Registrations } from "../operationsInterfaces";
+import * as coreClient from "@azure/core-client";
+import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
-import { AzureStackManagementClientContext } from "../azureStackManagementClientContext";
+import { AzureStackManagementClient } from "../azureStackManagementClient";
+import {
+ Registration,
+ RegistrationsListNextOptionalParams,
+ RegistrationsListOptionalParams,
+ RegistrationsListBySubscriptionNextOptionalParams,
+ RegistrationsListBySubscriptionOptionalParams,
+ RegistrationsListResponse,
+ RegistrationsListBySubscriptionResponse,
+ RegistrationsGetOptionalParams,
+ RegistrationsGetResponse,
+ RegistrationsDeleteOptionalParams,
+ RegistrationParameter,
+ RegistrationsCreateOrUpdateOptionalParams,
+ RegistrationsCreateOrUpdateResponse,
+ RegistrationsUpdateOptionalParams,
+ RegistrationsUpdateResponse,
+ RegistrationsGetActivationKeyOptionalParams,
+ RegistrationsGetActivationKeyResponse,
+ RegistrationsEnableRemoteManagementOptionalParams,
+ RegistrationsListNextResponse,
+ RegistrationsListBySubscriptionNextResponse
+} from "../models";
-/** Class representing a Registrations. */
-export class Registrations {
- private readonly client: AzureStackManagementClientContext;
+///
+/** Class containing Registrations operations. */
+export class RegistrationsImpl implements Registrations {
+ private readonly client: AzureStackManagementClient;
/**
- * Create a Registrations.
- * @param {AzureStackManagementClientContext} client Reference to the service client.
+ * Initialize a new instance of the class Registrations class.
+ * @param client Reference to the service client
*/
- constructor(client: AzureStackManagementClientContext) {
+ constructor(client: AzureStackManagementClient) {
this.client = client;
}
/**
* Returns a list of all registrations.
* @param resourceGroup Name of the resource group.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- list(resourceGroup: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param callback The callback
- */
- list(resourceGroup: string, callback: msRest.ServiceCallback): void;
+ public list(
+ resourceGroup: string,
+ options?: RegistrationsListOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listPagingAll(resourceGroup, options);
+ return {
+ next() {
+ return iter.next();
+ },
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listPagingPage(resourceGroup, options);
+ }
+ };
+ }
+
+ private async *listPagingPage(
+ resourceGroup: string,
+ options?: RegistrationsListOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._list(resourceGroup, options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listNext(resourceGroup, continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listPagingAll(
+ resourceGroup: string,
+ options?: RegistrationsListOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listPagingPage(resourceGroup, options)) {
+ yield* page;
+ }
+ }
+
/**
- * @param resourceGroup Name of the resource group.
- * @param options The optional parameters
- * @param callback The callback
+ * Returns a list of all registrations under current subscription.
+ * @param options The options parameters.
*/
- list(resourceGroup: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- list(resourceGroup: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
- return this.client.sendOperationRequest(
- {
- resourceGroup,
- options
+ public listBySubscription(
+ options?: RegistrationsListBySubscriptionOptionalParams
+ ): PagedAsyncIterableIterator {
+ const iter = this.listBySubscriptionPagingAll(options);
+ return {
+ next() {
+ return iter.next();
},
- listOperationSpec,
- callback) as Promise;
+ [Symbol.asyncIterator]() {
+ return this;
+ },
+ byPage: () => {
+ return this.listBySubscriptionPagingPage(options);
+ }
+ };
+ }
+
+ private async *listBySubscriptionPagingPage(
+ options?: RegistrationsListBySubscriptionOptionalParams
+ ): AsyncIterableIterator {
+ let result = await this._listBySubscription(options);
+ yield result.value || [];
+ let continuationToken = result.nextLink;
+ while (continuationToken) {
+ result = await this._listBySubscriptionNext(continuationToken, options);
+ continuationToken = result.nextLink;
+ yield result.value || [];
+ }
+ }
+
+ private async *listBySubscriptionPagingAll(
+ options?: RegistrationsListBySubscriptionOptionalParams
+ ): AsyncIterableIterator {
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
+ yield* page;
+ }
}
/**
- * Returns the properties of an Azure Stack registration.
+ * Returns a list of all registrations.
* @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- get(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase): Promise;
+ private _list(
+ resourceGroup: string,
+ options?: RegistrationsListOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroup, options },
+ listOperationSpec
+ );
+ }
+
/**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param callback The callback
+ * Returns a list of all registrations under current subscription.
+ * @param options The options parameters.
*/
- get(resourceGroup: string, registrationName: string, callback: msRest.ServiceCallback): void;
+ private _listBySubscription(
+ options?: RegistrationsListBySubscriptionOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { options },
+ listBySubscriptionOperationSpec
+ );
+ }
+
/**
+ * Returns the properties of an Azure Stack registration.
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- get(resourceGroup: string, registrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- get(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ get(
+ resourceGroup: string,
+ registrationName: string,
+ options?: RegistrationsGetOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- options
- },
- getOperationSpec,
- callback) as Promise;
+ { resourceGroup, registrationName, options },
+ getOperationSpec
+ );
}
/**
* Delete the requested Azure Stack registration.
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param [options] The optional parameters
- * @returns Promise
- */
- deleteMethod(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param callback The callback
+ * @param options The options parameters.
*/
- deleteMethod(resourceGroup: string, registrationName: string, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param options The optional parameters
- * @param callback The callback
- */
- deleteMethod(resourceGroup: string, registrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- deleteMethod(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ delete(
+ resourceGroup: string,
+ registrationName: string,
+ options?: RegistrationsDeleteOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- options
- },
- deleteMethodOperationSpec,
- callback);
+ { resourceGroup, registrationName, options },
+ deleteOperationSpec
+ );
}
/**
@@ -123,35 +203,18 @@ export class Registrations {
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
* @param token Registration token
- * @param [options] The optional parameters
- * @returns Promise
- */
- createOrUpdate(resourceGroup: string, registrationName: string, token: Models.RegistrationParameter, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param token Registration token
- * @param callback The callback
- */
- createOrUpdate(resourceGroup: string, registrationName: string, token: Models.RegistrationParameter, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param token Registration token
- * @param options The optional parameters
- * @param callback The callback
+ * @param options The options parameters.
*/
- createOrUpdate(resourceGroup: string, registrationName: string, token: Models.RegistrationParameter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- createOrUpdate(resourceGroup: string, registrationName: string, token: Models.RegistrationParameter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ createOrUpdate(
+ resourceGroup: string,
+ registrationName: string,
+ token: RegistrationParameter,
+ options?: RegistrationsCreateOrUpdateOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- token,
- options
- },
- createOrUpdateOperationSpec,
- callback) as Promise;
+ { resourceGroup, registrationName, token, options },
+ createOrUpdateOperationSpec
+ );
}
/**
@@ -159,113 +222,114 @@ export class Registrations {
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
* @param token Registration token
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- update(resourceGroup: string, registrationName: string, token: Models.RegistrationParameter, options?: msRest.RequestOptionsBase): Promise;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param token Registration token
- * @param callback The callback
- */
- update(resourceGroup: string, registrationName: string, token: Models.RegistrationParameter, callback: msRest.ServiceCallback): void;
- /**
- * @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param token Registration token
- * @param options The optional parameters
- * @param callback The callback
- */
- update(resourceGroup: string, registrationName: string, token: Models.RegistrationParameter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- update(resourceGroup: string, registrationName: string, token: Models.RegistrationParameter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ update(
+ resourceGroup: string,
+ registrationName: string,
+ token: RegistrationParameter,
+ options?: RegistrationsUpdateOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- token,
- options
- },
- updateOperationSpec,
- callback) as Promise;
+ { resourceGroup, registrationName, token, options },
+ updateOperationSpec
+ );
}
/**
* Returns Azure Stack Activation Key.
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param [options] The optional parameters
- * @returns Promise
+ * @param options The options parameters.
*/
- getActivationKey(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase): Promise;
+ getActivationKey(
+ resourceGroup: string,
+ registrationName: string,
+ options?: RegistrationsGetActivationKeyOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroup, registrationName, options },
+ getActivationKeyOperationSpec
+ );
+ }
+
/**
+ * Enables remote management for device under the Azure Stack registration.
* @param resourceGroup Name of the resource group.
* @param registrationName Name of the Azure Stack registration.
- * @param callback The callback
+ * @param options The options parameters.
*/
- getActivationKey(resourceGroup: string, registrationName: string, callback: msRest.ServiceCallback): void;
+ enableRemoteManagement(
+ resourceGroup: string,
+ registrationName: string,
+ options?: RegistrationsEnableRemoteManagementOptionalParams
+ ): Promise {
+ return this.client.sendOperationRequest(
+ { resourceGroup, registrationName, options },
+ enableRemoteManagementOperationSpec
+ );
+ }
+
/**
+ * ListNext
* @param resourceGroup Name of the resource group.
- * @param registrationName Name of the Azure Stack registration.
- * @param options The optional parameters
- * @param callback The callback
+ * @param nextLink The nextLink from the previous successful call to the List method.
+ * @param options The options parameters.
*/
- getActivationKey(resourceGroup: string, registrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- getActivationKey(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ private _listNext(
+ resourceGroup: string,
+ nextLink: string,
+ options?: RegistrationsListNextOptionalParams
+ ): Promise {
return this.client.sendOperationRequest(
- {
- resourceGroup,
- registrationName,
- options
- },
- getActivationKeyOperationSpec,
- callback) as Promise;
+ { resourceGroup, nextLink, options },
+ listNextOperationSpec
+ );
}
/**
- * Returns a list of all registrations.
- * @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
+ * ListBySubscriptionNext
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
+ * @param options The options parameters.
*/
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise